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 $