summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManoj Srivastava <srivasta@golden-gryphon.com>2014-04-27 17:54:01 -0700
committerManoj Srivastava <srivasta@golden-gryphon.com>2014-04-27 17:54:01 -0700
commit8f5e5726134ce5b4bd436b16f367796d851df553 (patch)
tree0ce2ad130721dcf917d7f81fb8495bf0a189d266
parent02bf7be6fc0f798790ef5b2160bc89a77b909428 (diff)
Imported Upstream version 3.5-36
-rwxr-xr-xConfigure237
-rw-r--r--Jmakefile4
-rw-r--r--MANIFEST127
-rwxr-xr-xMakefile.SH18
-rw-r--r--bin/Jmakefile5
-rwxr-xr-xbin/Makefile.SH20
-rwxr-xr-xbin/manilist.SH4
-rwxr-xr-xbin/packinit.SH4
-rwxr-xr-xbin/perload4
-rwxr-xr-xbin/svn-revision5
-rw-r--r--jmake/Jmakefile8
-rwxr-xr-xjmake/Makefile.SH26
-rwxr-xr-xjmake/bindex.SH4
-rw-r--r--jmake/files/Jmake.rules111
-rw-r--r--jmake/files/Jmake.tmpl19
-rwxr-xr-xjmake/fixcpp.SH5
-rwxr-xr-xjmake/jmake.SH26
-rw-r--r--jmake/jmake.man39
-rw-r--r--kit/Jmakefile5
-rwxr-xr-xkit/Makefile.SH20
-rwxr-xr-xkit/kitpost.SH4
-rwxr-xr-xkit/kitsend.SH4
-rwxr-xr-xkit/makedist.SH4
-rwxr-xr-xkit/manifake.SH4
-rwxr-xr-xlib/Makefile.SH8
-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
-rw-r--r--pat/Jmakefile5
-rwxr-xr-xpat/Makefile.SH20
-rwxr-xr-xpat/pat.SH4
-rwxr-xr-xpat/patbase.SH4
-rwxr-xr-xpat/patcil.SH4
-rwxr-xr-xpat/patclean.SH4
-rwxr-xr-xpat/patcol.SH4
-rwxr-xr-xpat/patdiff.SH4
-rwxr-xr-xpat/patftp.SH4
-rwxr-xr-xpat/patlog.SH4
-rwxr-xr-xpat/patmake.SH4
-rwxr-xr-xpat/patname.SH4
-rwxr-xr-xpat/patnotify.SH4
-rwxr-xr-xpat/patpost.SH4
-rwxr-xr-xpat/patsend.SH4
-rwxr-xr-xpat/patsnap.SH4
-rw-r--r--revision.h4
626 files changed, 11393 insertions, 3170 deletions
diff --git a/Configure b/Configure
index cd1dd35..f27fe64 100755
--- a/Configure
+++ b/Configure
@@ -16,9 +16,9 @@
# The dist package (which contains metaconfig) is available via SVN:
# svn co https://svn.sourceforge.net/svnroot/dist/trunk/dist
-# $Id: Head.U 25 2008-05-28 11:19:25Z rmanfredi $
+# $Id: Head.U 41 2010-11-28 00:21:26Z rmanfredi $
#
-# Generated on Wed May 28 13:22:26 CEST 2008 [metaconfig 3.5-25]
+# Generated on Tue Feb 7 19:02:16 RST 2012 [metaconfig 3.5-123]
cat >c1$$ <<EOF
ARGGGHHHH!!!!!
@@ -63,7 +63,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
@@ -174,6 +174,7 @@ d_dos=''
d_eunice=''
d_linux=''
d_os2=''
+d_windows=''
d_xenix=''
_exe=''
eunicefix=''
@@ -199,7 +200,9 @@ emacs=''
expr=''
find=''
flex=''
+gcc=''
gmake=''
+gmsgfmt=''
grep=''
gzip=''
inews=''
@@ -216,7 +219,10 @@ mailx=''
make=''
mkdir=''
more=''
+msgfmt=''
+msgmerge=''
mv=''
+nawk=''
nm=''
nroff=''
perl=''
@@ -244,8 +250,12 @@ uname=''
uniq=''
uuname=''
vi=''
+wc=''
+xgettext=''
zcat=''
zip=''
+incpath=''
+mips_type=''
hint=''
myuname=''
osname=''
@@ -338,8 +348,6 @@ startperl=''
startsh=''
sysman=''
trnl=''
-incpath=''
-mips_type=''
usrinc=''
CONFIG=''
@@ -384,8 +392,7 @@ bin='/usr/local/bin'
cc='cc'
: Possible local include directories to search.
: Set locincpth to "" in a hint file to defeat local include searches.
-locincpth="/usr/local/include /opt/local/include /usr/gnu/include"
-locincpth="$locincpth /opt/gnu/include /usr/GNU/include /opt/GNU/include"
+locincpth=""
:
: no include file wanted by default
inclwanted=''
@@ -393,15 +400,14 @@ inclwanted=''
: change the next line if compiling for Xenix/286 on Xenix/386
xlibpth='/usr/lib/386 /lib/386'
: Possible local library directories to search.
-loclibpth="/usr/local/lib /opt/local/lib /usr/gnu/lib"
-loclibpth="$loclibpth /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib"
+loclibpth=""
: general looking path for locating libraries
glibpth="/lib /usr/lib $xlibpth"
glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/local/lib"
test -f /usr/shlib/libc.so && glibpth="/usr/shlib $glibpth"
test -f /shlib/libc.so && glibpth="/shlib $glibpth"
-
+glibpth="$glibpth /lib32 /lib64 "`ls -1d /usr/lib/*-gnu 2>/dev/null`
: Private path used by Configure to find libraries. Its value
: is prepended to libpth. This variable takes care of special
: machines, like the mips. Usually, it should be empty.
@@ -429,10 +435,10 @@ case "$sh" in
sh="$xxx"
break
elif test -f "$xxx$_exe"; then
- sh="$xxx"
+ sh="$xxx$_exe"
break
elif test -f "$xxx.exe"; then
- sh="$xxx"
+ sh="$xxx.exe"
break
fi
done
@@ -445,7 +451,7 @@ case "$sh" in
$me: Fatal Error: I can't find a Bourne Shell anywhere.
Usually it's in /bin/sh. How did you even get this far?
-Please contact me (Raphael Manfredi) at Raphael_Manfredi@grenoble.hp.com and
+Please contact me (Raphael Manfredi) at Raphael_Manfredi@pobox.com and
we'll try to straighten this all out.
EOM
exit 1
@@ -715,7 +721,7 @@ while test $# -gt 0; do
esac
shift
;;
- -V) echo "$me generated by metaconfig 3.5-25." >&2
+ -V) echo "$me generated by metaconfig 3.5-123." >&2
exit 0;;
--) break;;
-*) echo "$me: unknown option $1" >&2; shift; error=true;;
@@ -892,6 +898,7 @@ esac
cat >extract <<EOS
CONFIG=true
SRC="$src"
+TOP=`cd ..; pwd 2>/dev/null`
EOS
cat >>extract <<'EOS'
echo "Doing variable substitutions on .SH files..."
@@ -1014,7 +1021,7 @@ THIS PACKAGE SEEMS TO BE INCOMPLETE.
You have the option of continuing the configuration process, despite the
distinct possibility that your kit is damaged, by typing 'y'es. If you
do, don't blame me if something goes wrong. I advise you to type 'n'o
-and contact the author (Raphael_Manfredi@grenoble.hp.com).
+and contact the author (Raphael_Manfredi@pobox.com).
EOM
echo $n "Continue? [n] $c" >&4
@@ -1038,7 +1045,6 @@ fi
rm -f missing x??
: Find the appropriate value for a newline for tr
-echo " "
if test -n "$DJGPP"; then
trnl='\012'
fi
@@ -1064,8 +1070,6 @@ $me: Fatal Error: cannot figure out how to translate newlines with 'tr'.
EOM
exit 1
-else
- echo "We'll use '$trnl' to transliterate a newline."
fi
: compute the number of columns on the terminal for proper question formatting
@@ -1246,7 +1250,7 @@ Much effort has been expended to ensure that this shell script will run on any
Unix system. If despite that it blows up on yours, your best bet is to edit
Configure and run it again. If you can't run Configure for some reason,
you'll have to generate a config.sh file by hand. Whatever problems you
-have, let me (Raphael_Manfredi@grenoble.hp.com) know how I blew it.
+have, let me (Raphael_Manfredi@pobox.com) know how I blew it.
This installation script affects things in two ways:
@@ -1342,6 +1346,7 @@ cp
echo
expr
grep
+make
mkdir
mv
rm
@@ -1359,7 +1364,6 @@ less
line
ln
mail
-make
more
nroff
perl
@@ -1370,10 +1374,11 @@ smail
test
uname
vi
+wc
zcat
"
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
eval xxx=\$$file
case "$xxx" in
@@ -1381,14 +1386,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
/*)
@@ -1399,7 +1404,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
@@ -1414,14 +1419,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
/*)
@@ -1437,21 +1442,21 @@ for file in $trylist; do
esac
done
case "$egrep" in
-egrep)
+egrep$_exe|egrep)
echo "Substituting grep for egrep."
egrep=$grep
_egrep=$_grep
;;
esac
case "$ln" in
-ln)
+ln$_exe|ln)
echo "Substituting cp for ln."
ln=$cp
_ln=$_cp
;;
esac
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
@@ -1462,11 +1467,10 @@ 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) ;;
+*)
+ if test -f "/system/gnu_library/bin/ar.pm"; then
+ : Stratus VOS
echo "Substituting gmake for make."
make=$gmake
_make=$_gmake
@@ -1474,8 +1478,9 @@ gmake) ;;
;;
esac
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
@@ -1486,13 +1491,14 @@ test)
;;
esac
case "$echo" in
-echo)
+echo|echo$_exe)
echo "Hopefully echo is built into your sh."
+ echo=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
@@ -1563,7 +1569,7 @@ EOM
[yY]*) cc=gcc; ccname=gcc; ccflags=''; despair=no;
$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
@@ -1613,8 +1619,7 @@ EOSC
: determine whether symbolic links are supported
echo " "
-$touch blurfl
-$rm -f sym
+$rm -f blurfl sym
if $ln -s blurfl sym > /dev/null 2>&1 && $test -f sym; then
echo "Symbolic links are supported." >&4
lns="$ln -s"
@@ -1839,11 +1844,12 @@ $test -z "$myuname" && myuname=`hostname 2>/dev/null`
myuname=`echo $myuname | $sed -e 's/^[^=]*=//' -e 's/\///g' | \
./tr '[A-Z]' '[a-z]' | $tr $trnl ' '`
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
-: authors and to Raphael_Manfredi@grenoble.hp.com
+: authors and to Raphael_Manfredi@pobox.com
$test -f /irix && osname=irix
$test -f /xenix && osname=sco_xenix
$test -f /dynix && osname=dynix
@@ -1900,7 +1906,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
@@ -1928,7 +1935,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"
@@ -2124,6 +2134,12 @@ case "$knowitall" in
*) dflt=y;;
esac
+saved_osname="$osname"
+saved_osvers="$osvers"
+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
@@ -2136,14 +2152,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
@@ -2151,17 +2172,12 @@ fi
*)
echo " "
echo "Fetching default answers from $config_sh..." >&4
- tmp_n="$n"
- tmp_c="$c"
- tmp_sh="$sh"
cd ..
cp $config_sh config.sh 2>/dev/null
chmod +w config.sh
. ./config.sh
cd UU
cp ../config.sh .
- n="$tmp_n"
- c="$tmp_c"
hint=previous
;;
esac
@@ -2175,6 +2191,11 @@ for file in $loclist $trylist; do
eval $file="\$_$file"
done
+osname="$saved_osname"
+osvers="$saved_osvers"
+n="$tmp_n"
+c="$tmp_c"
+
. ./checkcc
case "$targetarch" in
'') ;;
@@ -2474,6 +2495,7 @@ while test "$type"; do
case "$ansexp" in
/*) value="$ansexp" ;;
[a-zA-Z]:/*) value="$ansexp" ;;
+ [a-zA-Z]:\\*) value="$ansexp" ;;
*)
redo=true
case "$already" in
@@ -2844,7 +2866,7 @@ case "$_o" in
esac
: set the base revision
-baserev=3.0
+baserev=3.5
: make some quick guesses about what we are up against
echo " "
@@ -2860,10 +2882,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"
$cat /usr/include/signal.h /usr/include/sys/signal.h >foo 2>/dev/null
if test -f /osf_boot || $contains 'OSF/1' /usr/include/ctype.h >/dev/null 2>&1
then
@@ -2918,6 +2942,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
:) ;;
*)
@@ -2925,10 +2961,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
@@ -2962,14 +2994,13 @@ 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
: What should the include directory be ?
echo " "
$echo $n "Hmm... $c"
-dflt='/usr/include'
incpath=''
mips_type=''
if $test -f /bin/mips && /bin/mips; then
@@ -2988,29 +3019,25 @@ EOCP
fi
$rm -f usr.c usr.out
echo "and you're compiling with the $mips_type compiler and libraries."
- xxx_prompt=y
echo "exit 0" >mips
else
echo "Doesn't look like a MIPS system."
- xxx_prompt=n
echo "exit 1" >mips
fi
chmod +x mips
$eunicefix mips
+
+: What should the include directory be ?
+echo " "
+dflt='/usr/include'
case "$usrinc" in
-'') ;;
+'') dflt="$incpath/usr/include";;
*) dflt="$usrinc";;
esac
-case "$xxx_prompt" in
-y) fn=d/
- echo " "
- rp='Where are the include files you want to use?'
- . ./getfile
- usrinc="$ans"
- ;;
-*) usrinc="$dflt"
- ;;
-esac
+fn=d/
+rp='Where are the include files you want to use?'
+. ./getfile
+usrinc="$ans"
: see if we have to deal with yellow pages, now NIS.
if $test -d /usr/etc/yp || $test -d /etc/yp || $test -d /usr/lib/yp; then
@@ -3336,20 +3363,22 @@ $rm -f foo.c foo.cpp
echo " "
echo "Checking for GNU cc in disguise and/or its version number..." >&4
$cat >try.c <<EOM
-#include <stdio.h>
-int main() {
+int main(void) {
#ifdef __GNUC__
-#ifdef __VERSION__
- printf("%s\n", __VERSION__);
-#else
- printf("%s\n", "1");
+gcc_version_major __GNUC__
+#ifdef __GNUC_MINOR__
+gcc_version_minor __GNUC__
+#endif
+#ifdef __GNUC_PATCHLEVEL__
+gcc_version_patchlevel __GNUC_PATCHLEVEL__
#endif
#endif
- exit(0);
}
EOM
-if $cc -o try $ccflags $ldflags try.c >/dev/null 2>&1; then
- gccversion=`$run ./try`
+if $cc -E try.c > try 2>&1
+then
+ gccversion=`$grep gcc_version_major try |
+ sed 's/^.*gcc_version_major[\t ]*//'`
case "$gccversion" in
'') echo "You are not using GNU cc." ;;
*) echo "You are using GNU cc $gccversion."
@@ -3357,15 +3386,7 @@ if $cc -o try $ccflags $ldflags try.c >/dev/null 2>&1; then
;;
esac
else
- echo " "
- echo "*** WHOA THERE!!! ***" >&4
- echo " Your C compiler \"$cc\" doesn't seem to be working!" >&4
- case "$knowitall" in
- '')
- echo " You'd better start hunting for one and let me know about it." >&4
- exit 1
- ;;
- esac
+ gccversion=''
fi
$rm -f try try.*
case "$gccversion" in
@@ -3713,7 +3734,7 @@ else
fi
case "$hint" in
-default|recommended) dflt="$ccflags $dflt" ;;
+default|recommended) dflt="$dflt $ccflags" ;;
*) dflt="$ccflags";;
esac
@@ -3859,8 +3880,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
if sh -c "$cc $optimize $ccflags $ldflags -o try try.c" >>try.msg 2>&1; then
@@ -3963,7 +3983,12 @@ EOS
creatdir="$prog -d"
fi
(ls -l d/try >try.ls; ls -l d/try.ns >tryno.ls) 2>/dev/null
- if (cmp -s d/try try && cmp -s d/try.ns try.ns && \
+ try_wc=`($wc -c try | $awk '{ print $1}') 2>/dev/null`
+ tryns_wc=`($wc -c try.ns | $awk '{ print $1}') 2>/dev/null`
+ d_try_wc=`($wc -c d/try | $awk '{ print $1}') 2>/dev/null`
+ d_tryns_wc=`($wc -c d/try.ns | $awk '{ print $1}') 2>/dev/null`
+ if ($test "X$try_wc" = "X$d_try_wc" && \
+ $test "X$tryns_wc" = "X$d_tryns_wc" && \
$contains 'rwxrw-r--' tryno.ls && \
$contains 'rw-r---w-' try.ls) >/dev/null 2>&1
then
@@ -4222,6 +4247,13 @@ if $test -r $rsrc/revision.h;then
revision=`awk \
'/^#[ ]*define[ ][ ]*REVISION/ {print $3}' \
< $rsrc/revision.h`
+ case "$revision" in
+ '"$Revision:')
+ revision=`awk \
+ '/^#[ ]*define[ ][ ]*REVISION/ {print $4}' \
+ < $rsrc/revision.h`
+ ;;
+ esac
else
revision=0
fi
@@ -4424,6 +4456,7 @@ d_os2='$d_os2'
d_passnames='$d_passnames'
d_portable='$d_portable'
d_usgnames='$d_usgnames'
+d_windows='$d_windows'
d_xenix='$d_xenix'
date='$date'
defeditor='$defeditor'
@@ -4436,10 +4469,12 @@ find='$find'
firstmakefile='$firstmakefile'
flex='$flex'
from='$from'
+gcc='$gcc'
gccosandvers='$gccosandvers'
gccversion='$gccversion'
glibpth='$glibpth'
gmake='$gmake'
+gmsgfmt='$gmsgfmt'
grep='$grep'
groupcat='$groupcat'
gzip='$gzip'
@@ -4478,12 +4513,15 @@ mansrcexp='$mansrcexp'
mips_type='$mips_type'
mkdir='$mkdir'
more='$more'
+msgfmt='$msgfmt'
+msgmerge='$msgmerge'
mv='$mv'
mydomain='$mydomain'
myhostname='$myhostname'
myuname='$myuname'
n='$n'
nametype='$nametype'
+nawk='$nawk'
nm='$nm'
nroff='$nroff'
optimize='$optimize'
@@ -4545,6 +4583,8 @@ usecrosscompile='$usecrosscompile'
usrinc='$usrinc'
uuname='$uuname'
vi='$vi'
+wc='$wc'
+xgettext='$xgettext'
xlibpth='$xlibpth'
zcat='$zcat'
zip='$zip'
@@ -4554,7 +4594,8 @@ EOT
$test -f $src/patchlevel.h && \
awk '/^#define/ {printf "%s=%s\n",$2,$3}' $src/patchlevel.h >>config.sh
$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/Jmakefile b/Jmakefile
index 25d8fc0..c9d3c3f 100644
--- a/Jmakefile
+++ b/Jmakefile
@@ -2,7 +2,7 @@
* Main Jmakefile for dist 3.0
*/
-;# $Id: Jmakefile 25 2008-05-28 11:19:25Z rmanfredi $
+;# $Id: Jmakefile 48 2010-11-28 23:05:09Z rmanfredi $
;#
;# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
;#
@@ -26,7 +26,7 @@
all:: /* So that default target is not clobber! */
SetSubdirs(bin mcon jmake pat kit lib)
-DependDirs(bin mcon pat jmake kit)
+DependSubdirs()
AddedByConfigure(install)
InstallManPage(dist,$(MANSRC))
diff --git a/MANIFEST b/MANIFEST
index b832fc5..ffd22b5 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -76,6 +76,8 @@ mcon/NOTES Documents the changes in metaconfig
mcon/README Instructions on using metaconfig
mcon/U/ Holds Units for metaconfig
mcon/U/AAAAA.U Does magic before Head.U
+mcon/U/Alpha_mieee.U Can -mieee be passed to cc?
+mcon/U/Assert.U Generates the "static_assert.h" file for tests
mcon/U/Begin.U "Beginning of configuration questions"
mcon/U/Checkcc.U A unit for checking the C compiler for sanity
mcon/U/Chk_MANI.U MANIFEST checks
@@ -93,6 +95,7 @@ mcon/U/Extractall.U Support for the -S Configure option
mcon/U/Filexp.U Makes program to do tilde expansion
mcon/U/Findhdr.U Locate header files
mcon/U/Finish.U A unit which always goes last
+mcon/U/GCC_pipe.U Is the -pipe option supported by gcc?
mcon/U/Getfile.U Get file/directory name
mcon/U/Guess.U Hazard guesses as to overall philosophy
mcon/U/Head.U First unit, does "#!/bin/sh" et al
@@ -100,11 +103,13 @@ mcon/U/Inhdr.U Defines a look-for-header function
mcon/U/Init.U Magically gathers ?Init: lines from other units
mcon/U/Inlibc.U Defines an is-in-libc? function
mcon/U/Instruct.U Prints instructions
+mcon/U/Largefile.U Which cc flags are required for large file support?
mcon/U/Loc.U Look for common programs
mcon/U/Loc_sed.U Full path of sed interpreter, even when portable
mcon/U/Magic_h.U Makes confmagic.h--bizarrity here
mcon/U/MailAuthor.U Offers user to register himself
mcon/U/MailList.U Offers user to subscribe to users list
+mcon/U/Mips.U Are we on a MIPS system?
mcon/U/Mkdirp.U Unit producing shell script to "mkdir -p"
mcon/U/Mksymlinks.U Unit to generate symlink to source tree
mcon/U/Myinit.U For copying to private U directories
@@ -119,9 +124,11 @@ mcon/U/Options.U Configure option parsing
mcon/U/Prefixit.U Fixes path prefix in variables in case it changed
mcon/U/Prefixup.U Fixes vars with path prefix using ~name expansion
mcon/U/Rcs.U Some stupid redefinitions to keep RCS happy
+mcon/U/Sendfile64.U Is sendfile() working with the largefile flags?
mcon/U/Setvar.U Set a variable with some sanity checks
mcon/U/Signal.U Utilities for sig_name.U
mcon/U/Tr.U Builds a tr script to handle lower and upper classes
+mcon/U/Trylink.U Compiles and links a test program
mcon/U/Typedef.U Defines a typedef lookup function
mcon/U/Unix.U Common UNIX settings and assumptions
mcon/U/Warn.U Summarizes warnings emitted during Configure run
@@ -157,11 +164,21 @@ mcon/U/d_PORTAR.U Do we know about portable archives?
mcon/U/d_SHM_MAC.U SHMLBA macro stuff
mcon/U/d_access.U Do we have access()?
mcon/U/d_alarm.U Do we have alarm()?
+mcon/U/d_arc4random.U Do we have arc4random()?
mcon/U/d_attribut.U Checks wether your cc groks __attribute__
+mcon/U/d_backtrace.U Do we have backtrace()?
mcon/U/d_bcmp.U Do we have bcmp() or memcmp()?
mcon/U/d_bcopy.U Do we have bcopy() or memcpy()?
+mcon/U/d_bfd_lib.U Is the BFD library available?
+mcon/U/d_bindtxtcode.U Do we have bind_textdomain_codeset()?
mcon/U/d_brokstat.U Check whether stat() macros are broken
mcon/U/d_bsdjmp.U Do we have BSD _setjmp() and _longjmp()?
+mcon/U/d_built_bswap32.U Is __builtin_bswap32() available?
+mcon/U/d_built_bswap64.U Is __builtin_bswap64() available?
+mcon/U/d_built_clz.U Is __builtin_clz() available?
+mcon/U/d_built_ctz.U Is __builtin_ctz() available?
+mcon/U/d_built_memcmp.U Is __builtin_memcmp() available?
+mcon/U/d_built_popcount.U Is __builtin_popcount() available?
mcon/U/d_byacc.U Is byacc available?
mcon/U/d_bzero.U Do we have bzero() or memset()?
mcon/U/d_casti32.U Can the compiler cast large flots to 32-bit ints?
@@ -172,26 +189,40 @@ mcon/U/d_chown.U Do we have chown()?
mcon/U/d_chroot.U Do we have chroot()?
mcon/U/d_chsize.U Size of a char
mcon/U/d_ckeypad.U Do we have the curses keypad()?
+mcon/U/d_clock_getres.U Do we have clock_getres()?
+mcon/U/d_clock_gettime.U Do we have clock_gettime()?
mcon/U/d_closedir.U Do we have closedir()?
+mcon/U/d_closefrom.U Do we have closefrom()?
mcon/U/d_const.U Can cc grok the const keyword?
mcon/U/d_crypt.U Does crypt() exist?
mcon/U/d_csh.U csh path
mcon/U/d_ctermid.U Do we have ctermid()?
mcon/U/d_cuserid.U Do we have cuserid()?
+mcon/U/d_datastart_symbol.U Whether linker defines the "__data_start" symbol
mcon/U/d_dbl_dig.U Is DBL_DIG defined in <limits.h> or <float.h>?
mcon/U/d_debugging.U Conditionally defines -DDEBUGGING
+mcon/U/d_deflate.U Do we have zlib's deflate()?
+mcon/U/d_devpoll.U Can we use /dev/poll?
mcon/U/d_difftime.U Do we have difftime()?
+mcon/U/d_dirent_d_type.U Does struct dirent has a member d_type?
+mcon/U/d_dladdr.U Do we have dladdr()?
mcon/U/d_dlerror.U Do we have dlerror()?
+mcon/U/d_dliterphdr.U Do we have dl_iterate_phdr()?
mcon/U/d_dlopen.U Do we have dlopen()?
mcon/U/d_dosuid.U Do they want setuid emulation?
mcon/U/d_drem.U Do we have drem()?
mcon/U/d_dup2.U Do we have dup2()?
+mcon/U/d_end_symbol.U Whether linker defines the "end" symbol
mcon/U/d_eofpipe.U Will EOF be seen on closed pipes?
+mcon/U/d_epoll.U Can we use epoll_xxx() routines?
+mcon/U/d_etext_symbol.U Whether linker defines the "etext" symbol
mcon/U/d_euc2jis.U Do we have euc2jis()?
+mcon/U/d_fast_assert.U Can we use fast assertions?
mcon/U/d_fchmod.U Do we have fchmod()?
mcon/U/d_fchown.U Do we have fchown()?
mcon/U/d_fcntl.U Do we have fcntl()?
mcon/U/d_fd_set.U Do we have the fd set manipulation macros?
+mcon/U/d_fdatasync.U Do we have fdatasync()?
mcon/U/d_ffs.U Do we have ffs()?
mcon/U/d_fgetpos.U Do we have fgetpos()?
mcon/U/d_flexfnam.U Long filenames?
@@ -199,15 +230,22 @@ mcon/U/d_flock.U Do we have flock()?
mcon/U/d_fmod.U Do we have fmod()?
mcon/U/d_fork.U Do we have fork()?
mcon/U/d_fsetpos.U Do we have fsetpos()?
+mcon/U/d_fsync.U Do we have fsync()?
mcon/U/d_ftime.U Do we have ftime()?
mcon/U/d_ftrncate.U Do we have ftruncate()?
mcon/U/d_gconvert.U Do we have gconvert() or gcvt()?
+mcon/U/d_getaddrinfo.U Do we have etaddrinfo()?
+mcon/U/d_getcontext.U Do we have getcontext()?
+mcon/U/d_geteuid.U Do we have geteuid()?
mcon/U/d_getgrps.U Do we have getgroups()?
mcon/U/d_gethbynm.U Do we have gethostbyname()?
mcon/U/d_gethent.U Do we have gethostent()?
mcon/U/d_gethid.U Do we have gethostid()?
mcon/U/d_gethname.U What is the C function to get host name?
+mcon/U/d_getifaddrs.U Do we have getifaddrs() and freeifaddrs()?
+mcon/U/d_getinvent.U Do we have getinvent()?
mcon/U/d_getlogin.U Do we have getlogin()?
+mcon/U/d_getnameinfo.U Do we have getnameinfo()?
mcon/U/d_getopt.U Do we have getopt()?
mcon/U/d_getpagsz.U Computes system's page size
mcon/U/d_getpgid.U Do we have getpgid()?
@@ -216,24 +254,41 @@ mcon/U/d_getpgrp2.U Do we have getpgrp2()? (DG/UX)
mcon/U/d_getppid.U Do we have getppid()?
mcon/U/d_getprior.U Do we have getpriority()?
mcon/U/d_getpwent.U How is passwd info gotten?
+mcon/U/d_getrlimit.U Do we have getrlimit()?
+mcon/U/d_gettext.U Checks whether gettext() is available
+mcon/U/d_gettext.U Do we have gettext()?
+mcon/U/d_getuid.U Do we have getuid()?
mcon/U/d_getwd.U Do we have getwd()?
+mcon/U/d_gnugettext.U Do we have GNU gettext()?
mcon/U/d_gnulibc.U Are we using the GNU C library?
mcon/U/d_group.U Do we have group()?
mcon/U/d_havetlib.U Where is termlib?
+mcon/U/d_herror.U Do we have herror()?
mcon/U/d_hidnet.U Do hiddennet stuff?
+mcon/U/d_hstrerror.U Do we have hstrerror()?
mcon/U/d_htonl.U Do we have htonl() and friends?
+mcon/U/d_iconv.U Do we have iconv()?
+mcon/U/d_ieee754.U De we have IEEE-754 floats?
mcon/U/d_inetaton.U Do we have inet_aton()?
mcon/U/d_inetd.U Should internet communication be done via inetd?
+mcon/U/d_inflate.U Do we have zlib's inflate()?
+mcon/U/d_initstate.U Do we have initstate()?
mcon/U/d_internet.U Use internet addresses?
+mcon/U/d_iptos.U Do we have IP TOS support?
+mcon/U/d_ipv6.U Do we have IPv6 support?
mcon/U/d_isascii.U Do we have isascii()?
mcon/U/d_itimer.U Do we have setitimer()?
mcon/U/d_keepsig.U Will signal handlers need to be rearmed?
+mcon/U/d_kevent_udata.U Is udata within struct kevent an integer?
mcon/U/d_killpg.U Do we have killpg()?
+mcon/U/d_kqueue.U Do we have kqueue()?
mcon/U/d_link.U Do we have link()?
mcon/U/d_linuxstd.U Do we have Linux standard I/O structures?
+mcon/U/d_locale_charset.U Do we have locale_charset()?
mcon/U/d_locconv.U Do we have localeconv()?
mcon/U/d_lockf.U Do we have lockf()?
mcon/U/d_lstat.U Do we have lstat()?
+mcon/U/d_madvise.U Do we have madvise()?
mcon/U/d_mblen.U Do we have mblen()?
mcon/U/d_mbstowcs.U Do we have mbstowcs()?
mcon/U/d_mbtowc.U Do we have mbtowc()?
@@ -243,6 +298,7 @@ mcon/U/d_memchr.U Do we have memchr()?
mcon/U/d_memcmp.U Do we have memcmp()?
mcon/U/d_memcpy.U Do we have memcpy()?
mcon/U/d_memmove.U Do we have memmove()?
+mcon/U/d_mempcpy.U Do we have mempcpy()?
mcon/U/d_memset.U Do we have memset()?
mcon/U/d_mkdir.U Do we have mkdir()?
mcon/U/d_mkfifo.U Do we have mkfifo()?
@@ -250,14 +306,17 @@ mcon/U/d_mktime.U Do we have mktime()?
mcon/U/d_mmap.U Do we have mmap()?
mcon/U/d_msem_lck.U Do we have msem_lock()?
mcon/U/d_msg.U Do we have full msg(2) support?
+mcon/U/d_msg_flags.U Does struct msghdr have a msg_flags member?
mcon/U/d_msgctl.U Do we have msgctl()?
mcon/U/d_msgget.U Do we have msgget()?
mcon/U/d_msgrcv.U Do we have msgrcv()?
mcon/U/d_msgsnd.U Do we have msgsnd()?
mcon/U/d_msync.U Do we have msync()?
mcon/U/d_munmap.U Do we have munmap()?
+mcon/U/d_nanosleep.U Do we have nanosleep()?
mcon/U/d_newsadm.U Who is news administrator?
mcon/U/d_nice.U Do we have nice()?
+mcon/U/d_nls.U Do we support NLS?
mcon/U/d_nolnbuf.U Is stdout line buffered?
mcon/U/d_normsig.U signal() vs sigset()
mcon/U/d_open3.U Do we have the 3 arguments form for open()?
@@ -270,31 +329,42 @@ mcon/U/d_pipe.U Do we have pipe()?
mcon/U/d_poll.U Do we have poll()?
mcon/U/d_popen.U Do we have popen()?
mcon/U/d_portable.U How portable do we want to be?
+mcon/U/d_posix_fadvise.U Do we have posix_fadvise()?
+mcon/U/d_posix_memalign.U Do we have posix_memalign()?
mcon/U/d_pread.U Do we have pread()?
mcon/U/d_preadv.U Do we have preadv()?
mcon/U/d_psignal.U Do we have psignal()?
+mcon/U/d_ptattr_setstack.U Do we have pthread_attr_setstack()?
mcon/U/d_pwrite.U Do we have pwrite()?
mcon/U/d_pwritev.U Do we have pwritev()?
+mcon/U/d_random.U Do we have random()?
mcon/U/d_raster.U Is this a Raster Tech machine?
mcon/U/d_rdchk.U Is rdchk() there to check for input?
mcon/U/d_readdir.U Do we have readdir()?
mcon/U/d_readlink.U Do we have readlink()?
-mcon/U/d_regcmp.U Do we have regcmp()?
+mcon/U/d_recvmsg.U Do we have recvmsg()?
+mcon/U/d_regcmp.U Do we have regcmp() or re_comp()?
+mcon/U/d_regcomp.U Do we have POSIX regcomp()?
+mcon/U/d_regparm.U Can we use __attribute__((__regparm__(n)))?
mcon/U/d_rename.U Do we have rename()?
mcon/U/d_rmdir.U Do we have rmdir()?
mcon/U/d_rusage.U Do we have getrusage()?
+mcon/U/d_sa_interrupt.U Can SA_INTERRUPT be used in sigaction()?
mcon/U/d_safebcpy.U Can bcopy() handle overlapping blocks?
mcon/U/d_safemcpy.U Can memcpy() handle overlapping blocks?
mcon/U/d_sanemcmp.U Can we compare 8th bit in chars with memcmp()?
mcon/U/d_sbrk.U Do we have sbrk()?
mcon/U/d_scandir.U Do we have scandir()?
mcon/U/d_scannl.U Does scanf() groks '\n' correctly?
+mcon/U/d_sched_yield.U Do we have sched_yield()?
mcon/U/d_scorfl.U Keep scoreboards by full name?
mcon/U/d_select.U Do we have select()?
mcon/U/d_sem.U Do we have full sem(2) support?
mcon/U/d_semctl.U Do we have d_semctl()?
mcon/U/d_semget.U Do we have semget()?
mcon/U/d_semop.U Do we have semop()?
+mcon/U/d_sendfile.U Do we have sendfile()?
+mcon/U/d_sendmsg.U Do we have sendmsg()?
mcon/U/d_setegid.U Do we have setegid()?
mcon/U/d_seteuid.U Do we have seteuid()?
mcon/U/d_setgrps.U Do we have setgroups()?
@@ -304,9 +374,11 @@ mcon/U/d_setpgid.U Do we have setpgid()?
mcon/U/d_setpgrp.U Do we have setpgrp()?
mcon/U/d_setpgrp2.U Do we have setpgrp2()? (DG/UX)
mcon/U/d_setprior.U Do we have setpriority()?
+mcon/U/d_setproctitle.U Do we have setproctitle()?
mcon/U/d_setregid.U Do we have setregid()?
mcon/U/d_setreuid.U Do we have setreuid()?
mcon/U/d_setrgid.U Do we have setrgid()?
+mcon/U/d_setrlimit.U Do we have setrlimit()?
mcon/U/d_setruid.U Do we have setruid()?
mcon/U/d_setsid.U Do we have setsid()?
mcon/U/d_sgndchr.U Are chars signed?
@@ -316,18 +388,27 @@ mcon/U/d_shmctl.U Do we have shmctl()?
mcon/U/d_shmdt.U Do we have shmdt()?
mcon/U/d_shmget.U Do we have shmget()?
mcon/U/d_sigaction.U Do we have sigaction()?
+mcon/U/d_sigaltstack.U Do we have sigaltstack()?
mcon/U/d_sigblock.U Do we have sigblock()?
mcon/U/d_sighold.U Do we have sighold()?
mcon/U/d_siglist.U Do we have sys_siglist[]?
+mcon/U/d_sigprocmask.U Do we have sigprocmask()?
mcon/U/d_sigsetjmp.U Do we have sigsetjmp()?
mcon/U/d_sigsetmk.U Do we have sigsetmask()?
mcon/U/d_sigvec.U BSD reliable signals supported?
mcon/U/d_sjis2jis.U Do we have sjis2jis()?
+mcon/U/d_sockaddr_in_sin_len.U Is there a sin_len within struct sockaddr_in?
+mcon/U/d_sockaddr_un.U Is struct sockaddr_un available?
+mcon/U/d_socker_get.U Has socker_get() to listen to privileged ports?
mcon/U/d_socket.U BSD socket interface supported?
mcon/U/d_speedopt.U Optimize speed vs memory?
+mcon/U/d_srandom.U Do we have srandom()?
mcon/U/d_stat.U Do we have stat()?
mcon/U/d_statblks.U Does stat know about blksize and blocks?
+mcon/U/d_statfs.U Do we have statfs()?
+mcon/U/d_statvfs.U Do we have statvfs()?
mcon/U/d_stdstdio.U How standard is stdio?
+mcon/U/d_strcasestr.U Do we have strcasestr()?
mcon/U/d_strccmp.U Do we have strcasecmp()?
mcon/U/d_strchr.U Use strchr() or index()?
mcon/U/d_strcoll.U Do we have strcoll()?
@@ -336,6 +417,8 @@ mcon/U/d_strctcpy.U Do we do struct copies?
mcon/U/d_strdup.U Do we have strdup()?
mcon/U/d_strerror.U Do we have strerror()?
mcon/U/d_strftime.U Do we have strftime()?
+mcon/U/d_strlcat.U Do we have strlcat()?
+mcon/U/d_strlcpy.U Do we have strlcpy()?
mcon/U/d_strstr.U Do we have strtr()?
mcon/U/d_strtod.U Do we have strtod()?
mcon/U/d_strtok.U Do we have strtok()?
@@ -344,8 +427,10 @@ mcon/U/d_strtoul.U Do we have strtoul()?
mcon/U/d_strxfrm.U Do we have strxfrm()?
mcon/U/d_su_chown.U Do we need to be root to do a chown?
mcon/U/d_symlink.U Does symlink() exist?
+mcon/U/d_sync_atomic.U Are __sync_synchronize() and friends available?
mcon/U/d_syscall.U Do we have syscall()?
mcon/U/d_sysconf.U Do we have sysconf()?
+mcon/U/d_sysctl.U Do we have sysctl()?
mcon/U/d_syslog.U Do we have syslog()?
mcon/U/d_system.U Do we have system()?
mcon/U/d_table.U De we have table()?
@@ -357,6 +442,8 @@ mcon/U/d_tminsys.U Is struct tm in <sys/time.h>?
mcon/U/d_truncate.U Do we have truncate()?
mcon/U/d_tzmin.U Do we use tz_minuteswest?
mcon/U/d_tzname.U Do we have tzname[]?
+mcon/U/d_uctx_mctx.U Do we have a uc_mcontext field in struct ucontext?
+mcon/U/d_uctx_mctx_gregs.U Do we have uc_mcontext.gregs[] in struct ucontext?
mcon/U/d_ulimit.U Do we have ulimit()?
mcon/U/d_umask.U Do we have umask()?
mcon/U/d_usendir.U Use our own ndir routines?
@@ -366,6 +453,7 @@ mcon/U/d_vfork.U vfork() vs fork()
mcon/U/d_voidsig.U How is signal() declared?
mcon/U/d_volatile.U Does our C compiler support "volatile"?
mcon/U/d_vprintf.U Do we have vprintf()?
+mcon/U/d_vsnprintf.U Do we have vsnprintf()?
mcon/U/d_wait3.U Do we have wait3()?
mcon/U/d_wait4.U Do we have wait4()?
mcon/U/d_waitpid.U Do we have waitpid() system call?
@@ -376,9 +464,11 @@ mcon/U/d_xdrs.U Do we have XDR serialization routines?
mcon/U/defeditor.U Find default editor
mcon/U/doublesize.U What is the size of "double"?
mcon/U/ebcdic.U Check for an EBCDIC system
+mcon/U/enablenls.U Shall we enable NLS?
mcon/U/errnolist.U See if we need our own .c to get sys_errnolist[]
mcon/U/etc.U Where administrative executable should go
-mcon/U/filexp.U Finds location of filexp made by Filexp.U
+mcon/U/fieldn.U Compute included filename position in cpp output
+mcon/U/filexp_path.U Finds location of filexp made by Filexp.U
mcon/U/floatsize.U What is the size of "float"?
mcon/U/fpostype.U What is the type for file positions?
mcon/U/fpu.U What kind of Sun fpu is in use?
@@ -387,28 +477,45 @@ mcon/U/gidtype.U What is the type of gids?
mcon/U/groupstype.U What is the type for groups in getgroups()?
mcon/U/h_fcntl.U Do we need to include fcntl.h?
mcon/U/h_sysfile.U Do we need to include sys/file.h?
+mcon/U/i_alloca.U Shall we include <alloca.h>?
mcon/U/i_arpainet.U Shall we include <arpa/inet.h>?
mcon/U/i_db.U Shall we include <db.h>?
mcon/U/i_dbm.U Shall we include <dbm.h>?
mcon/U/i_dirent.U Shall we include <dirent.h>
mcon/U/i_dld.U Shall we include <dld.h>?
mcon/U/i_dlfcn.U Shall we include <dlfcn.h>?
+mcon/U/i_execinfo.U Shall we include <execinfo.h>?
mcon/U/i_fcntl.U Shall we include <fcntl.h>?
mcon/U/i_float.U Shall we include <float.h>?
mcon/U/i_gdbm.U Shall we include <gdbm.h>?
mcon/U/i_grp.U Shall we include <grp.h>?
+mcon/U/i_iconv.U Shall we include <iconv.h>?
+mcon/U/i_ifaddrs.U Shall we include <ifaddrs.h>?
mcon/U/i_inttypes.U Shall we include <inttypes.h>?
+mcon/U/i_invent.U Shall we include <invent.h>?
+mcon/U/i_langinfo.U Shall we include <langinfo.h>?
+mcon/U/i_libcharset.U Shall we include <libcharset.h>?
+mcon/U/i_libintl.U Shall we include <libintl.h>?
mcon/U/i_limits.U Shall we include <limits.h>?
+mcon/U/i_linux_netlink.U Shall we include <linux/netlink.h>?
+mcon/U/i_linux_rtnetlink.U Shall we include <linux/rtnetlink.h>?
mcon/U/i_locale.U Shall we include <locale.h>?
mcon/U/i_malloc.U Shall we include <malloc.h>?
mcon/U/i_math.U Shall we include <math.h>?
mcon/U/i_memory.U Shall we include <memory.h>?
+mcon/U/i_mswsock.U Shall we include <Mswsock.h>?
mcon/U/i_ndbm.U Shall we include <ndbm.h>?
+mcon/U/i_netdb.U Shall we include <netdb.h>?
mcon/U/i_neterrno.U Shall we include <net/errno.h>?
+mcon/U/i_netif.U Shall we include <net/if.h>?
+mcon/U/i_netroute.U Can we include <net/route.h>?
mcon/U/i_niin.U Shall we include <netinet/in.h>?
+mcon/U/i_niip.U Shall we include <netinet/ip.h>?
mcon/U/i_poll.U Shall we include <poll.h>?
+mcon/U/i_pthread.U Shall we include <pthread.h>?
mcon/U/i_pwd.U Shall we include <pwd.h>?
mcon/U/i_regex.U Shall we include <regex.h>?
+mcon/U/i_sched.U Shall we include <sched.h>?
mcon/U/i_sfio.U Shall we include <sfio.h>?
mcon/U/i_stddef.U Shall we include <stddef.h>?
mcon/U/i_stdlib.U Shall we include <stdlib.h>?
@@ -416,29 +523,42 @@ mcon/U/i_string.U <string.h> or <strings.h>?
mcon/U/i_sysdir.U Shall we include <sys/dir.h>?
mcon/U/i_sysfile.U Do we need <sys/file.h>?
mcon/U/i_sysioctl.U Include <sys/ioctl.h> or <sgtty.h>?
+mcon/U/i_sysipc.U Shall we include <sys/ipc.h>?
mcon/U/i_sysmman.U Do we have to include <sys/mman.h>?
+mcon/U/i_sysmount.U Shall we include <sys/mount.h>?
mcon/U/i_sysndir.U Shall we include <sys/ndir.h>?
mcon/U/i_sysparam.U Shall we include <sys/param.h>?
mcon/U/i_syspoll.U Shall we include <sys/poll.h>?
mcon/U/i_sysresrc.U Shall we include <sys/resource.h>?
mcon/U/i_sysselct.U Shall we include <sys/select.h>?
+mcon/U/i_syssem.U Shall we include <sys/sem.h>?
+mcon/U/i_syssendfile.U Shall we include <sys/sendfile.h>?
mcon/U/i_syssock.U Shall we include <sys/socket.h>?
mcon/U/i_sysstat.U Shall we include <sys/stat.h>
+mcon/U/i_sysstatvfs.U Shall we include <sys/statvfs.h>?
+mcon/U/i_syssysctl.U Shall we include <sys/sysctl.h>?
mcon/U/i_systable.U De we have to include <sys/table.h>?
mcon/U/i_systimeb.U Is struct timeb defined in <sys/timeb.h>?
mcon/U/i_systimes.U Shall we include <sys/times.h>?
mcon/U/i_systwgcf.U Shall we include <sys/twg_config.h>?
mcon/U/i_systypes.U Do we have to include <sys/types.h>?
mcon/U/i_sysun.U Shall we include <sys/un.h>?
+mcon/U/i_sysutsname.U Shall we include <sys/utsname.h>?
+mcon/U/i_sysvfs.U Shall we include <sys/vfs.h>?
mcon/U/i_syswait.U Is there a <sys/wait.h>?
mcon/U/i_termio.U Include <termio.h> or <sgtty.h>?
mcon/U/i_time.U Which time.h should we include?
+mcon/U/i_ucontext.U Shall we include <ucontext.h>
mcon/U/i_unistd.U Include <unistd.h>?
mcon/U/i_utime.U Include <utime.h>?
mcon/U/i_values.U Shall we include <values.h>
mcon/U/i_varhdr.U Choose between <varargs.h> and <stdarg.h>
mcon/U/i_vfork.U Include <vfork.h>?
mcon/U/i_whoami.U Include <whoami.h>?
+mcon/U/i_winsock2.U Shall we include <Winsock2.h>?
+mcon/U/i_ws2tcpip.U Shall we include <Ws2tcpip.h>?
+mcon/U/i_zlib.U Shall we include <zlib.h>?
+mcon/U/ilp.U Supported integer-long-pointer architecture.
mcon/U/inc.U Where to put public include files?
mcon/U/install.U Look for a BSD-compatible install
mcon/U/intsize.U What is the size of "int"?
@@ -457,6 +577,7 @@ mcon/U/libs.U Optional libraries?
mcon/U/libyacc.U Locate yacc library
mcon/U/lintlib.U Where lint library should be placed
mcon/U/lns.U Are symbolic links supported by ln?
+mcon/U/locale.U Configuration of I18N files
mcon/U/locdist.U Find distribution names for news
mcon/U/longsize.U What is the size of "long"?
mcon/U/lseektype.U What is the type of lseek()?
@@ -473,6 +594,7 @@ mcon/U/mboxchar.U How to determine if file is mailbox
mcon/U/mkdep.U How to generate makefile dependencies?
mcon/U/models.U Large vs small, split I&D, etc
mcon/U/modetype.U What is the type for file modes?
+mcon/U/msgmerge_update.U Does msgmerge --update work?
mcon/U/myhostname.U How to determine hostname from shell
mcon/U/n.U How to suppress newline with echo
mcon/U/nametype.U How to get user's fullname
@@ -482,6 +604,7 @@ mcon/U/newslib.U Where is the news library?
mcon/U/newsspool.U Where is news spooled?
mcon/U/nis.U Do we have to deal with NIS (former YP)?
mcon/U/nlist_pfx.U nlist() related stuff
+mcon/U/official.U Are we making an official build with no local ref?
mcon/U/orderlib.U Shall we order components libraries?
mcon/U/orgname.U What is the organizaton name?
mcon/U/packadmin.U E-mail address of the package administrator
diff --git a/Makefile.SH b/Makefile.SH
index 4915130..3d204eb 100755
--- a/Makefile.SH
+++ b/Makefile.SH
@@ -1,5 +1,5 @@
-: Makefile.SH generated from Jmake.tmpl and Jmakefile [jmake 3.5-17]
-: $X-Id: Jmake.tmpl 8 2006-08-25 22:27:18Z rmanfredi $
+: Makefile.SH generated from Jmake.tmpl and Jmakefile [jmake 3.5-119]
+: $X-Id: Jmake.tmpl 69 2011-01-09 13:57:07Z rmanfredi $
case $CONFIG in
'')
@@ -56,12 +56,12 @@ SUBDIRS = bin mcon jmake pat kit lib
$spitshell >>Makefile <<'!NO!SUBS!'
########################################################################
# Jmake rules for building libraries, programs, scripts, and data files
-# $X-Id: Jmake.rules 18 2006-12-27 10:35:09Z rmanfredi $
+# $X-Id: Jmake.rules 106 2011-11-25 20:36:12Z rmanfredi $
########################################################################
# Start of Jmakefile
-# $X-Id: Jmakefile 25 2008-05-28 11:19:25Z rmanfredi $
+# $X-Id: Jmakefile 48 2010-11-28 23:05:09Z rmanfredi $
#
# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
#
@@ -84,9 +84,11 @@ $spitshell >>Makefile <<'!NO!SUBS!'
all::
-depend::
+depend:: sub_depend
+
+sub_depend::
@case '${MFLAGS}' in *[ik]*) set +e;; esac; \
- for i in bin mcon pat jmake kit ;\
+ for i in $(SUBDIRS) ;\
do \
(cd $$i ; echo "Depending" "in $(DIR)$$i..."; \
$(MAKE) $(MFLAGS) depend) || exit 1; \
@@ -133,6 +135,8 @@ local_clobber:: local_realclean
$(RM) Makefile
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
@@ -173,6 +177,8 @@ tags::
local_clobber::
$(RM) tags
+depend::
+
########################################################################
# Rules for building in sub-directories -- do not edit
diff --git a/bin/Jmakefile b/bin/Jmakefile
index 3ed908a..a3cf78b 100644
--- a/bin/Jmakefile
+++ b/bin/Jmakefile
@@ -2,7 +2,7 @@
* Jmakefile for bin subdirectory.
*/
-;# $Id: Jmakefile 9 2006-08-25 22:31:50Z rmanfredi $
+;# $Id: Jmakefile 48 2010-11-28 23:05:09Z rmanfredi $
;#
;# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
;#
@@ -30,7 +30,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/" \
diff --git a/bin/Makefile.SH b/bin/Makefile.SH
index 35630ec..89aaec1 100755
--- a/bin/Makefile.SH
+++ b/bin/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-43]
+: $X-Id: Jmake.tmpl 47 2010-11-28 22:23:13Z rmanfredi $
case $CONFIG in
'')
@@ -58,12 +58,12 @@ SCRIPTS = \$(BIN)
$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 18 2006-12-27 10:35:09Z rmanfredi $
########################################################################
# Start of Jmakefile
-# $X-Id: Jmakefile 9 2006-08-25 22:31:50Z rmanfredi $
+# $X-Id: Jmakefile 48 2010-11-28 23:05:09Z rmanfredi $
#
# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
#
@@ -138,7 +138,8 @@ BINSH = \
packinit.SH \
manilist.SH
-depend::
+depend:: local_depend
+local_depend::
($(SED) '/^# DO NOT DELETE/q' Makefile && \
grep '^\$$grep' $(BINSH) | \
$(SED) -e "s/^.*' \([^ ]*\) >>[ ]*\([^ ]*\)/\2: \1/" \
@@ -206,6 +207,8 @@ tags::
local_clobber::
$(RM) tags
+depend::
+
########################################################################
# Empty rules for directories with no sub-directories -- do not edit
@@ -225,6 +228,13 @@ Makefiles::
Makefiles.SH::
+########################################################################
+# 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/bin/manilist.SH b/bin/manilist.SH
index 8bfb341..42972ef 100755
--- a/bin/manilist.SH
+++ b/bin/manilist.SH
@@ -17,10 +17,10 @@ esac
echo "Extracting bin/manilist (with variable substitutions)"
$spitshell >manilist <<!GROK!THIS!
$startperl
- eval 'exec perl -S \$0 "\$@"'
+ eval 'exec perl -S \$0 \${1+"\$@"}'
if \$running_under_some_shell;
-# $Id: manilist.SH 20 2008-01-04 23:14:00Z rmanfredi $
+# $Id: manilist.SH 31 2010-03-06 20:15:24Z rmanfredi $
#
# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
#
diff --git a/bin/packinit.SH b/bin/packinit.SH
index 478839d..d0e6d9f 100755
--- a/bin/packinit.SH
+++ b/bin/packinit.SH
@@ -17,10 +17,10 @@ esac
echo "Extracting bin/packinit (with variable substitutions)"
cat >packinit <<!GROK!THIS!
# feed this into perl
- eval "exec perl -S \$0 \$*"
+ eval 'exec perl -S \$0 \${1+"\$@"}'
if \$running_under_some_shell;
-# $Id: packinit.SH 1 2006-08-24 12:32:52Z rmanfredi $
+# $Id: packinit.SH 31 2010-03-06 20:15:24Z rmanfredi $
#
# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
#
diff --git a/bin/perload b/bin/perload
index a0ed31c..4dc77c2 100755
--- a/bin/perload
+++ b/bin/perload
@@ -37,8 +37,8 @@ $current_package = 'main'; # Current package
$init_emitted = 0; # True when dataloading stamp was emitted
$in_function = 0;
-require 'getopt.pl';
-&Getopt;
+use Getopt::Std;
+getopts("ot");
while (<>) {
if ($. == 1 && /^(:|#).*perl/) { # Invocation stub
diff --git a/bin/svn-revision b/bin/svn-revision
index 0d88b3b..c698135 100755
--- a/bin/svn-revision
+++ b/bin/svn-revision
@@ -25,7 +25,7 @@ if [ "x$FILE" = x ]; then
FILE="&1"
oldrev=''
else
- oldrev=`grep REVISION "$FILE" 2>/dev/null | head -n1 | cut -d' ' -f3`
+ oldrev=`grep REVISION "$FILE" 2>/dev/null | head -n1 | cut -d' ' -f4`
fi
if test -d "$TOP/.svn"; then
@@ -52,8 +52,9 @@ EOF
if [ "x$revnum" = x ]; then
echo '/* Subversion information not available */'
else
+ XRev='$Revision'
cat <<EOF
-#define REVISION $revnum
+#define REVISION "$XRev: $revnum \$"
EOF
fi
diff --git a/jmake/Jmakefile b/jmake/Jmakefile
index ba65d08..3394fb1 100644
--- a/jmake/Jmakefile
+++ b/jmake/Jmakefile
@@ -2,7 +2,7 @@
* Jmakefile for jmake
*/
-;# $Id: Jmakefile 3 2006-08-25 21:39:07Z rmanfredi $
+;# $Id: Jmakefile 173 2014-04-05 08:10:18Z rmanfredi $
;#
;# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
;#
@@ -25,7 +25,7 @@
AllTarget(Index)
-Index: bindex
+Index: bindex files/Jmake.rules
chmod +x bindex
./bindex
@@ -40,7 +40,8 @@ InstallMultipleFlags(files/Jmake*,$(PRIVLIB)/files,-m 444)
BINSH = jmake.SH fixcpp.SH
-depend::
+depend:: local_depend
+local_depend::
($(SED) '/^# DO NOT DELETE/q' Makefile && \
grep '^\$$grep' $(BINSH) | \
$(SED) -e "s/^.*' \([^ ]*\) >>\([^ ]*\)/\2: \1/" \
@@ -49,3 +50,4 @@ depend::
cp Makefile.new Makefile
$(RM) Makefile.new
+fixcpp jmake: $(TOP)/revision.h
diff --git a/jmake/Makefile.SH b/jmake/Makefile.SH
index 6a651e3..76a7182 100755
--- a/jmake/Makefile.SH
+++ b/jmake/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-172]
+: $X-Id: Jmake.tmpl 156 2012-12-19 16:44:39Z rmanfredi $
case $CONFIG in
'')
@@ -59,12 +59,12 @@ SCRIPTS = jmake jmkmf
$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 106 2011-11-25 20:36:12Z rmanfredi $
########################################################################
# Start of Jmakefile
-# $X-Id: Jmakefile 3 2006-08-25 21:39:07Z rmanfredi $
+# $X-Id: Jmakefile 173 2014-04-05 08:10:18Z rmanfredi $
#
# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
#
@@ -90,7 +90,7 @@ all:: Index
local_realclean::
$(RM) Index
-Index: bindex
+Index: bindex files/Jmake.rules
chmod +x bindex
./bindex
@@ -210,7 +210,8 @@ local_deinstall::
BINSH = jmake.SH fixcpp.SH
-depend::
+depend:: local_depend
+local_depend::
($(SED) '/^# DO NOT DELETE/q' Makefile && \
grep '^\$$grep' $(BINSH) | \
$(SED) -e "s/^.*' \([^ ]*\) >>\([^ ]*\)/\2: \1/" \
@@ -219,6 +220,8 @@ depend::
cp Makefile.new Makefile
$(RM) Makefile.new
+fixcpp jmake: $(TOP)/revision.h
+
########################################################################
# Common rules for all Makefiles -- do not edit
@@ -238,6 +241,8 @@ local_clobber:: local_realclean
$(RM) Makefile config.sh
install:: local_install
+ @exit 0
+
install.man:: maybe_install.man
deinstall:: local_deinstall
deinstall.man:: maybe_deinstall.man
@@ -278,6 +283,8 @@ tags::
local_clobber::
$(RM) tags
+depend::
+
########################################################################
# Empty rules for directories with no sub-directories -- do not edit
@@ -297,6 +304,13 @@ Makefiles::
Makefiles.SH::
+########################################################################
+# 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/jmake/bindex.SH b/jmake/bindex.SH
index 6b8d4b4..ca73f5e 100755
--- a/jmake/bindex.SH
+++ b/jmake/bindex.SH
@@ -19,10 +19,10 @@ $spitshell >bindex <<!GROK!THIS!
$startperl
!GROK!THIS!
$spitshell >>bindex <<'!NO!SUBS!'
- eval 'exec perl -S $0 "$@"'
+ eval 'exec perl -S $0 ${1+"$@"}'
if $runnning_under_some_shell;
-# $Id: bindex.SH 1 2006-08-24 12:32:52Z rmanfredi $
+# $Id: bindex.SH 31 2010-03-06 20:15:24Z rmanfredi $
#
# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
#
diff --git a/jmake/files/Jmake.rules b/jmake/files/Jmake.rules
index aa31421..8877f17 100644
--- a/jmake/files/Jmake.rules
+++ b/jmake/files/Jmake.rules
@@ -1,12 +1,12 @@
;########################################################################
;# Jmake rules for building libraries, programs, scripts, and data files
-;# $Id: Jmake.rules 18 2006-12-27 10:35:09Z rmanfredi $
+;# $Id: Jmake.rules 174 2014-04-05 08:19:48Z rmanfredi $
/*
* MACHINE-INDEPENDENT RULES -- DO NOT MODIFY
*/
-/* $Id: Jmake.rules 18 2006-12-27 10:35:09Z rmanfredi $
+/* $Id: Jmake.rules 174 2014-04-05 08:19:48Z rmanfredi $
*
* Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
*
@@ -78,6 +78,18 @@ local_realclean:: @@\
$(RM) depends
/*
+ * AllTargetProgram:
+ * Generate rules to build necessary things during make all.
+ * This target is specific to executable. Use AllTarget() for
+ * other type of files.
+ */
+#define AllTargetProgram(program) @!\
+all:: program @!\
+ @!\
+local_realclean:: @@\
+ $(RM) program^^$(_EXE)
+
+/*
* RemoveTargetProgram:
* This is used in some other macros in order to remove the target
* before starting its building (saves disk space). There should be
@@ -85,10 +97,11 @@ local_realclean:: @@\
* used *inside* building rules.
*/
#define RemoveTargetProgram(program) \
- $(RM) program @@\
+ -$(RM) program^^$(_EXE) @@\
if test -f program^^^$(_EXE); then \ @@\
$(MV) program^^^$(_EXE) program^^~^^^$(_EXE); fi
+
/*
* NormalProgramTarget:
* Generate rules to compile and link the indicated program; since
@@ -99,20 +112,31 @@ local_realclean:: @@\
++OBJECTS objects @!\
++SOURCES sources @!\
NormalObjectRule() @!\
-AllTarget(program) @!\
+AllTargetProgram(program) @!\
@!\
program: objects @@\
RemoveTargetProgram($@) @@\
- $(CC) -o $@ objects $(JLDFLAGS) $(LIBS) @!\
+ $(CC) -o $@$(_EXE) objects $(JLDFLAGS) $(LIBS) @!\
/*
- * SingleProgramTarget:
- * Obsolete version of NormalProgramTarget that doesn't have
- * deplibs.
+ * NormalProgramLibTarget:
+ * Generate rules to compile and link the indicated program; since
+ * it does not use any default object files, it may be used for
+ * multiple programs in the same Jmakefile.
+ * The ``libs'' argument is used to depend on locally built libraries,
+ * in te same Jmakefile.
*/
-#define SingleProgramTarget(program,objects,libs) \
-NormalProgramTarget(program,objects,libs)
+#define NormalProgramLibTarget(program,sources,objects,libs) @!\
+++OBJECTS objects @!\
+++SOURCES sources @!\
+NormalObjectRule() @!\
+AllTargetProgram(program) @!\
+ @!\
+program: objects libs @@\
+ RemoveTargetProgram($@) @@\
+ $(CC) -o $@$(_EXE) objects $(JLDFLAGS) libs $(LIBS) @!\
+
/*
* SimpleProgramTarget:
@@ -124,7 +148,6 @@ NormalProgramTarget(program,objects,libs)
NormalProgramTarget(program,program.c,program.o)
-
/*
* ComplexProgramTarget:
* Generate rules for compiling and linking the program specified by
@@ -136,11 +159,11 @@ NormalProgramTarget(program,program.c,program.o)
++OBJECTS $(OBJS) @!\
++SOURCES $(SRCS) @!\
NormalObjectRule() @!\
-AllTarget(program) @!\
+AllTargetProgram(program) @!\
@!\
program: $(OBJS) @@\
RemoveTargetProgram($@) @@\
- $(CC) -o $@ $(OBJS) $(JLDFLAGS) $(LIBS) @!\
+ $(CC) -o $@$(_EXE) $(OBJS) $(JLDFLAGS) $(LIBS) @!\
@!\
InstallProgram(program,$(BINDIR)) @!\
InstallManPage(program,$(MANSRC)) @!\
@@ -160,11 +183,11 @@ LintTarget()
++OBJECTS $(OBJS1) @!\
++SOURCES $(SRCS1) @!\
NormalObjectRule() @!\
-AllTarget(program) @!\
+AllTargetProgram(program) @!\
@!\
program: $(OBJS1) @@\
RemoveTargetProgram($@) @@\
- $(CC) -o $@ $(OBJS1) $(JLDFLAGS) $(LIBS) @!\
+ $(CC) -o $@$(_EXE) $(OBJS1) $(JLDFLAGS) $(LIBS) @!\
@!\
InstallProgram(program,$(BINDIR)) @!\
InstallManPage(program,$(MANSRC)) @!\
@@ -184,11 +207,11 @@ LintTarget()
++OBJECTS $(OBJS2) @!\
++SOURCES $(SRCS2) @!\
NormalObjectRule() @!\
-AllTarget(program) @!\
+AllTargetProgram(program) @!\
@!\
program: $(OBJS2) @@\
RemoveTargetProgram($@) @@\
- $(CC) -o $@ $(OBJS2) $(JLDFLAGS) $(LIBS) @!\
+ $(CC) -o $@$(_EXE) $(OBJS2) $(JLDFLAGS) $(LIBS) @!\
@!\
InstallProgram(program,$(BINDIR)) @!\
InstallManPage(program,$(MANSRC))
@@ -205,11 +228,11 @@ InstallManPage(program,$(MANSRC))
++OBJECTS $(OBJS3) @!\
++SOURCES $(SRCS3) @!\
NormalObjectRule() @!\
-AllTarget(program) @!\
+AllTargetProgram(program) @!\
@!\
program: $(OBJS3) @@\
RemoveTargetProgram($@) @@\
- $(CC) -o $@ $(OBJS3) $(JLDFLAGS) $(LIBS) @!\
+ $(CC) -o $@$(_EXE) $(OBJS3) $(JLDFLAGS) $(LIBS) @!\
@!\
InstallProgram(program,$(BINDIR)) @!\
InstallManPage(program,$(MANSRC))
@@ -554,7 +577,7 @@ DeinstallMultipleDest(local_deinstall.man,list,dest)
* Generate rules to build the makedepend program.
*/
#define DependDependency() @!\
-depend:: TOPDIR/mkdep @!\
+local_depend:: TOPDIR/mkdep @!\
@!\
TOPDIR/mkdep: @!\
?TOP: @echo "You have to run Configure first."; exit 1 @!\
@@ -571,7 +594,8 @@ TOPDIR/mkdep: @!\
|once _DependTarget_ @!\
DependDependency() @!\
@!\
-depend:: @@\
+depend:: local_depend @!\
+local_depend:: @@\
($(SED) '/^# DO NOT DELETE/q' Makefile && \ @@\
$(MKDEP) $(SOURCES) | \ @@\
$(SED) -e 's:/usr/lib[^ ]*::g; s:$(USRINC)[^ ]*::g; ' \ @@\
@@ -617,7 +641,9 @@ local_clobber:: local_realclean @!\
*/
#define InstallTarget() @!\
?SUBDIRS:install:: local_install sub_install @!\
-%SUBDIRS:install:: local_install @!\
+%SUBDIRS:install:: local_install @@\
+ @exit 0 @!\
+ @!\
?SUBDIRS:install.man:: maybe_install.man sub_install.man @!\
%SUBDIRS:install.man:: maybe_install.man @!\
?SUBDIRS:deinstall:: sub_deinstall local_deinstall @!\
@@ -1114,8 +1140,28 @@ NormalLintTarget($(SOURCES)) @!\
*/
#define LinkSourceFile(src,dir) @!\
src: dir/src @@\
- $(RM) $@ @@\
+ $(RM) -f $@ @@\
+ $(LN) $? $@ @!\
+ @!\
+local_depend:: src @@\
+ @!\
+local_realclean:: @@\
+ $(RM) -f src @!\
+
+
+/*
+ * LinkSourceFileAlias:
+ * Snag source file from some other directory with a different local name.
+ */
+#define LinkSourceFileAlias(src,dir,alias) @!\
+alias: dir/src @@\
+ $(RM) -f $@ @@\
$(LN) $? $@ @!\
+ @!\
+local_depend:: alias @@\
+ @!\
+local_realclean:: @@\
+ $(RM) -f alias @!\
/*
@@ -1168,6 +1214,22 @@ name:: @@\
/*
+ * NamedTargetSubdirsAsRule:
+ * Recursively make a series of steps in the specified directories,
+ * where the name of the local rule is different from the recursive
+ * actions.
+ */
+#define NamedTargetSubdirsAsRule(dirs,localname,name,verb,flags) @!\
+localname:: @@\
+ @case '${MFLAGS}' in *[ik]*) set +e;; esac; \ @@\
+ for i in dirs ;\ @@\
+ do \ @@\
+ (cd $$i ; echo verb "in $(DIR)$$i..."; \ @@\
+ $(MAKE) $(MFLAGS) flags name) || exit 1; \ @@\
+ done
+
+
+/*
* NamedTargetSubdirs:
* Recursively make a series of steps.
*/
@@ -1211,7 +1273,8 @@ NamedTargetSubdirs(all,"Making all",^^)
* make depend step.
*/
#define DependDirs(dirs) \
-NamedTargetSubdirsRule(dirs,depend,"Depending",^^)
+depend:: sub_depend @!\
+NamedTargetSubdirsAsRule(dirs,sub_depend,depend,"Depending",^^)
/*
diff --git a/jmake/files/Jmake.tmpl b/jmake/files/Jmake.tmpl
index 0663793..a06d405 100644
--- a/jmake/files/Jmake.tmpl
+++ b/jmake/files/Jmake.tmpl
@@ -1,7 +1,7 @@
/*
* Generic jmake template
*
- * $Id: Jmake.tmpl 30 2009-10-28 07:45:28Z rmanfredi $
+ * $Id: Jmake.tmpl 156 2012-12-19 16:44:39Z rmanfredi $
*
* Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
*
@@ -27,7 +27,7 @@
*/
: Makefile.SH generated from Jmake.tmpl and Jmakefile <TAG>
-: $Id: Jmake.tmpl 30 2009-10-28 07:45:28Z rmanfredi $
+: $Id: Jmake.tmpl 156 2012-12-19 16:44:39Z rmanfredi $
/*************************************************************************
* *
@@ -81,6 +81,7 @@ DIR = $DIR
;# Parameters set by Configure -- edit config.sh if changes are needed
?AR:AR = ar rc /* FIXME */
+?ARCHLIB:ARCHLIB = $installarchlib
?BINDIR:BINDIR = $installbin
?CC:CC = $cc
?CHMOD:CHMOD = $chmod
@@ -89,9 +90,9 @@ DIR = $DIR
?CTAGS:CTAGS = ctags /* FIXME */
?_EXE:_EXE = $_exe
?INSTALLPREFIX:INSTALLPREFIX = $prefix
-?JCFLAGS:JCFLAGS = \$(CFLAGS) $optimize $ccflags $large
+?JCFLAGS:JCFLAGS = \$(CFLAGS) $optimize $pthread $ccflags $large
?JCPPFLAGS:JCPPFLAGS = $cppflags
-?JLDFLAGS:JLDFLAGS = \$(LDFLAGS) $optimize $ldflags
+?JLDFLAGS:JLDFLAGS = \$(LDFLAGS) $optimize $pthread $ldflags
?JLFLAGS:JLFLAGS = \$(LFLAGS)
?JYFLAGS:JYFLAGS = \$(YFLAGS) $yaccflags
?L:L = $manext
@@ -104,6 +105,7 @@ DIR = $DIR
?MAKE:$make_set_make
?MKDEP:MKDEP = $mkdep \$(DPFLAGS) \$(JCPPFLAGS) --
?MV:MV = $mv
+?NM:NM = $nm
?PRIVLIB:PRIVLIB = $installprivlib
?RANLIB:RANLIB = $ranlib
?RM:RM = $rm -f
@@ -193,6 +195,11 @@ maybe_deinstall.man: deinstall.man-no
MakefileTarget()
TagsTarget()
+/*
+ * Empty rules in case there is no depend target.
+ */
+depend::
+
%SUBDIRS:|skip /* Skip if no sub-directories */
;########################################################################
;# Rules for building in sub-directories -- do not edit
@@ -240,8 +247,8 @@ Makefiles::
Makefiles.SH::
--skip /* No sub-directories */
-%MKDEP:|skip /* Skip if no depend target */
+-skip /* No sub-directories */
+%local_depend%:|skip /* Skip if no local depend target */
;########################################################################
;# Dependencies generated by make depend
;# DO NOT DELETE THIS LINE -- make depend relies on it
diff --git a/jmake/fixcpp.SH b/jmake/fixcpp.SH
index b994670..092a4ca 100755
--- a/jmake/fixcpp.SH
+++ b/jmake/fixcpp.SH
@@ -11,16 +11,17 @@ case $CONFIG in
. $TOP/config.sh
;;
esac
+REVISION=`grep REVISION $TOP/revision.h | head -n1 | cut -d' ' -f4`
case "$0" in
*/*) cd `expr X$0 : 'X\(.*\)/'` ;;
esac
echo "Extracting jmake/fixcpp (with variable substitutions)"
$spitshell >fixcpp <<!GROK!THIS!
$startperl
- eval 'exec perl -S \$0 "\$@"'
+ eval 'exec perl -S \$0 \${1+"\$@"}'
if \$runnning_under_some_shell;
-# $Id: fixcpp.SH 25 2008-05-28 11:19:25Z rmanfredi $
+# $Id: fixcpp.SH 42 2010-11-28 18:15:13Z rmanfredi $
#
# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
#
diff --git a/jmake/jmake.SH b/jmake/jmake.SH
index 9b06899..392952f 100755
--- a/jmake/jmake.SH
+++ b/jmake/jmake.SH
@@ -11,16 +11,17 @@ case $CONFIG in
. $TOP/config.sh
;;
esac
+REVISION=`grep REVISION $TOP/revision.h | head -n1 | cut -d' ' -f4`
case "$0" in
*/*) cd `expr X$0 : 'X\(.*\)/'` ;;
esac
echo "Extracting jmake/jmake (with variable substitutions)"
$spitshell >jmake <<!GROK!THIS!
$startperl
- eval 'exec perl -S \$0 "\$@"'
+ eval 'exec perl -S \$0 \${1+"\$@"}'
if \$runnning_under_some_shell;
-# $Id: jmake.SH 25 2008-05-28 11:19:25Z rmanfredi $
+# $Id: jmake.SH 47 2010-11-28 22:23:13Z rmanfredi $
#
# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
#
@@ -218,6 +219,8 @@ $SPIT_END = "!NO!SUBS!\n";
$GROK_START = "\$spitshell >>Makefile <<!GROK!THIS!\n";
$GROK_END = "!GROK!THIS!\n";
+%target = (); # Will record seen targets (actually generated)
+
open(MAKEFILE, ">Makefile.SH");
# We have to use for instead of foreach to handle 'skip' easily
line: for ($i = 0; $i <= $#makefile; $i++) {
@@ -308,6 +311,20 @@ line: for ($i = 0; $i <= $#makefile; $i++) {
s/<TAG>/[jmake $version-$revision]/;
+ # Lines starting with ?target?: (resp. %target%:) are to be processd
+ # only when target is used (resp. unused) in the generated makefile.
+
+ # Apply in sequence
+ while (/^\s*\?|\s*%/) {
+ if (s/^\s*\?([\w-.]+)\?://) { # Wanted target ?
+ next line unless $target{$1};
+ } elsif (s/^\s*%([\w-.]+)%://) { # Unwanted target ?
+ next line if $target{$1};
+ } else {
+ last;
+ }
+ }
+
# Lines starting with ?SYMBOL: (resp. %SYMBOL:) are to be processed
# only if SYMBOL is defined (resp. undefined).
@@ -396,6 +413,11 @@ line: for ($i = 0; $i <= $#makefile; $i++) {
print MAKEFILE "$_\n";
}
} else {
+ # Keep track of the targets we generate for ?target? and %target% type
+ # of tests in the templates, which can generate specific code when
+ # a target is indeed present.
+ $target{$1}++ if /^([\w.-]+):/;
+
&print_makefile($_);
}
}
diff --git a/jmake/jmake.man b/jmake/jmake.man
index 2125c0c..afd5e65 100644
--- a/jmake/jmake.man
+++ b/jmake/jmake.man
@@ -1,4 +1,4 @@
-''' $Id: jmake.man 3 2006-08-25 21:39:07Z rmanfredi $
+''' $Id: jmake.man 47 2010-11-28 22:23:13Z rmanfredi $
'''
''' Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
'''
@@ -152,6 +152,33 @@ To implement a logical OR, see below.
.RE
.sp
.IP 3)
+Makefile target tests:
+.sp
+.RS
+.IP \(bu
+?\fItarget\fR?:<text>: keeps <test> iff \fItarget\fR is defined.
+.IP \(bu
+%\fItarget\fR%:<text>: keeps <test> iff \fItarget\fR is not defined.
+.sp
+A makefile \fItarget\fR is defined as a standalone target, for instance
+the
+.B depend.local
+target, which would be defined as:
+.sp
+.in +5
+.nf
+depend.local:
+.sp
+.in -5
+.fi
+Also note that it is only valid for targets defined
+.I so far
+in the generated makefile. It is not a predicate that can be used
+to test for targets that will eventually be defined later on in the
+generation.
+.RE
+.sp
+.IP 4)
Commands:
.sp
.RS
@@ -217,9 +244,9 @@ Here is a way to implement a logical OR:
.in -5
.sp
Actually, this is ugly, because the text has to appear twice.
-Fortunately, I did not use it. :-)
+Fortunately, I did not use that construct. :-)
.sp
-But actually, as you have surely already guessed, the best way to
+Indeed, as you have surely already guessed, the best way to
implement a logical OR is to use De Morgan's Law:
.sp
.in +5
@@ -233,7 +260,7 @@ text /* If SYMBOL or not TOKEN */
.sp
.in -5
.fi
-Who said they didn't care ? ;-)
+Who said they didn't care about logic? ;-)
.sp
.PP
Expansion is done with the \fIexpand\fR command. It has been provided to
@@ -440,7 +467,7 @@ therefore depend on the configuration options chosen when \fIConfigure\fR
was run.
.RE
.sp
-.IP 4)
+.IP 5)
Initializations:
.sp
.RS
@@ -450,7 +477,7 @@ Initializations:
++SYMBOL <value>: Adds <value> to the SYMBOL macro.
.RE
.sp
-.IP 5)
+.IP 6)
User-defined variables:
.sp
The user may define CFLAGS, LDFLAGS or DPFLAGS as additional flags to be used
diff --git a/kit/Jmakefile b/kit/Jmakefile
index bbcf5a5..ba6666f 100644
--- a/kit/Jmakefile
+++ b/kit/Jmakefile
@@ -2,7 +2,7 @@
* Jmakefile for kit maker
*/
-;# $Id: Jmakefile 9 2006-08-25 22:31:50Z rmanfredi $
+;# $Id: Jmakefile 48 2010-11-28 23:05:09Z rmanfredi $
;#
;# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
;#
@@ -34,7 +34,8 @@ SCRIPTSH = \
!f.SH \
-expand \\
-depend::
+depend:: local_depend
+local_depend::
($(SED) '/^# DO NOT DELETE/q' Makefile && \
grep '^\$$grep' $(SCRIPTSH) | \
$(SED) -e "s/^.*' \([^ ]*\) >>[ ]*\([^ ]*\)/\2: \1/" \
diff --git a/kit/Makefile.SH b/kit/Makefile.SH
index eacff2c..6badd31 100755
--- a/kit/Makefile.SH
+++ b/kit/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-43]
+: $X-Id: Jmake.tmpl 47 2010-11-28 22:23:13Z rmanfredi $
case $CONFIG in
'')
@@ -58,12 +58,12 @@ SCRIPTS = \$(SCRIPT)
$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 18 2006-12-27 10:35:09Z rmanfredi $
########################################################################
# Start of Jmakefile
-# $X-Id: Jmakefile 9 2006-08-25 22:31:50Z rmanfredi $
+# $X-Id: Jmakefile 48 2010-11-28 23:05:09Z rmanfredi $
#
# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
#
@@ -163,7 +163,8 @@ SCRIPTSH = \
kitsend.SH \
kitpost.SH
-depend::
+depend:: local_depend
+local_depend::
($(SED) '/^# DO NOT DELETE/q' Makefile && \
grep '^\$$grep' $(SCRIPTSH) | \
$(SED) -e "s/^.*' \([^ ]*\) >>[ ]*\([^ ]*\)/\2: \1/" \
@@ -231,6 +232,8 @@ tags::
local_clobber::
$(RM) tags
+depend::
+
########################################################################
# Empty rules for directories with no sub-directories -- do not edit
@@ -250,6 +253,13 @@ Makefiles::
Makefiles.SH::
+########################################################################
+# 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/kit/kitpost.SH b/kit/kitpost.SH
index 59d0f17..8030589 100755
--- a/kit/kitpost.SH
+++ b/kit/kitpost.SH
@@ -17,10 +17,10 @@ esac
echo "Extracting kit/kitpost (with variable substitutions)"
cat >kitpost <<!GROK!THIS!
$startperl
- eval "exec perl -S \$0 \$*"
+ eval 'exec perl -S \$0 \${1+"\$@"}'
if \$running_under_some_shell;
-# $Id: kitpost.SH 1 2006-08-24 12:32:52Z rmanfredi $
+# $Id: kitpost.SH 31 2010-03-06 20:15:24Z rmanfredi $
#
# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
#
diff --git a/kit/kitsend.SH b/kit/kitsend.SH
index 57d675e..7e14125 100755
--- a/kit/kitsend.SH
+++ b/kit/kitsend.SH
@@ -17,10 +17,10 @@ esac
echo "Extracting kit/kitsend (with variable substitutions)"
cat >kitsend <<!GROK!THIS!
$startperl
- eval 'exec perl -S \$0 "\$@"'
+ eval 'exec perl -S \$0 \${1+"\$@"}'
if \$running_under_some_shell;
-# $Id: kitsend.SH 1 2006-08-24 12:32:52Z rmanfredi $
+# $Id: kitsend.SH 31 2010-03-06 20:15:24Z rmanfredi $
#
# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
#
diff --git a/kit/makedist.SH b/kit/makedist.SH
index d700d7b..4acaf68 100755
--- a/kit/makedist.SH
+++ b/kit/makedist.SH
@@ -14,10 +14,10 @@ esac
echo "Extracting kit/makedist (with variable substitutions)"
cat >makedist <<!GROK!THIS!
$startperl
- eval "exec perl -S \$0 \$*"
+ eval 'exec perl -S \$0 \${1+"\$@"}'
if \$running_under_some_shell;
-# $Id: makedist.SH 1 2006-08-24 12:32:52Z rmanfredi $
+# $Id: makedist.SH 31 2010-03-06 20:15:24Z rmanfredi $
#
# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
#
diff --git a/kit/manifake.SH b/kit/manifake.SH
index e66fdcb..9c32714 100755
--- a/kit/manifake.SH
+++ b/kit/manifake.SH
@@ -17,10 +17,10 @@ esac
echo "Extracting kit/manifake (with variable substitutions)"
$spitshell >manifake <<!GROK!THIS!
$startperl
- eval "exec perl -i~ -S \$0 \$*"
+ eval 'exec perl -S \$0 \${1+"\$@"}'
if \$running_under_some_shell;
-# $Id: manifake.SH 1 2006-08-24 12:32:52Z rmanfredi $
+# $Id: manifake.SH 31 2010-03-06 20:15:24Z rmanfredi $
#
# Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
#
diff --git a/lib/Makefile.SH b/lib/Makefile.SH
index 9988b2f..aef1682 100755
--- a/lib/Makefile.SH
+++ b/lib/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-43]
+: $X-Id: Jmake.tmpl 47 2010-11-28 22:23:13Z rmanfredi $
case $CONFIG in
'')
@@ -55,7 +55,7 @@ SUBDIRS = C
$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 18 2006-12-27 10:35:09Z rmanfredi $
########################################################################
# Start of Jmakefile
@@ -181,6 +181,8 @@ tags::
local_clobber::
$(RM) tags
+depend::
+
########################################################################
# Rules for building in sub-directories -- do not edit
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