summaryrefslogtreecommitdiff
path: root/mcon
diff options
context:
space:
mode:
Diffstat (limited to 'mcon')
-rw-r--r--mcon/Jmakefile10
-rwxr-xr-xmcon/Makefile.SH28
-rw-r--r--mcon/U/AAAAA.U6
-rw-r--r--mcon/U/Alpha_mieee.U41
-rw-r--r--mcon/U/Assert.U26
-rw-r--r--mcon/U/Begin.U6
-rw-r--r--mcon/U/Checkcc.U8
-rw-r--r--mcon/U/Chk_MANI.U6
-rw-r--r--mcon/U/Chk_whoami.U6
-rw-r--r--mcon/U/Compile.U6
-rw-r--r--mcon/U/Config_h.U8
-rw-r--r--mcon/U/Config_sh.U6
-rw-r--r--mcon/U/Configdir.U6
-rw-r--r--mcon/U/Cppsym.U6
-rw-r--r--mcon/U/Cross.U9
-rw-r--r--mcon/U/Csym.U34
-rw-r--r--mcon/U/End.U6
-rw-r--r--mcon/U/Extract.U9
-rw-r--r--mcon/U/Extractall.U6
-rw-r--r--mcon/U/Filexp.U6
-rw-r--r--mcon/U/Findhdr.U67
-rw-r--r--mcon/U/Finish.U10
-rw-r--r--mcon/U/GCC_pipe.U65
-rw-r--r--mcon/U/Getfile.U9
-rw-r--r--mcon/U/Guess.U44
-rw-r--r--mcon/U/Head.U14
-rw-r--r--mcon/U/Inhdr.U6
-rw-r--r--mcon/U/Init.U6
-rw-r--r--mcon/U/Inlibc.U6
-rw-r--r--mcon/U/Instruct.U6
-rw-r--r--mcon/U/Largefile.U74
-rw-r--r--mcon/U/Loc.U125
-rw-r--r--mcon/U/Loc_sed.U6
-rw-r--r--mcon/U/Magic_h.U8
-rw-r--r--mcon/U/MailAuthor.U8
-rw-r--r--mcon/U/MailList.U8
-rw-r--r--mcon/U/Mips.U69
-rw-r--r--mcon/U/Mkdirp.U6
-rw-r--r--mcon/U/Mksymlinks.U6
-rw-r--r--mcon/U/Myinit.U6
-rw-r--r--mcon/U/Myread.U6
-rw-r--r--mcon/U/Nothing.U6
-rw-r--r--mcon/U/Null.U6
-rw-r--r--mcon/U/Obsol_h.U6
-rw-r--r--mcon/U/Obsol_sh.U6
-rw-r--r--mcon/U/Oldconfig.U66
-rw-r--r--mcon/U/Oldsym.U12
-rw-r--r--mcon/U/Options.U10
-rw-r--r--mcon/U/Prefixit.U6
-rw-r--r--mcon/U/Prefixup.U6
-rw-r--r--mcon/U/Rcs.U6
-rw-r--r--mcon/U/Sendfile64.U36
-rw-r--r--mcon/U/Setvar.U6
-rw-r--r--mcon/U/Signal.U10
-rw-r--r--mcon/U/Tr.U6
-rw-r--r--mcon/U/Trylink.U110
-rw-r--r--mcon/U/Typedef.U6
-rw-r--r--mcon/U/Unix.U8
-rw-r--r--mcon/U/Warn.U6
-rw-r--r--mcon/U/Warn_v7EXT.U6
-rw-r--r--mcon/U/Warn_v7ND.U6
-rw-r--r--mcon/U/Whoa.U6
-rw-r--r--mcon/U/abortsig.U9
-rw-r--r--mcon/U/active.U6
-rw-r--r--mcon/U/afs.U6
-rw-r--r--mcon/U/alignbytes.U125
-rw-r--r--mcon/U/archlib.U6
-rw-r--r--mcon/U/archname.U6
-rw-r--r--mcon/U/baserev.U6
-rw-r--r--mcon/U/basicshell.U6
-rw-r--r--mcon/U/bin.U6
-rw-r--r--mcon/U/bitpbyte.U6
-rw-r--r--mcon/U/byteorder.U123
-rw-r--r--mcon/U/cc.U6
-rw-r--r--mcon/U/ccflags.U57
-rw-r--r--mcon/U/cf_email.U25
-rw-r--r--mcon/U/cf_name.U6
-rw-r--r--mcon/U/cf_who.U6
-rw-r--r--mcon/U/charorder.U6
-rw-r--r--mcon/U/charsize.U52
-rw-r--r--mcon/U/contains.U6
-rw-r--r--mcon/U/cpp_stuff.U8
-rw-r--r--mcon/U/cpp_trad.U6
-rw-r--r--mcon/U/cppfilecom.U6
-rw-r--r--mcon/U/cppstdin.U6
-rw-r--r--mcon/U/d_NOFILE.U6
-rw-r--r--mcon/U/d_NeWS.U7
-rw-r--r--mcon/U/d_PORTAR.U6
-rw-r--r--mcon/U/d_SHM_MAC.U6
-rw-r--r--mcon/U/d_access.U35
-rw-r--r--mcon/U/d_alarm.U25
-rw-r--r--mcon/U/d_arc4random.U40
-rw-r--r--mcon/U/d_attribut.U29
-rw-r--r--mcon/U/d_backtrace.U45
-rw-r--r--mcon/U/d_bcmp.U22
-rw-r--r--mcon/U/d_bcopy.U36
-rw-r--r--mcon/U/d_bfd_lib.U48
-rw-r--r--mcon/U/d_bindtxtcode.U38
-rw-r--r--mcon/U/d_brokstat.U8
-rw-r--r--mcon/U/d_bsdjmp.U7
-rw-r--r--mcon/U/d_built_bswap32.U35
-rw-r--r--mcon/U/d_built_bswap64.U35
-rw-r--r--mcon/U/d_built_clz.U37
-rw-r--r--mcon/U/d_built_ctz.U37
-rw-r--r--mcon/U/d_built_memcmp.U37
-rw-r--r--mcon/U/d_built_popcount.U36
-rw-r--r--mcon/U/d_byacc.U6
-rw-r--r--mcon/U/d_bzero.U22
-rw-r--r--mcon/U/d_casti32.U6
-rw-r--r--mcon/U/d_castneg.U6
-rw-r--r--mcon/U/d_cbrt.U22
-rw-r--r--mcon/U/d_charsprf.U6
-rw-r--r--mcon/U/d_chown.U28
-rw-r--r--mcon/U/d_chroot.U25
-rw-r--r--mcon/U/d_chsize.U22
-rw-r--r--mcon/U/d_ckeypad.U10
-rw-r--r--mcon/U/d_clock_getres.U38
-rw-r--r--mcon/U/d_clock_gettime.U38
-rw-r--r--mcon/U/d_closedir.U28
-rw-r--r--mcon/U/d_closefrom.U45
-rw-r--r--mcon/U/d_const.U17
-rw-r--r--mcon/U/d_crypt.U80
-rw-r--r--mcon/U/d_csh.U6
-rw-r--r--mcon/U/d_ctermid.U22
-rw-r--r--mcon/U/d_cuserid.U22
-rw-r--r--mcon/U/d_datastart_symbol.U64
-rw-r--r--mcon/U/d_dbl_dig.U8
-rw-r--r--mcon/U/d_debugging.U6
-rw-r--r--mcon/U/d_deflate.U42
-rw-r--r--mcon/U/d_devpoll.U52
-rw-r--r--mcon/U/d_difftime.U71
-rw-r--r--mcon/U/d_dirent_d_type.U51
-rw-r--r--mcon/U/d_dladdr.U42
-rw-r--r--mcon/U/d_dlerror.U34
-rw-r--r--mcon/U/d_dliterphdr.U44
-rw-r--r--mcon/U/d_dlopen.U34
-rw-r--r--mcon/U/d_dosuid.U6
-rw-r--r--mcon/U/d_drem.U22
-rw-r--r--mcon/U/d_dup2.U25
-rw-r--r--mcon/U/d_end_symbol.U37
-rw-r--r--mcon/U/d_eofpipe.U6
-rw-r--r--mcon/U/d_epoll.U51
-rw-r--r--mcon/U/d_etext_symbol.U37
-rw-r--r--mcon/U/d_euc2jis.U6
-rw-r--r--mcon/U/d_fast_assert.U85
-rw-r--r--mcon/U/d_fchmod.U27
-rw-r--r--mcon/U/d_fchown.U28
-rw-r--r--mcon/U/d_fcntl.U29
-rw-r--r--mcon/U/d_fd_set.U11
-rw-r--r--mcon/U/d_fdatasync.U41
-rw-r--r--mcon/U/d_ffs.U22
-rw-r--r--mcon/U/d_fgetpos.U23
-rw-r--r--mcon/U/d_flexfnam.U20
-rw-r--r--mcon/U/d_flock.U25
-rw-r--r--mcon/U/d_fmod.U22
-rw-r--r--mcon/U/d_fork.U26
-rw-r--r--mcon/U/d_fsetpos.U23
-rw-r--r--mcon/U/d_fsync.U41
-rw-r--r--mcon/U/d_ftime.U52
-rw-r--r--mcon/U/d_ftrncate.U27
-rw-r--r--mcon/U/d_gconvert.U8
-rw-r--r--mcon/U/d_getaddrinfo.U82
-rw-r--r--mcon/U/d_getcontext.U38
-rw-r--r--mcon/U/d_geteuid.U40
-rw-r--r--mcon/U/d_getgrps.U27
-rw-r--r--mcon/U/d_gethbynm.U22
-rw-r--r--mcon/U/d_gethent.U22
-rw-r--r--mcon/U/d_gethid.U25
-rw-r--r--mcon/U/d_gethname.U6
-rw-r--r--mcon/U/d_getifaddrs.U54
-rw-r--r--mcon/U/d_getinvent.U37
-rw-r--r--mcon/U/d_getlogin.U25
-rw-r--r--mcon/U/d_getnameinfo.U73
-rw-r--r--mcon/U/d_getopt.U27
-rw-r--r--mcon/U/d_getpagsz.U40
-rw-r--r--mcon/U/d_getpgid.U26
-rw-r--r--mcon/U/d_getpgrp.U103
-rw-r--r--mcon/U/d_getpgrp2.U26
-rw-r--r--mcon/U/d_getppid.U26
-rw-r--r--mcon/U/d_getprior.U28
-rw-r--r--mcon/U/d_getpwent.U28
-rw-r--r--mcon/U/d_getrlimit.U46
-rw-r--r--mcon/U/d_gettext.U37
-rw-r--r--mcon/U/d_getuid.U40
-rw-r--r--mcon/U/d_getwd.U33
-rw-r--r--mcon/U/d_gnugettext.U54
-rw-r--r--mcon/U/d_gnulibc.U6
-rw-r--r--mcon/U/d_group.U6
-rw-r--r--mcon/U/d_havetlib.U6
-rw-r--r--mcon/U/d_herror.U36
-rw-r--r--mcon/U/d_hidnet.U6
-rw-r--r--mcon/U/d_hstrerror.U37
-rw-r--r--mcon/U/d_htonl.U50
-rw-r--r--mcon/U/d_iconv.U47
-rw-r--r--mcon/U/d_ieee754.U88
-rw-r--r--mcon/U/d_inetaton.U26
-rw-r--r--mcon/U/d_inetd.U6
-rw-r--r--mcon/U/d_inflate.U42
-rw-r--r--mcon/U/d_initstate.U43
-rw-r--r--mcon/U/d_internet.U6
-rw-r--r--mcon/U/d_iptos.U94
-rw-r--r--mcon/U/d_ipv6.U91
-rw-r--r--mcon/U/d_isascii.U37
-rw-r--r--mcon/U/d_itimer.U26
-rw-r--r--mcon/U/d_keepsig.U6
-rw-r--r--mcon/U/d_kevent_udata.U49
-rw-r--r--mcon/U/d_killpg.U24
-rw-r--r--mcon/U/d_kqueue.U57
-rw-r--r--mcon/U/d_link.U25
-rw-r--r--mcon/U/d_linuxstd.U6
-rw-r--r--mcon/U/d_locale_charset.U39
-rw-r--r--mcon/U/d_locconv.U25
-rw-r--r--mcon/U/d_lockf.U30
-rw-r--r--mcon/U/d_lstat.U26
-rw-r--r--mcon/U/d_madvise.U43
-rw-r--r--mcon/U/d_mblen.U26
-rw-r--r--mcon/U/d_mbstowcs.U26
-rw-r--r--mcon/U/d_mbtowc.U27
-rw-r--r--mcon/U/d_memalign.U31
-rw-r--r--mcon/U/d_memccpy.U24
-rw-r--r--mcon/U/d_memchr.U24
-rw-r--r--mcon/U/d_memcmp.U22
-rw-r--r--mcon/U/d_memcpy.U23
-rw-r--r--mcon/U/d_memmove.U25
-rw-r--r--mcon/U/d_mempcpy.U51
-rw-r--r--mcon/U/d_memset.U24
-rw-r--r--mcon/U/d_mkdir.U27
-rw-r--r--mcon/U/d_mkfifo.U27
-rw-r--r--mcon/U/d_mktime.U23
-rw-r--r--mcon/U/d_mmap.U34
-rw-r--r--mcon/U/d_msem_lck.U26
-rw-r--r--mcon/U/d_msg.U6
-rw-r--r--mcon/U/d_msg_flags.U59
-rw-r--r--mcon/U/d_msgctl.U25
-rw-r--r--mcon/U/d_msgget.U26
-rw-r--r--mcon/U/d_msgrcv.U28
-rw-r--r--mcon/U/d_msgsnd.U25
-rw-r--r--mcon/U/d_msync.U30
-rw-r--r--mcon/U/d_munmap.U27
-rw-r--r--mcon/U/d_nanosleep.U38
-rw-r--r--mcon/U/d_newsadm.U6
-rw-r--r--mcon/U/d_nice.U25
-rw-r--r--mcon/U/d_nls.U45
-rw-r--r--mcon/U/d_nolnbuf.U6
-rw-r--r--mcon/U/d_normsig.U6
-rw-r--r--mcon/U/d_open3.U14
-rw-r--r--mcon/U/d_passwd.U6
-rw-r--r--mcon/U/d_pathconf.U44
-rw-r--r--mcon/U/d_pause.U25
-rw-r--r--mcon/U/d_perror.U21
-rw-r--r--mcon/U/d_pidcheck.U6
-rw-r--r--mcon/U/d_pipe.U25
-rw-r--r--mcon/U/d_poll.U40
-rw-r--r--mcon/U/d_popen.U23
-rw-r--r--mcon/U/d_portable.U6
-rw-r--r--mcon/U/d_posix_fadvise.U47
-rw-r--r--mcon/U/d_posix_memalign.U41
-rw-r--r--mcon/U/d_pread.U31
-rw-r--r--mcon/U/d_preadv.U30
-rw-r--r--mcon/U/d_psignal.U22
-rw-r--r--mcon/U/d_ptattr_setstack.U40
-rw-r--r--mcon/U/d_pwrite.U31
-rw-r--r--mcon/U/d_pwritev.U30
-rw-r--r--mcon/U/d_random.U40
-rw-r--r--mcon/U/d_raster.U6
-rw-r--r--mcon/U/d_rdchk.U21
-rw-r--r--mcon/U/d_readdir.U84
-rw-r--r--mcon/U/d_readlink.U27
-rw-r--r--mcon/U/d_recvmsg.U70
-rw-r--r--mcon/U/d_regcmp.U44
-rw-r--r--mcon/U/d_regcomp.U44
-rw-r--r--mcon/U/d_regparm.U48
-rw-r--r--mcon/U/d_rename.U22
-rw-r--r--mcon/U/d_rmdir.U25
-rw-r--r--mcon/U/d_rusage.U29
-rw-r--r--mcon/U/d_sa_interrupt.U37
-rw-r--r--mcon/U/d_safebcpy.U6
-rw-r--r--mcon/U/d_safemcpy.U6
-rw-r--r--mcon/U/d_sanemcmp.U6
-rw-r--r--mcon/U/d_sbrk.U25
-rw-r--r--mcon/U/d_scandir.U39
-rw-r--r--mcon/U/d_scannl.U10
-rw-r--r--mcon/U/d_sched_yield.U36
-rw-r--r--mcon/U/d_scorfl.U6
-rw-r--r--mcon/U/d_select.U40
-rw-r--r--mcon/U/d_sem.U6
-rw-r--r--mcon/U/d_semctl.U33
-rw-r--r--mcon/U/d_semget.U27
-rw-r--r--mcon/U/d_semop.U67
-rw-r--r--mcon/U/d_sendfile.U41
-rw-r--r--mcon/U/d_sendmsg.U70
-rw-r--r--mcon/U/d_setegid.U27
-rw-r--r--mcon/U/d_seteuid.U27
-rw-r--r--mcon/U/d_setgrps.U27
-rw-r--r--mcon/U/d_setlnbuf.U21
-rw-r--r--mcon/U/d_setlocale.U26
-rw-r--r--mcon/U/d_setpgid.U27
-rw-r--r--mcon/U/d_setpgrp.U102
-rw-r--r--mcon/U/d_setpgrp2.U27
-rw-r--r--mcon/U/d_setprior.U28
-rw-r--r--mcon/U/d_setproctitle.U45
-rw-r--r--mcon/U/d_setregid.U48
-rw-r--r--mcon/U/d_setreuid.U48
-rw-r--r--mcon/U/d_setrgid.U27
-rw-r--r--mcon/U/d_setrlimit.U47
-rw-r--r--mcon/U/d_setruid.U27
-rw-r--r--mcon/U/d_setsid.U26
-rw-r--r--mcon/U/d_sgndchr.U39
-rw-r--r--mcon/U/d_shm.U6
-rw-r--r--mcon/U/d_shmat.U114
-rw-r--r--mcon/U/d_shmctl.U25
-rw-r--r--mcon/U/d_shmdt.U23
-rw-r--r--mcon/U/d_shmget.U27
-rw-r--r--mcon/U/d_sigaction.U44
-rw-r--r--mcon/U/d_sigaltstack.U42
-rw-r--r--mcon/U/d_sigblock.U22
-rw-r--r--mcon/U/d_sighold.U22
-rw-r--r--mcon/U/d_siglist.U30
-rw-r--r--mcon/U/d_sigprocmask.U42
-rw-r--r--mcon/U/d_sigsetjmp.U27
-rw-r--r--mcon/U/d_sigsetmk.U28
-rw-r--r--mcon/U/d_sigvec.U70
-rw-r--r--mcon/U/d_sjis2jis.U6
-rw-r--r--mcon/U/d_sockaddr_in_sin_len.U53
-rw-r--r--mcon/U/d_sockaddr_un.U61
-rw-r--r--mcon/U/d_socker_get.U65
-rw-r--r--mcon/U/d_socket.U35
-rw-r--r--mcon/U/d_speedopt.U6
-rw-r--r--mcon/U/d_srandom.U39
-rw-r--r--mcon/U/d_stat.U26
-rw-r--r--mcon/U/d_statblks.U6
-rw-r--r--mcon/U/d_statfs.U50
-rw-r--r--mcon/U/d_statvfs.U39
-rw-r--r--mcon/U/d_stdstdio.U6
-rw-r--r--mcon/U/d_strcasestr.U37
-rw-r--r--mcon/U/d_strccmp.U23
-rw-r--r--mcon/U/d_strchr.U70
-rw-r--r--mcon/U/d_strcoll.U22
-rw-r--r--mcon/U/d_strcspn.U22
-rw-r--r--mcon/U/d_strctcpy.U6
-rw-r--r--mcon/U/d_strdup.U23
-rw-r--r--mcon/U/d_strerror.U6
-rw-r--r--mcon/U/d_strftime.U24
-rw-r--r--mcon/U/d_strlcat.U38
-rw-r--r--mcon/U/d_strlcpy.U38
-rw-r--r--mcon/U/d_strstr.U22
-rw-r--r--mcon/U/d_strtod.U26
-rw-r--r--mcon/U/d_strtok.U22
-rw-r--r--mcon/U/d_strtol.U26
-rw-r--r--mcon/U/d_strtoul.U26
-rw-r--r--mcon/U/d_strxfrm.U23
-rw-r--r--mcon/U/d_su_chown.U6
-rw-r--r--mcon/U/d_symlink.U25
-rw-r--r--mcon/U/d_sync_atomic.U42
-rw-r--r--mcon/U/d_syscall.U26
-rw-r--r--mcon/U/d_sysconf.U25
-rw-r--r--mcon/U/d_sysctl.U41
-rw-r--r--mcon/U/d_syslog.U29
-rw-r--r--mcon/U/d_system.U25
-rw-r--r--mcon/U/d_table.U25
-rw-r--r--mcon/U/d_tcgtpgrp.U26
-rw-r--r--mcon/U/d_tcstpgrp.U27
-rw-r--r--mcon/U/d_time.U8
-rw-r--r--mcon/U/d_times.U8
-rw-r--r--mcon/U/d_tminsys.U6
-rw-r--r--mcon/U/d_truncate.U27
-rw-r--r--mcon/U/d_ttyname.U47
-rw-r--r--mcon/U/d_tzmin.U6
-rw-r--r--mcon/U/d_tzname.U29
-rw-r--r--mcon/U/d_uctx_mctx.U44
-rw-r--r--mcon/U/d_uctx_mctx_gregs.U44
-rw-r--r--mcon/U/d_ulimit.U23
-rw-r--r--mcon/U/d_umask.U26
-rw-r--r--mcon/U/d_usendir.U6
-rw-r--r--mcon/U/d_usleep.U25
-rw-r--r--mcon/U/d_uwait.U6
-rw-r--r--mcon/U/d_vfork.U28
-rw-r--r--mcon/U/d_voidsig.U6
-rw-r--r--mcon/U/d_volatile.U21
-rw-r--r--mcon/U/d_vprintf.U6
-rw-r--r--mcon/U/d_vsnprintf.U47
-rw-r--r--mcon/U/d_wait3.U34
-rw-r--r--mcon/U/d_wait4.U34
-rw-r--r--mcon/U/d_waitpid.U29
-rw-r--r--mcon/U/d_wcstombs.U27
-rw-r--r--mcon/U/d_wctomb.U31
-rw-r--r--mcon/U/d_wifstat.U6
-rw-r--r--mcon/U/d_xdrs.U6
-rw-r--r--mcon/U/defeditor.U6
-rw-r--r--mcon/U/doublesize.U6
-rw-r--r--mcon/U/ebcdic.U6
-rw-r--r--mcon/U/enablenls.U61
-rw-r--r--mcon/U/errnolist.U6
-rw-r--r--mcon/U/etc.U6
-rw-r--r--mcon/U/fieldn.U82
-rw-r--r--mcon/U/filexp_path.U (renamed from mcon/U/filexp.U)6
-rw-r--r--mcon/U/floatsize.U6
-rw-r--r--mcon/U/fpostype.U6
-rw-r--r--mcon/U/fpu.U6
-rw-r--r--mcon/U/gccvers.U9
-rw-r--r--mcon/U/gidtype.U6
-rw-r--r--mcon/U/groupstype.U6
-rw-r--r--mcon/U/h_fcntl.U6
-rw-r--r--mcon/U/h_sysfile.U6
-rw-r--r--mcon/U/i_alloca.U36
-rw-r--r--mcon/U/i_arpainet.U6
-rw-r--r--mcon/U/i_db.U6
-rw-r--r--mcon/U/i_dbm.U60
-rw-r--r--mcon/U/i_dirent.U6
-rw-r--r--mcon/U/i_dld.U6
-rw-r--r--mcon/U/i_dlfcn.U6
-rw-r--r--mcon/U/i_execinfo.U27
-rw-r--r--mcon/U/i_fcntl.U8
-rw-r--r--mcon/U/i_float.U6
-rw-r--r--mcon/U/i_gdbm.U39
-rw-r--r--mcon/U/i_grp.U6
-rw-r--r--mcon/U/i_iconv.U31
-rw-r--r--mcon/U/i_ifaddrs.U27
-rw-r--r--mcon/U/i_inttypes.U6
-rw-r--r--mcon/U/i_invent.U27
-rw-r--r--mcon/U/i_langinfo.U27
-rw-r--r--mcon/U/i_libcharset.U27
-rw-r--r--mcon/U/i_libintl.U27
-rw-r--r--mcon/U/i_limits.U6
-rw-r--r--mcon/U/i_linux_netlink.U29
-rw-r--r--mcon/U/i_linux_rtnetlink.U29
-rw-r--r--mcon/U/i_locale.U6
-rw-r--r--mcon/U/i_malloc.U6
-rw-r--r--mcon/U/i_math.U26
-rw-r--r--mcon/U/i_memory.U6
-rw-r--r--mcon/U/i_mswsock.U27
-rw-r--r--mcon/U/i_ndbm.U40
-rw-r--r--mcon/U/i_netdb.U27
-rw-r--r--mcon/U/i_neterrno.U6
-rw-r--r--mcon/U/i_netif.U27
-rw-r--r--mcon/U/i_netroute.U30
-rw-r--r--mcon/U/i_niin.U6
-rw-r--r--mcon/U/i_niip.U30
-rw-r--r--mcon/U/i_poll.U6
-rw-r--r--mcon/U/i_pthread.U26
-rw-r--r--mcon/U/i_pwd.U6
-rw-r--r--mcon/U/i_regex.U6
-rw-r--r--mcon/U/i_sched.U25
-rw-r--r--mcon/U/i_sfio.U6
-rw-r--r--mcon/U/i_stddef.U6
-rw-r--r--mcon/U/i_stdlib.U6
-rw-r--r--mcon/U/i_string.U8
-rw-r--r--mcon/U/i_sysdir.U6
-rw-r--r--mcon/U/i_sysfile.U6
-rw-r--r--mcon/U/i_sysioctl.U8
-rw-r--r--mcon/U/i_sysipc.U28
-rw-r--r--mcon/U/i_sysmman.U6
-rw-r--r--mcon/U/i_sysmount.U29
-rw-r--r--mcon/U/i_sysndir.U6
-rw-r--r--mcon/U/i_sysparam.U6
-rw-r--r--mcon/U/i_syspoll.U6
-rw-r--r--mcon/U/i_sysresrc.U6
-rw-r--r--mcon/U/i_sysselct.U6
-rw-r--r--mcon/U/i_syssem.U28
-rw-r--r--mcon/U/i_syssendfile.U27
-rw-r--r--mcon/U/i_syssock.U6
-rw-r--r--mcon/U/i_sysstat.U6
-rw-r--r--mcon/U/i_sysstatvfs.U29
-rw-r--r--mcon/U/i_syssysctl.U27
-rw-r--r--mcon/U/i_systable.U6
-rw-r--r--mcon/U/i_systimeb.U6
-rw-r--r--mcon/U/i_systimes.U6
-rw-r--r--mcon/U/i_systwgcf.U6
-rw-r--r--mcon/U/i_systypes.U6
-rw-r--r--mcon/U/i_sysun.U6
-rw-r--r--mcon/U/i_sysutsname.U27
-rw-r--r--mcon/U/i_sysvfs.U29
-rw-r--r--mcon/U/i_syswait.U6
-rw-r--r--mcon/U/i_termio.U39
-rw-r--r--mcon/U/i_time.U14
-rw-r--r--mcon/U/i_ucontext.U96
-rw-r--r--mcon/U/i_unistd.U6
-rw-r--r--mcon/U/i_utime.U6
-rw-r--r--mcon/U/i_values.U6
-rw-r--r--mcon/U/i_varhdr.U11
-rw-r--r--mcon/U/i_vfork.U6
-rw-r--r--mcon/U/i_whoami.U6
-rw-r--r--mcon/U/i_winsock2.U27
-rw-r--r--mcon/U/i_ws2tcpip.U27
-rw-r--r--mcon/U/i_zlib.U31
-rw-r--r--mcon/U/ilp.U116
-rw-r--r--mcon/U/inc.U8
-rw-r--r--mcon/U/install.U17
-rw-r--r--mcon/U/intsize.U129
-rw-r--r--mcon/U/ipc.U6
-rw-r--r--mcon/U/issymlink.U6
-rw-r--r--mcon/U/kernel.U6
-rw-r--r--mcon/U/lex.U8
-rw-r--r--mcon/U/lib.U6
-rw-r--r--mcon/U/libc.U10
-rw-r--r--mcon/U/libdbm.U6
-rw-r--r--mcon/U/libflex.U6
-rw-r--r--mcon/U/libnlist.U8
-rw-r--r--mcon/U/libnm.U6
-rw-r--r--mcon/U/libpth.U15
-rw-r--r--mcon/U/libs.U28
-rw-r--r--mcon/U/libyacc.U6
-rw-r--r--mcon/U/lintlib.U6
-rw-r--r--mcon/U/lns.U8
-rw-r--r--mcon/U/locale.U70
-rw-r--r--mcon/U/locdist.U6
-rw-r--r--mcon/U/longsize.U6
-rw-r--r--mcon/U/lseektype.U6
-rw-r--r--mcon/U/maildir.U6
-rw-r--r--mcon/U/mailer.U6
-rw-r--r--mcon/U/mailfile.U6
-rw-r--r--mcon/U/make.U8
-rw-r--r--mcon/U/mallocsrc.U30
-rw-r--r--mcon/U/man1dir.U6
-rw-r--r--mcon/U/man3dir.U6
-rw-r--r--mcon/U/manfmt.U6
-rw-r--r--mcon/U/mansrc.U6
-rw-r--r--mcon/U/mboxchar.U6
-rw-r--r--mcon/U/mkdep.U19
-rw-r--r--mcon/U/models.U14
-rw-r--r--mcon/U/modetype.U6
-rw-r--r--mcon/U/msgmerge_update.U29
-rw-r--r--mcon/U/myhostname.U6
-rw-r--r--mcon/U/n.U6
-rw-r--r--mcon/U/nametype.U6
-rw-r--r--mcon/U/nblock_io.U27
-rw-r--r--mcon/U/newslevel.U6
-rw-r--r--mcon/U/newslib.U6
-rw-r--r--mcon/U/newsspool.U6
-rw-r--r--mcon/U/nis.U6
-rw-r--r--mcon/U/nlist_pfx.U8
-rw-r--r--mcon/U/official.U47
-rw-r--r--mcon/U/orderlib.U8
-rw-r--r--mcon/U/orgname.U6
-rw-r--r--mcon/U/packadmin.U6
-rw-r--r--mcon/U/package.U6
-rw-r--r--mcon/U/pager.U6
-rw-r--r--mcon/U/patchlevel.U20
-rw-r--r--mcon/U/perlpath.U10
-rw-r--r--mcon/U/pidtype.U6
-rw-r--r--mcon/U/pkgsrc.U6
-rw-r--r--mcon/U/prefix.U6
-rw-r--r--mcon/U/prefshell.U6
-rw-r--r--mcon/U/privlib.U6
-rw-r--r--mcon/U/prototype.U13
-rw-r--r--mcon/U/ptrsize.U57
-rw-r--r--mcon/U/randbits.U6
-rw-r--r--mcon/U/randfunc.U6
-rw-r--r--mcon/U/rcs_branch.U6
-rw-r--r--mcon/U/registers.U6
-rw-r--r--mcon/U/rootid.U6
-rw-r--r--mcon/U/sbrksmart.U8
-rw-r--r--mcon/U/sbrktype.U6
-rw-r--r--mcon/U/scriptdir.U6
-rw-r--r--mcon/U/selecttype.U15
-rw-r--r--mcon/U/sh.U10
-rw-r--r--mcon/U/shm_for.U6
-rw-r--r--mcon/U/sig_name.U6
-rw-r--r--mcon/U/sitearch.U8
-rw-r--r--mcon/U/sitelib.U8
-rw-r--r--mcon/U/sizetype.U6
-rw-r--r--mcon/U/so.U6
-rw-r--r--mcon/U/sockopt.U6
-rw-r--r--mcon/U/spitshell.U6
-rw-r--r--mcon/U/src.U8
-rw-r--r--mcon/U/ssizetype.U6
-rw-r--r--mcon/U/startperl.U8
-rw-r--r--mcon/U/startsh.U6
-rw-r--r--mcon/U/stdchar.U6
-rw-r--r--mcon/U/sunscanf.U6
-rw-r--r--mcon/U/sysman.U6
-rw-r--r--mcon/U/trnl.U9
-rw-r--r--mcon/U/uidtype.U8
-rw-r--r--mcon/U/usenm.U8
-rw-r--r--mcon/U/usesocks.U6
-rw-r--r--mcon/U/usrinc.U83
-rw-r--r--mcon/U/vaproto.U8
-rw-r--r--mcon/U/voidflags.U40
-rw-r--r--mcon/U/warnflags.U8
-rw-r--r--mcon/U/yacc.U16
-rwxr-xr-xmcon/mconfig.SH8
-rwxr-xr-xmcon/mlint.SH8
-rwxr-xr-xmcon/mxref.SH8
-rw-r--r--mcon/pl/lint.pl34
584 files changed, 10822 insertions, 2941 deletions
diff --git a/mcon/Jmakefile b/mcon/Jmakefile
index 8c5276b..b5579cd 100644
--- a/mcon/Jmakefile
+++ b/mcon/Jmakefile
@@ -2,7 +2,7 @@
* Jmakefile for metaconfig
*/
-;# $Id: Jmakefile 9 2006-08-25 22:31:50Z rmanfredi $
+;# $Id: Jmakefile 177 2014-04-08 10:42:18Z rmanfredi $
;#
;# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
;#
@@ -32,7 +32,9 @@
SetSubdirs(man)
AllTarget(Glossary)
-Glossary: makegloss
+.FORCE:
+
+Glossary: .FORCE
chmod +x makegloss
./makegloss
@@ -75,7 +77,8 @@ BINSH = \
!f.SH \
-expand \\
-depend::
+depend:: local_depend
+local_depend::
($(SED) '/^# DO NOT DELETE/q' Makefile && \
grep '^\$$grep' $(BINSH) | \
$(SED) -e "s/^.*' \([^ ]*\) >>\([^ ]*\)/\2: \1/" \
@@ -84,3 +87,4 @@ depend::
cp Makefile.new Makefile
$(RM) Makefile.new
+mconfig mlint mxref: $(TOP)/revision.h
diff --git a/mcon/Makefile.SH b/mcon/Makefile.SH
index c27f901..54a10b6 100755
--- a/mcon/Makefile.SH
+++ b/mcon/Makefile.SH
@@ -1,5 +1,5 @@
-: Makefile.SH generated from Jmake.tmpl and Jmakefile [jmake 3.5 PL0]
-: $X-Id: Jmake.tmpl 8 2006-08-25 22:27:18Z rmanfredi $
+: Makefile.SH generated from Jmake.tmpl and Jmakefile [jmake 3.5-174]
+: $X-Id: Jmake.tmpl 156 2012-12-19 16:44:39Z rmanfredi $
case $CONFIG in
'')
@@ -58,12 +58,12 @@ BIN = metaconfig metalint metaxref
$spitshell >>Makefile <<'!NO!SUBS!'
########################################################################
# Jmake rules for building libraries, programs, scripts, and data files
-# $X-Id: Jmake.rules 8 2006-08-25 22:27:18Z rmanfredi $
+# $X-Id: Jmake.rules 174 2014-04-05 08:19:48Z rmanfredi $
########################################################################
# Start of Jmakefile
-# $X-Id: Jmakefile 9 2006-08-25 22:31:50Z rmanfredi $
+# $X-Id: Jmakefile 177 2014-04-08 10:42:18Z rmanfredi $
#
# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
#
@@ -95,7 +95,9 @@ all:: Glossary
local_realclean::
$(RM) Glossary
-Glossary: makegloss
+.FORCE:
+
+Glossary: .FORCE
chmod +x makegloss
./makegloss
@@ -266,7 +268,8 @@ BINSH = \
mlint.SH \
mxref.SH
-depend::
+depend:: local_depend
+local_depend::
($(SED) '/^# DO NOT DELETE/q' Makefile && \
grep '^\$$grep' $(BINSH) | \
$(SED) -e "s/^.*' \([^ ]*\) >>\([^ ]*\)/\2: \1/" \
@@ -275,6 +278,8 @@ depend::
cp Makefile.new Makefile
$(RM) Makefile.new
+mconfig mlint mxref: $(TOP)/revision.h
+
########################################################################
# Common rules for all Makefiles -- do not edit
@@ -294,6 +299,8 @@ local_clobber:: local_realclean
$(RM) Makefile config.sh
install:: local_install sub_install
+ @exit 0
+
install.man:: maybe_install.man sub_install.man
deinstall:: sub_deinstall local_deinstall
deinstall.man:: sub_deinstall.man maybe_deinstall.man
@@ -324,6 +331,8 @@ tags::
local_clobber::
$(RM) tags
+depend::
+
########################################################################
# Rules for building in sub-directories -- do not edit
@@ -410,6 +419,13 @@ local_deinstall::
local_install.man::
local_deinstall.man::
+########################################################################
+# Dependencies generated by make depend
+# DO NOT DELETE THIS LINE -- make depend relies on it
+
+# Put nothing here or make depend will gobble it up
+.FORCE_DEPEND::
+ @echo "You must run 'make depend' in $(TOP) first."; exit 1
!NO!SUBS!
chmod 644 Makefile
$eunicefix Makefile
diff --git a/mcon/U/AAAAA.U b/mcon/U/AAAAA.U
index 638cee9..a687f28 100644
--- a/mcon/U/AAAAA.U
+++ b/mcon/U/AAAAA.U
@@ -1,11 +1,11 @@
-?RCS: $Id: AAAAA.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: AAAAA.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: AAAAA.U,v $
diff --git a/mcon/U/Alpha_mieee.U b/mcon/U/Alpha_mieee.U
new file mode 100644
index 0000000..a1bf2fc
--- /dev/null
+++ b/mcon/U/Alpha_mieee.U
@@ -0,0 +1,41 @@
+?RCS: $Id: Alpha_mieee.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:Alpha_mieee: Trylink cat ccflags gccversion
+?MAKE: -pick add $@ %<
+?T:flag result saved_ccflags
+?LINT:change ccflags
+: check whether -mieee should be used
+flag='-mieee'
+case "$gccversion" in
+'');;
+*)
+ $cat >try.c <<EOC
+int main(void)
+{
+#if !(defined(__GNUC__) && (defined(_alpha) || defined(__alpha__)))
+ switch (sizeof(int[-23])) { case 1: case 1: }
+#endif
+ return 0;
+}
+EOC
+ saved_ccflags=$ccflags
+ ccflags="$flag $ccflags"
+ cyn="whether '$flag' should be used" >&4
+ result=''
+ set result
+ eval $trylink
+ case "$result" in
+ "$define") ;;
+ *) ccflags=$saved_ccflags;;
+ esac
+ ;;
+esac
+
diff --git a/mcon/U/Assert.U b/mcon/U/Assert.U
new file mode 100644
index 0000000..ef43d59
--- /dev/null
+++ b/mcon/U/Assert.U
@@ -0,0 +1,26 @@
+?RCS:
+?RCS: Copyright (c) 2012 Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:Assert: cat
+?MAKE: -pick add $@ %<
+?F:./static_assert.h
+: static assertion checking include file
+?X:
+?X: C programs can include this file to perform STATIC_ASSERT() checks
+?X: which are done at compile-time and cause the compilation to fail when
+?X: the expression is false.
+?X:
+?X: It is sufficient to compile with: $cc -c $ccflags try.c
+?X: There is no need to link the file to spot the assertion failure.
+?X:
+$cat >static_assert.h <<'EOC'
+#define STATIC_ASSERT(expr) \
+ do { switch (0) { case ((expr) ? 1 : 0): case 0: break; } } while(0)
+EOC
+
diff --git a/mcon/U/Begin.U b/mcon/U/Begin.U
index 3536c6e..da6d657 100644
--- a/mcon/U/Begin.U
+++ b/mcon/U/Begin.U
@@ -1,11 +1,11 @@
-?RCS: $Id: Begin.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: Begin.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Begin.U,v $
diff --git a/mcon/U/Checkcc.U b/mcon/U/Checkcc.U
index 025a042..d18a728 100644
--- a/mcon/U/Checkcc.U
+++ b/mcon/U/Checkcc.U
@@ -1,11 +1,11 @@
-?RCS: $Id: Checkcc.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: Checkcc.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Copyright (c) 2000, Jarkko Hietaniemi
@@ -85,7 +85,7 @@ EOM
?X: seemingly affect the compiling environment.
$cat *.cbu >checktmp 2>/dev/null
if $contains ccflags checktmp >/dev/null; then
- ./warn <<EOM
+ ./warn 4>&4 <<EOM
Any previous setting of the C compiler flags has been lost.
It may be necessary to pass -Dcc=gcc to Configure right away.
EOM
diff --git a/mcon/U/Chk_MANI.U b/mcon/U/Chk_MANI.U
index f59759a..b32d0d3 100644
--- a/mcon/U/Chk_MANI.U
+++ b/mcon/U/Chk_MANI.U
@@ -1,11 +1,11 @@
-?RCS: $Id: Chk_MANI.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: Chk_MANI.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Chk_MANI.U,v $
diff --git a/mcon/U/Chk_whoami.U b/mcon/U/Chk_whoami.U
index cf753ff..76f6d48 100644
--- a/mcon/U/Chk_whoami.U
+++ b/mcon/U/Chk_whoami.U
@@ -1,11 +1,11 @@
-?RCS: $Id: Chk_whoami.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: Chk_whoami.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Chk_whoami.U,v $
diff --git a/mcon/U/Compile.U b/mcon/U/Compile.U
index 0a4a7a7..99c8ff1 100644
--- a/mcon/U/Compile.U
+++ b/mcon/U/Compile.U
@@ -1,11 +1,11 @@
-?RCS: $Id: Compile.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: Compile.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Copyright (c) 1998 Andy Dougherty
diff --git a/mcon/U/Config_h.U b/mcon/U/Config_h.U
index 8bd4bf0..71cd6c7 100644
--- a/mcon/U/Config_h.U
+++ b/mcon/U/Config_h.U
@@ -1,11 +1,11 @@
-?RCS: $Id: Config_h.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: Config_h.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Config_h.U,v $
@@ -98,7 +98,7 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un
* that running config_h.SH again will wipe out any changes you've made.
* For a more permanent change edit $CONFIG_SH and rerun config_h.SH.
*
- * \$Id: Config_h.U 1 2006-08-24 12:32:52Z rmanfredi $
+ * \$Id: Config_h.U 167 2013-05-08 17:58:00Z rmanfredi $
*/
/*
diff --git a/mcon/U/Config_sh.U b/mcon/U/Config_sh.U
index 45f7fc8..bc80edd 100644
--- a/mcon/U/Config_sh.U
+++ b/mcon/U/Config_sh.U
@@ -1,11 +1,11 @@
-?RCS: $Id: Config_sh.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: Config_sh.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Config_sh.U,v $
diff --git a/mcon/U/Configdir.U b/mcon/U/Configdir.U
index 1c89704..f9a6c00 100644
--- a/mcon/U/Configdir.U
+++ b/mcon/U/Configdir.U
@@ -1,11 +1,11 @@
-?RCS: $Id: Configdir.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: Configdir.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Configdir.U,v $
diff --git a/mcon/U/Cppsym.U b/mcon/U/Cppsym.U
index 0330bf5..24b463a 100644
--- a/mcon/U/Cppsym.U
+++ b/mcon/U/Cppsym.U
@@ -1,11 +1,11 @@
-?RCS: $Id: Cppsym.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: Cppsym.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Cppsym.U,v $
diff --git a/mcon/U/Cross.U b/mcon/U/Cross.U
index 932cf4f..68e27ea 100644
--- a/mcon/U/Cross.U
+++ b/mcon/U/Cross.U
@@ -1,11 +1,11 @@
-?RCS: $Id: Cross.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: Cross.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Copyright (c) 2001 Jarkko Hietaniemi
@@ -83,6 +83,7 @@
?LINT:extern loclibpth
?LINT:change locincpth
?LINT:change loclibpth
+?LINT:extern TMPDIR
: setup for possible cross-compilation
run=''
to=:
@@ -196,7 +197,7 @@ $define|true|[yY]*)
from=$from-$targetfrom
case "$targetdir" in
'')
- targetdir=/tmp
+ targetdir="${TMPDIR:-/tmp}"
echo "Guessing targetdir $targetdir." >&4
;;
esac
diff --git a/mcon/U/Csym.U b/mcon/U/Csym.U
index 7327849..91aa8cc 100644
--- a/mcon/U/Csym.U
+++ b/mcon/U/Csym.U
@@ -1,11 +1,11 @@
-?RCS: $Id: Csym.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: Csym.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Csym.U,v $
@@ -14,7 +14,7 @@
?RCS: patch56: added quotes for OS/2 support
?RCS:
?RCS: Revision 3.0.1.3 1995/05/12 12:00:33 ram
-?RCS: patch54: fixed C test program to bypasss gcc builtin type checks (ADO)
+?RCS: patch54: fixed C test program to bypass gcc builtin type checks (ADO)
?RCS:
?RCS: Revision 3.0.1.2 1994/10/31 09:34:13 ram
?RCS: patch44: added Options to the MAKE line since it's no longer in Init.U
@@ -26,7 +26,7 @@
?RCS: Revision 3.0 1993/08/18 12:04:50 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:Csym: Options contains libc libs runnm +cc +ccflags +ldflags rm
+?MAKE:Csym: Options contains cat libc libs runnm +cc +ccflags +ldflags rm
?MAKE: -pick add $@ %<
?LINT:define csym
?LINT:use libc
@@ -41,7 +41,7 @@
?S: is reused without questioning.
?S:.
?V:csym
-?T:tval tx tlook tf tdc tc
+?T:tval tx tlook tf tdc tc file
: is a C symbol defined?
csym='tlook=$1;
case "$3" in
@@ -49,6 +49,7 @@ case "$3" in
-a) tf=libc.tmp; tc="[0]"; tdc="[]";;
*) tlook="^$1\$"; tf=libc.list; tc=""; tdc="()";;
esac;
+file=csym.log;
tx=yes;
case "$reuseval-$4" in
true-) ;;
@@ -72,16 +73,28 @@ yes)
?X: type), the compiler assuming it's a built-in declaration given that the
?X: returned size matches. At least with 'char' we are safe! -- RAM, for ADO
?X:
-?X: Let's thank GNU cc for making our lifes so easy! :-)
+?X: Let's thank GNU cc for making our lives so easy! :-)
?X: (An alternative for the future would be to use our knowledge about gcc
?X: to force a -fno-builtin option in the compile test, in case the 'char'
?X: trick is obsoleted by future gcc releases). -- RAM
?X:
-?X: Lastly, gcc 3.4 otimizes &missing == 0 away, so we use + 2 instead now.
+?X: Lastly, gcc 3.4 optimizes &missing == 0 away, so we use + 2 instead now.
?X: The GNU folks like to do weird things, don't they? -- RAM, 2004-06-05
+?X
+?X: The above was invalid because main returns an int not a pointer.
+?X: Using != or == does not work because GCC complains the pointer will
+?X: never be NULL if the function exists. It is a warning meant to prevent
+?X: using an address of a function by accident instead of calling it.
+?X: However, &missing > 0 is indeed silently optimized away.
+?X
+?X: FIXME: There must be a test whether non-existing functions are found!
?X:
- echo "extern char $1$tdc; int main() { return &$1$tc + 2; }" > t.c;
- if $cc $ccflags $ldflags -o t t.c $libs >/dev/null 2>&1;
+?X:. -- cbiere, 2011-01-18
+?X:
+ echo "--- $1$tdc ---" >> "$file";
+ echo "extern char $1$tdc; int main(void) { return (unsigned long) &$1$tc > 2; }" > t.c;
+ $cat t.c >> "$file";
+ if $cc $ccflags $ldflags -o t t.c $libs >>"$file" 2>&1;
then tval=true;
else tval=false;
fi;
@@ -93,5 +106,6 @@ yes)
*) tval=false;;
esac;;
esac;
+echo "==> HAS $1$tdc is $tval ($4)" >>"$file";
eval "$2=$tval"'
diff --git a/mcon/U/End.U b/mcon/U/End.U
index 623815b..959a555 100644
--- a/mcon/U/End.U
+++ b/mcon/U/End.U
@@ -1,11 +1,11 @@
-?RCS: $Id: End.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: End.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: End.U,v $
diff --git a/mcon/U/Extract.U b/mcon/U/Extract.U
index d69108a..b0ca1b2 100644
--- a/mcon/U/Extract.U
+++ b/mcon/U/Extract.U
@@ -1,11 +1,11 @@
-?RCS: $Id: Extract.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: Extract.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Extract.U,v $
@@ -28,11 +28,12 @@
?MAKE:Extract: Mkdirp src
?MAKE: -pick add $@ %<
?F:./extract
-?T:CONFIG SRC dir file
+?T:CONFIG SRC TOP dir file
: script used to extract .SH files with variable substitutions
cat >extract <<EOS
CONFIG=true
SRC="$src"
+TOP=`cd ..; pwd 2>/dev/null`
EOS
cat >>extract <<'EOS'
echo "Doing variable substitutions on .SH files..."
diff --git a/mcon/U/Extractall.U b/mcon/U/Extractall.U
index 4686fd4..80bc255 100644
--- a/mcon/U/Extractall.U
+++ b/mcon/U/Extractall.U
@@ -1,11 +1,11 @@
-?RCS: $Id: Extractall.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: Extractall.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Extractall.U,v $
diff --git a/mcon/U/Filexp.U b/mcon/U/Filexp.U
index d26abc5..160a216 100644
--- a/mcon/U/Filexp.U
+++ b/mcon/U/Filexp.U
@@ -1,11 +1,11 @@
-?RCS: $Id: Filexp.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: Filexp.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Filexp.U,v $
diff --git a/mcon/U/Findhdr.U b/mcon/U/Findhdr.U
index 4dc9722..6556864 100644
--- a/mcon/U/Findhdr.U
+++ b/mcon/U/Findhdr.U
@@ -1,11 +1,11 @@
-?RCS: $Id: Findhdr.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: Findhdr.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Thomas Neumann <tom@smart.bo.open.de>
@@ -27,64 +27,11 @@
?X: and it returns the full path of the include file and a zero status or an
?X: empty string with an error status if the file could not be located.
?X:
-?MAKE:Findhdr: grep test tr rm +usrinc awk cat startsh \
- cppstdin cppminus +cppflags eunicefix osname
+?MAKE:Findhdr: grep tr rm +usrinc awk cat startsh \
+ cppstdin cppminus +cppflags eunicefix fieldn cppfilter
?MAKE: -pick add $@ %<
-?LINT:define fieldn
-?S:fieldn:
-?S: This variable is used internally by Configure. It contains the position
-?S: of the included file name in cpp output. That is to say, when cpp
-?S: pre-processes a #include <file> line, it replaces it by a # line which
-?S: contains the original position in the input file and the full name of
-?S: included file, between "quotes".
-?S:.
-?V:fieldn
-?F:./findhdr !fieldn
-?T:cline pos wanted name awkprg cppfilter testaccess status usrincdir
-: determine filename position in cpp output
-echo " "
-echo "Computing filename position in cpp output for #include directives..." >&4
-echo '#include <stdio.h>' > foo.c
-case "$osname" in
-vos)
- testaccess=-e
-?X: VOS: path component separator is >
- cppfilter="tr '\\\\>' '/' |"
- ;;
-*)
- testaccess=-r
- cppfilter=''
- ;;
-esac
-$cat >fieldn <<EOF
-$startsh
-$cppstdin $cppflags $cppminus <foo.c 2>/dev/null | \
-$grep '^[ ]*#.*stdio\.h' | \
-while read cline; do
- pos=1
- set \$cline
- while $test \$# -gt 0; do
- if $test $testaccess \`echo \$1 | $tr -d '"'\`; then
- echo "\$pos"
- exit 0
- fi
- shift
- pos=\`expr \$pos + 1\`
- done
-done
-EOF
-chmod +x fieldn
-fieldn=`./fieldn`
-$rm -f foo.c fieldn
-case $fieldn in
-'') pos='???';;
-1) pos=first;;
-2) pos=second;;
-3) pos=third;;
-*) pos="${fieldn}th";;
-esac
-echo "Your cpp writes the filename in the $pos field of the line."
-
+?F:./findhdr
+?T:cline wanted name awkprg status usrincdir
?X: To locate a header file, we cannot simply check for $usrinc/file.h, since
?X: some machine have the headers in weird places and our only hope is that
?X: the C pre-processor will know how to find those headers. Thank you NexT!
diff --git a/mcon/U/Finish.U b/mcon/U/Finish.U
index 2037168..da3da8e 100644
--- a/mcon/U/Finish.U
+++ b/mcon/U/Finish.U
@@ -1,11 +1,11 @@
-?RCS: $Id: Finish.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: Finish.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Finish.U,v $
@@ -43,8 +43,8 @@
: Finish up by extracting the .SH files
case "$alldone" in
exit)
- $rm -rf UU
- echo "Extraction done."
+?X: They supplied the -E switch
+ echo "Stopping at your request, leaving temporary files around."
exit 0
;;
cont)
diff --git a/mcon/U/GCC_pipe.U b/mcon/U/GCC_pipe.U
new file mode 100644
index 0000000..a7d0a25
--- /dev/null
+++ b/mcon/U/GCC_pipe.U
@@ -0,0 +1,65 @@
+?RCS: $Id: GCC_pipe.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:GCC_pipe: Trylink cat +cc ccflags gccversion optimize
+?MAKE: -pick add $@ %<
+?T:flag result saved_ccflags
+?LINT:change ccflags
+: check whether -pipe should be used
+flag='-pipe'
+case "$gccversion" in
+'');;
+*)
+ case "$ccflags $optimize" in
+ *-save-temps*);;
+ *-pipe*);;
+ *)
+ $cat >try.c <<'EOC'
+int main(void)
+{
+ return 0;
+}
+EOC
+ saved_ccflags=$ccflags
+ ccflags="$flag $ccflags"
+
+ result=''
+ cyn="whether '$flag' is accepted by $cc" >&4
+ set result
+ eval $trylink
+
+ case "$result" in
+ "$define")
+ $cat >try.c <<EOC
+main("This is not C")
+{
+ (. ||
+ switch (**1) { case 1: case 1: }
+}
+EOC
+?X: trylink could "Whoa there" if we do not reset this variable
+ result=''
+ set result
+ eval $trylink
+
+ case "$result" in
+ "$define")
+ echo "However with $flag the compiler seems to see no code." >&4
+ ccflags=$saved_ccflags
+ ;;
+ esac
+ ;;
+ *) ccflags=$saved_ccflags;;
+ esac
+ ;;
+ esac
+ ;;
+esac
+
diff --git a/mcon/U/Getfile.U b/mcon/U/Getfile.U
index 3e10199..260c386 100644
--- a/mcon/U/Getfile.U
+++ b/mcon/U/Getfile.U
@@ -1,11 +1,11 @@
-?RCS: $Id: Getfile.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: Getfile.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Getfile.U,v $
@@ -221,8 +221,9 @@ while test "$type"; do
?X: Always expand ~user if '/' was requested
case "$ansexp" in
/*) value="$ansexp" ;;
-?X: Allow for c:/some/path
+?X: Allow for c:/some/path and c:\some\path
[a-zA-Z]:/*) value="$ansexp" ;;
+ [a-zA-Z]:\\*) value="$ansexp" ;;
*)
redo=true
case "$already" in
diff --git a/mcon/U/Guess.U b/mcon/U/Guess.U
index 3aa5d4d..6f6e6b4 100644
--- a/mcon/U/Guess.U
+++ b/mcon/U/Guess.U
@@ -1,11 +1,11 @@
-?RCS: $Id: Guess.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: Guess.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Guess.U,v $
@@ -34,8 +34,8 @@
?X: is. The information it collects here is used primarily to establish default
?X: answers to other questions.
?X:
-?MAKE:Guess d_eunice d_xenix d_bsd d_linux d_dos d_os2: cat test echo n c \
- contains rm tr Loc eunicefix
+?MAKE:Guess d_eunice d_xenix d_bsd d_linux d_dos d_os2 d_windows: cat test \
+ echo n c contains rm tr Loc eunicefix
?MAKE: -pick add $@ %<
?S:d_eunice:
?S: This variable conditionally defines the symbols EUNICE_SYSTEM, which
@@ -61,6 +61,10 @@
?S: This symbol conditionally defines the symbol LINUX_SYSTEM when running
?S: on a Linux system.
?S:.
+?S:d_windows:
+?S: This symbol conditionally defines the symbol WINDOWS_SYSTEM when running
+?S: on a Windows system.
+?S:.
?C:EUNICE_SYSTEM (EUNICE):
?C: This symbol, if defined, indicates that the program is being compiled
?C: under the EUNICE package under VMS. The program will need to handle
@@ -92,6 +96,10 @@
?C: This symbol, if defined, indicates that the program is running under
?C: a Linux system.
?C:.
+?C:WINDOWS_SYSTEM:
+?C: This symbol, if defined, indicates that the program is running under
+?C: a Windows system.
+?C:.
?H:#$d_eunice EUNICE_SYSTEM /**/
?H:#$d_eunice VMS_SYSTEM /**/
?H:#$d_xenix XENIX_SYSTEM /**/
@@ -99,8 +107,10 @@
?H:#$d_os2 OS2_SYSTEM /**/
?H:#$d_bsd BSD_SYSTEM /**/
?H:#$d_linux LINUX_SYSTEM /**/
+?H:#$d_windows WINDOWS_SYSTEM /**/
?H:.
-?F:./bsd ./usg ./v7 ./osf1 ./eunice ./xenix ./venix ./dos ./os2 ./gnu ./linux
+?F:./bsd ./usg ./v7 ./osf1 ./eunice ./xenix ./venix ./dos ./os2 ./gnu
+?F:./windows ./linux
?T:xxx DJGPP MACHTYPE
: make some quick guesses about what we are up against
echo " "
@@ -116,10 +126,12 @@ echo exit 1 >os2
echo exit 1 >gnu
echo exit 1 >linux
echo exit 1 >dos
+echo exit 1 >windows
d_bsd="$undef"
d_linux="$undef"
d_dos="$undef"
d_os2="$undef"
+d_windows="$undef"
?X:
?X: Do not use 'usrinc', or we get a circular dependency. because
?X: usrinc is defined in usrinc.U, which relies on us...
@@ -178,6 +190,18 @@ EOI
d_eunice="$undef"
;;
esac
+if test -d c:/.; then
+ case "X${MACHTYPE:-nonesuchmach}" in
+ *cygwin) echo " "; echo "Hah!... you're running under Cygwin!";;
+ *msys) echo " "; echo "Hah!... you're running under MinGW!";;
+ esac
+ case "X${MACHTYPE:-nonesuchmach}" in
+ *cygwin|*msys)
+ echo exit 0 >windows
+ d_windows="$define"
+ ;;
+ esac
+fi
case "$p_" in
:) ;;
*)
@@ -185,10 +209,6 @@ case "$p_" in
I have the feeling something is not exactly right, however...don't tell me...
EOI
if test -n "$DJGPP"; then
- case "X${MACHTYPE:-nonesuchmach}" in
- cygwin) echo "hah!... you're running under Cygwin!";;
- *) echo "got it... you're running DOS with DJGPP!";;
- esac
echo exit 0 >dos
d_dos="$define"
else
@@ -222,7 +242,7 @@ else
echo "Nor is it Venix..."
fi
fi
-chmod +x bsd usg v7 osf1 eunice xenix venix dos os2 gnu linux
-$eunicefix bsd usg v7 osf1 eunice xenix venix dos os2 gnu linux
+chmod +x bsd usg v7 osf1 eunice xenix venix dos os2 gnu linux windows
+$eunicefix bsd usg v7 osf1 eunice xenix venix dos os2 gnu linux windows
$rm -f foo
diff --git a/mcon/U/Head.U b/mcon/U/Head.U
index 50cd52f..b0acc81 100644
--- a/mcon/U/Head.U
+++ b/mcon/U/Head.U
@@ -1,11 +1,11 @@
-?RCS: $Id: Head.U 25 2008-05-28 11:19:25Z rmanfredi $
+?RCS: $Id: Head.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Head.U,v $
@@ -78,7 +78,7 @@
# Note: this Configure script was generated automatically. Rather than
# working with this copy of Configure, you may wish to get metaconfig.
# The dist package (which contains metaconfig) is available via SVN:
-# svn co https://svn.sourceforge.net/svnroot/dist/trunk/dist
+# svn co https://svn.code.sf.net/p/dist/code/trunk/dist
?X:
?X: NOTA BENE:
?X: If you develop you own version of metaconfig based on this work,
@@ -86,7 +86,7 @@
?X: by your version, not mine: It credits your work.
?X:
-# $Id: Head.U 25 2008-05-28 11:19:25Z rmanfredi $
+# $Id: Head.U 167 2013-05-08 17:58:00Z rmanfredi $
#
# Generated on <DATE> [metaconfig <VERSION>-<REVISION>]
@@ -139,7 +139,7 @@ if test -d c:/. ; then
OS2_SHELL=`cmd /c "echo %OS2_SHELL%" | tr '\\\\' / | tr '[A-Z]' '[a-z]'`
elif test -n "$DJGPP"; then
case "X${MACHTYPE:-nonesuchmach}" in
- *cygwin) ;;
+ *cygwin|*msys) ;;
*) p_=\; ;;
esac
fi
@@ -149,7 +149,7 @@ fi
?X: There are two schools of thoughts here. Some people correctly argue that
?X: the user has a better chance than we do of setting a reasonable PATH and
?X: others argue that Configure is the best place there is to set up a suitable
-?X: PATH. Well, here we try to compromize by keeping the user's PATH and
+?X: PATH. Well, here we try to compromise by keeping the user's PATH and
?X: appending some directories which are known to work on some machine or the
?X: other. The rationale behind this being that a novice user might not have a
?X: proper environment variable set, and some directories like /etc (where
diff --git a/mcon/U/Inhdr.U b/mcon/U/Inhdr.U
index 516828c..3891138 100644
--- a/mcon/U/Inhdr.U
+++ b/mcon/U/Inhdr.U
@@ -1,11 +1,11 @@
-?RCS: $Id: Inhdr.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: Inhdr.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Inhdr.U,v $
diff --git a/mcon/U/Init.U b/mcon/U/Init.U
index ef499a9..7ab3c10 100644
--- a/mcon/U/Init.U
+++ b/mcon/U/Init.U
@@ -1,11 +1,11 @@
-?RCS: $Id: Init.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: Init.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Init.U,v $
diff --git a/mcon/U/Inlibc.U b/mcon/U/Inlibc.U
index 8137404..802ff57 100644
--- a/mcon/U/Inlibc.U
+++ b/mcon/U/Inlibc.U
@@ -1,11 +1,11 @@
-?RCS: $Id: Inlibc.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: Inlibc.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Inlibc.U,v $
diff --git a/mcon/U/Instruct.U b/mcon/U/Instruct.U
index 156da14..21c4191 100644
--- a/mcon/U/Instruct.U
+++ b/mcon/U/Instruct.U
@@ -1,11 +1,11 @@
-?RCS: $Id: Instruct.U 27 2008-06-14 20:50:12Z rmanfredi $
+?RCS: $Id: Instruct.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Instruct.U,v $
diff --git a/mcon/U/Largefile.U b/mcon/U/Largefile.U
new file mode 100644
index 0000000..e4beb06
--- /dev/null
+++ b/mcon/U/Largefile.U
@@ -0,0 +1,74 @@
+?RCS: $Id: Largefile.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:Largefile: Trylink cat ccflags i_unistd
+?MAKE: -pick add $@ %<
+?T:flags result saved_ccflags
+?W:%<:off_t
+?LINT:change ccflags
+: determine how to compile for large 64-bit file support
+echo " "
+echo "Checking whether we need flags for large file support..." >&4
+flags='-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64'
+$cat >try.c <<EOC
+#include <sys/types.h>
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ switch (0) { case 0: case (sizeof(off_t) >= 8): break; }
+ return 0;
+}
+EOC
+
+result=''
+set result
+eval $trylink
+
+case "$result" in
+"$define")
+ echo "Selected C flags already provide 64-bit file support."
+ ;;
+"$undef")
+ echo "You're not natively compiling for large file, fixing..." >&4
+
+ saved_ccflags=$ccflags
+ ccflags="$flags $ccflags"
+
+ $cat >try.c <<EOC
+#include <sys/types.h>
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ switch (0) { case 0: case (sizeof(off_t) >= 8): break; }
+ return 0;
+}
+EOC
+ result=''
+ set result
+ eval $trylink
+
+ case "$result" in
+ "$define")
+ echo "(Adding $flags)"
+ ;;
+ "$undef")
+ echo "(Could not compile the test program, using 32-bit files)" >&4
+ ccflags=$saved_ccflags
+ ;;
+ esac
+ ;;
+esac
+
diff --git a/mcon/U/Loc.U b/mcon/U/Loc.U
index eea8014..e2b88b5 100644
--- a/mcon/U/Loc.U
+++ b/mcon/U/Loc.U
@@ -1,11 +1,11 @@
-?RCS: $Id: Loc.U 14 2006-08-28 16:51:14Z rmanfredi $
+?RCS: $Id: Loc.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Loc.U,v $
@@ -63,21 +63,23 @@
?X:
?MAKE:Loc awk ar bash bison byacc cat chgrp chmod chown \
comm compress cp cpio cpp csh date echo egrep emacs expr find flex \
- gmake gzip grep inews ksh less line lint ln lp lpr ls mail mailx \
- make mkdir more mv nm nroff perl pg pmake pr rm rmail sed sendmail \
+ gcc gmake gzip grep inews ksh less line lint ln lp lpr ls mail mailx \
+ make mkdir more mv nawk nm nroff perl pg pmake pr rm rmail sed sendmail \
shar sleep smail sort submit tail tar tbl tee test touch tr troff \
- uname uniq uuname vi zcat zip: eunicefix n c startsh Instruct Warn
+ gmsgfmt msgfmt msgmerge xgettext \
+ uname uniq uuname vi wc zcat zip: eunicefix n c startsh Instruct Warn
?MAKE: -pick weed $@ %<
?LINT: describe awk ar bash bison byacc cat chgrp chmod chown \
comm compress cp cpio cpp csh date echo egrep emacs expr find flex \
- gmake gzip grep inews ksh less line lint ln lp lpr ls mail mailx \
- make mkdir more mv nm nroff perl pg pmake pr rm rmail sed sendmail \
+ gcc gmake gzip grep inews ksh less line lint ln lp lpr ls mail mailx \
+ make mkdir more mv nawk nm nroff perl pg pmake pr rm rmail sed sendmail \
shar sleep smail sort submit tail tar tbl tee test touch tr troff \
- uname uniq uuname vi zcat zip
+ gmsgfmt msgfmt msgmerge xgettext \
+ uname uniq uuname vi wc zcat zip
?V::pth loclist trylist
?F:./loc
?T:thisthing thing xxx dir file say DJGPP
-?T:_test _grep _cp _gmake _egrep _ln _make dflt
+?T:_echo _test _grep _cp _gmake _egrep _ln _make dflt
?LINT: change PATH
: find out where common programs are
echo " "
@@ -147,6 +149,7 @@ loclist="
?find:find
?grep:grep
?ls:ls
+?make:make
?mkdir:mkdir
?mv:mv
?rm:rm
@@ -173,6 +176,8 @@ trylist="
?emacs:emacs
?flex:flex
?gmake:gmake
+?gcc:gcc
+?gmsgfmt:gmsgfmt
?gzip:gzip
?inews:inews
?ksh:ksh
@@ -184,8 +189,10 @@ trylist="
?lpr:lpr
?mail:mail
?mailx:mailx
-?make:make
?more:more
+?msgfmt:msgfmt
+?msgmerge:msgmerge
+?nawk:nawk
?nm:nm
?nroff:nroff
?perl:perl
@@ -205,17 +212,20 @@ trylist="
?uname:uname
?uuname:uuname
?vi:vi
+?wc:wc
+?xgettext:xgettext
?zcat:zcat
?zip:zip
"
?LINT: set awk ar bash bison byacc cat chgrp chmod chown \
- comm compress cp cpio cpp csh date echo emacs expr find flex \
- gmake gzip grep inews ksh less line lint lp lpr ls mail mailx \
- mkdir more mv nm nroff perl pg pmake pr rm rmail sed sendmail \
+ comm compress cp cpio cpp csh date emacs expr find flex \
+ gcc gmake gzip grep inews ksh less line lint lp lpr ls mail mailx \
+ mkdir more mv nawk nm nroff perl pg pmake pr rm rmail sed sendmail \
shar sleep smail sort submit tail tar tbl tee touch tr troff \
- uname uniq uuname vi zcat zip
+ msgfmt msgmerge \
+ uname uniq uuname vi wc zcat zip
pth=`echo $PATH | sed -e "s/$p_/ /g"`
-pth="$pth /lib /usr/lib"
+pth="$pth /sbin /usr/sbin /lib /usr/lib /etc"
for file in $loclist; do
?X:
?X: Allow them to -Dmake=pmake on the command line for instance...
@@ -230,14 +240,14 @@ for file in $loclist; do
if test -f "$xxx"; then
: ok
else
- ./warn "no $xxx -- ignoring your setting for $file."
+ ./warn "no $xxx -- ignoring your setting for $file." 4>&4
xxx=`./loc $file $file $pth`
fi
;;
'') xxx=`./loc $file $file $pth`;;
*) xxx=`./loc $xxx $xxx $pth`;;
esac
- eval $file=$xxx$_exe
+ eval $file=$xxx
eval _$file=$xxx
case "$xxx" in
/*)
@@ -249,7 +259,7 @@ for file in $loclist; do
;;
*)
echo "I don't know where '$file' is, and my life depends on it." >&4
- echo "Go find a public domain implementation or fix your PATH setting!" >&4
+ echo "Go find a public domain implementation or fix your PATH!" >&4
exit 1
;;
esac
@@ -265,14 +275,14 @@ for file in $trylist; do
if test -f "$xxx"; then
: ok
else
- ./warn "no $xxx -- ignoring your setting for $file."
+ ./warn "no $xxx -- ignoring your setting for $file." 4>&4
xxx=`./loc $file $file $pth`
fi
;;
'') xxx=`./loc $file $file $pth`;;
*) xxx=`./loc $xxx $xxx $pth`;;
esac
- eval $file=$xxx$_exe
+ eval $file=$xxx
eval _$file=$xxx
case "$xxx" in
/*)
@@ -289,7 +299,7 @@ for file in $trylist; do
esac
done
case "$egrep" in
-egrep)
+egrep$_exe|egrep)
echo "Substituting grep for egrep."
egrep=$grep
_egrep=$_grep
@@ -297,7 +307,7 @@ egrep)
esac
@if ln
case "$ln" in
-ln)
+ln$_exe|ln)
echo "Substituting cp for ln."
ln=$cp
_ln=$_cp
@@ -306,7 +316,7 @@ esac
@end
@if make || gmake
case "$make" in
-make)
+make$_exe|make)
case "$gmake" in
gmake)
echo "I can't find make or gmake, and my life depends on it." >&4
@@ -317,11 +327,13 @@ make)
;;
esac
case "$gmake" in
-gmake) ;;
-*) # We can't have osname yet.
- if test -f "/system/gnu_library/bin/ar.pm"; then # Stratus VOS
- # Assume that gmake, if found, is definitely GNU make
- # and prefer it over the system make.
+gmake$_exe|gmake) ;;
+*)
+?X: We can't have osname yet.
+?X: On Stratus VOS, assume that gmake, if found, is definitely GNU make
+?X: and prefer it over the system make.
+ if test -f "/system/gnu_library/bin/ar.pm"; then
+ : Stratus VOS
echo "Substituting gmake for make."
make=$gmake
_make=$_gmake
@@ -329,9 +341,57 @@ gmake) ;;
;;
esac
@end
+@if gmsgfmt && msgfmt
+?LINT: extern _msgfmt
+?LINT: change _gmsgfmt
+case "$gmsgfmt" in
+gmsgfmt$_exe|gmsgfmt)
+ echo "Substituting msgfmt for gmsgfmt."
+ gmsgfmt=$msgfmt
+ _gmsgfmt=$_msgfmt
+ ;;
+*)
+ if $gmsgfmt --statistics /dev/null >/dev/null 2>&1 &&
+ (if $gmsgfmt --statistics /dev/null 2>&1 >/dev/null | \
+ grep usage >/dev/null; then exit 0; else exit 1; fi)
+ then
+ echo "Your $gmsgfmt is not GNU msgfmt; substituting msgfmt."
+ gmsgfmt=$msgfmt
+ _gmsgfmt=$_msgfmt
+ fi
+ ;;
+esac
+@end
+@if xgettext
+?LINT: change _xgettext
+case "$xgettext" in
+xgettext$_exe|xgettext)
+ xgettext=":"
+ _xgettext=":"
+ ;;
+*)
+ if $xgettext --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
+ (if $xgettext --omit-header --copyright-holder= \
+ /dev/null 2>&1 >/dev/null | \
+ grep usage >/dev/null; then exit 0; else exit 1; fi)
+ then
+ echo "Your $xgettext is not GNU xgettext; ignoring it."
+ xgettext=":"
+ _xgettext=":"
+ elif $xgettext --from-code=UTF-8 /dev/null >/dev/null 2>&1; then
+ : ok
+ else
+ echo "Your $xgettext does not support --from-code; ignoring it."
+ xgettext=":"
+ _xgettext=":"
+ fi
+ ;;
+esac
+@end
case "$test" in
-test)
+test|test$_exe)
echo "Hopefully test is built into your sh."
+ test=test
;;
*)
if `sh -c "PATH= test true" >/dev/null 2>&1`; then
@@ -348,14 +408,15 @@ test)
esac
?LINT:change n c
case "$echo" in
-echo)
+echo|echo$_exe)
echo "Hopefully echo is built into your sh."
+ echo=echo
;;
?X: For those rare cases where we don't need $echo...
'') ;;
*)
echo " "
-echo "Checking compatibility between $echo and builtin echo (if any)..." >&4
+echo "Checking compatibility between $_echo and builtin echo (if any)..." >&4
$echo $n "hi there$c" >foo1
echo $n "hi there$c" >foo2
if cmp foo1 foo2 >/dev/null 2>&1; then
diff --git a/mcon/U/Loc_sed.U b/mcon/U/Loc_sed.U
index 2912108..f1a26b5 100644
--- a/mcon/U/Loc_sed.U
+++ b/mcon/U/Loc_sed.U
@@ -1,12 +1,12 @@
-?RCS: $Id: Loc_sed.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: Loc_sed.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1996, Andy Dougherty
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?X: This is used in perl.c.
diff --git a/mcon/U/Magic_h.U b/mcon/U/Magic_h.U
index 70d05e6..1c3228f 100644
--- a/mcon/U/Magic_h.U
+++ b/mcon/U/Magic_h.U
@@ -1,11 +1,11 @@
-?RCS: $Id: Magic_h.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: Magic_h.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Magic_h.U,v $
@@ -35,7 +35,7 @@
* If you wish to get rid of this magic, remove this file and rerun metaconfig
* without the -M option.
*
- * $Id: Magic_h.U 1 2006-08-24 12:32:52Z rmanfredi $
+ * $Id: Magic_h.U 167 2013-05-08 17:58:00Z rmanfredi $
*/
#ifndef _confmagic_h_
diff --git a/mcon/U/MailAuthor.U b/mcon/U/MailAuthor.U
index 5fbef6b..231a6af 100644
--- a/mcon/U/MailAuthor.U
+++ b/mcon/U/MailAuthor.U
@@ -1,11 +1,11 @@
-?RCS: $Id: MailAuthor.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: MailAuthor.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Graham Stoney <greyham@research.canon.oz.au>
@@ -34,7 +34,7 @@
?X:
?X: This unit asks the user to please send a message to the author.
?X: To force inclusion of this unit, you must add it's name to the
-?X: dependancies on the MAKE line in your private copy of End.U.
+?X: dependencies on the MAKE line in your private copy of End.U.
?X: This allows a smart mailagent program to automatically let users know
?X: when their package is out of date, and to allow users to be notified of
?X: any future patches.
diff --git a/mcon/U/MailList.U b/mcon/U/MailList.U
index 506c61a..e042e0c 100644
--- a/mcon/U/MailList.U
+++ b/mcon/U/MailList.U
@@ -1,11 +1,11 @@
-?RCS: $Id: MailList.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: MailList.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Graham Stoney <greyham@research.canon.oz.au>
@@ -18,7 +18,7 @@
?X:
?X: This unit offers the user the option of subscribing to the mailing
?X: list. To force inclusion of this unit, you must add it's name to the
-?X: dependancies on the MAKE line in your private copy of End.U.
+?X: dependencies on the MAKE line in your private copy of End.U.
?X: The address of the mailing list server must be set via a "list_request=..."
?X: entry in the .package file. This is usually done by running packinit and
?X: answering the proper questions.
diff --git a/mcon/U/Mips.U b/mcon/U/Mips.U
new file mode 100644
index 0000000..e77b2fa
--- /dev/null
+++ b/mcon/U/Mips.U
@@ -0,0 +1,69 @@
+?RCS: $Id: Mips.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: usrinc.U,v $
+?RCS: Revision 3.0.1.3 1997/02/28 16:27:12 ram
+?RCS: patch61: don't ask for the include path unless they are on a MIPS
+?RCS:
+?RCS: Revision 3.0.1.2 1995/05/12 12:24:36 ram
+?RCS: patch54: ensure that ./mips always exists (ADO)
+?RCS:
+?RCS: Revision 3.0.1.1 1994/05/06 15:18:31 ram
+?RCS: patch23: ensure usrinc value is preserved across sessions (WED)
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:09:58 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:Mips mips_type incpath: test cat echo n c Getfile Guess \
+ Oldconfig eunicefix contains rm
+?MAKE: -pick add $@ %<
+?S:mips_type:
+?S: This variable holds the environment type for the mips system.
+?S: Possible values are "BSD 4.3" and "System V".
+?S:.
+?S:incpath:
+?S: This variable must precede the normal include path to get hte
+?S: right one, as in "$incpath/usr/include" or "$incpath/usr/lib".
+?S: Value can be "" or "/bsd43" on mips.
+?S:.
+?F:./mips !usr.c
+: What should the include directory be ?
+echo " "
+$echo $n "Hmm... $c"
+incpath=''
+?X: mips_type is used later, to add -DSYSTYPE_BSD43 to cppflags if needed.
+mips_type=''
+?X:
+?X: Cannot put the following in Guess, or we get a circular dependency.
+?X:
+if $test -f /bin/mips && /bin/mips; then
+ echo "Looks like a MIPS system..."
+ $cat >usr.c <<'EOCP'
+#ifdef SYSTYPE_BSD43
+/bsd43
+#endif
+EOCP
+ if cc -E usr.c > usr.out && $contains / usr.out >/dev/null 2>&1; then
+ dflt='/bsd43/usr/include'
+ incpath='/bsd43'
+ mips_type='BSD 4.3'
+ else
+ mips_type='System V'
+ fi
+ $rm -f usr.c usr.out
+ echo "and you're compiling with the $mips_type compiler and libraries."
+ echo "exit 0" >mips
+else
+ echo "Doesn't look like a MIPS system."
+ echo "exit 1" >mips
+fi
+chmod +x mips
+$eunicefix mips
+
diff --git a/mcon/U/Mkdirp.U b/mcon/U/Mkdirp.U
index 67e3193..1637f8a 100644
--- a/mcon/U/Mkdirp.U
+++ b/mcon/U/Mkdirp.U
@@ -1,11 +1,11 @@
-?RCS: $Id: Mkdirp.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: Mkdirp.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Extract.U,v $
diff --git a/mcon/U/Mksymlinks.U b/mcon/U/Mksymlinks.U
index 5f78859..e98f174 100644
--- a/mcon/U/Mksymlinks.U
+++ b/mcon/U/Mksymlinks.U
@@ -1,11 +1,11 @@
-?RCS: $Id: Mksymlinks.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: Mksymlinks.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Copyright (c) 2000, Jarkko Hietaniemi
diff --git a/mcon/U/Myinit.U b/mcon/U/Myinit.U
index 3109ee4..bcbb6a0 100644
--- a/mcon/U/Myinit.U
+++ b/mcon/U/Myinit.U
@@ -1,11 +1,11 @@
-?RCS: $Id: Myinit.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: Myinit.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Myinit.U,v $
diff --git a/mcon/U/Myread.U b/mcon/U/Myread.U
index 67dd676..b584e5f 100644
--- a/mcon/U/Myread.U
+++ b/mcon/U/Myread.U
@@ -1,11 +1,11 @@
-?RCS: $Id: Myread.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: Myread.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Myread.U,v $
diff --git a/mcon/U/Nothing.U b/mcon/U/Nothing.U
index d5fee83..a908f1a 100644
--- a/mcon/U/Nothing.U
+++ b/mcon/U/Nothing.U
@@ -1,11 +1,11 @@
-?RCS: $Id: Nothing.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: Nothing.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Nothing.U,v $
diff --git a/mcon/U/Null.U b/mcon/U/Null.U
index 85f90b6..cfa553c 100644
--- a/mcon/U/Null.U
+++ b/mcon/U/Null.U
@@ -1,11 +1,11 @@
-?RCS: $Id: Null.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: Null.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Null.U,v $
diff --git a/mcon/U/Obsol_h.U b/mcon/U/Obsol_h.U
index 0b19667..cf7feb8 100644
--- a/mcon/U/Obsol_h.U
+++ b/mcon/U/Obsol_h.U
@@ -1,11 +1,11 @@
-?RCS: $Id: Obsol_h.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: Obsol_h.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Obsol_h.U,v $
diff --git a/mcon/U/Obsol_sh.U b/mcon/U/Obsol_sh.U
index 0995f40..1c12fbb 100644
--- a/mcon/U/Obsol_sh.U
+++ b/mcon/U/Obsol_sh.U
@@ -1,11 +1,11 @@
-?RCS: $Id: Obsol_sh.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: Obsol_sh.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Obsol_sh.U,v $
diff --git a/mcon/U/Oldconfig.U b/mcon/U/Oldconfig.U
index c44ad7b..06d902d 100644
--- a/mcon/U/Oldconfig.U
+++ b/mcon/U/Oldconfig.U
@@ -1,11 +1,11 @@
-?RCS: $Id: Oldconfig.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: Oldconfig.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Oldconfig.U,v $
@@ -103,10 +103,11 @@
?T:tmp tmp_n tmp_c tmp_sh file
?T:xxxxfile xxxfile xxfile xfile hintfile newmyuname
?T:tans _ isesix INITPROG DJGPP has_uname
+?T:saved_osname saved_osvers saved_libswanted
?D:osname=''
?LINT:change n c sh
-?LINT:extern hostarch
-?LINT:change hostarch
+?LINT:extern hostarch libswanted libs
+?LINT:change hostarch libswanted libs
: Determine the name of the machine
myuname=`$uname -a 2>/dev/null`
$test -z "$myuname" && myuname=`hostname 2>/dev/null`
@@ -120,7 +121,8 @@ myuname=`echo $myuname | $sed -e 's/^[^=]*=//' -e 's/\///g' | \
./tr '[A-Z]' '[a-z]' | $tr $trnl ' '`
?X: Save the value we just computed to reset myuname after we get done here.
newmyuname="$myuname"
-$test -f "$uname$_exe" && has_uname=y
+has_uname=
+$test -f "$uname" && has_uname=y
: Guessing of the OS name -- half the following guesses are probably wrong...
: If you have better tests or hints, please send them to the metaconfig
@@ -189,7 +191,8 @@ if $test "X$has_uname" != X; then
osvers=4
elif $contains _SYSV3 /usr/include/stdio.h > /dev/null 2>&1 ; then
osvers=3
- elif $contains _POSIX_SOURCE /usr/include/stdio.h > /dev/null 2>&1 ; then
+ elif $contains _POSIX_SOURCE /usr/include/stdio.h > /dev/null 2>&1
+ then
osvers=2
fi
fi
@@ -202,7 +205,7 @@ if $test "X$has_uname" != X; then
?X: $3 and $4 are version/subversion
?X: $5 is always "pc", but that might not be unique to DJGPP.
?X: (e.g. Solaris_x86 has $5 = i86pc, which doesn't actually conflict,
-?X: but it's close enought that I can easily imagine other vendors also
+?X: but it's close enough that I can easily imagine other vendors also
?X: using variants of pc* in $5.)
?X: The "DJGPP" environment variable is always set when djgpp is active.
pc*)
@@ -233,7 +236,10 @@ if $test "X$has_uname" != X; then
osvers=`$uname -r`
;;
cygwin*) osname=cygwin
- osvers="$3"
+ osvers=`echo "$3" | sed -e 's/\(.*\)(.*/\1/'`
+ ;;
+ mingw*) osname=mingw
+ osvers=`echo "$3" | sed -e 's/\(.*\)(.*/\1/'`
;;
*dc.osx) osname=dcosx
osvers="$3"
@@ -442,6 +448,15 @@ case "$knowitall" in
*) dflt=y;;
esac
+?X: Before loading a previous config.sh, save the variables we've
+?X: just computed above so that we can propagate these new values.
+saved_osname="$osname"
+saved_osvers="$osvers"
+saved_libswanted="$libswanted"
+tmp_n="$n"
+tmp_c="$c"
+tmp_sh="$sh"
+
: Get old answers from config file if it was generated on the same system
hint=default
if $test -f ../config.sh; then
@@ -454,14 +469,19 @@ if $test -f ../config.sh; then
myuname="$newmyuname"
;;
*) echo "Fetching default answers from your old config.sh file..." >&4
- tmp_n="$n"
- tmp_c="$c"
- tmp_sh="$sh"
. ../config.sh
cp ../config.sh .
- n="$tmp_n"
- c="$tmp_c"
hint=previous
+ case "$dflt" in
+ n)
+ echo " "
+ rp="Do you want further invocations to use these defaults?"
+ . ./myread
+ case "$ans" in
+ y*|Y*) myuname="$newmyuname";;
+ esac
+ ;;
+ esac
;;
esac
fi
@@ -470,9 +490,6 @@ fi
*)
echo " "
echo "Fetching default answers from $config_sh..." >&4
- tmp_n="$n"
- tmp_c="$c"
- tmp_sh="$sh"
cd ..
?X: preserve symbolic links, if any
cp $config_sh config.sh 2>/dev/null
@@ -480,8 +497,6 @@ fi
. ./config.sh
cd UU
cp ../config.sh .
- n="$tmp_n"
- c="$tmp_c"
hint=previous
;;
esac
@@ -496,6 +511,19 @@ for file in $loclist $trylist; do
eval $file="\$_$file"
done
+?X: Restore saved variables
+osname="$saved_osname"
+osvers="$saved_osvers"
+n="$tmp_n"
+c="$tmp_c"
+
+?X: Reset libs when libswanted changed since last time
+case "$libswanted" in
+"$saved_libswanted") ;;
+*) libs='';;
+esac
+libswanted="$saved_libswanted"
+
. ./checkcc
?X: Cross-compiling support
case "$targetarch" in
diff --git a/mcon/U/Oldsym.U b/mcon/U/Oldsym.U
index 539239b..2546fc3 100644
--- a/mcon/U/Oldsym.U
+++ b/mcon/U/Oldsym.U
@@ -1,11 +1,11 @@
-?RCS: $Id: Oldsym.U 25 2008-05-28 11:19:25Z rmanfredi $
+?RCS: $Id: Oldsym.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Oldsym.U,v $
@@ -28,8 +28,12 @@
: add special variables
$test -f $src/patchlevel.h && \
awk '/^#define/ {printf "%s=%s\n",$2,$3}' $src/patchlevel.h >>config.sh
+?X: In revision.h we expect something like:
+?X: #define REVISION "$Revision: 167 $"
+?X: which is supposed to be expanded by the revision control system.
$test -f $src/revision.h && \
-awk '/^#define/ {printf "%s=%s\n",$2,$3}' $src/revision.h >>config.sh
+sed -ne 's/^#define \([A-Za-z0-9_]*\) ".*: \([0-9]*\).*"/\1=\2/p' \
+ < $src/revision.h >>config.sh
echo "CONFIG=true" >>config.sh
: propagate old symbols
diff --git a/mcon/U/Options.U b/mcon/U/Options.U
index 66e6ebd..c9b5632 100644
--- a/mcon/U/Options.U
+++ b/mcon/U/Options.U
@@ -1,11 +1,11 @@
-?RCS: $Id: Options.U 25 2008-05-28 11:19:25Z rmanfredi $
+?RCS: $Id: Options.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Options.U,v $
@@ -23,7 +23,7 @@
?RCS: patch49: this unit now exports file optdef.sh, not a variable
?RCS:
?RCS: Revision 3.0.1.3 1995/01/11 15:19:00 ram
-?RCS: patch45: new -O option allowing -D and -U to override config.sh setttings
+?RCS: patch45: new -O option allowing -D and -U to override config.sh settings
?RCS: patch45: file optdef.sh is no longer removed after sourcing
?RCS:
?RCS: Revision 3.0.1.2 1994/10/29 15:58:06 ram
@@ -139,7 +139,7 @@ EOF
: process the command line options
?X: Use "$@" to keep arguments with spaces in them from being split apart.
?X: For the same reason, awk will output quoted arguments and the final eval
-?X: removes them and sets a proper $* array. An 'X' is prependend to each
+?X: removes them and sets a proper $* array. An 'X' is prepended to each
?X: argument before being fed to echo to guard against 'echo -x', where -x
?X: would be understood as an echo option! It is removed before feeding awk.
set X `for arg in "$@"; do echo "X$arg"; done |
diff --git a/mcon/U/Prefixit.U b/mcon/U/Prefixit.U
index e672ad8..e73c9af 100644
--- a/mcon/U/Prefixit.U
+++ b/mcon/U/Prefixit.U
@@ -1,11 +1,11 @@
-?RCS: $Id: Prefixit.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: Prefixit.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Prefixit.U,v $
diff --git a/mcon/U/Prefixup.U b/mcon/U/Prefixup.U
index 7f0cabf..92a860f 100644
--- a/mcon/U/Prefixup.U
+++ b/mcon/U/Prefixup.U
@@ -1,11 +1,11 @@
-?RCS: $Id: Prefixup.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: Prefixup.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Prefixup.U,v $
diff --git a/mcon/U/Rcs.U b/mcon/U/Rcs.U
index 3985f5f..400fc3a 100644
--- a/mcon/U/Rcs.U
+++ b/mcon/U/Rcs.U
@@ -1,11 +1,11 @@
-?RCS: $Id: Rcs.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: Rcs.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Rcs.U,v $
diff --git a/mcon/U/Sendfile64.U b/mcon/U/Sendfile64.U
new file mode 100644
index 0000000..834f6a8
--- /dev/null
+++ b/mcon/U/Sendfile64.U
@@ -0,0 +1,36 @@
+?RCS: $Id: Sendfile64.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:Sendfile64: Largefile Trylink d_sendfile i_syssendfile cat
+?MAKE: -pick add $@ %<
+?T:result
+?LINT:change i_syssendfile d_sendfile
+: determine whether sendfile works with 64-bit file support
+$cat >try.c <<EOC
+#$i_syssendfile I_SYS_SENDFILE
+#ifdef I_SYS_SENDFILE
+#include <sys/sendfile.h>
+#endif
+int main(void)
+{
+ return 0;
+}
+EOC
+cyn="whether sendfile() works with current compiling flags"
+result=''
+set result
+eval $trylink
+case "$result" in
+"$undef")
+ i_syssendfile="$undef"
+ d_sendfile="$undef"
+ ;;
+esac
+
diff --git a/mcon/U/Setvar.U b/mcon/U/Setvar.U
index a124aa9..05cf856 100644
--- a/mcon/U/Setvar.U
+++ b/mcon/U/Setvar.U
@@ -1,11 +1,11 @@
-?RCS: $Id: Setvar.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: Setvar.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Setvar.U,v $
diff --git a/mcon/U/Signal.U b/mcon/U/Signal.U
index 7fa7788..8e5d782 100644
--- a/mcon/U/Signal.U
+++ b/mcon/U/Signal.U
@@ -1,11 +1,11 @@
-?RCS: $Id: Signal.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: Signal.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Signal.U,v $
@@ -40,7 +40,7 @@
?X: This unit is then used by sig_name.U.
?X:
?MAKE:Signal: test tr rm awk cat grep startsh eunicefix sed sort uniq \
- Findhdr cppstdin +cppflags cppminus Compile trnl run
+ Findhdr cppstdin +cppflags cppminus Compile trnl run fieldn
?MAKE: -pick add $@ %<
?X:all files declared as "public" since they're used from other units
?F:signal.c signal_cmd signal.lst signal signal.awk
@@ -160,7 +160,7 @@ echo $xxx | $tr ' ' $trnl | $sort | $uniq | $awk '
}
END {
printf "#endif /* JUST_NSIG */\n";
- printf "exit(0);\n}\n";
+ printf "return 0;\n}\n";
}
' >>signal.c
$cat >signal.awk <<'EOP'
diff --git a/mcon/U/Tr.U b/mcon/U/Tr.U
index 64fefbe..d4a54a0 100644
--- a/mcon/U/Tr.U
+++ b/mcon/U/Tr.U
@@ -1,11 +1,11 @@
-?RCS: $Id: Tr.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: Tr.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Tr.U,v $
diff --git a/mcon/U/Trylink.U b/mcon/U/Trylink.U
new file mode 100644
index 0000000..c904339
--- /dev/null
+++ b/mcon/U/Trylink.U
@@ -0,0 +1,110 @@
+?RCS: $Id: Trylink.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?X:
+?X: This unit tries to compile and link a test program.
+?X:
+?X: To use it, put the program to compile in try.c, then say:
+?X:
+?X: cyn=func
+?X: set d_func [optional cc flags to try in sequence]
+?X: eval $trylink
+?X:
+?X: A log of all attempts is kept in the trylink.log file, within the UU
+?X: directory (where Configure runs). This directory is only cleaned-up
+?X: at the end of the Configure run, so do not supply -e to Configure in order
+?X: to stop after the production of the config.sh file and be able to
+?X: inspect the UU/trylink.log file.
+?X:
+?X: Before calling $trylink, on can also set the $cyn variable (check yes/no)
+?X: with a message that will be printed before the test is made and which
+?X: will indicate whether the test was successful or not. The string
+?X: "Checking $cyn..." is emitted and will be followed by "yes." if the
+?X: compilation succeeds, and "no." otherwise.
+?X:
+?X: If there are no space in the $cyn variable, then it is expected to hold
+?X: the name of a routine if the variable to test starts with d_, or
+?X: the name of an include file if the variable to test starts with i_.
+?X: In which case the message for success are changed to "found." and
+?X: "missing." on failure.
+?X:
+?X: The "$cyn" variable is explicitly reset at the end, and nothing is
+?X: printed if it is empty upon entry.
+?X:
+?MAKE:Trylink: Setvar Oldconfig cat rm test +cc +ccflags +ldflags echo c n
+?MAKE: -pick add $@ %<
+?LINT:define trylink
+?V:trylink:cyn
+?S:trylink:
+?S: This shell variable is used internally by Configure to check
+?S: wether a given function is defined or not. A typical use is:
+?S: create try.c
+?S: set d_func [optional cc flags to try in sequence]
+?S: eval $trylink
+?S: That will print a message, saying wether function was found or
+?S: not and set d_func accordingly.
+?S:.
+?T:var file val nparams msg yes no
+: see whether the try.c file compiles and links
+trylink='
+var=$1;
+shift;
+val=$undef;
+file=trylink.log;
+nparams=$#;
+?X: If they supplied a $cyn, display it now.
+case "$cyn" in
+"") msg="";;
+*" "*) msg="$cyn"; yes=yes; no=no;;
+*)
+ case "$var" in
+ d_*) msg="for $cyn()"; yes=found; no=missing;;
+ i_*) msg="for <$cyn>"; yes=found; no=missing;;
+ *) msg="$cyn"; yes=yes; no=no;;
+ esac
+ ;;
+esac;
+case "$cyn" in
+"") echo "--- $var ---" >> "$file";;
+*)
+ echo " "; $echo $n "Checking $msg...$c" >&4;
+ echo "--- $var --- ($msg)" >>"$file"
+ ;;
+esac;
+$cat try.c >> "$file";
+while :; do
+ $rm -f try$_exe;
+ if $cc $ccflags -o try try.c $ldflags $1 >> "$file" 2>&1; then
+ case "$nparams" in 0) ;; *) echo "==> OK with \"$1\"" >> "$file";; esac;
+ val=$define;
+ break;
+ fi;
+ if $test $# -lt 1; then
+ break;
+ fi;
+ echo "==> FAILED with \"$1\"" >> "$file";
+ shift;
+done;
+$rm -rf try try.*;
+echo "==> $var=$val" >> "$file";
+?X: Show feedback if they supplied a $cyn
+case "$cyn" in
+"") ;;
+*)
+ case "$val" in
+ "$define") echo " $yes." >&4;;
+ *) echo " $no." >&4;;
+ esac
+ ;;
+esac;
+set $var; eval $setvar;
+?X: Cleanup so that next unit using $trylink does not have to do that
+cyn=""
+'
+
diff --git a/mcon/U/Typedef.U b/mcon/U/Typedef.U
index ba00e61..60ae96b 100644
--- a/mcon/U/Typedef.U
+++ b/mcon/U/Typedef.U
@@ -1,11 +1,11 @@
-?RCS: $Id: Typedef.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: Typedef.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Typedef.U,v $
diff --git a/mcon/U/Unix.U b/mcon/U/Unix.U
index fd32692..35ce253 100644
--- a/mcon/U/Unix.U
+++ b/mcon/U/Unix.U
@@ -1,12 +1,12 @@
-?RCS: $Id: Unix.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: Unix.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1996, Andy Dougherty
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Unix.U,v $
@@ -14,7 +14,7 @@
?RCS: patch61: created
?RCS:
?X:
-?X: The purpose of this unit is to define things that are common accross all
+?X: The purpose of this unit is to define things that are common across all
?X: known UNIX platforms. If Configure is ported/used on a non-UNIX
?X: environment, then some of the following variables can be redefined in hint
?X: files.
diff --git a/mcon/U/Warn.U b/mcon/U/Warn.U
index 31a0609..44dc16a 100644
--- a/mcon/U/Warn.U
+++ b/mcon/U/Warn.U
@@ -1,11 +1,11 @@
-?RCS: $Id: Warn.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: Warn.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Extract.U,v $
diff --git a/mcon/U/Warn_v7EXT.U b/mcon/U/Warn_v7EXT.U
index 8bf9c9f..b669172 100644
--- a/mcon/U/Warn_v7EXT.U
+++ b/mcon/U/Warn_v7EXT.U
@@ -1,11 +1,11 @@
-?RCS: $Id: Warn_v7EXT.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: Warn_v7EXT.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Warn_v7EXT.U,v $
diff --git a/mcon/U/Warn_v7ND.U b/mcon/U/Warn_v7ND.U
index 9cae280..eed3edc 100644
--- a/mcon/U/Warn_v7ND.U
+++ b/mcon/U/Warn_v7ND.U
@@ -1,11 +1,11 @@
-?RCS: $Id: Warn_v7ND.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: Warn_v7ND.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Warn_v7ND.U,v $
diff --git a/mcon/U/Whoa.U b/mcon/U/Whoa.U
index 45497f3..ca7a226 100644
--- a/mcon/U/Whoa.U
+++ b/mcon/U/Whoa.U
@@ -1,11 +1,11 @@
-?RCS: $Id: Whoa.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: Whoa.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: Whoa.U,v $
diff --git a/mcon/U/abortsig.U b/mcon/U/abortsig.U
index d51ba3e..392e28e 100644
--- a/mcon/U/abortsig.U
+++ b/mcon/U/abortsig.U
@@ -1,11 +1,11 @@
-?RCS: $Id: abortsig.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: abortsig.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: abortsig.U,v $
@@ -38,8 +38,9 @@ case "$abortsig" in
for signal in SIGIOT SIGILL SIGABRT; do
case "$abortsig" in
'') $cat >abort.c <<EOP
+/* FIXME: Missing #include <stdlib.h>*/
#include <signal.h>
-caught() { exit(0); }
+caught() { exit(0); } /* FIXME: Use _exit() or _Exit() in signal handler */
int main()
{
#ifdef $signal
diff --git a/mcon/U/active.U b/mcon/U/active.U
index d7b6be0..80f9007 100644
--- a/mcon/U/active.U
+++ b/mcon/U/active.U
@@ -1,11 +1,11 @@
-?RCS: $Id: active.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: active.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: active.U,v $
diff --git a/mcon/U/afs.U b/mcon/U/afs.U
index b56ca5b..c1cf0b7 100644
--- a/mcon/U/afs.U
+++ b/mcon/U/afs.U
@@ -1,11 +1,11 @@
-?RCS: $Id: afs.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: afs.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: afs.U,v $
diff --git a/mcon/U/alignbytes.U b/mcon/U/alignbytes.U
index 37fd3ba..dea3700 100644
--- a/mcon/U/alignbytes.U
+++ b/mcon/U/alignbytes.U
@@ -1,11 +1,11 @@
-?RCS: $Id: alignbytes.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: alignbytes.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: alignbytes.U,v $
@@ -18,11 +18,11 @@
?RCS: Revision 3.0 1993/08/18 12:05:23 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:alignbytes: Myread cat cc ccflags rm
+?MAKE:alignbytes: Assert Myread Trylink cat i_inttypes i_limits i_math
?MAKE: -pick add $@ %<
?S:alignbytes:
-?S: This variable holds the number of bytes required to align a
-?S: double. Usual values are 2, 4 and 8.
+?S: This variable holds the number of bytes required to align an
+?S: arbitrary standard type. Usual values are 2, 4 and 8.
?S:.
?X: This used to be called ALIGNBYTES, but that conflicts with
?X: <machines/param.h> in NetBSD.
@@ -32,33 +32,110 @@
?C:.
?H:#define MEM_ALIGNBYTES $alignbytes /**/
?H:.
-?F:!try
+?T:alignment result
: check for alignment requirements
echo " "
case "$alignbytes" in
-'') echo "Checking alignment constraints..." >&4
- $cat >try.c <<'EOCP'
-struct foobar {
- char foo;
- double bar;
-} try;
-int main()
+'')
+ echo "Checking alignment constraints..." >&4
+
+ for alignment in 8 4 2 1 16 32 error
+ do
+ $cat >try.c <<EOCP
+#$i_inttypes I_INTTYPES
+#ifdef I_INTTYPES
+#include <inttypes.h>
+#endif
+#$i_limits I_LIMITS
+#ifdef I_LIMITS
+#include <limits.h>
+#endif
+#$i_math I_MATH
+#ifdef I_MATH
+#include <math.h>
+#endif
+
+union u {
+ void *void_ptr;
+ void (*func_ptr)(void);
+ char c;
+ short s;
+ int i;
+ long l;
+ float f;
+ double d;
+#ifdef LLONG_MAX
+ long long ll;
+#else
+#warning "LLONG_MAX undefined"
+#endif
+#if defined(HUGE_VALL)
+ long double ld;
+#else
+#warning "HUGE_VALL undefined"
+#endif
+#ifdef UINT32_MAX
+ uint32_t u32;
+#else
+#warning "UINT32_MAX undefined"
+#endif
+#ifdef UINT16_MAX
+ uint16_t u16;
+#else
+#warning "UINT32_MAX undefined"
+#endif
+#ifdef UINT64_MAX
+ uint64_t u64;
+#else
+#warning "UINT64_MAX undefined"
+#endif
+#ifdef UINTMAX_MAX
+ uintmax_t m;
+#else
+#warning "UINTMAX_MAX undefined"
+#endif
+#ifdef UINTPTR_MAX
+ uintptr_t up;
+#else
+#warning "UINTPTR_MAX undefined"
+#endif
+};
+
+struct s {
+ char a;
+ union u b;
+};
+
+#include "static_assert.h"
+
+int
+main(void)
{
- printf("%d\n", (char *)&try.bar - (char *)&try.foo);
+ STATIC_ASSERT($alignment == ((sizeof (struct s) - (sizeof (union u)))));
+ return 0;
}
EOCP
- if $cc $ccflags try.c -o try >/dev/null 2>&1; then
- dflt=`./try`
- else
- dflt='8'
- echo "(I can't seem to compile the test program...)"
- fi
- ;;
+
+ result=''
+ set result
+ eval $trylink
+ case "$result" in
+ "$define") break;;
+ esac
+ done
+
+ case "$alignment" in
+ error) dflt='8'
+ echo "(I can't seem to compile the test program...)" >&4
+ ;;
+ *) dflt=$alignment
+ ;;
+ esac
+;;
*) dflt="$alignbytes"
;;
esac
-rp="Doubles must be aligned on a how-many-byte boundary?"
+rp="What is the maximum alignment in bytes required for a standard type?"
. ./myread
alignbytes="$ans"
-$rm -f try.c try
diff --git a/mcon/U/archlib.U b/mcon/U/archlib.U
index 7c6b344..2c54506 100644
--- a/mcon/U/archlib.U
+++ b/mcon/U/archlib.U
@@ -1,11 +1,11 @@
-?RCS: $Id: archlib.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: archlib.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
diff --git a/mcon/U/archname.U b/mcon/U/archname.U
index 128e124..e841793 100644
--- a/mcon/U/archname.U
+++ b/mcon/U/archname.U
@@ -1,11 +1,11 @@
-?RCS: $Id: archname.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: archname.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: archname.U,v $
diff --git a/mcon/U/baserev.U b/mcon/U/baserev.U
index 44d6a72..cf9595b 100644
--- a/mcon/U/baserev.U
+++ b/mcon/U/baserev.U
@@ -1,11 +1,11 @@
-?RCS: $Id: baserev.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: baserev.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: baserev.U,v $
diff --git a/mcon/U/basicshell.U b/mcon/U/basicshell.U
index 78a0cd2..c9fd483 100644
--- a/mcon/U/basicshell.U
+++ b/mcon/U/basicshell.U
@@ -1,11 +1,11 @@
-?RCS: $Id: basicshell.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: basicshell.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: basicshell.U,v $
diff --git a/mcon/U/bin.U b/mcon/U/bin.U
index d99f2a5..da5212f 100644
--- a/mcon/U/bin.U
+++ b/mcon/U/bin.U
@@ -1,11 +1,11 @@
-?RCS: $Id: bin.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: bin.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: bin.U,v $
diff --git a/mcon/U/bitpbyte.U b/mcon/U/bitpbyte.U
index a118f83..1e6b212 100644
--- a/mcon/U/bitpbyte.U
+++ b/mcon/U/bitpbyte.U
@@ -1,11 +1,11 @@
-?RCS: $Id: bitpbyte.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: bitpbyte.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: bitpbyte.U,v $
diff --git a/mcon/U/byteorder.U b/mcon/U/byteorder.U
index a2242c5..8989838 100644
--- a/mcon/U/byteorder.U
+++ b/mcon/U/byteorder.U
@@ -1,99 +1,68 @@
-?RCS: $Id: byteorder.U 1 2006-08-24 12:32:52Z rmanfredi $
?RCS:
-?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, 2012 Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
-?RCS: $Log: byteorder.U,v $
-?RCS: Revision 3.0.1.2 1997/02/28 15:24:55 ram
-?RCS: patch61: no longer ask the user if the test runs ok
-?RCS:
-?RCS: Revision 3.0.1.1 1994/10/29 16:02:58 ram
-?RCS: patch36: added ?F: line for metalint file checking
-?RCS:
-?RCS: Revision 3.0 1993/08/18 12:05:28 ram
-?RCS: Baseline for dist 3.0 netwide release.
-?RCS:
-?MAKE:byteorder: cat Myread Oldconfig Loc +cc +ccflags rm
+?MAKE:byteorder: cat contains echo n c Myread Oldconfig Loc +cc +ccflags rm _o
?MAKE: -pick add $@ %<
?S:byteorder:
?S: This variable holds the byte order. In the following, larger digits
?S: indicate more significance. The variable byteorder is either 4321
-?S: on a big-endian machine, or 1234 on a little-endian, or 87654321
-?S: on a Cray ... or 3412 with weird order !
+?S: on a big-endian machine, or 1234 on a little-endian one.
+?S: cannot figure it out.
?S:.
?C:BYTEORDER:
-?C: This symbol hold the hexadecimal constant defined in byteorder,
-?C: i.e. 0x1234 or 0x4321, etc...
+?C: This symbol holds the hexadecimal constant defined in byteorder,
+?C: i.e. 1234 for little-endian or 4321 for big-ending.
?C:.
?H:#define BYTEORDER 0x$byteorder /* large digits for MSB */
?H:.
-?T:xxx_prompt
-?F:!try
-: check for ordering of bytes in a long
-case "$byteorder" in
-'')
- $cat <<'EOM'
-
-In the following, larger digits indicate more significance. A big-endian
-machine like a Pyramid or a Motorola 680?0 chip will come out to 4321. A
-little-endian machine like a Vax or an Intel 80?86 chip would be 1234. Other
-machines may have weird orders like 3412. A Cray will report 87654321. If
-the test program works the default is probably right.
-I'm now running the test program...
-EOM
- $cat >try.c <<'EOCP'
-#include <stdio.h>
-int main()
-{
- int i;
- union {
- unsigned long l;
- char c[sizeof(long)];
- } u;
-
- if (sizeof(long) > 4)
- u.l = (0x08070605L << 32) | 0x04030201L;
- else
- u.l = 0x04030201L;
- for (i = 0; i < sizeof(long); i++)
- printf("%c", u.c[i]+'0');
- printf("\n");
- exit(0);
-}
+?T:order
+: check for ordering of bytes in a word
+?X:
+?X: An idea from Guido Draheim <Guido.Draheim@gmx.de> checking the endianness
+?X: without actually executing code, which allows cross-compiling.
+?X:
+echo " "
+$echo $n "Checking integer byte-ordering...$c" >&4
+$cat >try.c <<'EOCP'
+short ascii_be[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+short ascii_le[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+short ebcdic_be[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+short ebcdic_le[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
EOCP
- xxx_prompt=y
- if $cc $ccflags -o try try.c >/dev/null 2>&1 && ./try > /dev/null; then
- dflt=`./try`
- case "$dflt" in
- [1-4][1-4][1-4][1-4]|12345678|87654321)
- echo "(The test program ran ok.)"
- echo "byteorder=$dflt"
- xxx_prompt=n
- ;;
- ????|????????) echo "(The test program ran ok.)" ;;
- *) echo "(The test program didn't run right for some reason.)" ;;
- esac
+order=''
+if $cc -c $ccflags try.c >/dev/null 2>&1; then
+ if $contains BIGenDianSyS try$_o >/dev/null 2>&1; then
+ order=4321
+ elif $contains LiTTleEnDian try$_o >/dev/null 2>&1; then
+ order=1234
else
- dflt='4321'
- cat <<'EOM'
-(I can't seem to compile the test program. Guessing big-endian...)
-EOM
+ $echo $n " wild guessing$c" >&4
+ order=4321
fi
- case "$xxx_prompt" in
- y)
- rp="What is the order of bytes in a long?"
- . ./myread
- byteorder="$ans"
- ;;
- *) byteorder=$dflt
- ;;
+fi
+case "$order" in
+'')
+ echo " cannot compute it." >&4
+ rp="Are integers stored in big-endian format?"
+ case "$byteorder" in
+ 1234) dflt=n;;
+ *) dflt=y;;
+ esac
+ . ./myread
+ case "$ans" in
+ y*) order=4321;;
+ *) order=1234;;
esac
;;
+1234) echo " little-endian." >&4;;
+4321) echo " big-endian." >&4;;
esac
-$rm -f try.c try
+byteorder=$order
+$rm -f try.c try$_o
diff --git a/mcon/U/cc.U b/mcon/U/cc.U
index 65bf260..da297ef 100644
--- a/mcon/U/cc.U
+++ b/mcon/U/cc.U
@@ -1,11 +1,11 @@
-?RCS: $Id: cc.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: cc.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: cc.U,v $
diff --git a/mcon/U/ccflags.U b/mcon/U/ccflags.U
index f047f21..4cbb80a 100644
--- a/mcon/U/ccflags.U
+++ b/mcon/U/ccflags.U
@@ -1,11 +1,11 @@
-?RCS: $Id: ccflags.U 29 2008-06-16 18:11:00Z cbiere $
+?RCS: $Id: ccflags.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: ccflags.U,v $
@@ -21,7 +21,7 @@
?RCS: patch54: now checks for cc/ccflags/ldflags coherency
?RCS:
?RCS: Revision 3.0.1.6 1994/10/29 16:07:02 ram
-?RCS: patch36: gcc versionning no longer relies on the C compiler's name
+?RCS: patch36: gcc versioning no longer relies on the C compiler's name
?RCS: patch36: simplified check for gcc version checking (ADO)
?RCS:
?RCS: Revision 3.0.1.5 1994/08/29 16:06:35 ram
@@ -45,7 +45,7 @@
?RCS: Revision 3.0 1993/08/18 12:05:31 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:ccflags ldflags lkflags cppflags optimize locincpth: test cat \
+?MAKE:ccflags ldflags lkflags cppflags optimize pthread locincpth: test cat \
Myread Guess Options Oldconfig gccversion mips_type +usrinc \
package contains rm +cc cppstdin cppminus cpprun cpplast libpth \
loclibpth hint
@@ -62,6 +62,10 @@
?S: This variable contains any optimizer/debugger flag that should be used.
?S: It is up to the Makefile to use it.
?S:.
+?S:pthread:
+?S: This variable contains any thread-specific flag that should be used.
+?S: It is up to the Makefile to use it.
+?S:.
?S:ldflags:
?S: This variable contains any additional C loader flags desired by
?S: the user. It is up to the Makefile to use this.
@@ -83,10 +87,10 @@
?D:ccflags=''
?D:ldflags=''
?D:optimize=''
+?D:pthread=''
?INIT:: Possible local include directories to search.
?INIT:: Set locincpth to "" in a hint file to defeat local include searches.
-?INIT:locincpth="/usr/local/include /opt/local/include /usr/gnu/include"
-?INIT:locincpth="$locincpth /opt/gnu/include /usr/GNU/include /opt/GNU/include"
+?INIT:locincpth=""
?INIT::
?INIT:: no include file wanted by default
?INIT:inclwanted=''
@@ -130,6 +134,40 @@ case "$optimize" in
'none') optimize=" ";;
esac
+?X: When they are using I_PTHREAD, check whether we need/can supply -pthread
+?X: to the compiler for proper threading support. This is usually necessary
+?X: with gcc, in addition to the required -lpthread that need to be listed
+?X: at link time.
+@if I_PTHREAD
+: see whether we need -pthread at the compile/link stage
+case "$pthread" in
+''|$undef)
+ $cat > try.c <<'EOF'
+int main() { return 0; }
+EOF
+ if $cc -pthread -c try.c >/dev/null 2>&1; then
+ dflt='-pthread'
+ else
+ dflt='none'
+ fi
+ ;;
+*) dflt="$pthread";;
+esac
+$cat <<EOH
+
+Some C compilers need to have special flags supplied at compile and link time
+to be able to generate code that will work correctly with POSIX threads.
+When no specific flags are required, specify the word "none".
+
+EOH
+rp="What thread-support compiler/linker flag should be used?"
+. ./myread
+pthread="$ans"
+case "$pthread" in
+'none') pthread="";;
+esac
+@end
+
dflt=''
: We will not override a previous value, but we might want to
: augment a hint file
@@ -362,7 +400,7 @@ esac
echo " "
echo "Checking your choice of C compiler and flags for coherency..." >&4
?X: Strip extra blanks in case some of the following variables are empty
-set X $cc $optimize $ccflags $ldflags -o try try.c
+set X $cc $optimize $pthread $ccflags $ldflags -o try try.c
shift
$cat >try.msg <<EOM
I've tried to compile and run a simple program with:
@@ -374,8 +412,7 @@ and I got the following output:
EOM
$cat > try.c <<'EOF'
-#include <stdio.h>
-int main() { exit(0); }
+int main() { return 0; }
EOF
dflt=y
?X: Use "sh -c" to avoid error messages tagged with leading "Configure:".
diff --git a/mcon/U/cf_email.U b/mcon/U/cf_email.U
index d9d0af8..3eb9606 100644
--- a/mcon/U/cf_email.U
+++ b/mcon/U/cf_email.U
@@ -1,11 +1,11 @@
-?RCS: $Id: cf_email.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: cf_email.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: cf_email.U,v $
@@ -13,13 +13,14 @@
?RCS: patch16: created
?RCS:
?RCS:
-?MAKE:cf_email: cat cf_by myhostname mydomain Oldconfig Myread
+?MAKE:cf_email: cat cf_by test myhostname mydomain Oldconfig Myread
?MAKE: -pick add $@ %<
?S:cf_email:
?S: Electronic mail address of the person who ran Configure. This can be
?S: used by units that require the user's e-mail, like MailList.U.
?S:.
-?T:cont
+?T:cont maildomain
+?LINT:extern MAILDOMAIN
: determine the e-mail address of the user who is running us
$cat <<EOM
@@ -32,9 +33,19 @@ your organization...
EOM
cont=x
while test "$cont"; do
+ case "$MAILDOMAIN" in
+ '')
+ if $test -s /etc/mailname; then
+ maildomain=`$cat /etc/mailname`
+ else
+ maildomain="$myhostname$mydomain"
+ fi
+ ;;
+ *) maildomain="$MAILDOMAIN";;
+ esac
case "$cf_email" in
- '') dflt="$cf_by@$myhostname$mydomain";;
- *) dflt="$cf_email";;
+ '') dflt="$cf_by@$maildomain";;
+ *) dflt="$cf_email";;
esac
rp='What is your e-mail address?'
. ./myread
diff --git a/mcon/U/cf_name.U b/mcon/U/cf_name.U
index 241f1a0..61d9ef2 100644
--- a/mcon/U/cf_name.U
+++ b/mcon/U/cf_name.U
@@ -1,11 +1,11 @@
-?RCS: $Id: cf_name.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: cf_name.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Graham Stoney <greyham@research.canon.oz.au>
diff --git a/mcon/U/cf_who.U b/mcon/U/cf_who.U
index 2d2e019..0285312 100644
--- a/mcon/U/cf_who.U
+++ b/mcon/U/cf_who.U
@@ -1,11 +1,11 @@
-?RCS: $Id: cf_who.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: cf_who.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: cf_who.U,v $
diff --git a/mcon/U/charorder.U b/mcon/U/charorder.U
index 991ace7..73c3771 100644
--- a/mcon/U/charorder.U
+++ b/mcon/U/charorder.U
@@ -1,11 +1,11 @@
-?RCS: $Id: charorder.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: charorder.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: charorder.U,v $
diff --git a/mcon/U/charsize.U b/mcon/U/charsize.U
index 388e5c1..7135e5b 100644
--- a/mcon/U/charsize.U
+++ b/mcon/U/charsize.U
@@ -1,11 +1,11 @@
-?RCS: $Id: charsize.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: charsize.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: charsize.U,v $
@@ -15,7 +15,7 @@
?RCS: Revision 3.0 1993/08/18 12:05:34 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:charsize: cat rm Myread +cc +ccflags
+?MAKE:charsize: Assert Myread cat rm +cc +ccflags echo n c
?MAKE: -pick add $@ %<
?S:charsize:
?S: This variable contains the value of the CHARSIZE symbol, which
@@ -25,34 +25,40 @@
?C: This symbol contains the size of a char, so that the C preprocessor
?C: can make decisions based on it.
?C:.
-?H:#define CHARSIZE $charsize /**/
+?H:#define CHARSIZE $charsize
?H:.
-?F:!try
+?T:size s
: check for length of character
echo " "
-case "$charsize" in
-'')
- echo "Checking to see how big your characters are..." >&4
- $cat >try.c <<'EOCP'
-#include <stdio.h>
+$echo $n "Checking to see how big your characters are...$c" >&4
+for size in 1 2 4 8 error; do
+ $cat >try.c <<EOCP
+#include "static_assert.h"
+char foo;
int main()
{
- printf("%d\n", sizeof(char));
+ STATIC_ASSERT($size == sizeof(foo));
+ return 0;
}
EOCP
- if $cc $ccflags -o try try.c >/dev/null 2>&1 ; then
- dflt=`./try`
- else
- dflt='1'
- echo "(I can't seem to compile the test program. Guessing...)"
- fi
+ if $cc -c $ccflags try.c >/dev/null 2>&1; then break; fi
+done
+case "$size" in
+error)
+ echo " cannot compute it." >&4
+ dflt=1
+ rp="What is the size of a character (in bytes)?"
+ . ./myread
+ charsize="$ans"
;;
*)
- dflt="$charsize"
+ case "$size" in
+ 1) s='';;
+ *) s='s';;
+ esac
+ echo " $size byte$s." >&4
+ charsize=$size
;;
esac
-rp="What is the size of a character (in bytes)?"
-. ./myread
-charsize="$ans"
-$rm -f try.c try
+$rm -f try.*
diff --git a/mcon/U/contains.U b/mcon/U/contains.U
index 65c4861..1880d28 100644
--- a/mcon/U/contains.U
+++ b/mcon/U/contains.U
@@ -1,11 +1,11 @@
-?RCS: $Id: contains.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: contains.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: contains.U,v $
diff --git a/mcon/U/cpp_stuff.U b/mcon/U/cpp_stuff.U
index e6f2421..1cf74f2 100644
--- a/mcon/U/cpp_stuff.U
+++ b/mcon/U/cpp_stuff.U
@@ -1,11 +1,11 @@
-?RCS: $Id: cpp_stuff.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: cpp_stuff.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: cpp_stuff.U,v $
@@ -135,7 +135,7 @@ Hopefully, $package does not need this feature.
EOM
fi
else
- ./warn <<EOM
+ ./warn 4>&4 <<EOM
I can't seem to be able to catenate tokens with your cpp.
@if CAT2 || CAT3 || CAT4 || CAT5 || SCAT2 || SCAT3 || SCAT4 || SCAT5
You're going to have to edit the values of the following
diff --git a/mcon/U/cpp_trad.U b/mcon/U/cpp_trad.U
index d282310..f8d5401 100644
--- a/mcon/U/cpp_trad.U
+++ b/mcon/U/cpp_trad.U
@@ -1,11 +1,11 @@
-?RCS: $Id: cpp_trad.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: cpp_trad.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: cpp_stuff.U,v $
diff --git a/mcon/U/cppfilecom.U b/mcon/U/cppfilecom.U
index fbf1ce6..d7fca8b 100644
--- a/mcon/U/cppfilecom.U
+++ b/mcon/U/cppfilecom.U
@@ -1,11 +1,11 @@
-?RCS: $Id: cppfilecom.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: cppfilecom.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Orginal Author: Graham Stoney <greyham@research.canon.oz.au>
diff --git a/mcon/U/cppstdin.U b/mcon/U/cppstdin.U
index 3163052..c4da14d 100644
--- a/mcon/U/cppstdin.U
+++ b/mcon/U/cppstdin.U
@@ -1,11 +1,11 @@
-?RCS: $Id: cppstdin.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: cppstdin.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: cppstdin.U,v $
diff --git a/mcon/U/d_NOFILE.U b/mcon/U/d_NOFILE.U
index cc0e2ad..f5c24fa 100644
--- a/mcon/U/d_NOFILE.U
+++ b/mcon/U/d_NOFILE.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_NOFILE.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_NOFILE.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_NOFILE.U,v $
diff --git a/mcon/U/d_NeWS.U b/mcon/U/d_NeWS.U
index e599713..1fb836b 100644
--- a/mcon/U/d_NeWS.U
+++ b/mcon/U/d_NeWS.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_NeWS.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_NeWS.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_NeWS.U,v $
@@ -62,6 +62,7 @@ fn=d
rp="Path to NeWS you want:"
. UU/getfile
d_newshome=$ans
+done
echo " "
if $test ! -d $d_newshome/lib; then
diff --git a/mcon/U/d_PORTAR.U b/mcon/U/d_PORTAR.U
index b7fb170..7e5a764 100644
--- a/mcon/U/d_PORTAR.U
+++ b/mcon/U/d_PORTAR.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_PORTAR.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_PORTAR.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_PORTAR.U,v $
diff --git a/mcon/U/d_SHM_MAC.U b/mcon/U/d_SHM_MAC.U
index 13dfce1..bcf30e2 100644
--- a/mcon/U/d_SHM_MAC.U
+++ b/mcon/U/d_SHM_MAC.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_SHM_MAC.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_SHM_MAC.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_SHM_MAC.U,v $
diff --git a/mcon/U/d_access.U b/mcon/U/d_access.U
index 991982f..56de296 100644
--- a/mcon/U/d_access.U
+++ b/mcon/U/d_access.U
@@ -1,18 +1,19 @@
-?RCS: $Id: d_access.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_access.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_access.U,v $
?RCS: Revision 3.0 1993/08/18 12:05:42 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_access: test +cc cat +cppflags h_fcntl h_sysfile rm Inlibc Findhdr
+?MAKE:d_access: test +cc cat +cppflags h_fcntl h_sysfile rm Trylink Findhdr \
+ i_unistd
?MAKE: -pick add $@ %<
?S:d_access:
?S: This variable conditionally defines HAS_ACCESS if the access() system
@@ -29,8 +30,21 @@
?LINT:set d_access
?LINT:change h_fcntl h_sysfile
: access call always available on UNIX
-set access d_access
-eval $inlibc
+$cat >try.c <<EOC
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static int ret;
+ ret |= access("path", 1);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=access
+set d_access
+eval $trylink
: locate the flags for 'access()'
case "$d_access" in
@@ -47,8 +61,13 @@ case "$d_access" in
#ifdef I_UNISTD
#include <unistd.h>
#endif
-int main() {
- exit(R_OK);
+int main(void) {
+ static int mode;
+ mode |= R_OK;
+ mode |= W_OK;
+ mode |= X_OK;
+ mode |= F_OK;
+ return mode ? 0 : 1;
}
EOCP
: check sys/file.h first, no particular reason here
diff --git a/mcon/U/d_alarm.U b/mcon/U/d_alarm.U
index 2cff381..830b2e2 100644
--- a/mcon/U/d_alarm.U
+++ b/mcon/U/d_alarm.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_alarm.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_alarm.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
@@ -14,7 +14,7 @@
?RCS: Revision 3.0.1.1 1994/08/29 16:06:58 ram
?RCS: patch32: created by ADO
?RCS:
-?MAKE:d_alarm: Inlibc
+?MAKE:d_alarm: Trylink cat i_unistd
?MAKE: -pick add $@ %<
?S:d_alarm:
?S: This variable conditionally defines the HAS_ALARM symbol, which
@@ -28,6 +28,19 @@
?H:.
?LINT:set d_alarm
: see if alarm exists
-set alarm d_alarm
-eval $inlibc
+$cat >try.c <<EOC
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static unsigned ret;
+ ret |= alarm(1);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=alarm
+set d_alarm
+eval $trylink
diff --git a/mcon/U/d_arc4random.U b/mcon/U/d_arc4random.U
new file mode 100644
index 0000000..d7ba6ec
--- /dev/null
+++ b/mcon/U/d_arc4random.U
@@ -0,0 +1,40 @@
+?RCS: $Id: d_arc4random.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_arc4random: Trylink cat i_stdlib
+?MAKE: -pick add $@ %<
+?S:d_arc4random:
+?S: This variable conditionally defines the HAS_ARC4RANDOM symbol, which
+?S: indicates to the C program that the arc4random() routine is available.
+?S:.
+?C:HAS_ARC4RANDOM:
+?C: This symbol, if defined, indicates that the arc4random routine is
+?C: available.
+?C:.
+?H:#$d_arc4random HAS_ARC4RANDOM /**/
+?H:.
+?LINT:set d_arc4random
+: see if arc4random exists
+$cat >try.c <<EOC
+#$i_stdlib I_STDLIB
+#ifdef I_STDLIB
+#include <stdlib.h>
+#endif
+int main(void)
+{
+ static unsigned long ret;
+ ret |= arc4random();
+ return 0 != ret;
+}
+EOC
+cyn=arc4random
+set d_arc4random
+eval $trylink
+
diff --git a/mcon/U/d_attribut.U b/mcon/U/d_attribut.U
index 18679fb..e98e1f7 100644
--- a/mcon/U/d_attribut.U
+++ b/mcon/U/d_attribut.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_attribut.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_attribut.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
@@ -20,7 +20,7 @@
?RCS: Revision 3.0.1.1 1994/10/29 16:08:55 ram
?RCS: patch36: created by ADO
?RCS:
-?MAKE:d_attribut: Myread Oldconfig cat cc ccflags rm Setvar contains
+?MAKE:d_attribut: Myread Oldconfig Trylink cat
?MAKE: -pick add $@ %<
?S:d_attribut (d_attrib):
?S: This variable conditionally defines HASATTRIBUTE, which
@@ -40,25 +40,12 @@
?LINT:set d_attribut
?LINT:known __attribute__
: Look for GNU-cc style attribute checking
-echo " "
-echo "Checking whether your compiler can handle __attribute__ ..." >&4
-$cat >attrib.c <<'EOCP'
+$cat >try.c <<'EOCP'
#include <stdio.h>
void croak (char* pat,...) __attribute__((format(printf,1,2),noreturn));
+int main(void) { return 0; }
EOCP
-if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then
- if $contains 'warning' attrib.out >/dev/null 2>&1; then
- echo "Your C compiler doesn't fully support __attribute__."
- val="$undef"
- else
- echo "Your C compiler supports __attribute__."
- val="$define"
- fi
-else
- echo "Your C compiler doesn't seem to understand __attribute__ at all."
- val="$undef"
-fi
+cyn="whether your compiler can handle __attribute__"
set d_attribut
-eval $setvar
-$rm -f attrib*
+eval $trylink
diff --git a/mcon/U/d_backtrace.U b/mcon/U/d_backtrace.U
new file mode 100644
index 0000000..afc8729
--- /dev/null
+++ b/mcon/U/d_backtrace.U
@@ -0,0 +1,45 @@
+?RCS: $Id: d_backtrace.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2011, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_semget.U,v $
+?RCS:
+?MAKE:d_backtrace: Trylink cat i_execinfo
+?MAKE: -pick add $@ %<
+?S:d_backtrace:
+?S: This variable conditionally defines the HAS_BACKTRACE symbol, which
+?S: indicates to the C program that the backtrace() routine is available
+?S: to get a stack trace.
+?S:.
+?C:HAS_BACKTRACE:
+?C: This symbol, if defined, indicates that the backtrace() routine is
+?C: available to get a stack trace. The <execinfo.h> header must be
+?C: included to use this routine.
+?C:.
+?H:#$d_backtrace HAS_BACKTRACE /**/
+?H:.
+?LINT:set d_backtrace
+: see if backtrace exists
+$cat >try.c <<EOC
+#$i_execinfo I_EXECINFO
+#ifdef I_EXECINFO
+#include <execinfo.h>
+#endif
+int main(void)
+{
+ void *buf[2];
+ static int ret;
+ ret |= backtrace(buf, 2);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=backtrace
+set d_backtrace
+eval $trylink
+
diff --git a/mcon/U/d_bcmp.U b/mcon/U/d_bcmp.U
index cb54367..f71f8e3 100644
--- a/mcon/U/d_bcmp.U
+++ b/mcon/U/d_bcmp.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_bcmp.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_bcmp.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_bcmp.U,v $
@@ -18,7 +18,7 @@
?RCS: Revision 3.0 1993/08/18 12:05:42 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_bcmp: Inlibc
+?MAKE:d_bcmp: Trylink cat
?MAKE: -pick add $@ %<
?S:d_bcmp:
?S: This variable conditionally defines the HAS_BCMP symbol if
@@ -39,6 +39,16 @@
?M:.
?LINT:set d_bcmp
: see if bcmp exists
-set bcmp d_bcmp
-eval $inlibc
+$cat >try.c <<EOC
+#include <strings.h>
+int main(void)
+{
+ static int a, b, ret;
+ ret |= bcmp(&a, &b, sizeof(a));
+ return ret ? 0 : 1;
+}
+EOC
+cyn=bcmp
+set d_bcmp
+eval $trylink
diff --git a/mcon/U/d_bcopy.U b/mcon/U/d_bcopy.U
index 4cbc2c0..c9ada58 100644
--- a/mcon/U/d_bcopy.U
+++ b/mcon/U/d_bcopy.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_bcopy.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_bcopy.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_bcopy.U,v $
@@ -18,7 +18,7 @@
?RCS: Revision 3.0 1993/08/18 12:05:44 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_bcopy: Inlibc
+?MAKE:d_bcopy: Trylink cat
?MAKE: -pick add $@ %<
?S:d_bcopy:
?S: This variable conditionally defines the HAS_BCOPY symbol if
@@ -39,6 +39,30 @@
?M:.
?LINT:set d_bcopy
: see if bcopy exists
-set bcopy d_bcopy
-eval $inlibc
+?X: Test is over-complex to avoid gcc optimizing bcopy() away.
+$cat >try.c <<EOC
+#include <strings.h>
+static void
+init_data(char *a, unsigned len)
+{
+ unsigned i;
+ for (i = 0; i < len; i++)
+ a[i] = i * 2 + 1;
+}
+static void
+recopy_data(char *src, char *dst, unsigned len)
+{
+ bcopy(&src[3], &dst[0], len - 3);
+}
+int main(void)
+{
+ static char src[20], dst[20];
+ init_data(src, sizeof src);
+ recopy_data(src, dst, sizeof src);
+ return dst[0] + dst[1];
+}
+EOC
+cyn=bcopy
+set d_bcopy
+eval $trylink
diff --git a/mcon/U/d_bfd_lib.U b/mcon/U/d_bfd_lib.U
new file mode 100644
index 0000000..cf21c45
--- /dev/null
+++ b/mcon/U/d_bfd_lib.U
@@ -0,0 +1,48 @@
+?RCS: $Id: d_dlopen.U 40 2010-11-27 20:54:48Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2012 Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_bfd_lib: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_bfd_lib:
+?S: This variable conditionally defines the HAS_BFD_LIBRARY symbol, which
+?S: indicates to the C program that the BFD library is available.
+?S:.
+?C:HAS_BFD_LIBRARY :
+?C: This symbol, if defined, indicates that the BFD library is available
+?C: to inspect symbols and debugging information. You can safely include
+?C: the <bfd.h> file when this symbol is defined, making sure to define
+?C: the PACKAGE and PACKAGE_VERSION symbols, just in case we're facing
+?C: binutils 2.23 or higher.
+?C:.
+?H:#$d_bfd_lib HAS_BFD_LIBRARY /**/
+?H:.
+?LINT:set d_bfd_lib
+: see whether the bfd library is available
+$cat >try.c <<EOC
+?X: Starting with binutils 2.23, it is necessary to define some symbols before
+?X: including <bfd.h>, or the file does not compile properly. Do it blindly
+?X: since we do not want to bother with the actual version of the file.
+?X: This is a BFD library bug, as reported in:
+?X: https://sourceware.org/bugzilla/show_bug.cgi?id=15920
+#define PACKAGE
+#define PACKAGE_VERSION
+#include <bfd.h>
+int main(void)
+{
+ bfd *b;
+ b = bfd_openr("file", 0);
+ return b ? 0 : 1;
+}
+EOC
+cyn="whether the BFD library is available"
+set d_bfd_lib '-lbfd -lintl -liberty' '-lbfd -liberty' '-lbfd -liberty -lz' \
+ '-lbfd -lintl -liberty -lz' '-lbfd -lz' '-lbfd -lintl -lz'
+eval $trylink
+
diff --git a/mcon/U/d_bindtxtcode.U b/mcon/U/d_bindtxtcode.U
new file mode 100644
index 0000000..2072dec
--- /dev/null
+++ b/mcon/U/d_bindtxtcode.U
@@ -0,0 +1,38 @@
+?RCS: $Id: d_bindtxtcode.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_bindtxtcode: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_bindtxtcode:
+?S: This variable conditionally defines the HAS_BIND_TEXTDOMAIN_CODESET symbol,
+?S: which indicates to the C program that the bind_textdomain_codeset()
+?S: routine is available.
+?S:.
+?C:HAS_BIND_TEXTDOMAIN_CODESET:
+?C: This symbol, if defined, indicates that the bind_textdomain_codeset routine
+?C: is available.
+?C:.
+?H:#$d_bindtxtcode HAS_BIND_TEXTDOMAIN_CODESET /**/
+?H:.
+?LINT:set d_bindtxtcode
+: see if bind_textdomain_codeset exists
+$cat >try.c <<EOC
+#include <libintl.h>
+int main(void)
+{
+ static char ret;
+ ret |= *bind_textdomain_codeset("domain", "codeset");
+ return ret ? 0 : 1;
+}
+EOC
+cyn=bind_textdomain_codeset
+set d_bindtxtcode '-lintl'
+eval $trylink
+
diff --git a/mcon/U/d_brokstat.U b/mcon/U/d_brokstat.U
index d8917b3..e0c82b5 100644
--- a/mcon/U/d_brokstat.U
+++ b/mcon/U/d_brokstat.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_brokstat.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_brokstat.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_brokstat.U,v $
@@ -33,7 +33,7 @@
: are stat macros sane?
echo " "
echo "Checking whether your stat() macros are broken..."
-$cat >try.c <<'EOC'
+$cat >try.c <<EOC
#include <sys/types.h>
#include <sys/stat.h>
diff --git a/mcon/U/d_bsdjmp.U b/mcon/U/d_bsdjmp.U
index 5da07eb..ec11cf9 100644
--- a/mcon/U/d_bsdjmp.U
+++ b/mcon/U/d_bsdjmp.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_bsdjmp.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_bsdjmp.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_bsdjmp.U,v $
@@ -35,7 +35,6 @@
?F:!set
?LINT:set d_bsdjmp
: see if _setjmp and _longjmp exists
-?X: We can't check for these symbols with Inlibc because of the leading "_"
echo " "
case "$d_bsdjmp" in
'')
diff --git a/mcon/U/d_built_bswap32.U b/mcon/U/d_built_bswap32.U
new file mode 100644
index 0000000..0f22396
--- /dev/null
+++ b/mcon/U/d_built_bswap32.U
@@ -0,0 +1,35 @@
+?RCS:
+?RCS: Copyright (c) 2013 Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_built_bswap32: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_built_bswap32:
+?S: This variable conditionally defines the HAS_BUILTIN_BSWAP32 symbol, which
+?S: indicates to the C program that __builtin_bswap32 is available.
+?S:.
+?C:HAS_BUILTIN_BSWAP32:
+?C: This symbol, if defined, indicates that __builtin_bswap32 routine is
+?C: available to byte-swap a 32-bit value (little <-> big endian).
+?C:.
+?H:#$d_built_bswap32 HAS_BUILTIN_BSWAP32 /**/
+?H:.
+?LINT:set d_built_bswap32
+: check for __builtin_bswap32
+$cat >try.c <<EOC
+int main(void)
+{
+ static int ret;
+ ret |= __builtin_bswap32(127);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=__builtin_bswap32
+set d_built_bswap32
+eval $trylink
+
diff --git a/mcon/U/d_built_bswap64.U b/mcon/U/d_built_bswap64.U
new file mode 100644
index 0000000..6379502
--- /dev/null
+++ b/mcon/U/d_built_bswap64.U
@@ -0,0 +1,35 @@
+?RCS:
+?RCS: Copyright (c) 2013 Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_built_bswap64: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_built_bswap64:
+?S: This variable conditionally defines the HAS_BUILTIN_BSWAP64 symbol, which
+?S: indicates to the C program that __builtin_bswap64 is available.
+?S:.
+?C:HAS_BUILTIN_BSWAP64:
+?C: This symbol, if defined, indicates that __builtin_bswap64 routine is
+?C: available to byte-swap a 64-bit value (little <-> big endian).
+?C:.
+?H:#$d_built_bswap64 HAS_BUILTIN_BSWAP64 /**/
+?H:.
+?LINT:set d_built_bswap64
+: check for __builtin_bswap64
+$cat >try.c <<EOC
+int main(void)
+{
+ static int ret;
+ ret |= __builtin_bswap64(127);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=__builtin_bswap64
+set d_built_bswap64
+eval $trylink
+
diff --git a/mcon/U/d_built_clz.U b/mcon/U/d_built_clz.U
new file mode 100644
index 0000000..747f2a3
--- /dev/null
+++ b/mcon/U/d_built_clz.U
@@ -0,0 +1,37 @@
+?RCS: $Id: d_built_clz.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2012 Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_built_clz: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_built_clz:
+?S: This variable conditionally defines the HAS_BUILTIN_CLZ symbol, which
+?S: indicates to the C program that __builtin_clz is available to count
+?S: leading zeroes.
+?S:.
+?C:HAS_BUILTIN_CLZ:
+?C: This symbol, if defined, indicates that the __builtin_clz routine is
+?C: available to count leading zeroes in a word.
+?C:.
+?H:#$d_built_clz HAS_BUILTIN_CLZ /**/
+?H:.
+?LINT:set d_built_clz
+: check for __builtin_clz
+$cat >try.c <<EOC
+int main(void)
+{
+ static int ret;
+ ret |= __builtin_clz(127);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=__builtin_clz
+set d_built_clz
+eval $trylink
+
diff --git a/mcon/U/d_built_ctz.U b/mcon/U/d_built_ctz.U
new file mode 100644
index 0000000..f955cd1
--- /dev/null
+++ b/mcon/U/d_built_ctz.U
@@ -0,0 +1,37 @@
+?RCS: $Id: d_built_ctz.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2012 Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_built_ctz: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_built_ctz:
+?S: This variable conditionally defines the HAS_BUILTIN_CTZ symbol, which
+?S: indicates to the C program that __builtin_ctz is available to count
+?S: trailing zeroes.
+?S:.
+?C:HAS_BUILTIN_CTZ:
+?C: This symbol, if defined, indicates that __builtin_ctz routine is
+?C: available to count trailing zeroes in a word.
+?C:.
+?H:#$d_built_ctz HAS_BUILTIN_CTZ /**/
+?H:.
+?LINT:set d_built_ctz
+: check for __builtin_ctz
+$cat >try.c <<EOC
+int main(void)
+{
+ static int ret;
+ ret |= __builtin_ctz(127);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=__builtin_ctz
+set d_built_ctz
+eval $trylink
+
diff --git a/mcon/U/d_built_memcmp.U b/mcon/U/d_built_memcmp.U
new file mode 100644
index 0000000..0853eaa
--- /dev/null
+++ b/mcon/U/d_built_memcmp.U
@@ -0,0 +1,37 @@
+?RCS: $Id: d_built_memcmp.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2011, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_built_memcmp: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_built_memcmp:
+?S: This variable conditionally defines the HAS_BUILTIN_MEMCMP symbol, which
+?S: indicates to the C program that __builtin_memcmp is available.
+?S:.
+?C:HAS_BUILTIN_MEMCMP:
+?C: This symbol, if defined, indicates that __builtin_memcmp routine is
+?C: available to compare memory buffers.
+?C:.
+?H:#$d_built_memcmp HAS_BUILTIN_MEMCMP /**/
+?H:.
+?LINT:set d_built_memcmp
+: check for __builtin_memcmp
+$cat >try.c <<EOC
+int main(void)
+{
+ static int ret;
+ char a[5], b[5];
+ ret |= __builtin_memcmp(a, b, 5);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=__builtin_memcmp
+set d_built_memcmp
+eval $trylink
+
diff --git a/mcon/U/d_built_popcount.U b/mcon/U/d_built_popcount.U
new file mode 100644
index 0000000..fd1ef2b
--- /dev/null
+++ b/mcon/U/d_built_popcount.U
@@ -0,0 +1,36 @@
+?RCS: $Id: d_built_popcount.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_built_popcount: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_built_popcount:
+?S: This variable conditionally defines the HAS_BUILTIN_POPCOUNT symbol, which
+?S: indicates to the C program that __builtin_popcount is available.
+?S:.
+?C:HAS_BUILTIN_POPCOUNT:
+?C: This symbol, if defined, indicates that __builtin_popcount routine is
+?C: available to compute the amount of '1' bits in a word.
+?C:.
+?H:#$d_built_popcount HAS_BUILTIN_POPCOUNT /**/
+?H:.
+?LINT:set d_built_popcount
+: check for __builtin_popcount
+$cat >try.c <<EOC
+int main(void)
+{
+ static int ret;
+ ret |= __builtin_popcount(127);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=__builtin_popcount
+set d_built_popcount
+eval $trylink
+
diff --git a/mcon/U/d_byacc.U b/mcon/U/d_byacc.U
index 4449df0..88bc651 100644
--- a/mcon/U/d_byacc.U
+++ b/mcon/U/d_byacc.U
@@ -1,12 +1,12 @@
-?RCS: $Id: d_byacc.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_byacc.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1996, Andy Dougherty
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_byacc.U,v $
diff --git a/mcon/U/d_bzero.U b/mcon/U/d_bzero.U
index b5b4557..ba9d9f0 100644
--- a/mcon/U/d_bzero.U
+++ b/mcon/U/d_bzero.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_bzero.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_bzero.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_bzero.U,v $
@@ -18,7 +18,7 @@
?RCS: Revision 3.0 1993/08/18 12:05:46 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_bzero: Inlibc
+?MAKE:d_bzero: Trylink cat
?MAKE: -pick add $@ %<
?S:d_bzero:
?S: This variable conditionally defines the HAS_BZERO symbol if
@@ -39,6 +39,16 @@
?M:.
?LINT:set d_bzero
: see if bzero exists
-set bzero d_bzero
-eval $inlibc
+$cat >try.c <<EOC
+#include <strings.h>
+int main(void)
+{
+ static int dst;
+ bzero(&dst, sizeof(dst));
+ return 0;
+}
+EOC
+cyn=bzero
+set d_bzero
+eval $trylink
diff --git a/mcon/U/d_casti32.U b/mcon/U/d_casti32.U
index 7840281..268393c 100644
--- a/mcon/U/d_casti32.U
+++ b/mcon/U/d_casti32.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_casti32.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_casti32.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
diff --git a/mcon/U/d_castneg.U b/mcon/U/d_castneg.U
index 30095a6..77ce40a 100644
--- a/mcon/U/d_castneg.U
+++ b/mcon/U/d_castneg.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_castneg.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_castneg.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_castneg.U,v $
diff --git a/mcon/U/d_cbrt.U b/mcon/U/d_cbrt.U
index 4ed7398..66014e2 100644
--- a/mcon/U/d_cbrt.U
+++ b/mcon/U/d_cbrt.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_cbrt.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_cbrt.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_cbrt.U,v $
?RCS: Revision 3.0 1993/08/18 12:05:48 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_cbrt: Inlibc
+?MAKE:d_cbrt: Trylink cat
?MAKE: -pick add $@ %<
?S:d_cbrt:
?S: This variable conditionally defines the CBRT symbol, which
@@ -27,6 +27,16 @@
?H:.
?LINT:set d_cbrt
: see if cbrt exists
-set cbrt d_cbrt
-eval $inlibc
+$cat >try.c <<EOC
+#include <math.h>
+int main(void)
+{
+ static double x, ret;
+ ret = 1.0 * cbrt(x);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=cbrt
+set d_cbrt '-lm'
+eval $trylink
diff --git a/mcon/U/d_charsprf.U b/mcon/U/d_charsprf.U
index 62d7612..a2bd013 100644
--- a/mcon/U/d_charsprf.U
+++ b/mcon/U/d_charsprf.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_charsprf.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_charsprf.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_charsprf.U,v $
diff --git a/mcon/U/d_chown.U b/mcon/U/d_chown.U
index ba3ad4b..78c8003 100644
--- a/mcon/U/d_chown.U
+++ b/mcon/U/d_chown.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_chown.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_chown.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
@@ -14,7 +14,7 @@
?RCS: Revision 3.0.1.1 1994/08/29 16:07:14 ram
?RCS: patch32: created by ADO
?RCS:
-?MAKE:d_chown: Inlibc
+?MAKE:d_chown: Trylink cat i_unistd
?MAKE: -pick add $@ %<
?S:d_chown:
?S: This variable conditionally defines the HAS_CHOWN symbol, which
@@ -28,6 +28,22 @@
?H:.
?LINT:set d_chown
: see if chown exists
-set chown d_chown
-eval $inlibc
+$cat >try.c <<EOC
+#include <sys/types.h>
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static uid_t uid;
+ static gid_t gid;
+ static int ret;
+ ret |= chown("path", uid, gid);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=chown
+set d_chown
+eval $trylink
diff --git a/mcon/U/d_chroot.U b/mcon/U/d_chroot.U
index 39bd5af..838b6ad 100644
--- a/mcon/U/d_chroot.U
+++ b/mcon/U/d_chroot.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_chroot.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_chroot.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
@@ -14,7 +14,7 @@
?RCS: Revision 3.0.1.1 1994/08/29 16:07:17 ram
?RCS: patch32: created by ADO
?RCS:
-?MAKE:d_chroot: Inlibc
+?MAKE:d_chroot: Trylink cat i_unistd
?MAKE: -pick add $@ %<
?S:d_chroot:
?S: This variable conditionally defines the HAS_CHROOT symbol, which
@@ -28,6 +28,19 @@
?H:.
?LINT:set d_chroot
: see if chroot exists
-set chroot d_chroot
-eval $inlibc
+$cat >try.c <<EOC
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static int ret;
+ ret |= chroot("path");
+ return ret ? 0 : 1;
+}
+EOC
+cyn=chroot
+set d_chroot
+eval $trylink
diff --git a/mcon/U/d_chsize.U b/mcon/U/d_chsize.U
index c39c4ed..f56abfa 100644
--- a/mcon/U/d_chsize.U
+++ b/mcon/U/d_chsize.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_chsize.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_chsize.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_chsize.U,v $
?RCS: Revision 3.0 1993/08/18 12:05:50 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_chsize: Inlibc
+?MAKE:d_chsize: Trylink cat
?MAKE: -pick add $@ %<
?S:d_chsize:
?S: This variable conditionally defines the CHSIZE symbol, which
@@ -27,6 +27,16 @@
?H:.
?LINT:set d_chsize
: see if chsize exists
-set chsize d_chsize
-eval $inlibc
+$cat >try.c <<EOC
+int main(void)
+{
+ static int fd, ret;
+ static long size;
+ ret |= chsize(fd, size);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=chsize
+set d_chsize
+eval $trylink
diff --git a/mcon/U/d_ckeypad.U b/mcon/U/d_ckeypad.U
index adaaf6d..82e89db 100644
--- a/mcon/U/d_ckeypad.U
+++ b/mcon/U/d_ckeypad.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_ckeypad.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_ckeypad.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_ckeypad.U,v $
@@ -26,12 +26,13 @@
?H:#$d_ckeypad HAS_CURSES_KEYPAD /**/
?H:.
?LINT:set d_ckeypad
-: check for the "keypad()" function in the curses library
+: check for the "keypad" function in the curses library
echo " "
case "$termlib" in
'')
echo "You don't have a curses library, so I won't waste time looking" >&4
echo "to see if has the keypad() function." >&4
+ ;;
*)
echo "Checking the curses library ($termlib) for the keypad() function..." >&4
$cat >c_keypad.c <<'EOCP'
@@ -48,6 +49,7 @@ EOCP
val=$undef
echo "Your curses library doesn't appear to have the keypad() function."
fi
+ ;;
esac
set d_ckeypad
eval $setvar
diff --git a/mcon/U/d_clock_getres.U b/mcon/U/d_clock_getres.U
new file mode 100644
index 0000000..6fd0216
--- /dev/null
+++ b/mcon/U/d_clock_getres.U
@@ -0,0 +1,38 @@
+?RCS:
+?RCS: Copyright (c) 2014 Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_clock_getres: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_clock_getres:
+?S: This variable conditionally defines HAS_CLOCK_GETRES when clock_getres() is
+?S: available to fetch the granularity of the available clock.
+?S:.
+?C:HAS_CLOCK_GETRES:
+?C: This symbol, if defined, indicates that the clock_getres() system call is
+?C: available to fetch the granularity of available clock (CLOCK_REALTIME is
+?C: a valid clock when the symbol is defined).
+?C:.
+?H:#$d_clock_getres HAS_CLOCK_GETRES /**/
+?H:.
+?LINT:set d_clock_getres
+: see whether clock_getres exists
+$cat >try.c <<EOC
+#include <time.h>
+int main(void)
+{
+ int ret;
+ struct timespec res;
+ ret = clock_getres(CLOCK_REALTIME, &res);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=clock_getres
+set d_clock_getres
+eval $trylink
+
diff --git a/mcon/U/d_clock_gettime.U b/mcon/U/d_clock_gettime.U
new file mode 100644
index 0000000..ab5cab4
--- /dev/null
+++ b/mcon/U/d_clock_gettime.U
@@ -0,0 +1,38 @@
+?RCS:
+?RCS: Copyright (c) 2014 Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_clock_gettime: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_clock_gettime:
+?S: This variable conditionally defines HAS_CLOCK_GETTIME when clock_gettime()
+?S: is available to fetch the clock.
+?S:.
+?C:HAS_CLOCK_GETTIME:
+?C: This symbol, if defined, indicates that the clock_gettime() system call is
+?C: available to fetch the clock (CLOCK_REALTIME is a valid clock when the
+?C: symbol is defined).
+?C:.
+?H:#$d_clock_gettime HAS_CLOCK_GETTIME /**/
+?H:.
+?LINT:set d_clock_gettime
+: see whether clock_gettime exists
+$cat >try.c <<EOC
+#include <time.h>
+int main(void)
+{
+ int ret;
+ struct timespec tp;
+ ret = clock_gettime(CLOCK_REALTIME, &tp);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=clock_gettime
+set d_clock_gettime
+eval $trylink
+
diff --git a/mcon/U/d_closedir.U b/mcon/U/d_closedir.U
index 24aabed..a8e070e 100644
--- a/mcon/U/d_closedir.U
+++ b/mcon/U/d_closedir.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_closedir.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_closedir.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
@@ -20,7 +20,7 @@
?RCS: Revision 3.0.1.1 1994/08/29 16:07:21 ram
?RCS: patch32: created by ADO
?RCS:
-?MAKE:d_closedir d_void_closedir: Inlibc i_dirent i_sysdir i_sysndir \
+?MAKE:d_closedir d_void_closedir: Trylink cat i_dirent i_sysdir i_sysndir \
cc ccflags ldflags libs Setvar rm
?MAKE: -pick add $@ %<
?S:d_closedir:
@@ -46,8 +46,22 @@
?F:!closedir
?LINT:set d_closedir d_void_closedir
: see if closedir exists
-set closedir d_closedir
-eval $inlibc
+$cat >try.c <<EOC
+#$i_dirent I_DIRENT
+#ifdef I_DIRENT
+#include <dirent.h>
+#endif
+int main(void)
+{
+ static DIR *dir;
+ dir = opendir("path");
+ closedir(dir);
+ return 0;
+}
+EOC
+cyn=closedir
+set d_closedir
+eval $trylink
@if VOID_CLOSEDIR || d_void_closedir
?X: The following contortions are designed so we can call closedir()
@@ -84,7 +98,7 @@ case "$d_closedir" in
#endif
int main() { return closedir(opendir(".")); }
EOM
- if $cc $ccflags $ldflags -o closedir closedir.c $libs > /dev/null 2>&1; then
+ if $cc $ccflags -o closedir closedir.c $ldflags $libs > /dev/null 2>&1; then
if ./closedir > /dev/null 2>&1 ; then
echo "Yes, it does."
val="$undef"
diff --git a/mcon/U/d_closefrom.U b/mcon/U/d_closefrom.U
new file mode 100644
index 0000000..ce17bd7
--- /dev/null
+++ b/mcon/U/d_closefrom.U
@@ -0,0 +1,45 @@
+?RCS: $Id: d_closefrom.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_closefrom: Trylink cat i_unistd
+?MAKE: -pick add $@ %<
+?S:d_closefrom:
+?S: This variable conditionally defines the HAS_CLOSEFROM symbol, which
+?S: indicates to the C program that closefrom() support is available.
+?S:.
+?C:HAS_CLOSEFROM:
+?C: This symbol is defined when closefrom() can be used.
+?C:.
+?H:#$d_closefrom HAS_CLOSEFROM
+?H:.
+?LINT: set d_closefrom
+: can we use closefrom?
+$cat >try.c <<EOC
+#include <sys/types.h>
+#include <stdlib.h>
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static const int fd = 1;
+ /*
+ * On Solaris it returns nothing
+ * On NetBSD it's equivalent to fcntl(fd, F_CLOSEM)
+ */
+ closefrom(fd);
+ return 0;
+}
+EOC
+cyn=closefrom
+set d_closefrom
+eval $trylink
+
diff --git a/mcon/U/d_const.U b/mcon/U/d_const.U
index 7b864e7..3281c29 100644
--- a/mcon/U/d_const.U
+++ b/mcon/U/d_const.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_const.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_const.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_const.U,v $
@@ -47,13 +47,16 @@ $cat >const.c <<'EOCP'
?X: handle typedefs properly if they're declared const. To guard
?X: against this, boost up the test by using an explicit typedef...
typedef struct spug { int drokk; } spug;
-int main()
+int main(void)
{
- const char *foo;
- const spug y;
+ static const char *foo;
+ static const spug y;
+ (void) foo;
+ (void) y;
+ return 0;
}
EOCP
-if $cc -c $ccflags const.c >/dev/null 2>&1 ; then
+if $cc -c $ccflags const.c; then
val="$define"
echo "Yup, it does."
else
diff --git a/mcon/U/d_crypt.U b/mcon/U/d_crypt.U
index 52b2741..9b55037 100644
--- a/mcon/U/d_crypt.U
+++ b/mcon/U/d_crypt.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_crypt.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_crypt.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_crypt.U,v $
@@ -15,7 +15,7 @@
?RCS: Revision 3.0 1993/08/18 12:05:52 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_crypt cryptlib: Loc test xlibpth libpth Csym Setvar _a Inlibc
+?MAKE:d_crypt cryptlib: Loc test xlibpth libpth Setvar _a Trylink cat i_unistd
?MAKE: -pick add $@ %<
?S:d_crypt:
?S: This variable conditionally defines the CRYPT symbol, which
@@ -36,41 +36,47 @@
?LINT:set d_crypt
?T:val
: see if crypt exists
-echo " "
-set crypt d_crypt
-eval $inlibc
+$cat >try.c <<EOC
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static char ret;
+ ret |= *crypt("key", "salt");
+ return ret ? 0 : 1;
+}
+EOC
+cyn=crypt
+set d_crypt -lcrypt
+eval $trylink
+
case "$d_crypt" in
-$define) cryptlib='' ;;
-*) if set crypt val -f d_crypt; eval $csym; $val; then
- echo 'crypt() found.' >&4
- val="$define"
- cryptlib=''
+$define) cryptlib='';;
+*)
+ cryptlib=`./loc Slibcrypt$_a "" $xlibpth`
+ if $test -z "$cryptlib"; then
+ cryptlib=`./loc Mlibcrypt$_a "" $xlibpth`
else
- cryptlib=`./loc Slibcrypt$_a "" $xlibpth`
- if $test -z "$cryptlib"; then
- cryptlib=`./loc Mlibcrypt$_a "" $xlibpth`
- else
- cryptlib=-lcrypt
- fi
- if $test -z "$cryptlib"; then
- cryptlib=`./loc Llibcrypt$_a "" $xlibpth`
- else
- cryptlib=-lcrypt
- fi
- if $test -z "$cryptlib"; then
- cryptlib=`./loc libcrypt$_a "" $libpth`
- else
- cryptlib=-lcrypt
- fi
- if $test -z "$cryptlib"; then
- echo 'crypt() NOT found.' >&4
- val="$undef"
- else
- val="$define"
- fi
+ cryptlib=-lcrypt
+ fi
+ if $test -z "$cryptlib"; then
+ cryptlib=`./loc Llibcrypt$_a "" $xlibpth`
+ else
+ cryptlib=-lcrypt
+ fi
+ if $test -z "$cryptlib"; then
+ cryptlib=`./loc libcrypt$_a "" $libpth`
+ else
+ cryptlib=-lcrypt
+ fi
+ if $test -z "$cryptlib"; then
+ echo 'crypt() NOT found.' >&4
+ val="$undef"
+ else
+ val="$define"
fi
- set d_crypt
- eval $setvar
- ;;
+;;
esac
diff --git a/mcon/U/d_csh.U b/mcon/U/d_csh.U
index 8c2252c..87ea392 100644
--- a/mcon/U/d_csh.U
+++ b/mcon/U/d_csh.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_csh.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_csh.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_csh.U,v $
diff --git a/mcon/U/d_ctermid.U b/mcon/U/d_ctermid.U
index 676f77f..e70ae4a 100644
--- a/mcon/U/d_ctermid.U
+++ b/mcon/U/d_ctermid.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_ctermid.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_ctermid.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_ctermid.U,v $
?RCS: Revision 3.0 1993/08/18 12:05:54 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_ctermid: Inlibc
+?MAKE:d_ctermid: Trylink cat
?MAKE: -pick add $@ %<
?S:d_ctermid:
?S: This variable conditionally defines CTERMID if ctermid() is
@@ -26,6 +26,16 @@
?H:.
?LINT:set d_ctermid
: see if ctermid exists
-set ctermid d_ctermid
-eval $inlibc
+$cat >try.c <<EOC
+#include <stdio.h>
+int main(void)
+{
+ static char term[L_ctermid], ret;
+ ret |= *ctermid(term);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=ctermid
+set d_ctermid
+eval $trylink
diff --git a/mcon/U/d_cuserid.U b/mcon/U/d_cuserid.U
index 4794369..5fe1979 100644
--- a/mcon/U/d_cuserid.U
+++ b/mcon/U/d_cuserid.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_cuserid.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_cuserid.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
@@ -14,7 +14,7 @@
?RCS: Revision 3.0.1.1 1994/08/29 16:07:25 ram
?RCS: patch32: created by ADO
?RCS:
-?MAKE:d_cuserid: Inlibc
+?MAKE:d_cuserid: Trylink cat
?MAKE: -pick add $@ %<
?S:d_cuserid:
?S: This variable conditionally defines the HAS_CUSERID symbol, which
@@ -29,6 +29,16 @@
?H:.
?LINT:set d_cuserid
: see if cuserid exists
-set cuserid d_cuserid
-eval $inlibc
+$cat >try.c <<EOC
+#include <stdio.h>
+int main(void)
+{
+ static char user[L_cuserid], ret;
+ ret |= *cuserid(user);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=cuserid
+set d_cuserid
+eval $trylink
diff --git a/mcon/U/d_datastart_symbol.U b/mcon/U/d_datastart_symbol.U
new file mode 100644
index 0000000..252d3ea
--- /dev/null
+++ b/mcon/U/d_datastart_symbol.U
@@ -0,0 +1,64 @@
+?RCS: $Id: d_datastart_symbol.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2011, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_datastart_symbol d_weak_datastart_symbol: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_datastart_symbol:
+?S: This variable conditionally defines HAS_DATA_START_SYMBOL if the
+?S: linker-defined symbol "__data_start" is available to compute the start
+?S: address of the program's data segment.
+?S:.
+?S:d_weak_datastart_symbol:
+?S: This variable conditionally defines HAS_WEAK_DATA_START_SYMBOL if the
+?S: linker-defined symbol "data_start" is weakly defined to compute the start
+?S: address of the program's data segment.
+?S:.
+?C:HAS_DATA_START_SYMBOL:
+?C: This symbol, if defined, indicates that the C program can declare
+?C: extern const int __data_start;
+?C: and then use &__data_start to know the start of the data segment.
+?C:.
+?C:HAS_WEAK_DATA_START_SYMBOL:
+?C: This symbol, if defined, indicates that the C program can declare
+?C: #pragma weak data_start
+?C: extern const int data_start;
+?C: and then use &data_start to know the start of the data segment.
+?C:.
+?H:#$d_datastart_symbol HAS_DATA_START_SYMBOL /**/
+?H:#$d_weak_datastart_symbol HAS_WEAK_DATA_START_SYMBOL /**/
+?H:.
+?LINT:set d_datastart_symbol d_weak_datastart_symbol
+: see if the __data_start symbol exists
+$cat >try.c <<EOC
+int main(void)
+{
+ extern int __data_start;
+ return (int) &__data_start >> 12;
+}
+EOC
+cyn="whether your linker defines the __data_start symbol"
+set d_datastart_symbol
+eval $trylink
+
+@if d_weak_datastart_symbol || HAS_WEAK_DATA_START_SYMBOL
+: see if the weak data_start symbol exists
+$cat >try.c <<EOC
+int main(void)
+{
+#pragma weak data_start
+ extern int data_start;
+ return (int) &data_start >> 12;
+}
+EOC
+cyn="whether your linker defines the weak data_start symbol"
+set d_weak_datastart_symbol
+eval $trylink
+
+@end
diff --git a/mcon/U/d_dbl_dig.U b/mcon/U/d_dbl_dig.U
index f58393b..f240088 100644
--- a/mcon/U/d_dbl_dig.U
+++ b/mcon/U/d_dbl_dig.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_dbl_dig.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_dbl_dig.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
@@ -28,7 +28,7 @@
?C: of significant digits in a double precision number. If this
?C: symbol is not defined, a guess of 15 is usually pretty good.
?C:.
-?H:#$d_dbl_dig HAS_DBL_DIG /* */
+?H:#$d_dbl_dig HAS_DBL_DIG /**/
?H:.
?F:!dbl_dig.c
?LINT:set d_dbl_dig
diff --git a/mcon/U/d_debugging.U b/mcon/U/d_debugging.U
index 844495c..cc88aa9 100644
--- a/mcon/U/d_debugging.U
+++ b/mcon/U/d_debugging.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_debugging.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_debugging.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?MAKE:d_debugging: Myread Setvar spackage cat
diff --git a/mcon/U/d_deflate.U b/mcon/U/d_deflate.U
new file mode 100644
index 0000000..11f99b5
--- /dev/null
+++ b/mcon/U/d_deflate.U
@@ -0,0 +1,42 @@
+?RCS: $Id: d_deflate.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_deflate: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_deflate:
+?S: This variable conditionally defines the HAS_DEFLATE symbol, which
+?S: indicates to the C program that the deflate() routine from zlib is
+?S: available.
+?S:.
+?C:HAS_DEFLATE:
+?C: This symbol, if defined, indicates that the zlib deflate() routine is
+?C: available.
+?C:.
+?H:#$d_deflate HAS_DEFLATE /**/
+?H:.
+?LINT:set d_deflate
+: see if deflate exists
+$cat >try.c <<EOC
+#include <zlib.h>
+int main(void)
+{
+ static int ret, flush;
+ static z_stream zs;
+ flush |= Z_FULL_FLUSH;
+ flush |= Z_SYNC_FLUSH;
+ flush |= Z_FINISH;
+ ret |= deflate(&zs, flush);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=deflate
+set d_deflate '-lz'
+eval $trylink
+
diff --git a/mcon/U/d_devpoll.U b/mcon/U/d_devpoll.U
new file mode 100644
index 0000000..f5c1da5
--- /dev/null
+++ b/mcon/U/d_devpoll.U
@@ -0,0 +1,52 @@
+?RCS: $Id: d_devpoll.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_dev_poll: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_dev_poll:
+?S: This variable conditionally defines the HAS_DEV_POLL symbol, which
+?S: indicates to the C program that /dev/poll support is available.
+?S:.
+?C:HAS_DEV_POLL:
+?C: This symbol is defined when /dev/poll can be used.
+?C:.
+?H:#$d_dev_poll HAS_DEV_POLL
+?H:.
+?LINT: set d_dev_poll
+: can we use /dev/poll?
+$cat >try.c <<EOC
+#include <poll.h>
+#include <stropts.h>
+#include <sys/devpoll.h>
+int main(void)
+{
+ static struct pollfd pfd;
+ static struct dvpoll dvp;
+ static int ret;
+ pfd.fd |= 1;
+ pfd.events |= POLLIN;
+ pfd.events |= POLLPRI;
+ pfd.events |= POLLOUT;
+ pfd.events |= POLLHUP;
+ pfd.events |= POLLERR;
+ pfd.events |= POLLNVAL;
+ pfd.events |= POLLREMOVE;
+ pfd.revents |= 1;
+ dvp.dp_timeout |= 1;
+ dvp.dp_nfds |= 1;
+ dvp.dp_fds = &pfd;
+ ret |= ioctl(1, DP_POLL, &dvp);
+ return 0 != ret;
+}
+EOC
+cyn="whether /dev/poll can be used"
+set d_dev_poll
+eval $trylink
+
diff --git a/mcon/U/d_difftime.U b/mcon/U/d_difftime.U
index c456c8f..34e9430 100644
--- a/mcon/U/d_difftime.U
+++ b/mcon/U/d_difftime.U
@@ -1,33 +1,80 @@
-?RCS: $Id: d_difftime.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_difftime.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
-?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, 2013 Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
?RCS:
-?RCS: $Log: d_difftime.U,v $
-?RCS: Revision 3.0.1.1 1994/08/29 16:07:31 ram
-?RCS: patch32: created by ADO
-?RCS:
-?MAKE:d_difftime: Inlibc
+?MAKE:d_difftime use_difftime: Assert Trylink cat
?MAKE: -pick add $@ %<
?S:d_difftime:
?S: This variable conditionally defines the HAS_DIFFTIME symbol, which
?S: indicates to the C program that the difftime() routine is available.
?S:.
+?S:use_difftime:
+?S: This variable conditionally defines the USE_DIFFTIME symbol, which
+?S: indicates to the C program that the difftime() routine should be
+?S: used to compare times.
+?S:.
?C:HAS_DIFFTIME :
?C: This symbol, if defined, indicates that the difftime routine is
?C: available.
?C:.
+?C:USE_DIFFTIME :
+?C: This symbol, if defined, indicates that the difftime routine should
+?C: really be used to compare times.
+?C:.
?H:#$d_difftime HAS_DIFFTIME /**/
+?H:#$use_difftime USE_DIFFTIME /**/
?H:.
-?LINT:set d_difftime
+?LINT:set d_difftime use_difftime
+?T:avoid_difftime
: see if difftime exists
-set difftime d_difftime
-eval $inlibc
+$cat >try.c <<EOC
+#include <time.h>
+int main(void)
+{
+ static double ret;
+ static time_t t0, t1;
+ ret = difftime(t1, t0) * 1.0;
+ return ret ? 0 : 1;
+}
+EOC
+cyn=difftime
+set d_difftime
+eval $trylink
+
+@if USE_DIFFTIME || use_difftime
+: see whether difftime should be used
+case "$d_difftime" in
+"$define")
+ $cat >try.c <<EOC
+#include "static_assert.h"
+#include <time.h>
+int main(void)
+{
+?X: If time_t is not a signed integer type, we cannot calculate properly
+?X: with the raw values. Define USE_DIFFTIME when this does not compile.
+ STATIC_ASSERT((time_t) -1 < 0);
+ return 0;
+}
+EOC
+ cyn="whether difftime() can be avoided"
+ set avoid_difftime
+ eval $trylink
+ ;;
+*) avoid_difftime="$define";;
+esac
+case "$avoid_difftime" in
+"$define") val="$undef";;
+*) val="$define";;
+esac
+set use_difftime
+eval $setvar
+@end
diff --git a/mcon/U/d_dirent_d_type.U b/mcon/U/d_dirent_d_type.U
new file mode 100644
index 0000000..6334118
--- /dev/null
+++ b/mcon/U/d_dirent_d_type.U
@@ -0,0 +1,51 @@
+?RCS: $Id: d_dirent_d_type.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_dirent_d_type: Trylink cat i_dirent
+?MAKE: -pick add $@ %<
+?S:d_dirent_d_type:
+?S: This variable conditionally defines the HAS_DIRENT_D_TYPE symbol,
+?S: which indicates to the C program that struct dirent has an
+?S: integer member d_type.
+?S:.
+?C:HAS_DIRENT_D_TYPE:
+?C: This symbol, if defined, indicates that struct dirent has an
+?C: integer member d_type.
+?C:.
+?H:#$d_dirent_d_type HAS_DIRENT_D_TYPE /**/
+?H:.
+?LINT:set d_dirent_d_type
+: check whether struct dirent has a member d_type.
+$cat >try.c <<EOC
+#include <sys/types.h>
+#$i_dirent I_DIRENT
+#ifdef I_DIRENT
+#include <dirent.h>
+#endif
+int main(void)
+{
+ static struct dirent dir_entry;
+ dir_entry.d_type |= 1
+ | DT_UNKNOWN
+ | DT_FIFO
+ | DT_CHR
+ | DT_DIR
+ | DT_BLK
+ | DT_REG
+ | DT_LNK
+ | DT_SOCK
+ | DT_WHT;
+ return 0;
+}
+EOC
+cyn="whether struct dirent has a d_type member"
+set d_dirent_d_type
+eval $trylink
+
diff --git a/mcon/U/d_dladdr.U b/mcon/U/d_dladdr.U
new file mode 100644
index 0000000..da2ff15
--- /dev/null
+++ b/mcon/U/d_dladdr.U
@@ -0,0 +1,42 @@
+?RCS: $Id: d_dladdr.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2012 Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_dladdr: Trylink cat i_dlfcn
+?MAKE: -pick add $@ %<
+?S:d_dladdr:
+?S: This variable conditionally defines the HAS_DLADDR symbol, which
+?S: indicates to the C program that the dladdr() routine is available.
+?S:.
+?C:HAS_DLADDR :
+?C: This symbol, if defined, indicates that the dladdr() routine is
+?C: available to query the dynamic linker about a specified address.
+?C:.
+?H:#$d_dladdr HAS_DLADDR /**/
+?H:.
+?LINT:set d_dladdr
+: see if dladdr exists
+$cat >try.c <<EOC
+#$i_dlfcn I_DLFCN
+#define _GNU_SOURCE
+#ifdef I_DLFCN
+#include <dlfcn.h>
+#endif
+int main(void)
+{
+ Dl_info info;
+
+ dladdr(main, &info);
+ return info.dli_fbase != 0;
+}
+EOC
+cyn=dladdr
+set d_dladdr '-ldl'
+eval $trylink
+
diff --git a/mcon/U/d_dlerror.U b/mcon/U/d_dlerror.U
index 08323a8..8fdba0c 100644
--- a/mcon/U/d_dlerror.U
+++ b/mcon/U/d_dlerror.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_dlerror.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_dlerror.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
@@ -17,7 +17,7 @@
?RCS: Revision 3.0.1.1 1994/10/29 16:11:23 ram
?RCS: patch36: created by ADO
?RCS:
-?MAKE:d_dlerror: Inlibc runnm
+?MAKE:d_dlerror: Trylink cat i_dlfcn
?MAKE: -pick add $@ %<
?S:d_dlerror:
?S: This variable conditionally defines the HAS_DLERROR symbol, which
@@ -30,17 +30,21 @@
?C:.
?H:#$d_dlerror HAS_DLERROR /**/
?H:.
-?T: xxx_runnm
?LINT:set d_dlerror
-?X: We don't permanently change runnm, but we do temporarily.
-?LINT: change runnm
: see if dlerror exists
-?X: On NetBSD and FreeBSD, dlerror might be available, but it is in
-?X: /usr/lib/crt0.o, not in any of the libraries. Therefore, do not
-?X: use the nm extraction, but use a real compile and link test instead.
-xxx_runnm="$runnm"
-runnm=false
-set dlerror d_dlerror
-eval $inlibc
-runnm="$xxx_runnm"
+$cat >try.c <<EOC
+#$i_dlfcn I_DLFCN
+#ifdef I_DLFCN
+#include <dlfcn.h>
+#endif
+int main(void)
+{
+ static char ret;
+ ret |= *dlerror();
+ return ret ? 0 : 1;
+}
+EOC
+cyn=dlerror
+set d_dlerror '-ldl'
+eval $trylink
diff --git a/mcon/U/d_dliterphdr.U b/mcon/U/d_dliterphdr.U
new file mode 100644
index 0000000..0fa3cd4
--- /dev/null
+++ b/mcon/U/d_dliterphdr.U
@@ -0,0 +1,44 @@
+?RCS: $Id: d_dliterphdr.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2012, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_dliterphdr: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_dliterphdr:
+?S: This variable conditionally defines HAS_DL_ITERATE_PHDR when
+?S: dl_iterate_phdr() is available to walk through the list of shared
+?S: objects.
+?S:.
+?C:HAS_DL_ITERATE_PHDR:
+?C: This symbol, if defined, indicates that the dl_iterate_phdr() function is
+?C: available to walk through the list of shared objects. One needs to
+?C: define _GNU_SOURCE before including <link.h> to get the proper signature.
+?C:.
+?H:#$d_dliterphdr HAS_DL_ITERATE_PHDR /**/
+?H:.
+?LINT:set d_dliterphdr
+: see if dl_iterate_phdr exists
+$cat >try.c <<EOC
+#define _GNU_SOURCE
+#include <link.h>
+int cb(struct dl_phdr_info *info, size_t size, void *data)
+{
+ return NULL == info && NULL == data && size != 0 ? 0 : 1;
+}
+int main(void)
+{
+ int ret;
+ ret = dl_iterate_phdr(cb, NULL);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=dl_iterate_phdr
+set d_dliterphdr
+eval $trylink
+
diff --git a/mcon/U/d_dlopen.U b/mcon/U/d_dlopen.U
index 0f648bc..562da55 100644
--- a/mcon/U/d_dlopen.U
+++ b/mcon/U/d_dlopen.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_dlopen.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_dlopen.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
@@ -17,7 +17,7 @@
?RCS: Revision 3.0.1.1 1994/08/29 16:07:34 ram
?RCS: patch32: created by ADO
?RCS:
-?MAKE:d_dlopen: Inlibc runnm
+?MAKE:d_dlopen: Trylink cat i_dlfcn
?MAKE: -pick add $@ %<
?S:d_dlopen:
?S: This variable conditionally defines the HAS_DLOPEN symbol, which
@@ -29,17 +29,21 @@
?C:.
?H:#$d_dlopen HAS_DLOPEN /**/
?H:.
-?T: xxx_runnm
?LINT:set d_dlopen
-?X: We don't permanently change runnm, but we do temporarily.
-?LINT: change runnm
: see if dlopen exists
-?X: On NetBSD and FreeBSD, dlopen is available, but it is in
-?X: /usr/lib/crt0.o, not in any of the libraries. Therefore, do not
-?X: use the nm extraction, but use a real compile and link test instead.
-xxx_runnm="$runnm"
-runnm=false
-set dlopen d_dlopen
-eval $inlibc
-runnm="$xxx_runnm"
+$cat >try.c <<EOC
+#$i_dlfcn I_DLFCN
+#ifdef I_DLFCN
+#include <dlfcn.h>
+#endif
+int main(void)
+{
+ void *p;
+ p = dlopen("file", RTLD_GLOBAL);
+ return p ? 0 : 1;
+}
+EOC
+cyn=dlopen
+set d_dlopen '-ldl'
+eval $trylink
diff --git a/mcon/U/d_dosuid.U b/mcon/U/d_dosuid.U
index 5e2e159..dda7894 100644
--- a/mcon/U/d_dosuid.U
+++ b/mcon/U/d_dosuid.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_dosuid.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_dosuid.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Tye McQueen <tye@metronet.com> added safe setuid script checks.
diff --git a/mcon/U/d_drem.U b/mcon/U/d_drem.U
index e5030ec..3aabe30 100644
--- a/mcon/U/d_drem.U
+++ b/mcon/U/d_drem.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_drem.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_drem.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
@@ -14,7 +14,7 @@
?RCS: Revision 3.0.1.1 1994/10/29 16:12:14 ram
?RCS: patch36: created by ADO
?RCS:
-?MAKE:d_drem: Inlibc
+?MAKE:d_drem: Trylink cat
?MAKE: -pick add $@ %<
?S:d_drem:
?S: This variable conditionally defines the HAS_DREM symbol, which
@@ -30,6 +30,16 @@
?H:.
?LINT:set d_drem
: see if drem exists
-set drem d_drem
-eval $inlibc
+$cat >try.c <<EOC
+#include <math.h>
+int main(void)
+{
+ static double x, y, ret;
+ ret = 1.0 * drem(x, y);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=drem
+set d_drem '-lm'
+eval $trylink
diff --git a/mcon/U/d_dup2.U b/mcon/U/d_dup2.U
index f0ae690..ea8e59f 100644
--- a/mcon/U/d_dup2.U
+++ b/mcon/U/d_dup2.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_dup2.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_dup2.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_dup2.U,v $
?RCS: Revision 3.0 1993/08/18 12:05:56 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_dup2: Inlibc
+?MAKE:d_dup2: Trylink cat i_unistd
?MAKE: -pick add $@ %<
?S:d_dup2:
?S: This variable conditionally defines HAS_DUP2 if dup2() is
@@ -26,6 +26,19 @@
?H:.
?LINT:set d_dup2
: see if dup2 exists
-set dup2 d_dup2
-eval $inlibc
+$cat >try.c <<EOC
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static int fd1, fd2, ret;
+ ret |= dup2(fd1, fd2);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=dup2
+set d_dup2
+eval $trylink
diff --git a/mcon/U/d_end_symbol.U b/mcon/U/d_end_symbol.U
new file mode 100644
index 0000000..b8403ed
--- /dev/null
+++ b/mcon/U/d_end_symbol.U
@@ -0,0 +1,37 @@
+?RCS: $Id: d_end_symbol.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2011, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_end_symbol: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_end_symbol:
+?S: This variable conditionally defines HAS_END_SYMBOL if the
+?S: linker-defined symbol "end" is available to compute the end
+?S: address of the program's BSS segment.
+?S:.
+?C:HAS_END_SYMBOL:
+?C: This symbol, if defined, indicates that the C program can declare
+?C: extern const int end;
+?C: and then use &end to know the end of the BSS segment.
+?C:.
+?H:#$d_end_symbol HAS_END_SYMBOL /**/
+?H:.
+?LINT:set d_end_symbol
+: see if the end symbol exists
+$cat >try.c <<EOC
+int main(void)
+{
+ extern int end;
+ return (int) &end >> 12;
+}
+EOC
+cyn="whether your linker defines the end symbol"
+set d_end_symbol
+eval $trylink
+
diff --git a/mcon/U/d_eofpipe.U b/mcon/U/d_eofpipe.U
index 2d7162e..ab75282 100644
--- a/mcon/U/d_eofpipe.U
+++ b/mcon/U/d_eofpipe.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_eofpipe.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_eofpipe.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_eofpipe.U,v $
diff --git a/mcon/U/d_epoll.U b/mcon/U/d_epoll.U
new file mode 100644
index 0000000..4ee88ec
--- /dev/null
+++ b/mcon/U/d_epoll.U
@@ -0,0 +1,51 @@
+?RCS: $Id: d_epoll.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_epoll: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_epoll:
+?S: This variable conditionally defines the HAS_EPOLL symbol, which
+?S: indicates to the C program that epoll() support is available.
+?S:.
+?C:HAS_EPOLL:
+?C: This symbol is defined when epoll() can be used.
+?C:.
+?H:#$d_epoll HAS_EPOLL
+?H:.
+?LINT: set d_epoll
+: can we use epoll?
+$cat >try.c <<EOC
+#include <sys/types.h>
+#include <sys/epoll.h>
+int main(void)
+{
+ static struct epoll_event ev;
+ static int ret, epfd;
+ epfd |= epoll_create(1);
+ ev.events |= EPOLLOUT;
+ ev.events |= EPOLLPRI;
+ ev.events |= EPOLLERR;
+ ev.events |= EPOLLHUP;
+ ev.events |= EPOLLET;
+ ev.data.ptr = (void *) 0;
+ ev.data.fd |= 1;
+ ev.data.u32 |= 1;
+ ev.data.u64 |= 1;
+ ret |= epoll_ctl(epfd, 1, EPOLL_CTL_ADD, &ev);
+ ret |= epoll_ctl(epfd, 1, EPOLL_CTL_MOD, &ev);
+ ret |= epoll_ctl(epfd, 1, EPOLL_CTL_DEL, &ev);
+ ret |= epoll_wait(epfd, &ev, 1, -1);
+ return 0 != ret;
+}
+EOC
+cyn="whether epoll support is available"
+set d_epoll
+eval $trylink
+
diff --git a/mcon/U/d_etext_symbol.U b/mcon/U/d_etext_symbol.U
new file mode 100644
index 0000000..647b27a
--- /dev/null
+++ b/mcon/U/d_etext_symbol.U
@@ -0,0 +1,37 @@
+?RCS: $Id: d_etext_symbol.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2011, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_etext_symbol: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_etext_symbol:
+?S: This variable conditionally defines HAS_ETEXT_SYMBOL if the
+?S: linker-defined symbol "etext" is available to compute the end
+?S: address of the program's text segment.
+?S:.
+?C:HAS_ETEXT_SYMBOL:
+?C: This symbol, if defined, indicates that the C program can declare
+?C: extern const int etext;
+?C: and then use &etext to know the end of the text segment.
+?C:.
+?H:#$d_etext_symbol HAS_ETEXT_SYMBOL /**/
+?H:.
+?LINT:set d_etext_symbol
+: see if the etext symbol exists
+$cat >try.c <<EOC
+int main(void)
+{
+ extern int etext;
+ return (int) &etext >> 12;
+}
+EOC
+cyn="whether your linker defines the etext symbol"
+set d_etext_symbol
+eval $trylink
+
diff --git a/mcon/U/d_euc2jis.U b/mcon/U/d_euc2jis.U
index 1aa3bca..959d1bc 100644
--- a/mcon/U/d_euc2jis.U
+++ b/mcon/U/d_euc2jis.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_euc2jis.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_euc2jis.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_euc2jis.U,v $
diff --git a/mcon/U/d_fast_assert.U b/mcon/U/d_fast_assert.U
new file mode 100644
index 0000000..10c60a0
--- /dev/null
+++ b/mcon/U/d_fast_assert.U
@@ -0,0 +1,85 @@
+?RCS: $Id: d_fast_assert.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_fast_assert: Myread Setvar cat gccversion spackage \
+ sed +ccflags +cc +ldflags +optimize
+?MAKE: -pick add $@ %<
+?S:d_fast_assert:
+?S: This variable conditionally defines FAST_ASSERTIONS.
+?S:.
+?C:FAST_ASSERTIONS:
+?C: This symbol, when defined, indicates that the program should make
+?C: use of its own asserting and failure reporting code, instead of
+?C: the one from GLib.
+?C:.
+?H:#$d_fast_assert FAST_ASSERTIONS /**/
+?H:.
+?F:!try.c !try
+?LINT:set d_fast_assert
+?LINT:change ccflags
+: determine whether to enable fast assertions
+echo " "
+case "$d_fast_assert" in
+"$undef")
+ dflt=n;;
+*)
+ dflt=y;;
+esac
+$cat <<EOM
+$spackage contains code called "fast assertions" which are lightweight
+assertions in terms of code space used. They use much less code than
+their GLib counterpart, and therefore should be more efficient.
+
+EOM
+rp='Shall I enable "fast assertions"'
+. ./myread
+case "$ans" in
+y) val="$define";;
+*) val="$undef";;
+esac
+set d_fast_assert
+eval $setvar
+?X: When gcc is used, see whether we can use -momit-leaf-frame-pointer
+?X: This is useful for tail routines containing assertions if they use
+?X: "fast assertions", given that the code is not calling any routine.
+case "$gccversion" in
+'') ;;
+*)
+ case "$d_fast_assert" in
+ "$define")
+ $cat >try.c <<'EOC'
+int main()
+{
+ return 0;
+}
+EOC
+ if $cc $ccflags -momit-leaf-frame-pointer $ldflags -o try try.c >/dev/null 2>&1
+ then
+ case "$ccflags $optimize" in
+ *-momit-leaf-frame-pointer*) ;;
+ *-O0*) ;;
+ *-O*)
+ ccflags="-momit-leaf-frame-pointer $ccflags"
+ echo "Added -momit-leaf-frame-pointer to the cc flags." >&4
+ ;;
+ esac
+ else
+ case "$ccflags" in
+ *-momit-leaf-frame-pointer*)
+ echo "Stripping -momit-leaf-frame-pointer from cc flags." >&4
+ ccflags=`echo $ccflags | $sed 's/ *-momit-leaf-frame-pointer//'`
+ ;;
+ esac
+ fi
+ ;;
+ esac
+;;
+esac
+
diff --git a/mcon/U/d_fchmod.U b/mcon/U/d_fchmod.U
index 8185328..926fbbb 100644
--- a/mcon/U/d_fchmod.U
+++ b/mcon/U/d_fchmod.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_fchmod.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_fchmod.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_fchmod.U,v $
?RCS: Revision 3.0 1993/08/18 12:05:59 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_fchmod: Inlibc
+?MAKE:d_fchmod: Trylink cat i_sysstat
?MAKE: -pick add $@ %<
?S:d_fchmod:
?S: This variable conditionally defines the HAS_FCHMOD symbol, which
@@ -27,6 +27,21 @@
?H:.
?LINT:set d_fchmod
: see if fchmod exists
-set fchmod d_fchmod
-eval $inlibc
+$cat >try.c <<EOC
+#include <sys/types.h>
+#$i_sysstat I_SYS_STAT
+#ifdef I_SYS_STAT
+#include <sys/stat.h>
+#endif
+int main(void)
+{
+ static int fd, ret;
+ static mode_t mode;
+ ret |= fchmod(fd, mode);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=fchmod
+set d_fchmod
+eval $trylink
diff --git a/mcon/U/d_fchown.U b/mcon/U/d_fchown.U
index 30506f1..d653bbd 100644
--- a/mcon/U/d_fchown.U
+++ b/mcon/U/d_fchown.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_fchown.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_fchown.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_fchown.U,v $
?RCS: Revision 3.0 1993/08/18 12:06:01 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_fchown: Inlibc
+?MAKE:d_fchown: Trylink cat i_unistd
?MAKE: -pick add $@ %<
?S:d_fchown:
?S: This variable conditionally defines the HAS_FCHOWN symbol, which
@@ -27,6 +27,22 @@
?H:.
?LINT:set d_fchown
: see if fchown exists
-set fchown d_fchown
-eval $inlibc
+$cat >try.c <<EOC
+#include <sys/types.h>
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static int ret, fd;
+ static uid_t uid;
+ static gid_t gid;
+ ret |= fchown(fd, uid, gid);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=fchown
+set d_fchown
+eval $trylink
diff --git a/mcon/U/d_fcntl.U b/mcon/U/d_fcntl.U
index 5f6c4e6..28b9d68 100644
--- a/mcon/U/d_fcntl.U
+++ b/mcon/U/d_fcntl.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_fcntl.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_fcntl.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_fcntl.U,v $
?RCS: Revision 3.0 1993/08/18 12:06:01 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_fcntl: Inlibc
+?MAKE:d_fcntl: Trylink cat i_unistd
?MAKE: -pick add $@ %<
?S:d_fcntl:
?S: This variable conditionally defines the HAS_FCNTL symbol, and indicates
@@ -26,6 +26,23 @@
?H:.
?LINT:set d_fcntl
: see if this is an fcntl system
-set fcntl d_fcntl
-eval $inlibc
+$cat >try.c <<EOC
+#include <sys/types.h>
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+#include <fcntl.h>
+int main(void)
+{
+ static int fd, ret;
+ ret |= fcntl(fd, F_DUPFD, 1);
+ ret |= fcntl(fd, F_GETFD);
+ ret |= fcntl(fd, F_GETFL);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=fcntl
+set d_fcntl
+eval $trylink
diff --git a/mcon/U/d_fd_set.U b/mcon/U/d_fd_set.U
index 68eaf9f..7d68771 100644
--- a/mcon/U/d_fd_set.U
+++ b/mcon/U/d_fd_set.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_fd_set.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_fd_set.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_fd_set.U,v $
@@ -22,7 +22,7 @@
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
?MAKE:d_fd_set d_fd_macros d_fds_bits: cat +cc +ccflags rm Oldconfig \
- d_socket i_systime i_sysselct
+ d_socket i_systime i_sysselct i_syssock
?MAKE: -pick add $@ %<
?S:d_fd_set:
?S: This variable contains the eventual value of the HAS_FD_SET symbol,
@@ -72,10 +72,13 @@ $cat >fd_set.c <<EOCP
#$i_systime I_SYS_TIME
#$i_sysselct I_SYS_SELECT
#$d_socket HAS_SOCKET
+#$i_syssock I_SYS_SOCKET
#include <sys/types.h>
#ifdef HAS_SOCKET
+#ifdef I_SYS_SOCKET
#include <sys/socket.h> /* Might include <sys/bsdtypes.h> */
#endif
+#endif
#ifdef I_SYS_TIME
#include <sys/time.h>
#endif
diff --git a/mcon/U/d_fdatasync.U b/mcon/U/d_fdatasync.U
new file mode 100644
index 0000000..b989630
--- /dev/null
+++ b/mcon/U/d_fdatasync.U
@@ -0,0 +1,41 @@
+?RCS:
+?RCS: Copyright (c) 2013 Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_fdatasync: Trylink cat i_unistd
+?MAKE: -pick add $@ %<
+?S:d_fdatasync:
+?S: This variable conditionally defines the HAS_FDATASYNC symbol, which
+?S: indicates to the C program that the fdatasync() routine is available
+?S: to synchronize a file's in-core data with the storage device.
+?S:.
+?C:HAS_FDATASYNC:
+?C: This symbol, if defined, indicates that the fdatasync routine is available
+?C: to synchronize a file's in-core data with the storage device.
+?C:.
+?H:#$d_fdatasync HAS_FDATASYNC /**/
+?H:.
+?LINT:set d_fdatasync
+: see if fdatasync exists
+$cat >try.c <<EOC
+#include <sys/types.h>
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static int ret, fd;
+ ret |= fdatasync(fd);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=fdatasync
+set d_fdatasync
+eval $trylink
+
diff --git a/mcon/U/d_ffs.U b/mcon/U/d_ffs.U
index 131dd8d..cc52795 100644
--- a/mcon/U/d_ffs.U
+++ b/mcon/U/d_ffs.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_ffs.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_ffs.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_ffs.U,v $
?RCS: Revision 3.0 1993/08/18 12:06:03 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_ffs: Inlibc
+?MAKE:d_ffs: Trylink cat
?MAKE: -pick add $@ %<
?S:d_ffs:
?S: This variable conditionally defines the HAS_FFS symbol, which
@@ -28,6 +28,16 @@
?H:.
?LINT:set d_ffs
: see if ffs exists
-set ffs d_ffs
-eval $inlibc
+$cat >try.c <<EOC
+#include <strings.h>
+int main(void)
+{
+ static int i, ret;
+ ret |= ffs(i);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=ffs
+set d_ffs
+eval $trylink
diff --git a/mcon/U/d_fgetpos.U b/mcon/U/d_fgetpos.U
index cd5217a..0660595 100644
--- a/mcon/U/d_fgetpos.U
+++ b/mcon/U/d_fgetpos.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_fgetpos.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_fgetpos.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_fgetpos.U,v $
?RCS: Revision 3.0.1.1 1994/06/20 06:57:33 ram
?RCS: patch30: created
?RCS:
-?MAKE:d_fgetpos: Inlibc
+?MAKE:d_fgetpos: Trylink cat
?MAKE: -pick add $@ %<
?S:d_fgetpos:
?S: This variable conditionally defines HAS_FGETPOS if fgetpos() is
@@ -26,6 +26,17 @@
?H:.
?LINT:set d_fgetpos
: see if fgetpos exists
-set fgetpos d_fgetpos
-eval $inlibc
+$cat >try.c <<EOC
+#include <stdio.h>
+int main(void)
+{
+ static fpos_t pos;
+ static int ret;
+ ret |= fgetpos(stdout, &pos);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=fgetpos
+set d_fgetpos
+eval $trylink
diff --git a/mcon/U/d_flexfnam.U b/mcon/U/d_flexfnam.U
index 8548ba2..c8794e6 100644
--- a/mcon/U/d_flexfnam.U
+++ b/mcon/U/d_flexfnam.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_flexfnam.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_flexfnam.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_flexfnam.U,v $
@@ -24,8 +24,9 @@
?C:.
?H:#$d_flexfnam FLEXFILENAMES /**/
?H:.
-?T:first second
+?T:first second tmpdir
?LINT:set d_flexfnam
+?LINT:extern TMPDIR
: see if we can have long filenames
echo " "
?X:
@@ -34,10 +35,11 @@ echo " "
?X: one of those file systems cannot support long filenames, then we assume the
?X: whole system can't.
?X:
-rmlist="$rmlist /tmp/cf$$"
-$test -d /tmp/cf$$ || mkdir /tmp/cf$$
+tmpdir="${TMPDIR:-/tmp}"
+rmlist="$rmlist $tmpdir/cf$$"
+$test -d "$tmpdir/cf$$" || mkdir "$tmpdir/cf$$"
first=123456789abcdef
-second=/tmp/cf$$/$first
+second="$tmpdir/cf$$/$first"
$rm -f $first $second
if (echo hi >$first) 2>/dev/null; then
if $test -f 123456789abcde; then
@@ -45,7 +47,7 @@ if (echo hi >$first) 2>/dev/null; then
val="$undef"
else
if (echo hi >$second) 2>/dev/null; then
- if $test -f /tmp/cf$$/123456789abcde; then
+ if $test -f "$tmpdir/cf$$/123456789abcde"; then
$cat <<'EOM'
That's peculiar... You can have filenames longer than 14 characters, but only
on some of the filesystems. Maybe you are using NFS. Anyway, to avoid problems
@@ -73,5 +75,5 @@ EOM
fi
set d_flexfnam
eval $setvar
-$rm -rf /tmp/cf$$ 123456789abcde*
+$rm -rf "$tmpdir/cf$$" 123456789abcde*
diff --git a/mcon/U/d_flock.U b/mcon/U/d_flock.U
index 3821cf8..242b506 100644
--- a/mcon/U/d_flock.U
+++ b/mcon/U/d_flock.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_flock.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_flock.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_flock.U,v $
?RCS: Revision 3.0 1993/08/18 12:06:05 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_flock: Inlibc
+?MAKE:d_flock: Trylink cat
?MAKE: -pick add $@ %<
?S:d_flock:
?S: This variable conditionally defines HAS_FLOCK if flock() is
@@ -26,6 +26,19 @@
?H:.
?LINT:set d_flock
: see if flock exists
-set flock d_flock
-eval $inlibc
+$cat >try.c <<EOC
+#include <sys/file.h>
+#include <fcntl.h>
+int main(void)
+{
+ static int fd, ret;
+ ret |= flock(fd, LOCK_SH);
+ ret |= flock(fd, LOCK_EX);
+ ret |= flock(fd, LOCK_UN);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=flock
+set d_flock
+eval $trylink
diff --git a/mcon/U/d_fmod.U b/mcon/U/d_fmod.U
index bc95089..2492350 100644
--- a/mcon/U/d_fmod.U
+++ b/mcon/U/d_fmod.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_fmod.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_fmod.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
@@ -14,7 +14,7 @@
?RCS: Revision 3.0.1.1 1994/10/29 16:12:46 ram
?RCS: patch36: created by ADO
?RCS:
-?MAKE:d_fmod: Inlibc
+?MAKE:d_fmod: Trylink cat
?MAKE: -pick add $@ %<
?S:d_fmod:
?S: This variable conditionally defines the HAS_FMOD symbol, which
@@ -29,6 +29,16 @@
?H:.
?LINT:set d_fmod
: see if fmod exists
-set fmod d_fmod
-eval $inlibc
+$cat >try.c <<EOC
+#include <math.h>
+int main(void)
+{
+ static double x, y, ret;
+ ret = 1.0 * fmod(x, y);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=fmod
+set d_fmod '-lm'
+eval $trylink
diff --git a/mcon/U/d_fork.U b/mcon/U/d_fork.U
index 12b93b5..db3f44c 100644
--- a/mcon/U/d_fork.U
+++ b/mcon/U/d_fork.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_fork.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_fork.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
@@ -14,7 +14,7 @@
?RCS: Revision 3.0.1.1 1994/08/29 16:07:38 ram
?RCS: patch32: created by ADO
?RCS:
-?MAKE:d_fork: Inlibc
+?MAKE:d_fork: Trylink cat i_unistd
?MAKE: -pick add $@ %<
?S:d_fork:
?S: This variable conditionally defines the HAS_FORK symbol, which
@@ -28,6 +28,20 @@
?H:.
?LINT:set d_fork
: see if fork exists
-set fork d_fork
-eval $inlibc
+$cat >try.c <<EOC
+#include <sys/types.h>
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static pid_t pid;
+ pid |= fork();
+ return pid ? 0 : 1;
+}
+EOC
+cyn=fork
+set d_fork
+eval $trylink
diff --git a/mcon/U/d_fsetpos.U b/mcon/U/d_fsetpos.U
index 2bbb53d..2bd247a 100644
--- a/mcon/U/d_fsetpos.U
+++ b/mcon/U/d_fsetpos.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_fsetpos.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_fsetpos.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_fsetpos.U,v $
?RCS: Revision 3.0.1.1 1994/06/20 06:57:38 ram
?RCS: patch30: created
?RCS:
-?MAKE:d_fsetpos: Inlibc
+?MAKE:d_fsetpos: Trylink cat
?MAKE: -pick add $@ %<
?S:d_fsetpos:
?S: This variable conditionally defines HAS_FSETPOS if fsetpos() is
@@ -26,6 +26,17 @@
?H:.
?LINT:set d_fsetpos
: see if fsetpos exists
-set fsetpos d_fsetpos
-eval $inlibc
+$cat >try.c <<EOC
+#include <stdio.h>
+int main(void)
+{
+ static fpos_t pos;
+ static int ret;
+ ret |= fsetpos(stdout, &pos);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=fsetpos
+set d_fsetpos
+eval $trylink
diff --git a/mcon/U/d_fsync.U b/mcon/U/d_fsync.U
new file mode 100644
index 0000000..0bc9e4a
--- /dev/null
+++ b/mcon/U/d_fsync.U
@@ -0,0 +1,41 @@
+?RCS:
+?RCS: Copyright (c) 2013 Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_fsync: Trylink cat i_unistd
+?MAKE: -pick add $@ %<
+?S:d_fsync:
+?S: This variable conditionally defines the HAS_FSYNC symbol, which
+?S: indicates to the C program that the fsync() routine is available
+?S: to synchronize a file's in-core state with the storage device.
+?S:.
+?C:HAS_FSYNC:
+?C: This symbol, if defined, indicates that the fsync routine is available
+?C: to synchronize a file's in-core state with the storage device.
+?C:.
+?H:#$d_fsync HAS_FSYNC /**/
+?H:.
+?LINT:set d_fsync
+: see if fsync exists
+$cat >try.c <<EOC
+#include <sys/types.h>
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static int ret, fd;
+ ret |= fsync(fd);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=fsync
+set d_fsync
+eval $trylink
+
diff --git a/mcon/U/d_ftime.U b/mcon/U/d_ftime.U
index 2b08090..7a8a6d1 100644
--- a/mcon/U/d_ftime.U
+++ b/mcon/U/d_ftime.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_ftime.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_ftime.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_ftime.U,v $
?RCS: Revision 3.0 1993/08/18 12:06:06 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_ftime d_gettimeod: Inlibc Setvar
+?MAKE:d_ftime d_gettimeod: Trylink cat i_systimeb
?MAKE: -pick add $@ %<
?S:d_ftime:
?S: This variable conditionally defines the HAS_FTIME symbol, which indicates
@@ -58,17 +58,39 @@
?X:
?X: Give priority to gettimeofday(2) because timing is more accurate
?X:
-set gettimeofday d_gettimeod
-eval $inlibc
-case "$d_gettimeod" in
-"$undef")
- set ftime d_ftime
- eval $inlibc
- ;;
-*)
- val="$undef"; set d_ftime; eval $setvar
- ;;
-esac
+$cat >try.c <<EOC
+#include <sys/time.h>
+int main(void)
+{
+ static struct timeval tv;
+ static void *tz;
+ static int ret;
+ ret |= gettimeofday(&tv, tz);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=gettimeofday
+set d_gettimeod
+eval $trylink
+
+$cat >try.c <<EOC
+#include <sys/types.h>
+#$i_systimeb I_SYS_TIMEB
+#ifdef I_SYS_TIMEB
+#include <sys/timeb.h>
+#endif
+int main(void)
+{
+ static struct timeb t;
+ static int ret;
+ ret |= ftime(&t);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=ftime
+set d_ftime
+eval $trylink
+
case "$d_gettimeod$d_ftime" in
"$undef$undef")
echo " "
diff --git a/mcon/U/d_ftrncate.U b/mcon/U/d_ftrncate.U
index 23f7f01..8379bd1 100644
--- a/mcon/U/d_ftrncate.U
+++ b/mcon/U/d_ftrncate.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_ftrncate.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_ftrncate.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_ftrncate.U,v $
?RCS: Revision 3.0 1993/08/18 12:06:07 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_ftrncate: Inlibc
+?MAKE:d_ftrncate: Trylink cat i_unistd
?MAKE: -pick add $@ %<
?S:d_ftrncate (d_ftruncate):
?S: This variable conditionally defines the HAS_FTRUNCATE symbol, which
@@ -26,6 +26,21 @@
?H:.
?LINT:set d_ftrncate
: see if ftruncate exists
-set ftruncate d_ftrncate
-eval $inlibc
+$cat >try.c <<EOC
+#include <sys/types.h>
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static int fd, ret;
+ static off_t length;
+ ret |= ftruncate(fd, length);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=ftruncate
+set d_ftrncate
+eval $trylink
diff --git a/mcon/U/d_gconvert.U b/mcon/U/d_gconvert.U
index dbc67f0..fccb13b 100644
--- a/mcon/U/d_gconvert.U
+++ b/mcon/U/d_gconvert.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_gconvert.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_gconvert.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
@@ -21,7 +21,7 @@
?RCS: Revision 3.0.1.1 1994/10/29 16:12:51 ram
?RCS: patch36: created by ADO
?RCS:
-?MAKE:d_Gconvert: cat cc ccflags ldflags libs Inlibc rm _o
+?MAKE:d_Gconvert: cat cc ccflags ldflags libs rm _o
?MAKE: -pick add $@ %<
?S:d_Gconvert:
?S: This variable holds what Gconvert is defined as to convert
diff --git a/mcon/U/d_getaddrinfo.U b/mcon/U/d_getaddrinfo.U
new file mode 100644
index 0000000..f8cbfd2
--- /dev/null
+++ b/mcon/U/d_getaddrinfo.U
@@ -0,0 +1,82 @@
+?RCS: $Id: d_getaddrinfo.U 170 2013-08-30 16:47:47Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_getaddrinfo: Trylink cat i_arpainet i_netdb i_syssock \
+ i_winsock2 i_ws2tcpip i_niin d_windows
+?MAKE: -pick add $@ %<
+?S:d_getaddrinfo:
+?S: This variable conditionally defines the HAS_GETADDRINFO symbol, which
+?S: indicates to the C program that the getaddrinfo() routine is available.
+?S:.
+?C:HAS_GETADDRINFO:
+?C: This symbol is defined when getaddrinfo() can be used.
+?C:.
+?H:#$d_getaddrinfo HAS_GETADDRINFO
+?H:.
+?LINT: set d_getaddrinfo
+: can we use getaddrinfo?
+$cat >try.c <<EOC
+#$i_syssock I_SYS_SOCKET
+#$i_winsock2 I_WINSOCK2
+#$i_ws2tcpip I_WS2TCPIP
+#$i_niin I_NETINET_IN
+#$i_arpainet I_ARPA_INET
+#$i_netdb I_NETDB
+#$d_windows WINDOWS_SYSTEM
+#ifdef WINDOWS_SYSTEM
+#define WINVER 0x0501
+#endif
+#include <sys/types.h>
+#ifdef I_SYS_SOCKET
+#include <sys/socket.h>
+#endif
+#ifdef I_NETINET_IN
+#include <netinet/in.h>
+#endif
+#ifdef I_ARPA_INET
+#include <arpa/inet.h>
+#endif
+#ifdef I_NETDB
+#include <netdb.h>
+#endif
+#ifdef I_WINSOCK2
+#include <Winsock2.h>
+#endif
+#ifdef I_WS2TCPIP
+#include <Ws2tcpip.h>
+#endif
+int main(void)
+{
+ struct addrinfo hints, *res;
+ int ret;
+
+ hints.ai_flags = 1;
+ hints.ai_family = PF_UNSPEC;
+ hints.ai_socktype = 1;
+ hints.ai_protocol = 1;
+ hints.ai_addrlen = (socklen_t) 1;
+ hints.ai_canonname = "canonname";
+ hints.ai_addr = (struct sockaddr *) 0;
+ hints.ai_next = (struct addrinfo *) 0;
+ ret = getaddrinfo("localhost", "www", &hints, &res);
+ if (0 != ret) {
+ const char *s;
+ s = gai_strerror(ret);
+ (void) s;
+ }
+ if (res)
+ freeaddrinfo(res);
+ return 0;
+}
+EOC
+cyn=getaddrinfo
+set d_getaddrinfo '-lWs2_32'
+eval $trylink
+
diff --git a/mcon/U/d_getcontext.U b/mcon/U/d_getcontext.U
new file mode 100644
index 0000000..bb3a7aa
--- /dev/null
+++ b/mcon/U/d_getcontext.U
@@ -0,0 +1,38 @@
+?RCS: $Id: d_getcontext.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2012, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_getcontext: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_getcontext:
+?S: This variable conditionally defines HAS_GETCONTEXT if getcontext() is
+?S: available to save a process context.
+?S:.
+?C:HAS_GETCONTEXT:
+?C: This symbol, if defined, indicates that the getcontext() function is
+?C: available to save a process context.
+?C:.
+?H:#$d_getcontext HAS_GETCONTEXT /**/
+?H:.
+?LINT:set d_getcontext
+: see if getcontext exists
+$cat >try.c <<EOC
+#include <ucontext.h>
+int main(void)
+{
+ int ret;
+ ucontext_t u;
+ ret = getcontext(&u);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=getcontext
+set d_getcontext
+eval $trylink
+
diff --git a/mcon/U/d_geteuid.U b/mcon/U/d_geteuid.U
new file mode 100644
index 0000000..37e718a
--- /dev/null
+++ b/mcon/U/d_geteuid.U
@@ -0,0 +1,40 @@
+?RCS: $Id: d_geteuid.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_geteuid: Trylink cat i_unistd
+?MAKE: -pick add $@ %<
+?S:d_geteuid:
+?S: This variable conditionally defines the HAS_GETEUID symbol, which
+?S: indicates to the C program that geteuid() is available.
+?S:.
+?C:HAS_GETEUID:
+?C: This symbol is defined when geteuid() can be used.
+?C:.
+?H:#$d_geteuid HAS_GETEUID
+?H:.
+?LINT: set d_geteuid
+: can we use geteuid?
+$cat >try.c <<EOC
+#include <sys/types.h>
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static uid_t ret;
+ ret |= geteuid();
+ return ret ? 0 : 1;
+}
+EOC
+cyn=geteuid
+set d_geteuid
+eval $trylink
+
diff --git a/mcon/U/d_getgrps.U b/mcon/U/d_getgrps.U
index 37fbba0..8da679d 100644
--- a/mcon/U/d_getgrps.U
+++ b/mcon/U/d_getgrps.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_getgrps.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_getgrps.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_getgrps.U,v $
?RCS: Revision 3.0 1993/08/18 12:06:08 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_getgrps: Inlibc
+?MAKE:d_getgrps: Trylink cat i_unistd
?MAKE: -pick add $@ %<
?S:d_getgrps:
?S: This variable conditionally defines the HAS_GETGROUPS symbol, which
@@ -28,6 +28,21 @@
?H:.
?LINT:set d_getgrps
: see if getgroups exists
-set getgroups d_getgrps
-eval $inlibc
+$cat >try.c <<EOC
+#include <sys/types.h>
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static int ret;
+ static gid_t grouplist;
+ ret |= getgroups(1, &grouplist);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=getgroups
+set d_getgrps
+eval $trylink
diff --git a/mcon/U/d_gethbynm.U b/mcon/U/d_gethbynm.U
index 51c1fb0..6841afa 100644
--- a/mcon/U/d_gethbynm.U
+++ b/mcon/U/d_gethbynm.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_gethbynm.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_gethbynm.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_gethbynm.U,v $
?RCS: Revision 3.0 1993/08/18 12:06:08 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_gethbynm: Inlibc
+?MAKE:d_gethbynm: Trylink cat
?MAKE: -pick add $@ %<
?S:d_gethbynm (d_gethhstby):
?S: This variable conditionally defines the HAS_GETHOSTBYNAME symbol, which
@@ -27,6 +27,16 @@
?H:.
?LINT:set d_gethbynm
: see if gethostbyname exists
-set gethostbyname d_gethbynm
-eval $inlibc
+$cat >try.c <<EOC
+#include <netdb.h>
+int main(void)
+{
+ struct hostent *he;
+ he = gethostbyname("hostname");
+ return he ? 0 : 1;
+}
+EOC
+cyn=gethostbyname
+set d_gethbynm '-lnsl'
+eval $trylink
diff --git a/mcon/U/d_gethent.U b/mcon/U/d_gethent.U
index 6344d8f..b6bf106 100644
--- a/mcon/U/d_gethent.U
+++ b/mcon/U/d_gethent.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_gethent.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_gethent.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_gethent.U,v $
?RCS: Revision 3.0 1993/08/18 12:06:09 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_gethent: Inlibc
+?MAKE:d_gethent: Trylink cat
?MAKE: -pick add $@ %<
?S:d_gethent:
?S: This variable conditionally defines HAS_GETHOSTENT if gethostent() is
@@ -26,6 +26,16 @@
?H:.
?LINT:set d_gethent
: see if gethostent exists
-set gethostent d_gethent
-eval $inlibc
+$cat >try.c <<EOC
+#include <netdb.h>
+int main(void)
+{
+ struct hostent *ret;
+ ret = gethostent();
+ return ret ? 0 : 1;
+}
+EOC
+cyn=gethostent
+set d_gethent
+eval $trylink
diff --git a/mcon/U/d_gethid.U b/mcon/U/d_gethid.U
index 49177bc..184e056 100644
--- a/mcon/U/d_gethid.U
+++ b/mcon/U/d_gethid.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_gethid.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_gethid.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_gethid.U,v $
?RCS: Revision 3.0 1993/08/18 12:06:10 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_gethid: Inlibc
+?MAKE:d_gethid: Trylink cat i_unistd
?MAKE: -pick add $@ %<
?S:d_gethid:
?S: This variable conditionally defines HAS_GETHOSTID if gethostid() is
@@ -26,6 +26,19 @@
?H:.
?LINT:set d_gethid
: see if gethid exists
-set gethostid d_gethid
-eval $inlibc
+$cat >try.c <<EOC
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static long id;
+ id |= gethostid();
+ return id ? 0 : 1;
+}
+EOC
+cyn=gethostid
+set d_gethid
+eval $trylink
diff --git a/mcon/U/d_gethname.U b/mcon/U/d_gethname.U
index fcd6e86..a44da38 100644
--- a/mcon/U/d_gethname.U
+++ b/mcon/U/d_gethname.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_gethname.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_gethname.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_gethname.U,v $
diff --git a/mcon/U/d_getifaddrs.U b/mcon/U/d_getifaddrs.U
new file mode 100644
index 0000000..eb12d88
--- /dev/null
+++ b/mcon/U/d_getifaddrs.U
@@ -0,0 +1,54 @@
+?RCS: $Id: d_getifaddrs.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_getifaddrs: Trylink cat i_netif
+?MAKE: -pick add $@ %<
+?S:d_getifaddrs:
+?S: This variable conditionally defines the HAS_GETIFADDRS symbol, which
+?S: indicates to the C program that getifaddrs() support is available.
+?S:.
+?C:HAS_GETIFADDRS:
+?C: This symbol is defined when getifaddrs() and freeifaddrs() can be used.
+?C:.
+?H:#$d_getifaddrs HAS_GETIFADDRS
+?H:.
+?LINT: set d_getifaddrs
+: can we use getifaddrs?
+$cat >try.c <<EOC
+#include <sys/types.h>
+#include <sys/socket.h>
+#$i_netif I_NET_IF
+#ifdef I_NET_IF
+#include <net/if.h>
+#endif
+#include <ifaddrs.h>
+int main(void)
+{
+ struct ifaddrs *ifa0, *ifa;
+ static int ret;
+
+ ret |= getifaddrs(&ifa0);
+
+ for (ifa = ifa0; ifa; ifa = ifa->ifa_next) {
+ (void) ifa->ifa_flags;
+ (void) ifa->ifa_addr;
+ (void) ifa->ifa_addr->sa_family;
+ (void) ifa->ifa_netmask;
+ if ((IFF_LOOPBACK | IFF_UP | IFF_RUNNING) & ifa->ifa_flags)
+ break;
+ }
+ freeifaddrs(ifa0);
+ return 0;
+}
+EOC
+cyn=getifaddrs
+set d_getifaddrs
+eval $trylink
+
diff --git a/mcon/U/d_getinvent.U b/mcon/U/d_getinvent.U
new file mode 100644
index 0000000..fbaf5aa
--- /dev/null
+++ b/mcon/U/d_getinvent.U
@@ -0,0 +1,37 @@
+?RCS: $Id: d_getinvent.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_getinvent: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_getinvent:
+?S: This variable conditionally defines the HAS_GETINVENT symbol, which
+?S: indicates to the C program that the getinvent() routine is available.
+?S:.
+?C:HAS_GETINVENT:
+?C: This symbol, if defined, indicates that the getinvent() routine is
+?C: available.
+?C:.
+?H:#$d_getinvent HAS_GETINVENT /**/
+?H:.
+?LINT:set d_getinvent
+: see if getinvent exists
+$cat >try.c <<EOC
+#include <invent.h>
+int main(void)
+{
+ static inventory_t *ret;
+ ret = getinvent();
+ return ret ? 0 : 1;
+}
+EOC
+cyn=getinvent
+set d_getinvent
+eval $trylink
+
diff --git a/mcon/U/d_getlogin.U b/mcon/U/d_getlogin.U
index 9703ded..3d475ef 100644
--- a/mcon/U/d_getlogin.U
+++ b/mcon/U/d_getlogin.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_getlogin.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_getlogin.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
@@ -14,7 +14,7 @@
?RCS: Revision 3.0.1.1 1994/08/29 16:07:41 ram
?RCS: patch32: created by ADO
?RCS:
-?MAKE:d_getlogin: Inlibc
+?MAKE:d_getlogin: Trylink cat i_unistd
?MAKE: -pick add $@ %<
?S:d_getlogin:
?S: This variable conditionally defines the HAS_GETLOGIN symbol, which
@@ -29,6 +29,19 @@
?H:.
?LINT:set d_getlogin
: see if getlogin exists
-set getlogin d_getlogin
-eval $inlibc
+$cat >try.c <<EOC
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static char ret;
+ ret |= *getlogin();
+ return ret ? 0 : 1;
+}
+EOC
+cyn=getlogin
+set d_getlogin
+eval $trylink
diff --git a/mcon/U/d_getnameinfo.U b/mcon/U/d_getnameinfo.U
new file mode 100644
index 0000000..ac8d675
--- /dev/null
+++ b/mcon/U/d_getnameinfo.U
@@ -0,0 +1,73 @@
+?RCS: $Id: d_getnameinfo.U 170 2013-08-30 16:47:47Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2013, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_getnameinfo: Trylink cat i_arpainet i_netdb i_syssock \
+ i_winsock2 i_ws2tcpip i_niin d_windows
+?MAKE: -pick add $@ %<
+?S:d_getnameinfo:
+?S: This variable conditionally defines the HAS_GETNAMEINFO symbol, which
+?S: indicates to the C program that the getnameinfo() routine is available.
+?S:.
+?C:HAS_GETNAMEINFO:
+?C: This symbol is defined when getnameinfo() can be used.
+?C:.
+?H:#$d_getnameinfo HAS_GETNAMEINFO
+?H:.
+?LINT: set d_getnameinfo
+: can we use getnameinfo?
+$cat >try.c <<EOC
+#$i_syssock I_SYS_SOCKET
+#$i_winsock2 I_WINSOCK2
+#$i_ws2tcpip I_WS2TCPIP
+#$i_niin I_NETINET_IN
+#$i_arpainet I_ARPA_INET
+#$i_netdb I_NETDB
+#$d_windows WINDOWS_SYSTEM
+#ifdef WINDOWS_SYSTEM
+#define WINVER 0x0501
+#endif
+#include <sys/types.h>
+#ifdef I_SYS_SOCKET
+#include <sys/socket.h>
+#endif
+#ifdef I_NETINET_IN
+#include <netinet/in.h>
+#endif
+#ifdef I_ARPA_INET
+#include <arpa/inet.h>
+#endif
+#ifdef I_NETDB
+#include <netdb.h>
+#endif
+#ifdef I_WINSOCK2
+#include <Winsock2.h>
+#endif
+#ifdef I_WS2TCPIP
+#include <Ws2tcpip.h>
+#endif
+int main(void)
+{
+ int ret;
+ static struct sockaddr sa;
+ socklen_t salen;
+ char host[NI_MAXHOST];
+ char serv[NI_MAXSERV];
+
+ salen = sizeof(sa);
+ ret = getnameinfo(&sa, salen,
+ host, sizeof host, serv, sizeof serv,
+ NI_NAMEREQD | NI_DGRAM | NI_NOFQDN | NI_NUMERICHOST | NI_NUMERICSERV);
+ return 0 == ret;
+}
+EOC
+cyn=getnameinfo
+set d_getnameinfo '-lWs2_32'
+eval $trylink
+
diff --git a/mcon/U/d_getopt.U b/mcon/U/d_getopt.U
index c15f15f..f2169ff 100644
--- a/mcon/U/d_getopt.U
+++ b/mcon/U/d_getopt.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_getopt.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_getopt.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_getopt.U,v $
?RCS: Revision 3.0 1993/08/18 12:06:13 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_getopt: Inlibc
+?MAKE:d_getopt: Trylink cat i_unistd
?MAKE: -pick add $@ %<
?S:d_getopt:
?S: This variable conditionally defines the HAS_GETOPT symbol, which
@@ -26,6 +26,21 @@
?H:.
?LINT:set d_getopt
: see if getopt exists
-set getopt d_getopt
-eval $inlibc
+$cat >try.c <<EOC
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+extern char *optarg;
+extern int optind, opterr, optopt;
+int main(int argc, char *argv[])
+{
+ static int ret;
+ ret |= getopt(argc, argv, "abc");
+ return ret ? 0 : 1;
+}
+EOC
+cyn=getopt
+set d_getopt
+eval $trylink
diff --git a/mcon/U/d_getpagsz.U b/mcon/U/d_getpagsz.U
index 6f05f85..d2b2baf 100644
--- a/mcon/U/d_getpagsz.U
+++ b/mcon/U/d_getpagsz.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_getpagsz.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_getpagsz.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_getpagsz.U,v $
@@ -15,8 +15,8 @@
?RCS: Revision 3.0 1993/08/18 12:06:14 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_getpagsz pagesize: Oldconfig Myread Inlibc cat contains +cc +ccflags \
- libs rm Findhdr
+?MAKE:d_getpagsz pagesize: Oldconfig Myread Trylink cat contains +cc +ccflags \
+ libs rm Findhdr i_unistd
?MAKE: -pick add $@ %<
?S:d_getpagsz:
?S: This variable conditionally defines HAS_GETPAGESIZE if getpagesize()
@@ -43,8 +43,21 @@
?T:guess
?LINT:set d_getpagsz
: see if getpagesize exists
-set getpagesize d_getpagsz
-eval $inlibc
+$cat >try.c <<EOC
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static int ret;
+ ret |= getpagesize();
+ return ret ? 0 : 1;
+}
+EOC
+cyn=getpagesize
+set d_getpagsz
+eval $trylink
@if pagesize || PAGESIZE_VALUE
: determine the system page size
@@ -53,8 +66,12 @@ guess=' (OK to guess)'
case "$pagesize" in
'')
$cat >page.c <<EOP
-extern int getpagesize();
-int main()
+#include <stdio.h>
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
{
printf("%d\n", getpagesize());
}
@@ -79,9 +96,10 @@ EOP
if $contains PAGESIZE `./findhdr sys/param.h` >/dev/null 2>&1; then
$cat >page.c <<EOP
#include <sys/param.h>
-int main()
+#include <stdio.h>
+int main(void)
{
- printf("%d\n", PAGESIZE);
+ printf("%d\n", (int) PAGESIZE);
}
EOP
if $cc $ccflags -o page page.c $libs >/dev/null 2>&1; then
diff --git a/mcon/U/d_getpgid.U b/mcon/U/d_getpgid.U
index 51134f6..c030352 100644
--- a/mcon/U/d_getpgid.U
+++ b/mcon/U/d_getpgid.U
@@ -1,19 +1,19 @@
-?RCS: $Id: d_getpgid.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_getpgid.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1996, Andy Dougherty
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_getpgid.U,v $
?RCS: Revision 3.0.1.1 1997/02/28 15:33:44 ram
?RCS: patch61: created
?RCS:
-?MAKE:d_getpgid: Inlibc
+?MAKE:d_getpgid: Trylink cat i_unistd
?MAKE: -pick add $@ %<
?S:d_getpgid:
?S: This variable conditionally defines the HAS_GETPGID symbol, which
@@ -29,6 +29,20 @@
?H:.
?LINT:set d_getpgid
: see if getpgid exists
-set getpgid d_getpgid
-eval $inlibc
+$cat >try.c <<EOC
+#include <sys/types.h>
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static pid_t pid, ret;
+ ret |= getpgid(pid);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=getpgid
+set d_getpgid
+eval $trylink
diff --git a/mcon/U/d_getpgrp.U b/mcon/U/d_getpgrp.U
index 4e99d39..ea29328 100644
--- a/mcon/U/d_getpgrp.U
+++ b/mcon/U/d_getpgrp.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_getpgrp.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_getpgrp.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_getpgrp.U,v $
@@ -15,8 +15,7 @@
?RCS: Revision 3.0 1993/08/18 12:06:15 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_getpgrp d_bsdgetpgrp: Guess Inlibc Setvar cat rm \
- +cc +ccflags +ldflags +libs i_unistd
+?MAKE:d_getpgrp d_bsdgetpgrp: Trylink Setvar cat i_unistd
?MAKE: -pick add $@ %<
?S:d_getpgrp:
?S: This variable conditionally defines HAS_GETPGRP if getpgrp() is
@@ -32,77 +31,53 @@
?C:.
?C:USE_BSD_GETPGRP:
?C: This symbol, if defined, indicates that getpgrp needs one
-?C: arguments whereas USG one needs none.
+?C: arguments whereas the USG one needs none.
?C:.
?H:#$d_getpgrp HAS_GETPGRP /**/
?H:#$d_bsdgetpgrp USE_BSD_GETPGRP /**/
?H:.
-?F:!set !set.c
-?T:xxx
?LINT:set d_getpgrp d_bsdgetpgrp
: see if getpgrp exists
-set getpgrp d_getpgrp
-eval $inlibc
-
-@if USE_BSD_GETPGRP || d_bsdgetpgrp
-case "$d_getpgrp" in
-"$define")
- echo " "
- echo "Checking to see which flavor of getpgrp is in use..."
- $cat >set.c <<EOP
-#$i_unistd I_UNISTD
+$cat >try.c <<EOC
#include <sys/types.h>
+#$i_unistd I_UNISTD
#ifdef I_UNISTD
-# include <unistd.h>
+#include <unistd.h>
#endif
-int main()
+int main(void)
{
- if (getuid() == 0) {
- printf("(I see you are running Configure as super-user...)\n");
- setuid(1);
- }
-#ifdef TRY_BSD_PGRP
- if (getpgrp(1) == 0)
- exit(0);
-#else
- if (getpgrp() > 0)
- exit(0);
+ static pid_t ret, pid;
+ ret |= getpgrp(pid);
+ return ret ? 0 : 1;
+}
+EOC
+cyn="whether you have a BSD-like getpgrp()"
+set d_bsdgetpgrp
+eval $trylink
+
+case "$d_bsdgetpgrp" in
+$define)
+ val="$define"
+ set d_getpgrp
+ eval $setvar
+ ;;
+*)
+ $cat >try.c <<EOC
+#include <sys/types.h>
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
#endif
- exit(1);
+int main(void)
+{
+ static pid_t ret;
+ ret |= getpgrp();
+ return ret ? 0 : 1;
}
-EOP
- if $cc -DTRY_BSD_PGRP $ccflags $ldflags -o set set.c $libs >/dev/null 2>&1
- && ./set
- then
- echo "You have to use getpgrp(pid) instead of getpgrp()." >&4
- val="$define"
- elif $cc $ccflags $ldflags -o set set.c $libs >/dev/null 2>&1 && ./set; then
- echo "You have to use getpgrp() instead of getpgrp(pid)." >&4
- val="$undef"
- else
- echo "I can't seem to compile and run the test program."
- if ./usg; then
- xxx="a USG one, i.e. you use getpgrp()."
- else
- # SVR4 systems can appear rather BSD-ish.
- case "$i_unistd" in
- $undef)
- xxx="a BSD one, i.e. you use getpgrp(pid)."
- val="$define"
- ;;
- $define)
- xxx="probably a USG one, i.e. you use getpgrp()."
- val="$undef"
- ;;
- esac
- fi
- echo "Assuming your getpgrp is $xxx" >&4
- fi
+EOC
+ cyn="whether you have a USG-like getpgrp() instead"
+ set d_getpgrp
+ eval $trylink
;;
-*) val="$undef";;
esac
-set d_bsdgetpgrp
-eval $setvar
-$rm -f set set.c
-@end
diff --git a/mcon/U/d_getpgrp2.U b/mcon/U/d_getpgrp2.U
index 481ed6a..08e105f 100644
--- a/mcon/U/d_getpgrp2.U
+++ b/mcon/U/d_getpgrp2.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_getpgrp2.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_getpgrp2.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_getpgrp2.U,v $
?RCS: Revision 3.0 1993/08/18 12:06:15 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_getpgrp2: Inlibc
+?MAKE:d_getpgrp2: Trylink cat i_unistd
?MAKE: -pick add $@ %<
?S:d_getpgrp2:
?S: This variable conditionally defines the HAS_GETPGRP2 symbol, which
@@ -27,6 +27,20 @@
?H:.
?LINT:set d_getpgrp2
: see if getpgrp2 exists
-set getpgrp2 d_getpgrp2
-eval $inlibc
+$cat >try.c <<EOC
+#include <sys/types.h>
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static pid_t pid, ret;
+ ret |= getpgrp2(pid);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=getpgrp2
+set d_getpgrp2
+eval $trylink
diff --git a/mcon/U/d_getppid.U b/mcon/U/d_getppid.U
index 2b2ec6b..21dffd1 100644
--- a/mcon/U/d_getppid.U
+++ b/mcon/U/d_getppid.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_getppid.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_getppid.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
@@ -14,7 +14,7 @@
?RCS: Revision 3.0.1.1 1994/08/29 16:07:45 ram
?RCS: patch32: created by ADO
?RCS:
-?MAKE:d_getppid: Inlibc
+?MAKE:d_getppid: Trylink cat i_unistd
?MAKE: -pick add $@ %<
?S:d_getppid:
?S: This variable conditionally defines the HAS_GETPPID symbol, which
@@ -29,6 +29,20 @@
?H:.
?LINT:set d_getppid
: see if getppid exists
-set getppid d_getppid
-eval $inlibc
+$cat >try.c <<EOC
+#include <sys/types.h>
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static pid_t ret;
+ ret |= getppid();
+ return ret ? 0 : 1;
+}
+EOC
+cyn=getppid
+set d_getppid
+eval $trylink
diff --git a/mcon/U/d_getprior.U b/mcon/U/d_getprior.U
index 7dc3d09..153f624 100644
--- a/mcon/U/d_getprior.U
+++ b/mcon/U/d_getprior.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_getprior.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_getprior.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_getprior.U,v $
?RCS: Revision 3.0 1993/08/18 12:06:16 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_getprior: Inlibc
+?MAKE:d_getprior: Trylink cat i_sysresrc
?MAKE: -pick add $@ %<
?S:d_getprior:
?S: This variable conditionally defines HAS_GETPRIORITY if getpriority()
@@ -26,6 +26,22 @@
?H:.
: see if getpriority exists
?LINT:set d_getprior
-set getpriority d_getprior
-eval $inlibc
+$cat >try.c <<EOC
+#$i_sysresrc I_SYS_RESOURCE
+#ifdef I_SYS_RESOURCE
+#include <sys/resource.h>
+#endif
+int main(void)
+{
+ static int ret;
+ static id_t id;
+ ret |= getpriority(PRIO_PROCESS, id);
+ ret |= getpriority(PRIO_PGRP, id);
+ ret |= getpriority(PRIO_USER, id);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=getpriority
+set d_getprior
+eval $trylink
diff --git a/mcon/U/d_getpwent.U b/mcon/U/d_getpwent.U
index 10ba09b..f7cc291 100644
--- a/mcon/U/d_getpwent.U
+++ b/mcon/U/d_getpwent.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_getpwent.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_getpwent.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_getpwent.U,v $
?RCS: Revision 3.0 1993/08/18 12:06:17 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_getpwent: Csym Setvar
+?MAKE:d_getpwent: Trylink cat
?MAKE: -pick add $@ %<
?S:d_getpwent:
?S: This variable conditionally defines the HAS_GETPWENT symbol, which
@@ -27,14 +27,16 @@
?H:.
?LINT:set d_getpwent
: see if there is a getpwent
-echo " "
-if set getpwent val -f d_getpwent; eval $csym; $val; then
- echo "getpwent() found." >&4
- val="$define"
-else
- echo "No getpwent() found -- will use getpw() instead." >&4
- val="$undef"
-fi
+$cat >try.c <<EOC
+#include <pwd.h>
+int main(void)
+{
+ struct passwd pw;
+ pw = *getpwent();
+ return pw.pw_name ? 0 : 1;
+}
+EOC
+cyn=getpwent
set d_getpwent
-eval $setvar
+eval $trylink
diff --git a/mcon/U/d_getrlimit.U b/mcon/U/d_getrlimit.U
new file mode 100644
index 0000000..ca99ecb
--- /dev/null
+++ b/mcon/U/d_getrlimit.U
@@ -0,0 +1,46 @@
+?RCS: $Id: d_getrlimit.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2012 Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_getrlimit.U,v $
+?RCS:
+?MAKE:d_getrlimit: Trylink cat i_systime
+?MAKE: -pick add $@ %<
+?S:d_getrlimit:
+?S: This variable conditionally defines the HAS_GETRLIMIT symbol, which
+?S: indicates to the C program that the getrlimit() routine is available
+?S: to get process resource limits.
+?S:.
+?C:HAS_GETRLIMIT :
+?C: This symbol, if defined, indicates that the getrlimit() routine is
+?C: available to get process resource limits.
+?C:.
+?H:#$d_getrlimit HAS_GETRLIMIT /**/
+?H:.
+?LINT:set d_getrlimit
+: see if getrlimit exists
+$cat >try.c <<EOC
+#$i_systime I_SYS_TIME
+#ifdef I_SYS_TIME
+#include <sys/time.h>
+#endif
+#include <sys/resource.h>
+int main(void)
+{
+ static struct rlimit lim;
+ int ret;
+ ret |= getrlimit(RLIMIT_CORE, &lim);
+ ret += lim.rlim_cur > lim.rlim_max ? 1 : 0;
+ return ret ? 0 : 1;
+}
+EOC
+cyn=getrlimit
+set d_getrlimit
+eval $trylink
+
diff --git a/mcon/U/d_gettext.U b/mcon/U/d_gettext.U
new file mode 100644
index 0000000..217326c
--- /dev/null
+++ b/mcon/U/d_gettext.U
@@ -0,0 +1,37 @@
+?RCS: $Id: d_gettext.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_gettext: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_gettext:
+?S: This variable conditionally defines the HAS_GETTEXT symbol, which
+?S: indicates to the C program that the gettext() routine is available.
+?S:.
+?C:HAS_GETTEXT:
+?C: This symbol, if defined, indicates that the gettext routine is
+?C: available.
+?C:.
+?H:#$d_gettext HAS_GETTEXT /**/
+?H:.
+?LINT:set d_gettext
+: see if gettext exists
+$cat >try.c <<EOC
+#include <libintl.h>
+int main(void)
+{
+ static char ret;
+ ret |= *gettext("msgid");
+ return ret ? 0 : 1;
+}
+EOC
+cyn=gettext
+set d_gettext -lintl
+eval $trylink
+
diff --git a/mcon/U/d_getuid.U b/mcon/U/d_getuid.U
new file mode 100644
index 0000000..8483228
--- /dev/null
+++ b/mcon/U/d_getuid.U
@@ -0,0 +1,40 @@
+?RCS: $Id: d_getuid.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_getuid: Trylink cat i_unistd
+?MAKE: -pick add $@ %<
+?S:d_getuid:
+?S: This variable conditionally defines the HAS_GETUID symbol, which
+?S: indicates to the C program that getuid() is available.
+?S:.
+?C:HAS_GETUID:
+?C: This symbol is defined when getuid() can be used.
+?C:.
+?H:#$d_getuid HAS_GETUID
+?H:.
+?LINT: set d_getuid
+: can we use getuid?
+$cat >try.c <<EOC
+#include <sys/types.h>
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static uid_t ret;
+ ret |= getuid();
+ return ret ? 0 : 1;
+}
+EOC
+cyn=getuid
+set d_getuid
+eval $trylink
+
diff --git a/mcon/U/d_getwd.U b/mcon/U/d_getwd.U
index 9a2bcf3..acb236f 100644
--- a/mcon/U/d_getwd.U
+++ b/mcon/U/d_getwd.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_getwd.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_getwd.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_getwd.U,v $
?RCS: Revision 3.0 1993/08/18 12:06:18 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_getwd: Csym Setvar
+?MAKE:d_getwd: Trylink cat i_unistd
?MAKE: -pick add $@ %<
?S:d_getwd:
?S: This variable conditionally defines HAS_GETWD if getwd() is
@@ -28,14 +28,21 @@
?H:.
?LINT:set d_getwd
: see if getwd exists
-echo " "
-if set getwd val -f d_getwd; eval $csym; $val; then
- echo 'getwd() found.' >&4
- val="$define"
-else
- echo 'getwd() not found. Assuming getcwd() exists.' >&4
- val="$undef"
-fi
+$cat >try.c <<EOC
+#include <sys/param.h>
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static char ret;
+ static char buf[MAXPATHLEN];
+ ret |= *getwd(buf);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=getwd
set d_getwd
-eval $setvar
+eval $trylink
diff --git a/mcon/U/d_gnugettext.U b/mcon/U/d_gnugettext.U
new file mode 100644
index 0000000..6475738
--- /dev/null
+++ b/mcon/U/d_gnugettext.U
@@ -0,0 +1,54 @@
+?RCS: $Id: d_gnugettext.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_gnugettext: Myread Setvar cat d_nls +cc +ccflags +ldflags +libs
+?MAKE: -pick add $@ %<
+?S:d_gnugettext:
+?S: This variable conditionally defines HAS_GNU_GETTEXT
+?S:.
+?C:HAS_GNU_GETTEXT:
+?C: This symbol, if defined, indicates that GNU gettext() is available.
+?C:.
+?H:#$d_gnugettext HAS_GNU_GETTEXT /**/
+?H:.
+?F:!t.c !t
+?LINT:set d_gnugettext
+?LINT:usefile t t.c
+: determine whether we have GNU 'gettext()'
+echo " "
+case "$d_nls" in
+"$define")
+ echo "Looking for GNU gettext()..." >&4
+ $cat >t.c <<'EOC'
+#include <libintl.h>
+extern int _nl_msg_cat_cntr;
+extern int *_nl_domain_bindings;
+int main()
+{
+ bindtextdomain ("", "");
+ return (int) gettext ("") + _nl_msg_cat_cntr + *_nl_domain_bindings;
+}
+EOC
+ if $cc $ccflags $ldflags -o t t.c $libs >/dev/null 2>&1; then
+ echo "Yes, you have the GNU version." >&4
+ val="$define"
+ else
+ echo "No, you don't have the GNU version." >&4
+ val="$undef"
+ fi
+ ;;
+*)
+ echo "You don't have NLS, you can't have GNU gettext()!" >&4
+ val="$undef"
+ ;;
+esac
+set d_gnugettext
+eval $setvar
+
diff --git a/mcon/U/d_gnulibc.U b/mcon/U/d_gnulibc.U
index 12effdd..77f2ba5 100644
--- a/mcon/U/d_gnulibc.U
+++ b/mcon/U/d_gnulibc.U
@@ -1,13 +1,13 @@
-?RCS: $Id: d_gnulibc.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_gnulibc.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1996,1998 Andy Dougherty
?RCS: Copyright (c) 1996, Sven Verdoolaege
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?MAKE:d_gnulibc gnulibc_version: Myread Oldconfig Setvar rm \
diff --git a/mcon/U/d_group.U b/mcon/U/d_group.U
index b3817aa..84669da 100644
--- a/mcon/U/d_group.U
+++ b/mcon/U/d_group.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_group.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_group.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
diff --git a/mcon/U/d_havetlib.U b/mcon/U/d_havetlib.U
index c24f119..4282042 100644
--- a/mcon/U/d_havetlib.U
+++ b/mcon/U/d_havetlib.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_havetlib.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_havetlib.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_havetlib.U,v $
diff --git a/mcon/U/d_herror.U b/mcon/U/d_herror.U
new file mode 100644
index 0000000..0fd9b2c
--- /dev/null
+++ b/mcon/U/d_herror.U
@@ -0,0 +1,36 @@
+?RCS: $Id: d_herror.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_herror: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_herror:
+?S: This variable conditionally defines the HAS_HERROR symbol, which
+?S: indicates to the C program that the herror() routine is available.
+?S:.
+?C:HAS_HERROR:
+?C: This symbol, if defined, indicates that the herror routine is
+?C: available.
+?C:.
+?H:#$d_herror HAS_HERROR /**/
+?H:.
+?LINT:set d_herror
+: see if herror exists
+$cat >try.c <<EOC
+#include <netdb.h>
+int main(void)
+{
+ herror("string");
+ return 0;
+}
+EOC
+cyn=herror
+set d_herror
+eval $trylink
+
diff --git a/mcon/U/d_hidnet.U b/mcon/U/d_hidnet.U
index d7a66bc..e87b425 100644
--- a/mcon/U/d_hidnet.U
+++ b/mcon/U/d_hidnet.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_hidnet.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_hidnet.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_hidnet.U,v $
diff --git a/mcon/U/d_hstrerror.U b/mcon/U/d_hstrerror.U
new file mode 100644
index 0000000..0067af4
--- /dev/null
+++ b/mcon/U/d_hstrerror.U
@@ -0,0 +1,37 @@
+?RCS: $Id: d_hstrerror.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_hstrerror: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_hstrerror:
+?S: This variable conditionally defines the HAS_HSTRERROR symbol, which
+?S: indicates to the C program that the hstrerror() routine is available.
+?S:.
+?C:HAS_HSTRERROR:
+?C: This symbol, if defined, indicates that the hstrerror routine is
+?C: available.
+?C:.
+?H:#$d_hstrerror HAS_HSTRERROR /**/
+?H:.
+?LINT:set d_hstrerror
+: see if hstrerror exists
+$cat >try.c <<EOC
+#include <netdb.h>
+int main(void)
+{
+ static char ret;
+ ret |= *hstrerror(1);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=hstrerror
+set d_hstrerror
+eval $trylink
+
diff --git a/mcon/U/d_htonl.U b/mcon/U/d_htonl.U
index 7a08b7b..9e82b91 100644
--- a/mcon/U/d_htonl.U
+++ b/mcon/U/d_htonl.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_htonl.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_htonl.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_htonl.U,v $
@@ -18,8 +18,7 @@
?RCS: Revision 3.0 1993/08/18 12:06:22 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_htonl: Inlibc Setvar i_niin i_sysin cat rm contains \
- cppstdin cppflags cppminus
+?MAKE:d_htonl: Trylink cat i_niin i_sysin
?MAKE: -pick add $@ %<
?S:d_htonl:
?S: This variable conditionally defines HAS_HTONL if htonl() and its
@@ -50,39 +49,32 @@
?H:#$d_htonl HAS_NTOHL /**/
?H:#$d_htonl HAS_NTOHS /**/
?H:.
-?F:!htonl.c
?LINT:set d_htonl
-: see if htonl --and friends-- exists
-val=''
-set htonl val
-eval $inlibc
-
-: Maybe they are macros.
-case "$val" in
-$undef)
- $cat >htonl.c <<EOM
+: see if htonl --and friends-- exist
+$cat >try.c <<EOC
#include <stdio.h>
#include <sys/types.h>
#$i_niin I_NETINET_IN
-#$i_sysin I_SYS_IN
#ifdef I_NETINET_IN
#include <netinet/in.h>
#endif
+#$i_sysin I_SYS_IN
#ifdef I_SYS_IN
#include <sys/in.h>
#endif
-#ifdef htonl
-printf("Defined as a macro.");
-#endif
-EOM
- $cppstdin $cppflags $cppminus < htonl.c >htonl.E 2>/dev/null
- if $contains 'Defined as a macro' htonl.E >/dev/null 2>&1; then
- val="$define"
- echo "But it seems to be defined as a macro." >&4
- fi
- $rm -f htonl.?
- ;;
-esac
+int main(int argc, char *argv[])
+{
+ static unsigned long ret;
+ unsigned char val = argc;
+ (void) argv;
+ ret |= htonl(val);
+ ret |= htons(val);
+ ret |= ntohl(val);
+ ret |= ntohs(val);
+ return ret ? 0 : 1;
+}
+EOC
+cyn="whether htonl() and friends exist"
set d_htonl
-eval $setvar
+eval $trylink
diff --git a/mcon/U/d_iconv.U b/mcon/U/d_iconv.U
new file mode 100644
index 0000000..e9020eb
--- /dev/null
+++ b/mcon/U/d_iconv.U
@@ -0,0 +1,47 @@
+?RCS: $Id: d_iconv.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_iconv: Trylink cat i_iconv
+?MAKE: -pick add $@ %<
+?S:d_iconv:
+?S: This variable conditionally defines the HAS_ICONV symbol, which
+?S: indicates to the C program that the iconv() routine from iconv is
+?S: available.
+?S:.
+?C:HAS_ICONV:
+?C: This symbol, if defined, indicates that the iconv iconv() routine is
+?C: available.
+?C:.
+?H:#$d_iconv HAS_ICONV /**/
+?H:.
+?LINT:set d_iconv
+: see if iconv exists
+$cat >try.c <<EOC
+#include <sys/types.h>
+#$i_iconv I_ICONV
+#ifdef I_ICONV
+#include <iconv.h>
+#endif
+int main(void)
+{
+ static size_t n, srcleft, dstleft;
+ static char *src, *dst;
+ static int ret;
+ iconv_t cd;
+ cd = iconv_open("ISO8859-1", "UTF-8");
+ n |= iconv(cd, (void *) &src, &srcleft, (void *) &dst, &dstleft);
+ ret |= iconv_close(cd);
+ return 0 != ret;
+}
+EOC
+cyn=iconv
+set d_iconv '-liconv'
+eval $trylink
+
diff --git a/mcon/U/d_ieee754.U b/mcon/U/d_ieee754.U
new file mode 100644
index 0000000..1abb0aa
--- /dev/null
+++ b/mcon/U/d_ieee754.U
@@ -0,0 +1,88 @@
+?RCS:
+?RCS: Copyright (c) 2012 Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_ieee754 ieee754_byteorder: cat contains echo n c \
+ Myread Oldconfig Loc Setvar +cc +ccflags rm _o
+?MAKE: -pick add $@ %<
+?S:d_ieee754:
+?S: This variable conditionally defines the USE_IEEE754_FLOAT symbol,
+?S: which indicates to the C program that floats and doubles use the
+?S: IEEE-754 format.
+?S:.
+?S:ieee754_byteorder:
+?S: This variable holds the IEEE float byte order. In the following, larger
+?S: digits indicate more significance. The variable byteorder is either 4321
+?S: on a big-endian machine, or 1234 on a little-endian one.
+?S: cannot figure it out.
+?S:.
+?C:USE_IEEE754_FLOAT:
+?C: When defined, this symbol indicates that float and double values are
+?C: stored using the IEEE-754 floating point format. See IEEE754_BYTEORDER
+?C: to determine the endianness in case these values need to be serialized.
+?C:.
+?C:IEEE754_BYTEORDER:
+?C: This symbol holds the hexadecimal constant defined in ieee754_byteorder,
+?C: i.e. 1234 for little-endian or 4321 for big-ending floats. It is 0 when
+?C: floats are not stored in IEEE-754 format.
+?C:.
+?H:#$d_ieee754 USE_IEEE754_FLOAT
+?H:#define IEEE754_BYTEORDER 0x$ieee754_byteorder /* large digits for MSB */
+?H:.
+?T:order
+?F:!str !try.c
+?LINT:set d_ieee754
+: check for ieee754 float and their endianness
+?X:
+?X: An idea from Guido Draheim <Guido.Draheim@gmx.de> checking the endianness
+?X: without actually executing code, which allows cross-compiling.
+?X:
+echo " "
+$echo $n "Checking IEEE-754 float byte-ordering...$c" >&4
+$cat >try.c <<'EOCP'
+float ascii_le[] = {
+ 3223.213134765625, 6.8273612896518898e-07, 1.9753562586009612e+31, 0 };
+float ascii_be[] = {
+ 865942.3125, 6.7652519659605424e+22, 1.9695089292781631e-07, 0 };
+EOCP
+order=0
+val=''
+if $cc -c $ccflags try.c >/dev/null 2>&1; then
+ if $contains ISieee754Sys try$_o >/dev/null 2>&1; then
+ val=$define
+ order=4321
+ elif $contains isIEEE754Sys try$_o >/dev/null 2>&1; then
+ val=$define
+ order=1234
+?X:
+?X: On Solaris, "grep" does not work on binary files -- use strings.
+?X:
+ else
+ strings try$_o >str 2>/dev/null
+ if $contains ISieee754Sys str >/dev/null 2>&1; then
+ val=$define
+ order=4321
+ elif $contains isIEEE754Sys str >/dev/null 2>&1; then
+ val=$define
+ order=1234
+ else
+ val=$undef
+ fi
+ $rm -f str
+ fi
+fi
+set d_ieee754
+eval $setvar
+case "$order" in
+0) echo " not using IEEE-754 here." >&4;;
+1234) echo " little-endian." >&4;;
+4321) echo " big-endian." >&4;;
+esac
+ieee754_byteorder=$order
+$rm -f try.c try$_o
+
diff --git a/mcon/U/d_inetaton.U b/mcon/U/d_inetaton.U
index 4bebd14..b160ba2 100644
--- a/mcon/U/d_inetaton.U
+++ b/mcon/U/d_inetaton.U
@@ -1,19 +1,19 @@
-?RCS: $Id: d_inetaton.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_inetaton.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1996, Spider Boardman
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_inetaton.U,v $
?RCS: Revision 3.0.1.1 1997/02/28 15:36:35 ram
?RCS: patch61: created
?RCS:
-?MAKE:d_inetaton: Inlibc
+?MAKE:d_inetaton: Trylink cat i_arpainet
?MAKE: -pick add $@ %<
?S:d_inetaton:
?S: This variable conditionally defines the HAS_INET_ATON symbol, which
@@ -29,6 +29,20 @@
?H:.
?LINT:set d_inetaton
: check whether inet_aton exists
-set inet_aton d_inetaton
-eval $inlibc
+$cat >try.c <<EOC
+#$i_arpainet I_ARPA_INET
+#ifdef I_ARPA_INET
+#include <arpa/inet.h>
+#endif
+int main(void)
+{
+ static int ret;
+ static struct in_addr addr;
+ ret |= inet_aton("0.0.0.0", &addr);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=inet_aton
+set d_inetaton
+eval $trylink
diff --git a/mcon/U/d_inetd.U b/mcon/U/d_inetd.U
index 65787f4..7a6bf97 100644
--- a/mcon/U/d_inetd.U
+++ b/mcon/U/d_inetd.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_inetd.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_inetd.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_inetd.U,v $
diff --git a/mcon/U/d_inflate.U b/mcon/U/d_inflate.U
new file mode 100644
index 0000000..7488596
--- /dev/null
+++ b/mcon/U/d_inflate.U
@@ -0,0 +1,42 @@
+?RCS: $Id: d_inflate.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_inflate: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_inflate:
+?S: This variable conditionally defines the HAS_INFLATE symbol, which
+?S: indicates to the C program that the inflate() routine from zlib is
+?S: available.
+?S:.
+?C:HAS_INFLATE:
+?C: This symbol, if defined, indicates that the zlib inflate() routine is
+?C: available.
+?C:.
+?H:#$d_inflate HAS_INFLATE /**/
+?H:.
+?LINT:set d_inflate
+: see if inflate exists
+$cat >try.c <<EOC
+#include <zlib.h>
+int main(void)
+{
+ static int ret, flush;
+ static z_stream zs;
+ flush |= Z_SYNC_FLUSH;
+ flush |= Z_FULL_FLUSH;
+ flush |= Z_FINISH;
+ ret |= inflate(&zs, flush);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=inflate
+set d_inflate '-lz'
+eval $trylink
+
diff --git a/mcon/U/d_initstate.U b/mcon/U/d_initstate.U
new file mode 100644
index 0000000..020c75d
--- /dev/null
+++ b/mcon/U/d_initstate.U
@@ -0,0 +1,43 @@
+?RCS: $Id: d_initstate.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_initstate: Trylink cat i_stdlib
+?MAKE: -pick add $@ %<
+?S:d_initstate:
+?S: This variable conditionally defines the HAS_INITSTATE symbol, which
+?S: indicates to the C program that the initstate() routine is available
+?S: to initialize the random() number generator.
+?S:.
+?C:HAS_INITSTATE:
+?C: This symbol, if defined, indicates that the initstate routine is
+?C: available to initialize the random() number generator.
+?C:.
+?H:#$d_initstate HAS_INITSTATE /**/
+?H:.
+?LINT:set d_initstate
+: see if initstate exists
+$cat >try.c <<EOC
+#$i_stdlib I_STDLIB
+#ifdef I_STDLIB
+#include <stdlib.h>
+#endif
+int main(void)
+{
+ static long state[31];
+ static size_t size;
+ static char ret;
+ ret |= *initstate(1U, (char *) state, size);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=initstate
+set d_initstate
+eval $trylink
+
diff --git a/mcon/U/d_internet.U b/mcon/U/d_internet.U
index 0451f18..9f602b6 100644
--- a/mcon/U/d_internet.U
+++ b/mcon/U/d_internet.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_internet.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_internet.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_internet.U,v $
diff --git a/mcon/U/d_iptos.U b/mcon/U/d_iptos.U
new file mode 100644
index 0000000..ddb6d50
--- /dev/null
+++ b/mcon/U/d_iptos.U
@@ -0,0 +1,94 @@
+?RCS: $Id: d_iptos.U 170 2013-08-30 16:47:47Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_iptos: cat rm contains cppstdin cppflags cppminus d_windows \
+ i_niin i_sysin i_niip i_syssock i_winsock2 i_ws2tcpip test Setvar
+?MAKE: -pick add $@ %<
+?S:d_iptos:
+?S: This variable conditionally defines the USE_IP_TOS symbol, which
+?S: indicates to the C program that the IP TOS services are available.
+?S:.
+?C:USE_IP_TOS:
+?C: This symbol, if defined, indicates that the IP TOS services are
+?C: available and can be used. Be prepared to include <sys/socket.h>,
+?C: either <netinet/in.h> or <sys/in.h>, and <netinet/ip.h> when
+?C: I_NETINET_IP is defined.
+?C:.
+?H:#$d_iptos USE_IP_TOS /**/
+?H:.
+?F:!iptos !iptos.h
+?T:inh
+?LINT:set d_iptos
+?LINT:usefile iptos.h
+: check for IP TOS support
+echo " "
+echo "Checking whether IP TOS (Type of Service) support is available..." >&4
+case "$i_niin" in
+"$define") inh=netinet/in.h;;
+*)
+ case "$i_sysin" in
+ "$define") inh=sys/in.h;;
+ *)
+ case "$i_ws2tcpip" in
+ "$define") inh=Ws2tcpip.h;;
+ esac
+ ;;
+ esac
+ ;;
+esac
+$cat >iptos <<EOM
+#$i_syssock I_SYS_SOCKET
+#$i_winsock2 I_WINSOCK2
+#$d_windows WINDOWS_SYSTEM
+#ifdef WINDOWS_SYSTEM
+#define WINVER 0x0501
+#endif
+#ifdef I_SYS_SOCKET
+#include <sys/socket.h>
+#endif
+#ifdef I_WINSOCK2
+#include <Winsock2.h>
+#endif
+#include <$inh>
+#if defined(IP_TOS) && defined(IPTOS_LOWDELAY) && defined(IPTOS_THROUGHPUT)
+YES
+#endif
+EOM
+$cppstdin $cppflags $cppminus <iptos >iptos.h 2>/dev/null
+val="$undef"
+if $contains YES iptos.h >/dev/null 2>&1; then
+ val="$define"
+ echo "You have IP TOS support in <$inh>." >&4
+elif $test "x$i_niip" = "x$define"; then
+ $cat >iptos <<EOM
+#$i_syssock I_SYS_SOCKET
+#ifdef I_SYS_SOCKET
+#include <sys/socket.h>
+#endif
+#include <$inh>
+#include <netinet/ip.h>
+#if defined(IP_TOS) && defined(IPTOS_LOWDELAY) && defined(IPTOS_THROUGHPUT)
+YES
+#endif
+EOM
+ $cppstdin $cppflags $cppminus <iptos >iptos.h 2>/dev/null
+ if $contains YES iptos.h >/dev/null 2>&1; then
+ val="$define"
+ echo "You have IP TOS support in <netinet/ip.h>." >&4
+ fi
+fi
+case "$val" in
+"$define") ;;
+*) echo "Sorry, you seem to be lacking IP TOS support." >&4;;
+esac
+set d_iptos
+eval $setvar
+$rm -f iptos iptos.h
+
diff --git a/mcon/U/d_ipv6.U b/mcon/U/d_ipv6.U
new file mode 100644
index 0000000..94a0a80
--- /dev/null
+++ b/mcon/U/d_ipv6.U
@@ -0,0 +1,91 @@
+?RCS: $Id: d_ipv6.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_ipv6: Assert Trylink cat i_arpainet i_netdb i_syssock i_niin \
+ i_winsock2 i_ws2tcpip
+?MAKE: -pick add $@ %<
+?S:d_ipv6:
+?S: This variable conditionally defines HAS_IPV6.
+?S:.
+?C:HAS_IPV6:
+?C: This symbol is defined when IPv6 can be used
+?C:.
+?H:#$d_ipv6 HAS_IPV6 /**/
+?H:.
+?LINT:set d_ipv6
+: determine whether IPv6 can be used
+case "$d_ipv6" in
+"$undef")
+ echo "IPv6 support is disabled." >&4
+;;
+*)
+ $cat >try.c <<EOC
+#$i_syssock I_SYS_SOCKET
+#$i_winsock2 I_WINSOCK2
+#$i_ws2tcpip I_WS2TCPIP
+#$i_niin I_NETINET_IN
+#$i_arpainet I_ARPA_INET
+#$i_netdb I_NETDB
+#include <sys/types.h>
+#ifdef I_SYS_SOCKET
+#include <sys/socket.h>
+#endif
+#ifdef I_NETINET_IN
+#include <netinet/in.h>
+#endif
+#ifdef I_ARPA_INET
+#include <arpa/inet.h>
+#endif
+#ifdef I_NETDB
+#include <netdb.h>
+#endif
+#ifdef I_WINSOCK2
+#include <Winsock2.h>
+#endif
+#ifdef I_WS2TCPIP
+#include <Ws2tcpip.h>
+#endif
+#include "static_assert.h"
+
+int main(void)
+{
+ struct sockaddr_storage ss;
+ struct sockaddr_in6 sin6;
+ static struct in6_addr in6;
+
+ ss.ss_family = PF_INET6;
+
+ sin6.sin6_family = AF_INET6;
+ sin6.sin6_port = 6346;
+ sin6.sin6_flowinfo = 23UL;
+ sin6.sin6_scope_id = 42UL;
+ sin6.sin6_addr = in6;
+ sin6.sin6_addr.s6_addr[0] = in6.s6_addr[0];
+
+ STATIC_ASSERT(AF_INET6 == PF_INET6);
+ STATIC_ASSERT(sizeof in6 == sizeof sin6.sin6_addr);
+ STATIC_ASSERT(16 == sizeof sin6.sin6_addr.s6_addr);
+ STATIC_ASSERT(2 == sizeof sin6.sin6_port);
+ STATIC_ASSERT(4 == sizeof sin6.sin6_flowinfo);
+ STATIC_ASSERT(4 == sizeof sin6.sin6_scope_id);
+
+ (void) sin6;
+ (void) in6;
+
+ return 0;
+}
+EOC
+
+ cyn="whether IPv6 support is available"
+ set d_ipv6
+ eval $trylink
+ ;;
+esac
+
diff --git a/mcon/U/d_isascii.U b/mcon/U/d_isascii.U
index cb3f9ca..fb008ed 100644
--- a/mcon/U/d_isascii.U
+++ b/mcon/U/d_isascii.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_isascii.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_isascii.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
@@ -17,7 +17,7 @@
?RCS: Revision 3.0.1.1 1994/08/29 16:09:32 ram
?RCS: patch32: created by ADO
?RCS:
-?MAKE:d_isascii: cc cat ccflags ldflags rm libs Setvar
+?MAKE:d_isascii: Trylink cat
?MAKE: -pick add $@ %<
?S:d_isascii:
?S: This variable conditionally defines the HAS_ISASCII constant,
@@ -30,28 +30,17 @@
?H:#$d_isascii HAS_ISASCII /**/
?H:.
?LINT:set d_isascii
-?X: Can't use Inlibc because isascii() might be a macro.
: Look for isascii
-echo " "
-$cat >isascii.c <<'EOCP'
-#include <stdio.h>
+$cat >try.c <<EOC
#include <ctype.h>
-int main() {
- int c = 'A';
- if (isascii(c))
- exit(0);
- else
- exit(1);
+int main(void)
+{
+ static int ret, c;
+ ret |= isascii(c);
+ return ret ? 0 : 1;
}
-EOCP
-if $cc $ccflags $ldflags -o isascii isascii.c $libs >/dev/null 2>&1 ; then
- echo "isascii() found." >&4
- val="$define"
-else
- echo "isascii() NOT found." >&4
- val="$undef"
-fi
+EOC
+cyn=isascii
set d_isascii
-eval $setvar
-$rm -f isascii*
+eval $trylink
diff --git a/mcon/U/d_itimer.U b/mcon/U/d_itimer.U
index 6f021da..73325e4 100644
--- a/mcon/U/d_itimer.U
+++ b/mcon/U/d_itimer.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_itimer.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_itimer.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_itimer.U,v $
?RCS: Revision 3.0 1993/08/18 12:06:25 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_itimer: Inlibc
+?MAKE:d_itimer: Trylink cat
?MAKE: -pick add $@ %<
?S:d_itimer:
?S: This variable conditionally defines the HAS_ITIMER symbol, which
@@ -27,6 +27,20 @@
?H:.
?LINT:set d_itimer
: see if setitimer exists
-set setitimer d_itimer
-eval $inlibc
+$cat >try.c <<EOC
+#include <sys/time.h>
+int main(void)
+{
+ static int ret;
+ static struct itimerval val, old;
+
+ ret |= setitimer(ITIMER_REAL, &val, &old);
+ ret |= setitimer(ITIMER_VIRTUAL, &val, &old);
+ ret |= setitimer(ITIMER_PROF, &val, &old);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=setitimer
+set d_itimer
+eval $trylink
diff --git a/mcon/U/d_keepsig.U b/mcon/U/d_keepsig.U
index 3dbac4b..e2a1d6a 100644
--- a/mcon/U/d_keepsig.U
+++ b/mcon/U/d_keepsig.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_keepsig.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_keepsig.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_keepsig.U,v $
diff --git a/mcon/U/d_kevent_udata.U b/mcon/U/d_kevent_udata.U
new file mode 100644
index 0000000..7f5dc08
--- /dev/null
+++ b/mcon/U/d_kevent_udata.U
@@ -0,0 +1,49 @@
+?RCS: $Id: d_kevent_udata.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_kevent_int_udata: Trylink cat d_kqueue
+?MAKE: -pick add $@ %<
+?S:d_kevent_int_udata:
+?S: This variable conditionally defines the HAS_KEVENT_INT_UDATA symbol,
+?S: which indicates to the C program that struct kevent has an
+?S: integer member udata.
+?S:.
+?C:HAS_KEVENT_INT_UDATA:
+?C: This symbol, if defined, indicates that struct kevent has an
+?C: integer member udata.
+?C:.
+?H:#$d_kevent_int_udata HAS_KEVENT_INT_UDATA /**/
+?H:.
+?LINT:set d_kevent_int_udata
+: check whether udata in struct kevent is an integer
+case "$d_kqueue" in
+"$define")
+ $cat >try.c <<EOC
+#include <sys/types.h>
+#include <sys/event.h>
+#include <sys/time.h>
+int main(void)
+{
+ static struct kevent ev;
+ ev.udata |= 1;
+ return 0;
+}
+EOC
+
+ cyn="whether member 'udata' of 'struct kevent' is an integer"
+ set d_kevent_int_udata
+ eval $trylink
+ ;;
+*)
+ val="$undef"
+ set d_kevent_int_udata
+ eval $setvar
+esac
+
diff --git a/mcon/U/d_killpg.U b/mcon/U/d_killpg.U
index 53d7eca..00113eb 100644
--- a/mcon/U/d_killpg.U
+++ b/mcon/U/d_killpg.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_killpg.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_killpg.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_killpg.U,v $
?RCS: Revision 3.0 1993/08/18 12:06:27 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_killpg: Inlibc
+?MAKE:d_killpg: Trylink cat
?MAKE: -pick add $@ %<
?S:d_killpg:
?S: This variable conditionally defines the HAS_KILLPG symbol, which
@@ -28,6 +28,18 @@
?H:.
?LINT:set d_killpg
: see if killpg exists
-set killpg d_killpg
-eval $inlibc
+$cat >try.c <<EOC
+#include <sys/types.h>
+#include <signal.h>
+int main(void)
+{
+ static pid_t pid;
+ static int ret, sig;
+ ret |= killpg(pid, sig);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=killpg
+set d_killpg
+eval $trylink
diff --git a/mcon/U/d_kqueue.U b/mcon/U/d_kqueue.U
new file mode 100644
index 0000000..a69cf0b
--- /dev/null
+++ b/mcon/U/d_kqueue.U
@@ -0,0 +1,57 @@
+?RCS: $Id: d_kqueue.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_kqueue: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_kqueue:
+?S: This variable conditionally defines the HAS_KQUEUE symbol, which
+?S: indicates to the C program that kqueue() support is available.
+?S:.
+?C:HAS_KQUEUE:
+?C: This symbol is defined when kqueue() can be used.
+?C:.
+?H:#$d_kqueue HAS_KQUEUE
+?H:.
+?LINT: set d_kqueue
+: can we use kqueue?
+$cat >try.c <<'EOC'
+#include <sys/types.h>
+#include <sys/event.h>
+#include <sys/time.h>
+int main(void)
+{
+ static struct kevent changes, events;
+ static struct timespec ts;
+ static unsigned long filter;
+ static int kq, fd;
+ static unsigned long flags;
+ filter |= EVFILT_READ;
+ filter |= EVFILT_WRITE;
+ filter |= EVFILT_SIGNAL;
+ filter |= EVFILT_VNODE;
+ filter |= EVFILT_PROC;
+ flags |= EV_ADD;
+ flags |= EV_ENABLE;
+ flags |= EV_ONESHOT;
+ flags |= EV_CLEAR;
+ flags |= EV_EOF;
+ flags |= EV_ERROR;
+ flags |= EV_DISABLE;
+ flags |= EV_DELETE;
+ EV_SET(&changes, fd, filter, flags, 0, 0, 0);
+ kq |= kqueue();
+ kevent(kq, &changes, 1, &events, 1, &ts);
+ return 0;
+}
+EOC
+cyn=kqueue
+set d_kqueue
+eval $trylink
+
diff --git a/mcon/U/d_link.U b/mcon/U/d_link.U
index 0e1c32f..f08ced7 100644
--- a/mcon/U/d_link.U
+++ b/mcon/U/d_link.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_link.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_link.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_link.U,v $
?RCS: Revision 3.0.1.1 1993/08/25 14:01:13 ram
?RCS: patch6: created for completeness
?RCS:
-?MAKE:d_link: Inlibc
+?MAKE:d_link: Trylink cat i_unistd
?MAKE: -pick add $@ %<
?S:d_link:
?S: This variable conditionally defines HAS_LINK if link() is
@@ -26,6 +26,19 @@
?H:.
?LINT:set d_link
: see if link exists
-set link d_link
-eval $inlibc
+$cat >try.c <<EOC
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static int ret;
+ ret |= link("path1", "path2");
+ return ret ? 0 : 1;
+}
+EOC
+cyn=link
+set d_link
+eval $trylink
diff --git a/mcon/U/d_linuxstd.U b/mcon/U/d_linuxstd.U
index e7255a9..c1dd458 100644
--- a/mcon/U/d_linuxstd.U
+++ b/mcon/U/d_linuxstd.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_linuxstd.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_linuxstd.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
diff --git a/mcon/U/d_locale_charset.U b/mcon/U/d_locale_charset.U
new file mode 100644
index 0000000..0cf6760
--- /dev/null
+++ b/mcon/U/d_locale_charset.U
@@ -0,0 +1,39 @@
+?RCS: $Id: d_locale_charset.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_locale_charset: Trylink cat i_libcharset
+?MAKE: -pick add $@ %<
+?S:d_locale_charset:
+?S: This variable conditionally defines the HAS_LOCALE_CHARSET symbol, which
+?S: indicates to the C program that locale_charset() support is available.
+?S:.
+?C:HAS_LOCALE_CHARSET:
+?C: This symbol is defined when locale_charset() can be used.
+?C:.
+?H:#$d_locale_charset HAS_LOCALE_CHARSET
+?H:.
+?LINT: set d_locale_charset
+: can we use locale_charset?
+$cat >try.c <<EOC
+#$i_libcharset I_LIBCHARSET
+#ifdef I_LIBCHARSET
+#include <libcharset.h>
+#endif
+int main(void)
+{
+ static char ret;
+ ret |= *locale_charset();
+ return ret ? 0 : 1;
+}
+EOC
+cyn=locale_charset
+set d_locale_charset
+eval $trylink
+
diff --git a/mcon/U/d_locconv.U b/mcon/U/d_locconv.U
index 98a2bbc..6b357f6 100644
--- a/mcon/U/d_locconv.U
+++ b/mcon/U/d_locconv.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_locconv.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_locconv.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
@@ -14,7 +14,7 @@
?RCS: Revision 3.0.1.1 1994/10/29 16:14:11 ram
?RCS: patch36: created by ADO
?RCS:
-?MAKE:d_locconv: Inlibc
+?MAKE:d_locconv: Trylink cat i_locale
?MAKE: -pick add $@ %<
?S:d_locconv:
?S: This variable conditionally defines HAS_LOCALECONV if localeconv() is
@@ -28,6 +28,19 @@
?H:.
?LINT:set d_locconv
: see if localeconv exists
-set localeconv d_locconv
-eval $inlibc
+$cat >try.c <<EOC
+#$i_locale I_LOCALE
+#ifdef I_LOCALE
+#include <locale.h>
+#endif
+int main(void)
+{
+ struct lconv *lc;
+ lc = localeconv();
+ return lc ? 0 : 1;
+}
+EOC
+cyn=localeconv
+set d_locconv
+eval $trylink
diff --git a/mcon/U/d_lockf.U b/mcon/U/d_lockf.U
index 2912006..5429d9c 100644
--- a/mcon/U/d_lockf.U
+++ b/mcon/U/d_lockf.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_lockf.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_lockf.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
@@ -14,7 +14,7 @@
?RCS: Revision 3.0.1.1 1994/08/29 16:09:36 ram
?RCS: patch32: created by ADO
?RCS:
-?MAKE:d_lockf: Inlibc
+?MAKE:d_lockf: Trylink cat i_unistd
?MAKE: -pick add $@ %<
?S:d_lockf:
?S: This variable conditionally defines HAS_LOCKF if lockf() is
@@ -28,6 +28,24 @@
?H:.
?LINT:set d_lockf
: see if lockf exists
-set lockf d_lockf
-eval $inlibc
+$cat >try.c <<EOC
+#include <sys/types.h>
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static int fd, ret;
+ static off_t size;
+ ret |= lockf(fd, F_ULOCK, size);
+ ret |= lockf(fd, F_LOCK, size);
+ ret |= lockf(fd, F_TLOCK, size);
+ ret |= lockf(fd, F_TEST, size);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=lockf
+set d_lockf
+eval $trylink
diff --git a/mcon/U/d_lstat.U b/mcon/U/d_lstat.U
index 9c23ecd..876774c 100644
--- a/mcon/U/d_lstat.U
+++ b/mcon/U/d_lstat.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_lstat.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_lstat.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_lstat.U,v $
?RCS: Revision 3.0 1993/08/18 12:06:28 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_lstat: Inlibc
+?MAKE:d_lstat: Trylink cat i_sysstat
?MAKE: -pick add $@ %<
?S:d_lstat:
?S: This variable conditionally defines HAS_LSTAT if lstat() is
@@ -26,6 +26,20 @@
?H:.
?LINT:set d_lstat
: see if lstat exists
-set lstat d_lstat
-eval $inlibc
+$cat >try.c <<EOC
+#$i_sysstat I_SYS_STAT
+#ifdef I_SYS_STAT
+#include <sys/stat.h>
+#endif
+int main(void)
+{
+ static int ret;
+ struct stat sb;
+ ret |= lstat("path", &sb);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=lstat
+set d_lstat
+eval $trylink
diff --git a/mcon/U/d_madvise.U b/mcon/U/d_madvise.U
new file mode 100644
index 0000000..6473b85
--- /dev/null
+++ b/mcon/U/d_madvise.U
@@ -0,0 +1,43 @@
+?RCS: $Id: d_madvise.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_madvise: Trylink cat i_sysmman
+?MAKE: -pick add $@ %<
+?S:d_madvise:
+?S: This variable conditionally defines the HAS_MADVISE symbol, which
+?S: indicates to the C program that the madvise() routine is available.
+?S:.
+?C:HAS_MADVISE:
+?C: This symbol, if defined, indicates that the madvise routine is
+?C: available.
+?C:.
+?H:#$d_madvise HAS_MADVISE /**/
+?H:.
+?LINT:set d_madvise
+: see if madvise exists
+$cat >try.c <<EOC
+#include <sys/types.h>
+#$i_sysmman I_SYS_MMAN
+#ifdef I_SYS_MMAN
+#include <sys/mman.h>
+#endif
+int main(void)
+{
+ static int ret;
+ static void *p;
+ size_t len = 1024;
+ ret |= madvise(p, len, 1);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=madvise
+set d_madvise
+eval $trylink
+
diff --git a/mcon/U/d_mblen.U b/mcon/U/d_mblen.U
index 8090669..db364ad 100644
--- a/mcon/U/d_mblen.U
+++ b/mcon/U/d_mblen.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_mblen.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_mblen.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
@@ -14,7 +14,7 @@
?RCS: Revision 3.0.1.1 1994/08/29 16:09:40 ram
?RCS: patch32: created by ADO
?RCS:
-?MAKE:d_mblen: Inlibc
+?MAKE:d_mblen: Trylink cat i_stdlib
?MAKE: -pick add $@ %<
?S:d_mblen:
?S: This variable conditionally defines the HAS_MBLEN symbol, which
@@ -29,6 +29,20 @@
?H:.
?LINT:set d_mblen
: see if mblen exists
-set mblen d_mblen
-eval $inlibc
+$cat >try.c <<EOC
+#$i_stdlib I_STDLIB
+#ifdef I_STDLIB
+#include <stdlib.h>
+#endif
+int main(void)
+{
+ static int ret;
+ static size_t n;
+ ret |= mblen("xxx", n);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=mblen
+set d_mblen
+eval $trylink
diff --git a/mcon/U/d_mbstowcs.U b/mcon/U/d_mbstowcs.U
index 7dbca7d..fb31d7e 100644
--- a/mcon/U/d_mbstowcs.U
+++ b/mcon/U/d_mbstowcs.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_mbstowcs.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_mbstowcs.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_mbstowcs.U,v $
?RCS: Revision 3.0 1993/08/18 12:06:29 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_mbstowcs: Inlibc
+?MAKE:d_mbstowcs: Trylink cat i_stdlib
?MAKE: -pick add $@ %<
?S:d_mbstowcs:
?S: This variable conditionally defines the HAS_MBSTOWCS symbol, which
@@ -27,6 +27,20 @@
?H:.
?LINT:set d_mbstowcs
: see if mbstowcs exists
-set mbstowcs d_mbstowcs
-eval $inlibc
+$cat >try.c <<EOC
+#$i_stdlib I_STDLIB
+#ifdef I_STDLIB
+#include <stdlib.h>
+#endif
+int main(void)
+{
+ static size_t n, ret;
+ static wchar_t wcs;
+ ret |= mbstowcs(&wcs, "xxx", n);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=mbstowcs
+set d_mbstowcs
+eval $trylink
diff --git a/mcon/U/d_mbtowc.U b/mcon/U/d_mbtowc.U
index 809a82d..a955df0 100644
--- a/mcon/U/d_mbtowc.U
+++ b/mcon/U/d_mbtowc.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_mbtowc.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_mbtowc.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_mbtowc.U,v $
?RCS: Revision 3.0 1993/08/18 12:06:30 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_mbtowc: Inlibc
+?MAKE:d_mbtowc: Trylink cat i_stdlib
?MAKE: -pick add $@ %<
?S:d_mbtowc:
?S: This variable conditionally defines the HAS_MBTOWC symbol, which
@@ -27,6 +27,21 @@
?H:.
?LINT:set d_mbtowc
: see if mbtowc exists
-set mbtowc d_mbtowc
-eval $inlibc
+$cat >try.c <<EOC
+#$i_stdlib I_STDLIB
+#ifdef I_STDLIB
+#include <stdlib.h>
+#endif
+int main(void)
+{
+ static wchar_t wc;
+ static size_t n;
+ static int ret;
+ ret |= mbtowc(&wc, "xxx", n);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=mbtowc
+set d_mbtowc
+eval $trylink
diff --git a/mcon/U/d_memalign.U b/mcon/U/d_memalign.U
index f8c7ef5..8c74f60 100644
--- a/mcon/U/d_memalign.U
+++ b/mcon/U/d_memalign.U
@@ -1,16 +1,16 @@
-?RCS: $Id: d_memalign.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_memalign.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_memalign.U,v $
?RCS:
-?MAKE:d_memalign: Inlibc
+?MAKE:d_memalign: Trylink cat i_stdlib i_malloc
?MAKE: -pick add $@ %<
?S:d_memalign:
?S: This variable conditionally defines the HAS_MEMALIGN symbol, which
@@ -24,6 +24,25 @@
?H:.
?LINT:set d_memalign
: see if memalign exists
-set memalign d_memalign
-eval $inlibc
+$cat >try.c <<EOC
+#define _GNU_SOURCE
+#$i_stdlib I_STDLIB
+#ifdef I_STDLIB
+#include <stdlib.h>
+#endif
+#$i_malloc I_MALLOC
+#ifdef I_MALLOC
+#include <malloc.h>
+#endif
+int main(void)
+{
+ static size_t align, size;
+ void *p;
+ p = memalign(align, size);
+ return p ? 0 : 1;
+}
+EOC
+cyn=memalign
+set d_memalign
+eval $trylink
diff --git a/mcon/U/d_memccpy.U b/mcon/U/d_memccpy.U
index ec8f65c..2e454c5 100644
--- a/mcon/U/d_memccpy.U
+++ b/mcon/U/d_memccpy.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_memccpy.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_memccpy.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_memccpy.U,v $
?RCS: Revision 3.0 1993/08/18 12:06:31 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_memccpy: Inlibc
+?MAKE:d_memccpy: Trylink cat
?MAKE: -pick add $@ %<
?S:d_memccpy:
?S: This variable conditionally defines the HAS_MEMCCPY symbol, which
@@ -28,6 +28,18 @@
?H:.
?LINT:set d_memccpy
: see if memccpy exists
-set memccpy d_memccpy
-eval $inlibc
+$cat >try.c <<EOC
+#include <string.h>
+int main(void)
+{
+ static int dst, src, c;
+ static size_t n;
+ void *p;
+ p = memccpy(&dst, &src, c, n);
+ return p ? 0 : 1;
+}
+EOC
+cyn=memccpy
+set d_memccpy
+eval $trylink
diff --git a/mcon/U/d_memchr.U b/mcon/U/d_memchr.U
index 28a2cc1..22dfa2d 100644
--- a/mcon/U/d_memchr.U
+++ b/mcon/U/d_memchr.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_memchr.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_memchr.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_memchr.U,v $
?RCS: Revision 3.0 1993/08/18 12:06:32 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_memchr: Inlibc
+?MAKE:d_memchr: Trylink cat
?MAKE: -pick add $@ %<
?S:d_memchr:
?S: This variable conditionally defines the HAS_MEMCHR symbol, which
@@ -27,6 +27,18 @@
?H:.
?LINT:set d_memchr
: see if memchr exists
-set memchr d_memchr
-eval $inlibc
+$cat >try.c <<EOC
+#include <string.h>
+int main(void)
+{
+ static char s[] = "xxx";
+ static size_t n = sizeof(s);
+ void *p;
+ p = memchr(s, 'x', n);
+ return p ? 0 : 1;
+}
+EOC
+cyn=memchr
+set d_memchr
+eval $trylink
diff --git a/mcon/U/d_memcmp.U b/mcon/U/d_memcmp.U
index 124033f..f966621 100644
--- a/mcon/U/d_memcmp.U
+++ b/mcon/U/d_memcmp.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_memcmp.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_memcmp.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_memcmp.U,v $
@@ -15,7 +15,7 @@
?RCS: Revision 3.0 1993/08/18 12:06:33 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_memcmp: Inlibc
+?MAKE:d_memcmp: Trylink cat
?MAKE: -pick add $@ %<
?S:d_memcmp:
?S: This variable conditionally defines the HAS_MEMCMP symbol, which
@@ -30,6 +30,16 @@
?H:.
?LINT:set d_memcmp
: see if memcmp exists
-set memcmp d_memcmp
-eval $inlibc
+$cat >try.c <<EOC
+#include <string.h>
+int main(void)
+{
+ static int a, b, ret;
+ ret |= memcmp(&a, &b, sizeof(a));
+ return ret ? 0 : 1;
+}
+EOC
+cyn=memcmp
+set d_memcmp
+eval $trylink
diff --git a/mcon/U/d_memcpy.U b/mcon/U/d_memcpy.U
index e4e6ee9..9ccdb73 100644
--- a/mcon/U/d_memcpy.U
+++ b/mcon/U/d_memcpy.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_memcpy.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_memcpy.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_memcpy.U,v $
@@ -15,7 +15,7 @@
?RCS: Revision 3.0 1993/08/18 12:06:34 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_memcpy: Inlibc
+?MAKE:d_memcpy: Trylink cat
?MAKE: -pick add $@ %<
?S:d_memcpy:
?S: This variable conditionally defines the HAS_MEMCPY symbol, which
@@ -30,6 +30,17 @@
?H:.
?LINT:set d_memcpy
: see if memcpy exists
-set memcpy d_memcpy
-eval $inlibc
+$cat >try.c <<EOC
+#include <string.h>
+int main(void)
+{
+ static char src, dst;
+ void *p;
+ p = memcpy(&dst, &src, sizeof(dst));
+ return p ? 0 : 1;
+}
+EOC
+cyn=memcpy
+set d_memcpy
+eval $trylink
diff --git a/mcon/U/d_memmove.U b/mcon/U/d_memmove.U
index c5a9eaa..dc68899 100644
--- a/mcon/U/d_memmove.U
+++ b/mcon/U/d_memmove.U
@@ -1,23 +1,23 @@
-?RCS: $Id: d_memmove.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_memmove.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_memmove.U,v $
?RCS: Revision 3.0 1993/08/18 12:06:35 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_memmove: Inlibc
+?MAKE:d_memmove: Trylink cat
?MAKE: -pick add $@ %<
?S:d_memmove:
?S: This variable conditionally defines the HAS_MEMMOVE symbol, which
?S: indicates to the C program that the memmove() routine is available
-?S: to copy potentatially overlapping blocks of memory.
+?S: to copy potentially overlapping blocks of memory.
?S:.
?C:HAS_MEMMOVE:
?C: This symbol, if defined, indicates that the memmove routine is available
@@ -29,6 +29,17 @@
?H:.
?LINT:set d_memmove
: see if memmove exists
-set memmove d_memmove
-eval $inlibc
+$cat >try.c <<EOC
+#include <string.h>
+int main(void)
+{
+ static char dst, src;
+ void *p;
+ p = memmove(&dst, &src, sizeof(dst));
+ return p ? 0 : 1;
+}
+EOC
+cyn=memmove
+set d_memmove
+eval $trylink
diff --git a/mcon/U/d_mempcpy.U b/mcon/U/d_mempcpy.U
new file mode 100644
index 0000000..63ccf51
--- /dev/null
+++ b/mcon/U/d_mempcpy.U
@@ -0,0 +1,51 @@
+?RCS:
+?RCS: Copyright (c) 2012 Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_mempcpy: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_mempcpy:
+?S: This variable conditionally defines the HAS_MEMPCPY symbol, which
+?S: indicates to the C program that the mempcpy() routine is available
+?S: to copy blocks of memory and returns a pointer past the last written
+?S: byte.
+?S:.
+?C:HAS_MEMPCPY:
+?C: This symbol, if defined, indicates that the mempcpy routine is available
+?C: to copy blocks of memory, returning a pointer past the last written byte.
+?C:.
+?H:#$d_mempcpy HAS_MEMPCPY /**/
+?H:.
+?LINT:set d_mempcpy
+: see if mempcpy exists
+?X:
+?X: Need some extra code convolutions to avoid gcc's optimizing the mempcpy()
+?X: call with its built-in implementation.
+?X:
+$cat >try.c <<EOC
+#include <string.h>
+
+void *copy(void *d, const void *s, unsigned n)
+{
+ char *q = d;
+ const char *r = s;
+ return mempcpy(q + 4, r + 2, n - 1);
+}
+
+int main(void)
+{
+ static char src, dst;
+ void *p;
+ p = copy(&dst, &src, sizeof(dst));
+ return p ? 0 : 1;
+}
+EOC
+cyn=mempcpy
+set d_mempcpy
+eval $trylink
+
diff --git a/mcon/U/d_memset.U b/mcon/U/d_memset.U
index b7de30a..a6bc597 100644
--- a/mcon/U/d_memset.U
+++ b/mcon/U/d_memset.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_memset.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_memset.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_memset.U,v $
@@ -15,7 +15,7 @@
?RCS: Revision 3.0 1993/08/18 12:06:36 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_memset: Inlibc
+?MAKE:d_memset: Trylink cat
?MAKE: -pick add $@ %<
?S:d_memset:
?S: This variable conditionally defines the HAS_MEMSET symbol, which
@@ -30,6 +30,18 @@
?H:.
?LINT:set d_memset
: see if memset exists
-set memset d_memset
-eval $inlibc
+$cat >try.c <<EOC
+#include <string.h>
+int main(void)
+{
+ static int dst, c;
+ size_t n = sizeof(dst);
+ void *p;
+ p = memset(&dst, c, n);
+ return p ? 0 : 1;
+}
+EOC
+cyn=memset
+set d_memset
+eval $trylink
diff --git a/mcon/U/d_mkdir.U b/mcon/U/d_mkdir.U
index 1c7f0c4..4d2fd8a 100644
--- a/mcon/U/d_mkdir.U
+++ b/mcon/U/d_mkdir.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_mkdir.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_mkdir.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_mkdir.U,v $
?RCS: Revision 3.0 1993/08/18 12:06:37 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_mkdir: Inlibc
+?MAKE:d_mkdir: Trylink cat i_sysstat
?MAKE: -pick add $@ %<
?S:d_mkdir:
?S: This variable conditionally defines the HAS_MKDIR symbol, which
@@ -28,6 +28,21 @@
?H:.
?LINT:set d_mkdir
: see if mkdir exists
-set mkdir d_mkdir
-eval $inlibc
+$cat >try.c <<EOC
+#include <sys/types.h>
+#$i_sysstat I_SYS_STAT
+#ifdef I_SYS_STAT
+#include <sys/stat.h>
+#endif
+int main(void)
+{
+ static int ret;
+ static mode_t mode;
+ ret |= mkdir("path", mode);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=mkdir
+set d_mkdir
+eval $trylink
diff --git a/mcon/U/d_mkfifo.U b/mcon/U/d_mkfifo.U
index 82d33cf..4d7374a 100644
--- a/mcon/U/d_mkfifo.U
+++ b/mcon/U/d_mkfifo.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_mkfifo.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_mkfifo.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
@@ -15,7 +15,7 @@
?RCS: patch36: created by ADO
?RCS:
?RCS:
-?MAKE:d_mkfifo: Inlibc
+?MAKE:d_mkfifo: Trylink cat i_sysstat
?MAKE: -pick add $@ %<
?S:d_mkfifo:
?S: This variable conditionally defines the HAS_MKFIFO symbol, which
@@ -31,6 +31,21 @@
?H:.
?LINT:set d_mkfifo
: see if mkfifo exists
-set mkfifo d_mkfifo
-eval $inlibc
+$cat >try.c <<EOC
+#include <sys/types.h>
+#$i_sysstat I_SYS_STAT
+#ifdef I_SYS_STAT
+#include <sys/stat.h>
+#endif
+int main(void)
+{
+ static int ret;
+ static mode_t mode;
+ ret |= mkfifo("path", mode);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=mkfifo
+set d_mkfifo
+eval $trylink
diff --git a/mcon/U/d_mktime.U b/mcon/U/d_mktime.U
index baf5e10..f623a3e 100644
--- a/mcon/U/d_mktime.U
+++ b/mcon/U/d_mktime.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_mktime.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_mktime.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
@@ -14,7 +14,7 @@
?RCS: Revision 3.0.1.1 1994/08/29 16:09:44 ram
?RCS: patch32: created by ADO
?RCS:
-?MAKE:d_mktime: Inlibc
+?MAKE:d_mktime: Trylink cat
?MAKE: -pick add $@ %<
?S:d_mktime:
?S: This variable conditionally defines the HAS_MKTIME symbol, which
@@ -28,6 +28,17 @@
?H:.
?LINT:set d_mktime
: see if mktime exists
-set mktime d_mktime
-eval $inlibc
+$cat >try.c <<EOC
+#include <time.h>
+int main(void)
+{
+ static struct tm tm;
+ static time_t ret;
+ ret = mktime(&tm);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=mktime
+set d_mktime
+eval $trylink
diff --git a/mcon/U/d_mmap.U b/mcon/U/d_mmap.U
index 7bbbe0a..dd3cfc4 100644
--- a/mcon/U/d_mmap.U
+++ b/mcon/U/d_mmap.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_mmap.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_mmap.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_mmap.U,v $
?RCS: Revision 3.0.1.1 1993/12/15 08:19:12 ram
?RCS: patch15: created
?RCS:
-?MAKE:d_mmap: Inlibc
+?MAKE:d_mmap: Trylink cat i_sysmman
?MAKE: -pick add $@ %<
?S:d_mmap:
?S: This variable conditionally defines HAS_MMAP if mmap() is
@@ -26,6 +26,28 @@
?H:.
?LINT:set d_mmap
: see if mmap exists
-set mmap d_mmap
-eval $inlibc
+$cat >try.c <<EOC
+#include <sys/types.h>
+#$i_sysmman I_SYS_MMAN
+#ifdef I_SYS_MMAN
+#include <sys/mman.h>
+#endif
+int main(void)
+{
+ static off_t offset;
+ static void *addr;
+ static size_t len;
+ static int flags, fd, prot;
+ void *p;
+ flags |= PROT_NONE;
+ flags |= PROT_READ;
+ flags |= PROT_WRITE;
+ flags |= PROT_EXEC;
+ p = mmap(addr, len, prot, flags, fd, offset);
+ return p ? 0 : 1;
+}
+EOC
+cyn=mmap
+set d_mmap
+eval $trylink
diff --git a/mcon/U/d_msem_lck.U b/mcon/U/d_msem_lck.U
index da280c5..4c047f1 100644
--- a/mcon/U/d_msem_lck.U
+++ b/mcon/U/d_msem_lck.U
@@ -1,15 +1,15 @@
-?RCS: $Id: d_msem_lck.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_msem_lck.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_msem_lck.U,v $
-?MAKE:d_msem_lck: Inlibc
+?MAKE:d_msem_lck: Trylink cat i_sysmman
?MAKE: -pick add $@ %<
?S:d_msem_lck:
?S: This variable conditionally defines HAS_MSEM_LOCK if msem_lock() is
@@ -23,6 +23,20 @@
?H:.
?LINT:set d_msem_lck
: see if msem_lock exists
-set msem_lock d_msem_lck
-eval $inlibc
+$cat >try.c <<EOC
+#$i_sysmman I_SYS_MMAN
+#ifdef I_SYS_MMAN
+#include <sys/mman.h>
+#endif
+int main(void)
+{
+ static int ret;
+ static msemaphore *sem;
+ ret |= msem_lock(sem, MSEM_IF_NOWAIT);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=msem_lock
+set d_msem_lck
+eval $trylink
diff --git a/mcon/U/d_msg.U b/mcon/U/d_msg.U
index c261b96..3f7aea7 100644
--- a/mcon/U/d_msg.U
+++ b/mcon/U/d_msg.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_msg.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_msg.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_msg.U,v $
diff --git a/mcon/U/d_msg_flags.U b/mcon/U/d_msg_flags.U
new file mode 100644
index 0000000..d026889
--- /dev/null
+++ b/mcon/U/d_msg_flags.U
@@ -0,0 +1,59 @@
+?RCS: $Id: d_msg_flags.U 170 2013-08-30 16:47:47Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_msghdr_msg_flags: Trylink cat i_systypes i_sysselct i_syssock \
+ i_winsock2 i_mswsock d_windows
+?MAKE: -pick add $@ %<
+?S:d_msghdr_msg_flags:
+?S: This variable conditionally defines the HAS_MSGHDR_MSG_FLAGS symbol,
+?S: which indicates to the C program that struct msghdr has a member
+?S: msg_flags.
+?S:.
+?C:HAS_MSGHDR_MSG_FLAGS:
+?C: This symbol, if defined, indicates that struct msghdr has a
+?C: member msg_flags.
+?C:.
+?H:#$d_msghdr_msg_flags HAS_MSGHDR_MSG_FLAGS /**/
+?H:.
+?LINT:set d_msghdr_msg_flags
+: check for msg_flags in struct msghdr
+$cat >try.c <<EOC
+#$i_systypes I_SYS_TYPES
+#$i_sysselct I_SYS_SELECT
+#$i_syssock I_SYS_SOCKET
+#$i_winsock2 I_WINSOCK2
+#$i_mswsock I_MSWSOCK
+#$d_windows WINDOWS_SYSTEM
+#ifdef WINDOWS_SYSTEM
+#define WINVER 0x0501
+#endif
+#ifdef I_SYS_TYPES
+#include <sys/types.h>
+#endif
+#ifdef I_SYS_SOCKET
+#include <sys/socket.h>
+#endif
+#ifdef I_WINSOCK2
+#include <Winsock2.h>
+#endif
+#ifdef I_MSWSOCK
+#include <Mswsock.h>
+#endif
+int main(void)
+{
+ struct msghdr msg;
+ msg.msg_flags |= 1;
+ return 0;
+}
+EOC
+cyn="whether 'struct msghdr' has a 'msg_flags' member"
+set d_msghdr_msg_flags
+eval $trylink
+
diff --git a/mcon/U/d_msgctl.U b/mcon/U/d_msgctl.U
index 676e40b..5c25eb8 100644
--- a/mcon/U/d_msgctl.U
+++ b/mcon/U/d_msgctl.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_msgctl.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_msgctl.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_msgctl.U,v $
?RCS: Revision 3.0 1993/08/18 12:06:38 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_msgctl: Inlibc
+?MAKE:d_msgctl: Trylink cat
?MAKE: -pick add $@ %<
?S:d_msgctl:
?S: This variable conditionally defines the HAS_MSGCTL symbol, which
@@ -26,6 +26,19 @@
?H:.
?LINT:set d_msgctl
: see if msgctl exists
-set msgctl d_msgctl
-eval $inlibc
+$cat >try.c <<EOC
+#include <sys/msg.h>
+int main(void)
+{
+ static int ret, id;
+ static struct msqid_ds buf;
+ ret |= msgctl(id, IPC_STAT, &buf);
+ ret |= msgctl(id, IPC_SET, &buf);
+ ret |= msgctl(id, IPC_RMID, &buf);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=msgctl
+set d_msgctl
+eval $trylink
diff --git a/mcon/U/d_msgget.U b/mcon/U/d_msgget.U
index 3f7a05f..3dd963a 100644
--- a/mcon/U/d_msgget.U
+++ b/mcon/U/d_msgget.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_msgget.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_msgget.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_msgget.U,v $
?RCS: Revision 3.0 1993/08/18 12:06:39 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_msgget: Inlibc
+?MAKE:d_msgget: Trylink cat
?MAKE: -pick add $@ %<
?S:d_msgget:
?S: This variable conditionally defines the HAS_MSGGET symbol, which
@@ -26,6 +26,20 @@
?H:.
?LINT:set d_msgget
: see if msgget exists
-set msgget d_msgget
-eval $inlibc
+$cat >try.c <<EOC
+#include <sys/msg.h>
+int main(void)
+{
+ static int ret, flags;
+ static key_t key;
+ flags |= IPC_CREAT;
+ flags |= IPC_EXCL;
+ key = IPC_PRIVATE;
+ ret |= msgget(key, flags);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=msgget
+set d_msgget
+eval $trylink
diff --git a/mcon/U/d_msgrcv.U b/mcon/U/d_msgrcv.U
index 990b3f0..436ce52 100644
--- a/mcon/U/d_msgrcv.U
+++ b/mcon/U/d_msgrcv.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_msgrcv.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_msgrcv.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_msgrcv.U,v $
?RCS: Revision 3.0 1993/08/18 12:06:40 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_msgrcv: Inlibc
+?MAKE:d_msgrcv: Trylink cat
?MAKE: -pick add $@ %<
?S:d_msgrcv:
?S: This variable conditionally defines the HAS_MSGRCV symbol, which
@@ -26,6 +26,22 @@
?H:.
?LINT:set d_msgrcv
: see if msgrcv exists
-set msgrcv d_msgrcv
-eval $inlibc
+$cat >try.c <<EOC
+#include <sys/msg.h>
+int main(void)
+{
+ static ssize_t ret;
+ static int id, flags;
+ static size_t size;
+ static long type;
+ static char buf[16];
+ flags |= IPC_CREAT;
+ flags |= IPC_EXCL;
+ ret |= msgrcv(id, &buf, size, type, flags);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=msgrcv
+set d_msgrcv
+eval $trylink
diff --git a/mcon/U/d_msgsnd.U b/mcon/U/d_msgsnd.U
index ee5142c..fb59d52 100644
--- a/mcon/U/d_msgsnd.U
+++ b/mcon/U/d_msgsnd.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_msgsnd.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_msgsnd.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_msgsnd.U,v $
?RCS: Revision 3.0 1993/08/18 12:06:41 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_msgsnd: Inlibc
+?MAKE:d_msgsnd: Trylink cat
?MAKE: -pick add $@ %<
?S:d_msgsnd:
?S: This variable conditionally defines the HAS_MSGSND symbol, which
@@ -26,6 +26,19 @@
?H:.
?LINT:set d_msgsnd
: see if msgsnd exists
-set msgsnd d_msgsnd
-eval $inlibc
+$cat >try.c <<EOC
+#include <sys/msg.h>
+int main(void)
+{
+ static int ret, id, flags;
+ static size_t size;
+ static char buf[16];
+ flags |= IPC_NOWAIT;
+ ret |= msgsnd(id, &buf, size, flags);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=msgsnd
+set d_msgsnd
+eval $trylink
diff --git a/mcon/U/d_msync.U b/mcon/U/d_msync.U
index 2cfb21d..978dc16 100644
--- a/mcon/U/d_msync.U
+++ b/mcon/U/d_msync.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_msync.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_msync.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_msync.U,v $
?RCS: Revision 3.0.1.1 1993/12/15 08:19:17 ram
?RCS: patch15: created
?RCS:
-?MAKE:d_msync: Inlibc
+?MAKE:d_msync: Trylink cat i_sysmman
?MAKE: -pick add $@ %<
?S:d_msync:
?S: This variable conditionally defines HAS_MSYNC if msync() is
@@ -26,6 +26,24 @@
?H:.
?LINT:set d_msync
: see if msync exists
-set msync d_msync
-eval $inlibc
+$cat >try.c <<EOC
+#$i_sysmman I_SYS_MMAN
+#ifdef I_SYS_MMAN
+#include <sys/mman.h>
+#endif
+int main(void)
+{
+ static int ret, flags;
+ static void *addr;
+ static size_t len;
+ flags |= MS_ASYNC;
+ flags |= MS_SYNC;
+ flags |= MS_INVALIDATE;
+ ret |= msync(addr, len, flags);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=msync
+set d_msync
+eval $trylink
diff --git a/mcon/U/d_munmap.U b/mcon/U/d_munmap.U
index 3f375d9..23840ec 100644
--- a/mcon/U/d_munmap.U
+++ b/mcon/U/d_munmap.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_munmap.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_munmap.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_munmap.U,v $
?RCS: Revision 3.0.1.1 1993/12/15 08:19:22 ram
?RCS: patch15: created
?RCS:
-?MAKE:d_munmap: Inlibc
+?MAKE:d_munmap: Trylink cat i_sysmman
?MAKE: -pick add $@ %<
?S:d_munmap:
?S: This variable conditionally defines HAS_MUNMAP if munmap() is
@@ -26,6 +26,21 @@
?H:.
?LINT:set d_munmap
: see if munmap exists
-set munmap d_munmap
-eval $inlibc
+$cat >try.c <<EOC
+#$i_sysmman I_SYS_MMAN
+#ifdef I_SYS_MMAN
+#include <sys/mman.h>
+#endif
+int main(void)
+{
+ static int ret;
+ static void *addr;
+ static size_t len;
+ ret |= munmap(addr, len);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=munmap
+set d_munmap
+eval $trylink
diff --git a/mcon/U/d_nanosleep.U b/mcon/U/d_nanosleep.U
new file mode 100644
index 0000000..cae3b6d
--- /dev/null
+++ b/mcon/U/d_nanosleep.U
@@ -0,0 +1,38 @@
+?RCS: $Id: d_nanosleep.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_nanosleep: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_nanosleep:
+?S: This variable conditionally defines the HAS_NANOSLEEP symbol, which
+?S: indicates to the C program that the nanosleep() system call is available.
+?S:.
+?C:HAS_NANOSLEEP:
+?C: This symbol, if defined, indicates that the nanosleep() system call
+?C: is available.
+?C:.
+?H:#$d_nanosleep HAS_NANOSLEEP /**/
+?H:.
+?LINT:set d_nanosleep
+: see if nanosleep exists
+$cat >try.c <<EOC
+#include <time.h>
+int main(void)
+{
+ static int ret;
+ static struct timespec request, remain;
+ ret |= nanosleep(&request, &remain);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=nanosleep
+set d_nanosleep
+eval $trylink
+
diff --git a/mcon/U/d_newsadm.U b/mcon/U/d_newsadm.U
index 2f9ec14..ca454de 100644
--- a/mcon/U/d_newsadm.U
+++ b/mcon/U/d_newsadm.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_newsadm.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_newsadm.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_newsadm.U,v $
diff --git a/mcon/U/d_nice.U b/mcon/U/d_nice.U
index 27dd15f..044062f 100644
--- a/mcon/U/d_nice.U
+++ b/mcon/U/d_nice.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_nice.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_nice.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
@@ -14,7 +14,7 @@
?RCS: Revision 3.0.1.1 1994/08/29 16:09:48 ram
?RCS: patch32: created by ADO
?RCS:
-?MAKE:d_nice: Inlibc
+?MAKE:d_nice: Trylink cat i_unistd
?MAKE: -pick add $@ %<
?S:d_nice:
?S: This variable conditionally defines the HAS_NICE symbol, which
@@ -28,6 +28,19 @@
?H:.
?LINT:set d_nice
: see if nice exists
-set nice d_nice
-eval $inlibc
+$cat >try.c <<EOC
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static int ret, i;
+ ret |= nice(i);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=nice
+set d_nice
+eval $trylink
diff --git a/mcon/U/d_nls.U b/mcon/U/d_nls.U
new file mode 100644
index 0000000..19be59b
--- /dev/null
+++ b/mcon/U/d_nls.U
@@ -0,0 +1,45 @@
+?RCS: $Id: d_nls.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_nls: Myread Setvar d_gettext i_libintl
+?MAKE: -pick add $@ %<
+?S:d_nls:
+?S: This variable conditionally defines USE_NLS.
+?S:.
+?C:USE_NLS:
+?C: This symbol, when defined, indicates that Native Language Support
+?C: primitives are present and should be enabled.
+?C:.
+?H:#$d_nls USE_NLS /**/
+?H:.
+?LINT:set d_nls
+: determine whether we support NLS
+echo " "
+case "$d_nls" in
+"$define")
+ echo "You have NLS support." >&4
+ val="$define"
+ ;;
+*)
+ case "$d_gettext$i_libintl" in
+ "$define$define")
+ echo "You have NLS support." >&4
+ val="$define"
+ ;;
+ *)
+ echo "I don't see support for NLS here..." >&4
+ val="$undef"
+ ;;
+ esac
+ ;;
+esac
+set d_nls
+eval $setvar
+
diff --git a/mcon/U/d_nolnbuf.U b/mcon/U/d_nolnbuf.U
index c612158..8955a8c 100644
--- a/mcon/U/d_nolnbuf.U
+++ b/mcon/U/d_nolnbuf.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_nolnbuf.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_nolnbuf.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_nolnbuf.U,v $
diff --git a/mcon/U/d_normsig.U b/mcon/U/d_normsig.U
index 9536756..2d5f426 100644
--- a/mcon/U/d_normsig.U
+++ b/mcon/U/d_normsig.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_normsig.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_normsig.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_normsig.U,v $
diff --git a/mcon/U/d_open3.U b/mcon/U/d_open3.U
index db79187..7bc2265 100644
--- a/mcon/U/d_open3.U
+++ b/mcon/U/d_open3.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_open3.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_open3.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_open3.U,v $
@@ -48,12 +48,12 @@ $cat >open3.c <<'EOCP'
#ifdef I_SYS_FILE
#include <sys/file.h>
#endif
-int main() {
+int main(void) {
if(O_RDONLY);
#ifdef O_TRUNC
- exit(0);
+ return 0;
#else
- exit(1);
+ return 1;
#endif
}
EOCP
@@ -82,7 +82,7 @@ elif $test `./findhdr fcntl.h` && \
fi
else
val="$undef"
- ./warn "I can't find the O_* constant definitions! You got problems."
+ ./warn "I can't find the O_* constant definitions! You got problems." 4>&4
fi
set d_open3
eval $setvar
diff --git a/mcon/U/d_passwd.U b/mcon/U/d_passwd.U
index ee5b436..0a36113 100644
--- a/mcon/U/d_passwd.U
+++ b/mcon/U/d_passwd.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_passwd.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_passwd.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
diff --git a/mcon/U/d_pathconf.U b/mcon/U/d_pathconf.U
index b44f789..a32ffdf 100644
--- a/mcon/U/d_pathconf.U
+++ b/mcon/U/d_pathconf.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_pathconf.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_pathconf.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
@@ -14,7 +14,7 @@
?RCS: Revision 3.0.1.1 1994/10/29 16:14:54 ram
?RCS: patch36: created by ADO
?RCS:
-?MAKE:d_pathconf d_fpathconf: Inlibc
+?MAKE:d_pathconf d_fpathconf: Trylink cat i_unistd
?MAKE: -pick add $@ %<
?S:d_pathconf:
?S: This variable conditionally defines the HAS_PATHCONF symbol, which
@@ -44,12 +44,40 @@
?LINT:set d_pathconf
?LINT:set d_fpathconf
: see if pathconf exists
-set pathconf d_pathconf
-eval $inlibc
+$cat >try.c <<EOC
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static long ret;
+ static int name;
+ ret |= pathconf("path", name);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=pathconf
+set d_pathconf
+eval $trylink
+
@if d_fpathconf || HAS_FPATHCONF
: see if fpathconf exists
-set fpathconf d_fpathconf
-eval $inlibc
+$cat >try.c <<EOC
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static long ret;
+ static int fd, name;
+ ret |= fpathconf(fd, name);
+ return ret ? 0 : 1;
+}
+EOC
+set d_fpathconf
+eval $trylink
@end
diff --git a/mcon/U/d_pause.U b/mcon/U/d_pause.U
index fc1a0b3..216d657 100644
--- a/mcon/U/d_pause.U
+++ b/mcon/U/d_pause.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_pause.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_pause.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
@@ -14,7 +14,7 @@
?RCS: Revision 3.0.1.1 1994/08/29 16:09:54 ram
?RCS: patch32: created by ADO
?RCS:
-?MAKE:d_pause: Inlibc
+?MAKE:d_pause: Trylink cat i_unistd
?MAKE: -pick add $@ %<
?S:d_pause:
?S: This variable conditionally defines the HAS_PAUSE symbol, which
@@ -29,6 +29,19 @@
?H:.
?LINT:set d_pause
: see if pause exists
-set pause d_pause
-eval $inlibc
+$cat >try.c <<EOC
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static int ret;
+ ret |= pause();
+ return ret ? 0 : 1;
+}
+EOC
+cyn=pause
+set d_pause
+eval $trylink
diff --git a/mcon/U/d_perror.U b/mcon/U/d_perror.U
index 6db7473..720e621 100644
--- a/mcon/U/d_perror.U
+++ b/mcon/U/d_perror.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_perror.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_perror.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_perror.U,v $
@@ -15,7 +15,7 @@
?RCS: Revision 3.0 1993/08/18 12:06:45 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_perror: Inlibc
+?MAKE:d_perror: Trylink cat
?MAKE: -pick add $@ %<
?S:d_perror:
?S: This variable conditionally remaps perror to a null action and
@@ -39,6 +39,15 @@
?H:.
?LINT:set d_perror
: see if perror exists
-set perror d_perror
-eval $inlibc
+$cat >try.c <<EOC
+#include <stdio.h>
+int main(void)
+{
+ perror("error");
+ return 0;
+}
+EOC
+cyn=perror
+set d_perror
+eval $trylink
diff --git a/mcon/U/d_pidcheck.U b/mcon/U/d_pidcheck.U
index 8bc6b5a..19ebd9a 100644
--- a/mcon/U/d_pidcheck.U
+++ b/mcon/U/d_pidcheck.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_pidcheck.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_pidcheck.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_pidcheck.U,v $
diff --git a/mcon/U/d_pipe.U b/mcon/U/d_pipe.U
index 6179a9a..a0cd165 100644
--- a/mcon/U/d_pipe.U
+++ b/mcon/U/d_pipe.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_pipe.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_pipe.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
@@ -14,7 +14,7 @@
?RCS: Revision 3.0.1.1 1994/08/29 16:11:44 ram
?RCS: patch32: created by ADO
?RCS:
-?MAKE:d_pipe: Inlibc
+?MAKE:d_pipe: Trylink cat i_unistd
?MAKE: -pick add $@ %<
?S:d_pipe:
?S: This variable conditionally defines the HAS_PIPE symbol, which
@@ -29,6 +29,19 @@
?H:.
?LINT:set d_pipe
: see if pipe exists
-set pipe d_pipe
-eval $inlibc
+$cat >try.c <<EOC
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static int fds[2], ret;
+ ret |= pipe(fds);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=pipe
+set d_pipe
+eval $trylink
diff --git a/mcon/U/d_poll.U b/mcon/U/d_poll.U
index ffca132..e582706 100644
--- a/mcon/U/d_poll.U
+++ b/mcon/U/d_poll.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_poll.U 15 2006-08-30 18:21:51Z rmanfredi $
+?RCS: $Id: d_poll.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_poll.U,v $
@@ -15,7 +15,7 @@
?RCS: Revision 3.0.1.1 1995/01/11 15:26:31 ram
?RCS: patch45: created
?RCS:
-?MAKE:d_poll: Inlibc
+?MAKE:d_poll: Trylink cat i_poll i_syspoll
?MAKE: -pick add $@ %<
?S:d_poll:
?S: This variable conditionally defines the HAS_POLL symbol, which
@@ -31,6 +31,34 @@
?H:.
?LINT:set d_poll
: see if poll exists
-set poll d_poll
-eval $inlibc
+$cat >try.c <<EOC
+#include <sys/types.h>
+#$i_syspoll I_SYS_POLL
+#ifdef I_SYS_POLL
+#include <sys/poll.h>
+#endif
+#$i_poll I_POLL
+#ifdef I_POLL
+#include <poll.h>
+#endif
+int main(void)
+{
+ static int ret, timeout;
+ static unsigned n;
+ static struct pollfd pfd;
+ pfd.fd |= 1;
+ pfd.revents |= 1;
+ pfd.events |= POLLIN;
+ pfd.events |= POLLOUT;
+ pfd.events |= POLLPRI;
+ pfd.events |= POLLERR;
+ pfd.events |= POLLHUP;
+ pfd.events |= POLLNVAL;
+ ret |= poll(&pfd, n, timeout);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=poll
+set d_poll
+eval $trylink
diff --git a/mcon/U/d_popen.U b/mcon/U/d_popen.U
index 5aaae6b..1200a2e 100644
--- a/mcon/U/d_popen.U
+++ b/mcon/U/d_popen.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_popen.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_popen.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_popen.U,v $
?RCS: Revision 3.0 1993/08/18 12:06:47 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_popen: Inlibc
+?MAKE:d_popen: Trylink cat
?MAKE: -pick add $@ %<
?S:d_popen:
?S: This variable conditionally defines HAS_POPEN if popen() is
@@ -26,6 +26,17 @@
?H:.
?LINT:set d_popen
: see if popen exists
-set popen d_popen
-eval $inlibc
+$cat >try.c <<EOC
+#include <stdio.h>
+int main(void)
+{
+ FILE *f;
+
+ f = popen("command", "mode");
+ return f ? 0 : 1;
+}
+EOC
+cyn=popen
+set d_popen
+eval $trylink
diff --git a/mcon/U/d_portable.U b/mcon/U/d_portable.U
index d547138..dc1aa63 100644
--- a/mcon/U/d_portable.U
+++ b/mcon/U/d_portable.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_portable.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_portable.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_portable.U,v $
diff --git a/mcon/U/d_posix_fadvise.U b/mcon/U/d_posix_fadvise.U
new file mode 100644
index 0000000..4c1b6d9
--- /dev/null
+++ b/mcon/U/d_posix_fadvise.U
@@ -0,0 +1,47 @@
+?RCS: $Id: d_posix_fadvise.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_posix_fadvise: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_posix_fadvise:
+?S: This variable conditionally defines the HAS_POSIX_FADVISE symbol, which
+?S: indicates to the C program that posix_fadvise() support is available.
+?S:.
+?C:HAS_POSIX_FADVISE:
+?C: This symbol is defined when posix_fadvise() can be used.
+?C:.
+?H:#$d_posix_fadvise HAS_POSIX_FADVISE
+?H:.
+?LINT: set d_posix_fadvise
+: can we use posix_fadvise?
+$cat >try.c <<'EOC'
+#include <sys/types.h>
+#include <fcntl.h>
+int main(void)
+{
+ static int ret, fd;
+ static off_t offset, size;
+ static int hint;
+
+ hint = POSIX_FADV_NORMAL
+ | POSIX_FADV_RANDOM
+ | POSIX_FADV_SEQUENTIAL
+ | POSIX_FADV_WILLNEED
+ | POSIX_FADV_DONTNEED
+ | POSIX_FADV_NOREUSE;
+
+ ret |= posix_fadvise(fd, offset, size, hint);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=posix_fadvise
+set d_posix_fadvise
+eval $trylink
+
diff --git a/mcon/U/d_posix_memalign.U b/mcon/U/d_posix_memalign.U
new file mode 100644
index 0000000..abf389c
--- /dev/null
+++ b/mcon/U/d_posix_memalign.U
@@ -0,0 +1,41 @@
+?RCS: $Id: d_posix_memalign.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_posix_memalign: Trylink cat i_stdlib
+?MAKE: -pick add $@ %<
+?S:d_posix_memalign:
+?S: This variable conditionally defines the HAS_POSIX_MEMALIGN symbol, which
+?S: indicates to the C program that posix_memalign() support is available.
+?S:.
+?C:HAS_POSIX_MEMALIGN:
+?C: This symbol is defined when posix_memalign() can be used.
+?C:.
+?H:#$d_posix_memalign HAS_POSIX_MEMALIGN
+?H:.
+?LINT: set d_posix_memalign
+: can we use posix_memalign?
+$cat >try.c <<EOC
+#$i_stdlib I_STDLIB
+#ifdef I_STDLIB
+#include <stdlib.h>
+#endif
+int main(void)
+{
+ static int ret;
+ static size_t align, size;
+ void *p;
+ ret |= posix_memalign(&p, align, size);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=posix_memalign
+set d_posix_memalign
+eval $trylink
+
diff --git a/mcon/U/d_pread.U b/mcon/U/d_pread.U
index 3fde629..92acc79 100644
--- a/mcon/U/d_pread.U
+++ b/mcon/U/d_pread.U
@@ -1,16 +1,16 @@
-?RCS: $Id: d_pread.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_pread.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_pread.U,v $
?RCS:
-?MAKE:d_pread: Inlibc
+?MAKE:d_pread: Trylink cat i_unistd
?MAKE: -pick add $@ %<
?S:d_pread:
?S: This variable conditionally defines the HAS_PREAD symbol, which
@@ -24,6 +24,25 @@
?H:.
?LINT:set d_pread
: see if pread exists
-set pread d_pread
-eval $inlibc
+$cat >try.c <<EOC
+#define _GNU_SOURCE
+#include <sys/types.h>
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static ssize_t ret;
+ static int fd;
+ static char buf[1];
+ static size_t size;
+ static off_t offset;
+ ret |= pread(fd, buf, size, offset);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=pread
+set d_pread
+eval $trylink
diff --git a/mcon/U/d_preadv.U b/mcon/U/d_preadv.U
index 1891cf3..1a8da38 100644
--- a/mcon/U/d_preadv.U
+++ b/mcon/U/d_preadv.U
@@ -1,16 +1,16 @@
-?RCS: $Id: d_preadv.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_preadv.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_preadv.U,v $
?RCS:
-?MAKE:d_preadv: Inlibc
+?MAKE:d_preadv: Trylink cat i_unistd
?MAKE: -pick add $@ %<
?S:d_preadv:
?S: This variable conditionally defines the HAS_PREADV symbol, which
@@ -25,6 +25,24 @@
?H:.
?LINT:set d_preadv
: see if preadv exists
-set preadv d_preadv
-eval $inlibc
+$cat >try.c <<EOC
+#include <sys/types.h>
+#include <sys/uio.h>
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static ssize_t ret;
+ static int fd, iovcnt;
+ static struct iovec iov;
+ static off_t offset;
+ ret |= preadv(fd, &iov, iovcnt, offset);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=preadv
+set d_preadv
+eval $trylink
diff --git a/mcon/U/d_psignal.U b/mcon/U/d_psignal.U
index 57033d2..1a2bbad 100644
--- a/mcon/U/d_psignal.U
+++ b/mcon/U/d_psignal.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_psignal.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_psignal.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_psignal.U,v $
?RCS: Revision 3.0 1993/08/18 12:06:49 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_psignal: Inlibc
+?MAKE:d_psignal: Trylink cat
?MAKE: -pick add $@ %<
?S:d_psignal:
?S: This variable conditionally defines the HAS_PSIGNAL symbol, which
@@ -26,6 +26,16 @@
?H:.
?LINT:set d_psignal
: see if psignal exists
-set psignal d_psignal
-eval $inlibc
+$cat >try.c <<EOC
+#include <signal.h>
+int main(void)
+{
+ static int sig;
+ psignal(sig, "signal");
+ return 0;
+}
+EOC
+cyn=psignal
+set d_psignal
+eval $trylink
diff --git a/mcon/U/d_ptattr_setstack.U b/mcon/U/d_ptattr_setstack.U
new file mode 100644
index 0000000..5517390
--- /dev/null
+++ b/mcon/U/d_ptattr_setstack.U
@@ -0,0 +1,40 @@
+?RCS:
+?RCS: Copyright (c) 2013 Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_ptattr_setstack: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_ptattr_setstack:
+?S: This variable conditionally defines the HAS_PTHREAD_ATTR_SETSTACK symbol,
+?S: which indicates to the C program that pthread_attr_setstack() should be
+?S: used to set the thread stack, instead of pthread_attr_setstackaddr().
+?S:.
+?C:HAS_PTHREAD_ATTR_SETSTACK:
+?C: This symbol is defined when pthread_attr_setstack() can be used to set
+?C: the thread stack. Otherwise, use obsoleted pthread_attr_setstackaddr().
+?C:.
+?H:#$d_ptattr_setstack HAS_PTHREAD_ATTR_SETSTACK
+?H:.
+?LINT: set d_ptattr_setstack
+: can we use pthread_attr_setstack
+$cat >try.c <<'EOC'
+#include <pthread.h>
+int main(void)
+{
+ pthread_attr_t attr;
+ void *p = NULL;
+ static int ret;
+
+ ret |= pthread_attr_setstack(&attr, p, 4096);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=pthread_attr_setstack
+set d_ptattr_setstack '-lpthread'
+eval $trylink
+
diff --git a/mcon/U/d_pwrite.U b/mcon/U/d_pwrite.U
index 1516cd5..b02fa6d 100644
--- a/mcon/U/d_pwrite.U
+++ b/mcon/U/d_pwrite.U
@@ -1,16 +1,16 @@
-?RCS: $Id: d_pwrite.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_pwrite.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_pwrite.U,v $
?RCS:
-?MAKE:d_pwrite: Inlibc
+?MAKE:d_pwrite: Trylink cat i_unistd
?MAKE: -pick add $@ %<
?S:d_pwrite:
?S: This variable conditionally defines the HAS_PWRITE symbol, which
@@ -24,6 +24,25 @@
?H:.
?LINT:set d_pwrite
: see if pwrite exists
-set pwrite d_pwrite
-eval $inlibc
+$cat >try.c <<EOC
+#define _GNU_SOURCE
+#include <sys/types.h>
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static ssize_t ret;
+ static int fd;
+ static char buf[1];
+ static size_t size;
+ static off_t offset;
+ ret |= pwrite(fd, buf, size, offset);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=pwrite
+set d_pwrite
+eval $trylink
diff --git a/mcon/U/d_pwritev.U b/mcon/U/d_pwritev.U
index 057bb72..4e7102a 100644
--- a/mcon/U/d_pwritev.U
+++ b/mcon/U/d_pwritev.U
@@ -1,16 +1,16 @@
-?RCS: $Id: d_pwritev.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_pwritev.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_pwritev.U,v $
?RCS:
-?MAKE:d_pwritev: Inlibc
+?MAKE:d_pwritev: Trylink cat i_unistd
?MAKE: -pick add $@ %<
?S:d_pwritev:
?S: This variable conditionally defines the HAS_PWRITEV symbol, which
@@ -25,6 +25,24 @@
?H:.
?LINT:set d_pwritev
: see if pwritev exists
-set pwritev d_pwritev
-eval $inlibc
+$cat >try.c <<EOC
+#include <sys/types.h>
+#include <sys/uio.h>
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static ssize_t ret;
+ static int fd, iovcnt;
+ static struct iovec iov;
+ static off_t offset;
+ ret |= pwritev(fd, &iov, iovcnt, offset);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=pwritev
+set d_pwritev
+eval $trylink
diff --git a/mcon/U/d_random.U b/mcon/U/d_random.U
new file mode 100644
index 0000000..00bbadf
--- /dev/null
+++ b/mcon/U/d_random.U
@@ -0,0 +1,40 @@
+?RCS: $Id: d_random.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_random: Trylink cat i_stdlib
+?MAKE: -pick add $@ %<
+?S:d_random:
+?S: This variable conditionally defines the HAS_RANDOM symbol, which
+?S: indicates to the C program that the random() routine is available.
+?S:.
+?C:HAS_RANDOM:
+?C: This symbol, if defined, indicates that the random routine is
+?C: available.
+?C:.
+?H:#$d_random HAS_RANDOM /**/
+?H:.
+?LINT:set d_random
+: see if random exists
+$cat >try.c <<EOC
+#$i_stdlib I_STDLIB
+#ifdef I_STDLIB
+#include <stdlib.h>
+#endif
+int main(void)
+{
+ static long ret;
+ ret |= random();
+ return ret ? 0 : 1;
+}
+EOC
+cyn=random
+set d_random
+eval $trylink
+
diff --git a/mcon/U/d_raster.U b/mcon/U/d_raster.U
index 59a2574..9a4b7ec 100644
--- a/mcon/U/d_raster.U
+++ b/mcon/U/d_raster.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_raster.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_raster.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_raster.U,v $
diff --git a/mcon/U/d_rdchk.U b/mcon/U/d_rdchk.U
index 4574096..2b6a695 100644
--- a/mcon/U/d_rdchk.U
+++ b/mcon/U/d_rdchk.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_rdchk.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_rdchk.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_rdchk.U,v $
?RCS: Revision 3.0 1993/08/18 12:06:51 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_rdchk: Inlibc
+?MAKE:d_rdchk: Trylink cat
?MAKE: -pick add $@ %<
?S:d_rdchk:
?S: This variable conditionally defines the HAS_RDCHK symbol, which
@@ -28,6 +28,15 @@
?H:.
?LINT:set d_rdchk
: see if rdchk exists
-set rdchk d_rdchk
-eval $inlibc
+$cat >try.c <<EOC
+int main(void)
+{
+ static int ret, fd;
+ ret |= rdchk(fd);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=rdchk
+set d_rdchk
+eval $trylink
diff --git a/mcon/U/d_readdir.U b/mcon/U/d_readdir.U
index 7003d14..535dd07 100644
--- a/mcon/U/d_readdir.U
+++ b/mcon/U/d_readdir.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_readdir.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_readdir.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_readdir.U,v $
@@ -15,9 +15,7 @@
?RCS: Revision 3.0 1993/08/18 12:06:52 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?X: Force checking for <dirent.h> inclusion
-?X:INC: i_dirent
-?MAKE:d_readdir d_seekdir d_telldir d_rewinddir: Inlibc
+?MAKE:d_readdir d_seekdir d_telldir d_rewinddir: Trylink cat i_dirent
?MAKE: -pick add $@ %<
?S:d_readdir:
?S: This variable conditionally defines HAS_READDIR if readdir() is
@@ -62,18 +60,76 @@
?H:.
?LINT:set d_readdir d_seekdir d_telldir d_rewinddir
: see if readdir and friends exist
-set readdir d_readdir
-eval $inlibc
+$cat >try.c <<EOC
+#$i_dirent I_DIRENT
+#ifdef I_DIRENT
+#include <dirent.h>
+#endif
+int main(void)
+{
+ static DIR *dir;
+ struct dirent *ret;
+ ret = readdir(dir);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=readdir
+set d_readdir
+eval $trylink
+
@if d_seekdir || HAS_SEEKDIR
-set seekdir d_seekdir
-eval $inlibc
+$cat >try.c <<EOC
+#$i_dirent I_DIRENT
+#ifdef I_DIRENT
+#include <dirent.h>
+#endif
+int main(void)
+{
+ static DIR *dir;
+ static long loc;
+ seekdir(dir, loc);
+ return 0;
+}
+EOC
+cyn=seekdir
+set d_seekdir
+eval $trylink
@end
@if d_telldir || HAS_TELLDIR
-set telldir d_telldir
-eval $inlibc
+$cat >try.c <<EOC
+#$i_dirent I_DIRENT
+#ifdef I_DIRENT
+#include <dirent.h>
+#endif
+int main(void)
+{
+ static DIR *dir;
+ static long ret;
+ ret |= telldir(dir);
+ if (ret)
+ return 1;
+ return 0;
+}
+EOC
+cyn=telldir
+set d_telldir
+eval $trylink
@end
@if d_rewinddir || HAS_REWINDDIR
-set rewinddir d_rewinddir
-eval $inlibc
+$cat >try.c <<EOC
+#$i_dirent I_DIRENT
+#ifdef I_DIRENT
+#include <dirent.h>
+#endif
+int main(void)
+{
+ static DIR *dir;
+ rewinddir(dir);
+ return 0;
+}
+EOC
+cyn=rewinddir
+set d_rewinddir
+eval $trylink
@end
diff --git a/mcon/U/d_readlink.U b/mcon/U/d_readlink.U
index 6384147..5c8aa8b 100644
--- a/mcon/U/d_readlink.U
+++ b/mcon/U/d_readlink.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_readlink.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_readlink.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
@@ -14,7 +14,7 @@
?RCS: Revision 3.0.1.1 1994/08/29 16:11:52 ram
?RCS: patch32: created by ADO
?RCS:
-?MAKE:d_readlink: Inlibc
+?MAKE:d_readlink: Trylink cat i_unistd
?MAKE: -pick add $@ %<
?S:d_readlink:
?S: This variable conditionally defines the HAS_READLINK symbol, which
@@ -29,6 +29,21 @@
?H:.
?LINT:set d_readlink
: see if readlink exists
-set readlink d_readlink
-eval $inlibc
+$cat >try.c <<EOC
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static ssize_t ret;
+ static char buf[1];
+ static size_t size;
+ ret |= readlink("path", buf, size);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=readlink
+set d_readlink
+eval $trylink
diff --git a/mcon/U/d_recvmsg.U b/mcon/U/d_recvmsg.U
new file mode 100644
index 0000000..4e3d488
--- /dev/null
+++ b/mcon/U/d_recvmsg.U
@@ -0,0 +1,70 @@
+?RCS: $Id: d_msg_flags.U 59 2010-12-12 10:14:03Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_recvmsg: Trylink cat i_systypes i_sysselct i_syssock \
+ i_winsock2 i_mswsock d_windows
+?MAKE: -pick add $@ %<
+?S:d_recvmsg:
+?S: This variable conditionally defines the HAS_RECVMSG symbol,
+?S: which indicates to the C program that the recvmsg() function is
+?S: available.
+?S:.
+?C:HAS_RECVMSG:
+?C: This symbol, if defined, indicates that the recvmsg() function
+?C: is available.
+?C:.
+?H:#$d_recvmsg HAS_RECVMSG /**/
+?H:.
+?LINT:set d_recvmsg
+: check for recvmsg function
+$cat >try.c <<EOC
+#$i_systypes I_SYS_TYPES
+#$i_sysselct I_SYS_SELECT
+#$i_syssock I_SYS_SOCKET
+#$i_winsock2 I_WINSOCK2
+#$i_mswsock I_MSWSOCK
+#$d_windows WINDOWS_SYSTEM
+#ifdef WINDOWS_SYSTEM
+#define WINVER 0x0501
+#endif
+#ifdef I_SYS_TYPES
+#include <sys/types.h>
+#endif
+#ifdef I_SYS_SOCKET
+#include <sys/socket.h>
+#endif
+#ifdef I_WINSOCK2
+#include <Winsock2.h>
+#endif
+#ifdef I_MSWSOCK
+#include <Mswsock.h>
+#endif
+int main(void)
+{
+ static struct msghdr msg;
+ int ret, fd, flags;
+
+ fd = 1;
+ flags = 1;
+ msg.msg_name = (void *) 0;
+ msg.msg_namelen |= 1;
+ msg.msg_iov = (void *) 0;
+ msg.msg_iovlen |= 1;
+ /* msg.msg_flags is intentionally excluded, see other unit */
+ msg.msg_control = (void *) 0;
+ msg.msg_controllen |= 1;
+ ret = recvmsg(fd, &msg, flags);
+ return ret ? 0 : 1;
+}
+EOC
+cyn='recvmsg'
+set d_recvmsg
+eval $trylink
+
diff --git a/mcon/U/d_regcmp.U b/mcon/U/d_regcmp.U
index 86ff230..edc8c4a 100644
--- a/mcon/U/d_regcmp.U
+++ b/mcon/U/d_regcmp.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_regcmp.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_regcmp.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_regcmp.U,v $
@@ -15,66 +15,50 @@
?RCS: Revision 3.0 1993/08/18 12:06:53 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_regcmp d_re_comp d_regcomp: Csym cat
+?MAKE:d_regcmp d_re_comp: Csym cat
?MAKE: -pick add $@ %<
-?S:d_regcomp:
-?S: This variable conditionally defines the HAS_REGCOMP symbol, which
-?S: indicates to the C program that the regcomp() routine is available
-?S: for regular patern matching (usally on POSIX.2 conforming systems).
-?S:.
+?X:
+?X: Modern code should use POSIX's regcomp().
+?X:
?S:d_regcmp:
?S: This variable conditionally defines the HAS_REGCMP symbol, which
?S: indicates to the C program that the regcmp() routine is available
-?S: for regular patern matching (usally on System V).
+?S: for regular pattern matching (usually on System V).
?S:.
?S:d_re_comp:
?S: This variable conditionally defines the HAS_RECOMP symbol, which
?S: indicates to the C program that the re_comp() routine is available
-?S: for regular patern matching (usally on BSD). If so, it is likely that
+?S: for regular pattern matching (usually on BSD). If so, it is likely that
?S: re_exec() exists.
?S:.
-?C:HAS_REGCOMP (REGCOMP):
-?C: This symbol, if defined, indicates that the regcomp() routine is
-?C: available to do some regular patern matching (usually on POSIX.2
-?C: conforming systems).
-?C:.
?C:HAS_REGCMP (REGCMP):
?C: This symbol, if defined, indicates that the regcmp() routine is
-?C: available to do some regular patern matching (usually on System V).
+?C: available to do some regular pattern matching (usually on System V).
?C:.
?C:HAS_RECOMP (RECOMP):
?C: This symbol, if defined, indicates that the re_comp() routine is
-?C: available to do some regular patern matching (usually on BSD). If so,
+?C: available to do some regular pattern matching (usually on BSD). If so,
?C: it is likely that re_exec() be available.
?C:.
-?H:#$d_regcomp HAS_REGCOMP /* POSIX.2 */
?H:#$d_regcmp HAS_REGCMP /* sysV */
?H:#$d_re_comp HAS_RECOMP /* BSD */
?H:.
?T:val
-: see if regcomp, regcmp, or re_comp exist, for regular pattern matching
+: see if regcmp or re_comp exist, for regular pattern matching
echo " "
-if set regcomp val -f d_regcomp; eval $csym; $val; then
- echo 'regcomp() found.' >&4
- d_regcomp="$define"
- d_regcmp="$undef"
- d_re_comp="$undef"
-elif set regcmp val -f d_regcmp; eval $csym; $val; then
+if set regcmp val -f d_regcmp; eval $csym; $val; then
echo 'regcmp() found.' >&4
d_regcmp="$define"
- d_regcomp="$undef"
d_re_comp="$undef"
elif set re_comp val -f d_re_comp; eval $csym; $val; then
echo 're_comp() found, assuming re_exec() also exists.' >&4
d_re_comp="$define"
- d_regcomp="$undef"
d_regcmp="$undef"
else
$cat >&4 <<EOM
-No regcomp(), regcmp() nor re_comp() found !! No regular pattern matching.
+No regcmp() nor re_comp() found.
EOM
d_regcmp="$undef"
d_re_comp="$undef"
- d_regcomp="$undef"
fi
diff --git a/mcon/U/d_regcomp.U b/mcon/U/d_regcomp.U
new file mode 100644
index 0000000..7ad7d8d
--- /dev/null
+++ b/mcon/U/d_regcomp.U
@@ -0,0 +1,44 @@
+?RCS: $Id: d_regcomp.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2011, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log$
+?MAKE:d_regcomp: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_regcomp:
+?S: This variable conditionally defines the HAS_REGCOMP symbol, which
+?S: indicates to the C program that the regcomp() routine is available
+?S: for regular patern matching (usally on POSIX.2 conforming systems).
+?S:.
+?C:HAS_REGCOMP (REGCOMP):
+?C: This symbol, if defined, indicates that the regcomp() routine is
+?C: available to do some regular patern matching (usually on POSIX.2
+?C: conforming systems).
+?C: When regcomp() exists, it is safe to assume regexec() and regfree()
+?C: are also available.
+?C:.
+?H:#$d_regcomp HAS_REGCOMP /**/
+?H:.
+?LINT:set d_regcomp
+: see if regcomp exists
+$cat >try.c <<EOC
+#include <regex.h>
+int main(void)
+{
+ int ret = 0;
+ regex_t re;
+ ret |= regcomp(&re, ".",
+ REG_EXTENDED | REG_NOSUB | REG_ICASE | REG_NEWLINE);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=regcomp
+set d_regcomp
+eval $trylink
+
diff --git a/mcon/U/d_regparm.U b/mcon/U/d_regparm.U
new file mode 100644
index 0000000..7b968a1
--- /dev/null
+++ b/mcon/U/d_regparm.U
@@ -0,0 +1,48 @@
+?RCS: $Id: d_regparm.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_regparm: Myread Setvar cat rm cc ccflags ldflags gccversion
+?MAKE: -pick add $@ %<
+?S:d_regparm:
+?S: This variable conditionally defines the HAS_REGPARM symbol, which
+?S: indicates to the C program that attribute regparm is available.
+?S:.
+?C:HAS_REGPARM:
+?C: This symbol is defined when __attribute__((__regparm__(n))) can be used.
+?C:.
+?H:#$d_regparm HAS_REGPARM
+?H:.
+?LINT:set d_regparm
+: check whether '__attribute__((__regparm__(n)))' can be used
+val="$undef"
+if [ "x$gccversion" != x ]
+then
+ $cat >try.c <<'EOC'
+static __attribute__((__regparm__(1))) int
+blah(int x)
+{
+ return x / 2;
+}
+int main(int argc, char *argv[])
+{
+ (void) argv;
+ return blah(argc);
+}
+EOC
+ if $cc $ccflags -Werror $ldflags -o try try.c >/dev/null 2>&1
+ then
+ val="$define"
+ fi
+ $rm -rf try try.*
+fi
+
+set d_regparm
+eval $setvar
+
diff --git a/mcon/U/d_rename.U b/mcon/U/d_rename.U
index c9f7492..a341fda 100644
--- a/mcon/U/d_rename.U
+++ b/mcon/U/d_rename.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_rename.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_rename.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_rename.U,v $
?RCS: Revision 3.0 1993/08/18 12:06:54 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_rename: Inlibc
+?MAKE:d_rename: Trylink cat
?MAKE: -pick add $@ %<
?S:d_rename:
?S: This variable conditionally defines the HAS_RENAME symbol, which
@@ -28,6 +28,16 @@
?H:.
?LINT:set d_rename
: see if rename exists
-set rename d_rename
-eval $inlibc
+$cat >try.c <<EOC
+#include <stdio.h>
+int main(void)
+{
+ static int ret;
+ ret |= rename("old", "new");
+ return ret ? 0 : 1;
+}
+EOC
+cyn=rename
+set d_rename
+eval $trylink
diff --git a/mcon/U/d_rmdir.U b/mcon/U/d_rmdir.U
index 4a1b1aa..6b7065d 100644
--- a/mcon/U/d_rmdir.U
+++ b/mcon/U/d_rmdir.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_rmdir.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_rmdir.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_rmdir.U,v $
?RCS: Revision 3.0 1993/08/18 12:06:56 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_rmdir: Inlibc
+?MAKE:d_rmdir: Trylink cat i_unistd
?MAKE: -pick add $@ %<
?S:d_rmdir:
?S: This variable conditionally defines HAS_RMDIR if rmdir() is
@@ -27,6 +27,19 @@
?H:.
?LINT:set d_rmdir
: see if rmdir exists
-set rmdir d_rmdir
-eval $inlibc
+$cat >try.c <<EOC
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static int ret;
+ ret |= rmdir("path");
+ return ret ? 0 : 1;
+}
+EOC
+cyn=rmdir
+set d_rmdir
+eval $trylink
diff --git a/mcon/U/d_rusage.U b/mcon/U/d_rusage.U
index 34639f7..7b539eb 100644
--- a/mcon/U/d_rusage.U
+++ b/mcon/U/d_rusage.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_rusage.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_rusage.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_rusage.U,v $
@@ -14,7 +14,7 @@
?RCS:
?X: We may need to include <sys/resource.h> and <sys/time.h> FIXME
?X:INC: i_sysresrc i_systime
-?MAKE:d_rusage: Inlibc
+?MAKE:d_rusage: Trylink cat i_sysresrc
?MAKE: -pick add $@ %<
?S:d_rusage (d_getrusg):
?S: This variable conditionally defines the HAS_GETRUSAGE symbol, which
@@ -31,6 +31,23 @@
?H:.
?LINT:set d_rusage
: see if getrusage exists
-set getrusage d_rusage
-eval $inlibc
+$cat >try.c <<EOC
+#include <sys/types.h>
+#include <sys/time.h>
+#$i_sysresrc I_SYS_RESOURCE
+#ifdef I_SYS_RESOURCE
+#include <sys/resource.h>
+#endif
+int main(void)
+{
+ static struct rusage ru;
+ static int ret;
+ ret |= getrusage(RUSAGE_SELF, &ru);
+ ret |= getrusage(RUSAGE_CHILDREN, &ru);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=getrusage
+set d_rusage
+eval $trylink
diff --git a/mcon/U/d_sa_interrupt.U b/mcon/U/d_sa_interrupt.U
new file mode 100644
index 0000000..09686e7
--- /dev/null
+++ b/mcon/U/d_sa_interrupt.U
@@ -0,0 +1,37 @@
+?RCS: $Id: d_sa_interrupt.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_sa_interrupt: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_sa_interrupt:
+?S: This variable conditionally defines the HAS_SA_INTERRUPT symbol, which
+?S: indicates to the C program that SA_INTERRUPT() is available for
+?S: sigaction().
+?S:.
+?C:HAS_SA_INTERRUPT:
+?C: This symbol is defined when SA_INTERRUPT can be used in sigaction().
+?C:.
+?H:#$d_sa_interrupt HAS_SA_INTERRUPT
+?H:.
+?LINT: set d_sa_interrupt
+: can we use SA_INTERRUPT?
+$cat >try.c <<'EOC'
+#include <signal.h>
+int main(void)
+{
+ static int ret;
+ ret |= SA_INTERRUPT;
+ return ret ? 0 : 1;
+}
+EOC
+cyn="whether SA_INTERRUPT is available in <signal.h>"
+set d_sa_interrupt
+eval $trylink
+
diff --git a/mcon/U/d_safebcpy.U b/mcon/U/d_safebcpy.U
index 31d2300..5e1b0d4 100644
--- a/mcon/U/d_safebcpy.U
+++ b/mcon/U/d_safebcpy.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_safebcpy.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_safebcpy.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_safebcpy.U,v $
diff --git a/mcon/U/d_safemcpy.U b/mcon/U/d_safemcpy.U
index 7d73af9..60cc615 100644
--- a/mcon/U/d_safemcpy.U
+++ b/mcon/U/d_safemcpy.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_safemcpy.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_safemcpy.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_safemcpy.U,v $
diff --git a/mcon/U/d_sanemcmp.U b/mcon/U/d_sanemcmp.U
index aca67fc..060299d 100644
--- a/mcon/U/d_sanemcmp.U
+++ b/mcon/U/d_sanemcmp.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_sanemcmp.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_sanemcmp.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_sanemcmp.U,v $
diff --git a/mcon/U/d_sbrk.U b/mcon/U/d_sbrk.U
index 77ed3c1..50da597 100644
--- a/mcon/U/d_sbrk.U
+++ b/mcon/U/d_sbrk.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_sbrk.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_sbrk.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_sbrk.U,v $
?RCS: Revision 3.0.1.1 1994/01/24 14:06:31 ram
?RCS: patch16: created
?RCS:
-?MAKE:d_sbrk: Inlibc
+?MAKE:d_sbrk: Trylink cat i_unistd
?MAKE: -pick add $@ %<
?S:d_sbrk:
?S: This variable conditionally defines HAS_SBRK if sbrk() is
@@ -26,6 +26,19 @@
?H:.
?LINT:set d_sbrk
: see if sbrk exists
-set sbrk d_sbrk
-eval $inlibc
+$cat >try.c <<EOC
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ void *ret;
+ ret = sbrk(1);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=sbrk
+set d_sbrk
+eval $trylink
diff --git a/mcon/U/d_scandir.U b/mcon/U/d_scandir.U
index 601310d..8f089c3 100644
--- a/mcon/U/d_scandir.U
+++ b/mcon/U/d_scandir.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_scandir.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_scandir.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_scandir.U,v $
?RCS: Revision 3.0.1.1 1994/01/24 14:06:35 ram
?RCS: patch16: created
?RCS:
-?MAKE:d_scandir: Inlibc
+?MAKE:d_scandir: Trylink cat i_dirent
?MAKE: -pick add $@ %<
?S:d_scandir:
?S: This variable conditionally defines HAS_SCANDIR if scandir() is
@@ -26,6 +26,33 @@
?H:.
?LINT:set d_scandir
: see if scandir exists
-set scandir d_scandir
-eval $inlibc
+$cat >try.c <<EOC
+#$i_dirent I_DIRENT
+#ifdef I_DIRENT
+#include <dirent.h>
+#endif
+int filter(const struct dirent *d)
+{
+ (void) d;
+ return 1;
+}
+
+int compare(const struct dirent **a, const struct dirent **b)
+{
+ (void) a;
+ (void) b;
+ return 1;
+}
+
+int main(void)
+{
+ static struct dirent **namelist;
+ static int ret;
+ ret |= scandir("dir", &namelist, filter, compare);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=scandir
+set d_scandir
+eval $trylink
diff --git a/mcon/U/d_scannl.U b/mcon/U/d_scannl.U
index 55f24cb..942ed0d 100644
--- a/mcon/U/d_scannl.U
+++ b/mcon/U/d_scannl.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_scannl.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_scannl.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_scannl.U,v $
@@ -19,7 +19,7 @@
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
?X:
-?X: Does the scanf routine read "\n" corretly ? This is was not
+?X: Does the scanf routine read "\n" correctly ? This is was not
?X: the case on AIX...
?X:
?MAKE:d_scannl: cat +cc +ccflags rm Setvar
@@ -41,7 +41,7 @@
: does scanf handle "\n" correctly ?
echo " "
val="$define"
-?X: I really want to say "\n" instead of '\n', becasue I am refering
+?X: I really want to say "\n" instead of '\n', because I am referring
?X: to the string given as argument to scanf().
echo 'Let'"'"'s see if scanf() handles "\\n" correctly...' >&4
$cat >try.c <<'EOCP'
diff --git a/mcon/U/d_sched_yield.U b/mcon/U/d_sched_yield.U
new file mode 100644
index 0000000..0627e3d
--- /dev/null
+++ b/mcon/U/d_sched_yield.U
@@ -0,0 +1,36 @@
+?RCS: Copyright (c) 2012, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_sched_yield: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_sched_yield:
+?S: This variable conditionally defines the HAS_SCHED_YIELD symbol, which
+?S: indicates to the C program that the sched_yield() routine is available
+?S: to yield the CPU.
+?S:.
+?C:HAS_SCHED_YIELD :
+?C: This symbol, if defined, indicates that the sched_yield() routine is
+?C: available to yield the CPU.
+?C:.
+?H:#$d_sched_yield HAS_SCHED_YIELD /**/
+?H:.
+?LINT:set d_sched_yield
+: see if sched_yield exists
+$cat >try.c <<EOC
+#include <sched.h>
+int main(void)
+{
+ static int ret;
+ ret |= sched_yield();
+ return ret ? 0 : 1;
+}
+EOC
+cyn=sched_yield
+set d_sched_yield
+eval $trylink
+
diff --git a/mcon/U/d_scorfl.U b/mcon/U/d_scorfl.U
index afbdbfe..8a04f26 100644
--- a/mcon/U/d_scorfl.U
+++ b/mcon/U/d_scorfl.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_scorfl.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_scorfl.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_scorfl.U,v $
diff --git a/mcon/U/d_select.U b/mcon/U/d_select.U
index 4116e05..afc6a57 100644
--- a/mcon/U/d_select.U
+++ b/mcon/U/d_select.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_select.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_select.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_select.U,v $
?RCS: Revision 3.0 1993/08/18 12:07:02 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_select: Inlibc
+?MAKE:d_select: Trylink cat i_unistd i_systypes i_sysselct i_winsock2
?MAKE: -pick add $@ %<
?S:d_select:
?S: This variable conditionally defines HAS_SELECT if select() is
@@ -28,6 +28,34 @@
?H:.
?LINT:set d_select
: see if select exists
-set select d_select
-eval $inlibc
+$cat >try.c <<EOC
+#$i_unistd I_UNISTD
+#$i_systypes I_SYS_TYPES
+#$i_sysselct I_SYS_SELECT
+#$i_winsock2 I_WINSOCK2
+?X: This is still required on some systems
+#ifdef I_SYS_TYPES
+#include <sys/types.h>
+#endif
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+#ifdef I_SYS_SELECT
+#include <sys/select.h>
+#endif
+#ifdef I_WINSOCK2
+#include <Winsock2.h>
+#endif
+int main(void)
+{
+ static int ret, n;
+ static fd_set r, w, x;
+ static struct timeval timeout;
+ ret |= select(n, &r, &w, &x, &timeout);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=select
+set d_select '-lWs2_32'
+eval $trylink
diff --git a/mcon/U/d_sem.U b/mcon/U/d_sem.U
index 0605260..b848877 100644
--- a/mcon/U/d_sem.U
+++ b/mcon/U/d_sem.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_sem.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_sem.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_sem.U,v $
diff --git a/mcon/U/d_semctl.U b/mcon/U/d_semctl.U
index 22f2ad0..e7c3528 100644
--- a/mcon/U/d_semctl.U
+++ b/mcon/U/d_semctl.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_semctl.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_semctl.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_semctl.U,v $
?RCS: Revision 3.0 1993/08/18 12:07:04 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_semctl: Inlibc
+?MAKE:d_semctl: Trylink cat
?MAKE: -pick add $@ %<
?S:d_semctl:
?S: This variable conditionally defines the HAS_SEMCTL symbol, which
@@ -26,6 +26,27 @@
?H:.
?LINT:set d_semctl
: see if semctl exists
-set semctl d_semctl
-eval $inlibc
+$cat >try.c <<EOC
+#include <sys/sem.h>
+int main(void)
+{
+ static int ret, id, num;
+ static union semun {
+ int val;
+ struct semid_ds *buf;
+ unsigned short *array;
+ } arg;
+ ret |= semctl(id, num, GETVAL, &arg);
+ ret |= semctl(id, num, SETVAL, &arg);
+ ret |= semctl(id, num, GETPID, &arg);
+ ret |= semctl(id, num, GETNCNT, &arg);
+ ret |= semctl(id, num, GETZCNT, &arg);
+ ret |= semctl(id, num, GETALL, &arg);
+ ret |= semctl(id, num, SETALL, &arg);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=semctl
+set d_semctl
+eval $trylink
diff --git a/mcon/U/d_semget.U b/mcon/U/d_semget.U
index ee21fd2..88016c7 100644
--- a/mcon/U/d_semget.U
+++ b/mcon/U/d_semget.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_semget.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_semget.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_semget.U,v $
?RCS: Revision 3.0 1993/08/18 12:07:05 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_semget: Inlibc
+?MAKE:d_semget: Trylink cat
?MAKE: -pick add $@ %<
?S:d_semget:
?S: This variable conditionally defines the HAS_SEMGET symbol, which
@@ -26,6 +26,21 @@
?H:.
?LINT:set d_semget
: see if semget exists
-set semget d_semget
-eval $inlibc
+$cat >try.c <<EOC
+#include <sys/ipc.h>
+#include <sys/sem.h>
+int main(void)
+{
+ static int ret, n, flags;
+ static key_t key;
+ key = IPC_PRIVATE;
+ flags |= IPC_CREAT;
+ flags |= IPC_EXCL;
+ ret |= semget(key, n, flags);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=semget
+set d_semget
+eval $trylink
diff --git a/mcon/U/d_semop.U b/mcon/U/d_semop.U
index 039cff2..129a057 100644
--- a/mcon/U/d_semop.U
+++ b/mcon/U/d_semop.U
@@ -1,31 +1,84 @@
-?RCS: $Id: d_semop.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_semop.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_semop.U,v $
?RCS: Revision 3.0 1993/08/18 12:07:05 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_semop: Inlibc
+?MAKE:d_semop d_semtimedop: Trylink cat
?MAKE: -pick add $@ %<
?S:d_semop:
?S: This variable conditionally defines the HAS_SEMOP symbol, which
?S: indicates to the C program that the semop() routine is available.
?S:.
+?S:d_semtimedop:
+?S: This variable conditionally defines the HAS_SEMTIMEDOP symbol, which
+?S: indicates to the C program that the semtimedop() routine is available.
+?S:.
?C:HAS_SEMOP:
?C: This symbol, if defined, indicates that the semop() routine is
?C: available to execute semaphore operations.
?C:.
+?C:HAS_SEMTIMEDOP:
+?C: This symbol, if defined, indicates that the semtimedop() routine is
+?C: available to execute semaphore operations with a timeout.
+?C:.
?H:#$d_semop HAS_SEMOP /**/
+?H:#$d_semtimedop HAS_SEMTIMEDOP /**/
?H:.
-?LINT:set d_semop
+?LINT:set d_semop d_semtimedop
: see if semop exists
-set semop d_semop
-eval $inlibc
+$cat >try.c <<EOC
+#include <sys/ipc.h>
+#include <sys/sem.h>
+int main(void)
+{
+ static int ret, id;
+ static size_t n;
+ static struct sembuf buf;
+
+ buf.sem_num |= 1;
+ buf.sem_op |= 1;
+ buf.sem_flg |= SEM_UNDO;
+ buf.sem_flg |= IPC_NOWAIT;
+ ret |= semop(id, &buf, n);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=semop
+set d_semop
+eval $trylink
+
+@if d_semtimedop || HAS_SEMTIMEDOP
+: see if semtimedop exists
+$cat >try.c <<EOC
+#include <sys/types.h>
+#include <sys/ipc.h>
+#include <sys/sem.h>
+int main(void)
+{
+ static int ret, id;
+ static size_t n;
+ static struct sembuf buf;
+
+
+ buf.sem_num |= 1;
+ buf.sem_op |= 1;
+ buf.sem_flg |= SEM_UNDO;
+ buf.sem_flg |= IPC_NOWAIT;
+ ret |= semtimedop(id, &buf, n, (struct timespec *) 0);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=semtimedop
+set d_semtimedop
+eval $trylink
+@end
diff --git a/mcon/U/d_sendfile.U b/mcon/U/d_sendfile.U
new file mode 100644
index 0000000..3c528c6
--- /dev/null
+++ b/mcon/U/d_sendfile.U
@@ -0,0 +1,41 @@
+?RCS: $Id: d_sendfile.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_sendfile: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_sendfile:
+?S: This variable conditionally defines the HAS_SENDFILE symbol, which
+?S: indicates to the C program that the sendfile() routine is available.
+?S:.
+?C:HAS_SENDFILE:
+?C: This symbol, if defined, indicates that the sendfile routine is
+?C: available.
+?C:.
+?H:#$d_sendfile HAS_SENDFILE /**/
+?H:.
+?LINT:set d_sendfile
+: see if sendfile exists
+$cat >try.c <<EOC
+#include <sys/types.h>
+#include <sys/sendfile.h>
+int main(void)
+{
+ static ssize_t ret;
+ static int out_fd, in_fd;
+ static off_t offset;
+ static size_t n;
+ ret |= sendfile(out_fd, in_fd, &offset, n);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=sendfile
+set d_sendfile '-lsendfile'
+eval $trylink
+
diff --git a/mcon/U/d_sendmsg.U b/mcon/U/d_sendmsg.U
new file mode 100644
index 0000000..8c29f46
--- /dev/null
+++ b/mcon/U/d_sendmsg.U
@@ -0,0 +1,70 @@
+?RCS: $Id: d_sendmsg.U 170 2013-08-30 16:47:47Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_sendmsg: Trylink cat i_systypes i_sysselct i_syssock \
+ i_winsock2 i_mswsock d_windows
+?MAKE: -pick add $@ %<
+?S:d_sendmsg:
+?S: This variable conditionally defines the HAS_SENDMSG symbol,
+?S: which indicates to the C program that the sendmsg() function is
+?S: available.
+?S:.
+?C:HAS_SENDMSG:
+?C: This symbol, if defined, indicates that the sendmsg() function
+?C: is available.
+?C:.
+?H:#$d_sendmsg HAS_SENDMSG /**/
+?H:.
+?LINT:set d_sendmsg
+: check for sendmsg function
+$cat >try.c <<EOC
+#$i_systypes I_SYS_TYPES
+#$i_sysselct I_SYS_SELECT
+#$i_syssock I_SYS_SOCKET
+#$i_winsock2 I_WINSOCK2
+#$i_mswsock I_MSWSOCK
+#$d_windows WINDOWS_SYSTEM
+#ifdef WINDOWS_SYSTEM
+#define WINVER 0x0501
+#endif
+#ifdef I_SYS_TYPES
+#include <sys/types.h>
+#endif
+#ifdef I_SYS_SOCKET
+#include <sys/socket.h>
+#endif
+#ifdef I_WINSOCK2
+#include <Winsock2.h>
+#endif
+#ifdef I_MSWSOCK
+#include <Mswsock.h>
+#endif
+int main(void)
+{
+ static struct msghdr msg;
+ int ret, fd, flags;
+
+ fd = 1;
+ flags = 1;
+ msg.msg_name = (void *) 0;
+ msg.msg_namelen |= 1;
+ msg.msg_iov = (void *) 0;
+ msg.msg_iovlen |= 1;
+ /* msg.msg_flags is intentionally excluded, see other unit */
+ msg.msg_control = (void *) 0;
+ msg.msg_controllen |= 1;
+ ret = sendmsg(fd, &msg, flags);
+ return ret ? 0 : 1;
+}
+EOC
+cyn='sendmsg'
+set d_sendmsg
+eval $trylink
+
diff --git a/mcon/U/d_setegid.U b/mcon/U/d_setegid.U
index 90ed026..d33b936 100644
--- a/mcon/U/d_setegid.U
+++ b/mcon/U/d_setegid.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_setegid.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_setegid.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_setegid.U,v $
?RCS: Revision 3.0 1993/08/18 12:07:07 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_setegid: Inlibc
+?MAKE:d_setegid: Trylink cat i_unistd
?MAKE: -pick add $@ %<
?S:d_setegid:
?S: This variable conditionally defines the HAS_SETEGID symbol, which
@@ -27,6 +27,21 @@
?H:.
?LINT:set d_setegid
: see if setegid exists
-set setegid d_setegid
-eval $inlibc
+$cat >try.c <<EOC
+#include <sys/types.h>
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static int ret;
+ static gid_t gid;
+ ret |= setegid(gid);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=setegid
+set d_setegid
+eval $trylink
diff --git a/mcon/U/d_seteuid.U b/mcon/U/d_seteuid.U
index 59622a1..6c31de5 100644
--- a/mcon/U/d_seteuid.U
+++ b/mcon/U/d_seteuid.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_seteuid.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_seteuid.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_seteuid.U,v $
?RCS: Revision 3.0 1993/08/18 12:07:08 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_seteuid: Inlibc
+?MAKE:d_seteuid: Trylink cat i_unistd
?MAKE: -pick add $@ %<
?S:d_seteuid:
?S: This variable conditionally defines the HAS_SETEUID symbol, which
@@ -27,6 +27,21 @@
?H:.
?LINT:set d_seteuid
: see if seteuid exists
-set seteuid d_seteuid
-eval $inlibc
+$cat >try.c <<EOC
+#include <sys/types.h>
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static int ret;
+ static uid_t uid;
+ ret |= seteuid(uid);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=seteuid
+set d_seteuid
+eval $trylink
diff --git a/mcon/U/d_setgrps.U b/mcon/U/d_setgrps.U
index a7fdaa8..bc9d02d 100644
--- a/mcon/U/d_setgrps.U
+++ b/mcon/U/d_setgrps.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_setgrps.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_setgrps.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_setgrps.U,v $
?RCS: Revision 3.0 1993/08/18 12:06:08 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_setgrps: Inlibc
+?MAKE:d_setgrps: Trylink cat i_unistd
?MAKE: -pick add $@ %<
?S:d_setgrps:
?S: This variable conditionally defines the HAS_SETGROUPS symbol, which
@@ -28,6 +28,21 @@
?H:.
?LINT:set d_setgrps
: see if setgroups exists
-set setgroups d_setgrps
-eval $inlibc
+$cat >try.c <<EOC
+#include <sys/types.h>
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static int ret, n;
+ static gid_t gids;
+ ret |= setgroups(n, &gids);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=setgroups
+set d_setgrps
+eval $trylink
diff --git a/mcon/U/d_setlnbuf.U b/mcon/U/d_setlnbuf.U
index 363e269..12b79c1 100644
--- a/mcon/U/d_setlnbuf.U
+++ b/mcon/U/d_setlnbuf.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_setlnbuf.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_setlnbuf.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
@@ -14,7 +14,7 @@
?RCS: Revision 3.0.1.1 1994/08/29 16:11:57 ram
?RCS: patch32: created by ADO
?RCS:
-?MAKE:d_setlinebuf: Inlibc
+?MAKE:d_setlinebuf: Trylink cat
?MAKE: -pick add $@ %<
?S:d_setlinebuf:
?S: This variable conditionally defines the HAS_SETLINEBUF symbol, which
@@ -31,6 +31,15 @@
?H:.
?LINT:set d_setlinebuf
: see if setlinebuf exists
-set setlinebuf d_setlinebuf
-eval $inlibc
+$cat >try.c <<EOC
+#include <stdio.h>
+int main(void)
+{
+ setlinebuf(stdout);
+ return 0;
+}
+EOC
+cyn=setlinebuf
+set d_setlinebuf
+eval $trylink
diff --git a/mcon/U/d_setlocale.U b/mcon/U/d_setlocale.U
index d97a296..5ec3526 100644
--- a/mcon/U/d_setlocale.U
+++ b/mcon/U/d_setlocale.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_setlocale.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_setlocale.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
@@ -14,7 +14,7 @@
?RCS: Revision 3.0.1.1 1994/06/20 06:57:51 ram
?RCS: patch30: created
?RCS:
-?MAKE:d_setlocale: Inlibc
+?MAKE:d_setlocale: Trylink cat i_locale
?MAKE: -pick add $@ %<
?S:d_setlocale:
?S: This variable conditionally defines HAS_SETLOCALE if setlocale() is
@@ -28,6 +28,20 @@
?H:.
?LINT:set d_setlocale
: see if setlocale exists
-set setlocale d_setlocale
-eval $inlibc
+$cat >try.c <<EOC
+#$i_locale I_LOCALE
+#ifdef I_LOCALE
+#include <locale.h>
+#endif
+int main(void)
+{
+ static int category;
+ static char ret;
+ ret |= *setlocale(category, "locale");
+ return ret ? 0 : 1;
+}
+EOC
+cyn=setlocale
+set d_setlocale
+eval $trylink
diff --git a/mcon/U/d_setpgid.U b/mcon/U/d_setpgid.U
index 94c21b0..f9cdaed 100644
--- a/mcon/U/d_setpgid.U
+++ b/mcon/U/d_setpgid.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_setpgid.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_setpgid.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_setpgid.U,v $
@@ -18,7 +18,7 @@
?RCS: Revision 3.0 1993/08/18 12:05:56 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_setpgid: Inlibc
+?MAKE:d_setpgid: Trylink cat i_unistd
?MAKE: -pick add $@ %<
?S:d_setpgid:
?S: This variable conditionally defines the HAS_SETPGID symbol if the
@@ -32,6 +32,21 @@
?H:.
?LINT:set d_setpgid
: see if setpgid exists
-set setpgid d_setpgid
-eval $inlibc
+$cat >try.c <<EOC
+#include <sys/types.h>
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static pid_t pid, pgid;
+ static int ret;
+ ret |= setpgid(pid, pgid);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=setpgid
+set d_setpgid
+eval $trylink
diff --git a/mcon/U/d_setpgrp.U b/mcon/U/d_setpgrp.U
index 351038b..a1dbfd6 100644
--- a/mcon/U/d_setpgrp.U
+++ b/mcon/U/d_setpgrp.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_setpgrp.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_setpgrp.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_setpgrp.U,v $
@@ -24,8 +24,7 @@
?RCS: Revision 3.0 1993/08/18 12:07:09 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_setpgrp d_bsdsetpgrp: cat rm +cc +libs +ccflags \
- +ldflags Inlibc Guess Setvar i_unistd
+?MAKE:d_setpgrp d_bsdsetpgrp: Trylink Setvar cat i_unistd
?MAKE: -pick add $@ %<
?S:d_setpgrp:
?S: This variable conditionally defines HAS_SETPGRP if setpgrp() is
@@ -48,69 +47,50 @@
?H:#$d_setpgrp HAS_SETPGRP /**/
?H:#$d_bsdsetpgrp USE_BSD_SETPGRP /**/
?H:.
-?F:!set.c !set
-?T:xxx
?LINT:set d_setpgrp d_bsdsetpgrp
: see if setpgrp exists
-set setpgrp d_setpgrp
-eval $inlibc
-
-@if USE_BSD_SETPGRP || d_bsdsetpgrp
-case "$d_setpgrp" in
-"$define")
- echo " "
- echo "Checking to see which flavor of setpgrp is in use..."
- $cat >set.c <<EOP
-#$i_unistd I_UNISTD
+$cat >try.c <<EOC
#include <sys/types.h>
+#$i_unistd I_UNISTD
#ifdef I_UNISTD
-# include <unistd.h>
+#include <unistd.h>
#endif
-int main()
+int main(void)
{
- if (getuid() == 0) {
- printf("(I see you are running Configure as super-user...)\n");
- setuid(1);
- }
-#ifdef TRY_BSD_PGRP
- if (-1 == setpgrp(1, 1))
- exit(0);
-#else
- if (setpgrp() != -1)
- exit(0);
+ static pid_t ret, pid, pgrp;
+ ret |= setpgrp(pid, pgrp);
+ return ret ? 0 : 1;
+}
+EOC
+cyn="whether you have the BSD flavour of setpgrp()"
+set d_bsdsetpgrp
+eval $trylink
+
+case "$d_bsdsetpgrp" in
+$define)
+ val="$define"
+ set d_setpgrp
+ eval $setvar
+ ;;
+*)
+ $cat >try.c <<EOC
+#include <sys/types.h>
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
#endif
- exit(1);
+int main(void)
+{
+ static pid_t ret;
+ ret |= setpgrp();
+ if (ret)
+ return 1;
+ return 0;
}
-EOP
- if $cc -DTRY_BSD_PGRP $ccflags $ldflags -o set set.c $libs >/dev/null 2>&1 && ./set; then
- echo 'You have to use setpgrp(pid,pgrp) instead of setpgrp().' >&4
- val="$define"
- elif $cc $ccflags $ldflags -o set set.c $libs >/dev/null 2>&1 && ./set; then
- echo 'You have to use setpgrp() instead of setpgrp(pid,pgrp).' >&4
- val="$undef"
- else
- echo "(I can't seem to compile and run the test program.)"
- if ./usg; then
- xxx="a USG one, i.e. you use setpgrp()."
- else
- # SVR4 systems can appear rather BSD-ish.
- case "$i_unistd" in
- $undef)
- xxx="a BSD one, i.e. you use setpgrp(pid,pgrp)."
- val="$define"
- ;;
- $define)
- xxx="probably a USG one, i.e. you use setpgrp()."
- val="$undef"
- ;;
- esac
- fi
- echo "Assuming your setpgrp is $xxx" >&4
- fi
+EOC
+ cyn="whether you have the USG flavour of setpgrp() then"
+ set d_setpgrp
+ eval $trylink
;;
-*) val="$undef";;
esac
-set d_bsdsetpgrp
-eval $setvar
-$rm -f set set.c
-@end
+
diff --git a/mcon/U/d_setpgrp2.U b/mcon/U/d_setpgrp2.U
index bdd8a18..f4c7110 100644
--- a/mcon/U/d_setpgrp2.U
+++ b/mcon/U/d_setpgrp2.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_setpgrp2.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_setpgrp2.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_setpgrp2.U,v $
?RCS: Revision 3.0 1993/08/18 12:07:10 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_setpgrp2: Inlibc
+?MAKE:d_setpgrp2: Trylink cat i_unistd
?MAKE: -pick add $@ %<
?S:d_setpgrp2:
?S: This variable conditionally defines the HAS_SETPGRP2 symbol, which
@@ -27,6 +27,21 @@
?H:.
?LINT:set d_setpgrp2
: see if setpgrp2 exists
-set setpgrp2 d_setpgrp2
-eval $inlibc
+$cat >try.c <<EOC
+#include <sys/types.h>
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static pid_t pid;
+ static int ret;
+ ret |= setpgrp2(pid, pid);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=setpgrp2
+set d_setpgrp2
+eval $trylink
diff --git a/mcon/U/d_setprior.U b/mcon/U/d_setprior.U
index eff0de9..9780f19 100644
--- a/mcon/U/d_setprior.U
+++ b/mcon/U/d_setprior.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_setprior.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_setprior.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_setprior.U,v $
?RCS: Revision 3.0 1993/08/18 12:07:11 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_setprior: Inlibc
+?MAKE:d_setprior: Trylink cat i_sysresrc
?MAKE: -pick add $@ %<
?S:d_setprior:
?S: This variable conditionally defines HAS_SETPRIORITY if setpriority()
@@ -26,6 +26,22 @@
?H:.
?LINT:set d_setprior
: see if setpriority exists
-set setpriority d_setprior
-eval $inlibc
+$cat >try.c <<EOC
+#$i_sysresrc I_SYS_RESOURCE
+#ifdef I_SYS_RESOURCE
+#include <sys/resource.h>
+#endif
+int main(void)
+{
+ static int ret, prio;
+ static id_t id;
+ ret |= setpriority(PRIO_PROCESS, id, prio);
+ ret |= setpriority(PRIO_PGRP, id, prio);
+ ret |= setpriority(PRIO_USER, id, prio);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=setpriority
+set d_setprior
+eval $trylink
diff --git a/mcon/U/d_setproctitle.U b/mcon/U/d_setproctitle.U
new file mode 100644
index 0000000..3fadf5b
--- /dev/null
+++ b/mcon/U/d_setproctitle.U
@@ -0,0 +1,45 @@
+?RCS: $Id: d_setproctitle.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_setproctitle: Trylink cat i_stdlib i_unistd
+?MAKE: -pick add $@ %<
+?S:d_setproctitle:
+?S: This variable conditionally defines the HAS_SETPROCTITLE
+?S: symbol, which indicates to the C program that setproctitle()
+?S: is available.
+?S:.
+?C:HAS_SETPROCTITLE:
+?C: This symbol is defined when setproctitle() can be used and takes a
+?C: format string.
+?C:.
+?H:#$d_setproctitle HAS_SETPROCTITLE
+?H:.
+?LINT: set d_setproctitle
+: can we use setproctitle?
+$cat >try.c <<EOC
+#include <sys/types.h>
+#$i_stdlib I_STDLIB
+#ifdef I_STDLIB
+#include <stdlib.h>
+#endif
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ setproctitle("%s %d %s %c", "blah", 1, "x", 'X');
+ return 0;
+}
+EOC
+cyn=setproctitle
+set d_setproctitle
+eval $trylink
+
diff --git a/mcon/U/d_setregid.U b/mcon/U/d_setregid.U
index 40bf719..94f4bcf 100644
--- a/mcon/U/d_setregid.U
+++ b/mcon/U/d_setregid.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_setregid.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_setregid.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_setregid.U,v $
?RCS: Revision 3.0 1993/08/18 12:07:12 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_setregid d_setresgid: Inlibc
+?MAKE:d_setregid d_setresgid: Trylink cat i_unistd
?MAKE: -pick add $@ %<
?S:d_setregid:
?S: This variable conditionally defines HAS_SETREGID if setregid() is
@@ -39,8 +39,40 @@
?H:.
?LINT: set d_setregid d_setresgid
: see if setregid exists
-set setregid d_setregid
-eval $inlibc
-set setresgid d_setresgid
-eval $inlibc
+$cat >try.c <<EOC
+#include <sys/types.h>
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static int ret;
+ static gid_t rgid, egid;
+ ret |= setregid(rgid, egid);
+ if (ret)
+ return 1;
+ return 0;
+}
+EOC
+cyn=setregid
+set d_setregid
+eval $trylink
+
+$cat >try.c <<EOC
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static int ret;
+ static gid_t rgid, egid, sgid;
+ ret |= setresgid(rgid, egid, sgid);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=setresgid
+set d_setresgid
+eval $trylink
diff --git a/mcon/U/d_setreuid.U b/mcon/U/d_setreuid.U
index a9f4c28..e0fc31d 100644
--- a/mcon/U/d_setreuid.U
+++ b/mcon/U/d_setreuid.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_setreuid.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_setreuid.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_setreuid.U,v $
?RCS: Revision 3.0 1993/08/18 12:07:13 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_setreuid d_setresuid: Inlibc
+?MAKE:d_setreuid d_setresuid: Trylink cat i_unistd
?MAKE: -pick add $@ %<
?S:d_setreuid:
?S: This variable conditionally defines HAS_SETREUID if setreuid() is
@@ -39,8 +39,40 @@
?H:.
?LINT:set d_setreuid d_setresuid
: see if setreuid exists
-set setreuid d_setreuid
-eval $inlibc
-set setresuid d_setresuid
-eval $inlibc
+$cat >try.c <<EOC
+#include <sys/types.h>
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int
+main(void)
+{
+ static uid_t ruid, euid;
+ static int ret;
+ ret |= setreuid(ruid, euid);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=setreuid
+set d_setreuid
+eval $trylink
+
+: see if setresuid exists
+$cat >try.c <<EOC
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static uid_t ruid, euid, suid;
+ static int ret;
+ ret |= setresuid(ruid, euid, suid);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=setresuid
+set d_setresuid
+eval $trylink
diff --git a/mcon/U/d_setrgid.U b/mcon/U/d_setrgid.U
index 86d7522..3edbe3d 100644
--- a/mcon/U/d_setrgid.U
+++ b/mcon/U/d_setrgid.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_setrgid.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_setrgid.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_setrgid.U,v $
?RCS: Revision 3.0 1993/08/18 12:07:14 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_setrgid: Inlibc
+?MAKE:d_setrgid: Trylink cat i_unistd
?MAKE: -pick add $@ %<
?S:d_setrgid:
?S: This variable conditionally defines the HAS_SETRGID symbol, which
@@ -27,6 +27,21 @@
?H:.
?LINT:set d_setrgid
: see if setrgid exists
-set setrgid d_setrgid
-eval $inlibc
+$cat >try.c <<EOC
+#include <sys/types.h>
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static int ret;
+ static gid_t gid;
+ ret |= setrgid(gid);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=setrgid
+set d_setrgid
+eval $trylink
diff --git a/mcon/U/d_setrlimit.U b/mcon/U/d_setrlimit.U
new file mode 100644
index 0000000..57ffbe7
--- /dev/null
+++ b/mcon/U/d_setrlimit.U
@@ -0,0 +1,47 @@
+?RCS: $Id: d_setrlimit.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2012 Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_setrlimit.U,v $
+?RCS:
+?MAKE:d_setrlimit: Trylink cat i_systime
+?MAKE: -pick add $@ %<
+?S:d_setrlimit:
+?S: This variable conditionally defines the HAS_SETRLIMIT symbol, which
+?S: indicates to the C program that the setrlimit() routine is available
+?S: to set process resource limits.
+?S:.
+?C:HAS_SETRLIMIT :
+?C: This symbol, if defined, indicates that the setrlimit() routine is
+?C: available to set process resource limits.
+?C:.
+?H:#$d_setrlimit HAS_SETRLIMIT /**/
+?H:.
+?LINT:set d_setrlimit
+: see if setrlimit exists
+$cat >try.c <<EOC
+#$i_systime I_SYS_TIME
+#ifdef I_SYS_TIME
+#include <sys/time.h>
+#endif
+#include <sys/resource.h>
+int main(void)
+{
+ static struct rlimit lim;
+ int ret;
+ lim.rlim_cur = 0;
+ lim.rlim_max = 1;
+ ret |= setrlimit(RLIMIT_CORE, &lim);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=setrlimit
+set d_setrlimit
+eval $trylink
+
diff --git a/mcon/U/d_setruid.U b/mcon/U/d_setruid.U
index a66dd77..c8fc09c 100644
--- a/mcon/U/d_setruid.U
+++ b/mcon/U/d_setruid.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_setruid.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_setruid.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_setruid.U,v $
?RCS: Revision 3.0 1993/08/18 12:07:15 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_setruid: Inlibc
+?MAKE:d_setruid: Trylink cat i_unistd
?MAKE: -pick add $@ %<
?S:d_setruid:
?S: This variable conditionally defines the HAS_SETRUID symbol, which
@@ -27,6 +27,21 @@
?H:.
?LINT:set d_setruid
: see if setruid exists
-set setruid d_setruid
-eval $inlibc
+$cat >try.c <<EOC
+#include <sys/types.h>
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static int ret;
+ static uid_t uid;
+ ret |= setruid(uid);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=setruid
+set d_setruid
+eval $trylink
diff --git a/mcon/U/d_setsid.U b/mcon/U/d_setsid.U
index 1b3b3be..ac4ed64 100644
--- a/mcon/U/d_setsid.U
+++ b/mcon/U/d_setsid.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_setsid.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_setsid.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_setsid.U,v $
@@ -15,7 +15,7 @@
?RCS: Revision 3.0 1993/08/18 12:05:56 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_setsid: Inlibc
+?MAKE:d_setsid: Trylink cat i_unistd
?MAKE: -pick add $@ %<
?S:d_setsid:
?S: This variable conditionally defines HAS_SETSID if setsid() is
@@ -29,6 +29,20 @@
?H:.
?LINT:set d_setsid
: see if setsid exists
-set setsid d_setsid
-eval $inlibc
+$cat >try.c <<EOC
+#include <sys/types.h>
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static pid_t ret;
+ ret |= setsid();
+ return ret ? 0 : 1;
+}
+EOC
+cyn=setsid
+set d_setsid
+eval $trylink
diff --git a/mcon/U/d_sgndchr.U b/mcon/U/d_sgndchr.U
index 95ec164..3221ff6 100644
--- a/mcon/U/d_sgndchr.U
+++ b/mcon/U/d_sgndchr.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_sgndchr.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_sgndchr.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_sgndchr.U,v $
@@ -18,7 +18,7 @@
?RCS: Revision 3.0 1993/08/18 12:07:16 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_sgndchr: cat rm +cc +ccflags Setvar
+?MAKE:d_sgndchr: Trylink cat
?MAKE: -pick add $@ %<
?S:d_sgndchr:
?S: This variable conditionally defines the SIGNEDCHAR symbol, which
@@ -31,29 +31,20 @@
?C:.
?H:#$d_sgndchr SIGNEDCHAR /**/
?H:.
-?F:!try
?LINT:set d_sgndchr
: check for signed chars
-echo " "
-echo "Checking to see if your C compiler can do signed chars..." >&4
-$cat >try.c <<'EOCP'
-int main()
+$cat >try.c <<EOC
+int main(void)
{
- char c = 0;
-
- c--;
- exit(c >= 0);
+ switch (1) {
+ case 0:
+ case ((char) -1 < 0):
+ break;
+ }
+ return 0;
}
-EOCP
-$cc $ccflags -o try try.c
-if ./try; then
- val="$define"
- echo "It certainly can."
-else
- val="$undef"
- echo "It can't. I'll have to make some things type short."
-fi
+EOC
+cyn="whether your C compiler can do signed chars"
set d_sgndchr
-eval $setvar
-$rm -f try*
+eval $trylink
diff --git a/mcon/U/d_shm.U b/mcon/U/d_shm.U
index 5c8a683..3cdb150 100644
--- a/mcon/U/d_shm.U
+++ b/mcon/U/d_shm.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_shm.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_shm.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_shm.U,v $
diff --git a/mcon/U/d_shmat.U b/mcon/U/d_shmat.U
index 8289da4..f987472 100644
--- a/mcon/U/d_shmat.U
+++ b/mcon/U/d_shmat.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_shmat.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_shmat.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_shmat.U,v $
@@ -21,8 +21,7 @@
?RCS: Revision 3.0 1993/08/18 12:07:18 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_shmat shmattype d_shmatprototype: Inlibc cat +cc +ccflags \
- rm cppstdin cppflags cppminus Findhdr Setvar contains
+?MAKE:d_shmat shmattype d_shmatprototype: Trylink Setvar cat
?MAKE: -pick add $@ %<
?S:d_shmat:
?S: This variable conditionally defines the HAS_SHMAT symbol, which
@@ -57,37 +56,92 @@
?H:#$d_shmatprototype HAS_SHMAT_PROTOTYPE /**/
?H:.
?LINT:set d_shmat d_shmatprototype
-?T:xxx
: see if shmat exists
-set shmat d_shmat
-eval $inlibc
-: see what shmat returns
+$cat >try.c <<EOC
+#include <sys/shm.h>
+int main(void)
+{
+ static int id, flags;
+ static void *addr;
+ (void) shmat(id, addr, flags);
+ return 0;
+}
+EOC
+cyn=shmat
+set d_shmat
+eval $trylink
+
case "$d_shmat" in
"$define")
- $cat >shmat.c <<'END'
+ $cat >try.c <<EOC
#include <sys/shm.h>
-void *shmat();
-END
- if $cc $ccflags -c shmat.c >/dev/null 2>&1; then
- shmattype='void *'
- else
- shmattype='char *'
- fi
- echo "and it returns ($shmattype)." >&4
- : see if a prototype for shmat is available
- xxx=`./findhdr sys/shm.h`
- $cppstdin $cppflags $cppminus < $xxx > shmat.c 2>/dev/null
- if $contains 'shmat.*(' shmat.c >/dev/null 2>&1; then
- val="$define"
- else
- val="$undef"
- fi
- $rm -f shmat.[co]
- ;;
-*)
- val="$undef"
+extern void shmat(void);
+int main(void) { return 0; }
+EOC
+ cyn="whether <sys/shm.h> contains the shmat() prototype"
+ set val
+ eval $trylink
+ case "$val" in
+ "$define") val="$undef";;
+ *) val="$define";;
+ esac
;;
+*) val="$undef";;
esac
+
set d_shmatprototype
eval $setvar
+case "$d_shmat" in
+"$define")
+ echo " "
+ echo "Looking for the correct shmat prototype..." >&4
+ ;;
+esac
+
+case "$d_shmat" in
+"$define")
+ $cat >try.c <<EOC
+#include <sys/shm.h>
+extern void *shmat(int, const void *, int);
+int main(void) { return 0; }
+EOC
+ set val
+ eval $trylink
+ ;;
+esac
+
+case "$d_shmat" in
+"$define")
+ $cat >try.c <<EOC
+#include <sys/shm.h>
+extern void *shmat(int, void *, int);
+int main(void) { return 0; }
+EOC
+ set val
+ eval $trylink
+ case "$val" in
+ "$define") shmattype='void *';;
+ esac
+ ;;
+esac
+
+case "$d_shmat" in
+"$define")
+ $cat >try.c <<EOC
+#include <sys/shm.h>
+extern char *shmat(int, char *, int);
+int main(void) { return 0; }
+EOC
+ set val
+ eval $trylink
+ case "$val" in
+ "$define") shmattype='char *';;
+ esac
+ ;;
+esac
+
+case "$d_shmat" in
+"$define") echo "shmat() returns $shmattype";;
+esac
+
diff --git a/mcon/U/d_shmctl.U b/mcon/U/d_shmctl.U
index 51dfc70..6ec1d6c 100644
--- a/mcon/U/d_shmctl.U
+++ b/mcon/U/d_shmctl.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_shmctl.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_shmctl.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_shmctl.U,v $
?RCS: Revision 3.0 1993/08/18 12:07:18 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_shmctl: Inlibc
+?MAKE:d_shmctl: Trylink cat
?MAKE: -pick add $@ %<
?S:d_shmctl:
?S: This variable conditionally defines the HAS_SHMCTL symbol, which
@@ -26,6 +26,19 @@
?H:.
?LINT:set d_shmctl
: see if shmctl exists
-set shmctl d_shmctl
-eval $inlibc
+$cat >try.c <<EOC
+#include <sys/shm.h>
+int main(void)
+{
+ static int ret, id;
+ static struct shmid_ds *buf;
+ ret |= shmctl(id, IPC_STAT, buf);
+ ret |= shmctl(id, IPC_SET, buf);
+ ret |= shmctl(id, IPC_RMID, buf);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=shmctl
+set d_shmctl
+eval $trylink
diff --git a/mcon/U/d_shmdt.U b/mcon/U/d_shmdt.U
index 0b705ef..6b5d569 100644
--- a/mcon/U/d_shmdt.U
+++ b/mcon/U/d_shmdt.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_shmdt.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_shmdt.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_shmdt.U,v $
?RCS: Revision 3.0 1993/08/18 12:07:19 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_shmdt: Inlibc
+?MAKE:d_shmdt: Trylink cat
?MAKE: -pick add $@ %<
?S:d_shmdt:
?S: This variable conditionally defines the HAS_SHMDT symbol, which
@@ -26,6 +26,17 @@
?H:.
?LINT:set d_shmdt
: see if shmdt exists
-set shmdt d_shmdt
-eval $inlibc
+$cat >try.c <<EOC
+#include <sys/shm.h>
+int main(void)
+{
+ static void *addr;
+ static int ret;
+ ret |= shmdt(addr);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=shmdt
+set d_shmdt
+eval $trylink
diff --git a/mcon/U/d_shmget.U b/mcon/U/d_shmget.U
index 007cae7..4ca197c 100644
--- a/mcon/U/d_shmget.U
+++ b/mcon/U/d_shmget.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_shmget.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_shmget.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_shmget.U,v $
?RCS: Revision 3.0 1993/08/18 12:07:20 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_shmget: Inlibc
+?MAKE:d_shmget: Trylink cat
?MAKE: -pick add $@ %<
?S:d_shmget:
?S: This variable conditionally defines the HAS_SHMGET symbol, which
@@ -26,6 +26,21 @@
?H:.
?LINT:set d_shmget
: see if shmget exists
-set shmget d_shmget
-eval $inlibc
+$cat >try.c <<EOC
+#include <sys/shm.h>
+int main(void)
+{
+ static key_t key = IPC_PRIVATE;
+ static size_t size;
+ static int ret, flags;
+ flags |= IPC_CREAT;
+ flags |= IPC_EXCL;
+ flags |= IPC_NOWAIT;
+ ret |= shmget(key, size, flags);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=shmget
+set d_shmget
+eval $trylink
diff --git a/mcon/U/d_sigaction.U b/mcon/U/d_sigaction.U
index 236465d..a7bbcd0 100644
--- a/mcon/U/d_sigaction.U
+++ b/mcon/U/d_sigaction.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_sigaction.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_sigaction.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_sigaction.U,v $
@@ -13,7 +13,7 @@
?RCS: patch61: created
?RCS:
?RCS:
-?MAKE:d_sigaction: Csym Setvar cat cc ccflags ldflags libs rm _o
+?MAKE:d_sigaction: Trylink cat
?MAKE: -pick add $@ %<
?S:d_sigaction:
?S: This variable conditionally defines the HAS_SIGACTION symbol, which
@@ -25,37 +25,21 @@
?C:.
?H:#$d_sigaction HAS_SIGACTION /**/
?H:.
-?T:val
?LINT:set d_sigaction
: see if we have sigaction
-echo " "
-if set sigaction val -f d_sigaction; eval $csym; $val; then
- echo 'sigaction() found.' >&4
- val="$define"
-else
- echo 'sigaction NOT found.' >&4
- val="$undef"
-fi
-?X:
-?X: Solaris 2.5_x86 with SunWorks Pro C 3.0.1 doesn't have a complete
-?X: sigaction structure if compiled with cc -Xc. This compile test
-?X: will fail then. <doughera@lafcol.lafayette.edu>
-?X:
-$cat > set.c <<'EOP'
+$cat >try.c <<EOC
#include <stdio.h>
#include <sys/types.h>
#include <signal.h>
-int main()
+int main(void)
{
- struct sigaction act, oact;
+ struct sigaction act, oact;
+ static int ret, sig;
+ ret |= sigaction(sig, &act, &oact);
+ return ret ? 0 : 1;
}
-EOP
-if $cc $ccflags $ldflags -o set set.c $libs >/dev/null 2>&1; then
- :
-else
- echo "But you don't seem to have a useable struct sigaction." >&4
- val="$undef"
-fi
-set d_sigaction; eval $setvar
-$rm -f set set$_o set.c
+EOC
+cyn=sigaction
+set d_sigaction
+eval $trylink
diff --git a/mcon/U/d_sigaltstack.U b/mcon/U/d_sigaltstack.U
new file mode 100644
index 0000000..e9e4891
--- /dev/null
+++ b/mcon/U/d_sigaltstack.U
@@ -0,0 +1,42 @@
+?RCS:
+?RCS: Copyright (c) 2013, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_sigaltstack: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_sigaltstack:
+?S: This variable conditionally defines the HAS_SIGALTSTACK symbol, which
+?S: indicates that the sigaltstack() routine is available to define an
+?S: alternate signal stack.
+?S:.
+?C:HAS_SIGALTSTACK:
+?C: This symbol, if defined, indicates that the sigaltstack() routine
+?C: is available to define an alternate signal stack.
+?C:.
+?H:#$d_sigaltstack HAS_SIGALTSTACK /**/
+?H:.
+?LINT:set d_sigaltstack
+: see if we have sigaltstack
+$cat >try.c <<EOC
+#include <stdio.h>
+#include <signal.h>
+int main(void)
+{
+ stack_t ss;
+ static int ret;
+ ss.ss_sp = NULL;
+ ss.ss_flags |= SS_ONSTACK | SS_DISABLE;
+ ss.ss_size = SIGSTKSZ + MINSIGSTKSZ;
+ ret |= sigaltstack(&ss, NULL);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=sigaltstack
+set d_sigaltstack
+eval $trylink
+
diff --git a/mcon/U/d_sigblock.U b/mcon/U/d_sigblock.U
index 3a2a830..996263f 100644
--- a/mcon/U/d_sigblock.U
+++ b/mcon/U/d_sigblock.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_sigblock.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_sigblock.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_sigblock.U,v $
?RCS: Revision 3.0 1993/08/18 12:07:21 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_sigblock: Inlibc
+?MAKE:d_sigblock: Trylink cat
?MAKE: -pick add $@ %<
?S:d_sigblock:
?S: This variable conditionally defines HAS_SIGBLOCK if sigblock() is
@@ -26,6 +26,16 @@
?H:.
?LINT:set d_sigblock
: see if sigblock exists
-set sigblock d_sigblock
-eval $inlibc
+$cat >try.c <<EOC
+#include <signal.h>
+int main(void)
+{
+ static int ret, mask;
+ ret |= sigblock(mask);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=sigblock
+set d_sigblock
+eval $trylink
diff --git a/mcon/U/d_sighold.U b/mcon/U/d_sighold.U
index 183e31c..bcd0886 100644
--- a/mcon/U/d_sighold.U
+++ b/mcon/U/d_sighold.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_sighold.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_sighold.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_sighold.U,v $
?RCS: Revision 3.0 1993/08/18 12:07:21 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_sighold: Inlibc
+?MAKE:d_sighold: Trylink cat
?MAKE: -pick add $@ %<
?S:d_sighold:
?S: This variable conditionally defines HAS_SIGHOLD if sighold() is
@@ -26,6 +26,16 @@
?H:.
?LINT:set d_sighold
: see if sighold exists
-set sighold d_sighold
-eval $inlibc
+$cat >try.c <<EOC
+#include <signal.h>
+int main(void)
+{
+ static int ret, sig;
+ ret |= sighold(sig);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=sighold
+set d_sighold
+eval $trylink
diff --git a/mcon/U/d_siglist.U b/mcon/U/d_siglist.U
index ded1311..ab15388 100644
--- a/mcon/U/d_siglist.U
+++ b/mcon/U/d_siglist.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_siglist.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_siglist.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_siglist.U,v $
?RCS: Revision 3.0 1993/08/18 12:07:22 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_siglist: Csym Setvar
+?MAKE:d_siglist: Trylink cat
?MAKE: -pick add $@ %<
?S:d_siglist:
?S: This variable conditionally defines HAS_SYS_SIGLIST if sys_siglist[] is
@@ -25,15 +25,17 @@
?H:#$d_siglist HAS_SYS_SIGLIST /**/
?H:.
?LINT:set d_siglist
-: see if sys_siglist[] exist
-echo " "
-if set sys_siglist val -a d_siglist; eval $csym; $val; then
- echo "You have sys_siglist[] for signal description." >&4
- val="$define"
-else
- echo "You don't have sys_siglist[]." >&4
- val="$undef"
-fi
+: see if sys_siglist[] exists
+$cat >try.c <<EOC
+#include <signal.h>
+int main(void)
+{
+ static char c;
+ c |= *sys_siglist[0];
+ return c ? 0 : 1
+}
+EOC
+cyn="whether sys_siglist[] exists"
set d_siglist
-eval $setvar
+eval $trylink
diff --git a/mcon/U/d_sigprocmask.U b/mcon/U/d_sigprocmask.U
new file mode 100644
index 0000000..837fb02
--- /dev/null
+++ b/mcon/U/d_sigprocmask.U
@@ -0,0 +1,42 @@
+?RCS: $Id: d_sigprocmask.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_sigprocmask.U,v $
+?RCS: Revision 3.0 1993/08/18 12:07:04 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_sigprocmask: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_sigprocmask:
+?S: This variable conditionally defines the HAS_SIGPROCMASK symbol, which
+?S: indicates to the C program that the sigprocmask() routine is available.
+?S:.
+?C:HAS_SIGPROCMASK:
+?C: This symbol, if defined, indicates that the sigprocmask() routine is
+?C: available to examine and change blocked signals.
+?C:.
+?H:#$d_sigprocmask HAS_SIGPROCMASK /**/
+?H:.
+?LINT:set d_sigprocmask
+: see if sigprocmask exists
+$cat >try.c <<EOC
+#include <signal.h>
+int main(void)
+{
+ static int ret;
+ sigset_t oset;
+ ret |= sigprocmask(SIG_BLOCK, &oset, &oset);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=sigprocmask
+set d_sigprocmask
+eval $trylink
+
diff --git a/mcon/U/d_sigsetjmp.U b/mcon/U/d_sigsetjmp.U
index cd16aa2..9bbc0c6 100644
--- a/mcon/U/d_sigsetjmp.U
+++ b/mcon/U/d_sigsetjmp.U
@@ -1,12 +1,12 @@
-?RCS: $Id: d_sigsetjmp.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_sigsetjmp.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1996, Andy Dougherty
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: You may distribute under the terms of either the GNU General Public
@@ -58,8 +58,6 @@
?F:!set
?LINT:set d_sigsetjmp
: see if sigsetjmp exists
-?X: We can't check for these symbols with Inlibc because sigsetjmp
-?X: is (sometimes? always?) a macro under GCC
echo " "
case "$d_sigsetjmp" in
'')
@@ -67,35 +65,36 @@ case "$d_sigsetjmp" in
#include <setjmp.h>
sigjmp_buf env;
int set = 1;
-int main()
+int main(void)
{
if (sigsetjmp(env,1))
- exit(set);
+ return set;
set = 0;
siglongjmp(env, 1);
- exit(1);
+ return 1;
}
EOP
- if $cc $ccflags $ldflags -o set set.c $libs > /dev/null 2>&1 ; then
+ if $cc $ccflags $ldflags -o set set.c $libs >/dev/null 2>&1; then
if ./set >/dev/null 2>&1; then
- echo "POSIX sigsetjmp found." >&4
+ echo "POSIX sigsetjmp() found." >&4
val="$define"
else
$cat >&4 <<EOM
-Uh-Oh! You have POSIX sigsetjmp and siglongjmp, but they do not work properly!!
+Uh-Oh!
+You have POSIX sigsetjmp() and siglongjmp(), but they do not work properly!!
I'll ignore them.
EOM
val="$undef"
fi
else
- echo "sigsetjmp not found." >&4
+ echo "sigsetjmp() not found." >&4
val="$undef"
fi
;;
*) val="$d_sigsetjmp"
case "$d_sigsetjmp" in
- $define) echo "POSIX sigsetjmp found." >&4;;
- $undef) echo "sigsetjmp not found." >&4;;
+ $define) echo "POSIX sigsetjmp() found." >&4;;
+ $undef) echo "sigsetjmp() not found." >&4;;
esac
;;
esac
diff --git a/mcon/U/d_sigsetmk.U b/mcon/U/d_sigsetmk.U
index 9a5489e..bd469cd 100644
--- a/mcon/U/d_sigsetmk.U
+++ b/mcon/U/d_sigsetmk.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_sigsetmk.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_sigsetmk.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_sigsetmk.U,v $
?RCS: Revision 3.0 1993/08/18 12:07:23 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_sigsetmk: Csym Setvar
+?MAKE:d_sigsetmk: Trylink cat
?MAKE: -pick add $@ %<
?S:d_sigsetmk:
?S: This variable conditionally defines the HAS_SIGSETMASK symbol, which
@@ -28,14 +28,16 @@
?H:.
?LINT:set d_sigsetmk
: see if sigsetmask exists
-echo " "
-if set sigsetmask val -f d_sigsetmk; eval $csym; $val; then
- echo 'sigsetmask() found.' >&4
- val="$define"
-else
- echo "sigsetmask() not found -- We'll use signal()." >&4
- val="$undef"
-fi
+$cat >try.c <<EOC
+#include <signal.h>
+int main(void)
+{
+ static int ret, mask;
+ ret |= sigsetmask(mask);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=sigsetmask
set d_sigsetmk
-eval $setvar
+eval $trylink
diff --git a/mcon/U/d_sigvec.U b/mcon/U/d_sigvec.U
index fd6e4a0..0aa4958 100644
--- a/mcon/U/d_sigvec.U
+++ b/mcon/U/d_sigvec.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_sigvec.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_sigvec.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_sigvec.U,v $
@@ -17,7 +17,7 @@
?RCS:
?X: d_sigvec.U, from d_ftime.U 1.0
?X:
-?MAKE:d_sigvec d_sigvectr d_sigintrp: Csym Inlibc Setvar
+?MAKE:d_sigvec d_sigvectr d_sigintrp: Trylink cat
?MAKE: -pick add $@ %<
?S:d_sigvec:
?S: This variable conditionally defines the HAS_SIGVEC symbol, which indicates
@@ -49,31 +49,51 @@
?H:#$d_sigvectr HAS_SIGVECTOR /**/
?H:#$d_sigintrp HAS_SIGINTRP /**/
?H:.
-?T:val
-?LINT:set d_sigvec d_sigintrp
+?LINT:set d_sigvec d_sigvectr d_sigintrp
@if d_sigvectr || d_sigvec || HAS_SIGVEC || HAS_SIGVECTOR
-: see if sigvector exists -- since sigvec will match the substring
-echo " "
-if set sigvector val -f d_sigvectr; eval $csym; $val; then
- echo 'sigvector() found--you must be running HP-UX.' >&4
- val="$define"; set d_sigvectr; eval $setvar
- val="$define"; set d_sigvec; eval $setvar
-else
-: try the original name
- d_sigvectr="$undef"
- if set sigvec val -f d_sigvec; eval $csym; $val; then
- echo 'sigvec() found.' >&4
- val="$define"; set d_sigvec; eval $setvar
- else
- echo 'sigvec() not found--race conditions with signals may occur.' >&4
- val="$undef"; set d_sigvec; eval $setvar
- fi
-fi
+: see if sigvector exists
+$cat >try.c <<EOC
+#include <signal.h>
+int main(void)
+{
+ static int ret, sig;
+ struct sigvec vec, ovec;
+ ret |= sigvector(sig, &vec, &ovec);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=sigvector
+set d_sigvectr
+eval $trylink
+
+$cat >try.c <<EOC
+#include <signal.h>
+int main(void)
+{
+ static int ret, sig;
+ struct sigvec vec, ovec;
+ ret |= sigvec(sig, &vec, &ovec);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=sigvec
+set d_sigvec
+eval $trylink
@end
@if d_sigintrp || HAS_SIGINTRP
: see if we have siginterrupt
-set siginterrupt d_sigintrp
-eval $inlibc
+$cat >try.c <<EOC
+#include <signal.h>
+int main(void)
+{
+ static int ret, sig, flag;
+ ret |= siginterrupt(sig, flag);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=siginterrupt
+set d_sigintrp
+eval $trylink
@end
diff --git a/mcon/U/d_sjis2jis.U b/mcon/U/d_sjis2jis.U
index 0cf6335..d6f1850 100644
--- a/mcon/U/d_sjis2jis.U
+++ b/mcon/U/d_sjis2jis.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_sjis2jis.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_sjis2jis.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_sjis2jis.U,v $
diff --git a/mcon/U/d_sockaddr_in_sin_len.U b/mcon/U/d_sockaddr_in_sin_len.U
new file mode 100644
index 0000000..1a4cf67
--- /dev/null
+++ b/mcon/U/d_sockaddr_in_sin_len.U
@@ -0,0 +1,53 @@
+?RCS: $Id: d_sockaddr_in_sin_len.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_sockaddr_in_sin_len: Trylink cat i_arpainet i_syssock i_winsock2 i_niin
+?MAKE: -pick add $@ %<
+?S:d_sockaddr_in_sin_len:
+?S: This variable conditionally defines the HAS_SOCKADDR_IN_SIN_LEN symbol,
+?S: indicates to the C program that struct sockaddr_in has a member named
+?S: "sin_len".
+?S:.
+?C:HAS_SOCKADDR_IN_SIN_LEN:
+?C: This symbol is defined if struct sockaddr_in has sin_len.
+?C:.
+?H:#$d_sockaddr_in_sin_len HAS_SOCKADDR_IN_SIN_LEN
+?H:.
+?LINT: set d_sockaddr_in_sin_len
+: does struct sockaddr_in has sin_len
+$cat >try.c <<EOC
+#$i_syssock I_SYS_SOCKET
+#$i_niin I_NETINET_IN
+#$i_winsock2 I_WINSOCK2
+#$i_arpainet I_ARPA_INET
+#include <sys/types.h>
+#ifdef I_SYS_SOCKET
+#include <sys/socket.h>
+#endif
+#ifdef I_NETINET_IN
+#include <netinet/in.h>
+#endif
+#ifdef I_ARPA_INET
+#include <arpa/inet.h>
+#endif
+#ifdef I_WINSOCK2
+#include <Winsock2.h>
+#endif
+int main(void)
+{
+ static struct sockaddr_in addr;
+ addr.sin_len = 1;
+ return 0;
+}
+EOC
+cyn="whether 'struct sockaddr_in' has a 'sin_len' member"
+set d_sockaddr_in_sin_len
+eval $trylink
+
diff --git a/mcon/U/d_sockaddr_un.U b/mcon/U/d_sockaddr_un.U
new file mode 100644
index 0000000..c4d5f19
--- /dev/null
+++ b/mcon/U/d_sockaddr_un.U
@@ -0,0 +1,61 @@
+?RCS: $Id: d_sockaddr_in_sin_len.U 57 2010-12-11 23:44:52Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2011, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_sockaddr_un: Trylink cat i_arpainet i_syssock i_winsock2 i_niin i_sysun
+?MAKE: -pick add $@ %<
+?S:d_sockaddr_un:
+?S: This variable conditionally defines the HAS_SOCKADDR_UN symbol,
+?S: indicates to the C program that struct sockaddr_un is available to
+?S: create file sockets.
+?S:.
+?C:HAS_SOCKADDR_UN:
+?C: This symbol is defined if struct sockaddr_un exists, allowing the
+?C: creation of file sockets.
+?C:.
+?H:#$d_sockaddr_un HAS_SOCKADDR_UN
+?H:.
+?LINT: set d_sockaddr_un
+: does struct sockaddr_un exists?
+$cat >try.c <<EOC
+#$i_syssock I_SYS_SOCKET
+#$i_sysun I_SYS_UN
+#$i_niin I_NETINET_IN
+#$i_winsock2 I_WINSOCK2
+#$i_arpainet I_ARPA_INET
+#include <sys/types.h>
+#ifdef I_SYS_SOCKET
+#include <sys/socket.h>
+#endif
+#ifdef I_SYS_UN
+#include <sys/un.h>
+#endif
+#ifdef I_NETINET_IN
+#include <netinet/in.h>
+#endif
+#ifdef I_ARPA_INET
+#include <arpa/inet.h>
+#endif
+#ifdef I_WINSOCK2
+#include <Winsock2.h>
+#endif
+#if !defined(AF_LOCAL) && defined(AF_UNIX)
+#define AF_LOCAL AF_UNIX
+#endif
+int main(void)
+{
+ static struct sockaddr_un addr;
+ addr.sun_family = AF_LOCAL;
+ return 0;
+}
+EOC
+cyn="whether 'struct sockaddr_un' is available"
+set d_sockaddr_un
+eval $trylink
+
diff --git a/mcon/U/d_socker_get.U b/mcon/U/d_socker_get.U
new file mode 100644
index 0000000..72675b4
--- /dev/null
+++ b/mcon/U/d_socker_get.U
@@ -0,0 +1,65 @@
+?RCS: $Id: d_socker_get.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_socker_get sockercflags sockerldflags: Trylink cat ccflags ldflags
+?MAKE: -pick add $@ %<
+?S:d_socker_get:
+?S: This variable conditionally defines the HAS_SOCKER_GET symbol, which
+?S: indicates to the C program that socker_get() support is available.
+?S:.
+?S:sockercflags:
+?S: This variable holds the compiler flags required to compile with socker.
+?S:.
+?S:sockerldflags:
+?S: This variable holds the linker flags required to link against socker.
+?S:.
+?C:HAS_SOCKER_GET:
+?C: This symbol is defined when socker_get() can be used to get sockets
+?C: bound to privileged ports.
+?C:.
+?H:#$d_socker_get HAS_SOCKER_GET
+?H:.
+?T:saved_ccflags saved_ldflags
+?LINT:change ccflags ldflags
+?LINT:set d_socker_get
+: determine whether socker_get is available
+case "$d_socker_get" in
+"$undef") echo " "; echo "socker support is disabled." >&4;;
+*)
+ $cat >try.c <<'EOC'
+#include <sys/types.h>
+#include <socker.h>
+int main(void)
+{
+ static int ret;
+ ret |= socker_get(1, 2, 3, "", 5);
+ return ret ? 0 : 1;
+}
+EOC
+ sockercflags=`socker-config --cflags 2>/dev/null`
+ sockerldflags=`socker-config --libs 2>/dev/null`
+ saved_ccflags=$ccflags
+ saved_ldflags=$ldflags
+ ccflags="$ccflags $sockercflags"
+ ldflags="$ldflags $sockerldflags"
+ cyn="whether socket_get() allows binding to privileged ports"
+ set d_socker_get
+ eval $trylink
+ ccflags=$saved_ccflags
+ ldflags=$saved_ldflags
+ case "$d_socker_get" in
+ "$undef")
+ sockercflags=''
+ sockerldflags=''
+ ;;
+ esac
+ ;;
+esac
+
diff --git a/mcon/U/d_socket.U b/mcon/U/d_socket.U
index 234f9e3..161303e 100644
--- a/mcon/U/d_socket.U
+++ b/mcon/U/d_socket.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_socket.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_socket.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_socket.U,v $
@@ -19,7 +19,7 @@
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
?MAKE:d_socket d_oldsock d_sockpair socketlib sockethdr: contains libc \
- echo n c nm_opt nm_extract Inlibc Csym _a
+ echo n c nm_opt nm_extract Trylink Csym _a cat i_syssock i_winsock2
?MAKE: -pick add $@ %<
?S:d_socket:
?S: This variable conditionally defines HAS_SOCKET, which indicates
@@ -39,15 +39,15 @@
?S:sockethdr:
?S: This variable has any cpp -I flags needed for socket support.
?S:.
-?C:HAS_SOCKET (SOCKET):
+?C:HAS_SOCKET:
?C: This symbol, if defined, indicates that the BSD socket interface is
?C: supported.
?C:.
-?C:HAS_SOCKETPAIR (SOCKETPAIR):
+?C:HAS_SOCKETPAIR:
?C: This symbol, if defined, indicates that the BSD socketpair() call is
?C: supported.
?C:.
-?C:USE_OLDSOCKET (OLDSOCKET):
+?C:USE_OLDSOCKET:
?C: This symbol, if defined, indicates that the 4.1c BSD socket interface
?C: is supported instead of the 4.2/4.3 BSD socket interface. For instance,
?C: there is no setsockopt() call.
@@ -117,7 +117,24 @@ fi
@if HAS_SOCKETPAIR || d_sockpair
: see if socketpair exists
-set socketpair d_sockpair
-eval $inlibc
+$cat >try.c <<EOC
+#$i_syssock I_SYS_SOCKET
+#$i_winsock2 I_WINSOCK2
+#ifdef I_SYS_SOCKET
+#include <sys/socket.h>
+#endif
+#ifdef I_WINSOCK2
+#include <Winsock2.h>
+#endif
+int main(void)
+{
+ static int ret, domain, type, protocol, sv[2];
+ ret |= socketpair(domain, type, protocol, sv);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=socketpair
+set d_sockpair
+eval $trylink
@end
diff --git a/mcon/U/d_speedopt.U b/mcon/U/d_speedopt.U
index 8a934c5..af57b99 100644
--- a/mcon/U/d_speedopt.U
+++ b/mcon/U/d_speedopt.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_speedopt.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_speedopt.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_speedopt.U,v $
diff --git a/mcon/U/d_srandom.U b/mcon/U/d_srandom.U
new file mode 100644
index 0000000..7f4d867
--- /dev/null
+++ b/mcon/U/d_srandom.U
@@ -0,0 +1,39 @@
+?RCS: $Id: d_srandom.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_srandom: Trylink cat i_stdlib
+?MAKE: -pick add $@ %<
+?S:d_srandom:
+?S: This variable conditionally defines the HAS_SRANDOM symbol, which
+?S: indicates to the C program that the srandom() routine is available.
+?S:.
+?C:HAS_SRANDOM:
+?C: This symbol, if defined, indicates that the srandom routine is
+?C: available.
+?C:.
+?H:#$d_srandom HAS_SRANDOM /**/
+?H:.
+?LINT:set d_srandom
+: see if srandom exists
+$cat >try.c <<EOC
+#$i_stdlib I_STDLIB
+#ifdef I_STDLIB
+#include <stdlib.h>
+#endif
+int main(void)
+{
+ srandom(1UL);
+ return 0;
+}
+EOC
+cyn=srandom
+set d_srandom
+eval $trylink
+
diff --git a/mcon/U/d_stat.U b/mcon/U/d_stat.U
index e3636dd..5aa55b8 100644
--- a/mcon/U/d_stat.U
+++ b/mcon/U/d_stat.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_stat.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_stat.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_stat.U,v $
?RCS: Revision 3.0 1993/08/18 12:07:28 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_stat: Inlibc
+?MAKE:d_stat: Trylink cat i_sysstat
?MAKE: -pick add $@ %<
?S:d_stat:
?S: This variable conditionally defines HAS_STAT if stat() is
@@ -26,6 +26,20 @@
?H:.
?LINT:set d_stat
: see if stat exists
-set stat d_stat
-eval $inlibc
+$cat >try.c <<EOC
+#$i_sysstat I_SYS_STAT
+#ifdef I_SYS_STAT
+#include <sys/stat.h>
+#endif
+int main(void)
+{
+ static struct stat sb;
+ static int ret;
+ ret |= stat("path", &sb);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=stat
+set d_stat
+eval $trylink
diff --git a/mcon/U/d_statblks.U b/mcon/U/d_statblks.U
index 9f302cb..43dd435 100644
--- a/mcon/U/d_statblks.U
+++ b/mcon/U/d_statblks.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_statblks.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_statblks.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_statblks.U,v $
diff --git a/mcon/U/d_statfs.U b/mcon/U/d_statfs.U
new file mode 100644
index 0000000..4f1731a
--- /dev/null
+++ b/mcon/U/d_statfs.U
@@ -0,0 +1,50 @@
+?RCS: $Id: d_statfs.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_statfs: Trylink cat i_sysmount i_sysparam i_sysvfs
+?MAKE: -pick add $@ %<
+?S:d_statfs:
+?S: This variable conditionally defines the HAS_STATFS symbol, which
+?S: indicates to the C program that the statfs() system call is available.
+?S:.
+?C:HAS_STATFS:
+?C: This symbol, if defined, indicates that the Linux statfs() system call
+?C: is available to get filesystem statistics.
+?C:.
+?H:#$d_statfs HAS_STATFS /**/
+?H:.
+?LINT:set d_statfs
+: see if statfs exists
+$cat >try.c <<EOC
+#$i_sysparam I_SYS_PARAM
+#ifdef I_SYS_PARAM
+#include <sys/param.h>
+#endif
+#$i_sysmount I_SYS_MOUNT
+#ifdef I_SYS_MOUNT
+#include <sys/mount.h>
+#endif
+#$i_sysvfs I_SYS_VFS
+#ifdef I_SYS_VFS
+#include <sys/vfs.h>
+#endif
+int main(void)
+{
+ static int ret;
+ static char *p;
+ static struct statfs buf;
+ ret |= statfs(p, &buf);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=statfs
+set d_statfs
+eval $trylink
+
diff --git a/mcon/U/d_statvfs.U b/mcon/U/d_statvfs.U
new file mode 100644
index 0000000..8cf8e70
--- /dev/null
+++ b/mcon/U/d_statvfs.U
@@ -0,0 +1,39 @@
+?RCS: $Id: d_statvfs.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_statvfs: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_statvfs:
+?S: This variable conditionally defines the HAS_STATVFS symbol, which
+?S: indicates to the C program that the statvfs() system call is available.
+?S:.
+?C:HAS_STATVFS:
+?C: This symbol, if defined, indicates that the POSIX statvfs() system call
+?C: is available to get filesystem statistics.
+?C:.
+?H:#$d_statvfs HAS_STATVFS /**/
+?H:.
+?LINT:set d_statvfs
+: see if statvfs exists
+$cat >try.c <<EOC
+#include <sys/statvfs.h>
+int main(void)
+{
+ static int ret;
+ static char *p;
+ static struct statvfs buf;
+ ret |= statvfs(p, &buf);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=statvfs
+set d_statvfs
+eval $trylink
+
diff --git a/mcon/U/d_stdstdio.U b/mcon/U/d_stdstdio.U
index 1355c4c..6bcf25a 100644
--- a/mcon/U/d_stdstdio.U
+++ b/mcon/U/d_stdstdio.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_stdstdio.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_stdstdio.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Tye McQueen <tye@metronet.com>
diff --git a/mcon/U/d_strcasestr.U b/mcon/U/d_strcasestr.U
new file mode 100644
index 0000000..87fbbde
--- /dev/null
+++ b/mcon/U/d_strcasestr.U
@@ -0,0 +1,37 @@
+?RCS: $Id: d_strcasestr.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_strcasestr: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_strcasestr:
+?S: This variable conditionally defines the HAS_STRCASESTR symbol, which
+?S: indicates to the C program that the strcasestr() routine is available.
+?S:.
+?C:HAS_STRCASESTR:
+?C: This symbol, if defined, indicates that the strcasestr routine is
+?C: available.
+?C:.
+?H:#$d_strcasestr HAS_STRCASESTR /**/
+?H:.
+?LINT:set d_strcasestr
+: see if strcasestr exists
+$cat >try.c <<EOC
+#include <string.h>
+int main(void)
+{
+ static char ret;
+ ret |= *strcasestr("big", "little");
+ return ret ? 0 : 1;
+}
+EOC
+cyn=strcasestr
+set d_strcasestr
+eval $trylink
+
diff --git a/mcon/U/d_strccmp.U b/mcon/U/d_strccmp.U
index 7c5874e..8d45819 100644
--- a/mcon/U/d_strccmp.U
+++ b/mcon/U/d_strccmp.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_strccmp.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_strccmp.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_strccmp.U,v $
@@ -18,7 +18,7 @@
?RCS: Revision 3.0 1993/08/18 12:06:24 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_strccmp: Inlibc
+?MAKE:d_strccmp: Trylink cat
?MAKE: -pick add $@ %<
?S:d_strccmp:
?S: This variable conditionally defines the HAS_STRCASECMP symbol, which
@@ -33,6 +33,17 @@
?H:.
?LINT:set d_strccmp
: see if strcasecmp exists
-set strcasecmp d_strccmp
-eval $inlibc
+$cat >try.c <<EOC
+#include <strings.h>
+int
+main(void)
+{
+ static int ret;
+ ret |= strcasecmp("xxx", "XXX");
+ return ret ? 0 : 1;
+}
+EOC
+cyn=strcasecmp
+set d_strccmp
+eval $trylink
diff --git a/mcon/U/d_strchr.U b/mcon/U/d_strchr.U
index 3946510..310b137 100644
--- a/mcon/U/d_strchr.U
+++ b/mcon/U/d_strchr.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_strchr.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_strchr.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_strchr.U,v $
@@ -19,7 +19,7 @@
?RCS: Revision 3.0 1993/08/18 12:07:32 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_strchr d_index: contains strings Setvar Myread Oldconfig Csym
+?MAKE:d_strchr d_index: Trylink cat
?MAKE: -pick add $@ %<
?S:d_strchr:
?S: This variable conditionally defines HAS_STRCHR if strchr() and
@@ -55,41 +55,33 @@
?M:#endif
?M:#endif
?M:.
-?T:vali
?LINT:set d_strchr d_index
: index or strchr
-echo " "
-if set index val -f; eval $csym; $val; then
- if set strchr val -f d_strchr; eval $csym; $val; then
- if $contains strchr "$strings" >/dev/null 2>&1 ; then
-?X: has index, strchr, and strchr in string header
- val="$define"
- vali="$undef"
- echo "strchr() found." >&4
- else
-?X: has index, strchr, and no strchr in string header
- val="$undef"
- vali="$define"
- echo "index() found." >&4
- fi
- else
-?X: has only index, no strchr, string header is a moot point
- val="$undef"
- vali="$define"
- echo "index() found." >&4
- fi
-else
- if set strchr val -f d_strchr; eval $csym; $val; then
- val="$define"
- vali="$undef"
- echo "strchr() found." >&4
- else
- echo "No index() or strchr() found!" >&4
- val="$undef"
- vali="$undef"
- fi
-fi
-set d_strchr; eval $setvar
-val="$vali"
-set d_index; eval $setvar
+$cat >try.c <<EOC
+#include <string.h>
+int main(void)
+{
+ static char ret;
+ static int c;
+ ret |= *strchr("string", c);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=strchr
+set d_strchr
+eval $trylink
+
+$cat >try.c <<EOC
+#include <strings.h>
+int main(void)
+{
+ static char ret;
+ static int c;
+ ret |= *index("string", c);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=index
+set d_index
+eval $trylink
diff --git a/mcon/U/d_strcoll.U b/mcon/U/d_strcoll.U
index 40f87d0..847e3a5 100644
--- a/mcon/U/d_strcoll.U
+++ b/mcon/U/d_strcoll.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_strcoll.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_strcoll.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
@@ -14,7 +14,7 @@
?RCS: Revision 3.0.1.1 1994/08/29 16:12:01 ram
?RCS: patch32: created by ADO
?RCS:
-?MAKE:d_strcoll: Inlibc
+?MAKE:d_strcoll: Trylink cat
?MAKE: -pick add $@ %<
?S:d_strcoll:
?S: This variable conditionally defines HAS_STRCOLL if strcoll() is
@@ -28,6 +28,16 @@
?H:.
?LINT:set d_strcoll
: see if strcoll exists
-set strcoll d_strcoll
-eval $inlibc
+$cat >try.c <<EOC
+#include <string.h>
+int main(void)
+{
+ static int ret;
+ ret |= strcoll("A", "B");
+ return ret ? 0 : 1;
+}
+EOC
+cyn=strcoll
+set d_strcoll
+eval $trylink
diff --git a/mcon/U/d_strcspn.U b/mcon/U/d_strcspn.U
index eb9bea6..a7f3f83 100644
--- a/mcon/U/d_strcspn.U
+++ b/mcon/U/d_strcspn.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_strcspn.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_strcspn.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_strcspn.U,v $
?RCS: Revision 3.0 1993/08/18 12:07:33 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_strcspn: Inlibc
+?MAKE:d_strcspn: Trylink cat
?MAKE: -pick add $@ %<
?S:d_strcspn:
?S: This variable conditionally defines the HAS_STRCSPN symbol, which
@@ -27,6 +27,16 @@
?H:.
?LINT:set d_strcspn
: see if strcspn exists
-set strcspn d_strcspn
-eval $inlibc
+$cat >try.c <<EOC
+#include <string.h>
+int main(void)
+{
+ size_t ret;
+ ret |= strcspn("abc", "x");
+ return ret ? 0 : 1;
+}
+EOC
+cyn=strcspn
+set d_strcspn
+eval $trylink
diff --git a/mcon/U/d_strctcpy.U b/mcon/U/d_strctcpy.U
index 441f34a..ad59660 100644
--- a/mcon/U/d_strctcpy.U
+++ b/mcon/U/d_strctcpy.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_strctcpy.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_strctcpy.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_strctcpy.U,v $
diff --git a/mcon/U/d_strdup.U b/mcon/U/d_strdup.U
index 155f9e8..604bf0b 100644
--- a/mcon/U/d_strdup.U
+++ b/mcon/U/d_strdup.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_strdup.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_strdup.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_strdup.U,v $
?RCS: Revision 3.0.1.1 1993/12/15 08:21:41 ram
?RCS: patch15: created
?RCS:
-?MAKE:d_strdup: Inlibc
+?MAKE:d_strdup: Trylink cat
?MAKE: -pick add $@ %<
?S:d_strdup:
?S: This variable conditionally defines HAS_STRDUP if strdup() is
@@ -27,6 +27,17 @@
?H:.
?LINT:set d_strdup
: see if strdup exists
-set strdup d_strdup
-eval $inlibc
+$cat >try.c <<EOC
+#include <string.h>
+int main(void)
+{
+ static char ret;
+
+ ret |= *strdup("x");
+ return ret ? 0 : 1;
+}
+EOC
+cyn=strdup
+set d_strdup
+eval $trylink
diff --git a/mcon/U/d_strerror.U b/mcon/U/d_strerror.U
index 92eda76..bfd18b7 100644
--- a/mcon/U/d_strerror.U
+++ b/mcon/U/d_strerror.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_strerror.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_strerror.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_strerror.U,v $
diff --git a/mcon/U/d_strftime.U b/mcon/U/d_strftime.U
index 3299646..33101a6 100644
--- a/mcon/U/d_strftime.U
+++ b/mcon/U/d_strftime.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_strftime.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_strftime.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_strftime.U,v $
?RCS: Revision 3.0 1993/08/18 12:07:36 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_strftime: Inlibc
+?MAKE:d_strftime: Trylink cat
?MAKE: -pick add $@ %<
?S:d_strftime:
?S: This variable conditionally defines HAS_STRFTIME if strftime() is
@@ -26,6 +26,18 @@
?H:.
?LINT:set d_strftime
: see if strftime exists
-set strftime d_strftime
-eval $inlibc
+$cat >try.c <<EOC
+#include <time.h>
+int main(void)
+{
+ static size_t ret, size;
+ static struct tm tm;
+ static char buf[1];
+ ret |= strftime(buf, size, "%Y-%m-%d", &tm);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=strftime
+set d_strftime
+eval $trylink
diff --git a/mcon/U/d_strlcat.U b/mcon/U/d_strlcat.U
new file mode 100644
index 0000000..0fa38ad
--- /dev/null
+++ b/mcon/U/d_strlcat.U
@@ -0,0 +1,38 @@
+?RCS: $Id: d_strlcat.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_strlcat: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_strlcat:
+?S: This variable conditionally defines the HAS_STRLCAT symbol, which
+?S: indicates to the C program that the strlcat() routine is available.
+?S:.
+?C:HAS_STRLCAT:
+?C: This symbol, if defined, indicates that the strlcat routine is
+?C: available.
+?C:.
+?H:#$d_strlcat HAS_STRLCAT /**/
+?H:.
+?LINT:set d_strlcat
+: see if strlcat exists
+$cat >try.c <<EOC
+#include <string.h>
+int main(void)
+{
+ static size_t ret, size;
+ static char dst;
+ ret |= strlcat(&dst, "src", size);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=strlcat
+set d_strlcat
+eval $trylink
+
diff --git a/mcon/U/d_strlcpy.U b/mcon/U/d_strlcpy.U
new file mode 100644
index 0000000..b754d0d
--- /dev/null
+++ b/mcon/U/d_strlcpy.U
@@ -0,0 +1,38 @@
+?RCS: $Id: d_strlcpy.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_strlcpy: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_strlcpy:
+?S: This variable conditionally defines the HAS_STRLCPY symbol, which
+?S: indicates to the C program that the strlcpy() routine is available.
+?S:.
+?C:HAS_STRLCPY:
+?C: This symbol, if defined, indicates that the strlcpy routine is
+?C: available.
+?C:.
+?H:#$d_strlcpy HAS_STRLCPY /**/
+?H:.
+?LINT:set d_strlcpy
+: see if strlcpy exists
+$cat >try.c <<EOC
+#include <string.h>
+int main(void)
+{
+ static size_t ret, size;
+ static char dst;
+ ret |= strlcpy(&dst, "src", size);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=strlcpy
+set d_strlcpy
+eval $trylink
+
diff --git a/mcon/U/d_strstr.U b/mcon/U/d_strstr.U
index e87124c..cd37327 100644
--- a/mcon/U/d_strstr.U
+++ b/mcon/U/d_strstr.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_strstr.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_strstr.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_strstr.U,v $
?RCS: Revision 3.0 1993/08/18 12:07:37 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_strstr: Inlibc
+?MAKE:d_strstr: Trylink cat
?MAKE: -pick add $@ %<
?S:d_strstr:
?S: This variable conditionally defines HAS_STRSTR if strstr() is
@@ -26,6 +26,16 @@
?H:.
?LINT:set d_strstr
: see if strstr exists
-set strstr d_strstr
-eval $inlibc
+$cat >try.c <<EOC
+#include <string.h>
+int main(void)
+{
+ static char ret;
+ ret |= *strstr("abc", "b");
+ return ret ? 0 : 1;
+}
+EOC
+cyn=strstr
+set d_strstr
+eval $trylink
diff --git a/mcon/U/d_strtod.U b/mcon/U/d_strtod.U
index 8236599..b518a6b 100644
--- a/mcon/U/d_strtod.U
+++ b/mcon/U/d_strtod.U
@@ -1,12 +1,12 @@
-?RCS: $Id: d_strtod.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_strtod.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1996, Andy Dougherty
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_strtod.U,v $
@@ -14,7 +14,7 @@
?RCS: patch61: created
?RCS:
?RCS:
-?MAKE:d_strtod: Inlibc
+?MAKE:d_strtod: Trylink cat i_stdlib
?MAKE: -pick add $@ %<
?S:d_strtod:
?S: This variable conditionally defines the HAS_STRTOD symbol, which
@@ -29,6 +29,20 @@
?H:.
?LINT:set d_strtod
: see if strtod exists
-set strtod d_strtod
-eval $inlibc
+$cat >try.c <<EOC
+#$i_stdlib I_STDLIB
+#ifdef I_STDLIB
+#include <stdlib.h>
+#endif
+int main(void)
+{
+ static double ret;
+ static char *endptr;
+ ret = strtod("1.0", &endptr) * 1.0;
+ return ret ? 0 : 1;
+}
+EOC
+cyn=strtod
+set d_strtod
+eval $trylink
diff --git a/mcon/U/d_strtok.U b/mcon/U/d_strtok.U
index 912817e..5da4a2e 100644
--- a/mcon/U/d_strtok.U
+++ b/mcon/U/d_strtok.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_strtok.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_strtok.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_strtok.U,v $
@@ -16,7 +16,7 @@
?X: The strtok routine now appears to be a standard one, but it was
?X: missing in early BSD systems.
?X:
-?MAKE:d_strtok: Inlibc
+?MAKE:d_strtok: Trylink cat
?MAKE: -pick add $@ %<
?S:d_strtok:
?S: This variable conditionally defines HAS_STRTOK if strtok() is
@@ -30,6 +30,16 @@
?H:.
?LINT:set d_strtok
: see if strtok exists
-set strtok d_strtok
-eval $inlibc
+$cat >try.c <<EOC
+#include <string.h>
+int main(void)
+{
+ static char s[] = "a.b.c", ret;
+ ret |= *strtok(s, ".");
+ return ret ? 0 : 1;
+}
+EOC
+cyn=strtok
+set d_strtok
+eval $trylink
diff --git a/mcon/U/d_strtol.U b/mcon/U/d_strtol.U
index 9bd8516..c3200c5 100644
--- a/mcon/U/d_strtol.U
+++ b/mcon/U/d_strtol.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_strtol.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_strtol.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_strtol.U,v $
?RCS: Revision 3.0 1993/08/18 12:07:39 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_strtol: Inlibc
+?MAKE:d_strtol: Trylink cat i_stdlib
?MAKE: -pick add $@ %<
?S:d_strtol:
?S: This variable conditionally defines the HAS_STRTOL symbol, which
@@ -27,6 +27,20 @@
?H:.
?LINT:set d_strtol
: see if strtol exists
-set strtol d_strtol
-eval $inlibc
+$cat >try.c <<EOC
+#$i_stdlib I_STDLIB
+#ifdef I_STDLIB
+#include <stdlib.h>
+#endif
+int main(void)
+{
+ static long ret;
+ static char *endptr;
+ ret |= strtol("1234", &endptr, 10);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=strtol
+set d_strtol
+eval $trylink
diff --git a/mcon/U/d_strtoul.U b/mcon/U/d_strtoul.U
index 704763c..7deb8bc 100644
--- a/mcon/U/d_strtoul.U
+++ b/mcon/U/d_strtoul.U
@@ -1,12 +1,12 @@
-?RCS: $Id: d_strtoul.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_strtoul.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1996, Andy Dougherty
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_strtoul.U,v $
@@ -14,7 +14,7 @@
?RCS: patch61: created
?RCS:
?RCS:
-?MAKE:d_strtoul: Inlibc
+?MAKE:d_strtoul: Trylink cat i_stdlib
?MAKE: -pick add $@ %<
?S:d_strtoul:
?S: This variable conditionally defines the HAS_STRTOUL symbol, which
@@ -29,6 +29,20 @@
?H:.
?LINT:set d_strtoul
: see if strtoul exists
-set strtoul d_strtoul
-eval $inlibc
+$cat >try.c <<EOC
+#$i_stdlib I_STDLIB
+#ifdef I_STDLIB
+#include <stdlib.h>
+#endif
+int main(void)
+{
+ static unsigned long ret;
+ static char *endptr;
+ ret |= strtoul("1234", &endptr, 10);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=strtoul
+set d_strtoul
+eval $trylink
diff --git a/mcon/U/d_strxfrm.U b/mcon/U/d_strxfrm.U
index 29f7a93..51b6a17 100644
--- a/mcon/U/d_strxfrm.U
+++ b/mcon/U/d_strxfrm.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_strxfrm.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_strxfrm.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
@@ -14,7 +14,7 @@
?RCS: Revision 3.0.1.1 1994/08/29 16:12:04 ram
?RCS: patch32: created by ADO
?RCS:
-?MAKE:d_strxfrm: Inlibc
+?MAKE:d_strxfrm: Trylink cat
?MAKE: -pick add $@ %<
?S:d_strxfrm:
?S: This variable conditionally defines HAS_STRXFRM if strxfrm() is
@@ -28,6 +28,17 @@
?H:.
?LINT:set d_strxfrm
: see if strxfrm exists
-set strxfrm d_strxfrm
-eval $inlibc
+$cat >try.c <<EOC
+#include <string.h>
+int main(void)
+{
+ static size_t ret, n;
+ static char dst[] = "xxx", *src;
+ ret |= strxfrm(dst, src, n);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=strxfrm
+set d_strxfrm
+eval $trylink
diff --git a/mcon/U/d_su_chown.U b/mcon/U/d_su_chown.U
index 6ce1804..ce06dd7 100644
--- a/mcon/U/d_su_chown.U
+++ b/mcon/U/d_su_chown.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_su_chown.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_su_chown.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_su_chown.U,v $
diff --git a/mcon/U/d_symlink.U b/mcon/U/d_symlink.U
index c91c87f..e6c4696 100644
--- a/mcon/U/d_symlink.U
+++ b/mcon/U/d_symlink.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_symlink.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_symlink.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_symlink.U,v $
?RCS: Revision 3.0 1993/08/18 12:07:41 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_symlink: Inlibc
+?MAKE:d_symlink: Trylink cat i_unistd
?MAKE: -pick add $@ %<
?S:d_symlink:
?S: This variable conditionally defines the HAS_SYMLINK symbol, which
@@ -27,6 +27,19 @@
?H:.
?LINT:set d_symlink
: see if symlink exists
-set symlink d_symlink
-eval $inlibc
+$cat >try.c <<EOC
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static int ret;
+ ret |= symlink("name1", "name2");
+ return ret ? 0 : 1;
+}
+EOC
+cyn=symlink
+set d_symlink
+eval $trylink
diff --git a/mcon/U/d_sync_atomic.U b/mcon/U/d_sync_atomic.U
new file mode 100644
index 0000000..3e94cb7
--- /dev/null
+++ b/mcon/U/d_sync_atomic.U
@@ -0,0 +1,42 @@
+?RCS: $Id: d_sync_atomic.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2011, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_sync_atomic: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_sync_atomic:
+?S: This variable conditionally defines the HAS_SYNC_ATOMIC symbol, which
+?S: indicates to the C program that __sync_xxx() atomic operations are
+?S: made available by the compiler.
+?S:.
+?C:HAS_SYNC_ATOMIC:
+?C: This symbol, if defined, indicates that __sync_xxx() atomic operations
+?C: are made available by the compiler, namely __sync_synchronize() to
+?C: issue a memory barrieer, __sync_bool_compare_and_swap() for issuing a
+?C: test-and-set and __sync_fetch_and_add() for atomic increases of values.
+?C:.
+?H:#$d_sync_atomic HAS_SYNC_ATOMIC /**/
+?H:.
+?LINT:set d_sync_atomic
+: check for __sync_synchronize and friends
+$cat >try.c <<EOC
+int main(void)
+{
+ static int ret;
+ int i;
+ __sync_synchronize();
+ ret |= __sync_bool_compare_and_swap(&i, 0, 1);
+ ret += __sync_fetch_and_add(&i, 1);
+ return ret;
+}
+EOC
+cyn="whether atomic memory operations are possible"
+set d_sync_atomic
+eval $trylink
+
diff --git a/mcon/U/d_syscall.U b/mcon/U/d_syscall.U
index c4410b1..d38c5fb 100644
--- a/mcon/U/d_syscall.U
+++ b/mcon/U/d_syscall.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_syscall.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_syscall.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_syscall.U,v $
?RCS: Revision 3.0 1993/08/18 12:07:42 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_syscall: Inlibc
+?MAKE:d_syscall: Trylink cat i_unistd
?MAKE: -pick add $@ %<
?S:d_syscall:
?S: This variable conditionally defines HAS_SYSCALL if syscall() is
@@ -26,6 +26,20 @@
?H:.
?LINT:set d_syscall
: see if syscall exists
-set syscall d_syscall
-eval $inlibc
+$cat >try.c <<EOC
+#include <sys/syscall.h>
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static int ret, number;
+ ret |= syscall(number, 0);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=syscall
+set d_syscall
+eval $trylink
diff --git a/mcon/U/d_sysconf.U b/mcon/U/d_sysconf.U
index 22eaaef..dd9d316 100644
--- a/mcon/U/d_sysconf.U
+++ b/mcon/U/d_sysconf.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_sysconf.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_sysconf.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
@@ -14,7 +14,7 @@
?RCS: Revision 3.0.1.1 1994/10/29 16:15:57 ram
?RCS: patch36: created by ADO
?RCS:
-?MAKE:d_sysconf: Inlibc
+?MAKE:d_sysconf: Trylink cat i_unistd
?MAKE: -pick add $@ %<
?S:d_sysconf:
?S: This variable conditionally defines the HAS_SYSCONF symbol, which
@@ -29,6 +29,19 @@
?H:.
?LINT:set d_sysconf
: see if sysconf exists
-set sysconf d_sysconf
-eval $inlibc
+$cat >try.c <<EOC
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static long ret;
+ ret |= sysconf(1);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=sysconf
+set d_sysconf
+eval $trylink
diff --git a/mcon/U/d_sysctl.U b/mcon/U/d_sysctl.U
new file mode 100644
index 0000000..aecea70
--- /dev/null
+++ b/mcon/U/d_sysctl.U
@@ -0,0 +1,41 @@
+?RCS: $Id: d_sysctl.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_sysctl: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_sysctl:
+?S: This variable conditionally defines the HAS_SYSCTL symbol, which
+?S: indicates to the C program that the sysctl() routine is available.
+?S:.
+?C:HAS_SYSCTL:
+?C: This symbol, if defined, indicates that the sysctl routine is
+?C: available.
+?C:.
+?H:#$d_sysctl HAS_SYSCTL /**/
+?H:.
+?LINT:set d_sysctl
+: see if sysctl exists
+$cat >try.c <<EOC
+#include <sys/param.h>
+#include <sys/sysctl.h>
+int main(void)
+{
+ static int ret, name;
+ static unsigned int namelen;
+ static void *oldp, *newp;
+ static size_t oldlen, newlen;
+ ret |= sysctl(&name, namelen, oldp, &oldlen, newp, newlen);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=sysctl
+set d_sysctl
+eval $trylink
+
diff --git a/mcon/U/d_syslog.U b/mcon/U/d_syslog.U
index 6d84bd1..447fbec 100644
--- a/mcon/U/d_syslog.U
+++ b/mcon/U/d_syslog.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_syslog.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_syslog.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_syslog.U,v $
@@ -15,7 +15,7 @@
?RCS: Revision 3.0 1993/08/18 12:07:43 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_syslog: test Csym Setvar Findhdr
+?MAKE:d_syslog: Trylink cat
?MAKE: -pick add $@ %<
?S:d_syslog:
?S: This variable conditionally defines the HAS_SYSLOG symbol, which
@@ -30,15 +30,16 @@
?H:.
?LINT:set d_syslog
: see if syslog is available
-echo " "
-if $test `./findhdr syslog.h` && \
- (set syslog val -f d_syslog; eval $csym; $val); then
- echo "syslog() found." >&4
- val="$define"
-else
- echo "syslog() not found in your C library." >&4
- val="$undef"
-fi
+$cat >try.c <<EOC
+#include <syslog.h>
+int main(void)
+{
+ static int priority;
+ syslog(priority, "%s", "msg");
+ return 0;
+}
+EOC
+cyn=syslog
set d_syslog
-eval $setvar
+eval $trylink
diff --git a/mcon/U/d_system.U b/mcon/U/d_system.U
index f67abf0..b722ec7 100644
--- a/mcon/U/d_system.U
+++ b/mcon/U/d_system.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_system.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_system.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_system.U,v $
?RCS: Revision 3.0 1993/08/18 12:07:44 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_system: Inlibc
+?MAKE:d_system: Trylink cat i_stdlib
?MAKE: -pick add $@ %<
?S:d_system:
?S: This variable conditionally defines HAS_SYSTEM if system() is
@@ -26,6 +26,19 @@
?H:.
?LINT:set d_system
: see if system exists
-set system d_system
-eval $inlibc
+$cat >try.c <<EOC
+#$i_stdlib I_STDLIB
+#ifdef I_STDLIB
+#include <stdlib.h>
+#endif
+int main(void)
+{
+ static int ret;
+ ret |= system("command");
+ return ret ? 0 : 1;
+}
+EOC
+cyn=system
+set d_system
+eval $trylink
diff --git a/mcon/U/d_table.U b/mcon/U/d_table.U
index 7d1387b..23e4bb2 100644
--- a/mcon/U/d_table.U
+++ b/mcon/U/d_table.U
@@ -1,21 +1,21 @@
-?RCS: $Id: d_table.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_table.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_table.U,v $
?RCS: Revision 3.0.1.2 1993/11/10 17:34:14 ram
-?RCS: patch14: wrongly mentionned an obsolete symbol
+?RCS: patch14: wrongly mentioned an obsolete symbol
?RCS:
?RCS: Revision 3.0.1.1 1993/10/16 13:49:29 ram
?RCS: patch12: created
?RCS:
-?MAKE:d_table: Inlibc
+?MAKE:d_table: Trylink cat
?MAKE: -pick add $@ %<
?S:d_table:
?S: This variable conditionally defines HAS_TABLE if table() is
@@ -29,6 +29,17 @@
?H:.
?LINT:set d_table
: see if table exists
-set table d_table
-eval $inlibc
+$cat >try.c <<EOC
+#include <sys/table.h>
+int main(void)
+{
+ static int ret;
+ static void *addr;
+ ret |= table(1, 2L, addr, 3L, 4L, 5L);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=table
+set d_table
+eval $trylink
diff --git a/mcon/U/d_tcgtpgrp.U b/mcon/U/d_tcgtpgrp.U
index 6b8d3b1..ab4d553 100644
--- a/mcon/U/d_tcgtpgrp.U
+++ b/mcon/U/d_tcgtpgrp.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_tcgtpgrp.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_tcgtpgrp.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
@@ -14,7 +14,7 @@
?RCS: Revision 3.0.1.1 1994/08/29 16:12:08 ram
?RCS: patch32: created by ADO
?RCS:
-?MAKE:d_tcgetpgrp: Inlibc
+?MAKE:d_tcgetpgrp: Trylink cat i_unistd
?MAKE: -pick add $@ %<
?S:d_tcgetpgrp:
?S: This variable conditionally defines the HAS_TCGETPGRP symbol, which
@@ -29,6 +29,20 @@
?H:.
?LINT:set d_tcgetpgrp
: see if tcgetpgrp exists
-set tcgetpgrp d_tcgetpgrp
-eval $inlibc
+$cat >try.c <<EOC
+#include <sys/types.h>
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static pid_t ret;
+ ret |= tcgetpgrp(1);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=tcgetpgrp
+set d_tcgetpgrp
+eval $trylink
diff --git a/mcon/U/d_tcstpgrp.U b/mcon/U/d_tcstpgrp.U
index 251ece5..2a02196 100644
--- a/mcon/U/d_tcstpgrp.U
+++ b/mcon/U/d_tcstpgrp.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_tcstpgrp.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_tcstpgrp.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
@@ -14,7 +14,7 @@
?RCS: Revision 3.0.1.1 1994/08/29 16:12:11 ram
?RCS: patch32: created by ADO
?RCS:
-?MAKE:d_tcsetpgrp: Inlibc
+?MAKE:d_tcsetpgrp: Trylink cat i_unistd
?MAKE: -pick add $@ %<
?S:d_tcsetpgrp:
?S: This variable conditionally defines the HAS_TCSETPGRP symbol, which
@@ -29,6 +29,21 @@
?H:.
?LINT:set d_tcsetpgrp
: see if tcsetpgrp exists
-set tcsetpgrp d_tcsetpgrp
-eval $inlibc
+$cat >try.c <<EOC
+#include <sys/types.h>
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static int fd, ret;
+ static pid_t pid;
+ ret |= tcsetpgrp(fd, pid);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=tcsetpgrp
+set d_tcsetpgrp
+eval $trylink
diff --git a/mcon/U/d_time.U b/mcon/U/d_time.U
index d84296f..01684fb 100644
--- a/mcon/U/d_time.U
+++ b/mcon/U/d_time.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_time.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_time.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_time.U,v $
@@ -24,7 +24,7 @@
?MAKE: -pick add $@ %<
?S:d_time:
?S: This variable conditionally defines the HAS_TIME symbol, which indicates
-?S: that the time() routine exists. The time() routine is normaly
+?S: that the time() routine exists. The time() routine is normally
?S: provided on UNIX systems.
?S:.
?S:timetype:
diff --git a/mcon/U/d_times.U b/mcon/U/d_times.U
index 46f539f..2171734 100644
--- a/mcon/U/d_times.U
+++ b/mcon/U/d_times.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_times.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_times.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_times.U,v $
@@ -27,7 +27,7 @@
?MAKE: -pick add $@ %<
?S:d_times:
?S: This variable conditionally defines the HAS_TIMES symbol, which indicates
-?S: that the times() routine exists. The times() routine is normaly
+?S: that the times() routine exists. The times() routine is normally
?S: provided on UNIX systems. You may have to include <sys/times.h>.
?S:.
?S:clocktype:
diff --git a/mcon/U/d_tminsys.U b/mcon/U/d_tminsys.U
index f576527..c269b11 100644
--- a/mcon/U/d_tminsys.U
+++ b/mcon/U/d_tminsys.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_tminsys.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_tminsys.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_tminsys.U,v $
diff --git a/mcon/U/d_truncate.U b/mcon/U/d_truncate.U
index 5e5c44e..0d13c4f 100644
--- a/mcon/U/d_truncate.U
+++ b/mcon/U/d_truncate.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_truncate.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_truncate.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_truncate.U,v $
?RCS: Revision 3.0 1993/08/18 12:07:48 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_truncate: Inlibc
+?MAKE:d_truncate: Trylink cat i_unistd
?MAKE: -pick add $@ %<
?S:d_truncate:
?S: This variable conditionally defines HAS_TRUNCATE if truncate() is
@@ -26,6 +26,21 @@
?H:.
?LINT:set d_truncate
: see if truncate exists
-set truncate d_truncate
-eval $inlibc
+$cat >try.c <<EOC
+#include <sys/types.h>
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static int ret;
+ static off_t length;
+ ret |= truncate("path", length);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=truncate
+set d_truncate
+eval $trylink
diff --git a/mcon/U/d_ttyname.U b/mcon/U/d_ttyname.U
new file mode 100644
index 0000000..f6235d3
--- /dev/null
+++ b/mcon/U/d_ttyname.U
@@ -0,0 +1,47 @@
+?RCS: $Id: d_backtrace.U 65 2011-01-01 22:01:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2011, Raphael Manfredi
+?RCS: Copyright (c) 2011, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_semget.U,v $
+?RCS:
+?MAKE:d_ttyname: Trylink cat i_unistd
+?MAKE: -pick add $@ %<
+?S:d_ttyname:
+?S: This variable conditionally defines the HAS_TTYNAME symbol, which
+?S: indicates to the C program that the ttyname() routine is available
+?S: to determine the pathname of the terminal associated with
+?S: a file descriptor.
+?S:.
+?C:HAS_TTYNAME:
+?C: This symbol, if defined, indicates that the ttyname() routine is
+?C: available to determine the pathname of the terminal associated with
+?C: a file descriptor. The <unistd.h> header must be included to use
+?C: this routine.
+?C:.
+?H:#$d_ttyname HAS_TTYNAME /**/
+?H:.
+?LINT:set d_ttyname
+: see if ttyname exists
+$cat >try.c <<EOC
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ char *name = ttyname(1);
+ char c = *ttyname(2);
+ return name[0] == c ? 0 : 1;
+}
+EOC
+cyn=ttyname
+set d_ttyname
+eval $trylink
+
diff --git a/mcon/U/d_tzmin.U b/mcon/U/d_tzmin.U
index 1da648a..f268a1b 100644
--- a/mcon/U/d_tzmin.U
+++ b/mcon/U/d_tzmin.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_tzmin.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_tzmin.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_tzmin.U,v $
diff --git a/mcon/U/d_tzname.U b/mcon/U/d_tzname.U
index 20e5f71..c184f0f 100644
--- a/mcon/U/d_tzname.U
+++ b/mcon/U/d_tzname.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_tzname.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_tzname.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_tzname.U,v $
@@ -15,7 +15,7 @@
?RCS: Revision 3.0.1.1 1994/06/20 06:57:55 ram
?RCS: patch30: created
?RCS:
-?MAKE:d_tzname: Csym Setvar
+?MAKE:d_tzname: Trylink cat
?MAKE: -pick add $@ %<
?S:d_tzname:
?S: This variable conditionally defines HAS_TZNAME if tzname[] is
@@ -29,14 +29,17 @@
?H:.
?LINT:set d_tzname
: see if tzname[] exists
-echo " "
-if set tzname val -a d_tzname; eval $csym; $val; then
- val="$define"
- echo 'tzname[] found.' >&4
-else
- val="$undef"
- echo 'tzname[] NOT found.' >&4
-fi
+$cat >try.c <<EOC
+#include <time.h>
+int main(void)
+{
+ extern char *tzname[];
+ static char c;
+ c |= *tzname[0];
+ return c ? 0 : 1;
+}
+EOC
+cyn=tzname
set d_tzname
-eval $setvar
+eval $trylink
diff --git a/mcon/U/d_uctx_mctx.U b/mcon/U/d_uctx_mctx.U
new file mode 100644
index 0000000..3e60723
--- /dev/null
+++ b/mcon/U/d_uctx_mctx.U
@@ -0,0 +1,44 @@
+?RCS:
+?RCS: Copyright (c) 2012 Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_uctx_mctx: Trylink cat i_ucontext i_sys_ucontext
+?MAKE: -pick add $@ %<
+?S:d_uctx_mctx:
+?S: This variable conditionally defines the HAS_UCONTEXT_MCONTEXT symbol,
+?S: which indicates to the C program that it can access general registers
+?S: through some field in ucontext->uc_mcontext.
+?S:.
+?C:HAS_UCONTEXT_MCONTEXT:
+?C: This symbol, if defined, indicates that the C program can access the
+?C: processor's general registers through some field in the uc_mcontext
+?C: machine context field from the ucontext_t structure.
+?C:.
+?H:#$d_uctx_mctx HAS_UCONTEXT_MCONTEXT /**/
+?H:.
+?LINT:set d_uctx_mctx
+: check for machine context field in the ucontext structure
+$cat >try.c <<EOC
+#$i_ucontext I_UCONTEXT
+#$i_sys_ucontext I_SYS_UCONTEXT
+#ifdef I_UCONTEXT
+#include <ucontext.h>
+#endif
+#ifdef I_SYS_UCONTEXT
+#include <sys/ucontext.h>
+#endif
+int main(void)
+{
+ static ucontext_t *uc = 0;
+ return (int) &uc->uc_mcontext;
+}
+EOC
+cyn="whether 'struct ucontext' has a 'uc_mcontext' member"
+set d_uctx_mctx
+eval $trylink
+
diff --git a/mcon/U/d_uctx_mctx_gregs.U b/mcon/U/d_uctx_mctx_gregs.U
new file mode 100644
index 0000000..bfd07a0
--- /dev/null
+++ b/mcon/U/d_uctx_mctx_gregs.U
@@ -0,0 +1,44 @@
+?RCS:
+?RCS: Copyright (c) 2012 Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_uctx_mctx_gregs: Trylink cat i_ucontext i_sys_ucontext
+?MAKE: -pick add $@ %<
+?S:d_uctx_mctx_gregs:
+?S: This variable conditionally defines the HAS_UCONTEXT_MCONTEXT_GREGS symbol,
+?S: which indicates to the C program that it can access general registers
+?S: through ucontext->uc_mcontext.gregs[].
+?S:.
+?C:HAS_UCONTEXT_MCONTEXT_GREGS:
+?C: This symbol, if defined, indicates that the C program can access the
+?C: processor's general registers through the gregs[] array in the uc_mcontext
+?C: machine context field from the ucontext_t structure.
+?C:.
+?H:#$d_uctx_mctx_gregs HAS_UCONTEXT_MCONTEXT_GREGS /**/
+?H:.
+?LINT:set d_uctx_mctx_gregs
+: check for general register access through the ucontext structure
+$cat >try.c <<EOC
+#$i_ucontext I_UCONTEXT
+#$i_sys_ucontext I_SYS_UCONTEXT
+#ifdef I_UCONTEXT
+#include <ucontext.h>
+#endif
+#ifdef I_SYS_UCONTEXT
+#include <sys/ucontext.h>
+#endif
+int main(void)
+{
+ static ucontext_t uc;
+ return uc.uc_mcontext.gregs[0];
+}
+EOC
+cyn="whether 'struct ucontext' has a 'mcontext.gregs[]' member"
+set d_uctx_mctx_gregs
+eval $trylink
+
diff --git a/mcon/U/d_ulimit.U b/mcon/U/d_ulimit.U
index 14083cb..47ea85a 100644
--- a/mcon/U/d_ulimit.U
+++ b/mcon/U/d_ulimit.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_ulimit.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_ulimit.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_ulimit.U,v $
?RCS: Revision 3.0 1993/08/18 12:07:51 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_ulimit: Inlibc
+?MAKE:d_ulimit: Trylink cat
?MAKE: -pick add $@ %<
?S:d_ulimit:
?S: This variable conditionally defines HAS_ULIMIT if ulimit() is
@@ -26,6 +26,17 @@
?H:.
?LINT:set d_ulimit
: see if ulimit exists
-set ulimit d_ulimit
-eval $inlibc
+$cat >try.c <<EOC
+#include <ulimit.h>
+int main(void)
+{
+ static long ret;
+ ret |= ulimit(UL_GETFSIZE);
+ ret |= ulimit(UL_SETFSIZE, 1L);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=ulimit
+set d_ulimit
+eval $trylink
diff --git a/mcon/U/d_umask.U b/mcon/U/d_umask.U
index 2aac356..216c66c 100644
--- a/mcon/U/d_umask.U
+++ b/mcon/U/d_umask.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_umask.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_umask.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
@@ -14,7 +14,7 @@
?RCS: Revision 3.0.1.1 1994/08/29 16:14:50 ram
?RCS: patch32: created by ADO
?RCS:
-?MAKE:d_umask: Inlibc
+?MAKE:d_umask: Trylink cat i_sysstat
?MAKE: -pick add $@ %<
?S:d_umask:
?S: This variable conditionally defines the HAS_UMASK symbol, which
@@ -29,6 +29,20 @@
?H:.
?LINT:set d_umask
: see if umask exists
-set umask d_umask
-eval $inlibc
+$cat >try.c <<EOC
+#include <sys/types.h>
+#$i_sysstat I_SYS_STAT
+#ifdef I_SYS_STAT
+#include <sys/stat.h>
+#endif
+int main(void)
+{
+ mode_t ret, mask;
+ ret |= umask(mask);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=umask
+set d_umask
+eval $trylink
diff --git a/mcon/U/d_usendir.U b/mcon/U/d_usendir.U
index eb9783c..5bfb111 100644
--- a/mcon/U/d_usendir.U
+++ b/mcon/U/d_usendir.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_usendir.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_usendir.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_usendir.U,v $
diff --git a/mcon/U/d_usleep.U b/mcon/U/d_usleep.U
index 7aa2315..1c47e24 100644
--- a/mcon/U/d_usleep.U
+++ b/mcon/U/d_usleep.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_usleep.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_usleep.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_usleep.U,v $
?RCS: Revision 3.0 1993/08/18 12:07:53 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_usleep: Inlibc
+?MAKE:d_usleep: Trylink cat i_unistd
?MAKE: -pick add $@ %<
?S:d_usleep:
?S: This variable conditionally defines HAS_USLEEP if usleep() is
@@ -26,6 +26,19 @@
?H:.
?LINT:set d_usleep
: see if usleep exists
-set usleep d_usleep
-eval $inlibc
+$cat >try.c <<EOC
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static unsigned ret;
+ ret |= usleep(1);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=usleep
+set d_usleep
+eval $trylink
diff --git a/mcon/U/d_uwait.U b/mcon/U/d_uwait.U
index 001ed54..186b2b5 100644
--- a/mcon/U/d_uwait.U
+++ b/mcon/U/d_uwait.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_uwait.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_uwait.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_uwait.U,v $
diff --git a/mcon/U/d_vfork.U b/mcon/U/d_vfork.U
index d15db45..96410e7 100644
--- a/mcon/U/d_vfork.U
+++ b/mcon/U/d_vfork.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_vfork.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_vfork.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_vfork.U,v $
@@ -31,7 +31,7 @@
?RCS: Revision 3.0 1993/08/18 12:07:55 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_vfork usevfork: Inlibc Myread Oldconfig Setvar
+?MAKE:d_vfork usevfork: Trylink Myread Oldconfig Setvar cat i_unistd
?MAKE: -pick add $@ %<
?S:d_vfork:
?S: This variable conditionally defines the HAS_VFORK symbol, which
@@ -54,9 +54,23 @@
?M:.
?LINT:set d_vfork
: see if there is a vfork
-val=''
-set vfork val
-eval $inlibc
+$cat >try.c <<EOC
+#include <sys/types.h>
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static pid_t ret;
+ ret |= vfork();
+ return ret ? 0 : 1;
+}
+EOC
+cyn=vfork
+set val
+eval $trylink
+
: Ok, but do we want to use it. vfork is reportedly unreliable in
: perl on Solaris 2.x, and probably elsewhere.
diff --git a/mcon/U/d_voidsig.U b/mcon/U/d_voidsig.U
index 15d28fd..7602e37 100644
--- a/mcon/U/d_voidsig.U
+++ b/mcon/U/d_voidsig.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_voidsig.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_voidsig.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_voidsig.U,v $
diff --git a/mcon/U/d_volatile.U b/mcon/U/d_volatile.U
index a50a257..bf31302 100644
--- a/mcon/U/d_volatile.U
+++ b/mcon/U/d_volatile.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_volatile.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_volatile.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_volatile.U,v $
@@ -41,7 +41,7 @@
echo " "
echo 'Checking to see if your C compiler knows about "volatile"...' >&4
$cat >try.c <<'EOCP'
-int main()
+int main(void)
{
?X:
?X: The following seven lines added by Bill Campbell <billc@sierra.com>
@@ -55,13 +55,18 @@ int main()
char char_var;
};
typedef unsigned short foo_t;
- char *volatile foo;
- volatile int bar;
- volatile foo_t blech;
+ static char *volatile foo;
+ static volatile int bar;
+ static volatile foo_t blech;
foo = foo;
+ (void) goo;
+ (void) foo;
+ (void) bar;
+ (void) blech;
+ return 0;
}
EOCP
-if $cc -c $ccflags try.c >/dev/null 2>&1 ; then
+if $cc -c $ccflags try.c; then
val="$define"
echo "Yup, it does."
else
diff --git a/mcon/U/d_vprintf.U b/mcon/U/d_vprintf.U
index b44065a..2bb4d96 100644
--- a/mcon/U/d_vprintf.U
+++ b/mcon/U/d_vprintf.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_vprintf.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_vprintf.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_vprintf.U,v $
diff --git a/mcon/U/d_vsnprintf.U b/mcon/U/d_vsnprintf.U
new file mode 100644
index 0000000..0dd8abd
--- /dev/null
+++ b/mcon/U/d_vsnprintf.U
@@ -0,0 +1,47 @@
+?RCS: $Id: d_vsnprintf.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_vsnprintf: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_vsnprintf:
+?S: This variable conditionally defines the HAS_VSNPRINTF symbol, which
+?S: indicates to the C program that the vsnprintf() routine is available.
+?S:.
+?C:HAS_VSNPRINTF:
+?C: This symbol, if defined, indicates that the vsnprintf routine is
+?C: available.
+?C:.
+?H:#$d_vsnprintf HAS_VSNPRINTF /**/
+?H:.
+?LINT:set d_vsnprintf
+: see if vsnprintf exists
+$cat >try.c <<EOC
+#include <stdarg.h>
+#include <stdio.h>
+int func(char *s, ...)
+{
+ static int ret;
+ static char buf;
+ static size_t n;
+ va_list ap;
+ (void) s;
+ ret |= vsnprintf(&buf, n, "fmt", ap);
+ return ret;
+}
+
+int main(void)
+{
+ return func("xxx", 1);
+}
+EOC
+cyn=vsnprintf
+set d_vsnprintf
+eval $trylink
+
diff --git a/mcon/U/d_wait3.U b/mcon/U/d_wait3.U
index 3d1bfb9..2da6841 100644
--- a/mcon/U/d_wait3.U
+++ b/mcon/U/d_wait3.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_wait3.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_wait3.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_wait3.U,v $
?RCS: Revision 3.0 1993/08/18 12:08:01 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_wait3: Inlibc
+?MAKE:d_wait3: Trylink cat i_sysresrc i_syswait
?MAKE: -pick add $@ %<
?S:d_wait3:
?S: This variable conditionally defines the HAS_WAIT3 symbol, which
@@ -26,6 +26,28 @@
?H:.
?LINT:set d_wait3
: see if 'wait3()' exists
-set wait3 d_wait3
-eval $inlibc
+$cat >try.c <<EOC
+#include <sys/types.h>
+#$i_syswait I_SYS_WAIT
+#ifdef I_SYS_WAIT
+#include <sys/wait.h>
+#endif
+#$i_sysresrc I_SYS_RESOURCE
+#ifdef I_SYS_RESOURCE
+#include <sys/resource.h>
+#endif
+int main(void)
+{
+ static pid_t ret;
+ static int status, options;
+ static struct rusage ru;
+ options |= WNOHANG;
+ options |= WUNTRACED;
+ ret |= wait3(&status, options, &ru);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=wait3
+set d_wait3
+eval $trylink
diff --git a/mcon/U/d_wait4.U b/mcon/U/d_wait4.U
index 0d48d31..f6415fe 100644
--- a/mcon/U/d_wait4.U
+++ b/mcon/U/d_wait4.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_wait4.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_wait4.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_wait4.U,v $
?RCS: Revision 3.0 1993/08/18 12:08:01 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_wait4: Inlibc
+?MAKE:d_wait4: Trylink cat i_sysresrc i_syswait
?MAKE: -pick add $@ %<
?S:d_wait4:
?S: This variable conditionally defines the HAS_WAIT4 symbol, which
@@ -25,6 +25,28 @@
?H:.
?LINT:set d_wait4
: see if there is a wait4
-set wait4 d_wait4
-eval $inlibc
+$cat >try.c <<EOC
+#include <sys/types.h>
+#$i_syswait I_SYS_WAIT
+#ifdef I_SYS_WAIT
+#include <sys/wait.h>
+#endif
+#$i_sysresrc I_SYS_RESOURCE
+#ifdef I_SYS_RESOURCE
+#include <sys/resource.h>
+#endif
+int main(void)
+{
+ static pid_t ret, pid;
+ static int status, options;
+ static struct rusage ru;
+ options |= WNOHANG;
+ options |= WUNTRACED;
+ ret |= wait4(pid, &status, options, &ru);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=wait4
+set d_wait4
+eval $trylink
diff --git a/mcon/U/d_waitpid.U b/mcon/U/d_waitpid.U
index 7e46cbc..46f3806 100644
--- a/mcon/U/d_waitpid.U
+++ b/mcon/U/d_waitpid.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_waitpid.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_waitpid.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_waitpid.U,v $
?RCS: Revision 3.0 1993/08/18 12:08:02 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_waitpid: Inlibc
+?MAKE:d_waitpid: Trylink cat i_syswait
?MAKE: -pick add $@ %<
?S:d_waitpid:
?S: This variable conditionally defines HAS_WAITPID if waitpid() is
@@ -26,6 +26,23 @@
?H:.
?LINT:set d_waitpid
: see if waitpid exists
-set waitpid d_waitpid
-eval $inlibc
+$cat >try.c <<EOC
+#include <sys/types.h>
+#$i_syswait I_SYS_WAIT
+#ifdef I_SYS_WAIT
+#include <sys/wait.h>
+#endif
+int main(void)
+{
+ static pid_t ret, pid;
+ static int status, options;
+ options |= WNOHANG;
+ options |= WUNTRACED;
+ ret |= waitpid(pid, &status, options);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=waitpid
+set d_waitpid
+eval $trylink
diff --git a/mcon/U/d_wcstombs.U b/mcon/U/d_wcstombs.U
index 59f3a9c..ddea5ff 100644
--- a/mcon/U/d_wcstombs.U
+++ b/mcon/U/d_wcstombs.U
@@ -1,18 +1,18 @@
-?RCS: $Id: d_wcstombs.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_wcstombs.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_wcstombs.U,v $
?RCS: Revision 3.0 1993/08/18 12:08:03 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_wcstombs: Inlibc
+?MAKE:d_wcstombs: Trylink cat i_stdlib
?MAKE: -pick add $@ %<
?S:d_wcstombs:
?S: This variable conditionally defines the HAS_WCSTOMBS symbol, which
@@ -27,6 +27,21 @@
?H:.
?LINT:set d_wcstombs
: see if wcstombs exists
-set wcstombs d_wcstombs
-eval $inlibc
+$cat >try.c <<EOC
+#$i_stdlib I_STDLIB
+#ifdef I_STDLIB
+#include <stdlib.h>
+#endif
+int main(void)
+{
+ static size_t ret, n;
+ static wchar_t wcs;
+ static char buf[1];
+ ret |= wcstombs(buf, &wcs, n);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=wcstombs
+set d_wcstombs
+eval $trylink
diff --git a/mcon/U/d_wctomb.U b/mcon/U/d_wctomb.U
index f5fb4ba..3ff77c6 100644
--- a/mcon/U/d_wctomb.U
+++ b/mcon/U/d_wctomb.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_wctomb.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_wctomb.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
@@ -14,7 +14,7 @@
?RCS: Revision 3.0.1.1 1994/08/29 16:20:43 ram
?RCS: patch32: created by ADO
?RCS:
-?MAKE:d_wctomb: Inlibc
+?MAKE:d_wctomb: Trylink cat i_stdlib i_limits
?MAKE: -pick add $@ %<
?S:d_wctomb:
?S: This variable conditionally defines the HAS_WCTOMB symbol, which
@@ -29,6 +29,25 @@
?H:.
?LINT:set d_wctomb
: see if wctomb exists
-set wctomb d_wctomb
-eval $inlibc
+$cat >try.c <<EOC
+#$i_stdlib I_STDLIB
+#ifdef I_STDLIB
+#include <stdlib.h>
+#endif
+#$i_limits I_LIMITS
+#ifdef I_LIMITS
+#include <limits.h>
+#endif
+int main(void)
+{
+ static int ret;
+ static char dst[MB_LEN_MAX];
+ static wchar_t wc;
+ ret |= wctomb(dst, wc);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=wctomb
+set d_wctomb
+eval $trylink
diff --git a/mcon/U/d_wifstat.U b/mcon/U/d_wifstat.U
index 5bffaa5..87f3d22 100644
--- a/mcon/U/d_wifstat.U
+++ b/mcon/U/d_wifstat.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_wifstat.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_wifstat.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_wifstat.U,v $
diff --git a/mcon/U/d_xdrs.U b/mcon/U/d_xdrs.U
index 3d43405..e5c9de7 100644
--- a/mcon/U/d_xdrs.U
+++ b/mcon/U/d_xdrs.U
@@ -1,11 +1,11 @@
-?RCS: $Id: d_xdrs.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: d_xdrs.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: d_xdrs.U,v $
diff --git a/mcon/U/defeditor.U b/mcon/U/defeditor.U
index 941e918..d316370 100644
--- a/mcon/U/defeditor.U
+++ b/mcon/U/defeditor.U
@@ -1,11 +1,11 @@
-?RCS: $Id: defeditor.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: defeditor.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: defeditor.U,v $
diff --git a/mcon/U/doublesize.U b/mcon/U/doublesize.U
index 9bd0d04..f1595a1 100644
--- a/mcon/U/doublesize.U
+++ b/mcon/U/doublesize.U
@@ -1,11 +1,11 @@
-?RCS: $Id: doublesize.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: doublesize.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: doublesize.U,v $
diff --git a/mcon/U/ebcdic.U b/mcon/U/ebcdic.U
index f020e98..13c0618 100644
--- a/mcon/U/ebcdic.U
+++ b/mcon/U/ebcdic.U
@@ -1,11 +1,11 @@
-?RCS: $Id: ebcdic.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: ebcdic.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Copyright (c) 1998 Andy Dougherty
diff --git a/mcon/U/enablenls.U b/mcon/U/enablenls.U
new file mode 100644
index 0000000..164a236
--- /dev/null
+++ b/mcon/U/enablenls.U
@@ -0,0 +1,61 @@
+?RCS: $Id: enablenls.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:enablenls d_enablenls: Myread Setvar cat package d_nls
+?MAKE: -pick add $@ %<
+?S:enablenls:
+?S: This variable holds 'true' or 'false' depending on whether we're
+?S: going to enable Native Language Support (NLS).
+?S:.
+?S:d_enablenls:
+?S: This variable conditionally defines ENABLE_NLS.
+?S:.
+?C:ENABLE_NLS:
+?C: This symbol, when defines, indicates that the program should enable
+?C: Native Language Support (NLS) for internationalization (I18N).
+?C:.
+?H:#$d_enablenls ENABLE_NLS /**/
+?H:.
+?LINT:set d_enablenls
+: determine whether to enable NLS
+echo " "
+case "$d_nls" in
+"$undef")
+ echo "I won't enable NLS since you don't have that feature." >&4
+ val="$undef"
+ ;;
+*)
+ $cat <<EOM
+I can compile $package with Native Language Support (NLS), which
+will enable internationalization of some messages, provided there is
+a suitable translation available.
+
+EOM
+ dflt=y
+ case "$d_enablenls" in
+ "$undef") dflt=n;;
+ esac
+ rp='Shall I enable NLS'
+ . ./myread
+ case "$ans" in
+ y) val="$define";;
+ *) val="$undef";;
+ esac
+ ;;
+esac
+set d_enablenls
+eval $setvar
+@if enablenls
+case "$d_enablenls" in
+"$define") enablenls=true;;
+"$undef") enablenls=false;;
+esac
+@end
+
diff --git a/mcon/U/errnolist.U b/mcon/U/errnolist.U
index 52b3237..48d70f9 100644
--- a/mcon/U/errnolist.U
+++ b/mcon/U/errnolist.U
@@ -1,11 +1,11 @@
-?RCS: $Id: errnolist.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: errnolist.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: errnolist.U,v $
diff --git a/mcon/U/etc.U b/mcon/U/etc.U
index bb5854e..8d1fe98 100644
--- a/mcon/U/etc.U
+++ b/mcon/U/etc.U
@@ -1,11 +1,11 @@
-?RCS: $Id: etc.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: etc.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: etc.U,v $
diff --git a/mcon/U/fieldn.U b/mcon/U/fieldn.U
new file mode 100644
index 0000000..3c71a31
--- /dev/null
+++ b/mcon/U/fieldn.U
@@ -0,0 +1,82 @@
+?RCS: $Id: fieldn.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: Findhdr.U,v $
+?RCS: Revision 3.0.1.2 1994/10/29 15:53:08 ram
+?RCS: patch36: added ?F: line for metalint file checking
+?RCS:
+?RCS: Revision 3.0.1.1 1994/05/06 14:03:56 ram
+?RCS: patch23: cppminus must be after other cppflags, not before
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:04:54 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:fieldn cppfilter: grep test tr rm cat startsh \
+ cppstdin cppminus osname
+?MAKE: -pick add $@ %<
+?S:fieldn:
+?S: This variable is used internally by Configure. It contains the position
+?S: of the included file name in cpp output. That is to say, when cpp
+?S: pre-processes a #include <file> line, it replaces it by a # line which
+?S: contains the original position in the input file and the full name of
+?S: included file, between "quotes".
+?S:.
+?S:cppfilter:
+?S: This variable is used internally by Configure. It either contains
+?S: nothing or a shell piping stage to translate path components into "/".
+?S: It is meant to be used as "... | $cppfilter $grep ..." i.e. without any
+?S: explicit "|" character following it.
+?S:.
+?F:!fieldn
+?T:pos testaccess cline
+: determine filename position in cpp output
+echo " "
+echo "Computing filename position in cpp output for #include directives..." >&4
+echo '#include <stdio.h>' > foo.c
+case "$osname" in
+vos)
+ testaccess=-e
+?X: VOS: path component separator is >
+ cppfilter="tr '\\\\>' '/' |"
+ ;;
+*)
+ testaccess=-r
+ cppfilter=''
+ ;;
+esac
+$cat >fieldn <<EOF
+$startsh
+$cppstdin $cppminus <foo.c 2>/dev/null | \
+$grep '^[ ]*#.*stdio\.h' | \
+while read cline; do
+ pos=1
+ set \$cline
+ while $test \$# -gt 0; do
+ if $test $testaccess \`echo \$1 | $tr -d '"'\`; then
+ echo "\$pos"
+ exit 0
+ fi
+ shift
+ pos=\`expr \$pos + 1\`
+ done
+done
+EOF
+chmod +x fieldn
+fieldn=`./fieldn`
+$rm -f foo.c fieldn
+case $fieldn in
+'') pos='???';;
+1) pos=first;;
+2) pos=second;;
+3) pos=third;;
+*) pos="${fieldn}th";;
+esac
+echo "Your cpp writes the filename in the $pos field of the line."
+
diff --git a/mcon/U/filexp.U b/mcon/U/filexp_path.U
index 3bbd94c..9234ea1 100644
--- a/mcon/U/filexp.U
+++ b/mcon/U/filexp_path.U
@@ -1,11 +1,11 @@
-?RCS: $Id: filexp.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: filexp_path.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: filexp.U,v $
diff --git a/mcon/U/floatsize.U b/mcon/U/floatsize.U
index 9716d2d..09d040f 100644
--- a/mcon/U/floatsize.U
+++ b/mcon/U/floatsize.U
@@ -1,11 +1,11 @@
-?RCS: $Id: floatsize.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: floatsize.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: floatsize.U,v $
diff --git a/mcon/U/fpostype.U b/mcon/U/fpostype.U
index f42a8a3..9e63b8f 100644
--- a/mcon/U/fpostype.U
+++ b/mcon/U/fpostype.U
@@ -1,11 +1,11 @@
-?RCS: $Id: fpostype.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: fpostype.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: fpostype.U,v $
diff --git a/mcon/U/fpu.U b/mcon/U/fpu.U
index 709778d..38ddaf2 100644
--- a/mcon/U/fpu.U
+++ b/mcon/U/fpu.U
@@ -1,11 +1,11 @@
-?RCS: $Id: fpu.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: fpu.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: fpu.U,v $
diff --git a/mcon/U/gccvers.U b/mcon/U/gccvers.U
index e5c541b..847df1d 100644
--- a/mcon/U/gccvers.U
+++ b/mcon/U/gccvers.U
@@ -1,11 +1,11 @@
-?RCS: $Id: gccvers.U 28 2008-06-16 18:04:21Z cbiere $
+?RCS: $Id: gccvers.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Copyright (c) 2000, Jarkko Hietaniemi
@@ -45,7 +45,8 @@ gcc_version_patchlevel __GNUC_PATCHLEVEL__
EOM
if $cc -E try.c > try 2>&1
then
- gccversion=`sed -n 's/^gcc_version_major[^0-9]*//p' try`
+ gccversion=`$grep gcc_version_major try |
+ sed 's/^.*gcc_version_major[\t ]*//'`
case "$gccversion" in
'') echo "You are not using GNU cc." ;;
*) echo "You are using GNU cc $gccversion."
diff --git a/mcon/U/gidtype.U b/mcon/U/gidtype.U
index 80c27e3..58ac70f 100644
--- a/mcon/U/gidtype.U
+++ b/mcon/U/gidtype.U
@@ -1,11 +1,11 @@
-?RCS: $Id: gidtype.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: gidtype.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: gidtype.U,v $
diff --git a/mcon/U/groupstype.U b/mcon/U/groupstype.U
index b184491..7a9eb05 100644
--- a/mcon/U/groupstype.U
+++ b/mcon/U/groupstype.U
@@ -1,11 +1,11 @@
-?RCS: $Id: groupstype.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: groupstype.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
diff --git a/mcon/U/h_fcntl.U b/mcon/U/h_fcntl.U
index b4b3d43..ab218f3 100644
--- a/mcon/U/h_fcntl.U
+++ b/mcon/U/h_fcntl.U
@@ -1,11 +1,11 @@
-?RCS: $Id: h_fcntl.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: h_fcntl.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: h_fcntl.U,v $
diff --git a/mcon/U/h_sysfile.U b/mcon/U/h_sysfile.U
index 463542e..3805a8c 100644
--- a/mcon/U/h_sysfile.U
+++ b/mcon/U/h_sysfile.U
@@ -1,11 +1,11 @@
-?RCS: $Id: h_sysfile.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: h_sysfile.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: h_sysfile.U,v $
diff --git a/mcon/U/i_alloca.U b/mcon/U/i_alloca.U
new file mode 100644
index 0000000..b4f20f9
--- /dev/null
+++ b/mcon/U/i_alloca.U
@@ -0,0 +1,36 @@
+?RCS: $Id: i_alloca.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2011, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:i_alloca: Trylink cat
+?MAKE: -pick add $@ %<
+?S:i_alloca:
+?S: This variable conditionally defines the I_ALLOCA symbol, which
+?S: indicates to the C program that <alloca.h> exists and should
+?S: be included.
+?S:.
+?C:I_ALLOCA:
+?C: This symbol, if defined, indicates that <alloca.h> exists and should
+?C: be included.
+?C:.
+?H:#$i_alloca I_ALLOCA /**/
+?H:.
+?LINT:set i_alloca
+: see if alloca.h is available
+$cat >try.c <<EOC
+#include <alloca.h>
+int main(void)
+{
+ void *ret = alloca(1);
+ return (unsigned long) ret & 0x1;
+}
+EOC
+set i_alloca
+eval $trylink
+
diff --git a/mcon/U/i_arpainet.U b/mcon/U/i_arpainet.U
index 3390da5..f94777f 100644
--- a/mcon/U/i_arpainet.U
+++ b/mcon/U/i_arpainet.U
@@ -1,11 +1,11 @@
-?RCS: $Id: i_arpainet.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: i_arpainet.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: i_arpainet.U,v $
diff --git a/mcon/U/i_db.U b/mcon/U/i_db.U
index 92e8cca..9391a7c 100644
--- a/mcon/U/i_db.U
+++ b/mcon/U/i_db.U
@@ -1,11 +1,11 @@
-?RCS: $Id: i_db.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: i_db.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
diff --git a/mcon/U/i_dbm.U b/mcon/U/i_dbm.U
index 14c9fca..bdca919 100644
--- a/mcon/U/i_dbm.U
+++ b/mcon/U/i_dbm.U
@@ -1,11 +1,11 @@
-?RCS: $Id: i_dbm.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: i_dbm.U 175 2014-04-07 07:14:41Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: i_dbm.U,v $
@@ -18,7 +18,7 @@
?RCS: Revision 3.0 1993/08/18 12:08:15 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:i_dbm i_rpcsvcdbm: Inhdr Inlibc Setvar
+?MAKE:i_dbm i_rpcsvcdbm: Inhdr Trylink Setvar cat
?MAKE: -pick add $@ %<
?S:i_dbm (d_odbm):
?S: This variable conditionally defines the I_DBM symbol, which
@@ -49,31 +49,49 @@
?X: some versions of SCO Unix have -ldbm, but are missing dbmclose(). -- ADO
?X: Some System V systems have <rpcsvc/dbm.h> instead of <dbm.h>.
: see if dbmclose exists
-set dbmclose d_dbmclose
-eval $inlibc
+$cat >try.c <<EOC
+#include <dbm.h>
+int main(void)
+{
+ dbmclose();
+ return 0;
+}
+EOC
+set d_dbmclose
+eval $trylink
case "$d_dbmclose" in
$define)
- set dbm.h i_dbm
- eval $inhdr
- case "$i_dbm" in
- $define)
- val="$undef"
- set i_rpcsvcdbm
- eval $setvar
- ;;
- *) set rpcsvc/dbm.h i_rpcsvcdbm
- eval $inhdr
- ;;
- esac
- ;;
-*) echo "We won't be including <dbm.h>"
val="$undef"
+ set i_rpcsvcdbm
+ eval $setvar
+
+ val="$define"
set i_dbm
eval $setvar
- val="$undef"
+ ;;
+*)
+ echo " "
+ echo "Hmm... trying to include <rpcsvc/dbm.h> to get dbmclose()..." >&4
+ $cat >try.c <<EOC
+#include <rpcsvc/dbm.h>
+int main(void)
+{
+ static int ret;
+ ret |= dbmclose();
+ return ret ? 0 : 1;
+}
+EOC
+ set d_dbmclose
+ eval $trylink
+
+ val="$d_dbmclose"
set i_rpcsvcdbm
eval $setvar
+
+ val="$undef"
+ set i_dbm
+ eval $setvar
;;
esac
diff --git a/mcon/U/i_dirent.U b/mcon/U/i_dirent.U
index 77f1d53..4882590 100644
--- a/mcon/U/i_dirent.U
+++ b/mcon/U/i_dirent.U
@@ -1,11 +1,11 @@
-?RCS: $Id: i_dirent.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: i_dirent.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: i_dirent.U,v $
diff --git a/mcon/U/i_dld.U b/mcon/U/i_dld.U
index ad67936..c008bc9 100644
--- a/mcon/U/i_dld.U
+++ b/mcon/U/i_dld.U
@@ -1,11 +1,11 @@
-?RCS: $Id: i_dld.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: i_dld.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
diff --git a/mcon/U/i_dlfcn.U b/mcon/U/i_dlfcn.U
index 9942287..c68e667 100644
--- a/mcon/U/i_dlfcn.U
+++ b/mcon/U/i_dlfcn.U
@@ -1,11 +1,11 @@
-?RCS: $Id: i_dlfcn.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: i_dlfcn.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
diff --git a/mcon/U/i_execinfo.U b/mcon/U/i_execinfo.U
new file mode 100644
index 0000000..f9b16a7
--- /dev/null
+++ b/mcon/U/i_execinfo.U
@@ -0,0 +1,27 @@
+?RCS: $Id: i_execinfo.U 34 2010-11-27 11:55:39Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2011, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:i_execinfo: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_execinfo:
+?S: This variable conditionally defines the I_EXECINFO symbol, and indicates
+?S: whether a C program may include <execinfo.h>, for backtrace() support.
+?S:.
+?C:I_EXECINFO:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <execinfo.h> for backtrace() support.
+?C:.
+?H:#$i_execinfo I_EXECINFO /**/
+?H:.
+?LINT:set i_execinfo
+: see if this is an execinfo.h system
+set execinfo.h i_execinfo
+eval $inhdr
+
diff --git a/mcon/U/i_fcntl.U b/mcon/U/i_fcntl.U
index 7777541..4f8b1eb 100644
--- a/mcon/U/i_fcntl.U
+++ b/mcon/U/i_fcntl.U
@@ -1,11 +1,11 @@
-?RCS: $Id: i_fcntl.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: i_fcntl.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: i_fcntl.U,v $
@@ -25,7 +25,7 @@
?H:.
?T:val
?X: Make line lists +i_sysfile to ensure tests for <sys/file.h> will be
-?X: conducted prior tests for <fcntl.h>, hece making sure the h_sysfile
+?X: conducted prior tests for <fcntl.h>, hence making sure the h_sysfile
?X: variable is correctly set when we reach that unit.
?LINT:set i_fcntl
?LINT:use i_sysfile
diff --git a/mcon/U/i_float.U b/mcon/U/i_float.U
index 8d2b715..8e26ef2 100644
--- a/mcon/U/i_float.U
+++ b/mcon/U/i_float.U
@@ -1,11 +1,11 @@
-?RCS: $Id: i_float.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: i_float.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
diff --git a/mcon/U/i_gdbm.U b/mcon/U/i_gdbm.U
index e10b43d..8056715 100644
--- a/mcon/U/i_gdbm.U
+++ b/mcon/U/i_gdbm.U
@@ -1,11 +1,11 @@
-?RCS: $Id: i_gdbm.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: i_gdbm.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: i_gdbm.U,v $
@@ -15,7 +15,7 @@
?RCS: Revision 3.0 1993/08/18 12:08:19 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:i_gdbm: Inhdr Inlibc Setvar
+?MAKE:i_gdbm: Trylink cat
?MAKE: -pick add $@ %<
?S:i_gdbm (d_gdbm):
?S: This variable conditionally defines the I_GDBM symbol, which
@@ -28,26 +28,19 @@
?C:.
?H:#$i_gdbm I_GDBM /**/
?H:.
-?T:t_gdbm d_gdbm_open
?LINT:set i_gdbm
: see if gdbm.h is available
-?X: t_gdbm is a tentative check. We might just have the .h, not the lib -- ADO
-set gdbm.h t_gdbm
-eval $inhdr
-case "$t_gdbm" in
-$define)
- : see if gdbm_open exists
- set gdbm_open d_gdbm_open
- eval $inlibc
- case "$d_gdbm_open" in
- $undef)
- t_gdbm="$undef"
- echo "We won't be including <gdbm.h>"
- ;;
- esac
- ;;
-esac
-val="$t_gdbm"
+$cat >try.c <<EOC
+#include <gdbm.h>
+void fatal_func(void) { return; };
+int main(void)
+{
+ GDBM_FILE ret;
+
+ ret = gdbm_open("name", 1, 2, 3, fatal_func);
+ return ret ? 0 : 1;
+}
+EOC
set i_gdbm
-eval $setvar
+eval $trylink
diff --git a/mcon/U/i_grp.U b/mcon/U/i_grp.U
index 2259060..d86b7e0 100644
--- a/mcon/U/i_grp.U
+++ b/mcon/U/i_grp.U
@@ -1,11 +1,11 @@
-?RCS: $Id: i_grp.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: i_grp.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: i_grp.U,v $
diff --git a/mcon/U/i_iconv.U b/mcon/U/i_iconv.U
new file mode 100644
index 0000000..7570aef
--- /dev/null
+++ b/mcon/U/i_iconv.U
@@ -0,0 +1,31 @@
+?RCS: $Id: i_iconv.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?X:
+?X: This unit looks whether <iconv.h> is available or not
+?X:
+?MAKE:i_iconv: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_iconv:
+?S: This variable conditionally defines I_ICONV, which indicates
+?S: to the C program that it should include <iconv.h>.
+?S:.
+?C:I_ICONV:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <iconv.h>.
+?C:.
+?H:#$i_iconv I_ICONV /**/
+?H:.
+?Y:BOTTOM
+?LINT:set i_iconv
+: see if this is a iconv.h system
+set iconv.h i_iconv
+eval $inhdr
+
diff --git a/mcon/U/i_ifaddrs.U b/mcon/U/i_ifaddrs.U
new file mode 100644
index 0000000..3e23e81
--- /dev/null
+++ b/mcon/U/i_ifaddrs.U
@@ -0,0 +1,27 @@
+?RCS: $Id: i_ifaddrs.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:i_ifaddrs: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_ifaddrs:
+?S: This variable conditionally defines the I_IFADDRS symbol, and indicates
+?S: whether a C program should include <ifaddrs.h>.
+?S:.
+?C:I_IFADDRS:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <ifaddrs.h>.
+?C:.
+?H:#$i_ifaddrs I_IFADDRS /**/
+?H:.
+?LINT:set i_ifaddrs
+: see if this is a ifaddrs.h system
+set ifaddrs.h i_ifaddrs
+eval $inhdr
+
diff --git a/mcon/U/i_inttypes.U b/mcon/U/i_inttypes.U
index 5e3255e..07b1b7d 100644
--- a/mcon/U/i_inttypes.U
+++ b/mcon/U/i_inttypes.U
@@ -1,11 +1,11 @@
-?RCS: $Id: i_inttypes.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: i_inttypes.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: i_sysun.U,v $
diff --git a/mcon/U/i_invent.U b/mcon/U/i_invent.U
new file mode 100644
index 0000000..167112b
--- /dev/null
+++ b/mcon/U/i_invent.U
@@ -0,0 +1,27 @@
+?RCS: $Id: i_invent.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:i_invent: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_invent:
+?S: This variable conditionally defines the I_INVENT symbol, and indicates
+?S: whether a C program should include <invent.h>.
+?S:.
+?C:I_INVENT:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <invent.h>.
+?C:.
+?H:#$i_invent I_INVENT /**/
+?H:.
+?LINT:set i_invent
+: see if this is a invent.h system
+set invent.h i_invent
+eval $inhdr
+
diff --git a/mcon/U/i_langinfo.U b/mcon/U/i_langinfo.U
new file mode 100644
index 0000000..f01aa52
--- /dev/null
+++ b/mcon/U/i_langinfo.U
@@ -0,0 +1,27 @@
+?RCS: $Id: i_langinfo.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:i_langinfo: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_langinfo:
+?S: This variable conditionally defines the I_LANGINFO symbol, and indicates
+?S: whether a C program should include <langinfo.h>.
+?S:.
+?C:I_LANGINFO:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <langinfo.h>.
+?C:.
+?H:#$i_langinfo I_LANGINFO /**/
+?H:.
+?LINT:set i_langinfo
+: see if this is a langinfo system
+set langinfo.h i_langinfo
+eval $inhdr
+
diff --git a/mcon/U/i_libcharset.U b/mcon/U/i_libcharset.U
new file mode 100644
index 0000000..e6b6802
--- /dev/null
+++ b/mcon/U/i_libcharset.U
@@ -0,0 +1,27 @@
+?RCS: $Id: i_libcharset.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:i_libcharset: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_libcharset:
+?S: This variable conditionally defines the I_LIBCHARSET symbol, and indicates
+?S: whether a C program should include <libcharset.h>.
+?S:.
+?C:I_LIBCHARSET:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <libcharset.h>.
+?C:.
+?H:#$i_libcharset I_LIBCHARSET /**/
+?H:.
+?LINT:set i_libcharset
+: see if this is a libcharset system
+set libcharset.h i_libcharset
+eval $inhdr
+
diff --git a/mcon/U/i_libintl.U b/mcon/U/i_libintl.U
new file mode 100644
index 0000000..4fa7148
--- /dev/null
+++ b/mcon/U/i_libintl.U
@@ -0,0 +1,27 @@
+?RCS: $Id: i_libintl.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:i_libintl: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_libintl:
+?S: This variable conditionally defines the I_LIBINTL symbol, and indicates
+?S: whether a C program should include <libintl.h>.
+?S:.
+?C:I_LIBINTL:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <libintl.h>.
+?C:.
+?H:#$i_libintl I_LIBINTL /**/
+?H:.
+?LINT:set i_libintl
+: see if this is a libintl system
+set libintl.h i_libintl
+eval $inhdr
+
diff --git a/mcon/U/i_limits.U b/mcon/U/i_limits.U
index 27ff5e8..b7c8656 100644
--- a/mcon/U/i_limits.U
+++ b/mcon/U/i_limits.U
@@ -1,11 +1,11 @@
-?RCS: $Id: i_limits.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: i_limits.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: i_limits.U,v $
diff --git a/mcon/U/i_linux_netlink.U b/mcon/U/i_linux_netlink.U
new file mode 100644
index 0000000..b694719
--- /dev/null
+++ b/mcon/U/i_linux_netlink.U
@@ -0,0 +1,29 @@
+?RCS: $Id: i_linux_netlink.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2011, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:i_linux_netlink: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_linux_netlink:
+?S: This variable conditionally defines the I_LINUX_NETLINK symbol, and
+?S: indicates whether a C program may include <linux/netlink.h> to define
+?S: the NLMSG_DATA() and other NLMSG_NEXT() macros.
+?S:.
+?C:I_LINUX_NETLINK:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <linux/netlink.h> to get definitions for the NLMSG_DATA() and
+?C: other NLMSG_NEXT() macros.
+?C:.
+?H:#$i_linux_netlink I_LINUX_NETLINK /**/
+?H:.
+?LINT:set i_linux_netlink
+: see if this is a linux/netlink.h system
+set linux/netlink.h i_linux_netlink
+eval $inhdr
+
diff --git a/mcon/U/i_linux_rtnetlink.U b/mcon/U/i_linux_rtnetlink.U
new file mode 100644
index 0000000..60fa19e
--- /dev/null
+++ b/mcon/U/i_linux_rtnetlink.U
@@ -0,0 +1,29 @@
+?RCS: $Id: i_linux_rtnetlink.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2011, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:i_linux_rtnetlink: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_linux_rtnetlink:
+?S: This variable conditionally defines the I_LINUX_RTNETLINK symbol, and
+?S: indicates whether a C program may include <linux/rtnetlink.h> to define
+?S: the RTA_DATA() and other RTA_NEXT() macros.
+?S:.
+?C:I_LINUX_RTNETLINK:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <linux/rtnetlink.h> to get definitions for the RTA_DATA() and
+?C: other RTA_NEXT() macros.
+?C:.
+?H:#$i_linux_rtnetlink I_LINUX_RTNETLINK /**/
+?H:.
+?LINT:set i_linux_rtnetlink
+: see if this is a linux/rtnetlink.h system
+set linux/rtnetlink.h i_linux_rtnetlink
+eval $inhdr
+
diff --git a/mcon/U/i_locale.U b/mcon/U/i_locale.U
index 52c3712..12cee7d 100644
--- a/mcon/U/i_locale.U
+++ b/mcon/U/i_locale.U
@@ -1,12 +1,12 @@
-?RCS: $Id: i_locale.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: i_locale.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1996, Andy Dougherty
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: i_locale.U,v $
diff --git a/mcon/U/i_malloc.U b/mcon/U/i_malloc.U
index dc43a50..645eba4 100644
--- a/mcon/U/i_malloc.U
+++ b/mcon/U/i_malloc.U
@@ -1,11 +1,11 @@
-?RCS: $Id: i_malloc.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: i_malloc.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: i_malloc.U,v $
diff --git a/mcon/U/i_math.U b/mcon/U/i_math.U
index fee9094..7b91af1 100644
--- a/mcon/U/i_math.U
+++ b/mcon/U/i_math.U
@@ -1,11 +1,11 @@
-?RCS: $Id: i_math.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: i_math.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
@@ -14,7 +14,7 @@
?RCS: Revision 3.0.1.1 1994/08/29 16:21:59 ram
?RCS: patch32: created by ADO
?RCS:
-?MAKE:i_math: Inhdr
+?MAKE:i_math: Inhdr Trylink cat
?MAKE: -pick add $@ %<
?X: Are there really systems that *DON'T* have math.h?
?S:i_math:
@@ -32,3 +32,21 @@
set math.h i_math
eval $inhdr
+: see whether we need libm
+$cat >try.c <<EOC
+#$i_math I_MATH
+#ifdef I_MATH
+#include <math.h>
+#endif
+int main(void)
+{
+ static double ret;
+
+ ret += 1.2 * pow(1.2, 1.2);
+ ret += 1.2 * sqrt(ret);
+ return 0 != ret;
+}
+EOC
+set val '-lm'
+eval $trylink
+
diff --git a/mcon/U/i_memory.U b/mcon/U/i_memory.U
index e8abcc5..6dcd037 100644
--- a/mcon/U/i_memory.U
+++ b/mcon/U/i_memory.U
@@ -1,11 +1,11 @@
-?RCS: $Id: i_memory.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: i_memory.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: i_memory.U,v $
diff --git a/mcon/U/i_mswsock.U b/mcon/U/i_mswsock.U
new file mode 100644
index 0000000..2918686
--- /dev/null
+++ b/mcon/U/i_mswsock.U
@@ -0,0 +1,27 @@
+?RCS: $Id: i_mswsock.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, 2010 Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:i_mswsock: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_mswsock:
+?S: This variable conditionally defines the I_MSWSOCK symbol, and indicates
+?S: whether a C program may include <Mswsock.h>.
+?S:.
+?C:I_MSWSOCK:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <Mswsock.h>.
+?C:.
+?H:#$i_mswsock I_MSWSOCK /**/
+?H:.
+?LINT:set i_mswsock
+: see if this is a mswsock.h system
+set mswsock.h i_mswsock
+eval $inhdr
+
diff --git a/mcon/U/i_ndbm.U b/mcon/U/i_ndbm.U
index f2b6aa7..42c30cb 100644
--- a/mcon/U/i_ndbm.U
+++ b/mcon/U/i_ndbm.U
@@ -1,11 +1,11 @@
-?RCS: $Id: i_ndbm.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: i_ndbm.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: i_ndbm.U,v $
@@ -15,7 +15,7 @@
?RCS: Revision 3.0 1993/08/18 12:08:23 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:i_ndbm: Inhdr Inlibc Setvar
+?MAKE:i_ndbm: Inhdr Trylink Setvar cat
?MAKE: -pick add $@ %<
?S:i_ndbm (d_ndbm):
?S: This variable conditionally defines the I_NDBM symbol, which
@@ -28,26 +28,22 @@
?C:.
?H:#$i_ndbm I_NDBM /**/
?H:.
-?T:t_ndbm d_dbm_open
+?T:d_dbm_open
?LINT:set i_ndbm
: see if ndbm.h is available
-?X: t_ndbm is a tentative check. We might just have the .h, not the lib -- ADO
-set ndbm.h t_ndbm
-eval $inhdr
-case "$t_ndbm" in
-$define)
- : see if dbm_open exists
- set dbm_open d_dbm_open
- eval $inlibc
- case "$d_dbm_open" in
- $undef)
- t_ndbm="$undef"
- echo "We won't be including <ndbm.h>"
- ;;
- esac
- ;;
-esac
-val="$t_ndbm"
+$cat >try.c <<EOC
+#include <ndbm.h>
+int main(void)
+{
+ static DBM *dbm;
+ dbm = dbm_open("file", 1, 2);
+ return dbm ? 0 : 1;
+}
+EOC
+set d_dbm_open
+eval $trylink
+
+val="$d_dbm_open"
set i_ndbm
eval $setvar
diff --git a/mcon/U/i_netdb.U b/mcon/U/i_netdb.U
new file mode 100644
index 0000000..4725e27
--- /dev/null
+++ b/mcon/U/i_netdb.U
@@ -0,0 +1,27 @@
+?RCS: $Id: i_netdb.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:i_netdb: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_netdb:
+?S: This variable conditionally defines the I_NETDB symbol, and indicates
+?S: whether a C program should include <netdb.h>.
+?S:.
+?C:I_NETDB:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <netdb.h>.
+?C:.
+?H:#$i_netdb I_NETDB /**/
+?H:.
+?LINT:set i_netdb
+: see if this is a netdb.h system
+set netdb.h i_netdb
+eval $inhdr
+
diff --git a/mcon/U/i_neterrno.U b/mcon/U/i_neterrno.U
index 6753c55..af94dca 100644
--- a/mcon/U/i_neterrno.U
+++ b/mcon/U/i_neterrno.U
@@ -1,11 +1,11 @@
-?RCS: $Id: i_neterrno.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: i_neterrno.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
diff --git a/mcon/U/i_netif.U b/mcon/U/i_netif.U
new file mode 100644
index 0000000..0663f4f
--- /dev/null
+++ b/mcon/U/i_netif.U
@@ -0,0 +1,27 @@
+?RCS: $Id: i_netif.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:i_netif: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_netif:
+?S: This variable conditionally defines the I_NET_IF symbol, and indicates
+?S: whether a C program should include <net/if.h>.
+?S:.
+?C:I_NET_IF:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <net/if.h>.
+?C:.
+?H:#$i_netif I_NET_IF /**/
+?H:.
+?LINT:set i_netif
+: see if this is a net/if.h system
+set net/if.h i_netif
+eval $inhdr
+
diff --git a/mcon/U/i_netroute.U b/mcon/U/i_netroute.U
new file mode 100644
index 0000000..581c55f
--- /dev/null
+++ b/mcon/U/i_netroute.U
@@ -0,0 +1,30 @@
+?RCS: $Id: i_netroute.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2011, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?X:
+?X: This unit looks whether <net/route.h> is available or not
+?X:
+?MAKE:i_netroute: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_netroute:
+?S: This variable conditionally defines I_NET_ROUTE, which indicates
+?S: to the C program that it can include <net/route.h>.
+?S:.
+?C:I_NET_ROUTE:
+?C: This symbol, if defined, indicates to the C program that it can
+?C: include <net/route.h>.
+?C:.
+?H:#$i_netroute I_NET_ROUTE /**/
+?H:.
+?LINT:set i_netroute
+: see if this is a net/route.h system
+set net/route.h i_netroute
+eval $inhdr
+
diff --git a/mcon/U/i_niin.U b/mcon/U/i_niin.U
index 6f23c97..f032a51 100644
--- a/mcon/U/i_niin.U
+++ b/mcon/U/i_niin.U
@@ -1,11 +1,11 @@
-?RCS: $Id: i_niin.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: i_niin.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: i_niin.U,v $
diff --git a/mcon/U/i_niip.U b/mcon/U/i_niip.U
new file mode 100644
index 0000000..d27573e
--- /dev/null
+++ b/mcon/U/i_niip.U
@@ -0,0 +1,30 @@
+?RCS: $Id: i_niip.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?X:
+?X: This unit looks whether <netinet/ip.h> is available or not
+?X:
+?MAKE:i_niip: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_niip:
+?S: This variable conditionally defines I_NETINET_IP, which indicates
+?S: to the C program that it should include <netinet/ip.h>.
+?S:.
+?C:I_NETINET_IP:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <netinet/ip.h>.
+?C:.
+?H:#$i_niip I_NETINET_IP /**/
+?H:.
+?LINT:set i_niip
+: see if this is a netinet/ip.h system
+set netinet/ip.h i_niip
+eval $inhdr
+
diff --git a/mcon/U/i_poll.U b/mcon/U/i_poll.U
index f8dd3aa..20fadf2 100644
--- a/mcon/U/i_poll.U
+++ b/mcon/U/i_poll.U
@@ -1,11 +1,11 @@
-?RCS: $Id: i_poll.U 15 2006-08-30 18:21:51Z rmanfredi $
+?RCS: $Id: i_poll.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?MAKE:i_poll: Inhdr
diff --git a/mcon/U/i_pthread.U b/mcon/U/i_pthread.U
new file mode 100644
index 0000000..6cd0779
--- /dev/null
+++ b/mcon/U/i_pthread.U
@@ -0,0 +1,26 @@
+?RCS:
+?RCS: Copyright (c) 2011, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:i_pthread: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_pthread:
+?S: This variable conditionally defines the I_PTHREAD symbol, and indicates
+?S: whether a C program may include <pthread.h>, for POSIX threads.
+?S:.
+?C:I_PTHREAD:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <pthread.h> for POSIX threads.
+?C:.
+?H:#$i_pthread I_PTHREAD /**/
+?H:.
+?LINT:set i_pthread
+: see if this is a pthread.h system
+set pthread.h i_pthread
+eval $inhdr
+
diff --git a/mcon/U/i_pwd.U b/mcon/U/i_pwd.U
index 9737188..7716d44 100644
--- a/mcon/U/i_pwd.U
+++ b/mcon/U/i_pwd.U
@@ -1,11 +1,11 @@
-?RCS: $Id: i_pwd.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: i_pwd.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: i_pwd.U,v $
diff --git a/mcon/U/i_regex.U b/mcon/U/i_regex.U
index 9c8ab37..086d892 100644
--- a/mcon/U/i_regex.U
+++ b/mcon/U/i_regex.U
@@ -1,11 +1,11 @@
-?RCS: $Id: i_regex.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: i_regex.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Sidney C. Smith <scsmith@cbda9.apgea.army.mil>
diff --git a/mcon/U/i_sched.U b/mcon/U/i_sched.U
new file mode 100644
index 0000000..84e58d5
--- /dev/null
+++ b/mcon/U/i_sched.U
@@ -0,0 +1,25 @@
+?RCS: Copyright (c) 2012, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:i_sched: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_sched:
+?S: This variable conditionally defines the I_SCHED symbol, and indicates
+?S: whether a C program may include <sched.h> to get sched_yield().
+?S:.
+?C:I_SCHED:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <sched.h> to get the definition of sched_yield().
+?C:.
+?H:#$i_sched I_SCHED /**/
+?H:.
+?LINT:set i_sched
+: see if this is a sched.h system
+set sched.h i_sched
+eval $inhdr
+
diff --git a/mcon/U/i_sfio.U b/mcon/U/i_sfio.U
index a145301..c8565f4 100644
--- a/mcon/U/i_sfio.U
+++ b/mcon/U/i_sfio.U
@@ -1,12 +1,12 @@
-?RCS: $Id: i_sfio.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: i_sfio.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1996, Andy Dougherty
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: i_sfio.U,v $
diff --git a/mcon/U/i_stddef.U b/mcon/U/i_stddef.U
index 7447769..1266401 100644
--- a/mcon/U/i_stddef.U
+++ b/mcon/U/i_stddef.U
@@ -1,11 +1,11 @@
-?RCS: $Id: i_stddef.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: i_stddef.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: i_stddef.U,v $
diff --git a/mcon/U/i_stdlib.U b/mcon/U/i_stdlib.U
index 4d62940..f087fa1 100644
--- a/mcon/U/i_stdlib.U
+++ b/mcon/U/i_stdlib.U
@@ -1,11 +1,11 @@
-?RCS: $Id: i_stdlib.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: i_stdlib.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: i_stdlib.U,v $
diff --git a/mcon/U/i_string.U b/mcon/U/i_string.U
index 4e69e6e..4b07116 100644
--- a/mcon/U/i_string.U
+++ b/mcon/U/i_string.U
@@ -1,11 +1,11 @@
-?RCS: $Id: i_string.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: i_string.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: i_string.U,v $
@@ -50,7 +50,7 @@ else
if $test "$strings" && $test -r "$strings"; then
echo "Using <strings.h> instead of <string.h>." >&4
else
- ./warn "No string header found -- You'll surely have problems."
+ ./warn "No string header found -- You'll surely have problems." 4>&4
fi
fi
set i_string
diff --git a/mcon/U/i_sysdir.U b/mcon/U/i_sysdir.U
index 6e52a32..c316d34 100644
--- a/mcon/U/i_sysdir.U
+++ b/mcon/U/i_sysdir.U
@@ -1,11 +1,11 @@
-?RCS: $Id: i_sysdir.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: i_sysdir.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: i_sysdir.U,v $
diff --git a/mcon/U/i_sysfile.U b/mcon/U/i_sysfile.U
index 214ca48..2e05794 100644
--- a/mcon/U/i_sysfile.U
+++ b/mcon/U/i_sysfile.U
@@ -1,11 +1,11 @@
-?RCS: $Id: i_sysfile.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: i_sysfile.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: i_sysfile.U,v $
diff --git a/mcon/U/i_sysioctl.U b/mcon/U/i_sysioctl.U
index 6c4e017..dd98903 100644
--- a/mcon/U/i_sysioctl.U
+++ b/mcon/U/i_sysioctl.U
@@ -1,11 +1,11 @@
-?RCS: $Id: i_sysioctl.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: i_sysioctl.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: i_sysioctl.U,v $
@@ -46,7 +46,7 @@
?S: This variable conditionally defines USE_IOCNOTTY to indicate that the
?S: ioctl() call with TIOCNOTTY should be used to void tty association.
?S: Otherwise (on USG probably), it is enough to close the standard file
-?S: decriptors and do a setpgrp().
+?S: descriptors and do a setpgrp().
?S:.
?C:I_SYS_IOCTL (I_SYSIOCTL):
?C: This symbol, if defined, indicates that <sys/ioctl.h> exists and should
diff --git a/mcon/U/i_sysipc.U b/mcon/U/i_sysipc.U
new file mode 100644
index 0000000..c554cdf
--- /dev/null
+++ b/mcon/U/i_sysipc.U
@@ -0,0 +1,28 @@
+?RCS: $Id: i_sysipc.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2012, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:i_sysipc: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_sysipc:
+?S: This variable conditionally defines the I_SYS_IPC symbol, and indicates
+?S: whether a C program should include <sys/ipc.h> to be able to get defines
+?S: for SysV IPCs.
+?S:.
+?C:I_SYS_IPC:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <sys/ipc.h> to get the defines for SysV IPCs.
+?C:.
+?H:#$i_sysipc I_SYS_IPC /**/
+?H:.
+?LINT:set i_sysipc
+: see if this is a sys/ipc system
+set sys/ipc.h i_sysipc
+eval $inhdr
+
diff --git a/mcon/U/i_sysmman.U b/mcon/U/i_sysmman.U
index 598c589..14d8e00 100644
--- a/mcon/U/i_sysmman.U
+++ b/mcon/U/i_sysmman.U
@@ -1,11 +1,11 @@
-?RCS: $Id: i_sysmman.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: i_sysmman.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: i_sysmman.U,v $
diff --git a/mcon/U/i_sysmount.U b/mcon/U/i_sysmount.U
new file mode 100644
index 0000000..87948a8
--- /dev/null
+++ b/mcon/U/i_sysmount.U
@@ -0,0 +1,29 @@
+?RCS: $Id: i_sysmount.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:i_sysmount: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_sysmount:
+?S: This variable conditionally defines the I_SYS_MOUNT symbol, and
+?S: indicates whether a C program should include <sys/mount.h> to be able
+?S: to issue the statfs() call to get filesystem statistics.
+?S:.
+?C:I_SYS_MOUNT:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <sys/mount.h> to get the struct statfs definition for the
+?C: statfs() system call.
+?C:.
+?H:#$i_sysmount I_SYS_MOUNT /**/
+?H:.
+?LINT:set i_sysmount
+: see if this is a sys/mount system
+set sys/mount.h i_sysmount
+eval $inhdr
+
diff --git a/mcon/U/i_sysndir.U b/mcon/U/i_sysndir.U
index 13afa84..b352914 100644
--- a/mcon/U/i_sysndir.U
+++ b/mcon/U/i_sysndir.U
@@ -1,11 +1,11 @@
-?RCS: $Id: i_sysndir.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: i_sysndir.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: i_sysndir.U,v $
diff --git a/mcon/U/i_sysparam.U b/mcon/U/i_sysparam.U
index d87d620..ae0d057 100644
--- a/mcon/U/i_sysparam.U
+++ b/mcon/U/i_sysparam.U
@@ -1,11 +1,11 @@
-?RCS: $Id: i_sysparam.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: i_sysparam.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: i_sysparam.U,v $
diff --git a/mcon/U/i_syspoll.U b/mcon/U/i_syspoll.U
index b381c27..97ec610 100644
--- a/mcon/U/i_syspoll.U
+++ b/mcon/U/i_syspoll.U
@@ -1,11 +1,11 @@
-?RCS: $Id: i_syspoll.U 15 2006-08-30 18:21:51Z rmanfredi $
+?RCS: $Id: i_syspoll.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?MAKE:i_syspoll: Inhdr
diff --git a/mcon/U/i_sysresrc.U b/mcon/U/i_sysresrc.U
index 690c322..ac73d08 100644
--- a/mcon/U/i_sysresrc.U
+++ b/mcon/U/i_sysresrc.U
@@ -1,11 +1,11 @@
-?RCS: $Id: i_sysresrc.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: i_sysresrc.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: i_sysresrc.U,v $
diff --git a/mcon/U/i_sysselct.U b/mcon/U/i_sysselct.U
index aa62276..da99467 100644
--- a/mcon/U/i_sysselct.U
+++ b/mcon/U/i_sysselct.U
@@ -1,11 +1,11 @@
-?RCS: $Id: i_sysselct.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: i_sysselct.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: i_sysselct.U,v $
diff --git a/mcon/U/i_syssem.U b/mcon/U/i_syssem.U
new file mode 100644
index 0000000..4be3713
--- /dev/null
+++ b/mcon/U/i_syssem.U
@@ -0,0 +1,28 @@
+?RCS: $Id: i_syssem.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2012, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:i_syssem: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_syssem:
+?S: This variable conditionally defines the I_SYS_SEM symbol, and indicates
+?S: whether a C program should include <sys/sem.h> to be able to use SysV
+?S: semaphores.
+?S:.
+?C:I_SYS_SEM:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <sys/sem.h> to use SysV semaphores.
+?C:.
+?H:#$i_syssem I_SYS_SEM /**/
+?H:.
+?LINT:set i_syssem
+: see if this is a sys/sem system
+set sys/sem.h i_syssem
+eval $inhdr
+
diff --git a/mcon/U/i_syssendfile.U b/mcon/U/i_syssendfile.U
new file mode 100644
index 0000000..1511f09
--- /dev/null
+++ b/mcon/U/i_syssendfile.U
@@ -0,0 +1,27 @@
+?RCS: $Id: i_syssendfile.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:i_syssendfile: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_syssendfile:
+?S: This variable conditionally defines the I_SYS_SENDFILE symbol, and indicates
+?S: whether a C program should include <sys/sendfile.h>.
+?S:.
+?C:I_SYS_SENDFILE:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <sys/sendfile.h>.
+?C:.
+?H:#$i_syssendfile I_SYS_SENDFILE /**/
+?H:.
+?LINT:set i_syssendfile
+: see if this is a sys/sendfile system
+set sys/sendfile.h i_syssendfile
+eval $inhdr
+
diff --git a/mcon/U/i_syssock.U b/mcon/U/i_syssock.U
index ffc6f6c..5176041 100644
--- a/mcon/U/i_syssock.U
+++ b/mcon/U/i_syssock.U
@@ -1,11 +1,11 @@
-?RCS: $Id: i_syssock.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: i_syssock.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: i_syssock.U,v $
diff --git a/mcon/U/i_sysstat.U b/mcon/U/i_sysstat.U
index 6beedbc..79e1b0f 100644
--- a/mcon/U/i_sysstat.U
+++ b/mcon/U/i_sysstat.U
@@ -1,12 +1,12 @@
-?RCS: $Id: i_sysstat.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: i_sysstat.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1996, Andy Dougherty
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: i_sysstat.U,v $
diff --git a/mcon/U/i_sysstatvfs.U b/mcon/U/i_sysstatvfs.U
new file mode 100644
index 0000000..19988b7
--- /dev/null
+++ b/mcon/U/i_sysstatvfs.U
@@ -0,0 +1,29 @@
+?RCS: $Id: i_sysstatvfs.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:i_sysstatvfs: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_sysstatvfs:
+?S: This variable conditionally defines the I_SYS_STATVFS symbol, and indicates
+?S: whether a C program should include <sys/statvfs.h> to be able to issue
+?S: the statvfs() call to get filesystem statistics.
+?S:.
+?C:I_SYS_STATVFS:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <sys/statvfs.h> to get the struct statvfs definition for the
+?C: statvfs() system call.
+?C:.
+?H:#$i_sysstatvfs I_SYS_STATVFS /**/
+?H:.
+?LINT:set i_sysstatvfs
+: see if this is a sys/statvfs system
+set sys/statvfs.h i_sysstatvfs
+eval $inhdr
+
diff --git a/mcon/U/i_syssysctl.U b/mcon/U/i_syssysctl.U
new file mode 100644
index 0000000..3f9cddf
--- /dev/null
+++ b/mcon/U/i_syssysctl.U
@@ -0,0 +1,27 @@
+?RCS: $Id: i_syssysctl.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:i_syssysctl: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_syssysctl:
+?S: This variable conditionally defines the I_SYS_SYSCTL symbol, and indicates
+?S: whether a C program should include <sys/sysctl.h>.
+?S:.
+?C:I_SYS_SYSCTL:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <sys/sysctl.h>.
+?C:.
+?H:#$i_syssysctl I_SYS_SYSCTL /**/
+?H:.
+?LINT:set i_syssysctl
+: see if this is a sys/sysctl system
+set sys/sysctl.h i_syssysctl
+eval $inhdr
+
diff --git a/mcon/U/i_systable.U b/mcon/U/i_systable.U
index 1423d8e..c857910 100644
--- a/mcon/U/i_systable.U
+++ b/mcon/U/i_systable.U
@@ -1,11 +1,11 @@
-?RCS: $Id: i_systable.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: i_systable.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: i_systable.U,v $
diff --git a/mcon/U/i_systimeb.U b/mcon/U/i_systimeb.U
index 63dd0e6..367761d 100644
--- a/mcon/U/i_systimeb.U
+++ b/mcon/U/i_systimeb.U
@@ -1,11 +1,11 @@
-?RCS: $Id: i_systimeb.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: i_systimeb.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: i_systimeb.U,v $
diff --git a/mcon/U/i_systimes.U b/mcon/U/i_systimes.U
index 7641e21..7bec046 100644
--- a/mcon/U/i_systimes.U
+++ b/mcon/U/i_systimes.U
@@ -1,11 +1,11 @@
-?RCS: $Id: i_systimes.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: i_systimes.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: i_systimes.U,v $
diff --git a/mcon/U/i_systwgcf.U b/mcon/U/i_systwgcf.U
index 4bb3b2c..cdd1bf2 100644
--- a/mcon/U/i_systwgcf.U
+++ b/mcon/U/i_systwgcf.U
@@ -1,11 +1,11 @@
-?RCS: $Id: i_systwgcf.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: i_systwgcf.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: i_systwgcf.U,v $
diff --git a/mcon/U/i_systypes.U b/mcon/U/i_systypes.U
index 6570962..66afc0a 100644
--- a/mcon/U/i_systypes.U
+++ b/mcon/U/i_systypes.U
@@ -1,11 +1,11 @@
-?RCS: $Id: i_systypes.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: i_systypes.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: i_systypes.U,v $
diff --git a/mcon/U/i_sysun.U b/mcon/U/i_sysun.U
index 0636176..73fe2a8 100644
--- a/mcon/U/i_sysun.U
+++ b/mcon/U/i_sysun.U
@@ -1,11 +1,11 @@
-?RCS: $Id: i_sysun.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: i_sysun.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: i_sysun.U,v $
diff --git a/mcon/U/i_sysutsname.U b/mcon/U/i_sysutsname.U
new file mode 100644
index 0000000..8846b7d
--- /dev/null
+++ b/mcon/U/i_sysutsname.U
@@ -0,0 +1,27 @@
+?RCS: $Id: i_sysutsname.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:i_sysutsname: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_sysutsname:
+?S: This variable conditionally defines the I_SYS_UTSNAME symbol, and
+?S: indicates whether a C program should include <sys/utsname.h>.
+?S:.
+?C:I_SYS_UTSNAME:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <sys/utsname.h>.
+?C:.
+?H:#$i_sysutsname I_SYS_UTSNAME /**/
+?H:.
+?LINT:set i_sysutsname
+: see if this is a sys/utsname system
+set sys/utsname.h i_sysutsname
+eval $inhdr
+
diff --git a/mcon/U/i_sysvfs.U b/mcon/U/i_sysvfs.U
new file mode 100644
index 0000000..d86cee5
--- /dev/null
+++ b/mcon/U/i_sysvfs.U
@@ -0,0 +1,29 @@
+?RCS: $Id: i_sysvfs.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:i_sysvfs: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_sysvfs:
+?S: This variable conditionally defines the I_SYS_VFS symbol, and indicates
+?S: whether a C program should include <sys/vfs.h> to be able to issue
+?S: the statfs() call to get filesystem statistics.
+?S:.
+?C:I_SYS_VFS:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <sys/vfs.h> to get the struct statfs definition for the
+?C: statfs() system call.
+?C:.
+?H:#$i_sysvfs I_SYS_VFS /**/
+?H:.
+?LINT:set i_sysvfs
+: see if this is a sys/vfs system
+set sys/vfs.h i_sysvfs
+eval $inhdr
+
diff --git a/mcon/U/i_syswait.U b/mcon/U/i_syswait.U
index dcaa955..1f1546e 100644
--- a/mcon/U/i_syswait.U
+++ b/mcon/U/i_syswait.U
@@ -1,11 +1,11 @@
-?RCS: $Id: i_syswait.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: i_syswait.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: i_syswait.U,v $
diff --git a/mcon/U/i_termio.U b/mcon/U/i_termio.U
index 816c63d..c53cc1e 100644
--- a/mcon/U/i_termio.U
+++ b/mcon/U/i_termio.U
@@ -1,11 +1,11 @@
-?RCS: $Id: i_termio.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: i_termio.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: i_termio.U,v $
@@ -13,7 +13,7 @@
?RCS: patch36: call ./usg and ./Cppsym explicitely instead of relying on PATH
?RCS:
?RCS: Revision 3.0.1.3 1994/08/29 16:26:38 ram
-?RCS: patch32: don't include all threee I_* symbols in config.h
+?RCS: patch32: don't include all three I_* symbols in config.h
?RCS: patch32: (had forgotten to undo this part last time)
?RCS:
?RCS: Revision 3.0.1.2 1994/05/13 15:25:03 ram
@@ -25,7 +25,8 @@
?RCS: Revision 3.0 1993/08/18 12:08:44 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:i_termio i_sgtty i_termios: test Inlibc Cppsym Guess Setvar Findhdr Warn
+?MAKE:i_termio i_sgtty i_termios: Trylink Cppsym Guess Setvar Findhdr Warn \
+ test cat
?MAKE: -pick add $@ %<
?S:i_termio:
?S: This variable conditionally defines the I_TERMIO symbol, which
@@ -69,11 +70,21 @@ val="$undef"
val2="$undef"
val3="$undef"
?X: Prefer POSIX-approved termios.h over all else
-if $test `./findhdr termios.h`; then
- set tcsetattr i_termios
- eval $inlibc
- val3="$i_termios"
-fi
+$cat >try.c <<EOC
+#include <termios.h>
+int main(void)
+{
+ static struct termios t;
+ static int ret;
+ ret |= tcsetattr(1, 2, &t);
+ return ret ? 0 : 1;
+}
+EOC
+set i_termios
+eval $trylink
+set tcsetattr i_termios
+val3="$i_termios"
+
echo " "
case "$val3" in
"$define") echo "You have POSIX termios.h... good!" >&4;;
@@ -84,14 +95,14 @@ case "$val3" in
echo "<sgtty.h> found." >&4
else
echo "System is pyramid with BSD universe."
- ./warn "<sgtty.h> not found--you could have problems."
+ ./warn "<sgtty.h> not found--you could have problems." 4>&4
fi;;
*) if $test `./findhdr termio.h`; then
val="$define"
echo "<termio.h> found." >&4
else
echo "System is pyramid with USG universe."
- ./warn "<termio.h> not found--you could have problems."
+ ./warn "<termio.h> not found--you could have problems." 4>&4
fi;;
esac
?X: Start with USG to avoid problems if both usg/bsd was guessed
@@ -103,7 +114,7 @@ case "$val3" in
echo "<sgtty.h> found." >&4
val2="$define"
else
- ./warn "Neither <termio.h> nor <sgtty.h> found--cross fingers!"
+ ./warn "Neither <termio.h> nor <sgtty.h> found--cross fingers!" 4>&4
fi
else
if $test `./findhdr sgtty.h`; then
@@ -113,7 +124,7 @@ case "$val3" in
echo "<termio.h> found." >&4
val="$define"
else
- ./warn "Neither <sgtty.h> nor <termio.h> found--cross fingers!"
+ ./warn "Neither <sgtty.h> nor <termio.h> found--cross fingers!" 4>&4
fi
fi;;
esac
diff --git a/mcon/U/i_time.U b/mcon/U/i_time.U
index 8791b11..bd88567 100644
--- a/mcon/U/i_time.U
+++ b/mcon/U/i_time.U
@@ -1,11 +1,11 @@
-?RCS: $Id: i_time.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: i_time.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: i_time.U,v $
@@ -73,7 +73,7 @@ $cat >try.c <<'EOCP'
#ifdef I_SYSSELECT
#include <sys/select.h>
#endif
-int main()
+int main(void)
{
struct tm foo;
#ifdef S_TIMEVAL
@@ -83,12 +83,12 @@ int main()
struct timezone tzp;
#endif
if (foo.tm_sec == foo.tm_sec)
- exit(0);
+ return 0;
#ifdef S_TIMEVAL
if (bar.tv_sec == bar.tv_sec)
- exit(0);
+ return 0;
#endif
- exit(1);
+ return 1;
}
EOCP
flags=''
diff --git a/mcon/U/i_ucontext.U b/mcon/U/i_ucontext.U
new file mode 100644
index 0000000..9f4912b
--- /dev/null
+++ b/mcon/U/i_ucontext.U
@@ -0,0 +1,96 @@
+?RCS: $Id: i_ucontext.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2012 Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:i_ucontext i_sys_ucontext: Inhdr cat echo n c rm \
+ +cc +ccflags +ldflags
+?MAKE: -pick add $@ %<
+?S:i_ucontext:
+?S: This variable conditionally defines the I_UCONTEXT symbol, and indicates
+?S: whether a C program may include <ucontext.h> to get ucontext_t.
+?S:.
+?S:i_sys_ucontext:
+?S: This variable conditionally defines the I_SYS_UCONTEXT symbol, and
+?S: indicates whether a C program may include <sys/ucontext.h> to get
+?S: ucontext_t.
+?S:.
+?C:I_UCONTEXT:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <ucontext.h> to get at the user thread context. A portable
+?C: program must also check I_SYS_UCONTEXT for <sys/ucontex.h> inclusion,
+?C: especially on OSX.
+?C:.
+?C:I_SYS_UCONTEXT:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <sys/ucontext.h> to get at the user thread context. A portable
+?C: program must also check I_UCONTEXT for <ucontex.h> inclusion.
+?C:.
+?H:#$i_ucontext I_UCONTEXT /**/
+?H:#$i_sys_ucontext I_SYS_UCONTEXT /**/
+?H:.
+?T:working
+: see if this is a ucontext.h system
+set ucontext.h i_ucontext
+eval $inhdr
+
+: see if this is a sys/ucontext.h system
+set sys/ucontext.h i_sys_ucontext
+eval $inhdr
+
+: when both ucontext.h and sys/ucontext.h are available, check which one works
+case "$i_ucontext$i_sys_ucontext" in
+"$define$define")
+ echo " "
+ $cat >try.c <<'EOC'
+#ifdef I_UCONTEXT
+#include <ucontext.h>
+#endif
+#ifdef I_SYS_UCONTEXT
+#include <sys/ucontext.h>
+#endif
+
+int main(void)
+{
+ static ucontext_t u;
+ return (int) sizeof(u) & 0xff;
+}
+EOC
+ $echo $n "Checking whether including <ucontext.h> alone works...$c" >&4
+ working=
+ if $cc $ccflags -DI_UCONTEXT -o try try.c $ldflags >/dev/null 2>&1; then
+ working="$define"
+ fi
+ case "$working" in
+ "$define")
+ echo " yes." >&4
+ i_sys_ucontext="$undef"
+ ;;
+ *)
+ echo "no." >&4
+ echo " "
+ $echo $n "Checking whether including <sys/ucontext.h> works...$c" >&4
+ working=
+ if $cc $ccflags -DI_SYS_UCONTEXT \
+ -o try try.c $ldflags >/dev/null 2>&1
+ then
+ working="$define"
+ fi
+ case "$working" in
+ "$define")
+ echo " yes, ignoring <ucontext.h>." >&4
+ i_ucontext="$undef"
+ ;;
+ *) echo " no, we'll include both then." >&4;;
+ esac
+ ;;
+ esac
+ ;;
+esac
+$rm -f try.*
+
diff --git a/mcon/U/i_unistd.U b/mcon/U/i_unistd.U
index e83e081..3a0c761 100644
--- a/mcon/U/i_unistd.U
+++ b/mcon/U/i_unistd.U
@@ -1,11 +1,11 @@
-?RCS: $Id: i_unistd.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: i_unistd.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: i_unistd.U,v $
diff --git a/mcon/U/i_utime.U b/mcon/U/i_utime.U
index 3651330..55208d8 100644
--- a/mcon/U/i_utime.U
+++ b/mcon/U/i_utime.U
@@ -1,11 +1,11 @@
-?RCS: $Id: i_utime.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: i_utime.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: i_utime.U,v $
diff --git a/mcon/U/i_values.U b/mcon/U/i_values.U
index 0afbcad..2665df4 100644
--- a/mcon/U/i_values.U
+++ b/mcon/U/i_values.U
@@ -1,12 +1,12 @@
-?RCS: $Id: i_values.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: i_values.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1996, Andy Dougherty
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: i_values.U,v $
diff --git a/mcon/U/i_varhdr.U b/mcon/U/i_varhdr.U
index 52e6c20..6d53d24 100644
--- a/mcon/U/i_varhdr.U
+++ b/mcon/U/i_varhdr.U
@@ -1,11 +1,11 @@
-?RCS: $Id: i_varhdr.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: i_varhdr.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: i_varhdr.U,v $
@@ -109,11 +109,12 @@ va_dcl
p = va_arg(ap, char *);
#endif
va_end(ap);
+ return 0;
}
EOP
$cat > varargs <<EOP
$startsh
-if $cc -c $ccflags -D\$1 varargs.c >/dev/null 2>&1; then
+if $cc -c $ccflags -D\$1 varargs.c; then
echo "true"
else
echo "false"
@@ -141,7 +142,7 @@ case "$valstd" in
esac
case "$val" in
'')
- ./warn "I could not find the definition for va_dcl... You have problems..."
+ ./warn "I could not find the definition for va_dcl... You have problems..." 4>&4
val="$undef"; set i_stdarg; eval $setvar
val="$undef"; set i_varargs; eval $setvar
;;
diff --git a/mcon/U/i_vfork.U b/mcon/U/i_vfork.U
index eabdd13..f4892ee 100644
--- a/mcon/U/i_vfork.U
+++ b/mcon/U/i_vfork.U
@@ -1,11 +1,11 @@
-?RCS: $Id: i_vfork.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: i_vfork.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: i_vfork.U,v $
diff --git a/mcon/U/i_whoami.U b/mcon/U/i_whoami.U
index f5721cd..7b9c88b 100644
--- a/mcon/U/i_whoami.U
+++ b/mcon/U/i_whoami.U
@@ -1,11 +1,11 @@
-?RCS: $Id: i_whoami.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: i_whoami.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: i_whoami.U,v $
diff --git a/mcon/U/i_winsock2.U b/mcon/U/i_winsock2.U
new file mode 100644
index 0000000..e2b62a9
--- /dev/null
+++ b/mcon/U/i_winsock2.U
@@ -0,0 +1,27 @@
+?RCS: $Id: i_limits.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:i_winsock2: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_winsock2:
+?S: This variable conditionally defines the I_WINSOCK2 symbol, and indicates
+?S: whether a C program may include <Winsock2.h>.
+?S:.
+?C:I_WINSOCK2:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <Winsock2.h>.
+?C:.
+?H:#$i_winsock2 I_WINSOCK2 /**/
+?H:.
+?LINT:set i_winsock2
+: see if this is a winsock2.h system
+set winsock2.h i_winsock2
+eval $inhdr
+
diff --git a/mcon/U/i_ws2tcpip.U b/mcon/U/i_ws2tcpip.U
new file mode 100644
index 0000000..9a77eb6
--- /dev/null
+++ b/mcon/U/i_ws2tcpip.U
@@ -0,0 +1,27 @@
+?RCS: $Id: i_ws2tcpip.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, 2010, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:i_ws2tcpip: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_ws2tcpip:
+?S: This variable conditionally defines the I_WS2TCPIP symbol, and indicates
+?S: whether a C program may include <Ws2tcpip.h>.
+?S:.
+?C:I_WS2TCPIP:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <Ws2tcpip.h>.
+?C:.
+?H:#$i_ws2tcpip I_WS2TCPIP /**/
+?H:.
+?LINT:set i_ws2tcpip
+: see if this is a ws2tcpip.h system
+set ws2tcpip.h i_ws2tcpip
+eval $inhdr
+
diff --git a/mcon/U/i_zlib.U b/mcon/U/i_zlib.U
new file mode 100644
index 0000000..e667623
--- /dev/null
+++ b/mcon/U/i_zlib.U
@@ -0,0 +1,31 @@
+?RCS: $Id: i_zlib.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?X:
+?X: This unit looks whether <zlib.h> is available or not
+?X:
+?MAKE:i_zlib: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_zlib:
+?S: This variable conditionally defines I_ZLIB, which indicates
+?S: to the C program that it should include <zlib.h>.
+?S:.
+?C:I_ZLIB:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <zlib.h>.
+?C:.
+?H:#$i_zlib I_ZLIB /**/
+?H:.
+?Y:BOTTOM
+?LINT:set i_zlib
+: see if this is a zlib.h system
+set zlib.h i_zlib
+eval $inhdr
+
diff --git a/mcon/U/ilp.U b/mcon/U/ilp.U
new file mode 100644
index 0000000..52a48a8
--- /dev/null
+++ b/mcon/U/ilp.U
@@ -0,0 +1,116 @@
+?RCS:
+?RCS: Copyright (c) 2012 Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:ilp d_ilp32 d_ilp64 d_lp64 d_can64: Assert Myread Setvar \
+ cat rm +cc +ccflags echo n c intsize longsize ptrsize
+?MAKE: -pick add $@ %<
+?S:ilp:
+?S: This variable contains the largest amount of bits that the CPU supports,
+?S: from the compiler's point of view. Typically 32 or 64.
+?S:.
+?S:d_ilp32:
+?S: This variable conditionally defines the CPU_IS_ILP32.
+?S:.
+?S:d_ilp64:
+?S: This variable conditionally defines the CPU_IS_ILP64.
+?S:.
+?S:d_lp64:
+?S: This variable conditionally defines the CPU_IS_LP64.
+?S:.
+?S:d_can64:
+?S: This variable conditionally defines CAN_HANDLE_64BITS.
+?S:.
+?C:CPU_ILP_MAXBITS:
+?C: This symbol contains the largest amount of bits that the CPU natively
+?C: supports from the compiler's point of view. Typically 32 or 64.
+?C:.
+?C:CPU_IS_ILP32:
+?C: When defined, this indicates that the integer, long and pointer variables
+?C: hold 32-bit values.
+?C:.
+?C:CPU_IS_ILP64:
+?C: When defined, this indicates that the integer, long and pointer variables
+?C: hold 64-bit values.
+?C:.
+?C:CPU_IS_LP64:
+?C: When defined, this indicates that the long and pointer variables hold
+?C: 64-bit values but integers are smaller (probably only 32-bit wide).
+?C:.
+?C:CAN_HANDLE_64BITS:
+?C: When defined, this indicates that the compiler can handle 64-bit values
+?C: despite the CPU having only 32-bit registers. These are available using
+?C: the "long long" C type. It is only defined for ILP32 machines, since
+?C: 64-bit support is naturally available on ILP64 and LP64 machines.
+?C:.
+?H:#define CPU_ILP_MAXBITS $ilp
+?H:#$d_ilp32 CPU_IS_ILP32 /**/
+?H:#$d_ilp64 CPU_IS_ILP64 /**/
+?H:#$d_lp64 CPU_IS_LP64 /**/
+?H:#$d_can64 CAN_HANDLE_64BITS /**/
+?H:.
+?LINT: set d_ilp32 d_ilp64 d_lp64 d_can64
+: check for architecture type
+echo " "
+$echo $n "Computing CPU architecture type...$c" >&4
+ilp=`expr $longsize \* 8`
+case "$ptrsize" in
+8)
+ val=$undef; set d_ilp32; eval $setvar
+ case "$intsize" in
+ 8)
+ echo " ILP64." >&4
+ val=$define; set d_ilp64; eval $setvar
+ val=$undef; set d_lp64; eval $setvar
+ ;;
+ *)
+ echo " LP64." >&4
+ val=$define; set d_lp64; eval $setvar
+ val=$undef; set d_ilp64; eval $setvar
+ ;;
+ esac
+ ;;
+*)
+ echo " ILP${ilp}." >&4
+ case "$ilp" in
+ 32) val=$define;;
+ *) val=$undef;;
+ esac
+ set d_ilp32; eval $setvar
+ val=$undef; set d_ilp64; eval $setvar
+ val=$undef; set d_lp64; eval $setvar
+ ;;
+esac
+
+@if CAN_HANDLE_64BITS || d_can64
+: see whether compiler supports 64-bit emulation
+val=$undef
+case "$ilp" in
+64) val=$define;;
+*)
+ $cat >try.c <<EOCP
+#include "static_assert.h"
+long long foo;
+int main()
+{
+ STATIC_ASSERT(8 == sizeof(foo));
+ return 0;
+}
+EOCP
+ if $cc -c $ccflags try.c >/dev/null 2>&1; then
+ echo " "
+ echo "Your compiler also supports 64-bit emulation." >&4
+ val=$define
+ fi
+ $rm -f try.*
+ ;;
+esac
+set d_can64
+eval $setvar
+
+@end
diff --git a/mcon/U/inc.U b/mcon/U/inc.U
index 5d5c829..569d783 100644
--- a/mcon/U/inc.U
+++ b/mcon/U/inc.U
@@ -1,11 +1,11 @@
-?RCS: $Id: inc.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: inc.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: inc.U,v $
@@ -20,7 +20,7 @@
?S: often a local directory such as /usr/local/include.
?S:.
?S:incexp:
-?S: This is the same as the inc variable, but is filename expaned
+?S: This is the same as the inc variable, but is filename-expanded
?S: at configuration time for convenient use in your makefiles.
?S:.
: determine where public header files go
diff --git a/mcon/U/install.U b/mcon/U/install.U
index dae29a3..dc8880c 100644
--- a/mcon/U/install.U
+++ b/mcon/U/install.U
@@ -1,11 +1,11 @@
-?RCS: $Id: install.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: install.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: install.U,v $
@@ -16,7 +16,7 @@
?RCS: patch45: created
?RCS:
?MAKE:install installdir: Loc Oldconfig Getfile cat test startsh rm +cc \
- eunicefix package contains mkdir echo n c
+ eunicefix package contains mkdir echo n c awk wc
?MAKE: -pick add $@ %<
?S:install:
?S: This variable contains the name of an install program that can accept
@@ -35,7 +35,7 @@
?S: resort, setting the variable to './install -d'. Otherwise, it is set to
?S: plain 'mkdir', and cross your fingers!
?S:.
-?T:dir file tryit prog creatdir either
+?T:dir file tryit prog creatdir either try_wc d_try_wc tryns_wc d_tryns_wc
?F:!tryinst
: locate a BSD compatible install program
echo " "
@@ -91,7 +91,12 @@ EOS
fi
@end
(ls -l d/try >try.ls; ls -l d/try.ns >tryno.ls) 2>/dev/null
- if (cmp -s d/try try && cmp -s d/try.ns try.ns && \
+ try_wc=`($wc -c try | $awk '{ print $1}') 2>/dev/null`
+ tryns_wc=`($wc -c try.ns | $awk '{ print $1}') 2>/dev/null`
+ d_try_wc=`($wc -c d/try | $awk '{ print $1}') 2>/dev/null`
+ d_tryns_wc=`($wc -c d/try.ns | $awk '{ print $1}') 2>/dev/null`
+ if ($test "X$try_wc" = "X$d_try_wc" && \
+ $test "X$tryns_wc" = "X$d_tryns_wc" && \
$contains 'rwxrw-r--' tryno.ls && \
$contains 'rw-r---w-' try.ls) >/dev/null 2>&1
then
diff --git a/mcon/U/intsize.U b/mcon/U/intsize.U
index 8f84a78..264f6b6 100644
--- a/mcon/U/intsize.U
+++ b/mcon/U/intsize.U
@@ -1,27 +1,14 @@
-?RCS: $Id: intsize.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: intsize.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
-?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, 2012 Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
-?RCS: $Log: intsize.U,v $
-?RCS: Revision 3.0.1.2 1997/02/28 15:55:26 ram
-?RCS: patch61: avoid prompting the user if the test runs ok
-?RCS: patch61: moved code from longsize.U into there
-?RCS: patch61: new tests for shortsize as well
-?RCS:
-?RCS: Revision 3.0.1.1 1994/10/29 16:21:06 ram
-?RCS: patch36: added ?F: line for metalint file checking
-?RCS:
-?RCS: Revision 3.0 1993/08/18 12:08:52 ram
-?RCS: Baseline for dist 3.0 netwide release.
-?RCS:
-?MAKE:intsize longsize shortsize: \
- Myread cat rm +cc +optimize +ccflags +ldflags +libs
+?MAKE:intsize longsize shortsize: Assert Myread cat rm +cc +ccflags echo n c
?MAKE: -pick add $@ %<
?S:intsize:
?S: This variable contains the value of the INTSIZE symbol, which
@@ -47,78 +34,56 @@
?C: This symbol contains the value of sizeof(short) so that the C
?C: preprocessor can make decisions based on it.
?C:.
-?H:#define INTSIZE $intsize /**/
-?H:#define LONGSIZE $longsize /**/
-?H:#define SHORTSIZE $shortsize /**/
+?H:#define INTSIZE $intsize
+?H:#define LONGSIZE $longsize
+?H:#define SHORTSIZE $shortsize
?H:.
-?F:!intsize.out !intsize
+?T:types t size var
+?LINT: set shortsize intsize longsize
: check for lengths of integral types
echo " "
-case "$intsize" in
-'')
- echo "Checking to see how big your integers are..." >&4
- $cat >intsize.c <<'EOCP'
-#include <stdio.h>
-int main()
-{
-@if INTSIZE || intsize
- printf("intsize=%d;\n", sizeof(int));
-@end
-@if LONGSIZE || longsize
- printf("longsize=%d;\n", sizeof(long));
-@end
+types=''
@if SHORTSIZE || shortsize
- printf("shortsize=%d;\n", sizeof(short));
+types="$types short"
@end
- fflush(stdout);
- exit(0);
-}
-EOCP
-# If $libs contains -lsfio, and sfio is mis-configured, then it
-# sometimes (apparently) runs and exits with a 0 status, but with no
-# output!. Thus we check with test -s whether we actually got any
-# output. I think it has to do with sfio's use of _exit vs. exit,
-# but I don't know for sure. --Andy Dougherty 1/27/97.
- if $cc $optimize $ccflags $ldflags -o intsize intsize.c $libs >/dev/null 2>&1 &&
- ./intsize > intsize.out 2>/dev/null && test -s intsize.out ; then
- eval `$cat intsize.out`
@if INTSIZE || intsize
- echo "Your integers are $intsize bytes long."
+types="$types int"
@end
@if LONGSIZE || longsize
- echo "Your long integers are $longsize bytes long."
-@end
-@if SHORTSIZE || shortsize
- echo "Your short integers are $shortsize bytes long."
+types="$types long"
@end
- else
- $cat >&4 <<EOM
-!
-Help! I can't compile and run the intsize test program: please enlighten me!
-(This is probably a misconfiguration in your system or libraries, and
-you really ought to fix it. Still, I'll try anyway.)
-!
-EOM
-@if INTSIZE || intsize
- dflt=4
- rp="What is the size of an integer (in bytes)?"
- . ./myread
- intsize="$ans"
-@end
-@if LONGSIZE || longsize
- dflt=$intsize
- rp="What is the size of a long integer (in bytes)?"
- . ./myread
- longsize="$ans"
-@end
-@if SHORTSIZE || shortsize
- dflt=2
- rp="What is the size of a short integer (in bytes)?"
+for t in $types; do
+ $echo $n "Checking to see how big your ${t}s are...$c" >&4
+ for size in 2 4 8 16 error; do
+ $cat >try.c <<EOCP
+#include "static_assert.h"
+$t foo;
+int main()
+{
+ STATIC_ASSERT($size == sizeof(foo));
+ return 0;
+}
+EOCP
+ if $cc -c $ccflags try.c >/dev/null 2>&1; then break; fi
+ done
+ var=${t}size
+ case "$size" in
+ error)
+ echo " cannot compute it." >&4
+ case $t in
+ short) dflt=2;;
+ int) dflt=4;;
+ long) dflt=4;;
+ esac
+ rp="What is the size of the \"$t\" type (in bytes)?"
. ./myread
- shortsize="$ans"
-@end
- fi
- ;;
-esac
-$rm -f intsize intsize.[co] intsize.out
+ eval $var="$ans"
+ ;;
+ *)
+ echo " $size bytes." >&4
+ eval $var=$size
+ ;;
+ esac
+done
+$rm -f try.*
diff --git a/mcon/U/ipc.U b/mcon/U/ipc.U
index 4a7b856..75dbe60 100644
--- a/mcon/U/ipc.U
+++ b/mcon/U/ipc.U
@@ -1,11 +1,11 @@
-?RCS: $Id: ipc.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: ipc.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: ipc.U,v $
diff --git a/mcon/U/issymlink.U b/mcon/U/issymlink.U
index 2dd27d0..2bdbb97 100644
--- a/mcon/U/issymlink.U
+++ b/mcon/U/issymlink.U
@@ -1,11 +1,11 @@
-?RCS: $Id: issymlink.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: issymlink.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
diff --git a/mcon/U/kernel.U b/mcon/U/kernel.U
index 20d7009..0ce393b 100644
--- a/mcon/U/kernel.U
+++ b/mcon/U/kernel.U
@@ -1,11 +1,11 @@
-?RCS: $Id: kernel.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: kernel.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: kernel.U,v $
diff --git a/mcon/U/lex.U b/mcon/U/lex.U
index 936990c..ed69085 100644
--- a/mcon/U/lex.U
+++ b/mcon/U/lex.U
@@ -1,14 +1,14 @@
-?RCS: $Id: lex.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: lex.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
-?RCS: Orginal Author: Graham Stoney <greyham@research.canon.oz.au>
+?RCS: Original Author: Graham Stoney <greyham@research.canon.oz.au>
?RCS:
?RCS: $Log: lex.U,v $
?RCS: Revision 3.0.1.3 1994/10/29 16:22:50 ram
diff --git a/mcon/U/lib.U b/mcon/U/lib.U
index e868a74..5da7576 100644
--- a/mcon/U/lib.U
+++ b/mcon/U/lib.U
@@ -1,11 +1,11 @@
-?RCS: $Id: lib.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: lib.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: lib.U,v $
diff --git a/mcon/U/libc.U b/mcon/U/libc.U
index b7d4757..75c6e6c 100644
--- a/mcon/U/libc.U
+++ b/mcon/U/libc.U
@@ -1,11 +1,11 @@
-?RCS: $Id: libc.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: libc.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: libc.U,v $
@@ -264,14 +264,14 @@ $echo $n ".$c"
?X:
$grep fprintf libc.tmp > libc.ptf
?X:
-?X: In order to ehance readability and save some space, we define
+?X: In order to enhance readability and save some space, we define
?X: some variables that will be "eval"ed.
?X:
xscan='eval "<libc.ptf $com >libc.list"; $echo $n ".$c" >&4'
xrun='eval "<libc.tmp $com >libc.list"; echo "done." >&4'
?X: BSD-like output, I and W types added for Linux
?X: Some versions of Linux include a leading __IO in the symbol name.
-?X: HPUX10 reportedly has trailing spaces, though I'm suprised it has
+?X: HPUX10 reportedly has trailing spaces, though I'm surprised it has
?X: BSD-like output. (AD).
xxx='[ADTSIW]'
if com="$sed -n -e 's/__IO//' -e 's/^.* $xxx *_[_.]*//p' -e 's/^.* $xxx *//p'";\
diff --git a/mcon/U/libdbm.U b/mcon/U/libdbm.U
index 1e397be..9e32bc9 100644
--- a/mcon/U/libdbm.U
+++ b/mcon/U/libdbm.U
@@ -1,11 +1,11 @@
-?RCS: $Id: libdbm.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: libdbm.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: libdbm.U,v $
diff --git a/mcon/U/libflex.U b/mcon/U/libflex.U
index 5232304..8273a53 100644
--- a/mcon/U/libflex.U
+++ b/mcon/U/libflex.U
@@ -1,11 +1,11 @@
-?RCS: $Id: libflex.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: libflex.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: libflex.U,v $
diff --git a/mcon/U/libnlist.U b/mcon/U/libnlist.U
index ac84dad..c9601ad 100644
--- a/mcon/U/libnlist.U
+++ b/mcon/U/libnlist.U
@@ -1,11 +1,11 @@
-?RCS: $Id: libnlist.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: libnlist.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: libnlist.U,v $
@@ -17,7 +17,7 @@
?RCS: Revision 3.0 1993/08/18 12:09:00 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:libnlist: Loc libpth Guess usrinc _a
+?MAKE:libnlist: Loc libpth Guess Mips usrinc _a
?MAKE: -pick add $@ %<
?S:libnlist (libmld):
?S: This variable contains the name of the library required to get the
diff --git a/mcon/U/libnm.U b/mcon/U/libnm.U
index 454ff3c..393bbc6 100644
--- a/mcon/U/libnm.U
+++ b/mcon/U/libnm.U
@@ -1,11 +1,11 @@
-?RCS: $Id: libnm.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: libnm.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: libnm.U,v $
diff --git a/mcon/U/libpth.U b/mcon/U/libpth.U
index b468243..3be640d 100644
--- a/mcon/U/libpth.U
+++ b/mcon/U/libpth.U
@@ -1,11 +1,11 @@
-?RCS: $Id: libpth.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: libpth.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: libpth.U,v $
@@ -35,7 +35,7 @@
?X: This unit initializes the path for C library lookup.
?X:
?MAKE:libpth glibpth xlibpth plibpth loclibpth: \
- usrinc incpath test cat Myread Oldconfig
+ usrinc incpath test cat Myread Oldconfig Mips
?MAKE: -pick add $@ %<
?S:libpth:
?S: This variable holds the general path (space-separated) used to find
@@ -66,8 +66,7 @@
?INIT:: change the next line if compiling for Xenix/286 on Xenix/386
?INIT:xlibpth='/usr/lib/386 /lib/386'
?INIT:: Possible local library directories to search.
-?INIT:loclibpth="/usr/local/lib /opt/local/lib /usr/gnu/lib"
-?INIT:loclibpth="$loclibpth /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib"
+?INIT:loclibpth=""
?INIT:
?INIT:: general looking path for locating libraries
?INIT:glibpth="/lib /usr/lib $xlibpth"
@@ -76,7 +75,9 @@
?X: /usr/shlib is for OSF/1 systems.
?INIT:test -f /usr/shlib/libc.so && glibpth="/usr/shlib $glibpth"
?INIT:test -f /shlib/libc.so && glibpth="/shlib $glibpth"
-?INIT:
+?X: /lib32 and /lib64 are for Linux systems running both 32- and 64-bit programs
+?X: /usr/lib/i386-linux-gnu/ is used on Debian by the libc6-dev package
+?INIT:glibpth="$glibpth /lib32 /lib64 "`ls -1d /usr/lib/*-gnu 2>/dev/null`
?INIT:: Private path used by Configure to find libraries. Its value
?INIT:: is prepended to libpth. This variable takes care of special
?INIT:: machines, like the mips. Usually, it should be empty.
diff --git a/mcon/U/libs.U b/mcon/U/libs.U
index c17bc4a..01eaa50 100644
--- a/mcon/U/libs.U
+++ b/mcon/U/libs.U
@@ -1,11 +1,11 @@
-?RCS: $Id: libs.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: libs.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: libs.U,v $
@@ -88,7 +88,7 @@
?INIT:libswanted=''
?X: This order is chosen so that libraries -lndir, -ldir, -lucb, -lbsd,
?X: -lBSD, -lPW, and -lx only get used if there are unresolved
-?X: routines at link time. Usually, these are backwards compatability
+?X: routines at link time. Usually, these are backwards compatibility
?X: libraries, and may not be as reliable as the standard c library.
?X:
?X: The -lsocket -linet -lnsl order has been reported to be necessary
@@ -127,7 +127,7 @@ case "$usesocks" in
"$define") libswanted="$libswanted socks5 socks5_sh" ;;
esac
?X: Used later for link checks
-echo "extern char printf(); int main() { printf(); return 0; }" > lt.c
+echo "extern void abort(void); int main(void) { abort(); return 0; }" > lt.c
libsfound=''
libsfiles=''
libsdirs=''
@@ -173,7 +173,7 @@ for thislib in $libswanted; do
?X:
?X: It is not sufficient to find a .so on the disk. We must make sure
?X: that we can indeed supply the -lfoo line on the cc line to link against
-?X: that library. On Linux for instance, a versionned .so will not be
+?X: that library. On Linux for instance, a versioned .so will not be
?X: implicitly linked against, whereas it will work fine on Solaris 2.6.
?X: --RAM, 10/10/2003
?X:
@@ -210,7 +210,21 @@ for thislib in $libswanted; do
fi
done
if $test ! -f "$xxx"; then
- echo "No -l$thislib."
+?X:
+?X: Try linking against the library: gcc on linux platforms is notorious for
+?X: using complex library search logic, especially on systems mixing 32-bit
+?X: and 64-bit versions.
+?X:
+ if $cc -o lt $ccflags $ldflags lt.c -l$thislib >/dev/null 2>&1
+ then
+ echo "Found -l$thislib (via $cc)."
+ case " $dflt " in
+ *"-l$thislib "*) ;;
+ *) dflt="$dflt -l$thislib";;
+ esac
+ else
+ echo "No -l$thislib."
+ fi
fi
done
set X $dflt
diff --git a/mcon/U/libyacc.U b/mcon/U/libyacc.U
index 945ea6b..b00b6d4 100644
--- a/mcon/U/libyacc.U
+++ b/mcon/U/libyacc.U
@@ -1,11 +1,11 @@
-?RCS: $Id: libyacc.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: libyacc.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: libyacc.U,v $
diff --git a/mcon/U/lintlib.U b/mcon/U/lintlib.U
index f66c13a..f6742ac 100644
--- a/mcon/U/lintlib.U
+++ b/mcon/U/lintlib.U
@@ -1,11 +1,11 @@
-?RCS: $Id: lintlib.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: lintlib.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: lintlib.U,v $
diff --git a/mcon/U/lns.U b/mcon/U/lns.U
index eb4ba48..4b37a7f 100644
--- a/mcon/U/lns.U
+++ b/mcon/U/lns.U
@@ -1,11 +1,11 @@
-?RCS: $Id: lns.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: lns.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
@@ -28,8 +28,8 @@
?S:.
: determine whether symbolic links are supported
echo " "
+$rm -f blurfl sym
$touch blurfl
-$rm -f sym
if $ln -s blurfl sym > /dev/null 2>&1 && $test -f sym; then
echo "Symbolic links are supported." >&4
lns="$ln -s"
diff --git a/mcon/U/locale.U b/mcon/U/locale.U
new file mode 100644
index 0000000..488c080
--- /dev/null
+++ b/mcon/U/locale.U
@@ -0,0 +1,70 @@
+?RCS: $Id: locale.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:locale localeexp: Getfile Loc Oldconfig Prefixit Prefixup \
+ cat prefixexp package spackage enablenls
+?MAKE: -pick add $@ %<
+?Y:TOP
+?S:locale:
+?S: This variable holds the name of the directory in which the user wants
+?S: to put locale library files for the package in question. It is most
+?S: often a local directory such as /usr/share/locale. Programs using this
+?S: variable must be prepared to deal with filename expansion.
+?S: Only meaningful when $enablenls holds true.
+?S:.
+?S:localeexp:
+?S: This variable is the same as the locale variable, but is filename expanded
+?S: at configuration time, for convenient use in your makefiles.
+?S: Only meaningful when $enablenls holds true.
+?S:.
+?C:LOCALE:
+?C: This symbol holds the place where localization files for the package
+?C: are expected to be found. Be prepared to use ~name expansion, or rely
+?C: on LOCALE_EXP to have an expanded value computed at configuration time.
+?C: Only meaningful when ENABLE_NLS is defined.
+?C:.
+?C:LOCALE_EXP:
+?C: This symbol holds the possibly ~name expanded place where localization
+?C: files for the package are expected to be found.
+?C: Only meaningful when ENABLE_NLS is defined.
+?C:.
+?H:#define LOCALE "$locale"
+?H:#define LOCALE_EXP "$localeexp"
+?H:.
+: determine where locale files go
+case "$enablenls" in
+false) ;;
+*)
+ set locale locale
+ eval $prefixit
+ case "$locale" in
+ '')
+ dflt=`./loc . "." $prefixexp/share/locale \
+ /usr/share/locale /usr/local/share/locale`
+ set dflt
+ eval $prefixup
+ ;;
+ *) dflt="$locale";;
+ esac
+ fn=d~
+ $cat <<EOM
+
+$spackage comes with a set of files holding translations for various
+languages. Those need to be installed in order for you to benefit
+from those translations and have $package localized.
+
+EOM
+ rp='Where do you want to put the localization files?'
+ . ./getfile
+ locale="$ans"
+ localeexp="$ansexp"
+ ;;
+esac
+
diff --git a/mcon/U/locdist.U b/mcon/U/locdist.U
index 011a9a8..a552a49 100644
--- a/mcon/U/locdist.U
+++ b/mcon/U/locdist.U
@@ -1,11 +1,11 @@
-?RCS: $Id: locdist.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: locdist.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: locdist.U,v $
diff --git a/mcon/U/longsize.U b/mcon/U/longsize.U
index a48837d..e54fef3 100644
--- a/mcon/U/longsize.U
+++ b/mcon/U/longsize.U
@@ -1,11 +1,11 @@
-?RCS: $Id: longsize.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: longsize.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: longsize.U,v $
diff --git a/mcon/U/lseektype.U b/mcon/U/lseektype.U
index 2c9e274..65652b7 100644
--- a/mcon/U/lseektype.U
+++ b/mcon/U/lseektype.U
@@ -1,11 +1,11 @@
-?RCS: $Id: lseektype.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: lseektype.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: lseektype.U,v $
diff --git a/mcon/U/maildir.U b/mcon/U/maildir.U
index 872ba65..c7663e9 100644
--- a/mcon/U/maildir.U
+++ b/mcon/U/maildir.U
@@ -1,11 +1,11 @@
-?RCS: $Id: maildir.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: maildir.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: maildir.U,v $
diff --git a/mcon/U/mailer.U b/mcon/U/mailer.U
index da6c9bd..e935721 100644
--- a/mcon/U/mailer.U
+++ b/mcon/U/mailer.U
@@ -1,11 +1,11 @@
-?RCS: $Id: mailer.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: mailer.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: mailer.U,v $
diff --git a/mcon/U/mailfile.U b/mcon/U/mailfile.U
index 9958818..7d28ec1 100644
--- a/mcon/U/mailfile.U
+++ b/mcon/U/mailfile.U
@@ -1,11 +1,11 @@
-?RCS: $Id: mailfile.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: mailfile.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: mailfile.U,v $
diff --git a/mcon/U/make.U b/mcon/U/make.U
index 19a559c..fb75deb 100644
--- a/mcon/U/make.U
+++ b/mcon/U/make.U
@@ -1,12 +1,12 @@
-?RCS: $Id: make.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: make.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1996, Andy Dougherty
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: make.U,v $
@@ -39,7 +39,7 @@ echo " "
echo "Checking if your $make program sets \$(MAKE)..." >&4
case "$make_set_make" in
'')
-?X: Use sed so we don't have a line begining with @echo. Metaconfig
+?X: Use sed so we don't have a line beginning with @echo. Metaconfig
?X: will think that's a command like @if or @end.
$sed 's/^X //' > testmake.mak << 'EOF'
Xall:
diff --git a/mcon/U/mallocsrc.U b/mcon/U/mallocsrc.U
index 7482df7..0ac0edb 100644
--- a/mcon/U/mallocsrc.U
+++ b/mcon/U/mallocsrc.U
@@ -1,11 +1,11 @@
-?RCS: $Id: mallocsrc.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: mallocsrc.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: mallocsrc.U,v $
@@ -21,7 +21,7 @@
?RCS:
?MAKE:mallocsrc mallocobj usemymalloc malloctype d_mymalloc \
freetype: Myread \
- Oldconfig package Guess Setvar rm cat +cc +ccflags Findhdr \
+ Oldconfig package spackage Guess Setvar rm cat +cc +ccflags Findhdr \
i_malloc i_stdlib sed libs _o ptrsize
?MAKE: -pick add $@ %<
?X: Put near top so that other tests don't erroneously include
@@ -30,7 +30,7 @@
?S:usemymalloc:
?S: This variable contains y if the malloc that comes with this package
?S: is desired over the system's version of malloc. People often include
-?S: special versions of malloc for effiency, but such versions are often
+?S: special versions of malloc for efficiency, but such versions are often
?S: less portable. See also mallocsrc and mallocobj.
?S: If this is 'y', then -lmalloc is removed from $libs.
?S:.
@@ -68,15 +68,15 @@
?H:#define Malloc_t $malloctype /**/
?H:#define Free_t $freetype /**/
?H:.
-?C:MYMALLOC:
+?C:USE_MY_MALLOC (MYMALLOC):
?C: This symbol, if defined, indicates that we're using our own malloc.
?C:.
-?H:#$d_mymalloc MYMALLOC /**/
+?H:#$d_mymalloc USE_MY_MALLOC /**/
?H:.
?LINT:change libs
?X: Cannot test for mallocsrc; it is the unit's name and there is a bug in
?X: the interpreter which defines all the names, even though they are not used.
-@if mallocobj
+@if mallocobj || USE_MY_MALLOC
: determine which malloc to compile in
echo " "
case "$usemymalloc" in
@@ -89,7 +89,17 @@ case "$usemymalloc" in
esac
;;
esac
-rp="Do you wish to attempt to use the malloc that comes with $package?"
+$cat <<EOM
+$spackage comes with its own malloc() implementation that will supersede
+the version included in your C library. Since proper memory allocation is
+critical, you may choose to opt out from this specific implementation and
+rely on the (hopefully) more thoroughly tested version in the C library.
+
+If you change your mind later, you can always re-run this configuration
+script and recompile $package from scratch.
+
+EOM
+rp="Do you wish to attempt to use the malloc() that comes with $package?"
. ./myread
usemymalloc="$ans"
case "$ans" in
@@ -100,7 +110,7 @@ y*|true)
d_mymalloc="$define"
?X: Maybe libs.U should be dependent on mallocsrc.U, but then
?X: most packages that use dist probably don't supply their own
-?X: malloc, so this is probably an o.k. comprpomise
+?X: malloc, so this is probably an o.k. compromise
case "$libs" in
*-lmalloc*)
: Remove malloc from list of libraries to use
diff --git a/mcon/U/man1dir.U b/mcon/U/man1dir.U
index 670ab43..89ad126 100644
--- a/mcon/U/man1dir.U
+++ b/mcon/U/man1dir.U
@@ -1,12 +1,12 @@
-?RCS: $Id: man1dir.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: man1dir.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1996, Andy Dougherty
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: man1dir.U,v $
diff --git a/mcon/U/man3dir.U b/mcon/U/man3dir.U
index f2f4383..68a0f76 100644
--- a/mcon/U/man3dir.U
+++ b/mcon/U/man3dir.U
@@ -1,12 +1,12 @@
-?RCS: $Id: man3dir.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: man3dir.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1996, Andy Dougherty
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: man3dir.U,v $
diff --git a/mcon/U/manfmt.U b/mcon/U/manfmt.U
index 3233d21..de2c6c8 100644
--- a/mcon/U/manfmt.U
+++ b/mcon/U/manfmt.U
@@ -1,11 +1,11 @@
-?RCS: $Id: manfmt.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: manfmt.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: manfmt.U,v $
diff --git a/mcon/U/mansrc.U b/mcon/U/mansrc.U
index 2c1dbaa..48f4ebd 100644
--- a/mcon/U/mansrc.U
+++ b/mcon/U/mansrc.U
@@ -1,11 +1,11 @@
-?RCS: $Id: mansrc.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: mansrc.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: mansrc.U,v $
diff --git a/mcon/U/mboxchar.U b/mcon/U/mboxchar.U
index 2c58dab..45e47c5 100644
--- a/mcon/U/mboxchar.U
+++ b/mcon/U/mboxchar.U
@@ -1,11 +1,11 @@
-?RCS: $Id: mboxchar.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: mboxchar.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: mboxchar.U,v $
diff --git a/mcon/U/mkdep.U b/mcon/U/mkdep.U
index 1211913..55be880 100644
--- a/mcon/U/mkdep.U
+++ b/mcon/U/mkdep.U
@@ -1,11 +1,11 @@
-?RCS: $Id: mkdep.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: mkdep.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: mkdep.U,v $
@@ -39,6 +39,8 @@
?S:.
?F:mkdep
?T:IFS arg flags takeflags srcfile toplev filebase inc dir files file dep c
+?T:tmpdir
+?LINT:extern TMPDIR
: find out how to generate dependencies
echo " "
echo "Checking how to generate makefile dependencies on your machine..." >&4
@@ -136,7 +138,7 @@ EOM
chmod +x $mkdep
$eunicefix $mkdep
if $mkdep dep.c >dep.out 2>/dev/null &&
- $contains "dep$_o: dep.h" dep.out >/dev/null 2>&1
+ $contains "dep$_o:.*dep\.h" dep.out >/dev/null 2>&1
then
echo "Looks like we can use $cc -MM."
else
@@ -200,7 +202,8 @@ do
done
set X \$files
shift
-trap "$rm -f /tmp/mkdep\$\$; exit 1" 1 2 3 15
+tmpdir="${TMPDIR:-/tmp}"
+trap "$rm -f "$tmpdir/mkdep\$\$"; exit 1" 1 2 3 15
for srcfile
do
case "\$srcfile" in
@@ -214,7 +217,7 @@ do
$sed -n -e 's/#[ ]*include[ ]*//' \\
-e '/<\(.*\)>/ d' \\
-e 's/:[^"]*"\([^"]*\)".*/: \1/' \\
- -e "s/\\.c:/$_o:/p" > /tmp/mkdep\$\$
+ -e "s/\\.c:/$_o:/p" > "$tmpdir/mkdep\$\$"
?X: Deal with directories specified via -I requests to locate files
IFS=': '
while read file dep; do
@@ -225,9 +228,9 @@ do
fi
done
echo "\$file: \$dep" | $sed -e 's,: \./,: ,'
- done </tmp/mkdep\$\$
+ done <"$tmpdir/mkdep\$\$"
IFS=' '
- $rm -f /tmp/mkdep\$\$
+ $rm -f "$tmpdir/mkdep\$\$"
done
exit 0
EOS
diff --git a/mcon/U/models.U b/mcon/U/models.U
index 35e656b..9675500 100644
--- a/mcon/U/models.U
+++ b/mcon/U/models.U
@@ -1,11 +1,11 @@
-?RCS: $Id: models.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: models.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: models.U,v $
@@ -64,11 +64,11 @@ case "$models" in
?X: We may not use Cppsym or we get a circular dependency through cc.
?X: But this should work regardless of which cc we eventually use.
$cat >pdp11.c <<'EOP'
-int main() {
+int main(void) {
#ifdef pdp11
- exit(0);
+ return 0;
#else
- exit(1);
+ return 1;
#endif
}
EOP
@@ -207,7 +207,7 @@ none)
esac
;;
*)
- ./warn "Unrecognized memory models--you may have to edit Makefile.SH"
+ ./warn "Unrecognized memory models--you may have to edit Makefile.SH" 4>&4
;;
esac
$rm -f pdp11.* pdp11
diff --git a/mcon/U/modetype.U b/mcon/U/modetype.U
index c5bb2a5..433631a 100644
--- a/mcon/U/modetype.U
+++ b/mcon/U/modetype.U
@@ -1,11 +1,11 @@
-?RCS: $Id: modetype.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: modetype.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
diff --git a/mcon/U/msgmerge_update.U b/mcon/U/msgmerge_update.U
new file mode 100644
index 0000000..3005d16
--- /dev/null
+++ b/mcon/U/msgmerge_update.U
@@ -0,0 +1,29 @@
+?RCS: $Id: msgmerge_update.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:msgmerge_update: msgmerge grep contains rm
+?MAKE: -pick add $@ %<
+?S:msgmerge_update:
+?S: The command "msgmerge --update" if supported on your system, else ":".
+?S:.
+?F:!msghelp
+: check whether msgmerge supports --update
+echo " "
+echo "Let's see whether your $msgmerge supports the --update flag..." >&4
+$msgmerge --help | $grep -- --update >msghelp
+if $contains update msghelp >/dev/null 2>&1; then
+ echo "Good, it does."
+ msgmerge_update="$msgmerge --update"
+else
+ echo "Sorry, it does not: we'll try to do without it."
+ msgmerge_update=":"
+fi
+$rm -f msghelp
+
diff --git a/mcon/U/myhostname.U b/mcon/U/myhostname.U
index 9d181a7..fd6115c 100644
--- a/mcon/U/myhostname.U
+++ b/mcon/U/myhostname.U
@@ -1,11 +1,11 @@
-?RCS: $Id: myhostname.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: myhostname.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: myhostname.U,v $
diff --git a/mcon/U/n.U b/mcon/U/n.U
index b615605..c9975e2 100644
--- a/mcon/U/n.U
+++ b/mcon/U/n.U
@@ -1,11 +1,11 @@
-?RCS: $Id: n.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: n.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: n.U,v $
diff --git a/mcon/U/nametype.U b/mcon/U/nametype.U
index 03d24f2..72e036d 100644
--- a/mcon/U/nametype.U
+++ b/mcon/U/nametype.U
@@ -1,11 +1,11 @@
-?RCS: $Id: nametype.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: nametype.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: nametype.U,v $
diff --git a/mcon/U/nblock_io.U b/mcon/U/nblock_io.U
index eb3a6a8..23ee763 100644
--- a/mcon/U/nblock_io.U
+++ b/mcon/U/nblock_io.U
@@ -1,11 +1,11 @@
-?RCS: $Id: nblock_io.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: nblock_io.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: nblock_io.U,v $
@@ -55,6 +55,12 @@
?C:VAL_EAGAIN:
?C: This symbol holds the errno error code set by read() when no data was
?C: present on the non-blocking file descriptor.
+?C:
+?C: FIXME: And who guarantees this isn't e.g. device-dependent?
+?C: If EAGAIN is defined one should expect it.
+?C: If EWOULDBLOCK is defined one should expect it.
+?C: If both are defined one should expect both.
+?C: -- cbiere, 2011-01-18
?C:.
?C:RD_NODATA:
?C: This symbol holds the return code from read() when no data is present
@@ -91,22 +97,22 @@ case "$o_nonblock" in
'')
$cat head.c > try.c
$cat >>try.c <<'EOCP'
-int main() {
+#include <stdio.h>
+int main(void) {
#ifdef O_NONBLOCK
printf("O_NONBLOCK\n");
- exit(0);
+ return 0;
#endif
#ifdef O_NDELAY
printf("O_NDELAY\n");
- exit(0);
+ return 0;
#endif
?X: Stevens "Advanced Programming in the UNIX Environment" page 364 mentions
?X: the FNDELAY symbol, used in 4.33BSD (source: Paul Marquess).
#ifdef FNDELAY
printf("FNDELAY\n");
- exit(0);
#endif
- exit(0);
+ return 0;
}
EOCP
if $cc $ccflags $ldflags -o try try.c >/dev/null 2>&1; then
@@ -132,6 +138,7 @@ case "$eagain" in
#include <errno.h>
#include <sys/types.h>
#include <signal.h>
+#include <stdlib.h>
#define MY_O_NONBLOCK $o_nonblock
extern int errno;
$signal_t blech(x) int x; { exit(3); }
@@ -184,7 +191,7 @@ int main()
close(pu[1]); /* We read from pu[0] */
read(pu[0], buf, 1); /* Wait for parent to signal us we may continue */
close(pd[1]); /* Pipe pd is now fully closed! */
- exit(0); /* Bye bye, thank you for playing! */
+ return 0; /* Bye bye, thank you for playing! */
}
EOCP
if $cc $ccflags $ldflags -o try try.c >/dev/null 2>&1; then
@@ -226,7 +233,7 @@ EOCP
esac
val="$define"
if test "$status" = "$rd_nodata"; then
- ./warn "your read() can't distinguish between EOF and no data!"
+ ./warn "your read() can't distinguish between EOF and no data!" 4>&4
val="$undef"
fi
else
diff --git a/mcon/U/newslevel.U b/mcon/U/newslevel.U
index 84b0e5e..d73bc41 100644
--- a/mcon/U/newslevel.U
+++ b/mcon/U/newslevel.U
@@ -1,11 +1,11 @@
-?RCS: $Id: newslevel.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: newslevel.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: newslevel.U,v $
diff --git a/mcon/U/newslib.U b/mcon/U/newslib.U
index 65be0ba..5b2554b 100644
--- a/mcon/U/newslib.U
+++ b/mcon/U/newslib.U
@@ -1,11 +1,11 @@
-?RCS: $Id: newslib.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: newslib.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: newslib.U,v $
diff --git a/mcon/U/newsspool.U b/mcon/U/newsspool.U
index ffd0d70..4937c2c 100644
--- a/mcon/U/newsspool.U
+++ b/mcon/U/newsspool.U
@@ -1,11 +1,11 @@
-?RCS: $Id: newsspool.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: newsspool.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: newsspool.U,v $
diff --git a/mcon/U/nis.U b/mcon/U/nis.U
index 13e103a..7ed806e 100644
--- a/mcon/U/nis.U
+++ b/mcon/U/nis.U
@@ -1,11 +1,11 @@
-?RCS: $Id: nis.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: nis.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: nis.U,v $
diff --git a/mcon/U/nlist_pfx.U b/mcon/U/nlist_pfx.U
index 7beaf6d..92ea7a9 100644
--- a/mcon/U/nlist_pfx.U
+++ b/mcon/U/nlist_pfx.U
@@ -1,11 +1,11 @@
-?RCS: $Id: nlist_pfx.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: nlist_pfx.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: nlist_pfx.U,v $
@@ -19,7 +19,7 @@
+cc +ccflags
?MAKE: -pick add $@ %<
?S:nlist_pfx:
-?S: This variable holds any characters which preceed the symbol name
+?S: This variable holds any characters which precede the symbol name
?S: when doing an nlist search.
?S:.
?S:nlist_fnd:
diff --git a/mcon/U/official.U b/mcon/U/official.U
new file mode 100644
index 0000000..7fbaa65
--- /dev/null
+++ b/mcon/U/official.U
@@ -0,0 +1,47 @@
+?RCS: $Id: official.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:official d_official: Myread Setvar Warn
+?MAKE: -pick add $@ %<
+?S:official:
+?S: This variable holds 'true' or 'false' depending on whether we're making
+?S: an "official" build. When not official, generated programs may choose
+?S: to peek within the source directory, for instance via $pkgsrc in the
+?S: shell and PACKAGE_SOURCE_DIR in C programs.
+?S:.
+?S:d_official:
+?S: This variable conditionally defines OFFICIAL_BUILD.
+?S:.
+?C:OFFICIAL_BUILD:
+?C: When defined, the build is "official". Programs generated for an
+?C: official build MUST NOT peek into the place where the sources lie, via
+?C: PACKAGE_SOURCE_DIR or any other means.
+?C:.
+?H:#$d_official OFFICIAL_BUILD /**/
+?H:.
+?Y:TOP
+?LINT:set d_official
+: determine whether this is an official build
+case "$official" in
+false)
+ official=false
+ val="$undef"
+ echo " "
+ ./warn 'This build will not be suitable for distribution.' 4>&4
+
+;;
+*)
+ val="$define"
+ official=true
+ ;;
+esac
+set d_official
+eval $setvar
+
diff --git a/mcon/U/orderlib.U b/mcon/U/orderlib.U
index b18fa6c..3c05f3c 100644
--- a/mcon/U/orderlib.U
+++ b/mcon/U/orderlib.U
@@ -1,11 +1,11 @@
-?RCS: $Id: orderlib.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: orderlib.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: orderlib.U,v $
@@ -51,7 +51,7 @@ echo "Checking how to generate random libraries on your machine..." >&4
echo 'int bar1() { return bar2(); }' > bar1.c
echo 'int bar2() { return 2; }' > bar2.c
$cat > foo.c <<'EOP'
-int main() { printf("%d\n", bar1()); exit(0); }
+int main() { printf("%d\n", bar1()); return 0; }
EOP
$cc $ccflags -c bar1.c >/dev/null 2>&1
$cc $ccflags -c bar2.c >/dev/null 2>&1
diff --git a/mcon/U/orgname.U b/mcon/U/orgname.U
index e7a8ed5..0485c60 100644
--- a/mcon/U/orgname.U
+++ b/mcon/U/orgname.U
@@ -1,11 +1,11 @@
-?RCS: $Id: orgname.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: orgname.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: orgname.U,v $
diff --git a/mcon/U/packadmin.U b/mcon/U/packadmin.U
index 9ecebaf..8cae5b1 100644
--- a/mcon/U/packadmin.U
+++ b/mcon/U/packadmin.U
@@ -1,12 +1,12 @@
-?RCS: $Id: packadmin.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: packadmin.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1996, Andy Dougherty
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?MAKE:packadmin: cf_email Oldconfig Myread cat spackage package
diff --git a/mcon/U/package.U b/mcon/U/package.U
index 5fb3737..3d7f4ae 100644
--- a/mcon/U/package.U
+++ b/mcon/U/package.U
@@ -1,11 +1,11 @@
-?RCS: $Id: package.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: package.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: package.U,v $
diff --git a/mcon/U/pager.U b/mcon/U/pager.U
index 92bbafc..6a64855 100644
--- a/mcon/U/pager.U
+++ b/mcon/U/pager.U
@@ -1,11 +1,11 @@
-?RCS: $Id: pager.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: pager.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: pager.U,v $
diff --git a/mcon/U/patchlevel.U b/mcon/U/patchlevel.U
index cbbc704..4c63586 100644
--- a/mcon/U/patchlevel.U
+++ b/mcon/U/patchlevel.U
@@ -1,11 +1,11 @@
-?RCS: $Id: patchlevel.U 25 2008-05-28 11:19:25Z rmanfredi $
+?RCS: $Id: patchlevel.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: patchlevel.U,v $
@@ -17,6 +17,7 @@
?RCS:
?MAKE:patchlevel revision: package baserev test rsrc
?MAKE: -pick add $@ %<
+?T:Revision
?S:patchlevel:
?S: The patchlevel level of this package.
?S: The value of patchlevel comes from the patchlevel.h file.
@@ -36,10 +37,23 @@ if $test -r $rsrc/patchlevel.h;then
else
patchlevel=0
fi
+?X:
+?X: Can handle either one of:
+?X:
+?X: #define REVISION word
+?X: #define REVISION "$Revision: 167 $"
+?X:
if $test -r $rsrc/revision.h;then
revision=`awk \
'/^#[ ]*define[ ][ ]*REVISION/ {print $3}' \
< $rsrc/revision.h`
+ case "$revision" in
+ '"$Revision:')
+ revision=`awk \
+ '/^#[ ]*define[ ][ ]*REVISION/ {print $4}' \
+ < $rsrc/revision.h`
+ ;;
+ esac
else
revision=0
fi
diff --git a/mcon/U/perlpath.U b/mcon/U/perlpath.U
index 0f99063..06e014e 100644
--- a/mcon/U/perlpath.U
+++ b/mcon/U/perlpath.U
@@ -1,11 +1,11 @@
-?RCS: $Id: perlpath.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: perlpath.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: perlpath.U,v $
@@ -26,10 +26,10 @@
?Y:TOP
?S:perlpath:
?S: This variable contains the eventual value of the PERLPATH symbol,
-?S: which contains the absolute location of the perl interpeter.
+?S: which contains the absolute location of the perl interpreter.
?S:.
?C:PERLPATH:
-?C: This symbol contains the absolute location of the perl interpeter.
+?C: This symbol contains the absolute location of the perl interpreter.
?C:.
?H:#define PERLPATH "$perlpath" /**/
?H:.
diff --git a/mcon/U/pidtype.U b/mcon/U/pidtype.U
index 39c2106..e7d51bd 100644
--- a/mcon/U/pidtype.U
+++ b/mcon/U/pidtype.U
@@ -1,11 +1,11 @@
-?RCS: $Id: pidtype.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: pidtype.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: pidtype.U,v $
diff --git a/mcon/U/pkgsrc.U b/mcon/U/pkgsrc.U
index 0ec7b18..8f70aa3 100644
--- a/mcon/U/pkgsrc.U
+++ b/mcon/U/pkgsrc.U
@@ -1,11 +1,11 @@
-?RCS: $Id: pkgsrc.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: pkgsrc.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?MAKE:pkgsrc: src rsrc
diff --git a/mcon/U/prefix.U b/mcon/U/prefix.U
index 4277f2f..305030e 100644
--- a/mcon/U/prefix.U
+++ b/mcon/U/prefix.U
@@ -1,11 +1,11 @@
-?RCS: $Id: prefix.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: prefix.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
diff --git a/mcon/U/prefshell.U b/mcon/U/prefshell.U
index 9397752..99434f4 100644
--- a/mcon/U/prefshell.U
+++ b/mcon/U/prefshell.U
@@ -1,11 +1,11 @@
-?RCS: $Id: prefshell.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: prefshell.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: prefshell.U,v $
diff --git a/mcon/U/privlib.U b/mcon/U/privlib.U
index 34822df..0b2dcc4 100644
--- a/mcon/U/privlib.U
+++ b/mcon/U/privlib.U
@@ -1,11 +1,11 @@
-?RCS: $Id: privlib.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: privlib.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: privlib.U,v $
diff --git a/mcon/U/prototype.U b/mcon/U/prototype.U
index 294591d..ea11dbc 100644
--- a/mcon/U/prototype.U
+++ b/mcon/U/prototype.U
@@ -1,11 +1,11 @@
-?RCS: $Id: prototype.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: prototype.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: prototype.U,v $
@@ -25,7 +25,7 @@
?MAKE: -pick add $@ %<
?S:prototype:
?S: This variable holds the eventual value of CAN_PROTOTYPE, which
-?S: indicates the C compiler can handle funciton prototypes.
+?S: indicates the C compiler can handle function prototypes.
?S:.
?C:CAN_PROTOTYPE ~ %<:
?C: If defined, this macro indicates that the C compiler can handle
@@ -102,10 +102,9 @@
echo " "
echo "Checking out function prototypes..." >&4
$cat >prototype.c <<'EOCP'
-int main(int argc, char *argv[]) {
- exit(0);}
+int main(int argc, char *argv[]) { (void) argc; (void) argv; return 0; }
EOCP
-if $cc $ccflags -c prototype.c >prototype.out 2>&1 ; then
+if $cc $ccflags -c prototype.c; then
echo "Your C compiler appears to support function prototypes."
val="$define"
else
diff --git a/mcon/U/ptrsize.U b/mcon/U/ptrsize.U
index abfa17d..24a733b 100644
--- a/mcon/U/ptrsize.U
+++ b/mcon/U/ptrsize.U
@@ -1,21 +1,14 @@
-?RCS: $Id: ptrsize.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: ptrsize.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
-?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS: Copyright (c) 1991-1997, 2004-2006, 2012 Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
-?RCS: $Log: ptrsize.U,v $
-?RCS: Revision 3.0.1.1 1994/10/29 16:28:19 ram
-?RCS: patch36: added ?F: line for metalint file checking
-?RCS:
-?RCS: Revision 3.0 1993/08/18 12:09:37 ram
-?RCS: Baseline for dist 3.0 netwide release.
-?RCS:
-?MAKE:ptrsize: cat rm Myread +cc +ccflags
+?MAKE:ptrsize: Assert Myread cat rm +cc +ccflags echo n c
?MAKE: -pick add $@ %<
?S:ptrsize:
?S: This variable contains the value of the PTRSIZE symbol, which
@@ -25,34 +18,36 @@
?C: This symbol contains the size of a pointer, so that the C preprocessor
?C: can make decisions based on it.
?C:.
-?H:#define PTRSIZE $ptrsize /**/
+?H:#define PTRSIZE $ptrsize
?H:.
-?F:!try
+?T:size
: check for length of pointer
echo " "
-case "$ptrsize" in
-'')
- echo "Checking to see how big your pointers are..." >&4
- $cat >try.c <<'EOCP'
-#include <stdio.h>
+$echo $n "Checking to see how big your pointers are...$c" >&4
+for size in 2 4 8 16 error; do
+ $cat >try.c <<EOCP
+#include "static_assert.h"
+char *foo;
int main()
{
- printf("%d\n", sizeof(char *));
+ STATIC_ASSERT($size == sizeof(foo));
+ return 0;
}
EOCP
- if $cc $ccflags -o try try.c >/dev/null 2>&1 ; then
- dflt=`./try`
- else
- dflt='4'
- echo "(I can't seem to compile the test program. Guessing...)"
- fi
+ if $cc -c $ccflags try.c >/dev/null 2>&1; then break; fi
+done
+case "$size" in
+error)
+ echo " cannot compute it." >&4
+ dflt=4
+ rp="What is the size of a pointer type (in bytes)?"
+ . ./myread
+ ptrsize="$ans"
;;
*)
- dflt="$ptrsize"
+ echo " $size bytes." >&4
+ ptrsize=$size
;;
esac
-rp="What is the size of a pointer (in bytes)?"
-. ./myread
-ptrsize="$ans"
-$rm -f try.c try
+$rm -f try.*
diff --git a/mcon/U/randbits.U b/mcon/U/randbits.U
index e5d0f48..bbcd0f5 100644
--- a/mcon/U/randbits.U
+++ b/mcon/U/randbits.U
@@ -1,11 +1,11 @@
-?RCS: $Id: randbits.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: randbits.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: randbits.U,v $
diff --git a/mcon/U/randfunc.U b/mcon/U/randfunc.U
index 2cf127e..731c915 100644
--- a/mcon/U/randfunc.U
+++ b/mcon/U/randfunc.U
@@ -1,11 +1,11 @@
-?RCS: $Id: randfunc.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: randfunc.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: randfunc.U,v $
diff --git a/mcon/U/rcs_branch.U b/mcon/U/rcs_branch.U
index 6f3627a..b387fea 100644
--- a/mcon/U/rcs_branch.U
+++ b/mcon/U/rcs_branch.U
@@ -1,11 +1,11 @@
-?RCS: $Id: rcs_branch.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: rcs_branch.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: rcs_branch.U,v $
diff --git a/mcon/U/registers.U b/mcon/U/registers.U
index 3ec71d0..29a1d5d 100644
--- a/mcon/U/registers.U
+++ b/mcon/U/registers.U
@@ -1,11 +1,11 @@
-?RCS: $Id: registers.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: registers.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: registers.U,v $
diff --git a/mcon/U/rootid.U b/mcon/U/rootid.U
index ec575b0..872fc9c 100644
--- a/mcon/U/rootid.U
+++ b/mcon/U/rootid.U
@@ -1,11 +1,11 @@
-?RCS: $Id: rootid.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: rootid.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: rootid.U,v $
diff --git a/mcon/U/sbrksmart.U b/mcon/U/sbrksmart.U
index 3d039fc..40ed078 100644
--- a/mcon/U/sbrksmart.U
+++ b/mcon/U/sbrksmart.U
@@ -1,11 +1,11 @@
-?RCS: $Id: sbrksmart.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: sbrksmart.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: sbrksmart.U,v $
@@ -37,7 +37,7 @@ echo " "
case "$d_sbrk" in
"$define")
echo "Let's see if your sbrk() is smart enough to release core..." >&4
- $cat > sbrk.c <<'EOC'
+ $cat > sbrk.c <<EOC
#define INC 256 /* Small enough to be less than a page size */
int main()
diff --git a/mcon/U/sbrktype.U b/mcon/U/sbrktype.U
index 088eb39..dd30b14 100644
--- a/mcon/U/sbrktype.U
+++ b/mcon/U/sbrktype.U
@@ -1,11 +1,11 @@
-?RCS: $Id: sbrktype.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: sbrktype.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: sbrktype.U,v $
diff --git a/mcon/U/scriptdir.U b/mcon/U/scriptdir.U
index 760d507..63b27ef 100644
--- a/mcon/U/scriptdir.U
+++ b/mcon/U/scriptdir.U
@@ -1,11 +1,11 @@
-?RCS: $Id: scriptdir.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: scriptdir.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: scriptdir.U,v $
diff --git a/mcon/U/selecttype.U b/mcon/U/selecttype.U
index ac76bb5..843dd36 100644
--- a/mcon/U/selecttype.U
+++ b/mcon/U/selecttype.U
@@ -1,11 +1,11 @@
-?RCS: $Id: selecttype.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: selecttype.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
@@ -21,7 +21,7 @@
?RCS: patch30: created by ADO
?RCS:
?MAKE:selecttype: cat +cc +ccflags rm Oldconfig Myread \
- d_fd_set d_select d_socket i_systime i_sysselct
+ d_fd_set d_select d_socket i_systime i_sysselct i_winsock2 i_syssock
?MAKE: -pick add $@ %<
?S:selecttype:
?S: This variable holds the type used for the 2nd, 3rd, and 4th
@@ -67,17 +67,24 @@ EOM
$cat >try.c <<EOCP
#$i_systime I_SYS_TIME
#$i_sysselct I_SYS_SELECT
+#$i_syssock I_SYS_SOCKET
+#$i_winsock2 I_WINSOCK2
#$d_socket HAS_SOCKET
#include <sys/types.h>
#ifdef HAS_SOCKET
+#ifdef I_SYS_SOCKET
#include <sys/socket.h> /* Might include <sys/bsdtypes.h> */
#endif
+#endif
#ifdef I_SYS_TIME
#include <sys/time.h>
#endif
#ifdef I_SYS_SELECT
#include <sys/select.h>
#endif
+#ifdef I_WINSOCK2
+#include <Winsock2.h>
+#endif
int main()
{
int width;
diff --git a/mcon/U/sh.U b/mcon/U/sh.U
index 66b87c2..9684c6f 100644
--- a/mcon/U/sh.U
+++ b/mcon/U/sh.U
@@ -1,12 +1,12 @@
-?RCS: $Id: sh.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: sh.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1997, Chip Salzenberg
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: sh.U,v $
@@ -66,10 +66,10 @@ case "$sh" in
sh="$xxx"
break
elif test -f "$xxx$_exe"; then
- sh="$xxx"
+ sh="$xxx$_exe"
break
elif test -f "$xxx.exe"; then
- sh="$xxx"
+ sh="$xxx.exe"
break
fi
done
diff --git a/mcon/U/shm_for.U b/mcon/U/shm_for.U
index 9c99f23..5461257 100644
--- a/mcon/U/shm_for.U
+++ b/mcon/U/shm_for.U
@@ -1,11 +1,11 @@
-?RCS: $Id: shm_for.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: shm_for.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: shm_for.U,v $
diff --git a/mcon/U/sig_name.U b/mcon/U/sig_name.U
index 4134c04..fd0edd7 100644
--- a/mcon/U/sig_name.U
+++ b/mcon/U/sig_name.U
@@ -1,11 +1,11 @@
-?RCS: $Id: sig_name.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: sig_name.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: sig_name.U,v $
diff --git a/mcon/U/sitearch.U b/mcon/U/sitearch.U
index ea8ea84..21f5cc0 100644
--- a/mcon/U/sitearch.U
+++ b/mcon/U/sitearch.U
@@ -1,12 +1,12 @@
-?RCS: $Id: sitearch.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: sitearch.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1996, Andy Dougherty
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: sitearch.U,v $
@@ -51,7 +51,7 @@
?T:xxx
: determine where site specific architecture-dependent libraries go.
xxx=`echo $sitelib/$archname | sed 's!^$prefix!!'`
-: xxx is usuually lib/site_perl/archname.
+: xxx is usually lib/site_perl/archname.
set sitearch sitearch none
eval $prefixit
case "$sitearch" in
diff --git a/mcon/U/sitelib.U b/mcon/U/sitelib.U
index 2b43879..421be97 100644
--- a/mcon/U/sitelib.U
+++ b/mcon/U/sitelib.U
@@ -1,12 +1,12 @@
-?RCS: $Id: sitelib.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: sitelib.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1996, Andy Dougherty
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: sitelib.U,v $
@@ -54,7 +54,7 @@ set sitelib sitelib
eval $prefixit
case "$sitelib" in
'')
-?X: remove any trailing -3.0 or other version indification
+?X: remove any trailing -3.0 or other version indentification
prog=`echo $package | $sed 's/-*[0-9.]*$//'`
dflt="$privlib/site_$prog" ;;
*) dflt="$sitelib" ;;
diff --git a/mcon/U/sizetype.U b/mcon/U/sizetype.U
index a5a4cb9..bc6850d 100644
--- a/mcon/U/sizetype.U
+++ b/mcon/U/sizetype.U
@@ -1,11 +1,11 @@
-?RCS: $Id: sizetype.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: sizetype.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
diff --git a/mcon/U/so.U b/mcon/U/so.U
index 55988d9..79aa7da 100644
--- a/mcon/U/so.U
+++ b/mcon/U/so.U
@@ -1,11 +1,11 @@
-?RCS: $Id: so.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: so.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: so.U,v $
diff --git a/mcon/U/sockopt.U b/mcon/U/sockopt.U
index efebce7..5dffa21 100644
--- a/mcon/U/sockopt.U
+++ b/mcon/U/sockopt.U
@@ -1,11 +1,11 @@
-?RCS: $Id: sockopt.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: sockopt.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: sockopt.U,v $
diff --git a/mcon/U/spitshell.U b/mcon/U/spitshell.U
index cd72ed4..4060b08 100644
--- a/mcon/U/spitshell.U
+++ b/mcon/U/spitshell.U
@@ -1,11 +1,11 @@
-?RCS: $Id: spitshell.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: spitshell.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: spitshell.U,v $
diff --git a/mcon/U/src.U b/mcon/U/src.U
index 10966b5..4ede800 100644
--- a/mcon/U/src.U
+++ b/mcon/U/src.U
@@ -1,12 +1,12 @@
-?RCS: $Id: src.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: src.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1996, Cygnus Support
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Tom Tromey <tromey@cygnus.com>
@@ -47,7 +47,7 @@ case "$src" in
esac
?X:
?X: Now check whether we have found the right source tree (i.e. the one for the
-?X: package we're abount to configure). The original unit from Tom Tromey forced
+?X: package we're about to configure). The original unit from Tom Tromey forced
?X: the user to pick a unique file from his distribution, and we were merely
?X: checking the existence of that file. I prefer to rely on Configure (which
?X: we know *is* present since this unit is part of it!) and look for the
diff --git a/mcon/U/ssizetype.U b/mcon/U/ssizetype.U
index fe32347..36f4a40 100644
--- a/mcon/U/ssizetype.U
+++ b/mcon/U/ssizetype.U
@@ -1,11 +1,11 @@
-?RCS: $Id: ssizetype.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: ssizetype.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
diff --git a/mcon/U/startperl.U b/mcon/U/startperl.U
index 3efe2be..431c1a9 100644
--- a/mcon/U/startperl.U
+++ b/mcon/U/startperl.U
@@ -1,11 +1,11 @@
-?RCS: $Id: startperl.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: startperl.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: startperl.U,v $
@@ -25,7 +25,7 @@
?S: eval 'exec perl -S $0 ${1+"$@"}'
?S: if $running_under_some_shell;
?S: to guarantee perl startup should the shell execute the script. Note
-?S: that this magic incatation is not understood by csh.
+?S: that this magic incantation is not understood by csh.
?S:.
?C:STARTPERL:
?C: This symbol is the string that should be put on the front of a
diff --git a/mcon/U/startsh.U b/mcon/U/startsh.U
index f082a05..0e3c7ed 100644
--- a/mcon/U/startsh.U
+++ b/mcon/U/startsh.U
@@ -1,11 +1,11 @@
-?RCS: $Id: startsh.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: startsh.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: startsh.U,v $
diff --git a/mcon/U/stdchar.U b/mcon/U/stdchar.U
index b7ac0e3..c1d41d1 100644
--- a/mcon/U/stdchar.U
+++ b/mcon/U/stdchar.U
@@ -1,11 +1,11 @@
-?RCS: $Id: stdchar.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: stdchar.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: stdchar.U,v $
diff --git a/mcon/U/sunscanf.U b/mcon/U/sunscanf.U
index e2c739f..7ae2001 100644
--- a/mcon/U/sunscanf.U
+++ b/mcon/U/sunscanf.U
@@ -1,11 +1,11 @@
-?RCS: $Id: sunscanf.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: sunscanf.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: sunscanf.U,v $
diff --git a/mcon/U/sysman.U b/mcon/U/sysman.U
index d319c74..5c38d0b 100644
--- a/mcon/U/sysman.U
+++ b/mcon/U/sysman.U
@@ -1,11 +1,11 @@
-?RCS: $Id: sysman.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: sysman.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: sysman.U,v $
diff --git a/mcon/U/trnl.U b/mcon/U/trnl.U
index 060ca82..b6fcc15 100644
--- a/mcon/U/trnl.U
+++ b/mcon/U/trnl.U
@@ -1,11 +1,11 @@
-?RCS: $Id: trnl.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: trnl.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Copyright (c) 1998 Andy Dougherty
@@ -23,7 +23,6 @@
?S:.
?T: DJGPP
: Find the appropriate value for a newline for tr
-echo " "
?X: We can't use $tr since that would cause a circular dependency via Myread
?X: dos djgpp uses '\015\012', but reportedly is happy with '\012' in the
?X: tr command. I don't know why it passes the '\n' test but later
@@ -53,7 +52,5 @@ $me: Fatal Error: cannot figure out how to translate newlines with 'tr'.
EOM
exit 1
-else
- echo "We'll use '$trnl' to transliterate a newline."
fi
diff --git a/mcon/U/uidtype.U b/mcon/U/uidtype.U
index 6ac71ec..f34e581 100644
--- a/mcon/U/uidtype.U
+++ b/mcon/U/uidtype.U
@@ -1,11 +1,11 @@
-?RCS: $Id: uidtype.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: uidtype.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: uidtype.U,v $
@@ -16,7 +16,7 @@
?RCS: patch30: comment for uidtype referred to the obsoleted symbol
?RCS:
?RCS: Revision 3.0.1.1 1994/05/13 15:28:27 ram
-?RCS: patch27: made conformant to its gidtype.U companion
+?RCS: patch27: made conform to its gidtype.U companion
?RCS: patch27: question now explicitely mentions getuid()
?RCS:
?RCS: Revision 3.0 1993/08/18 12:09:56 ram
diff --git a/mcon/U/usenm.U b/mcon/U/usenm.U
index 887d74f..059f0f9 100644
--- a/mcon/U/usenm.U
+++ b/mcon/U/usenm.U
@@ -1,11 +1,11 @@
-?RCS: $Id: usenm.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: usenm.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: usenm.U,v $
@@ -40,7 +40,7 @@
?S: Maybe Linux should just always set usenm=false.
?S:.
: see if nm is to be used to determine whether a symbol is defined or not
-?X: If there is enough enquiries, it might be worth to wait for the nm
+?X: If there is enough inquiries, it might be worth to wait for the nm
?X: extraction. Otherwise, the C compilations might be a better deal.
?X:
?X: Don't bother if we're using GNU libc -- skimo
diff --git a/mcon/U/usesocks.U b/mcon/U/usesocks.U
index 508b809..16fb48c 100644
--- a/mcon/U/usesocks.U
+++ b/mcon/U/usesocks.U
@@ -1,11 +1,11 @@
-?RCS: $Id: usesocks.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: usesocks.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: Copyright (c) 1999 Jarkko Hietaniemi
diff --git a/mcon/U/usrinc.U b/mcon/U/usrinc.U
index a599cca..157e25c 100644
--- a/mcon/U/usrinc.U
+++ b/mcon/U/usrinc.U
@@ -1,11 +1,11 @@
-?RCS: $Id: usrinc.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: usrinc.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: usrinc.U,v $
@@ -16,78 +16,39 @@
?RCS: patch54: ensure that ./mips always exists (ADO)
?RCS:
?RCS: Revision 3.0.1.1 1994/05/06 15:18:31 ram
-?RCS: patch23: ensure usrinc value is preserved accross sessions (WED)
+?RCS: patch23: ensure usrinc value is preserved across sessions (WED)
?RCS:
?RCS: Revision 3.0 1993/08/18 12:09:58 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:usrinc incpath mips_type: test cat echo n c Getfile Guess \
- Oldconfig eunicefix contains rm
+?MAKE:usrinc: Getfile Oldconfig incpath
?MAKE: -pick add $@ %<
?S:usrinc:
?S: This variable holds the path of the include files, which is
?S: usually /usr/include. It is mainly used by other Configure units.
?S:.
-?S:incpath:
-?S: This variable must preceed the normal include path to get hte
-?S: right one, as in "$incpath/usr/include" or "$incpath/usr/lib".
-?S: Value can be "" or "/bsd43" on mips.
-?S:.
-?S:mips_type:
-?S: This variable holds the environment type for the mips system.
-?S: Possible values are "BSD 4.3" and "System V".
-?S:.
?D:usrinc='/usr/include'
-?LINT:create mips
-?T:xxx_prompt
-?F:./mips
: What should the include directory be ?
echo " "
-$echo $n "Hmm... $c"
dflt='/usr/include'
-incpath=''
-?X: mips_type is used later, to add -DSYSTYPE_BSD43 to cppflags if needed.
-mips_type=''
-?X:
-?X: Cannot put the following in Guess, or we get a circular dependency.
-?X:
-if $test -f /bin/mips && /bin/mips; then
- echo "Looks like a MIPS system..."
- $cat >usr.c <<'EOCP'
-#ifdef SYSTYPE_BSD43
-/bsd43
-#endif
-EOCP
- if cc -E usr.c > usr.out && $contains / usr.out >/dev/null 2>&1; then
- dflt='/bsd43/usr/include'
- incpath='/bsd43'
- mips_type='BSD 4.3'
- else
- mips_type='System V'
- fi
- $rm -f usr.c usr.out
- echo "and you're compiling with the $mips_type compiler and libraries."
- xxx_prompt=y
- echo "exit 0" >mips
-else
- echo "Doesn't look like a MIPS system."
- xxx_prompt=n
- echo "exit 1" >mips
-fi
-chmod +x mips
-$eunicefix mips
case "$usrinc" in
-'') ;;
+'') dflt="$incpath/usr/include";;
+?X: This is nice, but it does not work on some systems because gcc redirects
+?X: the include to things like ..../gcc45/gcc/4.5.2/include-fixed/stdio.h
+?X: and it does not contain all the files.
+?X:
+?X: $cat >usr.c <<EOC
+?X: #include <stdio.h>
+?X:EOC
+?X: dflt=`$cppstdin $cppminus < usr.c 2>/dev/null | \
+?X: $grep "^[ ]*#.*stdio.h" | $tr -d '"' | \
+?X: $sed -ne "1s,\(.*\)[/\\]stdio.h.*,\1,p" | \
+?X: $awk "{ print \\$$fieldn }"`
+?X: ;;
*) dflt="$usrinc";;
esac
-case "$xxx_prompt" in
-y) fn=d/
- echo " "
- rp='Where are the include files you want to use?'
- . ./getfile
- usrinc="$ans"
- ;;
-*) usrinc="$dflt"
- ;;
-esac
+fn=d/
+rp='Where are the include files you want to use?'
+. ./getfile
+usrinc="$ans"
diff --git a/mcon/U/vaproto.U b/mcon/U/vaproto.U
index e38f4d4..2080fa2 100644
--- a/mcon/U/vaproto.U
+++ b/mcon/U/vaproto.U
@@ -1,14 +1,14 @@
-?RCS: $Id: vaproto.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: vaproto.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
-?RCS: Orginal Author: Graham Stoney <greyham@research.canon.oz.au>
+?RCS: Original Author: Graham Stoney <greyham@research.canon.oz.au>
?RCS:
?RCS: $Log: vaproto.U,v $
?RCS: Revision 3.0.1.1 1994/01/24 14:17:16 ram
diff --git a/mcon/U/voidflags.U b/mcon/U/voidflags.U
index a660b00..e970bfc 100644
--- a/mcon/U/voidflags.U
+++ b/mcon/U/voidflags.U
@@ -1,11 +1,11 @@
-?RCS: $Id: voidflags.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: voidflags.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: voidflags.U,v $
@@ -78,6 +78,7 @@ EOM
case "$voidflags" in
'')
$cat >try.c <<'EOCP'
+extern int doit();
#if TRY & 1
void sub() {
#else
@@ -85,21 +86,34 @@ sub() {
#endif
extern void moo(); /* function returning void */
void (*goo)(); /* ptr to func returning void */
+#if TRY & 2
+ static void (*foo[10])();
+#endif
#if TRY & 8
- void *hue; /* generic ptr */
+ void *hue; /* generic ptr */
+ char buf[] = "buf";
+ int *iptr;
#endif
+
#if TRY & 2
- void (*foo[10])();
+ if (doit()) {
+ foo[0] = moo;
+ (*foo[0])();
+ }
#endif
-
#if TRY & 4
- if(goo == moo) {
- exit(0);
- }
+ if (doit())
+ goo = moo;
+ if (goo == moo)
+ doit();
+#endif
+#if TRY & 8
+ hue = buf;
+ if (doit())
+ iptr = hue;
#endif
- exit(0);
+ doit();
}
-int main() { sub(); }
EOCP
?X: This unit used to use cc -S in those tests to try to speed up things, but
?X: unfortunately, AIX 3.2 does not support this option.
@@ -153,9 +167,7 @@ echo "Hmm, your compiler has some difficulty with void. Checking further..." >&4
esac
?X: Only prompt user if support does not match the level we want
case "$voidflags" in
-"$defvoidused")
- echo "Good. I already know it supports void to the level $package wants."
- ;;
+"$defvoidused") ;;
*)
dflt="$voidflags";
test -f flags && $cat flags
diff --git a/mcon/U/warnflags.U b/mcon/U/warnflags.U
index e819556..128cf82 100644
--- a/mcon/U/warnflags.U
+++ b/mcon/U/warnflags.U
@@ -1,14 +1,14 @@
-?RCS: $Id: warnflags.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: warnflags.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
-?RCS: Orginal Author: Graham Stoney <greyham@research.canon.oz.au>
+?RCS: Original Author: Graham Stoney <greyham@research.canon.oz.au>
?RCS:
?RCS: $Log: warnflags.U,v $
?RCS: Revision 3.0 1993/08/18 12:10:02 ram
diff --git a/mcon/U/yacc.U b/mcon/U/yacc.U
index 61cc55a..63a4678 100644
--- a/mcon/U/yacc.U
+++ b/mcon/U/yacc.U
@@ -1,11 +1,11 @@
-?RCS: $Id: yacc.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: yacc.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: yacc.U,v $
@@ -29,20 +29,20 @@
: determine compiler compiler
echo " "
comp='yacc'
-if $test -f "$byacc$_exe"; then
+if $test -f "$byacc"; then
comp="byacc or $comp"
fi
-if $test -f "$bison$_exe"; then
+if $test -f "$bison"; then
comp="$comp or bison -y"
fi
case "$yacc" in
'')
yacc=`./loc yacc yacc $pth`
- if $test -f "$yacc$_exe"; then
+ if $test -f "$yacc"; then
dflt='yacc'
- elif $test -f "$byacc$_exe"; then
+ elif $test -f "$byacc"; then
dflt='byacc'
- elif $test -f "$bison$_exe"; then
+ elif $test -f "$bison"; then
dflt='bison'
else
dflt=''
diff --git a/mcon/mconfig.SH b/mcon/mconfig.SH
index 2cc27c6..8fca79b 100755
--- a/mcon/mconfig.SH
+++ b/mcon/mconfig.SH
@@ -11,6 +11,7 @@ case $CONFIG in
. $TOP/config.sh
;;
esac
+REVISION=`grep REVISION $TOP/revision.h | head -n1 | cut -d' ' -f4`
case "$0" in
*/*) cd `expr X$0 : 'X\(.*\)/'` ;;
esac
@@ -20,7 +21,7 @@ $startperl
eval 'exec perl -S \$0 \${1+"\$@"}'
if \$running_under_some_shell;
-# $Id: mconfig.SH 25 2008-05-28 11:19:25Z rmanfredi $
+# $Id: mconfig.SH 114 2012-01-28 13:01:37Z rmanfredi $
#
# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
#
@@ -65,8 +66,9 @@ $startperl
$spitshell >>mconfig <<'!NO!SUBS!'
chop($date = `date`);
&profile; # Read ~/.dist_profile
-require 'getopts.pl';
-&usage unless &Getopts("dhkmostvwGMVL:");
+
+use Getopt::Std;
+&usage unless getopts("dhkmostvwGMVL:");
$MC = $opt_L if $opt_L; # May override public library path
$MC = &tilda_expand($MC); # ~name expansion
diff --git a/mcon/mlint.SH b/mcon/mlint.SH
index 4a618b1..e90ea52 100755
--- a/mcon/mlint.SH
+++ b/mcon/mlint.SH
@@ -11,6 +11,7 @@ case $CONFIG in
. $TOP/config.sh
;;
esac
+REVISION=`grep REVISION $TOP/revision.h | head -n1 | cut -d' ' -f4`
case "$0" in
*/*) cd `expr X$0 : 'X\(.*\)/'` ;;
esac
@@ -20,7 +21,7 @@ $startperl
eval 'exec perl -S \$0 \${1+"\$@"}'
if \$running_under_some_shell;
-# $Id: mlint.SH 25 2008-05-28 11:19:25Z rmanfredi $
+# $Id: mlint.SH 114 2012-01-28 13:01:37Z rmanfredi $
#
# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
#
@@ -57,8 +58,9 @@ $startperl
$spitshell >>mlint <<'!NO!SUBS!'
&profile; # Read ~/.dist_profile
-require 'getopts.pl';
-&usage unless &Getopts("hklVL:");
+
+use Getopt::Std;
+&usage unless getopts("hklVL:");
if ($opt_V) {
print STDERR "metalint $version-$revision\n";
diff --git a/mcon/mxref.SH b/mcon/mxref.SH
index 1425833..6177c92 100755
--- a/mcon/mxref.SH
+++ b/mcon/mxref.SH
@@ -11,6 +11,7 @@ case $CONFIG in
. $TOP/config.sh
;;
esac
+REVISION=`grep REVISION $TOP/revision.h | head -n1 | cut -d' ' -f4`
case "$0" in
*/*) cd `expr X$0 : 'X\(.*\)/'` ;;
esac
@@ -20,7 +21,7 @@ $startperl
eval 'exec perl -S \$0 \${1+"\$@"}'
if \$running_under_some_shell;
-# $Id: mxref.SH 25 2008-05-28 11:19:25Z rmanfredi $
+# $Id: mxref.SH 114 2012-01-28 13:01:37Z rmanfredi $
#
# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
#
@@ -57,8 +58,9 @@ $startperl
$spitshell >>mxref <<'!NO!SUBS!'
&profile; # Read ~/.dist_profile
-require 'getopts.pl';
-&usage unless &Getopts("df:hkmsVL:");
+
+use Getopt::Std;
+&usage unless getopts("df:hkmsVL:");
chop($date = `date`);
chop($WD = `pwd`); # Working directory
diff --git a/mcon/pl/lint.pl b/mcon/pl/lint.pl
index 8fa18ed..5c6db47 100644
--- a/mcon/pl/lint.pl
+++ b/mcon/pl/lint.pl
@@ -1,4 +1,4 @@
-;# $Id: lint.pl 25 2008-05-28 11:19:25Z rmanfredi $
+;# $Id: lint.pl 132 2012-02-09 19:15:13Z rmanfredi $
;#
;# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
;#
@@ -778,10 +778,10 @@ sub p_body {
}
}
}
- # Now look at the shell variables used: can be $var or ${var}
+ # Now look at the shell variables used: can be $var or ${var} or ${var:
local($var);
local($line) = $_;
- while ($check_vars && s/\$\{?(\w+)\}?/$1/) {
+ while ($check_vars && s/\$\{?(\w+)[\}:]?/$1/) {
$var = $1;
next if $var =~ /^\d+/; # Ignore $1 and friends
# Record variable as undeclared but do not issue a message right now.
@@ -793,14 +793,26 @@ sub p_body {
$shused{$unit} .= "\$$var " unless $shused{$unit} =~ /\$$var\b/;
}
- return if $heredoc ne '' && !$began_here; # Still in here-document
+ local($file);
+
+ if ($heredoc ne '' && !$began_here) {
+ # Still in here-document
+ # Just look for included files from C programs expected to be local
+ # in case they missed the special unit that produces these files.
+ if (s!#(\s*)include(\s+)"([\w.]+)"!!) {
+ $file = $3;
+ $fileused{$unit} .= "$file " unless
+ $filetmp{$file} || $fileused{$unit} =~ /\b$file\b/;
+ }
+ return;
+ }
# Now look at private files used by the unit (./file or ..../UU/file)
# We look at things like '. ./myread' and `./loc ...` as well as "< file"
- local($file);
$_ = $line;
s/<\S+?>//g; # <header.h> would set-off our <file detection
while (
+ s!#(\s*)include(\s+)"([\w.]+)"!! ||
s!(\.\s+|`\s*)(\S*UU|\.)/([^\$/`\s;]+)\s*!! ||
s!(`\s*\$?)cat\s+(\./)?([^\$/`\s;]+)\s*`!! ||
s!(\s+)(\./)([^\$/`\s;]+)\s*!! ||
@@ -812,8 +824,10 @@ sub p_body {
# Record file as used. Later on, we will make sure we had the right
# to use that file: either we are in the unit that defines it, or we
# include the unit that creates it in our dependencies, relying on ?F:.
- $fileused{$unit} .= "$file " unless
- $filetmp{$file} || $fileused{$unit} =~ /\b$file\b/;
+ if ($file =~ /^\w/) {
+ $fileused{$unit} .= "$file " unless
+ $filetmp{$file} || $fileused{$unit} =~ /\b$file\b/;
+ }
# Mark temporary file as being used, to spot useless local declarations
$filetmp{$file} .= ' used'
if defined $filetmp{$file} && $filetmp{$file} !~ /\bused/;
@@ -827,8 +841,10 @@ sub p_body {
s!(if|\|\||&&)\s+([^\$/`\s;]+)\s*!: ! # if prog, || prog, && prog
) {
$file = $2;
- $filemisused{$unit} .= "$file " unless
- $filetmp{$file} || $filemisused{$unit} =~ /\b$file\b/;
+ if ($file =~ /^\w/) {
+ $filemisused{$unit} .= "$file " unless
+ $filetmp{$file} || $filemisused{$unit} =~ /\b$file\b/;
+ }
# Temporary files should be used with ./ anyway
$filetmp{$file} .= ' misused'
if defined $filetmp{$file} && $filetmp{$file} !~ /\bmisused/;