summaryrefslogtreecommitdiff
path: root/mcon/U
diff options
context:
space:
mode:
Diffstat (limited to 'mcon/U')
-rw-r--r--mcon/U/AAAAA.U46
-rw-r--r--mcon/U/Alpha_mieee.U41
-rw-r--r--mcon/U/Assert.U26
-rw-r--r--mcon/U/Begin.U39
-rw-r--r--mcon/U/Checkcc.U135
-rw-r--r--mcon/U/Chk_MANI.U88
-rw-r--r--mcon/U/Chk_whoami.U25
-rw-r--r--mcon/U/Compile.U63
-rw-r--r--mcon/U/Config_h.U114
-rw-r--r--mcon/U/Config_sh.U110
-rw-r--r--mcon/U/Configdir.U28
-rw-r--r--mcon/U/Cppsym.U286
-rw-r--r--mcon/U/Cross.U350
-rw-r--r--mcon/U/Csym.U111
-rw-r--r--mcon/U/End.U27
-rw-r--r--mcon/U/Extract.U106
-rw-r--r--mcon/U/Extractall.U51
-rw-r--r--mcon/U/Filexp.U73
-rw-r--r--mcon/U/Findhdr.U73
-rw-r--r--mcon/U/Finish.U141
-rw-r--r--mcon/U/GCC_pipe.U65
-rw-r--r--mcon/U/Getfile.U340
-rw-r--r--mcon/U/Guess.U248
-rw-r--r--mcon/U/Head.U282
-rw-r--r--mcon/U/Inhdr.U77
-rw-r--r--mcon/U/Init.U81
-rw-r--r--mcon/U/Inlibc.U64
-rw-r--r--mcon/U/Instruct.U116
-rw-r--r--mcon/U/Largefile.U74
-rw-r--r--mcon/U/Loc.U442
-rw-r--r--mcon/U/Loc_sed.U33
-rw-r--r--mcon/U/Magic_h.U43
-rw-r--r--mcon/U/MailAuthor.U192
-rw-r--r--mcon/U/MailList.U82
-rw-r--r--mcon/U/Mips.U69
-rw-r--r--mcon/U/Mkdirp.U51
-rw-r--r--mcon/U/Mksymlinks.U90
-rw-r--r--mcon/U/Myinit.U26
-rw-r--r--mcon/U/Myread.U199
-rw-r--r--mcon/U/Nothing.U19
-rw-r--r--mcon/U/Null.U20
-rw-r--r--mcon/U/Obsol_h.U28
-rw-r--r--mcon/U/Obsol_sh.U27
-rw-r--r--mcon/U/Oldconfig.U715
-rw-r--r--mcon/U/Oldsym.U72
-rw-r--r--mcon/U/Options.U374
-rw-r--r--mcon/U/Prefixit.U68
-rw-r--r--mcon/U/Prefixup.U38
-rw-r--r--mcon/U/Rcs.U34
-rw-r--r--mcon/U/Sendfile64.U36
-rw-r--r--mcon/U/Setvar.U50
-rw-r--r--mcon/U/Signal.U271
-rw-r--r--mcon/U/Tr.U103
-rw-r--r--mcon/U/Trylink.U110
-rw-r--r--mcon/U/Typedef.U63
-rw-r--r--mcon/U/Unix.U70
-rw-r--r--mcon/U/Warn.U57
-rw-r--r--mcon/U/Warn_v7EXT.U34
-rw-r--r--mcon/U/Warn_v7ND.U33
-rw-r--r--mcon/U/Whoa.U51
-rw-r--r--mcon/U/abortsig.U80
-rw-r--r--mcon/U/active.U50
-rw-r--r--mcon/U/afs.U55
-rw-r--r--mcon/U/alignbytes.U141
-rw-r--r--mcon/U/archlib.U125
-rw-r--r--mcon/U/archname.U76
-rw-r--r--mcon/U/baserev.U22
-rw-r--r--mcon/U/basicshell.U47
-rw-r--r--mcon/U/bin.U88
-rw-r--r--mcon/U/bitpbyte.U74
-rw-r--r--mcon/U/byteorder.U68
-rw-r--r--mcon/U/cc.U58
-rw-r--r--mcon/U/ccflags.U457
-rw-r--r--mcon/U/cf_email.U69
-rw-r--r--mcon/U/cf_name.U72
-rw-r--r--mcon/U/cf_who.U65
-rw-r--r--mcon/U/charorder.U143
-rw-r--r--mcon/U/charsize.U64
-rw-r--r--mcon/U/contains.U43
-rw-r--r--mcon/U/cpp_stuff.U157
-rw-r--r--mcon/U/cpp_trad.U41
-rw-r--r--mcon/U/cppfilecom.U204
-rw-r--r--mcon/U/cppstdin.U249
-rw-r--r--mcon/U/d_NOFILE.U189
-rw-r--r--mcon/U/d_NeWS.U102
-rw-r--r--mcon/U/d_PORTAR.U79
-rw-r--r--mcon/U/d_SHM_MAC.U141
-rw-r--r--mcon/U/d_access.U93
-rw-r--r--mcon/U/d_alarm.U46
-rw-r--r--mcon/U/d_arc4random.U40
-rw-r--r--mcon/U/d_attribut.U51
-rw-r--r--mcon/U/d_backtrace.U45
-rw-r--r--mcon/U/d_bcmp.U54
-rw-r--r--mcon/U/d_bcopy.U68
-rw-r--r--mcon/U/d_bfd_lib.U51
-rw-r--r--mcon/U/d_bindtxtcode.U38
-rw-r--r--mcon/U/d_brokstat.U75
-rw-r--r--mcon/U/d_bsdjmp.U85
-rw-r--r--mcon/U/d_bsearch.U39
-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.U33
-rw-r--r--mcon/U/d_bzero.U54
-rw-r--r--mcon/U/d_casti32.U87
-rw-r--r--mcon/U/d_castneg.U143
-rw-r--r--mcon/U/d_cbrt.U42
-rw-r--r--mcon/U/d_charsprf.U52
-rw-r--r--mcon/U/d_chown.U49
-rw-r--r--mcon/U/d_chroot.U46
-rw-r--r--mcon/U/d_chsize.U42
-rw-r--r--mcon/U/d_ckeypad.U56
-rw-r--r--mcon/U/d_clearenv.U38
-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.U121
-rw-r--r--mcon/U/d_closefrom.U45
-rw-r--r--mcon/U/d_const.U69
-rw-r--r--mcon/U/d_crypt.U82
-rw-r--r--mcon/U/d_csh.U62
-rw-r--r--mcon/U/d_ctermid.U41
-rw-r--r--mcon/U/d_cuserid.U44
-rw-r--r--mcon/U/d_datastart_symbol.U64
-rw-r--r--mcon/U/d_dbl_dig.U61
-rw-r--r--mcon/U/d_debugging.U42
-rw-r--r--mcon/U/d_deflate.U42
-rw-r--r--mcon/U/d_devpoll.U52
-rw-r--r--mcon/U/d_difftime.U80
-rw-r--r--mcon/U/d_dirent_d_namlen.U42
-rw-r--r--mcon/U/d_dirent_d_type.U52
-rw-r--r--mcon/U/d_dirfd.U42
-rw-r--r--mcon/U/d_dladdr.U42
-rw-r--r--mcon/U/d_dlerror.U50
-rw-r--r--mcon/U/d_dliterphdr.U44
-rw-r--r--mcon/U/d_dlopen.U49
-rw-r--r--mcon/U/d_dosuid.U169
-rw-r--r--mcon/U/d_drem.U45
-rw-r--r--mcon/U/d_dup2.U44
-rw-r--r--mcon/U/d_end_symbol.U37
-rw-r--r--mcon/U/d_eofpipe.U93
-rw-r--r--mcon/U/d_epoll.U51
-rw-r--r--mcon/U/d_etext_symbol.U37
-rw-r--r--mcon/U/d_euc2jis.U32
-rw-r--r--mcon/U/d_fast_assert.U85
-rw-r--r--mcon/U/d_fchdir.U40
-rw-r--r--mcon/U/d_fchmod.U47
-rw-r--r--mcon/U/d_fchown.U48
-rw-r--r--mcon/U/d_fcntl.U48
-rw-r--r--mcon/U/d_fd_set.U141
-rw-r--r--mcon/U/d_fdatasync.U41
-rw-r--r--mcon/U/d_fdopendir.U42
-rw-r--r--mcon/U/d_ffs.U43
-rw-r--r--mcon/U/d_fgetpos.U42
-rw-r--r--mcon/U/d_flexfnam.U79
-rw-r--r--mcon/U/d_flock.U44
-rw-r--r--mcon/U/d_fmod.U44
-rw-r--r--mcon/U/d_fork.U47
-rw-r--r--mcon/U/d_fsetpos.U42
-rw-r--r--mcon/U/d_fstatat.U43
-rw-r--r--mcon/U/d_fsync.U41
-rw-r--r--mcon/U/d_ftime.U100
-rw-r--r--mcon/U/d_ftrncate.U46
-rw-r--r--mcon/U/d_gconvert.U147
-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.U48
-rw-r--r--mcon/U/d_gethbynm.U42
-rw-r--r--mcon/U/d_gethent.U41
-rw-r--r--mcon/U/d_gethid.U44
-rw-r--r--mcon/U/d_gethname.U287
-rw-r--r--mcon/U/d_getifaddrs.U54
-rw-r--r--mcon/U/d_getinvent.U37
-rw-r--r--mcon/U/d_getlogin.U47
-rw-r--r--mcon/U/d_getnameinfo.U73
-rw-r--r--mcon/U/d_getopt.U46
-rw-r--r--mcon/U/d_getpagsz.U122
-rw-r--r--mcon/U/d_getpgid.U48
-rw-r--r--mcon/U/d_getpgrp.U83
-rw-r--r--mcon/U/d_getpgrp2.U46
-rw-r--r--mcon/U/d_getppid.U48
-rw-r--r--mcon/U/d_getprior.U47
-rw-r--r--mcon/U/d_getprogname.U40
-rw-r--r--mcon/U/d_getpwent.U42
-rw-r--r--mcon/U/d_getpwnam.U38
-rw-r--r--mcon/U/d_getpwuid.U38
-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.U48
-rw-r--r--mcon/U/d_gnugettext.U54
-rw-r--r--mcon/U/d_gnulibc.U98
-rw-r--r--mcon/U/d_group.U23
-rw-r--r--mcon/U/d_havetlib.U125
-rw-r--r--mcon/U/d_herror.U36
-rw-r--r--mcon/U/d_hidnet.U68
-rw-r--r--mcon/U/d_hstrerror.U37
-rw-r--r--mcon/U/d_htonl.U80
-rw-r--r--mcon/U/d_iconv.U47
-rw-r--r--mcon/U/d_ieee754.U88
-rw-r--r--mcon/U/d_inetaton.U48
-rw-r--r--mcon/U/d_inetd.U70
-rw-r--r--mcon/U/d_inflate.U42
-rw-r--r--mcon/U/d_initstate.U43
-rw-r--r--mcon/U/d_internet.U52
-rw-r--r--mcon/U/d_iptos.U94
-rw-r--r--mcon/U/d_ipv6.U91
-rw-r--r--mcon/U/d_isascii.U46
-rw-r--r--mcon/U/d_itimer.U46
-rw-r--r--mcon/U/d_keepsig.U81
-rw-r--r--mcon/U/d_kevent_udata.U49
-rw-r--r--mcon/U/d_killpg.U45
-rw-r--r--mcon/U/d_kqueue.U57
-rw-r--r--mcon/U/d_link.U44
-rw-r--r--mcon/U/d_linuxstd.U55
-rw-r--r--mcon/U/d_locale_charset.U39
-rw-r--r--mcon/U/d_locconv.U46
-rw-r--r--mcon/U/d_lockf.U51
-rw-r--r--mcon/U/d_lstat.U45
-rw-r--r--mcon/U/d_madvise.U43
-rw-r--r--mcon/U/d_mblen.U48
-rw-r--r--mcon/U/d_mbstowcs.U46
-rw-r--r--mcon/U/d_mbtowc.U47
-rw-r--r--mcon/U/d_memalign.U48
-rw-r--r--mcon/U/d_memccpy.U45
-rw-r--r--mcon/U/d_memchr.U44
-rw-r--r--mcon/U/d_memcmp.U45
-rw-r--r--mcon/U/d_memcpy.U46
-rw-r--r--mcon/U/d_memmove.U45
-rw-r--r--mcon/U/d_mempcpy.U51
-rw-r--r--mcon/U/d_memset.U47
-rw-r--r--mcon/U/d_mkdir.U48
-rw-r--r--mcon/U/d_mkfifo.U51
-rw-r--r--mcon/U/d_mktime.U44
-rw-r--r--mcon/U/d_mmap.U53
-rw-r--r--mcon/U/d_msem_lck.U42
-rw-r--r--mcon/U/d_msg.U64
-rw-r--r--mcon/U/d_msg_flags.U59
-rw-r--r--mcon/U/d_msgctl.U44
-rw-r--r--mcon/U/d_msgget.U45
-rw-r--r--mcon/U/d_msgrcv.U47
-rw-r--r--mcon/U/d_msgsnd.U44
-rw-r--r--mcon/U/d_msync.U49
-rw-r--r--mcon/U/d_munmap.U46
-rw-r--r--mcon/U/d_nanosleep.U38
-rw-r--r--mcon/U/d_newsadm.U72
-rw-r--r--mcon/U/d_nice.U46
-rw-r--r--mcon/U/d_nls.U45
-rw-r--r--mcon/U/d_nolnbuf.U99
-rw-r--r--mcon/U/d_normsig.U57
-rw-r--r--mcon/U/d_open3.U90
-rw-r--r--mcon/U/d_openat.U38
-rw-r--r--mcon/U/d_passwd.U23
-rw-r--r--mcon/U/d_pathconf.U83
-rw-r--r--mcon/U/d_pause.U47
-rw-r--r--mcon/U/d_perror.U53
-rw-r--r--mcon/U/d_pidcheck.U75
-rw-r--r--mcon/U/d_pipe.U47
-rw-r--r--mcon/U/d_pipe2.U46
-rw-r--r--mcon/U/d_poll.U64
-rw-r--r--mcon/U/d_popen.U42
-rw-r--r--mcon/U/d_portable.U71
-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.U48
-rw-r--r--mcon/U/d_preadv.U48
-rw-r--r--mcon/U/d_proginvocname.U40
-rw-r--r--mcon/U/d_psignal.U41
-rw-r--r--mcon/U/d_ptattr_setstack.U40
-rw-r--r--mcon/U/d_pwrite.U48
-rw-r--r--mcon/U/d_pwritev.U48
-rw-r--r--mcon/U/d_random.U40
-rw-r--r--mcon/U/d_raster.U57
-rw-r--r--mcon/U/d_rdchk.U42
-rw-r--r--mcon/U/d_readdir.U135
-rw-r--r--mcon/U/d_readlink.U49
-rw-r--r--mcon/U/d_recvmsg.U70
-rw-r--r--mcon/U/d_regcmp.U64
-rw-r--r--mcon/U/d_regcomp.U44
-rw-r--r--mcon/U/d_regparm.U48
-rw-r--r--mcon/U/d_rename.U43
-rw-r--r--mcon/U/d_rmdir.U45
-rw-r--r--mcon/U/d_rusage.U53
-rw-r--r--mcon/U/d_sa_interrupt.U37
-rw-r--r--mcon/U/d_safebcpy.U124
-rw-r--r--mcon/U/d_safemcpy.U127
-rw-r--r--mcon/U/d_sanemcmp.U88
-rw-r--r--mcon/U/d_sbrk.U44
-rw-r--r--mcon/U/d_scandir.U58
-rw-r--r--mcon/U/d_scannl.U74
-rw-r--r--mcon/U/d_sched_yield.U36
-rw-r--r--mcon/U/d_scorfl.U58
-rw-r--r--mcon/U/d_select.U61
-rw-r--r--mcon/U/d_sem.U62
-rw-r--r--mcon/U/d_semctl.U52
-rw-r--r--mcon/U/d_semget.U46
-rw-r--r--mcon/U/d_semop.U84
-rw-r--r--mcon/U/d_sendfile.U41
-rw-r--r--mcon/U/d_sendmsg.U70
-rw-r--r--mcon/U/d_setegid.U47
-rw-r--r--mcon/U/d_setenv.U38
-rw-r--r--mcon/U/d_seteuid.U47
-rw-r--r--mcon/U/d_setgrps.U48
-rw-r--r--mcon/U/d_setlnbuf.U45
-rw-r--r--mcon/U/d_setlocale.U47
-rw-r--r--mcon/U/d_setpgid.U52
-rw-r--r--mcon/U/d_setpgrp.U96
-rw-r--r--mcon/U/d_setpgrp2.U47
-rw-r--r--mcon/U/d_setprior.U47
-rw-r--r--mcon/U/d_setproctitle.U45
-rw-r--r--mcon/U/d_setprogname.U40
-rw-r--r--mcon/U/d_setregid.U78
-rw-r--r--mcon/U/d_setreuid.U78
-rw-r--r--mcon/U/d_setrgid.U47
-rw-r--r--mcon/U/d_setrlimit.U47
-rw-r--r--mcon/U/d_setruid.U47
-rw-r--r--mcon/U/d_setsid.U48
-rw-r--r--mcon/U/d_sgndchr.U50
-rw-r--r--mcon/U/d_shm.U45
-rw-r--r--mcon/U/d_shmat.U147
-rw-r--r--mcon/U/d_shmctl.U44
-rw-r--r--mcon/U/d_shmdt.U42
-rw-r--r--mcon/U/d_shmget.U46
-rw-r--r--mcon/U/d_sigaction.U45
-rw-r--r--mcon/U/d_sigaltstack.U42
-rw-r--r--mcon/U/d_sigblock.U41
-rw-r--r--mcon/U/d_sighold.U41
-rw-r--r--mcon/U/d_siglist.U41
-rw-r--r--mcon/U/d_sigprocmask.U42
-rw-r--r--mcon/U/d_sigsetjmp.U104
-rw-r--r--mcon/U/d_sigsetmk.U43
-rw-r--r--mcon/U/d_sigvec.U99
-rw-r--r--mcon/U/d_sjis2jis.U32
-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.U140
-rw-r--r--mcon/U/d_speedopt.U62
-rw-r--r--mcon/U/d_srandom.U39
-rw-r--r--mcon/U/d_stat.U45
-rw-r--r--mcon/U/d_statblks.U46
-rw-r--r--mcon/U/d_statfs.U50
-rw-r--r--mcon/U/d_statvfs.U39
-rw-r--r--mcon/U/d_stdstdio.U325
-rw-r--r--mcon/U/d_strcasestr.U37
-rw-r--r--mcon/U/d_strccmp.U49
-rw-r--r--mcon/U/d_strchr.U87
-rw-r--r--mcon/U/d_strcoll.U43
-rw-r--r--mcon/U/d_strcspn.U42
-rw-r--r--mcon/U/d_strctcpy.U53
-rw-r--r--mcon/U/d_strdup.U43
-rw-r--r--mcon/U/d_strerror.U117
-rw-r--r--mcon/U/d_strftime.U43
-rw-r--r--mcon/U/d_strlcat.U38
-rw-r--r--mcon/U/d_strlcpy.U38
-rw-r--r--mcon/U/d_strstr.U41
-rw-r--r--mcon/U/d_strtod.U48
-rw-r--r--mcon/U/d_strtok.U45
-rw-r--r--mcon/U/d_strtol.U46
-rw-r--r--mcon/U/d_strtoul.U48
-rw-r--r--mcon/U/d_strxfrm.U44
-rw-r--r--mcon/U/d_su_chown.U41
-rw-r--r--mcon/U/d_symlink.U45
-rw-r--r--mcon/U/d_sync_atomic.U42
-rw-r--r--mcon/U/d_syscall.U45
-rw-r--r--mcon/U/d_sysconf.U47
-rw-r--r--mcon/U/d_sysctl.U41
-rw-r--r--mcon/U/d_syslog.U45
-rw-r--r--mcon/U/d_system.U44
-rw-r--r--mcon/U/d_table.U45
-rw-r--r--mcon/U/d_tcgtpgrp.U48
-rw-r--r--mcon/U/d_tcstpgrp.U49
-rw-r--r--mcon/U/d_time.U66
-rw-r--r--mcon/U/d_times.U74
-rw-r--r--mcon/U/d_tminsys.U41
-rw-r--r--mcon/U/d_truncate.U46
-rw-r--r--mcon/U/d_ttyname.U47
-rw-r--r--mcon/U/d_tzmin.U53
-rw-r--r--mcon/U/d_tzname.U45
-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.U42
-rw-r--r--mcon/U/d_umask.U48
-rw-r--r--mcon/U/d_unsetenv.U38
-rw-r--r--mcon/U/d_usendir.U79
-rw-r--r--mcon/U/d_usleep.U44
-rw-r--r--mcon/U/d_uwait.U123
-rw-r--r--mcon/U/d_vfork.U105
-rw-r--r--mcon/U/d_voidsig.U89
-rw-r--r--mcon/U/d_volatile.U79
-rw-r--r--mcon/U/d_vprintf.U81
-rw-r--r--mcon/U/d_vsnprintf.U47
-rw-r--r--mcon/U/d_wait3.U53
-rw-r--r--mcon/U/d_wait4.U52
-rw-r--r--mcon/U/d_waitpid.U48
-rw-r--r--mcon/U/d_wcstombs.U47
-rw-r--r--mcon/U/d_wctomb.U53
-rw-r--r--mcon/U/d_wifstat.U87
-rw-r--r--mcon/U/d_xdrs.U42
-rw-r--r--mcon/U/defeditor.U45
-rw-r--r--mcon/U/doublesize.U58
-rw-r--r--mcon/U/ebcdic.U58
-rw-r--r--mcon/U/enablenls.U61
-rw-r--r--mcon/U/errnolist.U106
-rw-r--r--mcon/U/etc.U42
-rw-r--r--mcon/U/fieldn.U82
-rw-r--r--mcon/U/filexp_path.U30
-rw-r--r--mcon/U/floatsize.U58
-rw-r--r--mcon/U/fpostype.U39
-rw-r--r--mcon/U/fpu.U73
-rw-r--r--mcon/U/gccvers.U110
-rw-r--r--mcon/U/gidtype.U61
-rw-r--r--mcon/U/groupstype.U63
-rw-r--r--mcon/U/h_fcntl.U23
-rw-r--r--mcon/U/h_sysfile.U23
-rw-r--r--mcon/U/i_alloca.U36
-rw-r--r--mcon/U/i_arpainet.U31
-rw-r--r--mcon/U/i_db.U146
-rw-r--r--mcon/U/i_dbm.U97
-rw-r--r--mcon/U/i_dirent.U146
-rw-r--r--mcon/U/i_dld.U34
-rw-r--r--mcon/U/i_dlfcn.U34
-rw-r--r--mcon/U/i_execinfo.U27
-rw-r--r--mcon/U/i_fcntl.U61
-rw-r--r--mcon/U/i_float.U35
-rw-r--r--mcon/U/i_gdbm.U46
-rw-r--r--mcon/U/i_grp.U31
-rw-r--r--mcon/U/i_iconv.U31
-rw-r--r--mcon/U/i_ifaddrs.U27
-rw-r--r--mcon/U/i_inttypes.U35
-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.U33
-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.U32
-rw-r--r--mcon/U/i_malloc.U31
-rw-r--r--mcon/U/i_math.U52
-rw-r--r--mcon/U/i_memory.U65
-rw-r--r--mcon/U/i_mswsock.U27
-rw-r--r--mcon/U/i_ndbm.U49
-rw-r--r--mcon/U/i_netdb.U27
-rw-r--r--mcon/U/i_neterrno.U65
-rw-r--r--mcon/U/i_netif.U27
-rw-r--r--mcon/U/i_netroute.U30
-rw-r--r--mcon/U/i_niin.U45
-rw-r--r--mcon/U/i_niip.U30
-rw-r--r--mcon/U/i_poll.U28
-rw-r--r--mcon/U/i_pthread.U26
-rw-r--r--mcon/U/i_pwd.U162
-rw-r--r--mcon/U/i_regex.U35
-rw-r--r--mcon/U/i_sched.U25
-rw-r--r--mcon/U/i_sfio.U32
-rw-r--r--mcon/U/i_stddef.U32
-rw-r--r--mcon/U/i_stdlib.U32
-rw-r--r--mcon/U/i_string.U62
-rw-r--r--mcon/U/i_sysdir.U34
-rw-r--r--mcon/U/i_sysfile.U60
-rw-r--r--mcon/U/i_sysioctl.U202
-rw-r--r--mcon/U/i_sysipc.U28
-rw-r--r--mcon/U/i_sysmman.U34
-rw-r--r--mcon/U/i_sysmount.U29
-rw-r--r--mcon/U/i_sysndir.U31
-rw-r--r--mcon/U/i_sysparam.U31
-rw-r--r--mcon/U/i_syspoll.U28
-rw-r--r--mcon/U/i_sysresrc.U34
-rw-r--r--mcon/U/i_sysselct.U39
-rw-r--r--mcon/U/i_syssem.U28
-rw-r--r--mcon/U/i_syssendfile.U27
-rw-r--r--mcon/U/i_syssock.U32
-rw-r--r--mcon/U/i_sysstat.U32
-rw-r--r--mcon/U/i_sysstatvfs.U29
-rw-r--r--mcon/U/i_syssysctl.U27
-rw-r--r--mcon/U/i_systable.U32
-rw-r--r--mcon/U/i_systimeb.U55
-rw-r--r--mcon/U/i_systimes.U31
-rw-r--r--mcon/U/i_systwgcf.U31
-rw-r--r--mcon/U/i_systypes.U34
-rw-r--r--mcon/U/i_sysun.U35
-rw-r--r--mcon/U/i_sysutsname.U27
-rw-r--r--mcon/U/i_sysvfs.U29
-rw-r--r--mcon/U/i_syswait.U34
-rw-r--r--mcon/U/i_termio.U134
-rw-r--r--mcon/U/i_time.U171
-rw-r--r--mcon/U/i_ucontext.U96
-rw-r--r--mcon/U/i_unistd.U31
-rw-r--r--mcon/U/i_utime.U31
-rw-r--r--mcon/U/i_values.U35
-rw-r--r--mcon/U/i_varhdr.U165
-rw-r--r--mcon/U/i_vfork.U40
-rw-r--r--mcon/U/i_whoami.U35
-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.U39
-rw-r--r--mcon/U/install.U199
-rw-r--r--mcon/U/intsize.U89
-rw-r--r--mcon/U/ipc.U171
-rw-r--r--mcon/U/issymlink.U86
-rw-r--r--mcon/U/kernel.U63
-rw-r--r--mcon/U/lex.U67
-rw-r--r--mcon/U/lib.U54
-rw-r--r--mcon/U/libc.U405
-rw-r--r--mcon/U/libdbm.U47
-rw-r--r--mcon/U/libflex.U65
-rw-r--r--mcon/U/libnlist.U49
-rw-r--r--mcon/U/libnm.U45
-rw-r--r--mcon/U/libpth.U133
-rw-r--r--mcon/U/libs.U256
-rw-r--r--mcon/U/libyacc.U64
-rw-r--r--mcon/U/lintlib.U38
-rw-r--r--mcon/U/lns.U41
-rw-r--r--mcon/U/locale.U70
-rw-r--r--mcon/U/locdist.U174
-rw-r--r--mcon/U/longsize.U24
-rw-r--r--mcon/U/lseektype.U40
-rw-r--r--mcon/U/maildir.U41
-rw-r--r--mcon/U/mailer.U61
-rw-r--r--mcon/U/mailfile.U56
-rw-r--r--mcon/U/make.U60
-rw-r--r--mcon/U/mallocsrc.U181
-rw-r--r--mcon/U/man1dir.U147
-rw-r--r--mcon/U/man3dir.U158
-rw-r--r--mcon/U/manfmt.U118
-rw-r--r--mcon/U/mansrc.U150
-rw-r--r--mcon/U/mboxchar.U70
-rw-r--r--mcon/U/mkdep.U271
-rw-r--r--mcon/U/models.U214
-rw-r--r--mcon/U/modetype.U40
-rw-r--r--mcon/U/msgmerge_update.U29
-rw-r--r--mcon/U/myhostname.U284
-rw-r--r--mcon/U/n.U45
-rw-r--r--mcon/U/nametype.U134
-rw-r--r--mcon/U/nblock_io.U261
-rw-r--r--mcon/U/newslevel.U53
-rw-r--r--mcon/U/newslib.U61
-rw-r--r--mcon/U/newsspool.U52
-rw-r--r--mcon/U/nis.U168
-rw-r--r--mcon/U/nlist_pfx.U135
-rw-r--r--mcon/U/official.U47
-rw-r--r--mcon/U/orderlib.U95
-rw-r--r--mcon/U/orgname.U65
-rw-r--r--mcon/U/packadmin.U33
-rw-r--r--mcon/U/package.U56
-rw-r--r--mcon/U/pager.U62
-rw-r--r--mcon/U/patchlevel.U69
-rw-r--r--mcon/U/perlpath.U56
-rw-r--r--mcon/U/pidtype.U39
-rw-r--r--mcon/U/pkgsrc.U26
-rw-r--r--mcon/U/prefix.U80
-rw-r--r--mcon/U/prefshell.U60
-rw-r--r--mcon/U/privlib.U96
-rw-r--r--mcon/U/prototype.U117
-rw-r--r--mcon/U/ptrsize.U53
-rw-r--r--mcon/U/randbits.U83
-rw-r--r--mcon/U/randfunc.U164
-rw-r--r--mcon/U/rcs_branch.U43
-rw-r--r--mcon/U/registers.U103
-rw-r--r--mcon/U/rootid.U35
-rw-r--r--mcon/U/sbrksmart.U85
-rw-r--r--mcon/U/sbrktype.U44
-rw-r--r--mcon/U/scriptdir.U110
-rw-r--r--mcon/U/selecttype.U116
-rw-r--r--mcon/U/sh.U92
-rw-r--r--mcon/U/shm_for.U118
-rw-r--r--mcon/U/sig_name.U157
-rw-r--r--mcon/U/sitearch.U94
-rw-r--r--mcon/U/sitelib.U97
-rw-r--r--mcon/U/sizetype.U40
-rw-r--r--mcon/U/so.U50
-rw-r--r--mcon/U/sockopt.U88
-rw-r--r--mcon/U/spitshell.U107
-rw-r--r--mcon/U/src.U96
-rw-r--r--mcon/U/ssizetype.U91
-rw-r--r--mcon/U/startperl.U95
-rw-r--r--mcon/U/startsh.U50
-rw-r--r--mcon/U/stdchar.U40
-rw-r--r--mcon/U/sunscanf.U55
-rw-r--r--mcon/U/sysman.U50
-rw-r--r--mcon/U/trnl.U56
-rw-r--r--mcon/U/uidtype.U57
-rw-r--r--mcon/U/usenm.U144
-rw-r--r--mcon/U/usesocks.U46
-rw-r--r--mcon/U/usrinc.U54
-rw-r--r--mcon/U/vaproto.U65
-rw-r--r--mcon/U/voidflags.U180
-rw-r--r--mcon/U/warnflags.U55
-rw-r--r--mcon/U/yacc.U90
594 files changed, 41275 insertions, 0 deletions
diff --git a/mcon/U/AAAAA.U b/mcon/U/AAAAA.U
new file mode 100644
index 0000000..9869673
--- /dev/null
+++ b/mcon/U/AAAAA.U
@@ -0,0 +1,46 @@
+?RCS: $Id$
+?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: AAAAA.U,v $
+?RCS: Revision 3.0.1.4 1994/06/20 06:50:26 ram
+?RCS: patch30: changes from Jarkko Hietaniemi are tagged with JHI
+?RCS:
+?RCS: Revision 3.0.1.3 1994/05/06 14:01:39 ram
+?RCS: patch23: initials for Wayne Davison are now WED
+?RCS: patch23: added initials for new unit contributor Andy Dougherty
+?RCS:
+?RCS: Revision 3.0.1.2 1994/01/24 14:01:09 ram
+?RCS: patch16: make metalint shut up on special unit definition for All target
+?RCS:
+?RCS: Revision 3.0.1.1 1993/09/13 15:43:57 ram
+?RCS: patch10: documents initials used for Wayne Davison's contributions
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:04:44 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: The purpose of this file is to supply the head of the Makefile created
+?X: by metaconfig. For this reason it must be first in alphabetical order.
+?X: The leading '+' in front of the unit name is a hint for metalint, since
+?X: the use of that special unit name as a "made" unit is legitimate here.
+?X:
+?MAKE:+All: Finish
+?X:
+?X: Throughout the units, the following initials are used to identify comments:
+?X:
+?X: HMS: Harlan Stenn
+?X: RAM: Raphael Manfredi
+?X: WED: Wayne Davison (was WAD by mistake--RAM)
+?X: ADO: Andy Dougherty
+?X: JHI: Jarkko Hietaniemi
+?X:
+?X: Agreed, this is a weird place to document it, but I couldn't find a better
+?X: place to do so. I've bet on the curiosity of users, who would probably
+?X: want to know what's in this strangely-named file--RAM.
diff --git a/mcon/U/Alpha_mieee.U b/mcon/U/Alpha_mieee.U
new file mode 100644
index 0000000..2f0f5a0
--- /dev/null
+++ b/mcon/U/Alpha_mieee.U
@@ -0,0 +1,41 @@
+?RCS: $Id$
+?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..76de54d
--- /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
new file mode 100644
index 0000000..d987c46
--- /dev/null
+++ b/mcon/U/Begin.U
@@ -0,0 +1,39 @@
+?RCS: $Id$
+?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: Begin.U,v $
+?RCS: Revision 3.0.1.3 1997/02/28 14:56:35 ram
+?RCS: patch61: added Extractall dependency
+?RCS:
+?RCS: Revision 3.0.1.2 1995/01/30 14:25:08 ram
+?RCS: patch49: avoid an empty rmlist: systems might choke on it (WED)
+?RCS:
+?RCS: Revision 3.0.1.1 1994/10/31 09:32:20 ram
+?RCS: patch44: created
+?RCS:
+?X:
+?X: This file comes after option processing had been done and after all
+?X: the default values have been set up. It marks the beginning of questions.
+?X: It is important that Options be listed *after* Myinit to ensure that the
+?X: default initializations performed by Init and Myinit will not clobber
+?X: any setting done on the command line via -D or -U.
+?X:
+?MAKE:Begin: Myinit Options package Extractall
+?MAKE: -pick add $@ %<
+: Eunice requires " " instead of "", can you believe it
+echo " "
+: Here we go...
+echo "Beginning of configuration questions for $package."
+
+?X: Make sure the rm below is given a non-empty list for some systems.
+?X: This is run only when within the UU directory, hence we can safely
+?X: attempt to rm a non-existent 'X' file...
+trap 'echo " "; test -d ../UU && rm -rf X $rmlist; exit 1' 1 2 3 15
+
diff --git a/mcon/U/Checkcc.U b/mcon/U/Checkcc.U
new file mode 100644
index 0000000..3cae05c
--- /dev/null
+++ b/mcon/U/Checkcc.U
@@ -0,0 +1,135 @@
+?RCS: $Id$
+?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: Copyright (c) 2000, Jarkko Hietaniemi
+?RCS:
+?X:
+?X: This unit produces a bit of shell code that must be dotted in order
+?X: to make quick check on whether the current C compiler is working.
+?X:
+?MAKE:Checkcc ccname ccversion: Myread Warn startsh cat contains test
+?MAKE: -pick add $@ %<
+?S:ccname:
+?S: This can set either by hints files or by Configure. If using
+?S: gcc, this is gcc, and if not, usually equal to cc, unimpressive, no?
+?S: Some platforms, however, make good use of this by storing the
+?S: flavor of the C compiler being used here. For example if using
+?S: the Sun WorkShop suite, ccname will be 'workshop'.
+?S:.
+?S:ccversion:
+?S: This can set either by hints files or by Configure. If using
+?S: a (non-gcc) vendor cc, this variable may contain a version for
+?S: the compiler.
+?S:.
+?F:./checkcc ./trygcc !checktmp
+?V:despair
+?T:trygcc
+?LINT:extern cc rm ccflags ldflags
+?LINT:change cc ccflags
+?LINT:usefile checktmp
+?INIT:ccname=''
+?INIT:ccversion=''
+: generate the trygcc script for later perusal
+cat <<EOS >trygcc
+$startsh
+EOS
+cat <<'EOSC' >>trygcc
+case "$cc" in
+'') ;;
+*) $rm -f try try.*
+ $cat >try.c <<EOM
+int main(int argc, char *argv[]) {
+ (void) argc;
+ (void) argv;
+ return 0;
+}
+EOM
+ if $cc -o try $ccflags $ldflags try.c; then
+ :
+ else
+ echo "Uh-oh, the C compiler '$cc' doesn't seem to be working." >&4
+ despair=yes
+ trygcc=yes
+ case "$cc" in
+ *gcc*) trygcc=no ;;
+ esac
+ case "`$cc -v -c try.c 2>&1`" in
+ *gcc*) trygcc=no ;;
+ esac
+ if $test X"$trygcc" = Xyes; then
+ if gcc -o try -c try.c; then
+ echo " "
+ echo "You seem to have a working gcc, though." >&4
+ rp="Would you like to use it?"
+ dflt=y
+ if $test -f myread; then
+ . ./myread
+ else
+ if $test -f UU/myread; then
+ . ./UU/myread
+ else
+ echo "Cannot find myread, sorry. Aborting." >&2
+ exit 1
+ fi
+ fi
+ case "$ans" in
+ [yY]*) cc=gcc; ccname=gcc; ccflags=''; despair=no;
+?X: Look whether we have 'call-back units' generated by hints that would
+?X: seemingly affect the compiling environment.
+ $cat *.cbu >checktmp 2>/dev/null
+ if $contains ccflags checktmp >/dev/null; then
+ ./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
+ fi;;
+ esac
+ fi
+ fi
+ fi
+ $rm -f try try.*
+ ;;
+esac
+EOSC
+
+: generate the checkcc script for later perusal
+cat <<EOS >checkcc
+$startsh
+EOS
+cat <<'EOSC' >>checkcc
+case "$cc" in
+'') ;;
+*) $rm -f try try.*
+ $cat >try.c <<EOM
+int main(int argc, char *argv[]) {
+ (void) argc;
+ (void) argv;
+ return 0;
+}
+EOM
+ if $cc -o try $ccflags $ldflags try.c; then
+ :
+ else
+ if $test X"$despair" = Xyes; then
+ echo "Uh-oh, the C compiler '$cc' doesn't seem to be working." >&4
+ fi
+ $cat >&4 <<EOM
+You need to find a working C compiler.
+Either (purchase and) install the C compiler supplied by your OS vendor,
+or for a free C compiler try http://gcc.gnu.org/
+I cannot continue any further, aborting.
+EOM
+ exit 1
+ fi
+ $rm -f try try.*
+ ;;
+esac
+EOSC
+
diff --git a/mcon/U/Chk_MANI.U b/mcon/U/Chk_MANI.U
new file mode 100644
index 0000000..e991a1a
--- /dev/null
+++ b/mcon/U/Chk_MANI.U
@@ -0,0 +1,88 @@
+?RCS: $Id$
+?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: Chk_MANI.U,v $
+?RCS: Revision 3.0.1.2 1997/02/28 14:57:25 ram
+?RCS: patch61: added support for src.U
+?RCS:
+?RCS: Revision 3.0.1.1 1994/10/31 09:33:14 ram
+?RCS: patch44: now lists Begin instead of Myinit in its dependencies
+?RCS: patch44: leading comment now explains how this unit is included
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:04:45 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: This unit checks the package by making sure every file listed in MANIFEST
+?X: is present. It is systematically "included" via the Finish unit (which
+?X: is always present in every Configure script), although it may result in
+?X: an empty inclusion when no MANIFEST is present.
+?X:
+?MAKE:Chk_MANI: Begin c n rsrc
+?MAKE: -pick wipe $@ %<
+?T:filelist ans tmppwd
+?X: This check happens at metaconfig-time, so it's ok to hard-code the path.
+@if {test -f ../MANIFEST}
+: Now test for existence of everything in MANIFEST
+echo " "
+if test -f "$rsrc/MANIFEST"; then
+ echo "First let's make sure your kit is complete. Checking..." >&4
+?X:
+?X: Files spelled uppercased and beginning with PACK are produced by the
+?X: shell archive builder and may be removed by the user. Usually, they are
+?X: not listed in the MANIFEST file, but you never know...
+?X:
+?X: "split -l" is the new way of running a split, but we also try the older way
+?X:
+ awk '$1 !~ /PACK[A-Z]+/ {print $1}' "$rsrc/MANIFEST" | \
+ (split -l 50 2>/dev/null || split -50)
+ rm -f missing
+ tmppwd=`pwd`
+ for filelist in x??; do
+ (cd "$rsrc"; ls `cat "$tmppwd/$filelist"` \
+ >/dev/null 2>>"$tmppwd/missing")
+ done
+ if test -s missing; then
+ cat missing >&4
+ cat >&4 <<'EOM'
+
+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 (<MAINTLOC>).
+
+EOM
+?X: Can't use $echo at this early stage
+ echo $n "Continue? [n] $c" >&4
+ read ans
+ case "$ans" in
+ y*)
+ echo "Continuing..." >&4
+ rm -f missing
+ ;;
+ *)
+?X:
+?X: Use kill and not exit, so that the trap gets executed to clean up
+?X:
+ echo "ABORTING..." >&4
+ kill $$
+ ;;
+ esac
+ else
+ echo "Looks good..."
+ fi
+else
+ echo "There is no MANIFEST file. I hope your kit is complete !"
+fi
+rm -f missing x??
+
+@end
diff --git a/mcon/U/Chk_whoami.U b/mcon/U/Chk_whoami.U
new file mode 100644
index 0000000..b002989
--- /dev/null
+++ b/mcon/U/Chk_whoami.U
@@ -0,0 +1,25 @@
+?RCS: $Id$
+?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: Chk_whoami.U,v $
+?RCS: Revision 3.0 1993/08/18 12:04:46 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: This unit makes sure we don't try to include whoami.h if uname() exists.
+?X:
+?MAKE:Chk_whoami: d_uname i_whoami
+?MAKE: -pick add $@ %<
+?LINT:change i_whoami
+: weed out incompatibilities
+case "$d_uname" in
+ "$define") i_whoami="$undef" ;;
+esac
+
diff --git a/mcon/U/Compile.U b/mcon/U/Compile.U
new file mode 100644
index 0000000..417f9ec
--- /dev/null
+++ b/mcon/U/Compile.U
@@ -0,0 +1,63 @@
+?RCS: $Id$
+?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: Copyright (c) 1998 Andy Dougherty
+?RCS:
+?RCS: You may distribute under the terms of either the GNU General Public
+?RCS: License or the Artistic License, as specified in the README file.
+?RCS:
+?RCS:
+?X:
+?X: This unit is just a quick shorthand for the compile command
+?X: to be used in all the other metaconfig units.
+?X:
+?MAKE:Compile: +cc +optimize +ccflags +ldflags +libs
+?MAKE: -pick add $@ %<
+?LINT:define compile compile_ok
+?V:compile compile_ok mc_file
+?S:compile:
+?S: This shell variable is used internally by Configure to provide
+?S: a convenient shorthand for the typical compile command, namely
+?S: $cc $optimize $ccflags $ldflags -o $1 $1.c $libs > /dev/null 2>&1
+?S: Note that the output filename does _not_ include the _exe
+?S: extension. Instead we assume that the linker will be
+?S: "helpful" and automatically appending the correct suffix.
+?S: OS/2 users will apparently need to supply the -Zexe flag to
+?S: get this behavior.
+?S:
+?S: To use this variable, say something like:
+?S: echo 'int main() { exit(0); }' > try.c
+?S: set try
+?S: if eval $compile; then
+?S: echo "success" # and do whatever . . .
+?S: else
+?S: echo "failure" # and do whatever . . .
+?S: fi
+?S: To add extra flags cc flags (e.g. -DWHATEVER) just put them
+?S: in $*, e.g.
+?S: set try -DTRY_THIS_FLAG
+?S:.
+?S:compile_ok:
+?S: This shell variable is used internally by Configure to provide
+?S: a convenient shorthand for the typical compile command that you
+?S: expect to work ok. It is the same as $compile, except we
+?S: deliberately let the user see any error messages.
+?S:.
+: define a shorthand compile call
+compile='
+mc_file=$1;
+shift;
+$cc -o ${mc_file} $optimize $ccflags $ldflags $* ${mc_file}.c $libs > /dev/null 2>&1;'
+: define a shorthand compile call for compilations that should be ok.
+compile_ok='
+mc_file=$1;
+shift;
+$cc -o ${mc_file} $optimize $ccflags $ldflags $* ${mc_file}.c $libs;'
+
diff --git a/mcon/U/Config_h.U b/mcon/U/Config_h.U
new file mode 100644
index 0000000..8b8c657
--- /dev/null
+++ b/mcon/U/Config_h.U
@@ -0,0 +1,114 @@
+?RCS: $Id$
+?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: Config_h.U,v $
+?RCS: Revision 3.0.1.5 1997/02/28 14:57:43 ram
+?RCS: patch61: added support for src.U
+?RCS:
+?RCS: Revision 3.0.1.4 1995/09/25 09:10:49 ram
+?RCS: patch59: commented the purpose of the #un-def directive
+?RCS:
+?RCS: Revision 3.0.1.3 1995/01/30 14:25:39 ram
+?RCS: patch49: typo fixes in leading config.h comment (WED)
+?RCS:
+?RCS: Revision 3.0.1.2 1993/08/24 12:13:20 ram
+?RCS: patch3: added TOP as a local shell temporary variable
+?RCS:
+?RCS: Revision 3.0.1.1 1993/08/19 06:42:20 ram
+?RCS: patch1: leading config.sh searching was not aborting properly
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:04:47 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: This file ends up producing the config_h.SH script, which is run to produce
+?X: the config.h file. The file ./.Config_h below contains all the ?H: lines
+?X: extracted out of all the units. Metaconfig itself adds the !GROK!THIS!.
+?X: Note that this code isn't included into Configure, but must be shipped with.
+?X:
+?X: For those who wish to know why the file is config_h.SH instead of the more
+?X: natural config.h.SH, well... it is to support systems like MS-DOG. Only one
+?X: 'dot' is allowed within the file name, as it is part of the "extension" of
+?X: the file. MS-DOG will not let you have two 'dots' because that would mean
+?X: two "extensions".
+?X:
+?MAKE:Config_h: Id End Config_sh Obsol_h myuname cf_time cf_by package src
+?MAKE: -pick c_h_weed $@ %<
+?MAKE: -pick c_h_weed $@ ./Config_h
+?MAKE: -pick c_h_weed $@ ./Obsol_h
+?T:CONFIG TOP
+?LINT:unclosed !GROK!THIS!
+?LINT:extern CONFIG_H CONFIG_SH
+?LINT:change CONFIG_H CONFIG_SH
+?LINT:nocomment
+case "$CONFIG_SH" in
+'') CONFIG_SH=config.sh;;
+esac
+case "$CONFIG_H" in
+'') CONFIG_H=config.h;;
+esac
+case $CONFIG in
+'')
+ if test -f $CONFIG_SH; then TOP=.;
+ elif test -f ../$CONFIG_SH; then TOP=..;
+ elif test -f ../../$CONFIG_SH; then TOP=../..;
+ elif test -f ../../../$CONFIG_SH; then TOP=../../..;
+ elif test -f ../../../../$CONFIG_SH; then TOP=../../../..;
+ else
+ echo "Can't find $CONFIG_SH."; exit 1
+ fi
+ . $TOP/$CONFIG_SH
+ ;;
+esac
+?X: Make sure we are in the directory where the .SH file is located.
+case "$0" in
+*/*) cd `expr X$0 : 'X\(.*\)/'` ;;
+esac
+echo "Extracting $CONFIG_H (with variable substitutions)"
+?X:
+?X: Since we unconditionally translate leading #undef into /*#define, we're
+?X: stuck when we really want to have a #undef in config.h. That's why there
+?X: is provision here for #un-def, which is translated back into #undef after
+?X: all original #undef have been processed.
+?X:
+?X: Previously, we changed all
+?X: #undef FOO /**/
+?X: into
+?X: /*#define FOO /**/
+?X: The xlc compiler (available on IBM's AIX) complains that this is
+?X: an illegal attempt to write a nested comment, and warns against it.
+?X: There's apparently no way to shut the compiler up, either.
+?X: This sed command from Hallvard B Furuseth <h.b.furuseth@usit.uio.no>
+?X: changes it to
+?X: /*#define FOO / **/
+sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-def!#undef!'
+/*
+ * This file was produced by running the config_h.SH script, which
+ * gets its values from $CONFIG_SH, which is generally produced by
+ * running Configure.
+ *
+ * Feel free to modify any of this as the need arises. Note, however,
+ * 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$
+ */
+
+/*
+ * Package name : $package
+ * Source directory : $src
+ * Configuration time: $cf_time
+ * Configured by : $cf_by
+ * Target system : $myuname
+ */
+
+#ifndef _config_h_
+#define _config_h_
+
diff --git a/mcon/U/Config_sh.U b/mcon/U/Config_sh.U
new file mode 100644
index 0000000..bb47b7b
--- /dev/null
+++ b/mcon/U/Config_sh.U
@@ -0,0 +1,110 @@
+?RCS: $Id$
+?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: Config_sh.U,v $
+?RCS: Revision 3.0.1.3 1997/02/28 14:57:53 ram
+?RCS: patch61: added support for src.U
+?RCS:
+?RCS: Revision 3.0.1.2 1995/01/11 14:53:31 ram
+?RCS: patch45: moved path stripping from d_portable.U to end of Configure
+?RCS:
+?RCS: Revision 3.0.1.1 1994/10/29 15:50:37 ram
+?RCS: patch36: added ?F: line for metalint file checking
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:04:48 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: This unit ends up producing the config.sh script, which contains all the
+?X: definitions figured out by Configure. The add.Config_sh command knows
+?X: which variables need to be remembered. It also adds the EOT (ends the
+?X: here document redirection with variable substitution).
+?X:
+?MAKE:Config_sh: cf_time cf_by test spitshell startsh myuname Myread \
+ End Obsol_sh Loc +d_portable package src cat sed
+?MAKE: -pick add.Config_sh $@ %<
+?MAKE: -pick add $@ ./Obsol_sh
+?MAKE: -pick close.Config_sh $@ %<
+?F:!config.over !config.arch
+?T:file sfile xsed
+?LINT:unclosed EOT
+: back to where it started
+if test -d ../UU; then
+ cd ..
+fi
+
+: configuration may be unconditionally patched via a 'config.arch' file
+if $test -f config.arch; then
+ echo "I see a config.arch file, loading it." >&4
+ . ./config.arch
+fi
+
+: configuration may be patched via a 'config.over' file
+if $test -f config.over; then
+ echo " "
+ dflt=y
+ rp='I see a config.over file. Do you wish to load it?'
+ . UU/myread
+ case "$ans" in
+ n*) echo "OK, I'll ignore it.";;
+ *) . ./config.over
+ echo "Configuration override changes have been loaded."
+ ;;
+ esac
+fi
+
+@if d_portable
+: in case they want portability, strip down executable paths
+?X:
+?X: Strip down paths in located executables. For each file, e.g. vi, there
+?X: is a $vi variable whose value is for instance '/usr/bin/vi'. By resetting
+?X: $vi to 'vi', we rely on the PATH variable to locate the executable...
+?X: In order to allow vi='/usr/bin/nvi' which will strip down to vi='nvi',
+?X: we can't just say 'eval $file="\$file"', we have to recourse to sed.
+?X: We don't use basename since it is less portable than sed.
+?X:
+case "$d_portable" in
+"$define")
+ echo " "
+ echo "Stripping down executable paths..." >&4
+ xsed=$sed
+ for file in $loclist $trylist; do
+ eval sfile="\$$file"
+ sfile=`echo $sfile | $xsed -e 's,.*/\(.*\),\1,'`
+ eval $file="$sfile"
+ done
+ ;;
+esac
+
+@end
+: create config.sh file
+echo " "
+echo "Creating config.sh..." >&4
+$spitshell <<EOT >config.sh
+$startsh
+#
+# This file was produced by running the Configure script. It holds all the
+# definitions figured out by Configure. Should you modify one of these values,
+# do not forget to propagate your changes by running "Configure -der". You may
+# instead choose to run each of the .SH files by yourself, or "Configure -S".
+#
+
+# Package name : $package
+# Source directory : $src
+# Configuration time: $cf_time
+# Configured by : $cf_by
+# Target system : $myuname
+
+EOT
+?X: Command line options are saved by the Options.U unit in the
+?X: temporary file UU/cmdline.opt
+$test -f UU/cmdline.opt && $cat UU/cmdline.opt >> config.sh
+$spitshell <<EOT >>config.sh
+
diff --git a/mcon/U/Configdir.U b/mcon/U/Configdir.U
new file mode 100644
index 0000000..7d81fbc
--- /dev/null
+++ b/mcon/U/Configdir.U
@@ -0,0 +1,28 @@
+?RCS: $Id$
+?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: Configdir.U,v $
+?RCS: Revision 3.0.1.1 1997/02/28 14:58:36 ram
+?RCS: patch61: have README explicitly mention the package name
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:04:49 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:Configdir: package
+?MAKE: -pick add $@ %<
+: create .config dir to save info across Configure sessions
+test -d ../.config || mkdir ../.config
+cat >../.config/README <<EOF
+This directory created by Configure to save information that should
+persist across sessions for $package.
+
+You may safely delete it if you wish.
+EOF
+
diff --git a/mcon/U/Cppsym.U b/mcon/U/Cppsym.U
new file mode 100644
index 0000000..8588b7e
--- /dev/null
+++ b/mcon/U/Cppsym.U
@@ -0,0 +1,286 @@
+?RCS: $Id$
+?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: Cppsym.U,v $
+?RCS: Revision 3.0.1.5 1995/05/12 11:59:11 ram
+?RCS: patch54: split awk command onto two lines for older awks (ADO)
+?RCS:
+?RCS: Revision 3.0.1.4 1995/01/11 14:55:57 ram
+?RCS: patch45: new cc vs. cpp symbol checking suggested by JHI
+?RCS: patch45: added more cpp symbols (JHI)
+?RCS:
+?RCS: Revision 3.0.1.3 1994/10/29 15:51:32 ram
+?RCS: patch36: added ?F: line for metalint file checking
+?RCS: patch36: new symbols ardent and titan (ADO)
+?RCS:
+?RCS: Revision 3.0.1.2 1994/06/20 06:53:32 ram
+?RCS: patch30: extended cpp symbol lookup list (JHI)
+?RCS: patch30: renamed attrlist symbol into al for brevity
+?RCS:
+?RCS: Revision 3.0.1.1 1993/12/15 08:14:14 ram
+?RCS: patch15: added new cpp symbols __bsdi__ and BSD_NET2
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:04:50 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: This unit produces a shell script called Cppsym, which can be used to
+?X: determine whether any in a list of symbols is defined by the C compilation
+?X: chain (C preprocessor symbols plus C compiler native ones).
+?X: It can determine the status of any symbol, though the symbols in $al
+?X: are more easily determined. If you want to add to $al you can do
+?X: it in Myinit.U.
+?X:
+?MAKE:Cppsym ccsymbols cppsymbols cppccsymbols: run \
+ eunicefix Guess awk cat tr sed sort rm startsh osname \
+ +cc gccversion test comm uniq echo Options trnl \
+ optimize ccflags ldflags libs
+?MAKE: -pick add $@ %<
+?S:ccsymbols:
+?S: The variable contains the symbols defined by the C compiler alone.
+?S: The symbols defined by cpp or by cc when it calls cpp are not in
+?S: this list, see cppsymbols and cppccsymbols.
+?S: The list is a space-separated list of symbol=value tokens.
+?S:.
+?S:cppsymbols:
+?S: The variable contains the symbols defined by the C preprocessor
+?S: alone. The symbols defined by cc or by cc when it calls cpp are
+?S: not in this list, see ccsymbols and cppccsymbols.
+?S: The list is a space-separated list of symbol=value tokens.
+?S:.
+?S:cppccsymbols:
+?S: The variable contains the symbols defined by the C compiler
+?S: when it calls cpp. The symbols defined by the cc alone or cpp
+?S: alone are not in this list, see ccsymbols and cppsymbols.
+?S: The list is a space-separated list of symbol=value tokens.
+?S:.
+?T:also symbols i postprocess_cc_v flags
+?F:./Cppsym
+?F:!Cppsym.true !Cppsym.know !ccsym.com !ccsym.cpp !ccsym.own
+: determine known pre-processor and compiler symbols
+echo " "
+$echo "Guessing which symbols your C compiler and preprocessor define..." >&4
+?X:
+?X: The symbol list is in alpha order for ease of maintenance...
+?X:
+?X: Lots of new symbols (mostly rummaged from gcc), courtesy of
+?X: Jarkko Hietaniemi <jhi@snakemail.hut.fi> -- RAM, 06/06/94
+?X:
+?X: If your symbol is mixed case, just add it as-is.
+?X: All symbols will be transformed to both all-lower and all-upper.
+?X: Also drop any leading/trailing underscores, the scan will try all those.
+?X:
+$cat <<'EOSH' > Cppsym.know
+a29k ABI64 aegis AES_SOURCE AIX AIX32 AIX370
+AIX41 AIX42 AIX43 AIX_SOURCE aixpc ALL_SOURCE
+alliant alpha am29000 AM29000 AMD64 amiga AMIGAOS AMIX
+ansi ANSI_C_SOURCE apollo ardent ARM32 atarist att386 att3b
+BeOS BIG_ENDIAN BIT_MSF bsd BSD bsd43 bsd4_2 bsd4_3 BSD4_3 bsd4_4
+BSD_4_3 BSD_4_4 BSD_NET2 BSD_TIME BSD_TYPES BSDCOMPAT bsdi
+bull c cadmus clipper CMU COFF COMPILER_VERSION
+concurrent convex cpu cray CRAY CRAYMPP ctix CX_UX
+CYGWIN DGUX DGUX_SOURCE DJGPP dmert DOLPHIN DPX2 DSO
+Dynix DynixPTX ELF encore EPI EXTENSIONS FAVOR_BSD
+FILE_OFFSET_BITS FreeBSD GCC_NEW_VARARGS gcos gcx gimpel
+GLIBC GLIBC_MINOR
+GNU_SOURCE GNUC GNUC_MINOR GNU_LIBRARY GO32 gould GOULD_PN
+H3050R H3050RX hbullx20 hcx host_mips
+hp200 hp300 hp700 HP700 hp800 hp9000
+hp9000s200 hp9000s300 hp9000s400 hp9000s500
+hp9000s700 hp9000s800 hp9k8 hp_osf hppa hpux HPUX_SOURCE
+i186 i286 i386 i486 i586 i686 i8086 i80960 i860 I960
+IA64 iAPX286 ibm ibm032 ibmesa IBMR2 ibmrt ILP32 ILP64
+INLINE_INTRINSICS INTRINSICS INT64 interdata is68k ksr1
+LANGUAGE_C LARGE_FILE_API LARGEFILE64_SOURCE
+LARGEFILE_SOURCE LFS64_LARGEFILE LFS_LARGEFILE
+Linux LITTLE_ENDIAN LONG64 LONG_DOUBLE LONG_LONG
+LONGDOUBLE LONGLONG LP64 luna luna88k Lynx
+M68000 m68k m88100 m88k M88KBCS_TARGET M_COFF
+M_I186 M_I286 M_I386 M_I8086 M_I86 M_I86SM M_SYS3
+M_SYS5 M_SYSIII M_SYSV M_UNIX M_XENIX MACH machine MachTen
+MATH_HAS_NO_SIDE_EFFECTS
+mc300 mc500 mc68000 mc68010 mc68020 mc68030 mc68040
+mc68060 mc68k mc68k32 mc700 mc88000 mc88100 merlin
+mert MiNT mips MIPS_FPSET MIPS_ISA MIPS_SIM MIPS_SZINT
+MIPS_SZLONG MIPS_SZPTR MIPSEB MIPSEL MODERN_C motorola
+mpeix MSDOS MTXINU MULTIMAX mvs MVS n16 ncl_el ncl_mr
+NetBSD news1500 news1700 news1800 news1900 news3700
+news700 news800 news900 NeXT NLS nonstopux ns16000 ns32000
+ns32016 ns32332 ns32k nsc32000
+OCS88 OEMVS OpenBSD os OS2 OS390 osf OSF1 OSF_SOURCE
+pa_risc PA_RISC1_1 PA_RISC2_0 PARAGON parisc
+pc532 pdp11 PGC PIC plexus PORTAR posix
+POSIX1B_SOURCE POSIX2_SOURCE POSIX4_SOURCE
+POSIX_C_SOURCE POSIX_SOURCE POWER
+PROTOTYPES PWB pyr QNX R3000 REENTRANT RES Rhapsody RISC6000
+riscix riscos RT S390 SA110 scs SCO sequent sgi SGI_SOURCE SH3 sinix
+SIZE_INT SIZE_LONG SIZE_PTR SOCKET_SOURCE SOCKETS_SOURCE
+sony sony_news sonyrisc sparc sparclite spectrum
+stardent stdc STDC_EXT stratos sun sun3 sun386
+Sun386i svr3 svr4 SVR4_2 SVR4_SOURCE svr5
+SX system SYSTYPE_BSD SYSTYPE_BSD43 SYSTYPE_BSD44
+SYSTYPE_SVR4 SYSTYPE_SVR5 SYSTYPE_SYSV SYSV SYSV3 SYSV4 SYSV5
+sysV68 sysV88 Tek4132 Tek4300 titan
+TM3200 TM5400 TM5600
+tower tower32 tower32_200 tower32_600 tower32_700
+tower32_800 tower32_850 tss
+u370 u3b u3b2 u3b20 u3b200 u3b20d u3b5
+ultrix UMAXV UnicomPBB UnicomPBD UNICOS UNICOSMK
+unix UNIX95 UNIX99 unixpc unos
+USE_BSD USE_FILE_OFFSET64 USE_GNU USE_ISOC9X USE_LARGEFILE USE_LARGEFILE64
+USE_MISC USE_POSIX USE_POSIX199309 USE_POSIX199506 USE_POSIX2
+USE_REENTRANT USE_SVID USE_UNIX98 USE_XOPEN USE_XOPEN_EXTENDED
+USGr4 USGr4_2
+Utek UTek UTS UWIN uxpm uxps vax venix VMESA vms xenix Xenix286
+XOPEN_SOURCE XOPEN_SOURCE_EXTENDED XPG2 XPG2_EXTENDED
+XPG3 XPG3_EXTENDED XPG4 XPG4_EXTENDED
+z8000
+EOSH
+?X: Maybe put other stuff here too.
+cat <<EOSH >>Cppsym.know
+$osname
+EOSH
+./tr '[a-z]' '[A-Z]' < Cppsym.know > Cppsym.a
+./tr '[A-Z]' '[a-z]' < Cppsym.know > Cppsym.b
+$cat Cppsym.know > Cppsym.c
+$cat Cppsym.a Cppsym.b Cppsym.c | $tr ' ' $trnl | $sort | $uniq > Cppsym.know
+$rm -f Cppsym.a Cppsym.b Cppsym.c
+cat <<EOSH > Cppsym
+$startsh
+if $test \$# -gt 0; then
+ echo \$* | $tr " " "$trnl" | ./Cppsym.try > Cppsym.got
+ if $test -s Cppsym.got; then
+ $rm -f Cppsym.got
+ exit 0
+ fi
+ $rm -f Cppsym.got
+ exit 1
+else
+ $tr " " "$trnl" | ./Cppsym.try
+ exit 0
+fi
+EOSH
+chmod +x Cppsym
+$eunicefix Cppsym
+?X: The below awk script will die a horrible death if
+?X: some of the tested symbols are not long ints.
+?X: Also, we do not make difference between just defined and defined zero.
+cat <<EOSH > Cppsym.try
+$startsh
+cat <<'EOCP' > try.c
+#include <stdio.h>
+int main() {
+EOCP
+?X: The length($1) command guards against possible empty entries.
+?X: The awk snippet is know to give heartburn to UNICOS/mk awk.
+$awk \\
+EOSH
+cat <<'EOSH' >> Cppsym.try
+'length($1) > 0 {
+ printf "#ifdef %s\n#if %s+0\nprintf(\"%s=%%ld\\n\", (long)%s);\n#else\nprintf(\"%s\\n\");\n#endif\n#endif\n", $1, $1, $1, $1, $1
+ printf "#ifdef _%s\n#if _%s+0\nprintf(\"_%s=%%ld\\n\", (long)_%s);\n#else\nprintf(\"_%s\\n\");\n#endif\n#endif\n", $1, $1, $1, $1, $1
+ printf "#ifdef __%s\n#if __%s+0\nprintf(\"__%s=%%ld\\n\", (long)__%s);\n#else\nprintf(\"__%s\\n\");\n#endif\n#endif\n", $1, $1, $1, $1, $1
+ printf "#ifdef __%s__\n#if __%s__+0\nprintf(\"__%s__=%%ld\\n\", (long)__%s__);\n#else\nprintf(\"__%s__\\n\");\n#endif\n#endif\n", $1, $1, $1, $1, $1
+}' >> try.c
+echo 'return 0;}' >> try.c
+EOSH
+cat <<EOSH >> Cppsym.try
+flags="$ccflags"
+case "$osname-$gccversion" in
+irix-) flags="\$flags -woff 1178" ;;
+os2-*) flags="\$flags -Zlinker /PM:VIO" ;;
+esac
+$cc -o try $optimize \$flags $ldflags try.c $libs && $run ./try
+EOSH
+chmod +x Cppsym.try
+$eunicefix Cppsym.try
+./Cppsym < Cppsym.know > Cppsym.true
+: now check the C compiler for additional symbols
+?X: suggested by Jarkko Hietaniemi <jhi@snakemail.hut.fi>, thanks!
+postprocess_cc_v=''
+case "$osname" in
+aix) postprocess_cc_v="|$tr , ' '" ;;
+esac
+$cat >ccsym <<EOS
+$startsh
+$cat >tmp.c <<EOF
+extern int foo;
+EOF
+for i in \`$cc -v -c tmp.c 2>&1 $postprocess_cc_v\`
+do
+ case "\$i" in
+ -D*) echo "\$i" | $sed 's/^-D//';;
+ -A*) $test "$gccversion" && echo "\$i" | $sed 's/^-A//' | $sed 's/\(.*\)(\(.*\))/\1=\2/';;
+ esac
+done
+$rm -f try.c
+EOS
+postprocess_cc_v=''
+chmod +x ccsym
+$eunicefix ccsym
+./ccsym > ccsym1.raw
+?X: AIX complains if $uniq is passed an empty file. ($sort apparently
+?X: doesn't care.) --AD 14 July 1998
+if $test -s ccsym1.raw; then
+ $sort ccsym1.raw | $uniq >ccsym.raw
+else
+ mv ccsym1.raw ccsym.raw
+fi
+
+?X: canonicalize symbols for easier sort/uniq/comm usage: append =1 if no = sign
+?X: the awk script must be on two lines for older awk programs, sigh! -- ADO
+$awk '/\=/ { print $0; next }
+ { print $0"=1" }' ccsym.raw >ccsym.list
+$awk '/\=/ { print $0; next }
+ { print $0"=1" }' Cppsym.true >ccsym.true
+$comm -13 ccsym.true ccsym.list >ccsym.own
+$comm -12 ccsym.true ccsym.list >ccsym.com
+$comm -23 ccsym.true ccsym.list >ccsym.cpp
+also=''
+if $test -z ccsym.raw; then
+ echo "Your C compiler doesn't seem to define any symbols!" >&4
+ echo " "
+ echo "However, your C preprocessor defines the following symbols:"
+ $cat Cppsym.true
+ ccsymbols=''
+ cppsymbols=`$cat Cppsym.true`
+ cppsymbols=`echo $cppsymbols`
+ cppccsymbols="$cppsymbols"
+else
+ if $test -s ccsym.com; then
+ echo "Your C compiler and pre-processor define these symbols:"
+ $sed -e 's/\(..*\)=.*/\1/' ccsym.com
+ also='also '
+ symbols='ones'
+ cppccsymbols=`$cat ccsym.com`
+ cppccsymbols=`echo $cppccsymbols`
+ $test "$silent" || sleep 1
+ fi
+ if $test -s ccsym.cpp; then
+ $test "$also" && echo " "
+ echo "Your C pre-processor ${also}defines the following symbols:"
+ $sed -e 's/\(..*\)=.*/\1/' ccsym.cpp
+ also='further '
+ cppsymbols=`$cat ccsym.cpp`
+ cppsymbols=`echo $cppsymbols`
+ $test "$silent" || sleep 1
+ fi
+ if $test -s ccsym.own; then
+ $test "$also" && echo " "
+ echo "Your C compiler ${also}defines the following cpp symbols:"
+ $sed -e 's/\(..*\)=1/\1/' ccsym.own
+ $sed -e 's/\(..*\)=.*/\1/' ccsym.own | $uniq >>Cppsym.true
+ ccsymbols=`$cat ccsym.own`
+ ccsymbols=`echo $ccsymbols`
+ $test "$silent" || sleep 1
+ fi
+fi
+$rm -f Cppsym.know Cppsym.true
+
diff --git a/mcon/U/Cross.U b/mcon/U/Cross.U
new file mode 100644
index 0000000..7f1df8a
--- /dev/null
+++ b/mcon/U/Cross.U
@@ -0,0 +1,350 @@
+?RCS: $Id$
+?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: Copyright (c) 2001 Jarkko Hietaniemi
+?RCS:
+?MAKE:run to from targetarch usecrosscompile: src awk cat grep test rm \
+ echo sed mkdir cp touch chmod
+?MAKE: -pick add $@ %<
+?Y:TOP
+?S:usecrosscompile:
+?S: This variable conditionally defines the USE_CROSS_COMPILE symbol,
+?S: and indicates that our package has been cross-compiled.
+?S:.
+?S:run:
+?S: This variable contains the command used by Configure
+?S: to copy and execute a cross-compiled executable in the
+?S: target host. Useful and available only during the build.
+?S: Empty string '' if not cross-compiling.
+?S:.
+?S:from:
+?S: This variable contains the command used by Configure
+?S: to copy files from the target host. Useful and available
+?S: only during the build.
+?S: The string ':' if not cross-compiling.
+?S:.
+?S:to:
+?S: This variable contains the command used by Configure
+?S: to copy to from the target host. Useful and available
+?S: only during the build.
+?S: The string ':' if not cross-compiling.
+?S:.
+?S:targetarch:
+?S: If cross-compiling, this variable contains the target architecture.
+?S: If not, this will be empty.
+?S:.
+?C:USE_CROSS_COMPILE:
+?C: This symbol, if defined, indicates that the package is being
+?C: cross-compiled.
+?C:.
+?C:CROSS_TARGET_ARCH:
+?C: This symbol, if defined, indicates the target architecture
+?C: the package has been cross-compiled to.
+?C: Undefined if not a cross-compile.
+?C:.
+?H:?usecrosscompile:#ifndef USE_CROSS_COMPILE
+?H:?usecrosscompile:#$usecrosscompile USE_CROSS_COMPILE /**/
+?H:?usecrosscompile:#define CROSS_TARGET_ARCH "$targetarch" /**/
+?H:?usecrosscompile:#endif
+?H:.
+?T:croak pwd exe f q i j cwd
+?LINT:extern usecrosscompile
+?LINT:extern cc
+?LINT:extern usrinc
+?LINT:change usrinc
+?LINT:change ar
+?LINT:change nm
+?LINT:change ranlib
+?LINT:extern targethost
+?LINT:extern targetdir
+?LINT:change targetdir
+?LINT:extern targetuser
+?LINT:change targetuser
+?LINT:extern targetrun
+?LINT:extern targetfrom
+?LINT:extern targetto
+?LINT:extern targetmkdir
+?LINT:change targetrun
+?LINT:change targetfrom
+?LINT:change targetto
+?LINT:change targetmkdir
+?LINT:extern incpth
+?LINT:extern libpth
+?LINT:change incpth
+?LINT:change libpth
+?LINT:extern locincpth
+?LINT:extern loclibpth
+?LINT:change locincpth
+?LINT:change loclibpth
+?LINT:extern TMPDIR
+: setup for possible cross-compilation
+run=''
+to=:
+from=:
+usecrosscompile='undef'
+targetarch=''
+case "$usecrosscompile" in
+$define|true|[yY]*)
+@if { test -d ../Cross }
+?X:
+?X: Cross-compilation is enabled when there is a 'Cross' directory found
+?X: at the root of the package. This directory must contain the following
+?X: entries for defining the cross-compilation process:
+?X:
+?X: FIXME FIXME
+?X: WE MUST DISTINGUISH BETWEEN LOCAL cross-compiling AND REMOTE ONE
+?X: ACTUALLY, REMOTE COMPILATION SHOULD BE CONFIGURED INTERACTIVELY
+?X: IT WILL COPY ALL THE FILES FROM THE MANIFEST DOWN TO THE REMOTE DIR...
+?X: (and copy things like 'mkdep', etc...)
+?X:
+ $echo "Cross-compiling..."
+ croak=''
+ case "$cc" in
+ *-*-gcc)
+?X: A cross-compiling gcc, probably.
+ targetarch=`$echo $cc|$sed 's/-gcc$//'`
+ ar=$targetarch-ar
+?X: leave out ld, choosing it is more complex
+ nm=$targetarch-nm
+ ranlib=$targetarch-ranlib
+ $echo 'extern int foo;' > try.c
+ set X `$cc -v -E try.c 2>&1 | \
+ $awk '/^#include </,/^End of search /'|$grep '/include'`
+ shift
+ if $test $# -gt 0; then
+ incpth="$incpth $*"
+ incpth="`$echo $incpth|$sed 's/^ //'`"
+ echo "Guessing incpth '$incpth'." >&4
+ for i in $*; do
+ j="`$echo $i|$sed 's,/include$,/lib,'`"
+ if $test -d $j; then
+ libpth="$libpth $j"
+ fi
+ done
+ libpth="`$echo $libpth|$sed 's/^ //'`"
+ echo "Guessing libpth '$libpth'." >&4
+ fi
+ $rm -f try.c
+ ;;
+ esac
+ case "$targetarch" in
+ '') echo "Targetarch not defined." >&4; croak=y ;;
+ *) echo "Using targetarch $targetarch." >&4 ;;
+ esac
+ case "$incpth" in
+ '') echo "Incpth not defined." >&4; croak=y ;;
+ *) echo "Using incpth '$incpth'." >&4 ;;
+ esac
+ case "$libpth" in
+ '') echo "Libpth not defined." >&4; croak=y ;;
+ *) echo "Using libpth '$libpth'." >&4 ;;
+ esac
+ case "$usrinc" in
+ '')
+ for i in $incpth; do
+ if $test -f $i/errno.h -a -f $i/stdio.h -a -f $i/time.h; then
+ usrinc=$i
+ echo "Guessing usrinc $usrinc." >&4
+ break
+ fi
+ done
+ case "$usrinc" in
+ '') echo "Usrinc not defined." >&4; croak=y ;;
+ esac
+ ;;
+ *) echo "Using usrinc $usrinc." >&4 ;;
+ esac
+ case "$targethost" in
+ '') echo "Targethost not defined." >&4; croak=y ;;
+ *) echo "Using targethost $targethost." >&4
+ esac
+ locincpth=' '
+ loclibpth=' '
+ case "$croak" in
+ y) echo "Cannot continue, aborting." >&4; exit 1 ;;
+ esac
+ case "$src" in
+ /*) run=$src/Cross/run
+ targetmkdir=$src/Cross/mkdir
+ to=$src/Cross/to
+ from=$src/Cross/from
+ ;;
+ *) pwd=`$test -f ../Configure & cd ..; pwd`
+ run=$pwd/Cross/run
+ targetmkdir=$pwd/Cross/mkdir
+ to=$pwd/Cross/to
+ from=$pwd/Cross/from
+ ;;
+ esac
+ case "$targetrun" in
+ '') targetrun=ssh ;;
+ esac
+ case "$targetto" in
+ '') targetto=scp ;;
+ esac
+ case "$targetfrom" in
+ '') targetfrom=scp ;;
+ esac
+ run=$run-$targetrun
+ to=$to-$targetto
+ from=$from-$targetfrom
+ case "$targetdir" in
+ '')
+ targetdir="${TMPDIR:-/tmp}"
+ echo "Guessing targetdir $targetdir." >&4
+ ;;
+ esac
+ case "$targetuser" in
+ '')
+ targetuser=root
+ echo "Guessing targetuser $targetuser." >&4
+ ;;
+ esac
+ case "$targetfrom" in
+ scp) q=-q ;;
+ *) q='' ;;
+ esac
+ case "$targetrun" in
+ ssh|rsh)
+ $cat >$run <<EOF
+#!/bin/sh
+case "\$1" in
+-cwd)
+ shift
+ cwd=\$1
+ shift
+ ;;
+esac
+case "\$cwd" in
+'') cwd=$targetdir ;;
+esac
+exe=\$1
+shift
+if $test ! -f \$exe.xok; then
+ $to \$exe
+ $touch \$exe.xok
+fi
+$targetrun -l $targetuser $targethost "cd \$cwd && ./\$exe \$@"
+EOF
+ ;;
+ *) echo "Unknown targetrun '$targetrun'" >&4
+ exit 1
+ ;;
+ esac
+ case "$targetmkdir" in
+ */Cross/mkdir)
+ $cat >$targetmkdir <<EOF
+#!/bin/sh
+$targetrun -l $targetuser $targethost "mkdir -p \$@"
+EOF
+ $chmod a+rx $targetmkdir
+ ;;
+ *) echo "Unknown targetmkdir '$targetmkdir'" >&4
+ exit 1
+ ;;
+ esac
+ case "$targetto" in
+ scp|rcp)
+ $cat >$to <<EOF
+#!/bin/sh
+for f in \$@
+do
+ case "\$f" in
+ /*)
+ $targetmkdir \`dirname \$f\`
+ $targetto $q \$f $targetuser@$targethost:\$f || exit 1
+ ;;
+ *)
+ $targetmkdir $targetdir/\`dirname \$f\`
+ $targetto $q \$f $targetuser@$targethost:$targetdir/\$f || exit 1
+ ;;
+ esac
+done
+exit 0
+EOF
+ ;;
+ cp) $cat >$to <<EOF
+#!/bin/sh
+for f in \$@
+do
+ case "\$f" in
+ /*)
+ $mkdir -p $targetdir/\`dirname \$f\`
+ $cp \$f $targetdir/\$f || exit 1
+ ;;
+ *)
+ $targetmkdir $targetdir/\`dirname \$f\`
+ $cp \$f $targetdir/\$f || exit 1
+ ;;
+ esac
+done
+exit 0
+EOF
+ ;;
+ *) echo "Unknown targetto '$targetto'" >&4
+ exit 1
+ ;;
+ esac
+ case "$targetfrom" in
+ scp|rcp)
+ $cat >$from <<EOF
+#!/bin/sh
+for f in \$@
+do
+ $rm -f \$f
+ $targetfrom $q $targetuser@$targethost:$targetdir/\$f . || exit 1
+done
+exit 0
+EOF
+ ;;
+ cp) $cat >$from <<EOF
+#!/bin/sh
+for f in \$@
+do
+ $rm -f \$f
+ cp $targetdir/\$f . || exit 1
+done
+exit 0
+EOF
+ ;;
+ *) echo "Unknown targetfrom '$targetfrom'" >&4
+ exit 1
+ ;;
+ esac
+ if $test ! -f $run; then
+ echo "Target 'run' script '$run' not found." >&4
+ else
+ $chmod a+rx $run
+ fi
+ if $test ! -f $to; then
+ echo "Target 'to' script '$to' not found." >&4
+ else
+ $chmod a+rx $to
+ fi
+ if $test ! -f $from; then
+ echo "Target 'from' script '$from' not found." >&4
+ else
+ $chmod a+rx $from
+ fi
+ if $test ! -f $run -o ! -f $to -o ! -f $from; then
+ exit 1
+ fi
+ $cat >&4 <<EOF
+Using '$run' for remote execution,
+and '$from' and '$to'
+for remote file transfer.
+EOF
+@else
+ echo "Cross-compilation is not supported for this package." >&4
+ exit 1
+@end
+ ;;
+esac
+
diff --git a/mcon/U/Csym.U b/mcon/U/Csym.U
new file mode 100644
index 0000000..45ff465
--- /dev/null
+++ b/mcon/U/Csym.U
@@ -0,0 +1,111 @@
+?RCS: $Id$
+?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: Csym.U,v $
+?RCS: Revision 3.0.1.4 1995/07/25 13:36:29 ram
+?RCS: patch56: re-arranged compile line to include ldflags before objects
+?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 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
+?RCS:
+?RCS: Revision 3.0.1.1 1993/08/25 14:00:05 ram
+?RCS: patch6: added ldflags as a conditional dependency and to compile line
+?RCS: patch6: a final double quote was missing in csym variable after eval
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:04:50 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:Csym: Options contains cat libc libs runnm +cc +ccflags +ldflags rm
+?MAKE: -pick add $@ %<
+?LINT:define csym
+?LINT:use libc
+?S:csym:
+?S: This shell variable is used internally by Configure to check
+?S: wether a given C symbol is defined or not. A typical use is:
+?S: set symbol result [-fva] [previous]
+?S: eval $csym
+?S: That will set result to 'true' if the function [-f], variable [-v]
+?S: or array [-a] is defined, 'false' otherwise. If a previous value is
+?S: given and the -r flag was provided on the command line, that value
+?S: is reused without questioning.
+?S:.
+?V:csym
+?T:tval tx tlook tf tdc tc file
+: is a C symbol defined?
+csym='tlook=$1;
+case "$3" in
+-v) tf=libc.tmp; tc=""; tdc="";;
+-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-) ;;
+true-*) tx=no; eval "tval=\$$4"; case "$tval" in "") tx=yes;; esac;;
+esac;
+case "$tx" in
+yes)
+ case "$runnm" in
+ true)
+ if $contains $tlook $tf >/dev/null 2>&1;
+ then tval=true;
+ else tval=false;
+ fi;;
+ *)
+?X:
+?X: We use 'char' instead of 'int' to try to circumvent overzealous
+?X: optimizing compilers using built-in prototypes for commonly used
+?X: routines to complain when seeing a different external declaration. For
+?X: instance, gcc 2.6.3 fails if we use 'int' and we attempt a test against
+?X: memcpy() on machines where sizeof(int) == sizeof(char *) (the usual return
+?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 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 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:
+?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;
+ $rm -f t t.c;;
+ esac;;
+*)
+ case "$tval" in
+ $define) tval=true;;
+ *) 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
new file mode 100644
index 0000000..c309578
--- /dev/null
+++ b/mcon/U/End.U
@@ -0,0 +1,27 @@
+?RCS: $Id$
+?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: End.U,v $
+?RCS: Revision 3.0 1993/08/18 12:04:51 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: This unit serves as the goal which forces make to choose all the units that
+?X: ask questions. The $W on the ?MAKE: line is the list of all symbols wanted.
+?X: To force any unit to be included, copy this unit to your private U directory
+?X: and add the name of the unit desired to the ?MAKE: dependency line.
+?X:
+?MAKE:End: $W
+?MAKE: -pick add $@ %<
+?LINT:use $W
+: end of configuration questions
+echo " "
+echo "End of configuration questions."
+
diff --git a/mcon/U/Extract.U b/mcon/U/Extract.U
new file mode 100644
index 0000000..2fa6c55
--- /dev/null
+++ b/mcon/U/Extract.U
@@ -0,0 +1,106 @@
+?RCS: $Id$
+?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: Extract.U,v $
+?RCS: Revision 3.0.1.2 1997/02/28 14:58:52 ram
+?RCS: patch61: added support for src.U
+?RCS:
+?RCS: Revision 3.0.1.1 1994/10/29 15:51:46 ram
+?RCS: patch36: added ?F: line for metalint file checking
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:04:52 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: This unit produces a shell script which can be doted in order to extract
+?X: .SH files with variable substitutions.
+?X:
+?X: When running Configure from a remote directory ($src is not '.'),
+?X: then the files will be created in that directory, so beware!
+?X:
+?MAKE:Extract: Mkdirp src
+?MAKE: -pick add $@ %<
+?F:./extract
+?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..."
+if test -f "$SRC/MANIFEST"; then
+ set x `awk '{print $1}' <$SRC/MANIFEST | grep '\.SH'`
+else
+ echo "(Looking for .SH files under the source directory.)"
+ set x `(cd "$SRC"; find . -name "*.SH" -print)`
+fi
+shift
+case $# in
+0) set x `(cd "$SRC"; echo *.SH)`; shift;;
+esac
+if test ! -f "$SRC/$1"; then
+ shift
+fi
+for file in $*; do
+ case "$SRC" in
+ ".")
+ case "$file" in
+ */*)
+ dir=`expr X$file : 'X\(.*\)/'`
+ file=`expr X$file : 'X.*/\(.*\)'`
+ (cd $dir && . ./$file)
+ ;;
+ *)
+ . ./$file
+ ;;
+ esac
+ ;;
+ *)
+?X:
+?X: When running Configure remotely ($src is not '.'), we cannot source
+?X: the files directly, since that would wrongly cause the extraction
+?X: where the source lie instead of withing the current directory. Therefore,
+?X: we need to 'sh <file' then, which is okay since they will source the
+?X: existing config.sh file. It's not possible to use:
+?X: ../src/Configure -S -O -Dsomething
+?X: unfortunately since no new config.sh with the -Dsomething override
+?X: will be created before running the .SH files. A minor buglet.
+?X:
+?X: Note that we must create the directory hierarchy ourselves if it does
+?X: not exist already, and that is done through a shell emulation of the
+?X: 'mkdir -p' command. We don't want to use the $installdir metaconfig
+?X: symbol here since that would require too much to be configured for
+?X: this simple extraction task that may happen quickly with 'Configure -S'.
+?X: -- RAM, 18/03/96
+?X:
+ case "$file" in
+ */*)
+ dir=`expr X$file : 'X\(.*\)/'`
+ file=`expr X$file : 'X.*/\(.*\)'`
+ ./mkdirp $dir
+ sh <"$SRC/$dir/$file"
+ ;;
+ *)
+ sh <"$SRC/$file"
+ ;;
+ esac
+ ;;
+ esac
+done
+if test -f "$SRC/config_h.SH"; then
+ if test ! -f config.h; then
+?X: oops, they left it out of MANIFEST, probably, so do it anyway.
+ sh <"$SRC/config_h.SH"
+ fi
+fi
+EOS
+
diff --git a/mcon/U/Extractall.U b/mcon/U/Extractall.U
new file mode 100644
index 0000000..57b49e9
--- /dev/null
+++ b/mcon/U/Extractall.U
@@ -0,0 +1,51 @@
+?RCS: $Id$
+?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: Extractall.U,v $
+?RCS: Revision 3.0.1.1 1997/02/28 15:00:43 ram
+?RCS: patch61: created
+?RCS:
+?X:
+?X: If extraction has been requested, load the configuration file, perform
+?X: the extraction and exit.
+?X:
+?X: This unit was originally a part of Options.U. It had to be removed from
+?X: it to prevent a dependency cycle: Extract -> src -> Options -> Extract
+?X: The Begin.U unit now requires us before beginning to do anything
+?X: interesting, to ensure proper semantics. -- RAM, 15/03/96
+?X:
+?MAKE:Extractall: Extract Options
+?MAKE: -pick wipe $@ %<
+: extract files and exit if asked to do so
+case "$extractsh" in
+true)
+?X: Undo the forced silent=true when -S was supplied, by probing realsilent
+?X: which was set iff -s was also given. See Options.U for details.
+ case "$realsilent" in
+ true) ;;
+ *) exec 1>&4;;
+ esac
+ case "$config_sh" in
+ '') config_sh='config.sh';;
+ esac
+ echo " "
+ echo "Fetching answers from $config_sh..."
+ cd ..
+ . $config_sh
+ test "$override" && . ./optdef.sh
+ echo " "
+?X: extract has to be run from the top directory, not within UU.
+ . UU/extract
+ rm -rf UU
+ echo "Extraction done."
+ exit 0
+ ;;
+esac
+
diff --git a/mcon/U/Filexp.U b/mcon/U/Filexp.U
new file mode 100644
index 0000000..31e57a5
--- /dev/null
+++ b/mcon/U/Filexp.U
@@ -0,0 +1,73 @@
+?RCS: $Id$
+?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: Filexp.U,v $
+?RCS: Revision 3.0.1.2 1994/10/29 15:52:53 ram
+?RCS: patch36: added ?F: line for metalint file checking
+?RCS: patch36: added HOME to the ?T: line since metalint now checks ${HOME}
+?RCS:
+?RCS: Revision 3.0.1.1 1994/05/06 14:03:00 ram
+?RCS: patch23: made sure error status from csh is propagated (WED)
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:04:53 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: This unit produces a shell script which will expand filenames beginning
+?X: with tildes. The script is deleted at the end of Configure.
+?X:
+?MAKE:Filexp: startsh sed test expr eunicefix
+?MAKE: -pick add $@ %<
+?F:./filexp
+?T:HOME LOGDIR dir me name failed
+: set up shell script to do ~ expansion
+cat >filexp <<EOSS
+$startsh
+: expand filename
+?X:
+?X: The case entries below escape the ~ as some shells have shown expansion
+?X: of the ~ during here-doc processing.
+?X:
+case "\$1" in
+ \~/*|\~)
+ echo \$1 | $sed "s|~|\${HOME-\$LOGDIR}|"
+ ;;
+ \~*)
+ if $test -f /bin/csh; then
+ /bin/csh -f -c "glob \$1"
+ failed=\$?
+ echo ""
+ exit \$failed
+ else
+ name=\`$expr x\$1 : '..\([^/]*\)'\`
+ dir=\`$sed -n -e "/^\${name}:/{s/^[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\).*"'\$'"/\1/" -e p -e q -e '}' </etc/passwd\`
+ if $test ! -d "\$dir"; then
+ me=\`basename \$0\`
+ echo "\$me: can't locate home directory for: \$name" >&2
+ exit 1
+ fi
+ case "\$1" in
+ */*)
+ echo \$dir/\`$expr x\$1 : '..[^/]*/\(.*\)'\`
+ ;;
+ *)
+ echo \$dir
+ ;;
+ esac
+ fi
+ ;;
+*)
+ echo \$1
+ ;;
+esac
+EOSS
+chmod +x filexp
+$eunicefix filexp
+
diff --git a/mcon/U/Findhdr.U b/mcon/U/Findhdr.U
new file mode 100644
index 0000000..1985669
--- /dev/null
+++ b/mcon/U/Findhdr.U
@@ -0,0 +1,73 @@
+?RCS: $Id$
+?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: Original Author: Thomas Neumann <tom@smart.bo.open.de>
+?RCS:
+?RCS: $Log: Findhdr.U,v $
+?RCS: Revision 3.0.1.2 1994/10/29 15:53:08 ram
+?RCS: patch36: added ?F: line for metalint file checking
+?RCS:
+?RCS: Revision 3.0.1.1 1994/05/06 14:03:56 ram
+?RCS: patch23: cppminus must be after other cppflags, not before
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:04:54 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: This unit produces a findhdr script which is used to locate the header
+?X: files in $usrinc or other stranger places using cpp capabilities. The
+?X: script is given an include file base name, like 'stdio.h' or 'sys/file.h'
+?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 tr rm +usrinc awk cat startsh \
+ cppstdin cppminus +cppflags eunicefix fieldn cppfilter
+?MAKE: -pick add $@ %<
+?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!
+: locate header file
+$cat >findhdr <<EOF
+$startsh
+wanted=\$1
+name=''
+for usrincdir in $usrinc; do
+ if test -f \$usrincdir/\$wanted; then
+ echo "\$usrincdir/\$wanted"
+ exit 0
+ fi
+done
+awkprg='{ print \$$fieldn }'
+echo "#include <\$wanted>" > foo\$\$.c
+$cppstdin $cppminus $cppflags < foo\$\$.c 2>/dev/null | \
+$cppfilter $grep "^[ ]*#.*\$wanted" | \
+while read cline; do
+ name=\`echo \$cline | $awk "\$awkprg" | $tr -d '"'\`
+ case "\$name" in
+ *[/\\\\]\$wanted) echo "\$name"; exit 1;;
+ *[\\\\/]\$wanted) echo "\$name"; exit 1;;
+ *) exit 2;;
+ esac
+done
+?X: status = 0: grep returned 0 lines, case statement not executed
+?X: status = 1: headerfile found
+?X: status = 2: while loop executed, no headerfile found
+status=\$?
+$rm -f foo\$\$.c
+if test \$status -eq 1; then
+ exit 0
+fi
+exit 1
+EOF
+chmod +x findhdr
+$eunicefix findhdr
+
diff --git a/mcon/U/Finish.U b/mcon/U/Finish.U
new file mode 100644
index 0000000..cf5a364
--- /dev/null
+++ b/mcon/U/Finish.U
@@ -0,0 +1,141 @@
+?RCS: $Id$
+?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: Finish.U,v $
+?RCS: Revision 3.0.1.6 1995/02/15 14:09:30 ram
+?RCS: patch51: now clearer about how to edit config.sh at the prompt (WED)
+?RCS:
+?RCS: Revision 3.0.1.5 1994/10/29 15:53:14 ram
+?RCS: patch36: added ?F: line for metalint file checking
+?RCS:
+?RCS: Revision 3.0.1.4 1994/05/06 14:19:37 ram
+?RCS: patch23: added blank lines around 'End of Configure'
+?RCS:
+?RCS: Revision 3.0.1.3 1993/10/16 13:46:09 ram
+?RCS: patch12: replaced Config_h by Magic_h in the dependency line
+?RCS:
+?RCS: Revision 3.0.1.2 1993/09/13 15:45:26 ram
+?RCS: patch10: fixed shell evaluation w/o shell escape while in silent mode
+?RCS:
+?RCS: Revision 3.0.1.1 1993/08/30 08:55:59 ram
+?RCS: patch8: prevents myread from blocking on empty answers, exceptionally
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:04:55 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: This unit is the very last one in the Configure script. It runs all the
+?X: SH files, which among other things produce config.h and (usually) Makefile.
+?X: It offers to do a make depend if the Makefile contains that target.
+?X:
+?MAKE:Finish: Chk_MANI Extract Myread Oldsym Magic_h cat rm contains \
+ test package make
+?MAKE: -pick add $@ %<
+?F:!config.sh
+?T:pwd
+: Finish up by extracting the .SH files
+case "$alldone" in
+exit)
+?X: They supplied the -E switch
+ echo "Stopping at your request, leaving temporary files around."
+ exit 0
+ ;;
+cont)
+ ;;
+'')
+ dflt=''
+ nostick=true
+ $cat <<EOM
+
+If you'd like to make any changes to the config.sh file before I begin
+to configure things, do it as a shell escape now (e.g. !vi config.sh).
+
+EOM
+ rp="Press return or use a shell escape to edit config.sh:"
+ . UU/myread
+ nostick=''
+ case "$ans" in
+ '') ;;
+ *) : in case they cannot read
+ sh 1>&4 -c "$ans";;
+ esac
+ ;;
+esac
+
+: if this fails, just run all the .SH files by hand
+. ./config.sh
+
+?X:
+?X: Turn silent mode off from now on (we want a verbose file extraction).
+?X: This means we have to explicitly test for '$silent' from now on to
+?X: strip off any verbose messages.
+?X:
+echo " "
+exec 1>&4
+pwd=`pwd`
+. ./UU/extract
+cd "$pwd"
+
+if $contains '^depend:' [Mm]akefile >/dev/null 2>&1; then
+ dflt=y
+ case "$silent" in
+ true) ;;
+ *)
+ $cat <<EOM
+
+Now you need to generate make dependencies by running "$make depend".
+You might prefer to run it in background: "$make depend > makedepend.out &"
+It can take a while, so you might not want to run it right now.
+
+EOM
+ ;;
+ esac
+ rp="Run $make depend now?"
+ . UU/myread
+ case "$ans" in
+ y*)
+ $make depend && echo "Now you must run '$make'."
+ ;;
+ *)
+ echo "You must run '$make depend' then '$make'."
+ ;;
+ esac
+elif test -f [Mm]akefile; then
+ echo " "
+ echo "Now you must run a $make."
+else
+ echo "Configure done."
+fi
+
+if $test -f Policy.sh; then
+ $cat <<EOM
+
+If you compile $package on a different machine or from a different object
+directory, copy the Policy.sh file from this object directory to the
+new one before you run Configure -- this will help you with most of
+the policy defaults.
+
+EOM
+fi
+if $test -f UU/config.msg; then
+ echo "Hmm. I also noted the following information while running:"
+ echo " "
+ $cat UU/config.msg >&4
+fi
+?X:
+?X: kit*isdone files are left over by shell archives built using the makedist
+?X: script which comes from dist, while ark*isdone files are left over by
+?X: the cshar archive maker.
+?X:
+$rm -f kit*isdone ark*isdone
+$rm -rf UU
+
+: End of Configure
+
diff --git a/mcon/U/GCC_pipe.U b/mcon/U/GCC_pipe.U
new file mode 100644
index 0000000..130d78c
--- /dev/null
+++ b/mcon/U/GCC_pipe.U
@@ -0,0 +1,65 @@
+?RCS: $Id$
+?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
new file mode 100644
index 0000000..f5cf49b
--- /dev/null
+++ b/mcon/U/Getfile.U
@@ -0,0 +1,340 @@
+?RCS: $Id$
+?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: Getfile.U,v $
+?RCS: Revision 3.0.1.7 1997/02/28 15:01:06 ram
+?RCS: patch61: getfile script now begins with "startsh"
+?RCS:
+?RCS: Revision 3.0.1.6 1995/02/15 14:11:00 ram
+?RCS: patch51: was not working if ~'s allowed with d_portable on (WED)
+?RCS:
+?RCS: Revision 3.0.1.5 1995/01/11 15:11:25 ram
+?RCS: patch45: added support for escaping answers to skip various checks
+?RCS: patch45: modified message issued after file expansion
+?RCS:
+?RCS: Revision 3.0.1.4 1994/10/29 15:53:19 ram
+?RCS: patch36: added ?F: line for metalint file checking
+?RCS:
+?RCS: Revision 3.0.1.3 1994/05/06 14:23:36 ram
+?RCS: patch23: getfile could be confused by file name in "locate" requests
+?RCS: patch23: new 'p' directive to assume file is in people's path (WED)
+?RCS:
+?RCS: Revision 3.0.1.2 1994/01/24 14:01:31 ram
+?RCS: patch16: added metalint hint on changed 'ans' variable
+?RCS:
+?RCS: Revision 3.0.1.1 1993/09/13 15:46:27 ram
+?RCS: patch10: minor format problems and misspellings fixed
+?RCS: patch10: now performs from package dir and not from UU subdir
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:04:56 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: This unit produces a bit of shell code that must be dotted in in order
+?X: to get a file name and make some sanity checks. Optionally, a ~name
+?X: expansion is performed.
+?X:
+?X: To use this unit, $rp and $dflt must hold the question and the
+?X: default answer, which will be passed as-is to the myread script.
+?X: The $fn variable must hold the file type (f or d, for file/directory).
+?X: If $gfpth is set to a list of space-separated list of directories,
+?X: those are prefixes for the filename. Unless $gfpthkeep is set to 'y',
+?X: gfpth is cleared on return from Getfile.
+?X:
+?X: If is is followed by a ~, then ~name substitution will occur. Upon return,
+?X: $ans is set with the filename value. If a / is specified, then only a full
+?X: path name is accepted (but ~ substitution occurs before, if needed). The
+?X: expanded path name is returned in that case.
+?X:
+?X: If a + is specified, the existence checks are skipped. This usually means
+?X: the file/directory is under the full control of the program.
+?X:
+?X: If the 'n' (none) type is used, then the user may answer none.
+?X: The 'e' (expand) switch may be used to bypass d_portable, expanding ~name.
+?X:
+?X: If the 'l' (locate) type is used, then it must end with a ':' and then a
+?X: file name. If the answer is a directory, the file name will be appended
+?X: before testing for file existence. This is useful in locate-style
+?X: questions like "where is the active file?". In that case, one should
+?X: use:
+?X:
+?X: dflt='~news/lib'
+?X: fn='l~:active'
+?X: rp='Where is the active file?'
+?X: . ./getfile
+?X: active="$ans"
+?X:
+?X: If the 'p' (path) letter is specified along with 'l', then an answer
+?X: without a leading / will be expected to be found in everyone's path.
+?X:
+?X: It is also possible to include a comma-separated list of items within
+?X: parentheses to specify which items should be accepted as-is with no
+?X: further checks. This is useful when for instance a full path is expected
+?X: but the user may escape out via "magical" answers.
+?X:
+?X: If the answer to the question is 'none', then the existence checks are
+?X: skipped and the empty string is returned.
+?X:
+?MAKE:Getfile: d_portable contains startsh Myread Filexp tr trnl
+?MAKE: -pick add $@ %<
+?V:ansexp:fn gfpth gfpthkeep
+?F:./getfile
+?T:tilde type what orig_rp orig_dflt fullpath already redo skip none_ok \
+ value exp_file nopath_ok loc_file fp pf dir direxp
+?LINT:change ans
+?LINT:change gfpth
+: now set up to get a file name
+cat <<EOS >getfile
+$startsh
+EOS
+cat <<'EOSC' >>getfile
+tilde=''
+fullpath=''
+already=''
+skip=''
+none_ok=''
+exp_file=''
+nopath_ok=''
+orig_rp="$rp"
+orig_dflt="$dflt"
+case "$gfpth" in
+'') gfpth='.' ;;
+esac
+
+?X: Begin by stripping out any (...) grouping.
+case "$fn" in
+*\(*)
+ : getfile will accept an answer from the comma-separated list
+ : enclosed in parentheses even if it does not meet other criteria.
+ expr "$fn" : '.*(\(.*\)).*' | $tr ',' $trnl >getfile.ok
+ fn=`echo $fn | sed 's/(.*)//'`
+ ;;
+esac
+
+?X: Catch up 'locate' requests early, so that we may strip the file name
+?X: before looking at the one-letter commands, in case the file name contains
+?X: one of them. Reported by Wayne Davison <davison@borland.com>.
+case "$fn" in
+*:*)
+ loc_file=`expr $fn : '.*:\(.*\)'`
+ fn=`expr $fn : '\(.*\):.*'`
+ ;;
+esac
+
+case "$fn" in
+*~*) tilde=true;;
+esac
+case "$fn" in
+*/*) fullpath=true;;
+esac
+case "$fn" in
+*+*) skip=true;;
+esac
+case "$fn" in
+*n*) none_ok=true;;
+esac
+case "$fn" in
+*e*) exp_file=true;;
+esac
+case "$fn" in
+*p*) nopath_ok=true;;
+esac
+
+case "$fn" in
+*f*) type='File';;
+*d*) type='Directory';;
+*l*) type='Locate';;
+esac
+
+what="$type"
+case "$what" in
+Locate) what='File';;
+esac
+
+case "$exp_file" in
+'')
+ case "$d_portable" in
+ "$define") ;;
+ *) exp_file=true;;
+ esac
+ ;;
+esac
+
+cd ..
+while test "$type"; do
+ redo=''
+ rp="$orig_rp"
+ dflt="$orig_dflt"
+ case "$tilde" in
+ true) rp="$rp (~name ok)";;
+ esac
+ . UU/myread
+?X: check for allowed escape sequence which may be accepted verbatim.
+ if test -f UU/getfile.ok && \
+ $contains "^$ans\$" UU/getfile.ok >/dev/null 2>&1
+ then
+ value="$ans"
+ ansexp="$ans"
+ break
+ fi
+ case "$ans" in
+ none)
+ value=''
+ ansexp=''
+ case "$none_ok" in
+ true) type='';;
+ esac
+ ;;
+ *)
+ case "$tilde" in
+ '') value="$ans"
+ ansexp="$ans";;
+ *)
+ value=`UU/filexp $ans`
+ case $? in
+ 0)
+ if test "$ans" != "$value"; then
+ echo "(That expands to $value on this system.)"
+ fi
+ ;;
+ *) value="$ans";;
+ esac
+ ansexp="$value"
+ case "$exp_file" in
+ '') value="$ans";;
+ esac
+ ;;
+ esac
+ case "$fullpath" in
+ true)
+?X: Perform all the checks on ansexp and not value since when d_portable
+?X: is defined, the original un-expanded answer which is stored in value
+?X: would lead to "non-existent" error messages whilst ansexp has been
+?X: properly expanded. -- Fixed by Jan.Djarv@sa.erisoft.se (Jan Djarv)
+?X: Always expand ~user if '/' was requested
+ case "$ansexp" in
+ /*) value="$ansexp" ;;
+?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
+ true)
+ echo "I shall only accept a full path name, as in /bin/ls." >&4
+ echo "Use a ! shell escape if you wish to check pathnames." >&4
+ ;;
+ *)
+ echo "Please give a full path name, starting with slash." >&4
+ case "$tilde" in
+ true)
+ echo "Note that using ~name is ok provided it expands well." >&4
+ already=true
+ ;;
+ esac
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ case "$redo" in
+ '')
+ case "$type" in
+ File)
+ for fp in $gfpth; do
+ if test "X$fp" = X.; then
+ pf="$ansexp"
+ else
+ pf="$fp/$ansexp"
+ fi
+ if test -f "$pf"; then
+ type=''
+ elif test -r "$pf" || (test -h "$pf") >/dev/null 2>&1
+ then
+ echo "($value is not a plain file, but that's ok.)"
+ type=''
+ fi
+ if test X"$type" = X; then
+ value="$pf"
+ break
+ fi
+ done
+ ;;
+ Directory)
+ for fp in $gfpth; do
+ if test "X$fp" = X.; then
+ dir="$ans"
+ direxp="$ansexp"
+ else
+ dir="$fp/$ansexp"
+ direxp="$fp/$ansexp"
+ fi
+ if test -d "$direxp"; then
+ type=''
+ value="$dir"
+ break
+ fi
+ done
+ ;;
+ Locate)
+ if test -d "$ansexp"; then
+ echo "(Looking for $loc_file in directory $value.)"
+ value="$value/$loc_file"
+ ansexp="$ansexp/$loc_file"
+ fi
+ if test -f "$ansexp"; then
+ type=''
+ fi
+ case "$nopath_ok" in
+ true) case "$value" in
+ */*) ;;
+ *) echo "Assuming $value will be in people's path."
+ type=''
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+
+ case "$skip" in
+ true) type='';
+ esac
+
+ case "$type" in
+ '') ;;
+ *)
+ if test "$fastread" = yes; then
+ dflt=y
+ else
+ dflt=n
+ fi
+ rp="$what $value doesn't exist. Use that name anyway?"
+ . UU/myread
+ dflt=''
+ case "$ans" in
+ y*) type='';;
+ *) echo " ";;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+done
+cd UU
+ans="$value"
+rp="$orig_rp"
+dflt="$orig_dflt"
+rm -f getfile.ok
+test "X$gfpthkeep" != Xy && gfpth=""
+EOSC
+
diff --git a/mcon/U/Guess.U b/mcon/U/Guess.U
new file mode 100644
index 0000000..bee82a1
--- /dev/null
+++ b/mcon/U/Guess.U
@@ -0,0 +1,248 @@
+?RCS: $Id$
+?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: Guess.U,v $
+?RCS: Revision 3.0.1.5 1995/07/25 13:37:14 ram
+?RCS: patch56: now knows about OS/2 platforms
+?RCS:
+?RCS: Revision 3.0.1.4 1994/10/29 15:53:55 ram
+?RCS: patch36: added ?F: line for metalint file checking
+?RCS: patch36: call ./xenix explicitly instead of relying on PATH
+?RCS:
+?RCS: Revision 3.0.1.3 1993/12/15 08:14:35 ram
+?RCS: patch15: variable d_bsd was not always set properly
+?RCS:
+?RCS: Revision 3.0.1.2 1993/08/30 08:57:14 ram
+?RCS: patch8: fixed comment which wrongly attributed the usrinc symbol
+?RCS: patch8: no more ugly messages when no /usr/include/ctype.h
+?RCS:
+?RCS: Revision 3.0.1.1 1993/08/27 14:37:37 ram
+?RCS: patch7: added support for OSF/1 machines
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:04:57 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: This unit hazards some guesses as to what the general nature of the system
+?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 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
+?S: alerts the C program that it must deal with ideosyncracies of VMS.
+?S:.
+?S:d_xenix:
+?S: This variable conditionally defines the symbol XENIX_SYSTEM, which alerts
+?S: the C program that it runs under Xenix.
+?S:.
+?S:d_dos:
+?S: This symbol conditionally defines the symbol DOS_SYSTEM when running on
+?S: DOS with DJGPP or Cygwin.
+?S:.
+?S:d_os2:
+?S: This symbol conditionally defines the symbol OS2_SYSTEM when running on
+?S: an OS/2 system.
+?S:.
+?S:d_bsd:
+?S: This symbol conditionally defines the symbol BSD_SYSTEM when running on a
+?S: BSD system.
+?S:.
+?S:d_linux:
+?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
+?C: things like files that don't go away the first time you unlink them,
+?C: due to version numbering. It will also need to compensate for lack
+?C: of a respectable link() command.
+?C:.
+?C:VMS_SYSTEM (VMS):
+?C: This symbol, if defined, indicates that the program is running under
+?C: VMS. It is currently only set in conjunction with the EUNICE symbol.
+?C:.
+?C:XENIX_SYSTEM (XENIX):
+?C: This symbol, if defined, indicates that the program is running under
+?C: Xenix (at least 3.0 ?).
+?C:.
+?C:DOS_SYSTEM:
+?C: This symbol, if defined, indicates that the program is running under
+?C: DOS with DJGPP.
+?C:.
+?C:OS2_SYSTEM:
+?C: This symbol, if defined, indicates that the program is running under
+?C: an OS/2 system.
+?C:.
+?C:BSD_SYSTEM:
+?C: This symbol, if defined, indicates that the program is running under
+?C: a BSD system.
+?C:.
+?C:LINUX_SYSTEM:
+?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 /**/
+?H:#$d_dos DOS_SYSTEM /**/
+?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
+?F:./windows ./linux
+?T:xxx DJGPP MACHTYPE
+: make some quick guesses about what we are up against
+echo " "
+$echo $n "Hmm... $c"
+echo exit 1 >bsd
+echo exit 1 >usg
+echo exit 1 >v7
+echo exit 1 >osf1
+echo exit 1 >eunice
+echo exit 1 >xenix
+echo exit 1 >venix
+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...
+?X:
+$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
+ echo "Looks kind of like an OSF/1 system, but we'll see..."
+ echo exit 0 >osf1
+elif test `echo abc | $tr a-z A-Z` = Abc ; then
+ xxx=`./loc addbib blurfl $pth`
+ if $test -f $xxx; then
+ echo "Looks kind of like a USG system with BSD features, but we'll see..."
+ echo exit 0 >bsd
+ echo exit 0 >usg
+ else
+ if $contains SIGTSTP foo >/dev/null 2>&1 ; then
+ echo "Looks kind of like an extended USG system, but we'll see..."
+ else
+ echo "Looks kind of like a USG system, but we'll see..."
+ fi
+ echo exit 0 >usg
+ fi
+elif $contains SIGTSTP foo >/dev/null 2>&1 ; then
+ echo "Looks kind of like a BSD system, but we'll see..."
+ d_bsd="$define"
+ echo exit 0 >bsd
+elif
+ $rm --version 2>/dev/null >foo;
+ $contains "Free Software Foundation" foo >/dev/null
+then
+ xxx=`uname`
+ echo exit 0 >gnu
+ echo "Looks kind of like a GNU/$xxx system, but we'll see..."
+ if $test X$xxx = XLinux; then
+ d_linux="$define"
+ echo exit 0 >linux
+ fi
+else
+ echo "Looks kind of like a Version 7 system, but we'll see..."
+ echo exit 0 >v7
+fi
+case "$eunicefix" in
+*unixtovms*)
+ $cat <<'EOI'
+There is, however, a strange, musty smell in the air that reminds me of
+something...hmm...yes...I've got it...there's a VMS nearby, or I'm a Blit.
+EOI
+ echo exit 0 >eunice
+ d_eunice="$define"
+: it so happens the Eunice I know will not run shell scripts in Unix format
+ ;;
+*)
+ echo " "
+ echo "Congratulations. You aren't running Eunice."
+ 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
+:) ;;
+*)
+ $cat <<'EOI'
+I have the feeling something is not exactly right, however...don't tell me...
+EOI
+ if test -n "$DJGPP"; then
+ echo exit 0 >dos
+ d_dos="$define"
+ else
+ $cat <<'EOI'
+lemme think...does HAL ring a bell?...no, of course, you're only running OS/2!
+EOI
+ echo exit 0 >os2
+ d_os2="$define"
+ fi
+ ;;
+esac
+if test -f /xenix; then
+ echo "Actually, this looks more like a XENIX system..."
+ echo exit 0 >xenix
+ d_xenix="$define"
+else
+ echo " "
+ echo "It's not Xenix..."
+ d_xenix="$undef"
+fi
+chmod +x xenix
+$eunicefix xenix
+if test -f /venix; then
+ echo "Actually, this looks more like a VENIX system..."
+ echo exit 0 >venix
+else
+ echo " "
+ if ./xenix; then
+ : null
+ else
+ echo "Nor is it Venix..."
+ fi
+fi
+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
new file mode 100644
index 0000000..933e489
--- /dev/null
+++ b/mcon/U/Head.U
@@ -0,0 +1,282 @@
+?RCS: $Id$
+?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: Head.U,v $
+?RCS: Revision 3.0.1.9 1997/02/28 15:02:09 ram
+?RCS: patch61: make sure we unset CDPATH for shells that support this
+?RCS: patch61: improved Korn shell detection and handling
+?RCS:
+?RCS: Revision 3.0.1.8 1995/07/25 13:40:02 ram
+?RCS: patch56: added SVR4-ish /opt directories to path list (ADO)
+?RCS: patch56: OS/2 platforms are using another path separator
+?RCS:
+?RCS: Revision 3.0.1.7 1995/03/21 08:46:15 ram
+?RCS: patch52: definition of paths wrongly added spurious ':' chars
+?RCS:
+?RCS: Revision 3.0.1.6 1994/10/29 15:54:19 ram
+?RCS: patch36: make sure ENV is unset before calling /bin/ksh
+?RCS:
+?RCS: Revision 3.0.1.5 1994/08/29 16:03:44 ram
+?RCS: patch32: now sets PATH only using existing directories
+?RCS:
+?RCS: Revision 3.0.1.4 1994/06/20 06:54:28 ram
+?RCS: patch30: now computes its invocation name into 'me'
+?RCS: patch30: symbol me is made visible to all units read-only
+?RCS:
+?RCS: Revision 3.0.1.3 1993/12/15 08:15:07 ram
+?RCS: patch15: added /sbin:/usr/sbin:/usr/libexec in PATH for BSD/386
+?RCS:
+?RCS: Revision 3.0.1.2 1993/11/10 17:32:35 ram
+?RCS: patch14: ensure PATH is reset to '.' before testing for alias
+?RCS:
+?RCS: Revision 3.0.1.1 1993/08/27 14:38:07 ram
+?RCS: patch7: not all 'test' programs support the -x option
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:04:58 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: This is the very first unit in the Configure script. It is mostly just
+?X: things to keep people from getting into a tizzy right off the bat.
+?X:
+?MAKE:Head:
+?MAKE: -pick wipe $@ %<
+?V:PATH p_ _exe me newsh
+?T:argv Id p paths OS2_SHELL DJGPP
+?T:inksh needksh avoidksh newsh changesh reason
+?F:!*
+?LINT:extern ENV CDPATH SHELL MACHTYPE
+?LINT:change ENV CDPATH
+?LINT:nocomment
+#! /bin/sh
+#
+# If these # comments don't work, trim them. Don't worry about any other
+# shell scripts, Configure will trim # comments from them for you.
+#
+# (If you are trying to port this package to a machine without sh,
+# I would suggest you have a look at the prototypical config_h.SH file
+# and edit it to reflect your system. Some packages may include samples
+# of config.h for certain machines, so you might look for one of those.)
+#
+?X:
+?X: NOTE THAT A CONFIGURE SCRIPT IS IN THE PUBLIC DOMAIN (whether or not
+?X: the software which uses it is in the public domain).
+?X:
+# Yes, you may rip this off to use in other distribution packages. This
+# script belongs to the public domain and cannot be copyrighted.
+#
+?X:
+?X: WE ASK YOU NOT TO REMOVE OR ALTER THE FOLLOWING PARAGRAPH, PLEASE:
+?X:
+# 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.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,
+?X: you have to add some comments telling that the script was generated
+?X: by your version, not mine: It credits your work.
+?X:
+
+# $Id$
+#
+# Generated on <DATE> [metaconfig <VERSION>-<REVISION>]
+
+cat >c1$$ <<EOF
+ARGGGHHHH!!!!!
+
+SCO csh still thinks true is false. Write to SCO today and tell them that next
+year Configure ought to "rm /bin/csh" unless they fix their blasted shell. :-)
+
+(Actually, Configure ought to just patch csh in place. Hmm. Hmmmmm. All
+we'd have to do is go in and swap the && and || tokens, wherever they are.)
+
+[End of diatribe. We now return you to your regularly scheduled programming...]
+EOF
+cat >c2$$ <<EOF
+
+OOPS! You naughty creature! You didn't run Configure with sh!
+I will attempt to remedy the situation by running sh for you...
+EOF
+
+true || cat c1$$ c2$$
+true || exec sh $0 $argv:q
+
+(exit $?0) || cat c2$$
+(exit $?0) || exec sh $0 $argv:q
+rm -f c1$$ c2$$
+
+: compute my invocation name
+me=$0
+case "$0" in
+*/*)
+ me=`echo $0 | sed -e 's!.*/\(.*\)!\1!' 2>/dev/null`
+ test "$me" || me=$0
+ ;;
+esac
+
+?X:
+?X: To be able to run under OS/2, we must detect that early enough to use
+?X: the proper path separator, stored in $p_. It is : on UNIX and ; on
+?X: DOSish systems such as OS/2.
+?X:
+: Proper separator for the PATH environment variable
+p_=:
+: On OS/2 this directory should exist if this is not floppy only system ":-]"
+if test -d c:/. ; then
+ if test -n "$OS2_SHELL"; then
+ p_=\;
+ PATH=`cmd /c "echo %PATH%" | tr '\\\\' / `
+?X: That's a bug in ksh5.22
+ OS2_SHELL=`cmd /c "echo %OS2_SHELL%" | tr '\\\\' / | tr '[A-Z]' '[a-z]'`
+ elif test -n "$DJGPP"; then
+ case "X${MACHTYPE:-nonesuchmach}" in
+ *cygwin|*msys) ;;
+ *) p_=\; ;;
+ esac
+ fi
+fi
+
+?X:
+?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 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
+?X: chown is located on some BSD systems) may be missing--RAM.
+?X:
+?X: SVR4 adds an /opt directory for optional packages. Some sites use
+?X: various permutations on /opt as opposed to /usr or /usr/local.-- ADO
+?X:
+?X: We only add directories that are not already in the PATH of the
+?X: user and the directories must exist also.
+?X:
+: Proper PATH setting
+paths='/bin /usr/bin /usr/local/bin /usr/ucb /usr/local /usr/lbin'
+paths="$paths /opt/bin /opt/local/bin /opt/local /opt/lbin"
+paths="$paths /usr/5bin /etc /usr/gnu/bin /usr/new /usr/new/bin /usr/nbin"
+paths="$paths /opt/gnu/bin /opt/new /opt/new/bin /opt/nbin"
+paths="$paths /sys5.3/bin /sys5.3/usr/bin /bsd4.3/bin /bsd4.3/usr/ucb"
+paths="$paths /bsd4.3/usr/bin /usr/bsd /bsd43/bin /usr/ccs/bin"
+paths="$paths /etc /usr/lib /usr/ucblib /lib /usr/ccs/lib"
+paths="$paths /sbin /usr/sbin /usr/libexec"
+paths="$paths /system/gnu_library/bin"
+
+for p in $paths
+do
+ case "$p_$PATH$p_" in
+ *$p_$p$p_*) ;;
+ *) test -d $p && PATH=$PATH$p_$p ;;
+ esac
+done
+
+PATH=.$p_$PATH
+export PATH
+
+: shall we be using ksh?
+inksh=''
+needksh=''
+avoidksh=''
+newsh=/bin/ksh
+changesh=''
+?X: Use (alias -x) and not (alias) since zsh and bash recognize the alias
+?X: builtin but not the -x option which is typically ksh...
+?X: We need to set up PATH before calling the "alias" built-in since some
+?X: systems like HP-UX have a binary called /bin/alias.
+if (PATH=.; alias -x) >/dev/null 2>&1; then
+ inksh=true
+fi
+?X: On HP-UX, large Configure scripts may exercise a bug in /bin/sh, use ksh
+if test -f /hp-ux -a -f /bin/ksh; then
+ needksh='to avoid sh bug in "here document" expansion'
+fi
+?X: On AIX4, /bin/sh is really ksh and it causes problems, use sh
+if test -d /usr/lpp -a -f /usr/bin/bsh -a -f /usr/bin/uname; then
+ if test X`/usr/bin/uname -v` = X4; then
+ avoidksh="to avoid AIX 4's /bin/sh"
+ newsh=/usr/bin/bsh
+ fi
+fi
+?X: On Digital UNIX, /bin/sh may start up buggy /bin/ksh, use sh
+if test -f /osf_boot -a -f /usr/sbin/setld; then
+ if test X`/usr/bin/uname -s` = XOSF1; then
+ avoidksh="to avoid Digital UNIX' ksh"
+ newsh=/bin/sh
+?X: if BIN_SH is set to 'xpg4', sh will start up ksh
+ unset BIN_SH
+ fi
+fi
+?X: If we are not in ksh and need it, then feed us back to it
+case "$inksh/$needksh" in
+/[a-z]*)
+?X: Clear ENV to avoid any ~/.kshrc that could alias cd or whatever...
+?X: Don't use "unset ENV", that is not portable enough
+ ENV=''
+ changesh=true
+ reason="$needksh"
+ ;;
+esac
+?X: If we are in ksh and must avoid it, then feed us back to a new shell
+case "$inksh/$avoidksh" in
+true/[a-z]*)
+ changesh=true
+ reason="$avoidksh"
+ ;;
+esac
+?X: Warn them if they use ksh on other systems, which are those where
+?X: we don't need ksh nor want to avoid it explicitly, yet are using it.
+case "$inksh/$needksh-$avoidksh-" in
+true/--)
+ cat <<EOM
+(I see you are using the Korn shell. Some ksh's blow up on $me,
+mainly on older exotic systems. If yours does, try the Bourne shell instead.)
+EOM
+ ;;
+esac
+case "$changesh" in
+true)
+ export newsh
+ echo "(Feeding myself to $newsh $reason.)"
+?X: Make sure they didn't say sh <Configure by checking whether $0 ends
+?X: with Configure or not. If they did say sh <../../Configure, then too
+?X: bad for them anyway, since we lost that path indication...
+?X: Otherwise, execing $0 ensures we keep the full remote source dir
+?X: indication for src.U.
+ case "$0" in
+ Configure|*/Configure) exec $newsh $0 "$@";;
+ *) exec $newsh Configure "$@";;
+ esac
+ ;;
+esac
+
+?X: Unset CDPATH to avoid surprises when using cd under some shells
+?X: Can't unset it because that's not portable to very old shells.
+?X: Can't set it to '' because then bash 2.02 won't do "cd UU" --AD 6/98.
+?X: Don't want to set it to '.' because then ksh prints out the
+?X: name of the directory every time you cd to it. --AD 6/98
+?X: In order to inflict the least harm, change it only if it's set.
+: if needed, set CDPATH to a harmless value that is not chatty
+case "$CDPATH" in
+'') ;;
+*) case "$SHELL" in
+ *bash*) CDPATH='.' ;;
+ *) CDPATH='' ;;
+ esac
+ ;;
+esac
+
+: Configure runs within the UU subdirectory
+test -d UU || mkdir UU
+?X: Use ./* to avoid any confirmation prompts from enhanced shells -- WED
+cd UU && rm -f ./*
+
diff --git a/mcon/U/Inhdr.U b/mcon/U/Inhdr.U
new file mode 100644
index 0000000..72890e6
--- /dev/null
+++ b/mcon/U/Inhdr.U
@@ -0,0 +1,77 @@
+?RCS: $Id$
+?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: Inhdr.U,v $
+?RCS: Revision 3.0.1.2 1995/05/12 12:01:31 ram
+?RCS: patch54: deleted tabs that caused some /bin/sh to core dump (ADO)
+?RCS:
+?RCS: Revision 3.0.1.1 1994/10/29 15:55:01 ram
+?RCS: patch36: call ./whoa explicitly instead of relying on PATH
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:05:01 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: This unit checks wether a set of header files exists or not.
+?X: If the first header is not found, the function tries to locate
+?X: the next header, and so on, until one is found or there is no
+?X: more header in the list.
+?X:
+?X: To use it, say:
+?X: set header i_header [ header2 i_header2 ... ]
+?X: eval $inhdr
+?X:
+?MAKE:Inhdr: test Findhdr Whoa
+?MAKE: -pick add $@ %<
+?LINT:define inhdr
+?V:inhdr
+?S:inhdr:
+?S: This shell variable is used internally by Configure to check
+?S: wether a set of headers exist or not. A typical use is:
+?S: set header i_header [ header2 i_header2 ... ]
+?S: eval $inhdr
+?S: That will print a message, saying wether header was found or
+?S: not and set i_header* accordingly. If the first header is not
+?S: found, we try the next one, until the list is empty or one is found.
+?S:.
+?T:xxx xxf var td xxnf tu yyy instead was cont
+: define an alternate in-header-list? function
+inhdr='echo " "; td=$define; tu=$undef; yyy=$@;
+cont=true; xxf="echo \"<\$1> found.\" >&4";
+case $# in 2) xxnf="echo \"<\$1> NOT found.\" >&4";;
+*) xxnf="echo \"<\$1> NOT found, ...\" >&4";;
+esac;
+case $# in 4) instead=instead;; *) instead="at last";; esac;
+while $test "$cont"; do
+ xxx=`./findhdr $1`
+ var=$2; eval "was=\$$2";
+ if $test "$xxx" && $test -r "$xxx";
+ then eval $xxf;
+?X: Next line shifted left 1 tabstop to avoid sh core dump on MachTen 2.1.1.
+ eval "case \"\$$var\" in $undef) . ./whoa; esac"; eval "$var=\$td";
+ cont="";
+ else eval $xxnf;
+?X: Likewise, the next line has been shifted left 1 tabstop -- ADO, 08/03/95
+ eval "case \"\$$var\" in $define) . ./whoa; esac"; eval "$var=\$tu"; fi;
+ set $yyy; shift; shift; yyy=$@;
+ case $# in 0) cont="";;
+ 2) xxf="echo \"but I found <\$1> $instead.\" >&4";
+ xxnf="echo \"and I did not find <\$1> either.\" >&4";;
+ *) xxf="echo \"but I found <\$1\> instead.\" >&4";
+ xxnf="echo \"there is no <\$1>, ...\" >&4";;
+ esac;
+done;
+?X: Remaining values are set to 'undef'
+while $test "$yyy";
+do set $yyy; var=$2; eval "was=\$$2";
+ eval "case \"\$$var\" in $define) . ./whoa; esac"; eval "$var=\$tu";
+ set $yyy; shift; shift; yyy=$@;
+done'
+
diff --git a/mcon/U/Init.U b/mcon/U/Init.U
new file mode 100644
index 0000000..63ee6bd
--- /dev/null
+++ b/mcon/U/Init.U
@@ -0,0 +1,81 @@
+?RCS: $Id$
+?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: Init.U,v $
+?RCS: Revision 3.0.1.1 1994/10/31 09:45:59 ram
+?RCS: patch44: removed Options from MAKE to prevent Init overrides
+?RCS: patch44: option processing now done after Myinit thanks to new Begin.U
+?RCS: patch44: moved "Beginning of configuration questions" to Begin.U
+?RCS: patch44: moved signal trapping instruction to Begin.U as well
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:05:02 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: This file initializes certain default variables used by Configure. They
+?X: may be overridden or added to by definitions in Myinit.U.
+?X:
+?MAKE:Init eunicefix _exe: Null
+?MAKE: -pick add $@ %<
+?MAKE: -pick weed $@ ./Init
+?S:eunicefix:
+?S: When running under Eunice this variable contains a command which will
+?S: convert a shell script to the proper form of text file for it to be
+?S: executable by the shell. On other systems it is a no-op.
+?S:.
+?S:_exe (exe_ext):
+?S: This variable defines the extension used for executable files.
+?S: For unix it is empty. Other possible values include '.exe'.
+?S: DJGPP, Cygwin and OS/2 use '.exe'. Stratus VOS uses '.pm'.
+?S: On operating systems which do not require a specific extension
+?S: for executable files, this variable is empty.
+?S:.
+?V:define undef smallmach:rmlist
+?X:
+?X: Throughout the units, one may make use of $define and $undef to reference
+?X: a defined symbol or an undefined one. There is no need to add them in
+?X: the dependency line since this unit makes them visible via ?V:, and
+?X: everyone inherits from those symbols since by convention Init.U is the
+?X: root dependency.
+?X:
+?T: DJGPP
+: Initialize wide constants
+define='define'
+undef='undef'
+smallmach='pdp11 i8086 z8000 i80286 iAPX286'
+rmlist=''
+
+: We must find out about Eunice early
+eunicefix=':'
+if test -f /etc/unixtovms; then
+ eunicefix=/etc/unixtovms
+fi
+if test -f /etc/unixtovms.exe; then
+ eunicefix=/etc/unixtovms.exe
+fi
+
+: Set executable suffix now -- needed before hints available
+if test -f "/libs/version.library"; then
+ : Amiga OS
+ _exe=""
+elif test -f "/system/gnu_library/bin/ar.pm"; then
+ : Stratus VOS
+ _exe=".pm"
+elif test -n "$DJGPP"; then
+ : DOS DJGPP
+ _exe=".exe"
+elif test -d c:/. ; then
+ : OS/2 or cygwin
+ _exe=".exe"
+else
+ : All other UNIX systems
+ _exe=""
+fi
+
diff --git a/mcon/U/Inlibc.U b/mcon/U/Inlibc.U
new file mode 100644
index 0000000..36796ea
--- /dev/null
+++ b/mcon/U/Inlibc.U
@@ -0,0 +1,64 @@
+?RCS: $Id$
+?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: Inlibc.U,v $
+?RCS: Revision 3.0.1.1 1994/10/29 15:55:08 ram
+?RCS: patch36: call ./whoa explicitly instead of relying on PATH
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:05:03 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: This unit checks for the definition of a given function.
+?X:
+?X: To use it, say:
+?X: set function d_func
+?X: eval $inlibc
+?X:
+?MAKE:Inlibc: Csym Whoa Oldconfig
+?MAKE: -pick add $@ %<
+?LINT:define inlibc
+?V:inlibc
+?S:inlibc:
+?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: set function d_func
+?S: eval $inlibc
+?S: That will print a message, saying wether function was found or
+?S: not and set d_func accordingly.
+?S:.
+?T:was tx sym tres td tu var
+: define an is-in-libc? function
+inlibc='echo " "; td=$define; tu=$undef;
+sym=$1; var=$2; eval "was=\$$2";
+tx=yes;
+case "$reuseval$was" in
+true) ;;
+true*) tx=no;;
+esac;
+case "$tx" in
+yes)
+ set $sym tres -f;
+ eval $csym;
+ case "$tres" in
+ true)
+ echo "$sym() found." >&4;
+ case "$was" in $undef) . ./whoa; esac; eval "$var=\$td";;
+ *)
+ echo "$sym() NOT found." >&4;
+ case "$was" in $define) . ./whoa; esac; eval "$var=\$tu";;
+ esac;;
+*)
+ case "$was" in
+ $define) echo "$sym() found." >&4;;
+ *) echo "$sym() NOT found." >&4;;
+ esac;;
+esac'
+
diff --git a/mcon/U/Instruct.U b/mcon/U/Instruct.U
new file mode 100644
index 0000000..3bc4de2
--- /dev/null
+++ b/mcon/U/Instruct.U
@@ -0,0 +1,116 @@
+?RCS: $Id$
+?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: Instruct.U,v $
+?RCS: Revision 3.0.1.3 1997/02/28 15:02:55 ram
+?RCS: patch61: logname / whoami sequence rewritten to use case
+?RCS:
+?RCS: Revision 3.0.1.2 1995/02/15 14:11:34 ram
+?RCS: patch51: author name now appears at the end of the paragraph (WED)
+?RCS:
+?RCS: Revision 3.0.1.1 1995/01/11 15:12:05 ram
+?RCS: patch45: now documents the & escape to turn -d on at the read prompt
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:05:04 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: This unit spew out the directions that we want everyone to read. I try to
+?X: keep the first "pagefull" much less than a page since they don't know it
+?X: isn't going to go shooting off the top of the screen, and we don't want
+?X: to panic them yet.
+?X:
+?MAKE:Instruct: Begin Myread Configdir contains
+?MAKE: -pick wipe $@ %<
+?T:user needman firsttime
+: general instructions
+needman=true
+firsttime=true
+user=`(logname) 2>/dev/null`
+case "$user" in
+'') user=`whoami 2>&1`;;
+esac
+if $contains "^$user\$" ../.config/instruct >/dev/null 2>&1; then
+ firsttime=false
+ echo " "
+ rp='Would you like to see the instructions?'
+ dflt=n
+ . ./myread
+ case "$ans" in
+ [yY]*) ;;
+ *) needman=false;;
+ esac
+fi
+if $needman; then
+ cat <<EOH
+
+This installation shell script will examine your system and ask you questions
+to determine how the <PACKAGENAME> package should be installed. If you get
+stuck on a question, you may use a ! shell escape to start a subshell or
+execute a command. Many of the questions will have default answers in square
+brackets; typing carriage return will give you the default.
+
+On some of the questions which ask for file or directory names you are allowed
+to use the ~name construct to specify the login directory belonging to "name",
+even if you don't have a shell which knows about that. Questions where this is
+allowed will be marked "(~name ok)".
+
+EOH
+ rp=''
+ dflt='Type carriage return to continue'
+ . ./myread
+ cat <<'EOH'
+
+The prompter used in this script allows you to use shell variables and
+backticks in your answers. You may use $1, $2, etc... to refer to the words
+in the default answer, as if the default line was a set of arguments given to a
+script shell. This means you may also use $* to repeat the whole default line,
+so you do not have to re-type everything to add something to the default.
+
+Everytime there is a substitution, you will have to confirm. If there is an
+error (e.g. an unmatched backtick), the default answer will remain unchanged
+and you will be prompted again.
+
+If you are in a hurry, you may run 'Configure -d'. This will bypass nearly all
+the questions and use the computed defaults (or the previous answers if there
+was already a config.sh file). Type 'Configure -h' for a list of options.
+You may also start interactively and then answer '& -d' at any prompt to turn
+on the non-interactive behaviour for the remainder of the execution.
+
+EOH
+ . ./myread
+ cat <<EOH
+
+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 (<MAINTLOC>) know how I blew it.
+
+This installation script affects things in two ways:
+
+1) it may do direct variable substitutions on some of the files included
+ in this kit.
+2) it builds a config.h file for inclusion in C programs. You may edit
+ any of these files as the need arises after running this script.
+
+If you make a mistake on a question, there is no easy way to back up to it
+currently. The easiest thing to do is to edit config.sh and rerun all the SH
+files. Configure will offer to let you do this before it runs the SH files.
+
+EOH
+?X: In case they played with the prompter...
+ dflt='Type carriage return to continue'
+ . ./myread
+ case "$firsttime" in
+ true) echo $user >>../.config/instruct;;
+ esac
+fi
+
diff --git a/mcon/U/Largefile.U b/mcon/U/Largefile.U
new file mode 100644
index 0000000..559175a
--- /dev/null
+++ b/mcon/U/Largefile.U
@@ -0,0 +1,74 @@
+?RCS: $Id$
+?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
new file mode 100644
index 0000000..6d6a5d0
--- /dev/null
+++ b/mcon/U/Loc.U
@@ -0,0 +1,442 @@
+?RCS: $Id$
+?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: Loc.U,v $
+?RCS: Revision 3.0.1.10 1997/02/28 15:04:16 ram
+?RCS: patch61: allow users to specify paths on the command line
+?RCS: patch61: will now substitute cp for ln if not supported
+?RCS:
+?RCS: Revision 3.0.1.9 1995/09/25 09:11:24 ram
+?RCS: patch59: commented the purpose of the #un-def directive
+?RCS: patch59: abort Configure run when mandatory command is missing
+?RCS:
+?RCS: Revision 3.0.1.8 1995/07/25 13:40:40 ram
+?RCS: patch56: now knows about OS/2 platforms
+?RCS:
+?RCS: Revision 3.0.1.7 1995/01/11 15:13:37 ram
+?RCS: patch45: protected "sh -c" within backquotes for Linux and SGI
+?RCS: patch45: added path lookup for the 'comm' program
+?RCS:
+?RCS: Revision 3.0.1.6 1994/10/29 15:56:14 ram
+?RCS: patch36: added ?F: line for metalint file checking
+?RCS: patch36: be careful and guard against wildcard searching (ADO)
+?RCS:
+?RCS: Revision 3.0.1.5 1994/06/20 06:54:55 ram
+?RCS: patch30: now locates find
+?RCS:
+?RCS: Revision 3.0.1.4 1994/05/13 15:18:15 ram
+?RCS: patch27: added byacc to the trylist (ADO)
+?RCS: patch27: lint lines reformatted (ADO)
+?RCS:
+?RCS: Revision 3.0.1.3 1994/01/24 14:01:44 ram
+?RCS: patch16: added metalint hint on changed PATH variable
+?RCS:
+?RCS: Revision 3.0.1.2 1993/12/15 08:16:52 ram
+?RCS: patch15: now set _test variable when test is built-in
+?RCS: patch15: fixed rare cases where echo is not needed
+?RCS:
+?RCS: Revision 3.0.1.1 1993/09/13 15:47:13 ram
+?RCS: patch10: test program not always in /bin/test (WAD)
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:05:05 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: This unit produces a shell script "loc" which can be used to find out
+?X: where in a list of directories something is. It then uses loc to
+?X: determine the location of commonly used programs. It leaves loc sitting
+?X: around for other Configure units to use, but arranges for its demise
+?X: at the end of Configure.
+?X:
+?X: To add a new program to find, add it both to the ?MAKE: line and to either
+?X: the loclist or trylist variable.
+?X:
+?X: I put startsh at the end of the dependency list, in order to avoid the
+?X: loading of the spitshell unit before the instructions.
+?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 \
+ 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 \
+ 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 \
+ 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 \
+ 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:_echo _test _grep _cp _gmake _egrep _ln _make dflt
+?LINT: change PATH
+: find out where common programs are
+echo " "
+echo "Locating common programs..." >&4
+cat <<EOSC >loc
+$startsh
+case \$# in
+0) exit 1;;
+esac
+thing=\$1
+shift
+dflt=\$1
+shift
+for dir in \$*; do
+ case "\$thing" in
+ .)
+ if test -d \$dir/\$thing; then
+ echo \$dir
+ exit 0
+ fi
+ ;;
+ *)
+?X: Be careful in case thing includes wildcards that might expand to multiple
+?X: files. Choose the last one. This happens when searching for shared
+?X: libraries with version numbers. How to choose which one we want is
+?X: probably an insoluble problem, in general.
+?X: Some folks leave things like libc.so.orig around w/o read
+?X: permission. A -r test would handle that, but since ./loc is
+?X: also used to find executables (which are installed w/o read
+?X: permission on SCO ODT 3.0, we can't include the -r test.
+ for thisthing in \$dir/\$thing; do
+ : just loop through to pick last item
+ done
+ if test -f \$thisthing; then
+ echo \$thisthing
+ exit 0
+ elif test -f \$thisthing$_exe; then
+ echo \$thisthing
+ exit 0
+ elif test -f \$dir/\$thing.exe; then
+ if test -n "$DJGPP"; then
+ echo \$dir/\$thing.exe
+ else
+ : on Eunice apparently
+ echo \$dir/\$thing
+ fi
+ exit 0
+ fi
+ ;;
+ esac
+done
+echo \$dflt
+exit 1
+EOSC
+chmod +x loc
+$eunicefix loc
+loclist="
+?awk:awk
+?cat:cat
+?chgrp:chgrp
+?chmod:chmod
+?chown:chown
+?comm:comm
+?cp:cp
+?echo:echo
+?expr:expr
+?find:find
+?grep:grep
+?ls:ls
+?make:make
+?mkdir:mkdir
+?mv:mv
+?rm:rm
+?sed:sed
+?sleep:sleep
+?sort:sort
+?tail:tail
+?touch:touch
+?tr:tr
+?uniq:uniq
+"
+trylist="
+?Mcc:Mcc
+?ar:ar
+?bash:bash
+?bison:bison
+?byacc:byacc
+?compress:compress
+?cpio:cpio
+?cpp:cpp
+?csh:csh
+?date:date
+?egrep:egrep
+?emacs:emacs
+?flex:flex
+?gmake:gmake
+?gcc:gcc
+?gmsgfmt:gmsgfmt
+?gzip:gzip
+?inews:inews
+?ksh:ksh
+?less:less
+?line:line
+?lint:lint
+?ln:ln
+?lp:lp
+?lpr:lpr
+?mail:mail
+?mailx:mailx
+?more:more
+?msgfmt:msgfmt
+?msgmerge:msgmerge
+?nawk:nawk
+?nm:nm
+?nroff:nroff
+?perl:perl
+?pg:pg
+?pmake:pmake
+?pr:pr
+?rmail:rmail
+?sendmail:sendmail
+?shar:shar
+?smail:smail
+?submit:submit
+?tar:tar
+?tbl:tbl
+?tee:tee
+?test:test
+?troff:troff
+?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 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 \
+ msgfmt msgmerge \
+ uname uniq uuname vi wc zcat zip
+pth=`echo $PATH | sed -e "s/$p_/ /g"`
+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...
+?X: If the file is not fully qualified, as in -Dmake=pmake, then we
+?X: look the for the specified command (pmake here). If they say
+?X: -Dmake=/sbin/make for instance, then we make sure the file
+?X: exists, or we die...
+?X:
+ eval xxx=\$$file
+ case "$xxx" in
+ /*|?:[\\/]*)
+ if test -f "$xxx"; then
+ : ok
+ else
+ ./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
+ eval _$file=$xxx
+ case "$xxx" in
+ /*)
+ echo $file is in $xxx.
+ ;;
+?X: Under OS/2, we have PC-like paths
+ ?:[\\/]*)
+ echo $file is in $xxx.
+ ;;
+ *)
+ 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!" >&4
+ exit 1
+ ;;
+ esac
+done
+echo " "
+echo "Don't worry if any of the following aren't found..."
+say=offhand
+for file in $trylist; do
+?X: Allow them to -Dmake=pmake on the command line for instance (see above)
+ eval xxx=\$$file
+ case "$xxx" in
+ /*|?:[\\/]*)
+ if test -f "$xxx"; then
+ : ok
+ else
+ ./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
+ eval _$file=$xxx
+ case "$xxx" in
+ /*)
+ echo $file is in $xxx.
+ ;;
+?X: Under OS/2, we have PC-like paths
+ ?:[\\/]*)
+ echo $file is in $xxx.
+ ;;
+ *)
+ echo "I don't see $file out there, $say."
+ say=either
+ ;;
+ esac
+done
+case "$egrep" in
+egrep$_exe|egrep)
+ echo "Substituting grep for egrep."
+ egrep=$grep
+ _egrep=$_grep
+ ;;
+esac
+@if ln
+case "$ln" in
+ln$_exe|ln)
+ echo "Substituting cp for ln."
+ ln=$cp
+ _ln=$_cp
+ ;;
+esac
+@end
+@if make || gmake
+case "$make" in
+make$_exe|make)
+ case "$gmake" in
+ gmake)
+ echo "I can't find make or gmake, and my life depends on it." >&4
+ echo "Go find a public domain implementation or fix your PATH setting!" >&4
+ exit 1
+ ;;
+ esac
+ ;;
+esac
+case "$gmake" in
+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
+ fi
+ ;;
+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$_exe)
+ echo "Hopefully test is built into your sh."
+ test=test
+ ;;
+*)
+ if `sh -c "PATH= test true" >/dev/null 2>&1`; then
+ echo "Using the test built into your sh."
+?X:
+?X: We need to set both test and _test, since Oldconfig.U will use the _test
+?X: value to systematically restore computed paths, which may be wrong if
+?X: we choose to load an old config.sh generated on another platform.
+?X:
+ test=test
+ _test=test
+ fi
+ ;;
+esac
+?LINT:change n c
+case "$echo" in
+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 $n "hi there$c" >foo1
+ echo $n "hi there$c" >foo2
+ if cmp foo1 foo2 >/dev/null 2>&1; then
+ echo "They are compatible. In fact, they may be identical."
+ else
+ case "$n" in
+ '-n') n='' c='\c';;
+ *) n='-n' c='';;
+ esac
+ cat <<FOO
+They are not compatible! You are probably running ksh on a non-USG system.
+I'll have to use $echo instead of the builtin, since Bourne shell doesn't
+have echo built in and we may have to run some Bourne shell scripts. That
+means I'll have to use '$n$c' to suppress newlines now. Life is ridiculous.
+
+FOO
+ $echo $n "The star should be here-->$c"
+ $echo "*"
+ fi
+ $rm -f foo1 foo2
+ ;;
+esac
+
diff --git a/mcon/U/Loc_sed.U b/mcon/U/Loc_sed.U
new file mode 100644
index 0000000..09a7c1c
--- /dev/null
+++ b/mcon/U/Loc_sed.U
@@ -0,0 +1,33 @@
+?RCS: $Id$
+?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 License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?X: This is used in perl.c.
+?MAKE:full_sed: sed
+?MAKE: -pick add $@ %<
+?S:full_sed:
+?S: This variable contains the full pathname to 'sed', whether or
+?S: not the user has specified 'portability'. This is only used
+?S: in the compiled C program, and we assume that all systems which
+?S: can share this executable will have the same full pathname to
+?S: 'sed.'
+?S:.
+?X: Yes, I know about the C symbol PORTABLE, but I think sed
+?X: is unlikely to move, and I'm too lazy to add all the
+?X: #ifdef PORTABLE sections to the perl source.
+?X:
+?C:LOC_SED:
+?C: This symbol holds the complete pathname to the sed program.
+?C:.
+?H:#define LOC_SED "$full_sed" /**/
+?H:.
+: Store the full pathname to the sed program for use in the C program
+full_sed=$sed
+
diff --git a/mcon/U/Magic_h.U b/mcon/U/Magic_h.U
new file mode 100644
index 0000000..ccf82b9
--- /dev/null
+++ b/mcon/U/Magic_h.U
@@ -0,0 +1,43 @@
+?RCS: $Id$
+?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: Magic_h.U,v $
+?RCS: Revision 3.0.1.2 1993/11/10 17:32:58 ram
+?RCS: patch14: forgot to mention Id in the dependencies
+?RCS:
+?RCS: Revision 3.0.1.1 1993/10/16 13:46:59 ram
+?RCS: patch12: created for ?M: lines support (magic symbols)
+?RCS:
+?X:
+?X: This file ends up producing the confmagic.h include, which is used to
+?X: automagically remap some C symbols via cpp redefinitions.
+?X:
+?X: The file ./Magic_h below contains all the ?M: lines extracted out of all
+?X: the units. Metaconfig itself adds the final #endif statement.
+?X: Note that this code isn't included into Configure, but must be shipped with.
+?X:
+?MAKE:Magic_h: Id Config_h
+?MAKE: -pick cm_h_weed $@ %<
+?MAKE: -pick cm_h_weed $@ ./Magic_h
+?LINT:nocomment
+/*
+ * This file was produced by running metaconfig and is intended to be included
+ * after config.h and after all the other needed includes have been dealt with.
+ *
+ * This file may be empty, and should not be edited. Rerun metaconfig instead.
+ * If you wish to get rid of this magic, remove this file and rerun metaconfig
+ * without the -M option.
+ *
+ * $Id$
+ */
+
+#ifndef _confmagic_h_
+#define _confmagic_h_
+
diff --git a/mcon/U/MailAuthor.U b/mcon/U/MailAuthor.U
new file mode 100644
index 0000000..5b93cde
--- /dev/null
+++ b/mcon/U/MailAuthor.U
@@ -0,0 +1,192 @@
+?RCS: $Id$
+?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: Original Author: Graham Stoney <greyham@research.canon.oz.au>
+?RCS:
+?RCS: $Log: MailAuthor.U,v $
+?RCS: Revision 3.0.1.5 1997/02/28 15:04:41 ram
+?RCS: patch61: added support for src.U
+?RCS:
+?RCS: Revision 3.0.1.4 1994/08/29 16:05:09 ram
+?RCS: patch32: avoid message sending if they said no previously
+?RCS:
+?RCS: Revision 3.0.1.3 1993/10/16 13:47:30 ram
+?RCS: patch12: now makes sure user-specified address is in Internet format
+?RCS:
+?RCS: Revision 3.0.1.2 1993/09/13 15:48:49 ram
+?RCS: patch10: reverted to original intent by the Author himself
+?RCS:
+?RCS: Revision 3.0.1.1 1993/08/27 14:38:38 ram
+?RCS: patch7: now prompts user for its e-mail address
+?RCS: patch7: no longer silent when mail has been sent
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:05:06 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?RCS:
+?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: 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.
+?X:
+?MAKE:MailAuthor mailpatches notifypatches usermail: test cat mailer \
+ package Myread patchlevel baserev rm rsrc Oldconfig Configdir
+?MAKE: -pick wipe $@ %<
+?S:mailpatches:
+?S: Indicates whether the user would like future patches to be mailed
+?S: directly to them.
+?S:.
+?S:notifypatches:
+?S: Indicates whether the user would like notification of future patches
+?S: mailed to them.
+?S:.
+?S:usermail:
+?S: This variable is used internally by Configure to keep track of the
+?S: user e-mail address, where notifications or patches should be sent.
+?S: A '-' value means the return address will be extracted by parsing
+?S: the mail headers.
+?S:.
+?T:opt mailpatches notifypatches atsh status
+: notify author that his package is used
+if $test -f ../.config/mailauthor &&
+ cmp $rsrc/patchlevel.h ../.config/mailauthor >/dev/null 2>&1
+then
+ status="say that you're using $package";
+ case "$mailpatches" in
+ true) status='have patches mailed to you as they are issued';;
+ esac
+ case "$notifypatches" in
+ true) status='be notified when new patches are issued';;
+ esac
+ $cat <<EOM
+
+You have already sent the author of $package (<MAINTLOC>) mail to
+$status. If you wish, you may modify
+your previous request by sending a new mail with different options.
+
+EOM
+ rp='Should I send a status update to <MAINTLOC>?'
+ dflt=n
+else
+ $cat <<EOM
+
+If you are able to send mail to the Internet, the author of $package would
+really appreciate you letting me send off a quick note, just to say that you've
+tried it. The author is more likely to spend time maintaining $package if it's
+known that many people are using it, and you can even ask to get sent new
+patches automagically this way if you wish. To protect your privacy, all I'll
+say in the mail is the version of $package that you're using.
+
+EOM
+ rp='Should I send mail to <MAINTLOC>?'
+ dflt=y
+?X: Ensure default is 'n' if question has been asked already, in case they
+?X: run Configure -d next time and answered 'n' the first time. Therefore,
+?X: an empty nomail will be created later on even if no mail is sent.
+ $test -f ../.config/nomail && dflt=n
+fi
+. ./myread
+case "$ans" in
+[yY]*)
+ echo " "
+ echo "Great! Your cooperation is really appreciated."
+ $cat <<EOM
+
+Some braindead sites do not set a proper return address in the From: header of
+their outgoing mail, making it impossible to reply to mail they generate.
+If your site is broken in this way, write to your system administrator and get
+it fixed!!! In the mean time, you can manually specify the Internet e-mail
+address by which the author can get back to you, should there be a need to do
+so. If manually specified, it should be something like "user@domain.top".
+If your mail system generates addresses correctly, specify "none".
+
+EOM
+ case "$usermail" in
+ '-'|'') dflt=none;;
+ *) dflt="$usermail";;
+ esac
+ rp='Manually specify a return address to use:'
+ . ./myread
+ case "$ans" in
+ none|*@*.*)
+ case "$ans" in
+ none) usermail='-';;
+ *) usermail="$ans";;
+ esac
+ ;;
+ *)
+ echo "(Address does not look like an Internet one -- ignoring it.)"
+?X:
+?X: If we can't trust their mailer or their return address, it's highly
+?X: suggested that they only register and don't ask to get anything from
+?X: the author, since it's likely to bounce in null-land -- RAM.
+?X:
+ usermail='-'
+ mailpatches=false
+ notifypatches=false
+ ;;
+ esac
+ echo " "
+ opt=''
+ rp='Would you like to have new patches automatically mailed to you?'
+ case "$mailpatches" in
+ true) dflt=y;;
+ *) dflt=n;;
+ esac
+ . ./myread
+ case "$ans" in
+ [yY]*) opt=' mailpatches'; mailpatches=true;;
+ *)
+ mailpatches=false
+ echo " "
+ rp='Ok, would you like to simply be notified of new patches?'
+ case "$notifypatches" in
+ false) dflt=n;;
+ *) dflt=y;;
+ esac
+ . ./myread
+ echo " "
+ case "$ans" in
+ [yY]*) opt=' notifypatches'; notifypatches=true;;
+ *)
+ echo "Fine, I'll simply say that you've tried it then."
+ notifypatches=false
+ ;;
+ esac
+ ;;
+ esac
+ echo "Sending mail to <MAINTLOC>..." >&4
+?X: Bizarre hack here. We can't just put @SH in the hereis lines below, because
+?X: metaconfig will interpret it as a command, and there's no quoting mechanism.
+?X: Do it via a variable instead.
+ atsh='@SH'
+ $mailer <MAINTLOC> <<EOM >/dev/null 2>&1
+Subject: Command
+Precedence: junk
+To: <MAINTLOC>
+
+$atsh package $usermail $package $baserev $patchlevel$opt
+EOM
+ $rm -f ../.config/mailauthor ../.config/nomail
+ cp $rsrc/patchlevel.h ../.config/mailauthor
+ ;;
+*)
+ case "$dflt" in
+ "y")
+ echo "Oh well, maybe next time."
+ cp /dev/null ../.config/nomail
+ ;;
+ esac
+ ;;
+esac
+
diff --git a/mcon/U/MailList.U b/mcon/U/MailList.U
new file mode 100644
index 0000000..f89262f
--- /dev/null
+++ b/mcon/U/MailList.U
@@ -0,0 +1,82 @@
+?RCS: $Id$
+?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: Original Author: Graham Stoney <greyham@research.canon.oz.au>
+?RCS:
+?RCS: $Log: MailList.U,v $
+?RCS: Revision 3.0.1.1 1994/01/24 14:01:49 ram
+?RCS: patch16: created
+?RCS:
+?RCS:
+?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: 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.
+?X:
+?MAKE:MailList: cat mailer package Myread cf_name cf_email
+?MAKE: -pick wipe $@ %<
+?T:list_request list_sub list_unsub list_name
+?X:
+?X: The cf_name dependency is used through list_sub when the mailing list
+?X: manager happens to be listserv, whereas cf_email is used whith majordomo
+?X: or when the mailing list request address is scanned by a human. Since
+?X: they do not appear within the unit itself, we need a lint hint.
+?X:
+?LINT:use cf_name cf_email
+: offer to join the mailing list
+list_request='<$list_request>'
+list_sub="<$list_sub>"
+list_unsub="<$list_unsub>"
+list_name="<$list_name>"
+$cat <<EOM
+
+There is a mailing list for discussion about $package and related issues.
+This is the preferred place to ask questions about the program and discuss
+modifications and additions with the author and other users. If you are able
+to send mail to the Internet, you are encouraged to subscribe. You need only
+ever subscribe once, and you can unsubscribe automatically at any time in the
+future. If you have already subscribed and you wish to unsubscribe now, you
+may do so by answering "unsubscribe". Answer "subscribe" to subscribe to the
+list.
+
+EOM
+rp="Subscribe to or unsubscribe from the $list_name mailing list?"
+dflt=neither
+. ./myread
+case "$ans" in
+[sS]*) $cat <<EOM
+
+You will be sent a message from the list server to let you know when your
+subscription has been successful and telling you how to submit articles and
+how to unsubscribe again when necessary. You may also unsubscribe by running
+this script again and asking it to do so for you.
+
+EOM
+ echo "Sending mail to subscribe you to the $list_name list..." >&4
+ $mailer $list_request <<EOM >/dev/null 2>&1
+Precedence: junk
+To: $list_request
+
+$list_sub
+EOM
+ ;;
+[uU]*) echo "Sending mail to unsubscribe you from the $list_name list..." >&4
+ $mailer $list_request <<EOM >/dev/null 2>&1
+Precedence: junk
+To: $list_request
+
+$list_unsub
+EOM
+ ;;
+esac
+
diff --git a/mcon/U/Mips.U b/mcon/U/Mips.U
new file mode 100644
index 0000000..603b713
--- /dev/null
+++ b/mcon/U/Mips.U
@@ -0,0 +1,69 @@
+?RCS: $Id$
+?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
new file mode 100644
index 0000000..ab8097f
--- /dev/null
+++ b/mcon/U/Mkdirp.U
@@ -0,0 +1,51 @@
+?RCS: $Id$
+?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: Extract.U,v $
+?RCS: Revision 3.0.1.2 1997/02/28 14:58:52 ram
+?RCS: patch61: added support for src.U
+?RCS:
+?RCS: Revision 3.0.1.1 1994/10/29 15:51:46 ram
+?RCS: patch36: added ?F: line for metalint file checking
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:04:52 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: This unit produces a shell script which can launched to create a
+?X: directory path like "mkdir -p" would do.
+?X:
+?MAKE:Mkdirp: eunicefix startsh
+?MAKE: -pick add $@ %<
+?F:./mkdirp
+?T:name create file
+: script used to emulate mkdir -p
+cat >mkdirp <<EOS
+$startsh
+EOS
+cat >>mkdirp <<'EOS'
+name=$1;
+create="";
+while test $name; do
+ if test ! -d "$name"; then
+ create="$name $create"
+ name=`echo $name | sed -e "s|^[^/]*$||"`
+ name=`echo $name | sed -e "s|\(.*\)/.*|\1|"`
+ else
+ name=""
+ fi
+done
+for file in $create; do
+ mkdir $file
+done
+EOS
+chmod +x mkdirp
+$eunicefix mkdirp
+
diff --git a/mcon/U/Mksymlinks.U b/mcon/U/Mksymlinks.U
new file mode 100644
index 0000000..c150da4
--- /dev/null
+++ b/mcon/U/Mksymlinks.U
@@ -0,0 +1,90 @@
+?RCS: $Id$
+?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: Copyright (c) 2000, Jarkko Hietaniemi
+?RCS:
+?X:
+?X: This unit allows the duplication of the source tree to the current
+?X: directory via symbolic links. This must be requested explicitly
+?X: by them issuing a -Dmksymlinks on the command line.
+?X:
+?MAKE:Mksymlinks: Mkdirp lns issymlink src rsrc pkgsrc
+?MAKE: -pick add $@ %<
+?F:!UU
+?T: dir filename tmppwd filelist
+?LINT:extern mksymlinks
+@if {test -f ../MANIFEST}
+: Duplicate the tree with symbolic links if -Dmksymlinks was supplied
+case "$mksymlinks" in
+$define|true|[yY]*)
+ echo " "
+ case "$src" in
+ ''|'.') echo "Cannot create symlinks in the original directory." >&4
+ exit 1
+ ;;
+ *) case "$lns:$issymlink" in
+ *"ln"*" -s:"*"test -"?)
+ echo "Creating the symbolic links..." >&4
+ echo "(First creating the subdirectories...)" >&4
+ cd ..
+ awk '{print $1}' $src/MANIFEST | grep / | sed 's:/[^/]*$::' | \
+ sort -u | while true
+ do
+ read dir
+ test -z "$dir" && break
+ ./UU/mkdirp $dir 2>/dev/null
+ if test -d $dir; then
+ : ok
+ else
+ echo "Failed to create '$dir'. Aborting." >&4
+ exit 1
+ fi
+ done
+ echo "(Now creating the symlinks...)" >&4
+ awk '{print $1}' $src/MANIFEST | while true; do
+ read filename
+ test -z "$filename" && break
+ if test -f $filename; then
+ if $issymlink $filename; then
+ rm -f $filename
+ fi
+ fi
+ if test -f $filename; then
+ echo "$filename already exists, not symlinking."
+ else
+?X: Note that the following works because "$pkgsrc" is absolute
+ ln -s $pkgsrc/$filename $filename
+ fi
+ done
+?X: Check that everything was correctly copied
+ echo "(Checking current directory...)" >&4
+ cd UU
+ awk '$1 !~ /PACK[A-Z]+/ {print $1}' "$rsrc/MANIFEST" | \
+ (split -l 50 2>/dev/null || split -50)
+ rm -f missing
+ tmppwd=`pwd`
+ for filelist in x??; do
+ (cd ..; ls `cat "$tmppwd/$filelist"` \
+ >/dev/null 2>>"$tmppwd/missing")
+ done
+ if test -s missing; then
+ echo "Failed duplication of source tree. Aborting." >&4
+ exit 1
+ fi
+ ;;
+ *) echo "(I cannot figure out how to do symbolic links, ignoring!)" >&4
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+esac
+
+@end
diff --git a/mcon/U/Myinit.U b/mcon/U/Myinit.U
new file mode 100644
index 0000000..81747c3
--- /dev/null
+++ b/mcon/U/Myinit.U
@@ -0,0 +1,26 @@
+?RCS: $Id$
+?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: Myinit.U,v $
+?RCS: Revision 3.0.1.1 1994/10/31 09:47:29 ram
+?RCS: patch44: leading comment states this unit comes before option processing
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:05:07 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: If you want to initialize any default values, copy this unit to your
+?X: personal U directory and add the assignments to the end. This file
+?X: is included after variables are initialized but before any old
+?X: config.sh file is read in and before any Configure switch processing.
+?X:
+?MAKE:Myinit: Init
+?MAKE: -pick add $@ %<
+?LINT: nocomment
diff --git a/mcon/U/Myread.U b/mcon/U/Myread.U
new file mode 100644
index 0000000..0f879ed
--- /dev/null
+++ b/mcon/U/Myread.U
@@ -0,0 +1,199 @@
+?RCS: $Id$
+?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: Myread.U,v $
+?RCS: Revision 3.0.1.6 1997/02/28 15:05:39 ram
+?RCS: patch61: myread script now starts with a "startsh"
+?RCS: patch61: miscellaneous fixes
+?RCS:
+?RCS: Revision 3.0.1.5 1995/01/11 15:14:22 ram
+?RCS: patch45: added & escape allowing user to turn on -d from the prompt
+?RCS:
+?RCS: Revision 3.0.1.4 1994/10/31 09:48:04 ram
+?RCS: patch44: added Options to the MAKE line since it's no longer in Init.U
+?RCS:
+?RCS: Revision 3.0.1.3 1994/10/29 15:56:20 ram
+?RCS: patch36: added ?F: line for metalint file checking
+?RCS:
+?RCS: Revision 3.0.1.2 1993/08/30 08:57:59 ram
+?RCS: patch8: added new visible 'nostick' symbol, mainly for Finish.U
+?RCS:
+?RCS: Revision 3.0.1.1 1993/08/27 14:39:20 ram
+?RCS: patch7: now sticks to the question when no default and empty answer
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:05:08 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: This unit produces a bit of shell code that must be dotted in in order
+?X: to do a read. It allows for shell escapes, default assignment and
+?X: parameter evaluation.
+?X:
+?X: To use this unit, $rp and $dflt must hold the question and the
+?X: default answer. The question will be printed by the script itself.
+?X: Neither $rp nor $dflt is altered by the script.
+?X:
+?X: The myread script will stick to the question if no default is proposed
+?X: and the user answer is empty, which prevents mistakes. However, at the
+?X: end of Configure, there is an exception to this rule (Finish.U) where we
+?X: set nostick to a non-empty value to allow the Return key to play its role!
+?X:
+?MAKE:Myread: Options startsh n c trnl
+?MAKE: -pick add $@ %<
+?V:ans:dflt rp nostick
+?F:./myread
+?T:COLUMNS xxxm rp dflt answ aok myecho
+?LINT:change fastread
+?X: Some shells (Ultrix) do not understand ${COLUMNS:-80}, sigh!
+: compute the number of columns on the terminal for proper question formatting
+case "$COLUMNS" in
+'') COLUMNS='80';;
+esac
+
+: set up the echo used in my read
+?X:
+?X: This variable is intended to be eval'ed. It will echo the two
+?X: variables $rp and $dflt (provided this latter has a non null value).
+?X: It is mainly used by the myread script to echo the questions.
+?X:
+?X: The $n and $c below are substituted before Loc does its silly echo check
+?X: so don't put a $ on the echo below so we get builtin, even if $echo is
+?X: pointing to /bin/echo.
+?X:
+myecho="case \"\$xxxm\" in
+'') echo $n \"\$rp $c\" >&4;;
+*) case \"\$rp\" in
+ '') echo $n \"[\$xxxm] $c\";;
+ *)
+ if test \`echo \"\$rp [\$xxxm] \" | wc -c\` -ge $COLUMNS; then
+ echo \"\$rp\" >&4
+ echo $n \"[\$xxxm] $c\" >&4
+ else
+ echo $n \"\$rp [\$xxxm] $c\" >&4
+ fi
+ ;;
+ esac;;
+esac"
+
+: now set up to do reads with possible shell escape and default assignment
+cat <<EOSC >myread
+$startsh
+?X:
+?X: Save value of default -- do not alter original in case of eval
+?X:
+xxxm=\$dflt
+$myecho
+?X:
+?X: If there is no default, then stop, regardless of the value in fastread.
+?X: In silent mode, no new-line is to be echoed if the question is empty,
+?X: since this is used to wait for the "return" key.
+?X:
+ans='!'
+case "\$fastread" in
+yes) case "\$dflt" in
+ '') ;;
+ *) ans='';
+ case "\$silent-\$rp" in
+ true-) ;;
+ *) echo " " >&4;;
+ esac;;
+ esac;;
+*) case "\$silent" in
+ true) case "\$rp" in
+ '') ans='';;
+ esac;;
+ esac;;
+esac
+while expr "X\$ans" : "X!" >/dev/null; do
+ read answ
+?X:
+?X: Run 'eval' on the answer, in order to do variable substitution, in case
+?X: the user types $HOME or $WHATEVER. Variables must be evaluated now.
+?X: Typing '\$HOME' won't currently prevent from substitution -- use '\\$HOME'
+?X: The $1 .. $9 and $*, as well as $@, are available to refer to the
+?X: default value.
+?X:
+ set x \$xxxm
+ shift
+ aok=''; eval "ans=\\"\$answ\\"" && aok=y
+ case "\$answ" in
+?X:
+?X: Use "!" and not a plain ! because of a bug in BSD 4.4 shell
+?X: (reported by Wayne Davison)
+?X: We must handle the shell escapes before dealing with possible variable
+?X: substitution, since the shell we're launching in that case will be able
+?X: to do it as well as we can -- RAM, 15/03/96
+?X
+ "!")
+ sh 1>&4
+ echo " "
+ $myecho
+ ;;
+ !*)
+ set x \`expr "X\$ans" : "X!\(.*\)\$"\`
+ shift
+ sh 1>&4 -c "\$*"
+ echo " "
+ $myecho
+ ;;
+ "\$ans")
+ case "\$ans" in
+?X:
+?X: Answers starting with & are hooks allowing to dynamically turn on/off
+?X: some Configure options. That's for the future. -- RAM, 09/01/95
+?X: Today, we only recognize '& -d' to mean 'go on as if Configure -d, which
+?X: is a hardwired behaviour compatible with our general scheme.
+?X:
+ \\&*)
+ set x \`expr "X\$ans" : "X&\(.*\)\$"\`
+ shift
+ case "\$1" in
+ -d)
+ fastread=yes
+ echo "(OK, I'll run with -d after this question.)" >&4
+ ;;
+ -*)
+ echo "*** Sorry, \$1 not supported yet." >&4
+ ;;
+ esac
+ $myecho
+ ans=!
+ ;;
+ esac;;
+ *)
+ case "\$aok" in
+ y)
+ echo "*** Substitution done -- please confirm."
+ xxxm="\$ans"
+ ans=\`echo $n "\$ans$c" | tr '$trnl' ' '\`
+ xxxm="\$ans"
+ ans=!
+ ;;
+ *)
+ echo "*** Error -- try again."
+ ans=!
+ ;;
+ esac
+ $myecho
+ ;;
+ esac
+?X: Stick in myread if no default answer and nothing was answered
+ case "\$ans\$xxxm\$nostick" in
+ '')
+ ans=!
+ $myecho
+ ;;
+ esac
+done
+case "\$ans" in
+'') ans="\$xxxm";;
+esac
+EOSC
+
diff --git a/mcon/U/Nothing.U b/mcon/U/Nothing.U
new file mode 100644
index 0000000..0709901
--- /dev/null
+++ b/mcon/U/Nothing.U
@@ -0,0 +1,19 @@
+?RCS: $Id$
+?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: Nothing.U,v $
+?RCS: Revision 3.0 1993/08/18 12:05:09 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: The purpose of this file is to supply an empty target for the private
+?X: Makefile built by metaconfig to order the units.
+?X:
+?MAKE:Nothing: Head
diff --git a/mcon/U/Null.U b/mcon/U/Null.U
new file mode 100644
index 0000000..6f9fc70
--- /dev/null
+++ b/mcon/U/Null.U
@@ -0,0 +1,20 @@
+?RCS: $Id$
+?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: Null.U,v $
+?RCS: Revision 3.0 1993/08/18 12:05:10 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: This unit ends up producing shell code to set all variables to ''. This
+?X: probably isn't necessary, but I'm paranoid. About certain things.
+?X:
+?MAKE:Null: Head
+?MAKE: -pick add.Null $@ %<
diff --git a/mcon/U/Obsol_h.U b/mcon/U/Obsol_h.U
new file mode 100644
index 0000000..fc59938
--- /dev/null
+++ b/mcon/U/Obsol_h.U
@@ -0,0 +1,28 @@
+?RCS: $Id$
+?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: Obsol_h.U,v $
+?RCS: Revision 3.0 1993/08/18 12:05:11 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: This file is prepended to .MT/Obsol_h if that file is not empty. That file
+?X: contains the necessary mappings of new symbols to obsolete ones.
+?X:
+?MAKE:Obsol_h:
+?MAKE: -pick prepend $@ ./Obsol_h
+?LINT:nocomment
+/*
+ * The following symbols are obsolete. They are mapped to the the new
+ * symbols only to ease the transition process. The sources should be
+ * updated so as to use the new symbols only, as the support for these
+ * obsolete symbols may end without notice.
+ */
+
diff --git a/mcon/U/Obsol_sh.U b/mcon/U/Obsol_sh.U
new file mode 100644
index 0000000..de1a1e1
--- /dev/null
+++ b/mcon/U/Obsol_sh.U
@@ -0,0 +1,27 @@
+?RCS: $Id$
+?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: Obsol_sh.U,v $
+?RCS: Revision 3.0 1993/08/18 12:05:11 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: This file is prepended to .MT/Obsol_sh if that file is not empty. That file
+?X: contains the necessary mappings of new symbols to obsolete ones.
+?X:
+?MAKE:Obsol_sh:
+?MAKE: -pick prepend $@ ./Obsol_sh
+?LINT:nocomment
+#
+# The following symbols are obsolete. They are mapped to the the new
+# symbols only to ease the transition process. The sources should be
+# updated so as to use the new symbols only, since supporting of those
+# obsolete symbols may end without notice.
+#
diff --git a/mcon/U/Oldconfig.U b/mcon/U/Oldconfig.U
new file mode 100644
index 0000000..ca18947
--- /dev/null
+++ b/mcon/U/Oldconfig.U
@@ -0,0 +1,715 @@
+?RCS: $Id$
+?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: Oldconfig.U,v $
+?RCS: Revision 3.0.1.10 1997/02/28 15:06:39 ram
+?RCS: patch61: added support for src.U
+?RCS: patch61: new OSNAME define
+?RCS: patch61: can now sense new OSes
+?RCS:
+?RCS: Revision 3.0.1.9 1995/07/25 13:40:51 ram
+?RCS: patch56: now knows about OS/2 platforms
+?RCS:
+?RCS: Revision 3.0.1.8 1995/05/12 12:04:18 ram
+?RCS: patch54: config.sh reload logic now knows about new -K switch
+?RCS: patch54: cleaned up and extended osvers for DEC OSF/1 (ADO)
+?RCS: patch54: added MachTen detection (ADO)
+?RCS:
+?RCS: Revision 3.0.1.7 1995/02/15 14:13:41 ram
+?RCS: patch51: adapted osvers computation for AIX (ADO)
+?RCS:
+?RCS: Revision 3.0.1.6 1995/01/30 14:27:15 ram
+?RCS: patch49: unit Options.U now exports file optdef.sh, not a variable
+?RCS: patch49: update code for myuname changed (WED)
+?RCS:
+?RCS: Revision 3.0.1.5 1995/01/11 15:15:36 ram
+?RCS: patch45: added quotes around the INITPROG variable (ADO)
+?RCS: patch45: allows variable overriding after config file loading
+?RCS:
+?RCS: Revision 3.0.1.4 1994/10/29 15:57:05 ram
+?RCS: patch36: added ?F: line for metalint file checking
+?RCS: patch36: merged with the version used for perl5's Configure (ADO)
+?RCS:
+?RCS: Revision 3.0.1.3 1994/05/06 14:24:17 ram
+?RCS: patch23: added support for osf1 hints
+?RCS: patch23: new support for solaris and i386 systems (ADO)
+?RCS:
+?RCS: Revision 3.0.1.2 1994/01/24 14:05:02 ram
+?RCS: patch16: added post-processing on myuname for Xenix targets
+?RCS: patch16: message proposing config.sh defaults made consistent
+?RCS:
+?RCS: Revision 3.0.1.1 1993/09/13 15:56:32 ram
+?RCS: patch10: force use of config.sh when -d option is used (WAD)
+?RCS: patch10: complain about non-existent hint files (WAD)
+?RCS: patch10: added Options dependency for fastread variable
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:05:12 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: This unit tries to remember what we did last time we ran Configure, mostly
+?X: for the sake of setting defaults.
+?X:
+?MAKE:Oldconfig hint myuname osname osvers: Instruct Myread Checkcc \
+ Mksymlinks Loc Options Tr src trnl ln uname sh awk sed test cat grep \
+ rm lns tr n c contains targetarch
+?MAKE: -pick wipe $@ %<
+?S:myuname:
+?S: The output of 'uname -a' if available, otherwise the hostname. On Xenix,
+?S: pseudo variables assignments in the output are stripped, thank you. The
+?S: whole thing is then lower-cased.
+?S:.
+?S:hint:
+?S: Gives the type of hints used for previous answers. May be one of
+?S: "default", "recommended" or "previous".
+?S:.
+?S:osname:
+?S: This variable contains the operating system name (e.g. sunos,
+?S: solaris, hpux, etc.). It can be useful later on for setting
+?S: defaults. Any spaces are replaced with underscores. It is set
+?S: to a null string if we can't figure it out.
+?S:.
+?S:osvers:
+?S: This variable contains the operating system version (e.g.
+?S: 4.1.3, 5.2, etc.). It is primarily used for helping select
+?S: an appropriate hints file, but might be useful elsewhere for
+?S: setting defaults. It is set to '' if we can't figure it out.
+?S: We try to be flexible about how much of the version number
+?S: to keep, e.g. if 4.1.1, 4.1.2, and 4.1.3 are essentially the
+?S: same for this package, hints files might just be os_4.0 or
+?S: os_4.1, etc., not keeping separate files for each little release.
+?S:.
+?C:OSNAME:
+?C: This symbol contains the name of the operating system, as determined
+?C: by Configure. You shouldn't rely on it too much; the specific
+?C: feature tests from Configure are generally more reliable.
+?C:.
+?C:OSVERS:
+?C: This symbol contains the version of the operating system, as determined
+?C: by Configure. You shouldn't rely on it too much; the specific
+?C: feature tests from Configure are generally more reliable.
+?C:.
+?H:#define OSNAME "$osname" /**/
+?H:#define OSVERS "$osvers" /**/
+?H:.
+?F:!config.sh
+?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 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`
+?X: Special mention for Xenix, whose 'uname -a' gives us output like this:
+?X: sysname=XENIX
+?X: nodename=whatever
+?X: release=2.3.2 .. etc...
+?X: Therefore, we strip all this variable assignment junk and remove all the
+?X: new lines to keep the myuname variable sane... --RAM
+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"
+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 <MAINTLOC>
+$test -f /irix && osname=irix
+$test -f /xenix && osname=sco_xenix
+$test -f /dynix && osname=dynix
+$test -f /dnix && osname=dnix
+$test -f /lynx.os && osname=lynxos
+$test -f /unicos && osname=unicos && osvers=`$uname -r`
+$test -f /unicosmk && osname=unicosmk && osvers=`$uname -r`
+$test -f /unicosmk.ar && osname=unicosmk && osvers=`$uname -r`
+$test -f /bin/mips && /bin/mips && osname=mips
+$test -d /NextApps && set X `hostinfo | $grep 'NeXT Mach.*:' | \
+ $sed -e 's/://' -e 's/\./_/'` && osname=next && osvers=$4
+$test -d /usr/apollo/bin && osname=apollo
+$test -f /etc/saf/_sactab && osname=svr4
+$test -d /usr/include/minix && osname=minix
+$test -f /system/gnu_library/bin/ar.pm && osname=vos
+if $test -d /MachTen -o -d /MachTen_Folder; then
+?X: MachTen uname -a output looks like
+?X: xxx 4 0.0 Macintosh
+?X: MachTen /sbin/version output looks like
+?X: MachTen 4.0 Mon Aug 28 10:18:00 1995
+?X: MachTen 3.x had the 'version' command in /usr/etc/version.
+ osname=machten
+ if $test -x /sbin/version; then
+ osvers=`/sbin/version | $awk '{print $2}' |
+ $sed -e 's/[A-Za-z]$//'`
+ elif $test -x /usr/etc/version; then
+ osvers=`/usr/etc/version | $awk '{print $2}' |
+ $sed -e 's/[A-Za-z]$//'`
+ else
+ osvers="$2.$3"
+ fi
+fi
+$test -f /sys/posix.dll &&
+ $test -f /usr/bin/what &&
+ set X `/usr/bin/what /sys/posix.dll` &&
+ $test "$3" = UWIN &&
+ osname=uwin &&
+ osvers="$5"
+?X: If we have uname, we already computed a suitable uname -a output, correctly
+?X: formatted for Xenix, and it lies in $myuname.
+if $test "X$has_uname" != X; then
+ set X $myuname
+ shift
+ case "$5" in
+ fps*) osname=fps ;;
+ mips*)
+ case "$4" in
+ umips) osname=umips ;;
+ *) osname=mips ;;
+ esac;;
+ [23]100) osname=mips ;;
+ next*) osname=next ;;
+?X: Interactive Unix.
+ i386*)
+ tmp=`/bin/uname -X 2>/dev/null|awk '/3\.2v[45]/{ print $(NF) }'`
+ if $test "$tmp" != "" -a "$3" = "3.2" -a -f '/etc/systemid'; then
+ osname='sco'
+ osvers=$tmp
+ elif $test -f /etc/kconfig; then
+ osname=isc
+ if $test "$lns" = "$ln -s"; 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
+ osvers=2
+ fi
+ fi
+ tmp=''
+ ;;
+?X: MS-DOS djgpp uname -a output looks like:
+?X: ms-dos xxx 6 22 pc
+?X: $1 is the "dos flavor" (need not be "ms-dos").
+?X: $2 is the node name
+?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 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*)
+ if $test -n "$DJGPP"; then
+ osname=dos
+ osvers=djgpp
+ fi
+ ;;
+ esac
+ case "$1" in
+ aix) osname=aix
+?X: aix 4.1 uname -a output looks like
+?X: AIX foo 1 4 000123456789
+?X: where $4 is the major release number and $3 is the (minor) version.
+?X: More detail on the version is available with the oslevel command.
+?X: in 3.2.x, it output a string (see case statements below). In 4.1,
+?X: it puts out something like 4.1.1.0
+ tmp=`( (oslevel) 2>/dev/null || echo "not found") 2>&1`
+ case "$tmp" in
+ 'not found') osvers="$4"."$3" ;;
+ '<3240'|'<>3240') osvers=3.2.0 ;;
+ '=3240'|'>3240'|'<3250'|'<>3250') osvers=3.2.4 ;;
+ '=3250'|'>3250') osvers=3.2.5 ;;
+ *) osvers=$tmp;;
+ esac
+ ;;
+ bsd386) osname=bsd386
+ osvers=`$uname -r`
+ ;;
+ cygwin*) osname=cygwin
+ osvers=`echo "$3" | sed -e 's/\(.*\)(.*/\1/'`
+ ;;
+ mingw*) osname=mingw
+ osvers=`echo "$3" | sed -e 's/\(.*\)(.*/\1/'`
+ ;;
+ *dc.osx) osname=dcosx
+ osvers="$3"
+ ;;
+ dnix) osname=dnix
+ osvers="$3"
+ ;;
+ domainos) osname=apollo
+ osvers="$3"
+ ;;
+ dgux) osname=dgux
+ osvers="$3"
+ ;;
+?X: uname -a returns
+?X: DYNIX/ptx xxx 4.0 V4.1.2 i386
+ dynixptx*) osname=dynixptx
+ osvers=`echo "$4"|sed 's/^v//'`
+ ;;
+ freebsd) osname=freebsd
+ osvers="$3" ;;
+ genix) osname=genix ;;
+?X: HP-UX uname -a gives something like
+?X: HP-UX foobar B.10.20 A 9000/735 2016483812 two-user license
+?X: Preserve the full 10.20 string instead of the previous plain '10'.
+?X: Thanks to Graham Barr. --AD 6/30/1998
+ hp*) osname=hpux
+ osvers=`echo "$3" | $sed 's,.*\.\([0-9]*\.[0-9]*\),\1,'`
+ ;;
+ irix*) osname=irix
+ case "$3" in
+ 4*) osvers=4 ;;
+ 5*) osvers=5 ;;
+ *) osvers="$3" ;;
+ esac
+ ;;
+ linux) osname=linux
+ case "$3" in
+ *) osvers="$3" ;;
+ esac
+ ;;
+ MiNT) osname=mint
+ ;;
+ netbsd*) osname=netbsd
+ osvers="$3"
+ ;;
+ news-os) osvers="$3"
+ case "$3" in
+ 4*) osname=newsos4 ;;
+ *) osname=newsos ;;
+ esac
+ ;;
+ next*) osname=next ;;
+ nonstop-ux) osname=nonstopux ;;
+ openbsd) osname=openbsd
+ osvers="$3"
+ ;;
+ POSIX-BC | posix-bc ) osname=posix-bc
+ osvers="$3"
+ ;;
+ powerux | power_ux | powermax_os | powermaxos | \
+ powerunix | power_unix) osname=powerux
+ osvers="$3"
+ ;;
+ qnx) osname=qnx
+ osvers="$4"
+ ;;
+ solaris) osname=solaris
+ case "$3" in
+ 5*) osvers=`echo $3 | $sed 's/^5/2/g'` ;;
+ *) osvers="$3" ;;
+ esac
+ ;;
+ sunos) osname=sunos
+ case "$3" in
+ 5*) osname=solaris
+ osvers=`echo $3 | $sed 's/^5/2/g'` ;;
+ *) osvers="$3" ;;
+ esac
+ ;;
+ titanos) osname=titanos
+ case "$3" in
+ 1*) osvers=1 ;;
+ 2*) osvers=2 ;;
+ 3*) osvers=3 ;;
+ 4*) osvers=4 ;;
+ *) osvers="$3" ;;
+ esac
+ ;;
+ ultrix) osname=ultrix
+ osvers="$3"
+ ;;
+ osf1|mls+) case "$5" in
+ alpha)
+?X: DEC OSF/1 myuname -a output looks like: osf1 xxxx t3.2 123.4 alpha
+?X: where the version number can be something like [xvt]n.n
+ osname=dec_osf
+?X: sizer knows the minor minor version: the letter
+ osvers=`sizer -v | awk '{print $3}' | \
+ ./tr '[A-Z]' '[a-z]' | sed 's/^[xvt]//'`
+ case "$osvers" in
+ [1-9].[0-9]*) ;;
+ *) osvers=`echo "$3" | sed 's/^[xvt]//'` ;;
+ esac
+ ;;
+ hp*) osname=hp_osf1 ;;
+ mips) osname=mips_osf1 ;;
+?X: hp and mips were unsupported Technology Releases -- ADO, 24/10/94
+ esac
+ ;;
+ unixware) osname=svr5
+ osvers="$4"
+ ;;
+ uts) osname=uts
+ osvers="$3"
+ ;;
+ vos) osvers="$3"
+ ;;
+ $2) case "$osname" in
+ *isc*) ;;
+ *freebsd*) ;;
+ svr*)
+ : svr4.x or possibly later
+ case "svr$3" in
+ ${osname}*)
+ osname=svr$3
+ osvers=$4
+ ;;
+ esac
+ case "$osname" in
+ svr4.0)
+ : Check for ESIX
+ if $test -f /stand/boot ; then
+ eval `$grep '^INITPROG=[a-z/0-9]*$' /stand/boot`
+ if $test -n "$INITPROG" -a -f "$INITPROG"; then
+ isesix=`strings -a $INITPROG | \
+ $grep 'ESIX SYSTEM V/386 Release 4.0'`
+ if $test -n "$isesix"; then
+ osname=esix4
+ fi
+ fi
+ fi
+ ;;
+ esac
+ ;;
+ *) if $test -f /etc/systemid; then
+ osname=sco
+ set `echo $3 | $sed 's/\./ /g'` $4
+ if $test -f $src/hints/sco_$1_$2_$3.sh; then
+ osvers=$1.$2.$3
+ elif $test -f $src/hints/sco_$1_$2.sh; then
+ osvers=$1.$2
+ elif $test -f $src/hints/sco_$1.sh; then
+ osvers=$1
+ fi
+ else
+ case "$osname" in
+ '') : Still unknown. Probably a generic Sys V.
+ osname="sysv"
+ osvers="$3"
+ ;;
+ esac
+ fi
+ ;;
+ esac
+ ;;
+ *) case "$osname" in
+ '') : Still unknown. Probably a generic BSD.
+ osname="$1"
+ osvers="$3"
+ ;;
+ esac
+ ;;
+ esac
+else
+?X: Try to identify sony's NEWS-OS (BSD unix)
+ if $test -f /vmunix -a -f $src/hints/news_os.sh; then
+ (what /vmunix | UU/tr '[A-Z]' '[a-z]') > UU/kernel.what 2>&1
+ if $contains news-os UU/kernel.what >/dev/null 2>&1; then
+ osname=news_os
+ fi
+ $rm -f UU/kernel.what
+?X: Maybe it's OS/2 or DOS or something similar
+ elif $test -d c:/.; then
+ set X $myuname
+ osname=os2
+ osvers="$5"
+ fi
+fi
+
+: Try to determine whether config.sh was made on this system
+case "$config_sh" in
+'')
+?X: indentation wrong on purpose--RAM
+dflt=n
+case "$knowitall" in
+'')
+ if test -f ../config.sh; then
+ if $contains myuname= ../config.sh >/dev/null 2>&1; then
+ eval "`$grep myuname= ../config.sh`"
+ fi
+ if test "X$myuname" = "X$newmyuname"; then
+ dflt=y
+ fi
+ fi
+ ;;
+*) 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
+ echo " "
+ rp="I see a config.sh file. Shall I use it to set the defaults?"
+ . ./myread
+ case "$ans" in
+ n*|N*) echo "OK, I'll ignore it."
+ mv ../config.sh ../config.sh.old
+ myuname="$newmyuname"
+ ;;
+ *) echo "Fetching default answers from your old config.sh file..." >&4
+ . ../config.sh
+ cp ../config.sh .
+ 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
+?X: remember, case indentation is wrong--RAM
+;;
+*)
+ echo " "
+ echo "Fetching default answers from $config_sh..." >&4
+ cd ..
+?X: preserve symbolic links, if any
+ cp $config_sh config.sh 2>/dev/null
+ chmod +w config.sh
+ . ./config.sh
+ cd UU
+ cp ../config.sh .
+ hint=previous
+ ;;
+esac
+?X: Older versions did not always set $sh.
+case "$sh" in
+'') sh="$tmp_sh" ;;
+esac
+$test "$override" && . ./optdef.sh
+
+: Restore computed paths
+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
+'') ;;
+*) hostarch=$osname
+ osname=`echo $targetarch|sed 's,^[^-]*-,,'`
+ osvers=''
+ ;;
+esac
+
+@if {test -d ../hints}
+: Offer them some hints based on their OS
+cd ..
+?X: Since we are now at the root of the source tree, we must use $src
+?X: to access the sources and not $rsrc. See src.U for details...
+if $test ! -f config.sh; then
+ $cat <<EOM
+
+First time through, eh? I have some defaults handy for some systems
+that need some extra help getting the Configure answers right:
+
+EOM
+ (cd $src/hints; ls -C *.sh) | $sed 's/\.sh/ /g' >&4
+ dflt=''
+
+ : Now look for a hint file osname_osvers, unless one has been
+ : specified already.
+ case "$hintfile" in
+ ''|' ')
+ file=`echo "${osname}_${osvers}" | $sed -e 's%\.%_%g' -e 's%_$%%'`
+ : Also try without trailing minor version numbers.
+ xfile=`echo $file | $sed -e 's%_[^_]*$%%'`
+ xxfile=`echo $xfile | $sed -e 's%_[^_]*$%%'`
+ xxxfile=`echo $xxfile | $sed -e 's%_[^_]*$%%'`
+ xxxxfile=`echo $xxxfile | $sed -e 's%_[^_]*$%%'`
+ case "$file" in
+ '') dflt=none ;;
+ *) case "$osvers" in
+ '') dflt=$file
+ ;;
+ *) if $test -f $src/hints/$file.sh ; then
+ dflt=$file
+ elif $test -f $src/hints/$xfile.sh ; then
+ dflt=$xfile
+ elif $test -f $src/hints/$xxfile.sh ; then
+ dflt=$xxfile
+ elif $test -f $src/hints/$xxxfile.sh ; then
+ dflt=$xxxfile
+ elif $test -f $src/hints/$xxxxfile.sh ; then
+ dflt=$xxxxfile
+ elif $test -f "$src/hints/${osname}.sh" ; then
+ dflt="${osname}"
+ else
+ dflt=none
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ if $test -f Policy.sh ; then
+ case "$dflt" in
+ *Policy*) ;;
+ none) dflt="Policy" ;;
+ *) dflt="Policy $dflt" ;;
+ esac
+ fi
+ ;;
+ *)
+ dflt=`echo $hintfile | $sed 's/\.sh$//'`
+ ;;
+ esac
+
+ if $test -f Policy.sh ; then
+ $cat <<EOM
+
+There's also a Policy hint file available, which should make the
+site-specific (policy) questions easier to answer.
+EOM
+
+ fi
+
+ $cat <<EOM
+
+You may give one or more space-separated answers, or "none" if appropriate.
+A well-behaved OS will have no hints, so answering "none" or just "Policy"
+is a good thing. DO NOT give a wrong version or a wrong OS.
+
+EOM
+
+ rp="Which of these apply, if any?"
+ . UU/myread
+ tans=$ans
+ for file in $tans; do
+ if $test X$file = XPolicy -a -f Policy.sh; then
+ . Policy.sh
+ $cat Policy.sh >> UU/config.sh
+ elif $test -f $src/hints/$file.sh; then
+ . $src/hints/$file.sh
+ $cat $src/hints/$file.sh >> UU/config.sh
+ elif $test X"$tans" = X -o X"$tans" = Xnone ; then
+ : nothing
+ else
+ : Give one chance to correct a possible typo.
+ echo "$file.sh does not exist"
+ dflt=$file
+ rp="hint to use instead?"
+ . UU/myread
+ for file in $ans; do
+ if $test -f "$src/hints/$file.sh"; then
+ . $src/hints/$file.sh
+ $cat $src/hints/$file.sh >> UU/config.sh
+ elif $test X$ans = X -o X$ans = Xnone ; then
+ : nothing
+ else
+ echo "$file.sh does not exist -- ignored."
+ fi
+ done
+ fi
+ done
+
+ hint=recommended
+ : Remember our hint file for later.
+ if $test -f "$src/hints/$file.sh" ; then
+ hintfile="$file"
+ else
+ hintfile=''
+ fi
+fi
+cd UU
+?X: From here on, we must use $rsrc instead of $src
+
+@end
+: Process their -A options
+. ./posthint.sh
+
+@if osname || osvers
+: Ask them to confirm the OS name
+cat << EOM
+
+Configure uses the operating system name and version to set some defaults.
+The default value is probably right if the name rings a bell. Otherwise,
+since spelling matters for me, either accept the default or answer "none"
+to leave it blank.
+
+EOM
+@end
+@if osname
+case "$osname" in
+ ''|' ')
+ case "$hintfile" in
+ ''|' '|none) dflt=none ;;
+ *) dflt=`echo $hintfile | $sed -e 's/\.sh$//' -e 's/_.*$//'` ;;
+ esac
+ ;;
+ *) dflt="$osname" ;;
+esac
+rp="Operating system name?"
+. ./myread
+case "$ans" in
+none) osname='' ;;
+*) osname=`echo "$ans" | $sed -e 's/[ ][ ]*/_/g' | ./tr '[A-Z]' '[a-z]'`;;
+esac
+@end
+@if osvers
+@if osname
+echo " "
+@end
+case "$osvers" in
+ ''|' ')
+ case "$hintfile" in
+ ''|' '|none) dflt=none ;;
+ *) dflt=`echo $hintfile | $sed -e 's/\.sh$//' -e 's/^[^_]*//'`
+ dflt=`echo $dflt | $sed -e 's/^_//' -e 's/_/./g'`
+ case "$dflt" in
+ ''|' ') dflt=none ;;
+ esac
+ ;;
+ esac
+ ;;
+ *) dflt="$osvers" ;;
+esac
+rp="Operating system version?"
+. ./myread
+case "$ans" in
+none) osvers='' ;;
+*) osvers="$ans" ;;
+esac
+
+@end
diff --git a/mcon/U/Oldsym.U b/mcon/U/Oldsym.U
new file mode 100644
index 0000000..5e85313
--- /dev/null
+++ b/mcon/U/Oldsym.U
@@ -0,0 +1,72 @@
+?RCS: $Id$
+?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: Oldsym.U,v $
+?RCS: Revision 3.0.1.1 1997/02/28 15:06:58 ram
+?RCS: patch61: added support for src.U
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:05:13 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: This unit follows the creation of the config.sh file. It adds some
+?X: special symbols: defines from patchlevel.h file if any and CONFIG,
+?X: which is set to true. Then, we try to keep all the new symbols that
+?X: may come from a hint file or a previous config.sh file.
+?X:
+?MAKE:Oldsym: Config_sh Options test hint src sed sort uniq
+?MAKE: -pick add $@ %<
+?T:CONFIG sym tmp
+?F:!UU
+: 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$"
+?X: which is supposed to be expanded by the revision control system.
+$test -f $src/revision.h && \
+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
+if $test -f UU/config.sh; then
+?X: Make sure each symbol is unique in oldconfig.sh
+ <UU/config.sh $sort | $uniq >UU/oldconfig.sh
+?X:
+?X: All the symbols that appear twice come only from config.sh (hence the
+?X: two config.sh in the command line). These symbols will be removed by
+?X: the uniq -u command. The oldsyms file thus contains all the symbols
+?X: that did not appear in the produced config.sh (Larry Wall).
+?X:
+?X: Do not touch the -u flag of uniq. This means you too, Jarkko.
+?X:
+ $sed -n 's/^\([a-zA-Z_0-9]*\)=.*/\1/p' \
+ config.sh config.sh UU/oldconfig.sh |\
+ $sort | $uniq -u >UU/oldsyms
+ set X `cat UU/oldsyms`
+ shift
+ case $# in
+ 0) ;;
+ *)
+ cat <<EOM
+Hmm...You had some extra variables I don't know about...I'll try to keep 'em...
+EOM
+ echo ": Variables propagated from previous config.sh file." >>config.sh
+ for sym in `cat UU/oldsyms`; do
+ echo " Propagating $hint variable "'$'"$sym..."
+ eval 'tmp="$'"${sym}"'"'
+ echo "$tmp" | \
+ sed -e "s/'/'\"'\"'/g" -e "s/^/$sym='/" -e "s/$/'/" >>config.sh
+ done
+ ;;
+ esac
+fi
+
diff --git a/mcon/U/Options.U b/mcon/U/Options.U
new file mode 100644
index 0000000..2bfe289
--- /dev/null
+++ b/mcon/U/Options.U
@@ -0,0 +1,374 @@
+?RCS: $Id$
+?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: Options.U,v $
+?RCS: Revision 3.0.1.7 1997/02/28 15:08:15 ram
+?RCS: patch61: optdef.sh now starts with a "startsh"
+?RCS: patch61: moved some code from Head.U
+?RCS:
+?RCS: Revision 3.0.1.6 1995/09/25 09:14:46 ram
+?RCS: patch59: protected option parsing code against 'echo -*' option failure
+?RCS:
+?RCS: Revision 3.0.1.5 1995/05/12 12:04:52 ram
+?RCS: patch54: added -K option for experts
+?RCS:
+?RCS: Revision 3.0.1.4 1995/01/30 14:27:52 ram
+?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 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
+?RCS: patch36: ensure option definition file is removed before appending
+?RCS: patch36: protect variable definitions with spaces in them
+?RCS:
+?RCS: Revision 3.0.1.1 1994/06/20 06:55:44 ram
+?RCS: patch30: now uses new me symbol to tag error messages
+?RCS: patch30: new -D and -U options to define/undef symbols (JHI)
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:05:14 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: Command line parsing. It is really important that the variables used here
+?X: be not listed in the MAKE line, or they will be saved in config.sh and
+?X: loading this file to fetch default answers would clobber the values set
+?X: herein.
+?X:
+?MAKE:Options: startsh
+?MAKE: -pick wipe $@ %<
+?V:reuseval alldone error realsilent silent extractsh fastread \
+ override knowitall: config_sh
+?T:arg argn symbol config_arg0 config_args config_argc xxx yyy zzz uuu
+?T:args_exp args_sep arg_exp
+?F:!Configure
+?F:./optdef.sh ./cmdline.opt ./posthint.sh ./cmdl.opt
+: Save command line options in file UU/cmdline.opt for later use in
+: generating config.sh.
+?X: This temporary file will be read by Oldsym.U. I used a temporary
+?X: file to preserve all sorts of potential command line quotes and
+?X: also because we don't know in advance how many variables we'll
+?X: need, so I can't actually declare them on the MAKE line.
+?X: The config_args variable won't be quite correct if Configure is
+?X: fed something like ./Configure -Dcc="gcc -B/usr/ccs/bin/"
+?X: since the quotes are gone by the time we see them. You'd have to
+?X: reconstruct the command line from the config_arg? lines, but since
+?X: I don't imagine anyone actually having to do that, I'm not going
+?X: to worry too much.
+cat > cmdline.opt <<EOSH
+: Configure command line arguments.
+config_arg0='$0'
+config_args='$*'
+config_argc=$#
+EOSH
+argn=1
+args_exp=''
+args_sep=''
+for arg in "$@"; do
+ cat >>cmdline.opt <<EOSH
+config_arg$argn='$arg'
+EOSH
+?X: Extreme backslashitis: replace each ' by '"'"'
+ cat <<EOC | sed -e "s/'/'"'"'"'"'"'"'/g" > cmdl.opt
+$arg
+EOC
+ arg_exp=`cat cmdl.opt`
+ args_exp="$args_exp$args_sep'$arg_exp'"
+ argn=`expr $argn + 1`
+ args_sep=' '
+done
+?X: args_exp is good for restarting self: eval "set X $args_exp"; shift; $0 "$@"
+?X: used by hints/os2.sh in Perl, for instance
+rm -f cmdl.opt
+
+: produce awk script to parse command line options
+cat >options.awk <<'EOF'
+BEGIN {
+ optstr = "A:dD:eEf:hKOrsSU:V"; # getopt-style specification
+
+ len = length(optstr);
+ for (i = 1; i <= len; i++) {
+ c = substr(optstr, i, 1);
+?X: some older awk's do not have the C ?: construct
+ if (i < len) a = substr(optstr, i + 1, 1); else a = "";
+ if (a == ":") {
+ arg[c] = 1;
+ i++;
+ }
+ opt[c] = 1;
+ }
+}
+{
+ expect = 0;
+ str = $0;
+ if (substr(str, 1, 1) != "-") {
+ printf("'%s'\n", str);
+ next;
+ }
+ len = length($0);
+ for (i = 2; i <= len; i++) {
+ c = substr(str, i, 1);
+ if (!opt[c]) {
+ printf("-%s\n", substr(str, i));
+ next;
+ }
+ printf("-%s\n", c);
+ if (arg[c]) {
+ if (i < len)
+ printf("'%s'\n", substr(str, i + 1));
+ else
+ expect = 1;
+ next;
+ }
+ }
+}
+END {
+ if (expect)
+ print "?";
+}
+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 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 |
+ sed -e s/X// | awk -f options.awk`
+eval "set $*"
+shift
+rm -f options.awk
+
+: set up default values
+fastread=''
+reuseval=false
+config_sh=''
+alldone=''
+error=''
+silent=''
+extractsh=''
+override=''
+knowitall=''
+rm -f optdef.sh posthint.sh
+cat >optdef.sh <<EOS
+$startsh
+EOS
+
+?X:
+?X: Given that we now have the possibility to execute Configure remotely
+?X: thanks to the new src.U support, we have to face the possibility
+?X: of having to ask where the source lie, which means we need the Myread.U
+?X: stuff and possibly other things that might echo something on the
+?X: screen...
+?X:
+?X: That's not pretty, and might be confusing in 99% of the time. So...
+?X: We introduce a new realsilent variable which is set when -s is given,
+?X: and we force silent=true if -S is supplied. The Extractall.U unit
+?X: will then undo the >&4 redirection based on the value of the
+?X: realsilent variable... -- RAM, 18/93/96
+?X:
+
+: option parsing
+while test $# -gt 0; do
+ case "$1" in
+ -d) shift; fastread=yes;;
+ -e) shift; alldone=cont;;
+ -f)
+ shift
+ cd ..
+ if test -r "$1"; then
+ config_sh="$1"
+ else
+ echo "$me: cannot read config file $1." >&2
+ error=true
+ fi
+ cd UU
+ shift;;
+ -h) shift; error=true;;
+ -r) shift; reuseval=true;;
+ -s) shift; silent=true; realsilent=true;;
+ -E) shift; alldone=exit;;
+ -K) shift; knowitall=true;;
+ -O) shift; override=true;;
+ -S) shift; silent=true; extractsh=true;;
+ -D)
+ shift
+ case "$1" in
+ *=)
+ echo "$me: use '-U symbol=', not '-D symbol='." >&2
+ echo "$me: ignoring -D $1" >&2
+ ;;
+ *=*) echo "$1" | \
+ sed -e "s/'/'\"'\"'/g" -e "s/=\(.*\)/='\1'/" >> optdef.sh;;
+ *) echo "$1='define'" >> optdef.sh;;
+ esac
+ shift
+ ;;
+ -U)
+ shift
+ case "$1" in
+ *=) echo "$1" >> optdef.sh;;
+ *=*)
+ echo "$me: use '-D symbol=val', not '-U symbol=val'." >&2
+ echo "$me: ignoring -U $1" >&2
+ ;;
+ *) echo "$1='undef'" >> optdef.sh;;
+ esac
+ shift
+ ;;
+ -A)
+ shift
+ xxx=''
+ yyy="$1"
+ zzz=''
+ uuu=undef
+ case "$yyy" in
+ *=*) zzz=`echo "$yyy"|sed 's!=.*!!'`
+ case "$zzz" in
+ *:*) zzz='' ;;
+ *) xxx=append
+ zzz=" "`echo "$yyy"|sed 's!^[^=]*=!!'`
+ yyy=`echo "$yyy"|sed 's!=.*!!'` ;;
+ esac
+ ;;
+ esac
+ case "$xxx" in
+ '') case "$yyy" in
+ *:*) xxx=`echo "$yyy"|sed 's!:.*!!'`
+ yyy=`echo "$yyy"|sed 's!^[^:]*:!!'`
+ zzz=`echo "$yyy"|sed 's!^[^=]*=!!'`
+ yyy=`echo "$yyy"|sed 's!=.*!!'` ;;
+ *) xxx=`echo "$yyy"|sed 's!:.*!!'`
+ yyy=`echo "$yyy"|sed 's!^[^:]*:!!'` ;;
+ esac
+ ;;
+ esac
+ case "$xxx" in
+ append)
+ echo "$yyy=\"\${$yyy}$zzz\"" >> posthint.sh ;;
+ clear)
+ echo "$yyy=''" >> posthint.sh ;;
+ define)
+ case "$zzz" in
+ '') zzz=define ;;
+ esac
+ echo "$yyy='$zzz'" >> posthint.sh ;;
+ eval)
+ echo "eval \"$yyy=$zzz\"" >> posthint.sh ;;
+ prepend)
+ echo "$yyy=\"$zzz\${$yyy}\"" >> posthint.sh ;;
+ undef)
+ case "$zzz" in
+ '') zzz="$uuu" ;;
+ esac
+ echo "$yyy=$zzz" >> posthint.sh ;;
+ *) echo "$me: unknown -A command '$xxx', ignoring -A $1" >&2 ;;
+ esac
+ shift
+ ;;
+ -V) echo "$me generated by metaconfig <VERSION>-<REVISION>." >&2
+ exit 0;;
+ --) break;;
+ -*) echo "$me: unknown option $1" >&2; shift; error=true;;
+ *) break;;
+ esac
+done
+
+case "$error" in
+true)
+ cat >&2 <<EOM
+Usage: $me [-dehrsEKOSV] [-f config.sh] [-D symbol] [-D symbol=value]
+ [-U symbol] [-U symbol=] [-A command:symbol...]
+ -d : use defaults for all answers.
+ -e : go on without questioning past the production of config.sh.
+ -f : specify an alternate default configuration file.
+ -h : print this help message and exit (with an error status).
+ -r : reuse C symbols value if possible (skips costly nm extraction).
+ -s : silent mode, only echoes questions and essential information.
+ -D : define symbol to have some value:
+ -D symbol symbol gets the value 'define'
+ -D symbol=value symbol gets the value 'value'
+ -E : stop at the end of questions, after having produced config.sh.
+ -K : do not use unless you know what you are doing.
+ -O : let -D and -U override definitions from loaded configuration file.
+ -S : perform variable substitutions on all .SH files (can mix with -f)
+ -U : undefine symbol:
+ -U symbol symbol gets the value 'undef'
+ -U symbol= symbol gets completely empty
+ -A : manipulate symbol after the platform specific hints have been applied:
+ -A symbol=value append " "value to symbol
+ -A append:symbol=value append value to symbol
+ -A define:symbol=value define symbol to have value
+ -A clear:symbol define symbol to be ''
+ -A define:symbol define symbol to be 'define'
+ -A eval:symbol=value define symbol to be eval of value
+ -A prepend:symbol=value prepend value to symbol
+ -A undef:symbol define symbol to be 'undef'
+ -A undef:symbol= define symbol to be ''
+ -V : print version number and exit (with a zero status).
+EOM
+ exit 1
+ ;;
+esac
+
+?X:
+?X: Unless they specified either -S or both -d and -e/E, make sure we're
+?X: running interactively, i.e. attached to a terminal. Moved from Head.U to
+?X: be able to handle batch configurations...
+?X:
+?X: We have to hardwire the Configure name and cannot use $me, since if they
+?X: said 'sh <Configure', then $me is 'sh'...
+?X:
+: Sanity checks
+case "$fastread$alldone" in
+yescont|yesexit) ;;
+*)
+ case "$extractsh" in
+ true) ;;
+ *)
+ if test ! -t 0; then
+ echo "Say 'sh Configure', not 'sh <Configure'"
+ exit 1
+ fi
+ ;;
+ esac
+ ;;
+esac
+
+?X: In silent mode, the standard output is closed. Questions are asked by
+?X: outputing on file descriptor #4, which is the original stdout descriptor.
+?X: This filters out all the "junk", since all the needed information is written
+?X: on #4. Note that ksh will not let us redirect output if the file descriptor
+?X: has not be defined yet, unlike sh, hence the following line...--RAM.
+exec 4>&1
+case "$silent" in
+true) exec 1>/dev/null;;
+esac
+
+?X: Patch from H.Merijn Brand -- 2015-04-19
+?X: The reasoning behind this change is that optdef.sh gets sourced and the
+?X: arguments, like prefix, are passed around in different quotation styles
+?X: and subshells all around, and the (unescaped) backslash will not be
+?X: pertained in the final config.sh
+?X: Note that -q is POSIX but to be sure, we also silence all output --RAM
+touch optdef.sh
+if grep -q '\\' optdef.sh >/dev/null 2>&1; then
+ echo "Configure does not support \\ in -D or -U arguments" >&2
+ exit 1
+fi
+
+: run the defines and the undefines, if any, but leave the file out there...
+. ./optdef.sh
+: create the posthint manipulation script and leave the file out there...
+?X: this file will be perused by Oldconfig.U
+touch posthint.sh
+
diff --git a/mcon/U/Prefixit.U b/mcon/U/Prefixit.U
new file mode 100644
index 0000000..875024d
--- /dev/null
+++ b/mcon/U/Prefixit.U
@@ -0,0 +1,68 @@
+?RCS: $Id$
+?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: Prefixit.U,v $
+?RCS: Revision 3.0.1.1 1995/01/30 14:29:22 ram
+?RCS: patch49: created
+?RCS:
+?X:
+?X: Used as: "set dflt var dir; eval $prefixit" to set $dflt to be
+?X: $prefix/dir by default, or the previous $var depending on certain
+?X: conditions:
+?X: - If the $oldprefix variable is empty, then $prefix holds the same
+?X: value as on previous runs. Therefore, reuse $var if set, otherwise
+?X: set $dflt to $prefix/dir.
+?X: - If $oldprefix is not empty, then set $dflt to $prefix/dir if $var
+?X: is empty (first run). Otherwise, if $var is $oldprefix/dir, then
+?X: change it to $prefix/dir. If none of the above, reuse the old $var.
+?X:
+?X: When dir is omitted, the dflt variable is set to $var if prefix did not
+?X: change, to an empty value otherwise. If dir=none, then a single space
+?X: in var is kept as-is, even if the prefix changes.
+?X:
+?MAKE:Prefixit: prefix oldprefix
+?MAKE: -pick add $@ %<
+?LINT:define prefixit
+?S:prefixit:
+?S: This shell variable is used internally by Configure to reset
+?S: the leading installation prefix correctly when it is changed.
+?S: set dflt var [dir]
+?S: eval $prefixit
+?S: That will set $dflt to $var or $prefix/dir depending on the
+?S: value of $var and $oldprefix.
+?S:.
+?V:prefixit
+?T:tp
+: set the prefixit variable, to compute a suitable default value
+prefixit='case "$3" in
+""|none)
+ case "$oldprefix" in
+ "") eval "$1=\"\$$2\"";;
+ *)
+ case "$3" in
+ "") eval "$1=";;
+ none)
+ eval "tp=\"\$$2\"";
+ case "$tp" in
+ ""|" ") eval "$1=\"\$$2\"";;
+ *) eval "$1=";;
+ esac;;
+ esac;;
+ esac;;
+*)
+ eval "tp=\"$oldprefix-\$$2-\""; eval "tp=\"$tp\"";
+ case "$tp" in
+ --|/*--|\~*--) eval "$1=\"$prefix/$3\"";;
+ /*-$oldprefix/*|\~*-$oldprefix/*)
+ eval "$1=\`echo \$$2 | sed \"s,^$oldprefix,$prefix,\"\`";;
+ *) eval "$1=\"\$$2\"";;
+ esac;;
+esac'
+
diff --git a/mcon/U/Prefixup.U b/mcon/U/Prefixup.U
new file mode 100644
index 0000000..3c6778f
--- /dev/null
+++ b/mcon/U/Prefixup.U
@@ -0,0 +1,38 @@
+?RCS: $Id$
+?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: Prefixup.U,v $
+?RCS: Revision 3.0.1.1 1995/01/30 14:30:40 ram
+?RCS: patch49: created
+?RCS:
+?X:
+?X: Used as: "set dflt; eval $prefixup" to set $dflt to be $prefix/dir
+?X: instead of $prefixexp/dir, in case portability was involved somehow
+?X: and $prefix uses ~name expansion.
+?X:
+?MAKE:Prefixup: prefix prefixexp
+?MAKE: -pick add $@ %<
+?LINT:define prefixup
+?S:prefixup:
+?S: This shell variable is used internally by Configure to reset
+?S: the leading installation prefix correctly when $prefix uses
+?S: ~name expansion.
+?S: set dflt
+?S: eval $prefixup
+?S: That will set $dflt to $prefix/dir if it was $prefixexp/dir and
+?S: $prefix differs from $prefixexp.
+?S:.
+?V:prefixup
+: set the prefixup variable, to restore leading tilda escape
+prefixup='case "$prefixexp" in
+"$prefix") ;;
+*) eval "$1=\`echo \$$1 | sed \"s,^$prefixexp,$prefix,\"\`";;
+esac'
+
diff --git a/mcon/U/Rcs.U b/mcon/U/Rcs.U
new file mode 100644
index 0000000..b8d7a42
--- /dev/null
+++ b/mcon/U/Rcs.U
@@ -0,0 +1,34 @@
+?RCS: $Id$
+?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: Rcs.U,v $
+?RCS: Revision 3.0 1993/08/18 12:05:15 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: This is a unit that helps people who write SH scripts and keep them under
+?X: RCS, but don't think to protect the $Log and other $Id keywords from
+?X: variable substitution (or people like me who do not like to).
+?X:
+?MAKE:Author Date Header Id Locker Log RCSfile Revision Source State: Oldconfig
+?MAKE: -pick weed $@ %<
+?LINT:describe Author Date Header Id Locker Log RCSfile Revision Source State
+: preserve RCS keywords in files with variable substitution, grrr
+?Author:Author='$Author'
+?Date:Date='$Date'
+?Header:Header='$Header'
+?Id:Id='$Id'
+?$Locker'
+?Log:Log='$Log'
+?RCSfile:RCSfile='$RCSfile'
+?Revision:Revision='$Revision'
+?Source:Source='$Source'
+?State:State='$State'
+
diff --git a/mcon/U/Sendfile64.U b/mcon/U/Sendfile64.U
new file mode 100644
index 0000000..f5e77d4
--- /dev/null
+++ b/mcon/U/Sendfile64.U
@@ -0,0 +1,36 @@
+?RCS: $Id$
+?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
new file mode 100644
index 0000000..ab83bf5
--- /dev/null
+++ b/mcon/U/Setvar.U
@@ -0,0 +1,50 @@
+?RCS: $Id$
+?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: Setvar.U,v $
+?RCS: Revision 3.0.1.1 1994/10/29 15:58:28 ram
+?RCS: patch36: call ./whoa explicitly instead of relying on PATH
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:05:16 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: This unit produces a variable that is intended to be eval'ed in
+?X: order to define/undefine a symbol. A consistency check is made
+?X: regarding any previous value and a warning is issued if there
+?X: is any discrepancy.
+?X:
+?X: To use it, say:
+?X: val=<value>
+?X: set d_variable
+?X: eval $setvar
+?X:
+?MAKE:Setvar: Whoa
+?MAKE: -pick add $@ %<
+?LINT:define setvar
+?S:setvar:
+?S: This shell variable is used internally by Configure to set a value
+?S: to a given symbol that is defined or not. A typical use is:
+?S: val=<value computed>
+?S: set d_variable
+?S: eval $setvar
+?S: That will print a message in case the $val value is not the same
+?S: as the previous value of $d_variable.
+?S:.
+?V:setvar:val
+?T:var was td tu
+: function used to set '$1' to '$val'
+setvar='var=$1; eval "was=\$$1"; td=$define; tu=$undef;
+case "$val$was" in
+$define$undef) . ./whoa; eval "$var=\$td";;
+$undef$define) . ./whoa; eval "$var=\$tu";;
+*) eval "$var=$val";;
+esac'
+
diff --git a/mcon/U/Signal.U b/mcon/U/Signal.U
new file mode 100644
index 0000000..769e358
--- /dev/null
+++ b/mcon/U/Signal.U
@@ -0,0 +1,271 @@
+?RCS: $Id$
+?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: Signal.U,v $
+?RCS: Revision 3.0.1.1 1997/02/28 15:20:01 ram
+?RCS: patch61: created
+?RCS:
+?X:
+?X: This unit produces three files:
+?X:
+?X: 1- A signal.c file, which, when compiled and run, produces an output like:
+?X:
+?X: HUP 1
+?X: INT 2
+?X: QUIT 3
+?X: etc...
+?X:
+?X: 2- A signal.awk script to parse the output of signal.c, fill
+?X: in gaps (up to NSIG) and move duplicates to the end.
+?X:
+?X: 3- A signal_cmd script to compile signal.c and run it
+?X: through sort -n -k 2 | uniq | awk -f signal.awk.
+?X: (we try also sort -n +1 since some old hosts don't grok sort -k)
+?X: (This is called signal_cmd to avoid OS/2 confusion with
+?X: signal.cmd vs. signal.
+?X: The signal_cmd script also falls back on checking signals one at a
+?X: time in case the signal.c program fails. On at least one version of
+?X: Linux 2.1.x, the header file #define'd SIGRTMAX to a symbol that
+?X: is not defined by the compiler/linker. :-(. Further, on that same
+?X: version of Linux, the user had a defective C-shell that gave an
+?X: incorrect list for kill -l, so the fall-back didn't work.
+?X:
+?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 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
+?T: xx xxx xxxfiles
+?LINT:use rm run
+: Trace out the files included by signal.h, then look for SIGxxx names.
+?X: Remove SIGARRAYSIZE used by HPUX.
+?X: Remove SIGSTKSIZE used by Linux.
+?X: Remove SIGSTKSZ used by Posix.
+?X: Remove SIGTYP void lines used by OS2.
+?X: Some cpps, like os390, dont give the file name anywhere
+if [ "X$fieldn" = X ]; then
+ : Just make some guesses. We check them later.
+ xxx='/usr/include/signal.h /usr/include/sys/signal.h'
+else
+ xxx=`echo '#include <signal.h>' |
+ $cppstdin $cppminus $cppflags 2>/dev/null |
+ $grep '^[ ]*#.*include' |
+ $awk "{print \\$$fieldn}" | $sed 's!"!!g' | \
+ $sed 's!\\\\\\\\!/!g' | $sort | $uniq`
+fi
+?X: Check this list of files to be sure we have parsed the cpp output ok.
+?X: This will also avoid potentially non-existent files, such
+?X: as ../foo/bar.h
+xxxfiles=''
+?X: Add /dev/null in case the $xxx list is empty.
+for xx in $xxx /dev/null ; do
+ $test -f "$xx" && xxxfiles="$xxxfiles $xx"
+done
+?X: If we have found no files, at least try signal.h
+case "$xxxfiles" in
+'') xxxfiles=`./findhdr signal.h` ;;
+esac
+xxx=`awk '
+$1 ~ /^#define$/ && $2 ~ /^SIG[A-Z0-9]*$/ && $2 !~ /SIGARRAYSIZE/ && $2 !~ /SIGSTKSIZE/ && $2 !~ /SIGSTKSZ/ && $3 !~ /void/ {
+ print substr($2, 4, 20)
+}
+$1 == "#" && $2 ~ /^define$/ && $3 ~ /^SIG[A-Z0-9]*$/ && $3 !~ /SIGARRAYSIZE/ && $4 !~ /void/ {
+ print substr($3, 4, 20)
+}' $xxxfiles`
+: Append some common names just in case the awk scan failed.
+xxx="$xxx ABRT ALRM BUS CANCEL CHLD CLD CONT DIL EMT FPE"
+xxx="$xxx FREEZE HUP ILL INT IO IOT KILL LOST LWP PHONE"
+xxx="$xxx PIPE POLL PROF PWR QUIT RTMAX RTMIN SEGV STKFLT STOP"
+xxx="$xxx SYS TERM THAW TRAP TSTP TTIN TTOU URG USR1 USR2"
+xxx="$xxx USR3 USR4 VTALRM WAITING WINCH WIND WINDOW XCPU XFSZ"
+
+: generate a few handy files for later
+$cat > signal.c <<'EOCP'
+#include <sys/types.h>
+#include <signal.h>
+#include <stdio.h>
+int main() {
+
+/* Strange style to avoid deeply-nested #if/#else/#endif */
+#ifndef NSIG
+# ifdef _NSIG
+# define NSIG (_NSIG)
+# endif
+#endif
+
+#ifndef NSIG
+# ifdef SIGMAX
+# define NSIG (SIGMAX+1)
+# endif
+#endif
+
+#ifndef NSIG
+# ifdef SIG_MAX
+# define NSIG (SIG_MAX+1)
+# endif
+#endif
+
+#ifndef NSIG
+# ifdef MAXSIG
+# define NSIG (MAXSIG+1)
+# endif
+#endif
+
+#ifndef NSIG
+# ifdef MAX_SIG
+# define NSIG (MAX_SIG+1)
+# endif
+#endif
+
+#ifndef NSIG
+# ifdef SIGARRAYSIZE
+# define NSIG (SIGARRAYSIZE+1) /* Not sure of the +1 */
+# endif
+#endif
+
+#ifndef NSIG
+# ifdef _sys_nsig
+# define NSIG (_sys_nsig) /* Solaris 2.5 */
+# endif
+#endif
+
+/* Default to some arbitrary number that's big enough to get most
+ of the common signals.
+*/
+#ifndef NSIG
+# define NSIG 50
+#endif
+
+printf("NSIG %d\n", NSIG);
+
+#ifndef JUST_NSIG
+
+EOCP
+
+echo $xxx | $tr ' ' $trnl | $sort | $uniq | $awk '
+{
+ printf "#ifdef SIG"; printf $1; printf "\n"
+ printf "printf(\""; printf $1; printf " %%d\\n\",SIG";
+ printf $1; printf ");\n"
+ printf "#endif\n"
+}
+END {
+ printf "#endif /* JUST_NSIG */\n";
+ printf "return 0;\n}\n";
+}
+' >>signal.c
+$cat >signal.awk <<'EOP'
+BEGIN { ndups = 0 }
+$1 ~ /^NSIG$/ { nsig = $2 }
+($1 !~ /^NSIG$/) && (NF == 2) {
+ if ($2 > maxsig) { maxsig = $2 }
+ if (sig_name[$2]) {
+ dup_name[ndups] = $1
+ dup_num[ndups] = $2
+ ndups++
+ }
+ else {
+ sig_name[$2] = $1
+ sig_num[$2] = $2
+ }
+}
+END {
+ if (nsig == 0) {
+ nsig = maxsig + 1
+ }
+ printf("NSIG %d\n", nsig);
+ for (n = 1; n < nsig; n++) {
+ if (sig_name[n]) {
+ printf("%s %d\n", sig_name[n], sig_num[n])
+ }
+ else {
+ printf("NUM%d %d\n", n, n)
+ }
+ }
+ for (n = 0; n < ndups; n++) {
+ printf("%s %d\n", dup_name[n], dup_num[n])
+ }
+}
+EOP
+$cat >signal_cmd <<EOS
+$startsh
+if $test -s signal.lst; then
+ echo "Using your existing signal.lst file"
+ exit 0
+fi
+xxx="$xxx"
+EOS
+?X: Avoid variable interpolation problems, especially with
+?X: xxx, which contains newlines.
+$cat >>signal_cmd <<'EOS'
+
+set signal
+if eval $compile_ok; then
+ $run ./signal$_exe | ($sort -n -k 2 2>/dev/null || $sort -n +1) | \
+ $uniq | $awk -f signal.awk >signal.lst
+else
+ echo "(I can't seem be able to compile the whole test program)" >&4
+ echo "(I'll try it in little pieces.)" >&4
+ set signal -DJUST_NSIG
+ if eval $compile_ok; then
+ $run ./signal$_exe > signal.nsg
+ $cat signal.nsg
+ else
+ echo "I can't seem to figure out how many signals you have." >&4
+ echo "Guessing 50." >&4
+ echo 'NSIG 50' > signal.nsg
+ fi
+ : Now look at all the signal names, one at a time.
+ for xx in `echo $xxx | $tr ' ' $trnl | $sort | $uniq`; do
+ $cat > signal.c <<EOCP
+#include <sys/types.h>
+#include <signal.h>
+#include <stdio.h>
+int main() {
+printf("$xx %d\n", SIG${xx});
+return 0;
+}
+EOCP
+ set signal
+ if eval $compile; then
+ echo "SIG${xx} found."
+ $run ./signal$_exe >> signal.ls1
+ else
+ echo "SIG${xx} NOT found."
+ fi
+ done
+ if $test -s signal.ls1; then
+ $cat signal.nsg signal.ls1 |
+ $sort -n | $uniq | $awk -f signal.awk >signal.lst
+ fi
+
+fi
+if $test -s signal.lst; then
+ :
+else
+ echo "(AAK! I can't compile the test programs -- Guessing)" >&4
+ echo 'kill -l' >signal
+ set X `csh -f <signal`
+ $rm -f signal
+ shift
+ case $# in
+ 0) set HUP INT QUIT ILL TRAP ABRT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM;;
+ esac
+ echo $@ | $tr ' ' $trnl | \
+ $awk '{ printf "%s %d\n", $1, ++s; }
+ END { printf "NSIG %d\n", ++s }' >signal.lst
+fi
+$rm -f signal.c signal$_exe signal$_o signal.nsg signal.ls1
+EOS
+chmod a+x signal_cmd
+$eunicefix signal_cmd
+
diff --git a/mcon/U/Tr.U b/mcon/U/Tr.U
new file mode 100644
index 0000000..f58d163
--- /dev/null
+++ b/mcon/U/Tr.U
@@ -0,0 +1,103 @@
+?RCS: $Id$
+?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: Tr.U,v $
+?RCS: Revision 3.0.1.2 1994/10/29 18:00:54 ram
+?RCS: patch43: forgot to quote $@ to protect against "evil" characters
+?RCS:
+?RCS: Revision 3.0.1.1 1994/10/29 15:58:35 ram
+?RCS: patch36: created
+?RCS:
+?X:
+?X: This unit produces a bit of shell code that must be dotted in in order
+?X: to do a character translation. It catches translations to uppercase or
+?X: to lowercase, and then invokes the real tr to perform the job.
+?X:
+?X: This unit is necessary on HP machines (HP strikes again!) with non-ascii
+?X: ROMAN8-charset, where normal letters are not arranged in a row, so a-z
+?X: covers not the whole alphabet but lots of special chars. This was reported
+?X: by Andreas Sahlbach <a.sahlbach@tu-bs.de>.
+?X:
+?X: Units performing a tr '[A-Z]' '[a-z]' or the other way round should include
+?X: us in their dependency and use ./tr instead.
+?X:
+?MAKE:Tr: startsh tr eunicefix
+?MAKE: -pick add $@ %<
+?F:./tr
+?T:up low LC_ALL
+: see whether [:lower:] and [:upper:] are supported character classes
+echo " "
+case "`echo AbyZ | LC_ALL=C $tr '[:lower:]' '[:upper:]' 2>/dev/null`" in
+ABYZ)
+ echo "Good, your tr supports [:lower:] and [:upper:] to convert case." >&4
+ up='[:upper:]'
+ low='[:lower:]'
+ ;;
+*) # There is a discontinuity in EBCDIC between 'I' and 'J'
+ # (0xc9 and 0xd1), therefore that is a nice testing point.
+ if test "X$up" = X -o "X$low" = X; then
+ case "`echo IJ | LC_ALL=C $tr '[I-J]' '[i-j]' 2>/dev/null`" in
+ ij) up='[A-Z]'
+ low='[a-z]'
+ ;;
+ esac
+ fi
+ if test "X$up" = X -o "X$low" = X; then
+ case "`echo IJ | LC_ALL=C $tr I-J i-j 2>/dev/null`" in
+ ij) up='A-Z'
+ low='a-z'
+ ;;
+ esac
+ fi
+ if test "X$up" = X -o "X$low" = X; then
+ case "`echo IJ | od -x 2>/dev/null`" in
+ *C9D1*|*c9d1*)
+ echo "Hey, this might be EBCDIC." >&4
+ if test "X$up" = X -o "X$low" = X; then
+ case "`echo IJ | \
+ LC_ALL=C $tr '[A-IJ-RS-Z]' '[a-ij-rs-z]' 2>/dev/null`" in
+ ij) up='[A-IJ-RS-Z]'
+ low='[a-ij-rs-z]'
+ ;;
+ esac
+ fi
+ if test "X$up" = X -o "X$low" = X; then
+ case "`echo IJ | LC_ALL=C $tr A-IJ-RS-Z a-ij-rs-z 2>/dev/null`" in
+ ij) up='A-IJ-RS-Z'
+ low='a-ij-rs-z'
+ ;;
+ esac
+ fi
+ ;;
+ esac
+ fi
+esac
+case "`echo IJ | LC_ALL=C $tr \"$up\" \"$low\" 2>/dev/null`" in
+ij)
+ echo "Using $up and $low to convert case." >&4
+ ;;
+*)
+ echo "I don't know how to translate letters from upper to lower case." >&4
+ echo "Your tr is not acting any way I know of." >&4
+ exit 1
+ ;;
+esac
+: set up the translation script tr, must be called with ./tr of course
+cat >tr <<EOSC
+$startsh
+case "\$1\$2" in
+'[A-Z][a-z]') LC_ALL=C exec $tr '$up' '$low';;
+'[a-z][A-Z]') LC_ALL=C exec $tr '$low' '$up';;
+esac
+LC_ALL=C exec $tr "\$@"
+EOSC
+chmod +x tr
+$eunicefix tr
+
diff --git a/mcon/U/Trylink.U b/mcon/U/Trylink.U
new file mode 100644
index 0000000..d45ffe2
--- /dev/null
+++ b/mcon/U/Trylink.U
@@ -0,0 +1,110 @@
+?RCS: $Id$
+?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
new file mode 100644
index 0000000..ad39117
--- /dev/null
+++ b/mcon/U/Typedef.U
@@ -0,0 +1,63 @@
+?RCS: $Id$
+?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: Typedef.U,v $
+?RCS: Revision 3.0.1.3 1995/07/25 13:42:07 ram
+?RCS: patch56: added backslash escapes within evals to prevent space problems
+?RCS:
+?RCS: Revision 3.0.1.2 1994/10/29 16:01:16 ram
+?RCS: patch36: don't clobber visible 'val' variable, use 'varval' instead
+?RCS:
+?RCS: Revision 3.0.1.1 1994/08/29 16:05:14 ram
+?RCS: patch32: created
+?RCS:
+?X:
+?X: This unit checks for the definition of a given typedef.
+?X:
+?X: To use it, say:
+?X: set typedef val_t default [includes]
+?X: eval $typedef
+?X:
+?MAKE:Typedef: cppstdin cppminus cppflags rm contains Oldconfig
+?MAKE: -pick add $@ %<
+?F:!temp.c
+?LINT:define typedef
+?V:typedef
+?S:typedef:
+?S: This shell variable is used internally by Configure to check
+?S: wether a given typedef is defined or not. A typical use is:
+?S: set typedef val_t default [includes]
+?S: eval $typedef
+?S: That will return val_t set to default if the typedef was not found,
+?S: to typedef otherwise. If no includes are specified, look in sys/types.h.
+?S:.
+?T:type var def inclist varval inc
+: define an is-a-typedef? function
+typedef='type=$1; var=$2; def=$3; shift; shift; shift; inclist=$@;
+case "$inclist" in
+"") inclist="sys/types.h";;
+esac;
+eval "varval=\$$var";
+case "$varval" in
+"")
+ $rm -f temp.c;
+ for inc in $inclist; do
+ echo "#include <$inc>" >>temp.c;
+ done;
+ $cppstdin $cppflags $cppminus < temp.c >temp.E 2>/dev/null;
+ if $contains $type temp.E >/dev/null 2>&1; then
+ eval "$var=\$type";
+ else
+ eval "$var=\$def";
+ fi;
+ $rm -f temp.?;;
+*) eval "$var=\$varval";;
+esac'
+
diff --git a/mcon/U/Unix.U b/mcon/U/Unix.U
new file mode 100644
index 0000000..ed1d066
--- /dev/null
+++ b/mcon/U/Unix.U
@@ -0,0 +1,70 @@
+?RCS: $Id$
+?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 License,
+?RCS: as specified in the 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: Unix.U,v $
+?RCS: Revision 3.0.1.1 1997/02/28 15:20:06 ram
+?RCS: patch61: created
+?RCS:
+?X:
+?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.
+?X:
+?MAKE:Unix _a _o firstmakefile archobjs rm_try: Oldconfig rm
+?MAKE: -pick add $@ %<
+?S:_a (lib_ext):
+?S: This variable defines the extension used for ordinary libraries.
+?S: For unix, it is '.a'. The '.' is included. Other possible
+?S: values include '.lib'.
+?S:.
+?S:_o (obj_ext):
+?S: This variable defines the extension used for object files.
+?S: For unix, it is '.o'. The '.' is included. Other possible
+?S: values include '.obj'.
+?S:.
+?S:firstmakefile:
+?S: This variable defines the first file searched by make. On unix,
+?S: it is makefile (then Makefile). On case-insensitive systems,
+?S: it might be something else. This is only used to deal with
+?S: convoluted make depend tricks.
+?S:.
+?S:archobjs:
+?S: This variable defines any additional objects that must be linked
+?S: in with the program on this architecture. On unix, it is usually
+?S: empty. It is typically used to include emulations of unix calls
+?S: or other facilities. For perl on OS/2, for example, this would
+?S: include os2/os2.obj.
+?S:.
+?S:rm_try:
+?S: This is a cleanup variable for try test programs.
+?S: Internal Configure use only.
+?S:.
+?INIT:: Extra object files, if any, needed on this platform.
+?INIT:archobjs=''
+: Define several unixisms.
+: Hints files or command line option can be used to override them.
+case "$_a" in
+'') _a='.a';;
+esac
+case "$_o" in
+'') _o='.o';;
+esac
+
+rm_try="$rm -f try try$_exe a.out .out try.[cho] try.$_o core core.try* try.core*"
+
+@if firstmakefile
+: Which makefile gets called first. This is used by make depend.
+case "$firstmakefile" in
+'') firstmakefile='makefile';;
+esac
+
+@end
diff --git a/mcon/U/Warn.U b/mcon/U/Warn.U
new file mode 100644
index 0000000..36b37eb
--- /dev/null
+++ b/mcon/U/Warn.U
@@ -0,0 +1,57 @@
+?RCS: $Id$
+?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: Extract.U,v $
+?X:
+?X: This unit produces a shell script which can be run in order to emit
+?X: an important warning to the user, which will be remembered and shown
+?X: at the end of the Configure run as well.
+?X:
+?X: A typical use would be:
+?X:
+?X: ./warn <<EOM
+?X: Problem with your C compiler: can't turn debugging on.
+?X: EOM
+?X:
+?X: or:
+?X:
+?X: ./warn "Problem with your C compiler: can't turn debugging on."
+?X:
+?X: Which will both display to the user:
+?X:
+?X: *** WARNING:
+?X: *** Problem with your C compiler: can't turn debugging on.
+?X: ***
+?X:
+?MAKE:Warn: startsh eunicefix
+?MAKE: -pick add $@ %<
+?F:./warn
+: script used to emit important warnings
+cat >warn <<EOS
+$startsh
+?X: Read the whole warning message from stdin into a temporary file
+?X: when no argument was supplied.
+if test \$# -gt 0; then
+ echo "\$@" >msg
+else
+ cat >msg
+fi
+?X: Emit the warning, prefixing all lines with '*** '
+echo "*** WARNING:" >&4
+sed -e 's/^/*** /' <msg >&4
+echo "*** " >&4
+?X: Save the warning in the logs, which will be shown again at the end
+cat msg >>config.msg
+echo " " >>config.msg
+rm -f msg
+EOS
+chmod +x warn
+$eunicefix warn
+
diff --git a/mcon/U/Warn_v7EXT.U b/mcon/U/Warn_v7EXT.U
new file mode 100644
index 0000000..f679931
--- /dev/null
+++ b/mcon/U/Warn_v7EXT.U
@@ -0,0 +1,34 @@
+?RCS: $Id$
+?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: Warn_v7EXT.U,v $
+?RCS: Revision 3.0.1.1 1994/10/29 16:01:42 ram
+?RCS: patch36: call ./v7 explicitly instead of relying on PATH
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:05:17 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: This unit issues warnings to V7 sites that they are living dangerously.
+?X: This unit needs to get mentioned in End.U to get included.
+?X:
+?MAKE:Warn_v7EXT: package Guess
+?MAKE: -pick add $@ %<
+: Warnings
+if ./v7; then
+ cat <<EOM
+
+NOTE: the V7 compiler may ignore some #undefs that $package uses. If so,
+you may get messages about redefining EXT. Some V7 compilers also have
+difficulties with #defines near buffer boundaries, so beware. You may have
+to play with the spacing in some .h files, believe it or not.
+EOM
+fi
+
diff --git a/mcon/U/Warn_v7ND.U b/mcon/U/Warn_v7ND.U
new file mode 100644
index 0000000..455097e
--- /dev/null
+++ b/mcon/U/Warn_v7ND.U
@@ -0,0 +1,33 @@
+?RCS: $Id$
+?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: Warn_v7ND.U,v $
+?RCS: Revision 3.0.1.1 1994/10/29 16:01:46 ram
+?RCS: patch36: call ./v7 explicitly instead of relying on PATH
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:05:18 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: This unit warns V7 sites that they may not have a non-blocking read.
+?X: This unit needs to be mentioned in End.U to get included.
+?X:
+?MAKE:Warn_v7ND: package Guess
+?MAKE: -pick add $@ %<
+: Warnings
+if ./v7; then
+ cat <<EOM
+
+NOTE: many V7 systems do not have a way to do a non-blocking read. If you
+don't have any of FIONREAD, O_NDELAY, or rdchk(), the $package package
+may not work as well as it might. It might not work at all.
+EOM
+fi
+
diff --git a/mcon/U/Whoa.U b/mcon/U/Whoa.U
new file mode 100644
index 0000000..abc0637
--- /dev/null
+++ b/mcon/U/Whoa.U
@@ -0,0 +1,51 @@
+?RCS: $Id$
+?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: Whoa.U,v $
+?RCS: Revision 3.0.1.2 1997/02/28 15:21:21 ram
+?RCS: patch61: whoa script now starts with leading "startsh"
+?RCS:
+?RCS: Revision 3.0.1.1 1994/10/29 16:02:01 ram
+?RCS: patch36: added ?F: line for metalint file checking
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:05:19 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: This unit produces a bit of shell code that must be dotted in in order
+?X: to warn the user in case a change into a variable is noticed.
+?X:
+?X: To use this unit, $was must hold the old value that has changed. Upon
+?X: exit, the two variables $td and $tu are set to the correct value for
+?X: respectively defining or undefining a variable. For instance, if $vas was
+?X: $undef, but now $var is $define, after calling . whoa, you should use
+?X: eval "$var=\$tu" to finally set $var to the correct value. See unit Inlibc.
+?X:
+?MAKE:Whoa: Myread startsh hint
+?MAKE: -pick add $@ %<
+?F:./whoa
+?T:var was
+?LINT:change td tu
+: set up the script used to warn in case of inconsistency
+cat <<EOS >whoa
+$startsh
+EOS
+cat <<'EOSC' >>whoa
+dflt=y
+echo " "
+echo "*** WHOA THERE!!! ***" >&4
+echo " The $hint value for \$$var on this machine was \"$was\"!" >&4
+rp=" Keep the $hint value?"
+. ./myread
+case "$ans" in
+y) td=$was; tu=$was;;
+esac
+EOSC
+
diff --git a/mcon/U/abortsig.U b/mcon/U/abortsig.U
new file mode 100644
index 0000000..f0bc51c
--- /dev/null
+++ b/mcon/U/abortsig.U
@@ -0,0 +1,80 @@
+?RCS: $Id$
+?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: abortsig.U,v $
+?RCS: Revision 3.0.1.1 1994/10/29 16:02:19 ram
+?RCS: patch36: call ./usg explicitly instead of relying on PATH
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:05:20 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:abortsig: Myread Oldconfig Guess cat +cc ccflags rm
+?MAKE: -pick add $@ %<
+?S:abortsig:
+?S: This variable holds the name of the signal used by the abort() call.
+?S:.
+?C:ABORTSIG:
+?C: This symbol holds the signal number (symbol) used by the abort() call. To
+?C: actually define the signal symbol, <signal.h> should be included.
+?C:.
+?H:#define ABORTSIG $abortsig /**/
+?H:.
+?T:signal
+: which signal is sent by abort ?
+echo " "
+case "$abortsig" in
+'')
+ echo "Checking to see which signal is sent to the process by abort()..." >&4
+ echo "abort" > abort.sh
+ chmod +x abort.sh
+?X: SIGABRT should replace SIGIOT on USG machines in a near future (1991).
+ 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); } /* FIXME: Use _exit() or _Exit() in signal handler */
+int main()
+{
+#ifdef $signal
+ signal($signal, caught);
+#endif
+ if (-1 == abort())
+ exit(1);
+ exit(1);
+}
+EOP
+?X: We have to use the abort.sh script otherwise sh behaves strangely on AIX.
+ if $cc $ccflags -o abort abort.c >/dev/null 2>&1; then
+ (./abort.sh) >/dev/null 2>&1
+ case $? in
+ 0) abortsig="$signal";;
+ esac
+ fi
+ ;;
+ esac
+ done
+ ;;
+esac
+case "$abortsig" in
+'') echo "(I wasn't able to compute the signal name--guessing)"
+ if ./usg; then
+ dflt="SIGIOT"
+ else
+ dflt="SIGILL"
+ fi;;
+*) dflt="$abortsig"
+ ;;
+esac
+rp="Which signal does abort() send to the process (signal name)?"
+. ./myread
+abortsig="$ans"
+$rm -f core abort.sh abort abort.c
+
diff --git a/mcon/U/active.U b/mcon/U/active.U
new file mode 100644
index 0000000..e2cb287
--- /dev/null
+++ b/mcon/U/active.U
@@ -0,0 +1,50 @@
+?RCS: $Id$
+?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: active.U,v $
+?RCS: Revision 3.0 1993/08/18 12:05:21 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:active activeexp: newslib Oldconfig Getfile
+?MAKE: -pick add $@ %<
+?S:active:
+?S: The name of the active file for the news system. This file contains
+?S: the list of active newsgroups. The name may have ~ on the front.
+?S: The variable myactive is the expanded form.
+?S:.
+?S:activeexp (myactive):
+?S: This is the same as the active variable, but is filename expanded
+?S: so that later Configure units can look at the active file if desired.
+?S:.
+?C:ACTIVE:
+?C: The name of the active file for the news system. This file contains
+?C: the list of active newsgroups. The name may have ~ on the front.
+?C:.
+?C:ACTIVE_EXP:
+?C: This is the same as ACTIVE, but is filename expanded at configuration
+?C: time, for programs that do not want to deal with it themselves.
+?C:.
+?H:#define ACTIVE "$active" /**/
+?H:#define ACTIVE_EXP "$activeexp" /**/
+?H:.
+: locate active file
+echo " "
+case "$active" in
+'')
+ dflt=$newslib/active
+ ;;
+*) dflt="$active";;
+esac
+fn=l~:active
+rp='Where is the active file?'
+. ./getfile
+active="$ans"
+activeexp="$ansexp"
+
diff --git a/mcon/U/afs.U b/mcon/U/afs.U
new file mode 100644
index 0000000..9a5cc83
--- /dev/null
+++ b/mcon/U/afs.U
@@ -0,0 +1,55 @@
+?RCS: $Id$
+?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: afs.U,v $
+?RCS: Revision 3.0.1.2 1997/02/28 15:23:06 ram
+?RCS: patch61: can now explicitly tell Configure whether AFS is running
+?RCS:
+?RCS: Revision 3.0.1.1 1993/08/24 12:24:43 ram
+?RCS: patch3: created
+?RCS:
+?MAKE:afs afsroot: test
+?MAKE: -pick add $@ %<
+?S:afs:
+?S: This variable is set to 'true' if AFS (Andrew File System) is used
+?S: on the system, 'false' otherwise. It is possible to override this
+?S: with a hint value or command line option, but you'd better know
+?S: what you are doing.
+?S:.
+?S:afsroot:
+?S: This variable is by default set to '/afs'. In the unlikely case
+?S: this is not the correct root, it is possible to override this with
+?S: a hint value or command line option. This will be used in subsequent
+?S: tests for AFSness in the configure and test process.
+?S:.
+: allow them to override the AFS root
+case "$afsroot" in
+'') afsroot=/afs ;;
+*) afsroot=$afsroot ;;
+esac
+
+: is AFS running?
+echo " "
+case "$afs" in
+$define|true) afs=true ;;
+$undef|false) afs=false ;;
+*) if $test -d $afsroot; then
+ afs=true
+ else
+ afs=false
+ fi
+ ;;
+esac
+if $afs; then
+ echo "AFS may be running... I'll be extra cautious then..." >&4
+else
+ echo "AFS does not seem to be running..." >&4
+fi
+
diff --git a/mcon/U/alignbytes.U b/mcon/U/alignbytes.U
new file mode 100644
index 0000000..569c25a
--- /dev/null
+++ b/mcon/U/alignbytes.U
@@ -0,0 +1,141 @@
+?RCS: $Id$
+?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: alignbytes.U,v $
+?RCS: Revision 3.0.1.2 1994/10/29 16:02:28 ram
+?RCS: patch36: added ?F: line for metalint file checking
+?RCS:
+?RCS: Revision 3.0.1.1 1994/05/06 14:25:20 ram
+?RCS: patch23: avoid ALIGNBYTES, since it conflicts on NetBSD
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:05:23 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?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 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.
+?C:MEM_ALIGNBYTES (ALIGNBYTES):
+?C: This symbol contains the number of bytes required to align a
+?C: double. Usual values are 2, 4 and 8.
+?C:.
+?H:#define MEM_ALIGNBYTES $alignbytes /**/
+?H:.
+?T:alignment result
+: check for alignment requirements
+echo " "
+case "$alignbytes" in
+'')
+ 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)
+{
+ STATIC_ASSERT($alignment == ((sizeof (struct s) - (sizeof (union u)))));
+ return 0;
+}
+EOCP
+
+ 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="What is the maximum alignment in bytes required for a standard type?"
+. ./myread
+alignbytes="$ans"
+
diff --git a/mcon/U/archlib.U b/mcon/U/archlib.U
new file mode 100644
index 0000000..d5ed39b
--- /dev/null
+++ b/mcon/U/archlib.U
@@ -0,0 +1,125 @@
+?RCS: $Id$
+?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: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
+?RCS:
+?RCS: $Log: archlib.U,v $
+?RCS: Revision 3.0.1.5 1997/02/28 15:23:38 ram
+?RCS: patch61: skip existence checks for archlib
+?RCS:
+?RCS: Revision 3.0.1.4 1995/09/25 09:15:18 ram
+?RCS: patch59: unit is now forced to the top of Configure, if possible
+?RCS:
+?RCS: Revision 3.0.1.3 1995/02/15 14:14:14 ram
+?RCS: patch51: architecture name is now computed by a separate unit
+?RCS:
+?RCS: Revision 3.0.1.2 1995/01/30 14:32:22 ram
+?RCS: patch49: archname is now systematically recomputed
+?RCS: patch49: can now handle installation prefix changes (from WED)
+?RCS:
+?RCS: Revision 3.0.1.1 1994/10/29 16:02:36 ram
+?RCS: patch36: created by ADO
+?RCS:
+?MAKE:d_archlib archlib archlibexp installarchlib: archname afs spackage \
+ cat Getfile Loc Oldconfig prefixexp privlib test Prefixit Prefixup
+?MAKE: -pick add $@ %<
+?Y:TOP
+?S:d_archlib:
+?S: This variable conditionally defines ARCHLIB to hold the pathname
+?S: of architecture-dependent library files for $package. If
+?S: $archlib is the same as $privlib, then this is set to undef.
+?S:.
+?S:archlib:
+?S: This variable holds the name of the directory in which the user wants
+?S: to put architecture-dependent public library files for $package.
+?S: It is most often a local directory such as /usr/local/lib.
+?S: Programs using this variable must be prepared to deal
+?S: with filename expansion.
+?S:.
+?S:archlibexp:
+?S: This variable is the same as the archlib variable, but is
+?S: filename expanded at configuration time, for convenient use.
+?S:.
+?S:installarchlib:
+?S: This variable is really the same as archlibexp but may differ on
+?S: those systems using AFS. For extra portability, only this variable
+?S: should be used in makefiles.
+?S:.
+?C:ARCHLIB:
+?C: This variable, if defined, holds the name of the directory in
+?C: which the user wants to put architecture-dependent public
+?C: library files for $package. It is most often a local directory
+?C: such as /usr/local/lib. Programs using this variable must be
+?C: prepared to deal with filename expansion. If ARCHLIB is the
+?C: same as PRIVLIB, it is not defined, since presumably the
+?C: program already searches PRIVLIB.
+?C:.
+?C:ARCHLIB_EXP:
+?C: This symbol contains the ~name expanded version of ARCHLIB, to be used
+?C: in programs that are not prepared to deal with ~ expansion at run-time.
+?C:.
+?H:#$d_archlib ARCHLIB "$archlib" /**/
+?H:#$d_archlib ARCHLIB_EXP "$archlibexp" /**/
+?H:.
+: determine where public architecture dependent libraries go
+set archlib archlib
+eval $prefixit
+case "$archlib" in
+'')
+ case "$privlib" in
+ '')
+ dflt=`./loc . "." $prefixexp/lib /usr/local/lib /usr/lib /lib`
+ set dflt
+ eval $prefixup
+ ;;
+ *) dflt="$privlib/$archname";;
+ esac
+ ;;
+*) dflt="$archlib";;
+esac
+cat <<EOM
+
+$spackage contains architecture-dependent library files. If you are
+sharing libraries in a heterogeneous environment, you might store
+these files in a separate location. Otherwise, you can just include
+them with the rest of the public library files.
+
+EOM
+fn=d+~
+rp='Where do you want to put the public architecture-dependent libraries?'
+. ./getfile
+archlib="$ans"
+archlibexp="$ansexp"
+
+if $afs; then
+ $cat <<EOM
+
+Since you are running AFS, I need to distinguish the directory in which
+private files reside from the directory in which they are installed (and from
+which they are presumably copied to the former directory by occult means).
+
+EOM
+ case "$installarchlib" in
+ '') dflt=`echo $archlibexp | sed 's#^/afs/#/afs/.#'`;;
+ *) dflt="$installarchlib";;
+ esac
+ fn=de~
+ rp='Where will architecture-dependent library files be installed?'
+ . ./getfile
+ installarchlib="$ans"
+else
+ installarchlib="$archlibexp"
+fi
+if $test X"$archlib" = X"$privlib"; then
+ d_archlib="$undef"
+else
+ d_archlib="$define"
+fi
+
diff --git a/mcon/U/archname.U b/mcon/U/archname.U
new file mode 100644
index 0000000..8d79e2a
--- /dev/null
+++ b/mcon/U/archname.U
@@ -0,0 +1,76 @@
+?RCS: $Id$
+?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: archname.U,v $
+?RCS: Revision 3.0.1.3 1997/02/28 15:24:32 ram
+?RCS: patch61: changed the way the archname is mangled from uname
+?RCS:
+?RCS: Revision 3.0.1.2 1995/05/12 12:05:24 ram
+?RCS: patch54: protect against spaces in "uname -m" output (ADO)
+?RCS:
+?RCS: Revision 3.0.1.1 1995/02/15 14:14:21 ram
+?RCS: patch51: created
+?RCS:
+?MAKE:archname myarchname: sed Loc Myread Oldconfig osname test rm
+?MAKE: -pick add $@ %<
+?S:archname:
+?S: This variable is a short name to characterize the current
+?S: architecture. It is used mainly to construct the default archlib.
+?S:.
+?S:myarchname:
+?S: This variable holds the architecture name computed by Configure in
+?S: a previous run. It is not intended to be perused by any user and
+?S: should never be set in a hint file.
+?S:.
+?C:ARCHNAME:
+?C: This symbol holds a string representing the architecture name.
+?C: It may be used to construct an architecture-dependant pathname
+?C: where library files may be held under a private library, for
+?C: instance.
+?C:.
+?H:#define ARCHNAME "$archname" /**/
+?H:.
+?T:xxx tarch
+: determine the architecture name
+echo " "
+?X: We always recompute archname in case osname changes. However, we need
+?X: to be careful since, as ADO rightfully pointed out, some systems pick
+?X: silly architecture names (0001307135000-aix on AIX or 9000/715-ux under
+?X: HP-UX). Therefore, we allow hint files to superseed our guess and ask
+?X: the user for confirmation.
+if xxx=`./loc arch blurfl $pth`; $test -f "$xxx"; then
+ tarch=`arch`"-$osname"
+elif xxx=`./loc uname blurfl $pth`; $test -f "$xxx" ; then
+ if uname -m > tmparch 2>&1 ; then
+ tarch=`$sed -e 's/ *$//' -e 's/ /_/g' \
+ -e 's/$/'"-$osname/" tmparch`
+ else
+ tarch="$osname"
+ fi
+ $rm -f tmparch
+else
+ tarch="$osname"
+fi
+case "$myarchname" in
+''|"$tarch") ;;
+*)
+ echo "(Your architecture name used to be $myarchname.)"
+ archname=''
+ ;;
+esac
+case "$archname" in
+'') dflt="$tarch";;
+*) dflt="$archname";;
+esac
+rp='What is your architecture name'
+. ./myread
+archname="$ans"
+myarchname="$tarch"
+
diff --git a/mcon/U/baserev.U b/mcon/U/baserev.U
new file mode 100644
index 0000000..fe47c36
--- /dev/null
+++ b/mcon/U/baserev.U
@@ -0,0 +1,22 @@
+?RCS: $Id$
+?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: baserev.U,v $
+?RCS: Revision 3.0 1993/08/18 12:05:24 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:baserev: Null
+?MAKE: -pick wipe $@ %<
+?S:baserev:
+?S: The base revision level of this package, from the .package file.
+?S:.
+: set the base revision
+baserev=<BASEREV>
+
diff --git a/mcon/U/basicshell.U b/mcon/U/basicshell.U
new file mode 100644
index 0000000..1d4d769
--- /dev/null
+++ b/mcon/U/basicshell.U
@@ -0,0 +1,47 @@
+?RCS: $Id$
+?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: basicshell.U,v $
+?RCS: Revision 3.0 1993/08/18 12:05:25 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:basicshell: Getfile Oldconfig bash csh ksh sh
+?MAKE: -pick add $@ %<
+?S:basicshell:
+?S: This variable contains the eventual value of the BASICSHELL symbol,
+?S: which contains the full name of the basic script shell on this
+?S: system. Usual values are /bin/sh, /bin/ksh, /bin/csh.
+?S:.
+?C:BASICSHELL:
+?C: This symbol contains the full name of the basic script shell on this
+?C: system. Usual values are /bin/sh, /bin/ksh, /bin/csh.
+?C:.
+?H:#define BASICSHELL "$basicshell" /**/
+?H:.
+: find the most basic shell for scripts
+echo " "
+case "$basicshell" in
+'')
+ case "$sh $bash $csh $ksh" in
+ */sh*) dflt="$sh" ;;
+ */ksh*) dflt="$ksh" ;;
+ */csh*) dflt="$csh" ;;
+ */bash*) dflt="$bash" ;;
+ *) dflt='/bin/sh' ;;
+ esac
+ ;;
+*)
+ dflt="$basicshell";;
+esac
+fn=f
+rp="Give the full path name of the most basic shell used on your system"
+. ./getfile
+basicshell=$ans
+
diff --git a/mcon/U/bin.U b/mcon/U/bin.U
new file mode 100644
index 0000000..e814e9a
--- /dev/null
+++ b/mcon/U/bin.U
@@ -0,0 +1,88 @@
+?RCS: $Id$
+?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: bin.U,v $
+?RCS: Revision 3.0.1.4 1995/09/25 09:15:32 ram
+?RCS: patch59: unit is now forced to the top of Configure, if possible
+?RCS:
+?RCS: Revision 3.0.1.3 1995/01/30 14:32:40 ram
+?RCS: patch49: can now handle installation prefix changes (from WED)
+?RCS:
+?RCS: Revision 3.0.1.2 1994/08/29 16:05:28 ram
+?RCS: patch32: now uses installation prefix
+?RCS:
+?RCS: Revision 3.0.1.1 1993/09/13 15:56:51 ram
+?RCS: patch10: made prompting more explicit (WAD)
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:05:26 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:bin binexp installbin: Prefixit Getfile Oldconfig afs cat test
+?MAKE: -pick add $@ %<
+?Y:TOP
+?S:bin:
+?S: This variable holds the name of the directory in which the user wants
+?S: to put publicly executable images for the package in question. It
+?S: is most often a local directory such as /usr/local/bin. Programs using
+?S: this variable must be prepared to deal with ~name substitution.
+?S:.
+?S:binexp:
+?S: This is the same as the bin variable, but is filename expanded at
+?S: configuration time, for use in your makefiles.
+?S:.
+?S:installbin:
+?S: This variable is the same as binexp unless AFS is running in which case
+?S: the user is explicitly prompted for it. This variable should always
+?S: be used in your makefiles for maximum portability.
+?S:.
+?C:BIN:
+?C: This symbol holds the path of the bin directory where the package will
+?C: be installed. Program must be prepared to deal with ~name substitution.
+?C:.
+?C:BIN_EXP:
+?C: This symbol is the filename expanded version of the BIN symbol, for
+?C: programs that do not want to deal with that at run-time.
+?C:.
+?H:#define BIN "$bin" /**/
+?H:#define BIN_EXP "$binexp" /**/
+?H:.
+?D:bin='/usr/local/bin'
+: determine where public executables go
+echo " "
+set dflt bin bin
+eval $prefixit
+fn=d~
+rp='Pathname where the public executables will reside?'
+. ./getfile
+if $test "X$ansexp" != "X$binexp"; then
+ installbin=''
+fi
+bin="$ans"
+binexp="$ansexp"
+if $afs; then
+ $cat <<EOM
+
+Since you are running AFS, I need to distinguish the directory in which
+executables reside from the directory in which they are installed (and from
+which they are presumably copied to the former directory by occult means).
+
+EOM
+ case "$installbin" in
+ '') dflt=`echo $binexp | sed 's#^/afs/#/afs/.#'`;;
+ *) dflt="$installbin";;
+ esac
+ fn=de~
+ rp='Where will public executables be installed?'
+ . ./getfile
+ installbin="$ans"
+else
+ installbin="$binexp"
+fi
+
diff --git a/mcon/U/bitpbyte.U b/mcon/U/bitpbyte.U
new file mode 100644
index 0000000..cdd2c05
--- /dev/null
+++ b/mcon/U/bitpbyte.U
@@ -0,0 +1,74 @@
+?RCS: $Id$
+?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: bitpbyte.U,v $
+?RCS: Revision 3.0.1.1 1994/10/29 16:02:54 ram
+?RCS: patch36: added ?F: line for metalint file checking
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:05:27 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:bitpbyte: cat rm Myread +cc +ccflags
+?MAKE: -pick add $@ %<
+?S:bitpbyte:
+?S: This variable contains the value of the BITS_PER_BYTE symbol, which
+?S: indicates to the C program how many bits there are in a byte.
+?S:.
+?C:BITS_PER_BYTE:
+?C: This symbol contains the number of bits in a byte, so that the C
+?C: preprocessor can make decisions based on it.
+?C:.
+?H:#define BITS_PER_BYTE $bitpbyte /**/
+?H:.
+?F:!try
+: check for length of byte
+echo " "
+case "$bitpbyte" in
+'')
+ echo "Checking to see how many bits there are in a byte..." >&4
+ $cat >try.c <<'EOCP'
+#include <stdio.h>
+?X: Standard C requires a macro CHAR_BIT in <limits.h>
+#ifdef __STDC__
+#include <limits.h>
+#ifndef CHAR_BIT
+#define CHAR_BIT 8
+#endif
+#ifndef BITSPERBYTE
+#define BITSPERBYTE CHAR_BIT
+#endif
+#else
+?X: On non standard C, try with <values.h>
+#include <values.h>
+#ifndef BITSPERBYTE
+#define BITSPERBYTE 8
+#endif
+#endif
+int main()
+{
+ printf("%d\n", BITSPERBYTE);
+}
+EOCP
+ if $cc $ccflags -o try try.c >/dev/null 2>&1 ; then
+ dflt=`./try`
+ else
+ dflt='8'
+ echo "(I can't seem to compile the test program. Guessing...)"
+ fi
+ ;;
+*)
+ dflt="$bitpbyte"
+ ;;
+esac
+rp="What is the length of a byte (in bits)?"
+. ./myread
+bitpbyte="$ans"
+$rm -f try.c try
+
diff --git a/mcon/U/byteorder.U b/mcon/U/byteorder.U
new file mode 100644
index 0000000..9bd2467
--- /dev/null
+++ b/mcon/U/byteorder.U
@@ -0,0 +1,68 @@
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, 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:byteorder: cat contains echo n c Myread Oldconfig Loc +cc +ccflags rm_try _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 one.
+?S: cannot figure it out.
+?S:.
+?C:BYTEORDER:
+?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: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
+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
+ $echo $n " wild guessing$c" >&4
+ order=4321
+ fi
+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
+byteorder=$order
+$rm_try
+
diff --git a/mcon/U/cc.U b/mcon/U/cc.U
new file mode 100644
index 0000000..b20f5f5
--- /dev/null
+++ b/mcon/U/cc.U
@@ -0,0 +1,58 @@
+?RCS: $Id$
+?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: cc.U,v $
+?RCS: Revision 3.0.1.4 1995/05/12 12:06:47 ram
+?RCS: patch54: may now abort Configure when cc does not work
+?RCS:
+?RCS: Revision 3.0.1.3 1995/01/11 15:20:11 ram
+?RCS: patch45: changed gcc checking message to a more explicit one (WED)
+?RCS:
+?RCS: Revision 3.0.1.2 1994/10/29 16:04:29 ram
+?RCS: patch36: detect gcc even when not called as 'gcc' (ADO)
+?RCS: patch36: simplified gcc version checking (ADO)
+?RCS: patch36: added ?F: line for metalint file checking
+?RCS:
+?RCS: Revision 3.0.1.1 1994/05/06 14:26:06 ram
+?RCS: patch23: added support for gcc version (ADO)
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:05:30 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:cc: Myread Oldconfig Checkcc test
+?MAKE: -pick add $@ %<
+?S:cc:
+?S: This variable holds the name of a command to execute a C compiler which
+?S: can resolve multiple global references that happen to have the same
+?S: name. Usual values are 'cc' and 'gcc'.
+?S: Fervent ANSI compilers may be called 'c89'. AIX has xlc.
+?S:.
+?F:!cc.cbu
+?D:cc='cc'
+: Determine the C compiler to be used
+echo " "
+case "$cc" in
+'') dflt=cc;;
+*) dflt="$cc";;
+esac
+rp="Use which C compiler?"
+. ./myread
+cc="$ans"
+
+: See whether they have no cc but they do have gcc
+. ./trygcc
+?X: Look for a hint-file generated 'call-back-unit'. Now that the
+?X: user has specified the compiler, we may need to set or change some
+?X: other defaults.
+if $test -f cc.cbu; then
+ . ./cc.cbu
+fi
+. ./checkcc
+
diff --git a/mcon/U/ccflags.U b/mcon/U/ccflags.U
new file mode 100644
index 0000000..942e462
--- /dev/null
+++ b/mcon/U/ccflags.U
@@ -0,0 +1,457 @@
+?RCS: $Id$
+?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: ccflags.U,v $
+?RCS: Revision 3.0.1.9 1997/02/28 15:27:07 ram
+?RCS: patch61: removed support for NO_PROTOTYPE detection on SCO
+?RCS: patch61: new locincpth variable
+?RCS: patch61: added info on the "additional ld flags" question
+?RCS:
+?RCS: Revision 3.0.1.8 1995/07/25 13:48:54 ram
+?RCS: patch56: re-arranged compile line to include ldflags before objects
+?RCS:
+?RCS: Revision 3.0.1.7 1995/05/12 12:08:33 ram
+?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 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
+?RCS: patch32: propagate -posix flag from ccflags to ldflags
+?RCS:
+?RCS: Revision 3.0.1.4 1994/05/06 14:28:45 ram
+?RCS: patch23: -fpcc-struct-return only needed in gcc 1.x (ADO)
+?RCS: patch23: cppflags now computed on an option-by-option basis
+?RCS: patch23: magically added cc flags now only done the first time
+?RCS:
+?RCS: Revision 3.0.1.3 1993/09/13 15:58:29 ram
+?RCS: patch10: explicitly mention -DDEBUG just in case they need it (WAD)
+?RCS: patch10: removed all the "tans" variable usage (WAD)
+?RCS:
+?RCS: Revision 3.0.1.2 1993/08/27 14:39:38 ram
+?RCS: patch7: added support for OSF/1 machines
+?RCS:
+?RCS: Revision 3.0.1.1 1993/08/25 14:00:24 ram
+?RCS: patch6: added defaults for cppflags, ccflags and ldflags
+?RCS:
+?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 pthread locincpth: test cat \
+ Myread Guess Options Oldconfig gccversion mips_type +usrinc \
+ package contains rm rm_try +cc cppstdin cppminus cpprun cpplast libpth \
+ loclibpth hint
+?MAKE: -pick add $@ %<
+?S:ccflags:
+?S: This variable contains any additional C compiler flags desired by
+?S: the user. It is up to the Makefile to use this.
+?S:.
+?S:cppflags:
+?S: This variable holds the flags that will be passed to the C pre-
+?S: processor. It is up to the Makefile to use it.
+?S:.
+?S:optimize:
+?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.
+?S:.
+?S:lkflags:
+?S: This variable contains any additional C partial linker flags desired by
+?S: the user. It is up to the Makefile to use this.
+?S:.
+?S:locincpth:
+?S: This variable contains a list of additional directories to be
+?S: searched by the compiler. The appropriate -I directives will
+?S: be added to ccflags. This is intended to simplify setting
+?S: local directories from the Configure command line.
+?S: It's not much, but it parallels the loclibpth stuff in libpth.U.
+?S:.
+?T:inctest thisincl xxx flag inclwanted ftry previous thislibdir
+?F:!cpp.c
+?D:cppflags=''
+?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=""
+?INIT::
+?INIT:: no include file wanted by default
+?INIT:inclwanted=''
+?INIT:
+: determine optimize, if desired, or use for debug flag also
+case "$optimize" in
+' '|$undef) dflt='none';;
+'')
+ case "$gccversion" in
+ '') dflt='-O';;
+ *) dflt='-O2 -g';;
+ esac
+ ;;
+*) dflt="$optimize";;
+esac
+case "$gccversion" in
+'') $cat <<EOH
+
+Some C compilers have problems with their optimizers. By default, $package
+compiles with the -O flag to use the optimizer. Alternately, you might want
+to use the symbolic debugger, which uses the -g flag (on traditional Unix
+systems). Either flag can be specified here. To use neither flag, specify
+the word "none".
+
+EOH
+ ;;
+*) $cat <<EOH
+
+With the GNU C compiler, it is possible to supply both -O2 and -g flags, to
+be able to reasonably optimize, whilst retaining the ability to use a
+symbolic debugger. Either flag can be specified here. To use neither flag,
+specify the word "none".
+
+EOH
+ ;;
+esac
+rp="What optimizer/debugger flag should be used?"
+. ./myread
+optimize="$ans"
+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
+case "$hint" in
+default|recommended)
+ case "$gccversion" in
+ 1*) dflt='-fpcc-struct-return' ;;
+ esac
+?X: check for POSIXized ISC
+ case "$gccversion" in
+ 2*) if test -d /etc/conf/kconfig.d &&
+ $contains _POSIX_VERSION $usrinc/sys/unistd.h >/dev/null 2>&1
+ then
+ dflt="$dflt -posix"
+ fi
+ ;;
+ esac
+?X: turn warnings on if they're using gcc
+ case "$gccversion" in
+ 1*|2*) dflt="$dflt -Wall";;
+?X: starting with version 3, add "-W -Wall -Wformat=2 -Wshadow" by default
+ *) dflt="$dflt -W -Wall -Wformat=2 -Wshadow";;
+ esac
+ ;;
+esac
+
+?X: In USG mode, a MIPS system may need some BSD includes
+case "$mips_type" in
+*BSD*|'') inclwanted="$locincpth $usrinc";;
+*) inclwanted="$locincpth $inclwanted $usrinc/bsd";;
+esac
+for thisincl in $inclwanted; do
+ if $test -d $thisincl; then
+ if $test x$thisincl != x$usrinc; then
+ case "$dflt" in
+ *$thisincl*);;
+ *) dflt="$dflt -I$thisincl";;
+ esac
+ fi
+ fi
+done
+
+?X: Include test function (header, symbol)
+inctest='if $contains $2 $usrinc/$1 >/dev/null 2>&1; then
+ xxx=true;
+elif $contains $2 $usrinc/sys/$1 >/dev/null 2>&1; then
+ xxx=true;
+else
+ xxx=false;
+fi;
+if $xxx; then
+ case "$dflt" in
+ *$2*);;
+ *) dflt="$dflt -D$2";;
+ esac;
+fi'
+
+?X:
+?X: OSF/1 uses __LANGUAGE_C__ instead of LANGUAGE_C
+?X:
+if ./osf1; then
+ set signal.h __LANGUAGE_C__; eval $inctest
+else
+ set signal.h LANGUAGE_C; eval $inctest
+fi
+
+case "$hint" in
+default|recommended) dflt="$dflt $ccflags" ;;
+*) dflt="$ccflags";;
+esac
+
+case "$dflt" in
+''|' ') dflt=none;;
+esac
+$cat <<EOH
+
+Your C compiler may want other flags. For this question you should include
+-I/whatever and -DWHATEVER flags and any other flags used by the C compiler,
+but you should NOT include libraries or ld flags like -lwhatever.
+
+To use no flags, specify the word "none".
+
+EOH
+?X: strip leading space
+set X $dflt
+shift
+dflt=${1+"$@"}
+rp="Any additional cc flags?"
+. ./myread
+case "$ans" in
+none) ccflags='';;
+*) ccflags="$ans";;
+esac
+
+: the following weeds options from ccflags that are of no interest to cpp
+cppflags="$ccflags"
+case "$gccversion" in
+1*) cppflags="$cppflags -D__GNUC__"
+esac
+case "$mips_type" in
+'');;
+*BSD*) cppflags="$cppflags -DSYSTYPE_BSD43";;
+esac
+case "$cppflags" in
+'');;
+*)
+ echo " "
+ echo "Let me guess what the preprocessor flags are..." >&4
+ set X $cppflags
+ shift
+ cppflags=''
+ $cat >cpp.c <<'EOM'
+#define BLURFL foo
+
+BLURFL xx LFRULB
+EOM
+?X:
+?X: For each cc flag, try it out with both cppstdin and cpprun, since the
+?X: first is almost surely a cc wrapper. We have to try both in case
+?X: of cc flags like '-Olimit 2900' that are actually two words...
+?X:
+ previous=''
+ for flag in $*
+ do
+ case "$flag" in
+ -*) ftry="$flag";;
+ *) ftry="$previous $flag";;
+ esac
+ if $cppstdin -DLFRULB=bar $ftry $cppminus <cpp.c \
+ >cpp1.out 2>/dev/null && \
+ $cpprun -DLFRULB=bar $ftry $cpplast <cpp.c \
+ >cpp2.out 2>/dev/null && \
+ $contains 'foo.*xx.*bar' cpp1.out >/dev/null 2>&1 && \
+ $contains 'foo.*xx.*bar' cpp2.out >/dev/null 2>&1
+ then
+ cppflags="$cppflags $ftry"
+ previous=''
+ else
+ previous="$flag"
+ fi
+ done
+ set X $cppflags
+ shift
+ cppflags=${1+"$@"}
+ case "$cppflags" in
+ *-*) echo "They appear to be: $cppflags";;
+ esac
+ $rm -f cpp.c cpp?.out
+ ;;
+esac
+
+: flags used in final linking phase
+case "$ldflags" in
+'') if ./venix; then
+ dflt='-i -z'
+ else
+ dflt=''
+ fi
+ case "$ccflags" in
+ *-posix*) dflt="$dflt -posix" ;;
+ esac
+ ;;
+*) dflt="$ldflags";;
+esac
+
+: Try to guess additional flags to pick up local libraries.
+for thislibdir in $libpth; do
+ case " $loclibpth " in
+ *" $thislibdir "*)
+ case "$dflt " in
+ *"-L$thislibdir "*) ;;
+ *) dflt="$dflt -L$thislibdir" ;;
+ esac
+ ;;
+ esac
+done
+
+case "$dflt" in
+'') dflt='none' ;;
+*) set X $dflt; shift; dflt="$@";;
+esac
+
+$cat <<EOH
+
+Your C linker may need flags. For this question you should
+include -L/whatever and any other flags used by the C linker, but you
+should NOT include libraries like -lwhatever.
+
+Make sure you include the appropriate -L/path flags if your C linker
+does not normally search all of the directories you specified above,
+namely
+ $libpth
+To use no flags, specify the word "none".
+
+EOH
+
+rp="Any additional ld flags (NOT including libraries)?"
+. ./myread
+case "$ans" in
+none) ldflags='';;
+*) ldflags="$ans";;
+esac
+rmlist="$rmlist pdp11"
+
+@if lkflags
+: partial linking may need other flags
+case "$lkflags" in
+'') case "$ldflags" in
+ '') dflt='none';;
+ *) dflt="$ldflags";;
+ esac;;
+*) dflt="$lkflags";;
+esac
+echo " "
+rp="Partial linking flags to be used (NOT including -r)?"
+. ./myread
+case "$ans" in
+none) lkflags='';;
+*) lkflags="$ans";;
+esac
+
+@end
+?X:
+?X: If the user changes compilers after selecting a hint file, it's
+?X: possible that the suggested ccflags/ldflags will be wrong. Try to
+?X: compile and run a simple test program. Let the user see all the
+?X: error messages. -- ADO and RAM
+?X:
+: coherency check
+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 $pthread $ccflags $ldflags -o try try.c
+shift
+$cat >try.msg <<EOM
+I've tried to compile and run a simple program with:
+
+ $*
+ ./try
+
+and I got the following output:
+
+EOM
+$cat > try.c <<'EOF'
+int main() { return 0; }
+EOF
+dflt=y
+?X: Use "sh -c" to avoid error messages tagged with leading "Configure:".
+?X: We need to try the resulting executable, because cc might yield a 0 status
+?X: even when ld failed, in which case the executable will not run properly,
+?X: if its x bit is set at all...
+if sh -c "$cc $optimize $ccflags $ldflags -o try try.c" >>try.msg 2>&1; then
+ if sh -c './try' >>try.msg 2>&1; then
+ dflt=n
+ else
+ echo "The program compiled OK, but exited with status $?." >>try.msg
+ rp="You have a problem. Shall I abort Configure"
+ dflt=y
+ fi
+else
+ echo "I can't compile the test program." >>try.msg
+ rp="You have a BIG problem. Shall I abort Configure"
+ dflt=y
+fi
+case "$dflt" in
+y)
+ $cat try.msg >&4
+?X: using -K will prevent default aborting--maybe they're cross compiling?
+ case "$knowitall" in
+ '')
+ echo "(The supplied flags might be incorrect with this C compiler.)"
+ ;;
+ *) dflt=n;;
+ esac
+ echo " "
+ . ./myread
+ case "$ans" in
+ n*|N*) ;;
+ *) echo "Ok. Stopping Configure." >&4
+ exit 1
+ ;;
+ esac
+ ;;
+n) echo "OK, that should do.";;
+esac
+$rm_try
+
diff --git a/mcon/U/cf_email.U b/mcon/U/cf_email.U
new file mode 100644
index 0000000..acc950e
--- /dev/null
+++ b/mcon/U/cf_email.U
@@ -0,0 +1,69 @@
+?RCS: $Id$
+?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: cf_email.U,v $
+?RCS: Revision 3.0.1.1 1994/01/24 14:05:06 ram
+?RCS: patch16: created
+?RCS:
+?RCS:
+?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 maildomain
+?LINT:extern MAILDOMAIN
+: determine the e-mail address of the user who is running us
+$cat <<EOM
+
+I need to get your e-mail address in Internet format if possible, i.e.
+something like user@host.domain. Please answer accurately since I have
+no easy means to double check it. The default value provided below
+is most probably close to reality but may not be valid from outside
+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@$maildomain";;
+ *) dflt="$cf_email";;
+ esac
+ rp='What is your e-mail address?'
+ . ./myread
+ cf_email="$ans"
+ case "$cf_email" in
+ *@*.*) cont='' ;;
+ *)
+ rp='Address does not look like an Internet one. Use it anyway?'
+ case "$fastread" in
+ yes) dflt=y ;;
+ *) dflt=n ;;
+ esac
+ . ./myread
+ case "$ans" in
+ y*) cont='' ;;
+ *) echo " " ;;
+ esac
+ ;;
+ esac
+done
+
diff --git a/mcon/U/cf_name.U b/mcon/U/cf_name.U
new file mode 100644
index 0000000..a711ffd
--- /dev/null
+++ b/mcon/U/cf_name.U
@@ -0,0 +1,72 @@
+?RCS: $Id$
+?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: Original Author: Graham Stoney <greyham@research.canon.oz.au>
+?RCS:
+?RCS: $Log: cf_name.U,v $
+?RCS: Revision 3.0.1.2 1994/05/06 14:29:36 ram
+?RCS: patch23: fixed user name computation from /etc/passwd in bsd systems
+?RCS:
+?RCS: Revision 3.0.1.1 1994/01/24 14:05:11 ram
+?RCS: patch16: created
+?RCS:
+?RCS:
+?MAKE:+cf_name: cf_by passcat Filexp nametype cat test
+?MAKE: -pick add $@ %<
+?S:cf_name:
+?S: Full name of the person who ran the Configure script and answered the
+?S: questions. This can be used by units that require the user's full name.
+?S: This variable is for internal use only.
+?S:.
+?T:xxx fn NAME
+: figure out their full name
+case "$NAME" in
+'') case "$nametype" in
+ other)
+ fn=`./filexp ~/.fullname`
+ xxx=usg
+ $test -f $fn && xxx=other
+ ;;
+ *)
+ xxx="$nametype"
+ ;;
+ esac
+
+ case "$xxx" in
+ bsd)
+ cf_name=`$passcat | grep "^$cf_by:" | \
+ sed -e 's/^[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\):.*/\1/' \
+ -e 's/,.*//'`
+ ;;
+ usg)
+ cf_name=`$passcat | grep "^$cf_by:" | \
+ sed -e 's/^[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\):.*/\1/' \
+ -e 's/[^-]*-\(.*\)(.*)/\1/'`
+ ;;
+ *)
+ cf_name=`$cat $fn`
+ ;;
+ esac
+ ;;
+*)
+ cf_name="$NAME"
+ ;;
+esac
+?X:
+?X: In the original unit, Graham asked for the user name, in case the above
+?X: code was unable to figure it out correctly. Since now cf_name has been
+?X: made an internal variable only (i.e. it is not saved in config.sh), letting
+?X: the user override the computed default each time would be a pain.
+?X: Therefore, I have decided to trust the above code to get it right, and for
+?X: those rare cases where it will fail, too bad :-) --RAM.
+?X:
+echo " "
+echo "Pleased to meet you, $cf_name."
+
diff --git a/mcon/U/cf_who.U b/mcon/U/cf_who.U
new file mode 100644
index 0000000..d7492c7
--- /dev/null
+++ b/mcon/U/cf_who.U
@@ -0,0 +1,65 @@
+?RCS: $Id$
+?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: cf_who.U,v $
+?RCS: Revision 3.0.1.2 1997/02/28 15:28:50 ram
+?RCS: patch61: new computation method avoiding use of temporary file
+?RCS:
+?RCS: Revision 3.0.1.1 1994/05/06 14:42:34 ram
+?RCS: patch23: login name now computed the hard way
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:05:32 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: Oldconfig dependency is there to ensure computation occurs after old values
+?X: from config.sh have been loaded, so that we can supersede them.
+?X:
+?MAKE:cf_time cf_by: date Oldconfig
+?MAKE: -pick add $@ %<
+?S:cf_time:
+?S: Holds the output of the "date" command when the configuration file was
+?S: produced. This is used to tag both config.sh and config_h.SH.
+?S:.
+?S:cf_by:
+?S: Login name of the person who ran the Configure script and answered the
+?S: questions. This is used to tag both config.sh and config_h.SH.
+?S:.
+?LINT:change LC_ALL LANGUAGE
+: who configured the system
+?X: Ensure English date -- Jarkko Hietaniemi
+cf_time=`LC_ALL=C; LANGUAGE=C; export LC_ALL; export LANGUAGE; $date 2>&1`
+?X:
+?X: Leave a white space between first two '(' for ksh. The sub-shell is needed
+?X: on some machines to avoid the error message when logname is not found; e.g.
+?X: on SUN-OS 3.2, (logname || whoami) would not execute whoami if logname was
+?X: not found. Sigh!
+?X:
+?X: Convex had a broken logname executable which returned a non-zero status,
+?X: and that broke the previous:
+?X: cf_by=`( (logname) 2>/dev/null || whoami) 2>&1`
+?X: Switch to emergency mode... -- RAM, 19/04/94
+?X:
+?X: Parentheses needed to avoid error message if the program does not exist.
+?X: Uses case instead of $test so it can be put before $test is defined.
+?X: Don't redirect to a file because on Ultrix (under script?) logname
+?X: outputs a blank line first. This method will apparently work.
+case "$cf_by" in
+"")
+ cf_by=`(logname) 2>/dev/null`
+ case "$cf_by" in
+ "")
+ cf_by=`(whoami) 2>/dev/null`
+ case "$cf_by" in
+ "") cf_by=unknown ;;
+ esac ;;
+ esac ;;
+esac
+
diff --git a/mcon/U/charorder.U b/mcon/U/charorder.U
new file mode 100644
index 0000000..5c445de
--- /dev/null
+++ b/mcon/U/charorder.U
@@ -0,0 +1,143 @@
+?RCS: $Id$
+?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: charorder.U,v $
+?RCS: Revision 3.0.1.1 1994/10/29 16:07:08 ram
+?RCS: patch36: added ?F: line for metalint file checking
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:05:33 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:chorder_int chorder_short chorder_long: Myread cat +cc +ccflags rm
+?MAKE: -pick add $@ %<
+?S:chorder_short (d_cos d_bos):
+?S: Holds the value describing the byte ordering of characters in a short.
+?S: On a Big-Endian machine, that would be "c0c1".
+?S:.
+?S:chorder_int (charoder):
+?S: Holds the value describing the byte ordering of characters in an int.
+?S: For instance, on a Big-Endian machine, this would be: "c0c1c2c3".
+?S:.
+?S:chorder_long (d_col d_bol):
+?S: Holds the value describing the byte ordering of characters in a long.
+?S: On a 64 bits Big-Endian machine, that would yield: "c0c1c2c3c4c5c6c7".
+?S:.
+?C:CHAR_ORDER_SHORT:
+?C: Holds the byte ordering of characters in a short. It's a string
+?C: value like "c0c1" on a Big-Endian machine.
+?C:.
+?C:CHAR_ORDER_INT:
+?C: Holds the byte ordering of characters in an int. It's a string
+?C: value like "c0c1c2c3" on a Big-Endian machine.
+?C:.
+?C:CHAR_ORDER_LONG:
+?C: Holds the byte ordering of characters in a long. It's a string
+?C: value like "c0c1c2c3c4c5c6c7" on a 64 bits Big-Endian machine.
+?C:.
+?H:#define CHAR_ORDER_SHORT "$chorder_short" /* byte order in a short */
+?H:#define CHAR_ORDER_INT "$chorder_int" /* byte order in an int */
+?H:#define CHAR_ORDER_LONG "$chorder_long" /* byte order in a long */
+?H:.
+?F:!byteorder
+: check for character ordering
+echo " "
+echo "Checking out byte order..." >&4
+$cat >byteorder.c <<'EOCP'
+#include <stdio.h>
+
+main(argc, argv)
+ int argc;
+ char *argv[]; {
+ int i;
+ int max;
+ union {
+ short u_s;
+ int u_i;
+ long u_l;
+ char u_c[sizeof(long)];
+ } u;
+ switch (argv[1][0]) {
+ case 'l':
+ u.u_l = 0L;
+ /* HMS: ASSERT: sizeof(long) < 10. */
+ for(i = 0; i < sizeof(long); ++i) {
+ u.u_l *= 0x100L;
+ u.u_l += (0xc0 + i);
+ }
+ max = sizeof(long);
+ break;
+ case 's':
+ u.u_s = 0;
+ /* HMS: ASSERT: sizeof(short) < 10. */
+ for(i = 0; i < sizeof(short); ++i) {
+ u.u_s *= 0x100L;
+ u.u_s += (0xc0 + i);
+ }
+ max = sizeof(short);
+ break;
+ case 'i':
+ u.u_i = 0;
+ /* RAM: ASSERT: sizeof(int) < 10. */
+ for(i = 0; i < sizeof(int); ++i) {
+ u.u_l *= 0x100L;
+ u.u_l += (0xc0 + i);
+ }
+ max = sizeof(int);
+ break;
+ default:
+ max = 0;
+ break;
+ }
+ for(i = 0; i < max; i++) {
+ printf("%x", u.u_c[i] & 0x00FF);
+ }
+ printf("\n");
+ exit(0);
+}
+EOCP
+if $cc $ccflags -o byteorder byteorder.c >/dev/null 2>&1 ; then
+ : null statement
+@if chorder_short
+ chorder_short=`./byteorder s`
+@end
+@if chorder_int
+ chorder_int=`./byteorder i`
+@end
+@if chorder_long
+ chorder_long=`./byteorder l`
+@end
+else
+ $cat <<EOM
+(I can't seem to get my test program to work. Guessing 32 bits big-endian.)
+EOM
+ chorder_short="c0c1"
+ chorder_int="c0c1c2c3"
+ chorder_long="c0c1c2c3"
+fi
+@if chorder_short
+dflt=$chorder_short
+rp='What is the order of characters in a short?'
+. ./myread
+chorder_short="$ans"
+@end
+@if chorder_int
+dflt=$chorder_int
+rp='What is the order of characters in an int?'
+. ./myread
+chorder_int="$ans"
+@end
+@if chorder_long
+dflt=$chorder_long
+rp='What is the order of characters in a long?'
+. ./myread
+chorder_long="$ans"
+@end
+$rm -f byteorder* core
+
diff --git a/mcon/U/charsize.U b/mcon/U/charsize.U
new file mode 100644
index 0000000..ae3cd8b
--- /dev/null
+++ b/mcon/U/charsize.U
@@ -0,0 +1,64 @@
+?RCS: $Id$
+?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: charsize.U,v $
+?RCS: Revision 3.0.1.1 1994/10/29 16:07:13 ram
+?RCS: patch36: added ?F: line for metalint file checking
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:05:34 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:charsize: Assert Myread cat rm_try +cc +ccflags echo n c
+?MAKE: -pick add $@ %<
+?S:charsize:
+?S: This variable contains the value of the CHARSIZE symbol, which
+?S: indicates to the C program how many bytes there are in a character.
+?S:.
+?C:CHARSIZE:
+?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:.
+?T:size s
+: check for length of character
+echo " "
+$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()
+{
+ STATIC_ASSERT($size == sizeof(foo));
+ return 0;
+}
+EOCP
+ 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"
+ ;;
+*)
+ case "$size" in
+ 1) s='';;
+ *) s='s';;
+ esac
+ echo " $size byte$s." >&4
+ charsize=$size
+ ;;
+esac
+$rm_try
+
diff --git a/mcon/U/contains.U b/mcon/U/contains.U
new file mode 100644
index 0000000..0ac11f5
--- /dev/null
+++ b/mcon/U/contains.U
@@ -0,0 +1,43 @@
+?RCS: $Id$
+?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: contains.U,v $
+?RCS: Revision 3.0 1993/08/18 12:05:35 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:contains: Nothing
+?MAKE: -pick add $@ %<
+?S:contains:
+?S: This variable holds the command to do a grep with a proper return
+?S: status. On most sane systems it is simply "grep". On insane systems
+?S: it is a grep followed by a cat followed by a test. This variable
+?S: is primarily for the use of other Configure units.
+?S:.
+: Some greps do not return status, grrr.
+echo "grimblepritz" >grimble
+if grep blurfldyick grimble >/dev/null 2>&1 ; then
+ contains=contains
+elif grep grimblepritz grimble >/dev/null 2>&1 ; then
+ contains=grep
+else
+ contains=contains
+fi
+rm -f grimble
+: the following should work in any shell
+case "$contains" in
+contains*)
+ echo " "
+ echo "AGH! Grep doesn't return a status. Attempting remedial action."
+ cat >contains <<'EOSS'
+grep "$1" "$2" >.greptmp && cat .greptmp && test -s .greptmp
+EOSS
+chmod +x contains
+esac
+
diff --git a/mcon/U/cpp_stuff.U b/mcon/U/cpp_stuff.U
new file mode 100644
index 0000000..3a0715b
--- /dev/null
+++ b/mcon/U/cpp_stuff.U
@@ -0,0 +1,157 @@
+?RCS: $Id$
+?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: cpp_stuff.U,v $
+?RCS: Revision 3.0.1.2 1997/02/28 15:30:48 ram
+?RCS: patch61: added cute quoting trick for wild stringify support
+?RCS:
+?RCS: Revision 3.0.1.1 1994/10/29 16:08:24 ram
+?RCS: patch36: now uses cppstdin instead of plain cpp for consistency (ADO)
+?RCS: patch36: remove temporary files when done
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:05:36 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:cpp_stuff cpp_quote: cat contains cppstdin cppflags cppminus rm Warn \
+ package
+?MAKE: -pick add $@ %<
+?S:cpp_stuff:
+?S: This variable contains an identification of the catenation mechanism
+?S: used by the C preprocessor.
+?S:.
+?S:cpp_quote:
+?S: This variable is set to either '"' or '' depending on whether the
+?S: pre-processor pre-dates ANSI or not. It is used in the production of
+?S: the SQuoTe() and EQuoTe() macros, and was introduced to overcome a bug
+?S: in gcc 3.x whereby the pre-processor complained loudly about the
+?S: unterminated strings.
+?S:.
+?C:CAT2:
+?C: This macro catenates 2 tokens together.
+?C:.
+?C:CAT3:
+?C: This macro catenates 3 tokens together.
+?C:.
+?C:CAT4:
+?C: This macro catenates 4 tokens together.
+?C:.
+?C:CAT5:
+?C: This macro catenates 5 tokens together.
+?C:.
+?C:STRINGIFY:
+?C: This macro surrounds its token with double quotes.
+?C:.
+?C:SCAT2:
+?C: This macro catenates 2 tokens together and stringifies the result.
+?C:.
+?C:SCAT3:
+?C: This macro catenates 3 tokens together and stringifies the result.
+?C:.
+?C:SCAT4:
+?C: This macro catenates 4 tokens together and stringifies the result.
+?C:.
+?C:SCAT5:
+?C: This macro catenates 5 tokens together and stringifies the result.
+?C:.
+?H:?%<:#if $cpp_stuff == 1
+?H:?CAT2:#define CAT2(a,b)a/**/b
+?H:?CAT3:#define CAT3(a,b,c)a/**/b/**/c
+?H:?CAT4:#define CAT4(a,b,c,d)a/**/b/**/c/**/d
+?H:?CAT5:#define CAT5(a,b,c,d,e)a/**/b/**/c/**/d/**/e
+?H:?STRINGIFY:#define STRINGIFY(a)"a"
+?H:?%<:#define SQuoTe(a)${cpp_quote}a
+?H:?%<:#define EQuoTe(a)a${cpp_quote}
+?H:?SCAT2:#define SCAT2(a,b)EQuoTe(SQuoTe(a)b)
+?H:?SCAT3:#define SCAT3(a,b,c)EQuoTe(SQuoTe(a)b/**/c)
+?H:?SCAT4:#define SCAT4(a,b,c,d)EQuoTe(SQuoTe(a)b/**/c/**/d)
+?H:?SCAT5:#define SCAT5(a,b,c,d,e)EQuoTe(SQuoTe(a)b/**/c/**/d/**/e)
+?H:?%<:#endif
+?H:?%<:#if $cpp_stuff == 42
+?X: The additional level of indirection enables these macros to be
+?X: used as arguments to other macros. See K&R 2nd ed., page 231.
+?H:?%<:#define CaTiFy(a,b) a ## b
+?H:?%<:#define CAT2(a,b) CaTiFy(a,b)
+?H:?CAT3:#define CAT3(a,b,c) CAT2(CaTiFy(a,b),c)
+?H:?CAT4:#define CAT4(a,b,c,d) CAT2(CaTiFy(a,b), CaTiFy(c,d))
+?H:?CAT5:#define CAT5(a,b,c,d,e) CAT2(CAT2(CaTiFy(a,b), CaTiFy(c,d)), e)
+?H:?%<:#define StGiFy(a)# a
+?H:?STRINGIFY:#define STRINGIFY(a)StGiFy(a)
+?H:?SCAT2:#define SCAT2(a,b)StGiFy(a) StGiFy(b)
+?H:?SCAT3:#define SCAT3(a,b,c)StGiFy(a) StGiFy(b) StGiFy(c)
+?H:?SCAT4:#define SCAT4(a,b,c,d)StGiFy(a) StGiFy(b) StGiFy(c) StGiFy(d)
+?H:?SCAT5:#define SCAT5(a,b,c,d,e)StGiFy(a) StGiFy(b) StGiFy(c) StGiFy(d) StGiFy(e)
+?H:?%<:#endif
+?H:?%<:#if $cpp_stuff != 1 && $cpp_stuff != 42
+?H:?%<:#include "Bletch: How does this C preprocessor catenate tokens?"
+?H:?%<:#endif
+?H:.
+?W:%<:CAT2 CAT3 CAT4 CAT5 STRINGIFY SCAT2 SCAT3 SCAT4 SCAT5
+?F:!cpp_stuff.c
+?LINT:known StGiFy EQuoTe SQuoTe CaTiFy
+: how do we catenate cpp tokens here?
+echo " "
+echo "Checking to see how your cpp does stuff like catenate tokens..." >&4
+cpp_quote=''
+$cat >cpp_stuff.c <<'EOCP'
+#define RCAT(a,b)a/**/b
+#define ACAT(a,b)a ## b
+RCAT(Rei,ser)
+ACAT(Cir,cus)
+EOCP
+$cppstdin $cppflags $cppminus <cpp_stuff.c >cpp_stuff.out 2>&1
+if $contains 'Circus' cpp_stuff.out >/dev/null 2>&1; then
+ echo "Oh! Smells like ANSI's been here."
+ echo "We can catify or stringify, separately or together!"
+ cpp_stuff=42
+elif $contains 'Reiser' cpp_stuff.out >/dev/null 2>&1; then
+ echo "Ah, yes! The good old days!"
+ cpp_stuff=1
+ $cat >cpp_stuff.c <<'EOCP'
+#define SQuoTe(a)"a
+#define EQuoTe(a)a"
+#define CAT2(a,b)EQuoTe(SQuoTe(a)b)
+CAT2(Vic,tory)
+EOCP
+ $cppstdin $cppflags $cppminus <cpp_stuff.c >cpp_stuff.out 2>&1
+ if $contains '"Victory"' cpp_stuff.out >/dev/null 2>&1; then
+ echo "I'll resort to a cute trick to also be able to stringify."
+ cpp_quote='"'
+ else
+ $cat <<EOM
+However, in the good old days we don't know how to stringify and
+catify at the same time...
+@if SCAT2 || SCAT3 || SCAT4 || SCAT5
+You might have to edit the values of the SCAT[2-5] macros in config.h...
+@else
+Hopefully, $package does not need this feature.
+@end
+EOM
+ fi
+else
+ ./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
+macros in config.h:
+
+@if CAT2 || CAT3 || CAT4 || CAT5
+ CAT[2-5]
+@end
+@if SCAT2 || SCAT3 || SCAT4 || SCAT5
+ SCAT[2-5]
+@end
+
+in order to let me compile.
+@end
+EOM
+ cpp_stuff="/* Help! How do we handle cpp_stuff? */*/"
+fi
+$rm -f cpp_stuff.*
+
diff --git a/mcon/U/cpp_trad.U b/mcon/U/cpp_trad.U
new file mode 100644
index 0000000..3f86047
--- /dev/null
+++ b/mcon/U/cpp_trad.U
@@ -0,0 +1,41 @@
+?RCS: $Id$
+?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: cpp_stuff.U,v $
+?MAKE:cpp_trad: cpp cat contains rm
+?MAKE: -pick add $@ %<
+?S:cpp_trad:
+?S: This variable contains the program to run to get traditional C
+?S: preprocessor semantics and not ISO C semantics: we want something
+?S: that knows as little about C as possible to use as a more general
+?S: purpose preprocessor.
+?S:.
+?F:!foo.c !foo.cpp
+: how do we get traditional cpp semantics?
+echo " "
+echo "Checking to see how to get traditional cpp semantics..." >&4
+$cat >foo.c <<'EOF'
+#define A(x) x
+#define B(y) y
+A(a)B(b)
+EOF
+if $cpp foo.c >foo.cpp; $contains ab foo.cpp >/dev/null 2>&1; then
+ echo "Plain '$cpp' works just fine."
+ cpp_trad="$cpp"
+elif $cpp -traditional foo.c >foo.cpp; \
+ $contains ab foo.cpp >/dev/null 2>&1; then
+ echo "We'll use '$cpp -traditional' to get proper semantics."
+ cpp_trad="$cpp -traditional"
+else
+ echo "I don't know how to get traditional semantics with '$cpp'." >&4
+ cpp_trad="$cpp"
+fi
+$rm -f foo.c foo.cpp
+
diff --git a/mcon/U/cppfilecom.U b/mcon/U/cppfilecom.U
new file mode 100644
index 0000000..3216080
--- /dev/null
+++ b/mcon/U/cppfilecom.U
@@ -0,0 +1,204 @@
+?RCS: $Id$
+?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: Orginal Author: Graham Stoney <greyham@research.canon.oz.au>
+?RCS:
+?RCS: $Log: cppfilecom.U,v $
+?RCS: Revision 3.0 1993/08/18 12:05:37 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:cppfilecom cppstdinflags d_cppignhdrs d_cppcanstdin: \
+ contains package test Myread Oldconfig Loc Setvar cpp cc cat rm
+?MAKE: -pick add $@ %<
+?S:cppfilecom:
+?S: This variable contains the first part of the string which will invoke
+?S: the C preprocessor a file and produce to standard output, preserving
+?S: comments. Typical value of "cc -E -C" or "/lib/cpp -C".
+?S:.
+?S:cppstdinflags:
+?S: This variable contains any flags necessary to get cppfilecom to read
+?S: from the standard input.
+?S:.
+?S:d_cppignhdrs:
+?S: This symbol conditionally defines CPP_IGN_HDRS if CPP_FILE_COM ignores
+?S: *.h files.
+?S:.
+?S:d_cppcanstdin:
+?S: This symbol conditionally defines CPP_CAN_STDIN if CPP_FILE_COM can
+?S: read standard input directly.
+?S:.
+?C:CPP_FILE_COM (CPPFILECOM):
+?C: This symbol contains the first part of the string which will invoke
+?C: the C preprocessor a file and produce to standard output, preserving
+?C: comments. Typical value of "cc -E -C" or "/lib/cpp -C".
+?C:.
+?C:CPP_STDIN_FLAGS (CPPSTDINFLAGS):
+?C: This variable contains any flags necessary to get CPP_FILE_COM to
+?C: read from the standard input.
+?C:.
+?C:CPP_IGN_HDRS (CPPIGNHDRS):
+?C: This symbol is defined if CPP_FILE_COM ignores *.h files.
+?C:.
+?C:CPP_CAN_STDIN (CPPCANSTDIN):
+?C: This symbol is defined if CPP_FILE_COM can read standard input
+?C: directly.
+?C:.
+?H:#define CPP_FILE_COM "$cppfilecom"
+?H:#define CPP_STDIN_FLAGS "$cppstdinflags"
+?H:#$d_cppignhdrs CPP_IGN_HDRS /* does CPP ignore .h files? */
+?H:#$d_cppcanstdin CPP_CAN_STDIN /* can CPP read stdin directly? */
+?H:.
+?T:cont
+?F:!testcpp.c !testcpp.h !testcpp.out
+?LINT:set d_cppcanstdin d_cppignhdrs
+?LINT:usefile testcpp.c testcpp.out
+: see how we invoke the C preprocessor
+$cat <<EOM
+
+$package needs to be able to preprocess its input files in a mode which
+preserves comments, which is often not the default behaviour. It should run
+the C preprocessor you will use when compiling your own source code, which
+should be ISO/ANSI C compliant if you want $package to handle the latest
+standard C. I will try to guess, but I might guess wrongly because it is not
+necessarily the same preprocessor used to build $package.
+
+EOM
+$cat <<'EOT' >testcpp.c
+#define ABC abc
+#define XYZ xyz
+ABC.XYZ
+/* comment */
+EOT
+:
+if $test "X$cppfilecom" != "X" && \
+ $cppfilecom testcpp.c </dev/null >testcpp.out 2>/dev/null && \
+ $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 && \
+ $contains comment testcpp.out >/dev/null 2>&1
+then
+ echo "You used to use $cppfilecom so we'll use that again."
+elif echo 'Maybe "'$cc' -E -C" will work...' && \
+ $cc -E -C testcpp.c </dev/null >testcpp.out 2>/dev/null && \
+ $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 && \
+ $contains comment testcpp.out >/dev/null 2>&1
+then
+ echo "It works!"
+ cppfilecom="$cc -E -C"
+elif echo 'Nope...maybe "'"$cc"' -P -C" will work...' && \
+ $cc -P -C testcpp.c </dev/null >testcpp.out 2>/dev/null && \
+ $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 && \
+ $contains comment testcpp.out >/dev/null 2>&1
+then
+ echo "Yup, that does."
+ cppfilecom="$cc -P -C"
+elif echo 'No such luck, maybe "'"$cpp"' -C" will work...' && \
+ $cpp -C testcpp.c </dev/null >testcpp.out 2>/dev/null && \
+ $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 && \
+ $contains comment testcpp.out >/dev/null 2>&1
+then
+ echo "Yup, it does."
+ cppfilecom="$cpp -C"
+else
+ cppfilecom=''
+ $cat <<'EOM'
+I can't find a C preprocessor that will preserve comments. Please name one.
+EOM
+fi
+:
+dflt="$cppfilecom"
+cont=true
+while $test "$cont" ; do
+ echo " "
+ rp="How should $package run your preprocessor preserving comments?"
+ . ./myread
+ cppfilecom="$ans"
+ $cppfilecom testcpp.c >testcpp.out 2>&1
+ if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 && \
+ $contains comment testcpp.out >/dev/null 2>&1
+ then
+ echo "OK, that will do."
+ cont=''
+ else
+ echo "Sorry, I can't get that to work."
+ fi
+done
+
+@if CPP_IGN_HDRS || d_cppignhdrs
+: Now see if it ignores header files.
+cp testcpp.c testcpp.h
+$cppfilecom testcpp.h >testcpp.out 2>&1
+if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 && \
+ $contains comment testcpp.out >/dev/null 2>&1
+then
+ echo "Terrific; it processes .h files passed on the command line too."
+ val="$undef"
+else
+ echo "It ignores .h files on the command line; pity."
+ val="$define"
+fi
+set d_cppignhdrs
+eval $setvar
+
+@end
+@if CPP_STDIN_FLAGS || CPP_CAN_STDIN || cppstdinflags || d_cppcanstdin
+: Now see how to send stdin to it.
+echo " "
+cp testcpp.c testcpp.h
+$cppfilecom <testcpp.h >testcpp.out 2>&1
+if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 && \
+ $contains comment testcpp.out >/dev/null 2>&1
+then
+ echo "Great; and it will read stdin if passed no arguments."
+ val="$define"
+ cppstdinflags=''
+else
+ $cppfilecom - <testcpp.h >testcpp.out 2>&1
+ if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 && \
+ $contains comment testcpp.out >/dev/null 2>&1
+ then
+ echo "Great; and it can read stdin by passing it '-'."
+ val="$define"
+ cppstdinflags='-'
+ else
+ $cat <<FOO
+Unfortunately, I can't find an easy way to get that preprocessor to read from
+standard input. Do you know any flags I can pass it to get it to do so?
+If that preprocessor can't read directly form standard input, answer 'none'.
+
+FOO
+ val='dunno'
+ while $test "$val" = "dunno"; do
+ rp='Flags to get preprocessor to read stdin?'
+ dflt='none'
+ . ./myread
+ if $test $ans = 'none'; then
+ echo "Oh well, if $package wants it done, it will do it for itself."
+ val="$undef"
+ else
+ $cppfilecom $ans <testcpp.h >testcpp.out 2>&1
+ if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 && \
+ $contains comment testcpp.out >/dev/null 2>&1
+ then
+ echo "Good; that works fine."
+ val="$define"
+ cppstdinflags="$ans"
+ else
+ echo "Sorry, I couldn't get that to work."
+ fi
+ fi
+ done
+ fi
+fi
+set d_cppcanstdin
+eval $setvar
+
+@end
+: cleanup cpp test files anyway
+$rm -f testcpp.*
+
diff --git a/mcon/U/cppstdin.U b/mcon/U/cppstdin.U
new file mode 100644
index 0000000..822493d
--- /dev/null
+++ b/mcon/U/cppstdin.U
@@ -0,0 +1,249 @@
+?RCS: $Id$
+?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: cppstdin.U,v $
+?RCS: Revision 3.0.1.4 1994/10/29 16:08:34 ram
+?RCS: patch36: added ?F: line for metalint file checking
+?RCS:
+?RCS: Revision 3.0.1.3 1994/01/24 14:05:38 ram
+?RCS: patch16: comment for CPPLAST was missing
+?RCS:
+?RCS: Revision 3.0.1.2 1993/12/15 08:18:58 ram
+?RCS: patch15: new variables cpprun and cpplast, guaranteed wrapper-free
+?RCS: patch15: cppstdin now tries to use cc, even at the cost of a wrapper
+?RCS:
+?RCS: Revision 3.0.1.1 1993/08/25 14:00:53 ram
+?RCS: patch6: remove wrapper when not actually used
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:05:38 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:cppstdin cppminus cpprun cpplast: contains test Myread Oldconfig Loc \
+ cpp +cc rm hint osname gccversion startsh eunicefix
+?MAKE: -pick add $@ %<
+?S:cppstdin:
+?S: This variable contains the command which will invoke the C
+?S: preprocessor on standard input and put the output to stdout.
+?S: It is primarily used by other Configure units that ask about
+?S: preprocessor symbols.
+?S:.
+?S:cppminus:
+?S: This variable contains the second part of the string which will invoke
+?S: the C preprocessor on the standard input and produce to standard
+?S: output. This variable will have the value "-" if cppstdin needs
+?S: a minus to specify standard input, otherwise the value is "".
+?S:.
+?S:cpprun:
+?S: This variable contains the command which will invoke a C preprocessor
+?S: on standard input and put the output to stdout. It is guaranteed not
+?S: to be a wrapper and may be a null string if no preprocessor can be
+?S: made directly available. This preprocessor might be different from the
+?S: one used by the C compiler. Don't forget to append cpplast after the
+?S: preprocessor options.
+?S:.
+?S:cpplast:
+?S: This variable has the same functionality as cppminus, only it applies to
+?S: cpprun and not cppstdin.
+?S:.
+?C:CPPSTDIN:
+?C: This symbol contains the first part of the string which will invoke
+?C: the C preprocessor on the standard input and produce to standard
+?C: output. Typical value of "cc -E" or "/lib/cpp", but it can also
+?C: call a wrapper. See CPPRUN.
+?C:.
+?C:CPPMINUS:
+?C: This symbol contains the second part of the string which will invoke
+?C: the C preprocessor on the standard input and produce to standard
+?C: output. This symbol will have the value "-" if CPPSTDIN needs a minus
+?C: to specify standard input, otherwise the value is "".
+?C:.
+?C:CPPRUN:
+?C: This symbol contains the string which will invoke a C preprocessor on
+?C: the standard input and produce to standard output. It needs to end
+?C: with CPPLAST, after all other preprocessor flags have been specified.
+?C: The main difference with CPPSTDIN is that this program will never be a
+?C: pointer to a shell wrapper, i.e. it will be empty if no preprocessor is
+?C: available directly to the user. Note that it may well be different from
+?C: the preprocessor used to compile the C program.
+?C:.
+?C:CPPLAST:
+?C: This symbol is intended to be used along with CPPRUN in the same manner
+?C: symbol CPPMINUS is used with CPPSTDIN. It contains either "-" or "".
+?C:.
+?H:#define CPPSTDIN "$cppstdin"
+?H:#define CPPMINUS "$cppminus"
+?H:#define CPPRUN "$cpprun"
+?H:#define CPPLAST "$cpplast"
+?H:.
+?F:cppstdin !testcpp.out !testcpp.c
+?T:wrapper x_cpp x_minus ok
+: see how we invoke the C preprocessor
+echo " "
+echo "Now, how can we feed standard input to your C preprocessor..." >&4
+cat <<'EOT' >testcpp.c
+#define ABC abc
+#define XYZ xyz
+ABC.XYZ
+EOT
+cd ..
+if $test ! -f cppstdin; then
+ echo "$startsh" >cppstdin
+if $test "X$osname" = "Xaix" -a "X$gccversion" = X; then
+?X: AIX cc -E doesn't show the absolute headerfile
+?X: locations but we'll cheat by using the -M flag.
+ echo 'cat >.$$.c; rm -f .$$.u; '"$cc"' ${1+"$@"} -M -c .$$.c 2>/dev/null; \
+ test -s .$$.u && \
+ awk '"'"'$2 ~ /\.h$/ { print "# 0 \""$2"\"" }'"'"' .$$.u; \
+ rm -f .$$.o .$$.u; '"$cc"' -E ${1+"$@"} .$$.c; rm .$$.c' >> cppstdin
+else
+ echo 'cat >.$$.c; '"$cc"' -E ${1+"$@"} .$$.c; rm .$$.c' >>cppstdin
+fi; else
+ echo "Keeping your $hint cppstdin wrapper."
+fi
+chmod 755 cppstdin
+$eunicefix cppstdin
+wrapper=`pwd`/cppstdin
+ok='false'
+cd UU
+
+?X:
+?X: We'll run the cpp tests again if we don't have any valid C preprocessor
+?X: yet or don't know how to proceed without a wrapper (in which case cpprun
+?X: is empty and that's really annoying...)
+?X:
+if $test "X$cppstdin" != "X" && \
+ $cppstdin $cppminus <testcpp.c >testcpp.out 2>&1 && \
+ $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
+then
+ echo "You used to use $cppstdin $cppminus so we'll use that again."
+ case "$cpprun" in
+ '') echo "But let's see if we can live without a wrapper..." ;;
+ *)
+ if $cpprun $cpplast <testcpp.c >testcpp.out 2>&1 && \
+ $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
+ then
+ echo "(And we'll use $cpprun $cpplast to preprocess directly.)"
+ ok='true'
+ else
+ echo "(However, $cpprun $cpplast does not work, let's see...)"
+ fi
+ ;;
+ esac
+else
+ case "$cppstdin" in
+ '') ;;
+ *)
+ echo "Good old $cppstdin $cppminus does not seem to be of any help..."
+ ;;
+ esac
+fi
+
+if $ok; then
+ : nothing
+elif echo 'Maybe "'"$cc"' -E" will work...'; \
+ $cc -E <testcpp.c >testcpp.out 2>&1; \
+ $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
+ echo "Yup, it does."
+ x_cpp="$cc -E"
+ x_minus='';
+elif echo 'Nope...maybe "'"$cc"' -E -" will work...'; \
+ $cc -E - <testcpp.c >testcpp.out 2>&1; \
+ $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
+ echo "Yup, it does."
+ x_cpp="$cc -E"
+ x_minus='-';
+elif echo 'Nope...maybe "'"$cc"' -P" will work...'; \
+ $cc -P <testcpp.c >testcpp.out 2>&1; \
+ $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
+ echo "Yipee, that works!"
+ x_cpp="$cc -P"
+ x_minus='';
+elif echo 'Nope...maybe "'"$cc"' -P -" will work...'; \
+ $cc -P - <testcpp.c >testcpp.out 2>&1; \
+ $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
+ echo "At long last!"
+ x_cpp="$cc -P"
+ x_minus='-';
+elif echo 'No such luck, maybe "'$cpp'" will work...'; \
+ $cpp <testcpp.c >testcpp.out 2>&1; \
+ $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
+ echo "It works!"
+ x_cpp="$cpp"
+ x_minus='';
+elif echo 'Nixed again...maybe "'$cpp' -" will work...'; \
+ $cpp - <testcpp.c >testcpp.out 2>&1; \
+ $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
+ echo "Hooray, it works! I was beginning to wonder."
+ x_cpp="$cpp"
+ x_minus='-';
+elif echo 'Uh-uh. Time to get fancy. Trying a wrapper...'; \
+ $wrapper <testcpp.c >testcpp.out 2>&1; \
+ $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
+ x_cpp="$wrapper"
+ x_minus=''
+ echo "Eureka!"
+else
+ dflt=''
+ rp="No dice. I can't find a C preprocessor. Name one:"
+ . ./myread
+ x_cpp="$ans"
+ x_minus=''
+ $x_cpp <testcpp.c >testcpp.out 2>&1
+ if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
+ echo "OK, that will do." >&4
+ else
+echo "Sorry, I can't get that to work. Go find one and rerun Configure." >&4
+ exit 1
+ fi
+fi
+
+case "$ok" in
+false)
+ cppstdin="$x_cpp"
+ cppminus="$x_minus"
+ cpprun="$x_cpp"
+ cpplast="$x_minus"
+?X:
+?X: If /lib/cpp is used, try using a wrapper to increase our chances to have
+?X: the C compiler and our $cppstdin agree on the same symbols... However,
+?X: since cpprun is guaranteed not to be a wrapper, we must clear it if the
+?X: only preprocessor we found was a wrapper, with all our luck...
+?X:
+ set X $x_cpp
+ shift
+ case "$1" in
+ "$cpp")
+ echo "Perhaps can we force $cc -E using a wrapper..."
+ if $wrapper <testcpp.c >testcpp.out 2>&1; \
+ $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
+ then
+ echo "Yup, we can."
+ cppstdin="$wrapper"
+ cppminus='';
+ else
+ echo "Nope, we'll have to live without it..."
+ fi
+ ;;
+ esac
+ case "$cpprun" in
+ "$wrapper")
+ cpprun=''
+ cpplast=''
+ ;;
+ esac
+ ;;
+esac
+
+case "$cppstdin" in
+"$wrapper"|'cppstdin') ;;
+*) $rm -f $wrapper;;
+esac
+$rm -f testcpp.c testcpp.out
+
diff --git a/mcon/U/d_NOFILE.U b/mcon/U/d_NOFILE.U
new file mode 100644
index 0000000..d602b51
--- /dev/null
+++ b/mcon/U/d_NOFILE.U
@@ -0,0 +1,189 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_NOFILE.U,v $
+?RCS: Revision 3.0.1.1 1994/10/29 16:08:38 ram
+?RCS: patch36: added ?F: line for metalint file checking
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:05:39 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:nofile d_gettblsz tablesize: Myread Guess cat +cc +ccflags +libs \
+ test rm Csym
+?MAKE: -pick add $@ %<
+?S:nofile:
+?S: This variable contains the number of file descriptors available to the
+?S: process.
+?S:.
+?S:d_gettblsz:
+?S: This variable conditionally handles remapping of the getdtablesize()
+?S: subroutine to ulimit(4,0), or the NOFILE manifest constant.
+?S:.
+?S:tablesize:
+?S: This variable contains either the 'NOFILE' constant or 'ulimit(4, 0L)'
+?S: and is used as the remapped value for the getdtablesize() macro.
+?S:.
+?C:getdtablesize:
+?C: This catches use of the getdtablesize() subroutine, and remaps it
+?C: to either ulimit(4,0) or NOFILE, if getdtablesize() isn't available.
+?C:.
+?C:VAL_NOFILE:
+?C: This symbol contains the number of file descriptors available to the
+?C: process, as determined at configuration time. Unless a static constant
+?C: is needed, you should rely on getdtablesize() to obtain that number.
+?C:.
+?H:#$d_gettblsz getdtablesize() $tablesize /**/
+?H:#define VAL_NOFILE $nofile /* Number of file descriptors */
+?H:.
+?F:!nofile
+?T:d_ulimit4 val
+: see if getdtablesize exists
+echo " "
+?X: Revert logical value (d_gettblsz is undef iff getdtablesize is present)
+case "$d_gettblsz" in
+$define) d_gettblsz="$undef";;
+$undef) d_gettblsz="$define";;
+esac
+if set getdtablesize val -f d_gettblsz; eval $csym; $val; then
+ echo 'getdtablesize() found.' >&4
+ d_gettblsz="$undef"
+ tablesize=''
+@if VAL_NOFILE || nofile
+ $cat >nofile.c <<'EOCP'
+#include <stdio.h>
+int main()
+{
+ printf("%d\n", getdtablesize());
+}
+EOCP
+ nofile=''
+ if $cc $ccflags -o nofile nofile.c $libs >/dev/null 2>&1; then
+ nofile=`./nofile 2>/dev/null`
+ fi
+ if $test "$nofile"; then
+ echo "(You have $nofile file descriptors available per process.)"
+ else
+ nofile='20'
+ if ./bsd; then
+ nofile='64'
+ fi
+ echo "(Hmm... Let's say you have $nofile file descriptors available.)"
+ fi
+@end
+else
+ echo 'getdtablesize() NOT found...' >&4
+ if set ulimit val -f; eval $csym; $val; then
+ echo 'Maybe ulimit(4,0) will work...'
+ $cat >nofile.c <<'EOCP'
+#include <stdio.h>
+#ifdef GETPARAM_H
+#include <sys/param.h>
+#endif
+int main()
+{
+ printf("%d %d\n",
+#ifdef NOFILE
+ NOFILE,
+#else
+ 0,
+#endif
+ ulimit(4,0));
+ exit(0);
+}
+EOCP
+ if $cc $ccflags -DGETPARAM_H -o nofile nofile.c $libs >/dev/null 2>&1 \
+ || $cc $ccflags -o nofile nofile.c $libs >/dev/null 2>&1 ; then
+ set `./nofile`
+ d_gettblsz=$1
+ d_ulimit4=$2
+ if $test "$d_ulimit4" -lt 0; then
+ echo "Your ulimit() call doesn't tell me what I want to know."
+ echo "We'll just use NOFILE in this case."
+ nofile=$d_gettblsz
+ d_gettblsz="$define"
+ tablesize='NOFILE'
+ else
+ if $test "$d_gettblsz" -gt 0; then
+ echo "Your system defines NOFILE to be $d_gettblsz, and" >&4
+ else
+ echo "I had trouble getting NOFILE from your system, but" >&4
+ fi
+echo "ulimit returns $d_ulimit4 as the number of available file descriptors." >&4
+ dflt='y';
+ echo " "
+ rp='Should I use ulimit to get the number of available file descriptors?'
+ . ./myread
+ case "$ans" in
+ y*)
+ nofile=$d_ulimit4
+ d_gettblsz="$define"
+ tablesize='ulimit(4, 0L)'
+ echo "Using ulimit(4,0)."
+ ;;
+ *)
+ nofile=$d_gettblsz
+ d_gettblsz="$define"
+ tablesize='NOFILE'
+ echo "Using NOFILE."
+ ;;
+ esac
+ fi
+ else
+ echo "Strange, I couldn't get my test program to compile."
+ echo "We'll just use NOFILE in this case."
+ d_gettblsz="$define"
+ tablesize='NOFILE'
+ nofile=''
+ fi
+ else
+ echo 'Using NOFILE instead.'
+ d_gettblsz="$define"
+ tablesize='NOFILE'
+ nofile=''
+ fi
+fi
+@if VAL_NOFILE || nofile
+case "$nofile" in
+'')
+ $cat >nofile.c <<'EOCP'
+#include <stdio.h>
+#ifdef GETPARAM_H
+#include <sys/param.h>
+#endif
+int main()
+{
+ printf("%d\n",
+#ifdef NOFILE
+ NOFILE,
+#else
+ 0,
+#endif
+ );
+ exit(0);
+}
+EOCP
+ if $cc $ccflags -DGETPARAM_H -o nofile nofile.c $libs >/dev/null 2>&1 \
+ || $cc $ccflags -o nofile nofile.c $libs >/dev/null 2>&1 ; then
+ nofile=`./nofile 2>/dev/null`
+ fi
+ if $test "$nofile"; then
+ echo "(You have $nofile file descriptors available per process.)"
+ else
+ nofile='20'
+ if ./bsd; then
+ nofile='64'
+ fi
+ echo "(Hmm... Let's say you have $nofile file descriptors available.)"
+ fi
+ ;;
+esac
+@end
+$rm -f nofile*
+
diff --git a/mcon/U/d_NeWS.U b/mcon/U/d_NeWS.U
new file mode 100644
index 0000000..d951cdb
--- /dev/null
+++ b/mcon/U/d_NeWS.U
@@ -0,0 +1,102 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_NeWS.U,v $
+?RCS: Revision 3.0 1993/08/18 12:05:39 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_news d_news0 d_newshome d_textcan: test rm Myread Getfile
+?MAKE: -pick add $@ %<
+?S:d_news:
+?S: Set if running NeWS 1.1
+?S:.
+?S:d_news0:
+?S: Set if running NeWS 1.0
+?S:.
+?S:d_newshome:
+?S: Path to the top directory of the NeWS structure.
+?S:.
+?S:d_textcan:
+?S: Path to where the textcan.ps stuff is...
+?S:.
+?C:HAS_NEWS1_1 (NEWS1_1):
+?C: This symbol defined if running NeWS 1.1.
+?C:.
+?C:HAS_NEWS1_0 (NEWS1_0):
+?C: This symbol defined if running NeWS 1.0.
+?C:.
+?C:TEXTCAN:
+?C: Tells path to where the textcan.ps stuff is...
+?C:.
+?H:#$d_news HAS_NEWS1_1 /**/
+?H:#$d_news0 HAS_NEWS1_0 /**/
+?H:#define TEXTCAN $d_textcan /**/
+?H:.
+?INIT:: default path for NeWS
+?INIT:d_newshome="/usr/NeWS"
+?INIT:
+: Check to see what version of NeWS is being run?
+cd ..
+echo " "
+echo "Now for the interesting stuff... Lets see what kind of NeWS"
+echo "they grow round here...."
+echo " "
+dflt='y'
+if $test -d $d_newshome; then
+ d_newshome=`(cd $d_newshome ; /bin/pwd)`
+ echo "Ah...found myself a NeWS in $d_newshome..."
+ dflt='y'
+ rp="Is this the NeWS you want your children to grow up with?"
+ . UU/myread
+fi
+while $test $ans = "n"; do
+dflt=$d_newshome
+fn=d
+rp="Path to NeWS you want:"
+. UU/getfile
+d_newshome=$ans
+done
+
+echo " "
+if $test ! -d $d_newshome/lib; then
+ echo "ARG! No lib directory in $d_newshome!!!"
+ : heavy medicine. I wonder what the disease is...
+ $rm -f kit*isdone
+ $rm -rf UU
+ : bye bye
+ set -t; echo "Sorry... no NeWS is bad news..."
+fi
+
+if $test -r $d_newshome/lib/NeWS/colors.ps ; then
+ echo 'Ahh... your running NeWS 1.1! Boy... that makes stuff easy....'
+ echo " "
+ d_news="$define"
+ d_news0="$undef"
+ if $test -r $d_newshome/lib/NeWS/textcan.ps; then
+ d_textcan=$d_newshome/lib/NeWS
+ echo "The textcan.ps stuff seems to be in : $d_textcan"
+ else
+ d_textcan=$d_newshome/clientsrc/client/nterm
+ if $test ! -r $d_textcan/textcan.ps; then
+ d_news="$undef"
+ d_news0="$define"
+ echo 'Hmm... must have been fooled... gotta be NeWS 1.1 beta!'
+ else
+ echo "The textcan.ps stuff seems to be in : $d_textcan"
+ fi
+ fi
+else
+ echo 'snif... snif... I smell the dilapidated smell of NeWS 1.0..'
+ echo 'Some things will not work under NeWS 1.0...'
+ d_news="$undef"
+ d_news0="$define"
+fi
+cd UU
+
diff --git a/mcon/U/d_PORTAR.U b/mcon/U/d_PORTAR.U
new file mode 100644
index 0000000..01ac6d1
--- /dev/null
+++ b/mcon/U/d_PORTAR.U
@@ -0,0 +1,79 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_PORTAR.U,v $
+?RCS: Revision 3.0.1.1 1994/10/29 16:08:42 ram
+?RCS: patch36: added ?F: line for metalint file checking
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:05:40 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_PORTAR: cat +cc rm Setvar
+?MAKE: -pick add $@ %<
+?S:d_PORTAR:
+?S: This variable conditionally handles definition of PORTAR,
+?S: a creation of greater minds than I can imagine.
+?S:.
+?C:PORTAR:
+?C: This manifest constant must be defined to 1 for some implementations
+?C: of ar.h to get the portable ar most everybody uses.
+?C:.
+?L:ar_fmag:
+?L:ARFMAG:
+?L:SARMAG:
+?H:#$d_PORTAR PORTAR 1 /**/
+?H:.
+?F:!portar
+?LINT:set d_PORTAR
+: see if we need to define PORTAR
+echo " "
+echo 'Checking to see if we need to define PORTAR for portable archives...' >&4
+$cat >portar.c <<'EOCP'
+#include <ar.h>
+int main() {
+ char *arfmag = ARFMAG;
+ int sarmag = SARMAG;
+ struct ar_hdr arh;
+
+ strncpy(arh.ar_fmag, arfmag, 2);
+
+#ifdef PORTAR
+ printf("D\n");
+#else
+ printf("U\n");
+#endif
+ exit(0);}
+EOCP
+if $cc -o portar portar.c >/dev/null 2>&1 || \
+ $cc -DPORTAR=1 -o portar portar.c >/dev/null 2>&1 ; then
+ case "`./portar`" in
+ D)
+ val="$define"
+ echo "We'll be defining PORTAR for you."
+ ;;
+ U)
+ val="$undef"
+ echo "We don't seem to need PORTAR defined here."
+ ;;
+ *)
+ val="$define"
+ echo "(My test program gave me an unexpected value!)"
+ echo "I'll just define PORTAR to be sure."
+ ;;
+ esac
+else
+ echo "(Strange, I couldn't get my test program to compile.)"
+ echo "We'll just define PORTAR in this case."
+ val="$define"
+fi
+set d_PORTAR
+eval $setvar
+$rm -f portar*
+
diff --git a/mcon/U/d_SHM_MAC.U b/mcon/U/d_SHM_MAC.U
new file mode 100644
index 0000000..de4433e
--- /dev/null
+++ b/mcon/U/d_SHM_MAC.U
@@ -0,0 +1,141 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_SHM_MAC.U,v $
+?RCS: Revision 3.0 1993/08/18 12:05:41 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_SHM_MAC d_SHM_PRM d_SHM_SEG d_SHM_IMMU: cat d_shm test rm +cc +ccflags
+?MAKE: -pick add $@ %<
+?S:d_SHM_MAC:
+?S: Sometimes, the SHMLBA manifest needs sys/sysmacros.h, usually for
+?S: the ctob() macro.
+?S:.
+?S:d_SHM_PRM:
+?S: Sometimes, the SHMLBA manifest needs sys/param.h, usually for the
+?S: NBPC constant.
+?S:.
+?S:d_SHM_SEG:
+?S: Sometimes, the SHMLBA manifest needs sys/seg.h, usually for the
+?S: SNUMSHFT constant.
+?S:.
+?S:d_SHM_IMMU:
+?S: Sometimes, the SHMLBA manifest needs sys/immu.h, usually for the
+?S: stob() macro.
+?S:.
+?C:SHMLBA_WANTS_SYSMACROS:
+?C: This value tells us to include <sys/sysmacros.h> because SHMLBA
+?C: needs something from there, probably the ctob() macro.
+?C:.
+?C:SHMLBA_WANTS_PARAM:
+?C: This value tells us to include <sys/param.h> because SHMLBA needs
+?C: something from there, probably the NBPC constant.
+?C:.
+?C:SHMLBA_WANTS_SEG:
+?C: This value tells us to include <sys/seg.h> because SHMLBA needs
+?C: something from there, probably the SNUMSHFT constant.
+?C:.
+?C:SHMLBA_WANTS_IMMU:
+?C: This value tells us to include <sys/immu.h> because SHMLBA needs
+?C: something from there, probably the stob() macro. (tower_600 only?)
+?C:.
+?H:#$d_SHM_MAC SHMLBA_WANTS_SYSMACROS /* SHMLBA wants ctob()? */
+?H:#$d_SHM_PRM SHMLBA_WANTS_PARAM /* SHMLBA wants NBPC? */
+?H:#$d_SHM_SEG SHMLBA_WANTS_SEG /* SHMLBA wants SNUMSHFT? */
+?H:#$d_SHM_IMMU SHMLBA_WANTS_IMMU /* SHMLBA wants stob()? */
+?H:.
+?T:flags D_sys_immu D_sys_seg D_sys_sysmacros D_sys_param
+: check for SHMLBA braindamage
+d_SHM_MAC="$undef"
+d_SHM_PRM="$undef"
+d_SHM_SEG="$undef"
+d_SHM_IMMU="$undef"
+if $test "$d_shm" = "$define" ; then
+ echo " "
+ $cat >&4 <<EOM
+Checking to see if SHMLBA needs additional headers.
+The headers I'll be checking are:
+
+ sys/macros.h (for the ctob() macro)
+ sys/param.h (for NBPC)
+ sys/seg.h (for SNUMSHFT)
+ sys/immu.h (for the stob() macro)
+
+EOM
+ $cat >shm_mac.c <<'EOCP'
+#include <sys/types.h>
+#include <sys/ipc.h>
+#include <sys/shm.h>
+#ifdef I_SYS_IMMU
+#include <sys/immu.h>
+#endif
+#ifdef I_SYS_SYSMACROS
+#include <sys/sysmacros.h>
+#endif
+#ifdef I_SYS_PARAM
+#include <sys/param.h>
+#endif
+#ifdef I_SYS_SEG
+#include <sys/seg.h>
+#endif
+
+int main() {
+ int foo = SHMLBA ;
+ }
+EOCP
+ flags='xxx'
+ for D_sys_immu in '' '-DI_SYS_IMMU'; do
+ for D_sys_seg in '' '-DI_SYS_SEG'; do
+ for D_sys_sysmacros in '' '-DI_SYS_SYSMACROS'; do
+ for D_sys_param in '' '-DI_SYS_PARAM'; do
+ case "$flags" in
+ 'xxx')
+ case "$D_sys_immu$D_sys_param$D_sys_sysmacros$D_sys_seg" in
+ '')
+ echo "Trying it normally..."
+ ;;
+ *)
+ echo "Trying $D_sys_immu $D_sys_param $D_sys_sysmacros $D_sys_seg"
+ ;;
+ esac
+ if $cc $ccflags \
+ $D_sys_immu $D_sys_param $D_sys_sysmacros $D_sys_seg \
+ -o shm_mac shm_mac.c >/dev/null 2>&1 ; then
+ set X $D_sys_immu $D_sys_param $D_sys_sysmacros $D_sys_seg
+ shift
+ flags="$*"
+ echo "Succeeded with $flags"
+ fi
+ ;;
+ esac
+ done
+ done
+ done
+ done
+ case "$flags" in
+ xxx)
+ echo "I don't know how to keep SHMLBA happy. Good luck!"
+ ;;
+ esac
+ case "$flags" in
+ *I_SYS_PARAM*) d_SHM_PRM="$define";;
+ esac
+ case "$flags" in
+ *I_SYS_SYSMACROS*) d_SHM_MAC="$define";;
+ esac
+ case "$flags" in
+ *I_SYS_SEG*) d_SHM_SEG="$define";;
+ esac
+ case "$flags" in
+ *I_SYS_IMMU*) d_SHM_IMMU="$define";;
+ esac
+fi
+$rm -f shm_mac*
+
diff --git a/mcon/U/d_access.U b/mcon/U/d_access.U
new file mode 100644
index 0000000..fff13db
--- /dev/null
+++ b/mcon/U/d_access.U
@@ -0,0 +1,93 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_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 Trylink Findhdr \
+ i_unistd
+?MAKE: -pick add $@ %<
+?S:d_access:
+?S: This variable conditionally defines HAS_ACCESS if the access() system
+?S: call is available to check for access permissions using real IDs.
+?S:.
+?C:HAS_ACCESS:
+?C: This manifest constant lets the C program know that the access()
+?C: system call is available to check for accessibility using real UID/GID.
+?C: (always present on UNIX.)
+?C:.
+?H:#$d_access HAS_ACCESS /**/
+?H:.
+?W:%<:R_OK W_OK X_OK F_OK
+?LINT:set d_access
+?LINT:change h_fcntl h_sysfile
+: access call always available on UNIX
+$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
+"$define")
+ echo " "
+ $cat >access.c <<'EOCP'
+#include <sys/types.h>
+#ifdef I_FCNTL
+#include <fcntl.h>
+#endif
+#ifdef I_SYS_FILE
+#include <sys/file.h>
+#endif
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+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
+ if $test `./findhdr sys/file.h` && \
+ $cc -o access $cppflags -DI_SYS_FILE access.c >/dev/null 2>&1 ; then
+ h_sysfile=true;
+ echo "<sys/file.h> defines the *_OK access constants." >&4
+ elif $test `./findhdr fcntl.h` && \
+ $cc -o access $cppflags -DI_FCNTL access.c >/dev/null 2>&1 ; then
+ h_fcntl=true;
+ echo "<fcntl.h> defines the *_OK access constants." >&4
+@if I_UNISTD
+ elif $test `./findhdr unistd.h` && \
+ $cc -o access $cppflags -DI_UNISTD access.c >/dev/null 2>&1 ; then
+ echo "<unistd.h> defines the *_OK access constants." >&4
+@end
+ else
+ echo "I can't find the four *_OK access constants--I'll use mine." >&4
+ fi
+ ;;
+esac
+$rm -f access*
+
diff --git a/mcon/U/d_alarm.U b/mcon/U/d_alarm.U
new file mode 100644
index 0000000..1452763
--- /dev/null
+++ b/mcon/U/d_alarm.U
@@ -0,0 +1,46 @@
+?RCS: $Id$
+?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: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
+?RCS:
+?RCS: $Log: d_alarm.U,v $
+?RCS: Revision 3.0.1.1 1994/08/29 16:06:58 ram
+?RCS: patch32: created by ADO
+?RCS:
+?MAKE:d_alarm: Trylink cat i_unistd
+?MAKE: -pick add $@ %<
+?S:d_alarm:
+?S: This variable conditionally defines the HAS_ALARM symbol, which
+?S: indicates to the C program that the alarm() routine is available.
+?S:.
+?C:HAS_ALARM :
+?C: This symbol, if defined, indicates that the alarm routine is
+?C: available.
+?C:.
+?H:#$d_alarm HAS_ALARM /**/
+?H:.
+?LINT:set d_alarm
+: see if alarm exists
+$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..0fd3f49
--- /dev/null
+++ b/mcon/U/d_arc4random.U
@@ -0,0 +1,40 @@
+?RCS: $Id$
+?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
new file mode 100644
index 0000000..7c56fa1
--- /dev/null
+++ b/mcon/U/d_attribut.U
@@ -0,0 +1,51 @@
+?RCS: $Id$
+?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: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
+?RCS:
+?RCS: $Log: d_attribut.U,v $
+?RCS: Revision 3.0.1.3 1995/01/30 14:33:45 ram
+?RCS: patch49: test C program now includes <stdio.h> (WED)
+?RCS:
+?RCS: Revision 3.0.1.2 1995/01/11 15:25:47 ram
+?RCS: patch45: fixed typo in the d_attribut variable (ADO)
+?RCS:
+?RCS: Revision 3.0.1.1 1994/10/29 16:08:55 ram
+?RCS: patch36: created by ADO
+?RCS:
+?MAKE:d_attribut: Myread Oldconfig Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_attribut (d_attrib):
+?S: This variable conditionally defines HASATTRIBUTE, which
+?S: indicates the C compiler can check for function attributes,
+?S: such as printf formats.
+?S:.
+?C:HASATTRIBUTE ~ %< (GNUC_ATTRIBUTE_CHECK):
+?C: This symbol indicates the C compiler can check for function attributes,
+?C: such as printf formats. This is normally only supported by GNU cc.
+?C:.
+?H:?%<:#$d_attribut HASATTRIBUTE /**/
+?H:?%<:#ifndef HASATTRIBUTE
+?H:?%<:#define __attribute__(_arg_)
+?H:?%<:#endif
+?H:.
+?W:%<:__attribute__
+?LINT:set d_attribut
+?LINT:known __attribute__
+: Look for GNU-cc style attribute checking
+$cat >try.c <<'EOCP'
+#include <stdio.h>
+void croak (char* pat,...) __attribute__((format(printf,1,2),noreturn));
+int main(void) { return 0; }
+EOCP
+cyn="whether your compiler can handle __attribute__"
+set d_attribut
+eval $trylink
+
diff --git a/mcon/U/d_backtrace.U b/mcon/U/d_backtrace.U
new file mode 100644
index 0000000..7c5f914
--- /dev/null
+++ b/mcon/U/d_backtrace.U
@@ -0,0 +1,45 @@
+?RCS: $Id$
+?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
new file mode 100644
index 0000000..e64052e
--- /dev/null
+++ b/mcon/U/d_bcmp.U
@@ -0,0 +1,54 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_bcmp.U,v $
+?RCS: Revision 3.0.1.2 1993/10/16 13:47:52 ram
+?RCS: patch12: added magic support for bcmp()
+?RCS:
+?RCS: Revision 3.0.1.1 1993/09/13 16:00:44 ram
+?RCS: patch10: now only defines HAS_BCMP, no macro remap on memcmp (WAD)
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:05:42 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_bcmp: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_bcmp:
+?S: This variable conditionally defines the HAS_BCMP symbol if
+?S: the bcmp() routine is available to compare strings.
+?S:.
+?C:HAS_BCMP:
+?C: This symbol is defined if the bcmp() routine is available to
+?C: compare blocks of memory.
+?C:.
+?H:#$d_bcmp HAS_BCMP /**/
+?H:.
+?M:bcmp: HAS_BCMP
+?M:#ifndef HAS_BCMP
+?M:#ifndef bcmp
+?M:#define bcmp(s,d,l) memcmp((s),(d),(l))
+?M:#endif
+?M:#endif
+?M:.
+?LINT:set d_bcmp
+: see if bcmp exists
+$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
new file mode 100644
index 0000000..9e91dd7
--- /dev/null
+++ b/mcon/U/d_bcopy.U
@@ -0,0 +1,68 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_bcopy.U,v $
+?RCS: Revision 3.0.1.2 1993/10/16 13:48:04 ram
+?RCS: patch12: added magic support for bcopy()
+?RCS:
+?RCS: Revision 3.0.1.1 1993/09/13 16:01:11 ram
+?RCS: patch10: now only defines HAS_BCOPY, no macro remap on memcpy (WAD)
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:05:44 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_bcopy: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_bcopy:
+?S: This variable conditionally defines the HAS_BCOPY symbol if
+?S: the bcopy() routine is available to copy strings.
+?S:.
+?C:HAS_BCOPY:
+?C: This symbol is defined if the bcopy() routine is available to
+?C: copy blocks of memory.
+?C:.
+?H:#$d_bcopy HAS_BCOPY /**/
+?H:.
+?M:bcopy: HAS_BCOPY
+?M:#ifndef HAS_BCOPY
+?M:#ifndef bcopy
+?M:#define bcopy(s,d,l) memcpy((d),(s),(l))
+?M:#endif
+?M:#endif
+?M:.
+?LINT:set d_bcopy
+: see if bcopy exists
+?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..d1fa688
--- /dev/null
+++ b/mcon/U/d_bfd_lib.U
@@ -0,0 +1,51 @@
+?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"
+?X: Modern BFD library versions no longer require -lintl and -liberty but do
+?X: require -ldl, on Linux at least. -- RAM, 2014-07-22
+set d_bfd_lib '-lbfd -lintl -liberty' '-lbfd -liberty' '-lbfd -liberty -lz' \
+ '-lbfd -lintl -liberty -lz' '-lbfd -lz' '-lbfd -lintl -lz' \
+ '-lbfd -lz -ldl'
+eval $trylink
+
diff --git a/mcon/U/d_bindtxtcode.U b/mcon/U/d_bindtxtcode.U
new file mode 100644
index 0000000..d2f4d4c
--- /dev/null
+++ b/mcon/U/d_bindtxtcode.U
@@ -0,0 +1,38 @@
+?RCS: $Id$
+?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
new file mode 100644
index 0000000..e82ad4b
--- /dev/null
+++ b/mcon/U/d_brokstat.U
@@ -0,0 +1,75 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_brokstat.U,v $
+?RCS: Revision 3.0.1.1 1997/02/28 15:30:53 ram
+?RCS: patch61: created
+?RCS:
+?MAKE:d_brokstat: cat contains cppstdin cppminus +cppflags rm Setvar
+?MAKE: -pick add $@ %<
+?S:d_brokstat:
+?S: This variable conditionally defines STAT_MACROS_BROKEN if some
+?S: of the S_IS*() macros from <sys/stat.h> give false positive on
+?S: regular files.
+?S:.
+?C:STAT_MACROS_BROKEN:
+?C: This symbol, if defined, indicates that the S_IS*() stat macros
+?C: such as S_ISBLK() give false positive and are thus unusable.
+?C: Your best bet is then to supply your own set.
+?C:.
+?H:#$d_brokstat STAT_MACROS_BROKEN /**/
+?H:.
+?F:!try.c !try
+?LINT:set d_brokstat
+?LINT:usefile try
+?X: This test inspired by autoconf -- RAM, 28/02/97
+: are stat macros sane?
+echo " "
+echo "Checking whether your stat() macros are broken..."
+$cat >try.c <<EOC
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#if defined(S_ISBLK) && defined(S_IFDIR)
+#if S_ISBLK(S_IFDIR)
+Broken
+#endif
+#endif
+
+#if defined(S_ISBLK) && defined(S_IFCHR)
+#if S_ISBLK(S_IFCHR)
+Broken
+#endif
+#endif
+
+#if defined(S_ISLNK) && defined(S_IFREG)
+#if S_ISLNK(S_IFREG)
+Broken.
+#endif
+#endif
+
+#if defined(S_ISSOCK) && defined(S_IFREG)
+#if S_ISSOCK(S_IFREG)
+Broken.
+#endif
+#endif
+EOC
+$cppstdin $cppflags $cppminus <try.c 2>/dev/null >try
+if $contains Broken try >/dev/null 2>&1; then
+ echo "Alas, they are. I'll use my own macro set then." >&4
+ val="$define"
+else
+ echo "Nope, working just fine." >&4
+ val="$undef"
+fi
+$rm -f try try.c
+set d_brokstat
+eval $setvar
+
diff --git a/mcon/U/d_bsdjmp.U b/mcon/U/d_bsdjmp.U
new file mode 100644
index 0000000..86f6920
--- /dev/null
+++ b/mcon/U/d_bsdjmp.U
@@ -0,0 +1,85 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_bsdjmp.U,v $
+?RCS: Revision 3.0.1.2 1997/02/28 15:31:10 ram
+?RCS: patch61: added ?F: metalint hint
+?RCS:
+?RCS: Revision 3.0.1.1 1994/10/29 16:09:09 ram
+?RCS: patch36: call ./usg explicitly instead of relying on PATH
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:05:45 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_bsdjmp: Guess Setvar cat +cc libs rm
+?MAKE: -pick add $@ %<
+?S:d_bsdjmp:
+?S: This variable conditionally defines USE_BSDJMP if BSD _setjmp and
+?S: _longjmp routines are available to do non-local gotos without saving
+?S: or restoring the signal mask flag.
+?S:.
+?C:USE_BSDJMP (BSDJMP):
+?C: This symbol, if defined, indicates that the BSD _setjmp and _longjmp
+?C: routines are available to do non-local gotos wihtout saving or restoring
+?C: the signal mask flag.
+?C:.
+?H:#$d_bsdjmp USE_BSDJMP /**/
+?H:.
+?F:!set
+?LINT:set d_bsdjmp
+: see if _setjmp and _longjmp exists
+echo " "
+case "$d_bsdjmp" in
+'')
+ $cat >set.c <<EOP
+#include <setjmp.h>
+jmp_buf env;
+int set = 1;
+int main()
+{
+ if (_setjmp(env))
+ exit(set);
+ set = 0;
+ _longjmp(env, 1);
+ exit(1);
+}
+EOP
+ if $cc -o set set.c $libs >/dev/null 2>&1; then
+ if ./set >/dev/null 2>&1; then
+ echo "Good! You have BSD _setjmp and _longjmp routines." >&4
+ val="$define"
+ else
+ $cat <<EOM
+Uh-Oh! You have BSD _setjmp and _longjmp, but they do not work properly!!
+EOM
+ val="$undef"
+ fi
+ else
+ if ./usg; then
+ echo "You do not have _setjmp and _longjmp, but that's fine." >&4
+ else
+ cat <<EOM
+It sounds strange for a BSD system to miss _setjmp and _longjmp, but that's ok.
+EOM
+ fi
+ val="$undef"
+ fi
+ ;;
+*) val="$d_bsdjmp"
+ case "$d_bsdjmp" in
+ $define) echo "Good! You have BSD _setjmp and _longjmp routines." >&4;;
+ $undef) echo "You do not have _setjmp and _longjmp, but that's fine." >&4;;
+ esac
+ ;;
+esac
+set d_bsdjmp
+eval $setvar
+$rm -f set.c set
+
diff --git a/mcon/U/d_bsearch.U b/mcon/U/d_bsearch.U
new file mode 100644
index 0000000..a1fbc94
--- /dev/null
+++ b/mcon/U/d_bsearch.U
@@ -0,0 +1,39 @@
+?RCS:
+?RCS: Copyright (c) 2015 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_bsearch: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_bsearch:
+?S: This variable conditionally defines the HAS_BSEARCH symbol, which
+?S: indicates to the C program that it can use the bsearch() routine
+?S: to perform a binary search on a sorted array.
+?S:.
+?C:HAS_BSEARCH:
+?C: This symbol, if defined, indicates that the bsearch() routine
+?C: is available to perform a binary search on a sorted array.
+?C:.
+?H:#$d_bsearch HAS_BSEARCH /**/
+?H:.
+?LINT:set d_bsearch
+: see if there is a bsearch
+$cat >try.c <<EOC
+#include <stdlib.h>
+int mycmp(const void *a, const void *b)
+{
+ return (char *) a - (char *) b;
+}
+int main(int argc, char **argv)
+{
+ return NULL == bsearch("foo", argv, argc, sizeof argv[0], mycmp);
+}
+EOC
+cyn=bsearch
+set d_bsearch
+eval $trylink
+
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..92df13e
--- /dev/null
+++ b/mcon/U/d_built_clz.U
@@ -0,0 +1,37 @@
+?RCS: $Id$
+?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..9f43e50
--- /dev/null
+++ b/mcon/U/d_built_ctz.U
@@ -0,0 +1,37 @@
+?RCS: $Id$
+?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..e0dd670
--- /dev/null
+++ b/mcon/U/d_built_memcmp.U
@@ -0,0 +1,37 @@
+?RCS: $Id$
+?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..c91e9d2
--- /dev/null
+++ b/mcon/U/d_built_popcount.U
@@ -0,0 +1,36 @@
+?RCS: $Id$
+?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
new file mode 100644
index 0000000..91f3963
--- /dev/null
+++ b/mcon/U/d_byacc.U
@@ -0,0 +1,33 @@
+?RCS: $Id$
+?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 License,
+?RCS: as specified in the 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_byacc.U,v $
+?RCS: Revision 3.0.1.1 1997/02/28 15:31:14 ram
+?RCS: patch61: created
+?RCS:
+?MAKE:d_byacc: byacc Setvar
+?MAKE: -pick add $@ %<
+?S:d_byacc:
+?S: This variable indicates whether byacc is available.
+?S: If the user has specified 'portability', then Makefile.SH
+?S: sees $byacc='byacc' whether or not the user actually has
+?S: byacc. This variable allows us to determine in a makefile
+?S: if we really have byacc.
+?S:.
+?LINT:set d_byacc
+: Check if we really have byacc
+case "$byacc" in
+''|'byacc') val="$undef" ;;
+*) val="$define" ;;
+esac
+set d_byacc
+eval $setvar
+
diff --git a/mcon/U/d_bzero.U b/mcon/U/d_bzero.U
new file mode 100644
index 0000000..14f7e4d
--- /dev/null
+++ b/mcon/U/d_bzero.U
@@ -0,0 +1,54 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_bzero.U,v $
+?RCS: Revision 3.0.1.2 1993/10/16 13:48:15 ram
+?RCS: patch12: added magic support for bzero()
+?RCS:
+?RCS: Revision 3.0.1.1 1993/09/13 16:01:33 ram
+?RCS: patch10: now only defines HAS_BZERO, no macro remap on memset (WAD)
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:05:46 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_bzero: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_bzero:
+?S: This variable conditionally defines the HAS_BZERO symbol if
+?S: the bzero() routine is available to set memory to 0.
+?S:.
+?C:HAS_BZERO:
+?C: This symbol is defined if the bzero() routine is available to
+?C: set a memory block to 0.
+?C:.
+?H:#$d_bzero HAS_BZERO /**/
+?H:.
+?M:bzero: HAS_BZERO
+?M:#ifndef HAS_BZERO
+?M:#ifndef bzero
+?M:#define bzero(s,l) memset((s),0,(l))
+?M:#endif
+?M:#endif
+?M:.
+?LINT:set d_bzero
+: see if bzero exists
+$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
new file mode 100644
index 0000000..6363761
--- /dev/null
+++ b/mcon/U/d_casti32.U
@@ -0,0 +1,87 @@
+?RCS: $Id$
+?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: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
+?RCS:
+?RCS: $Log: d_casti32.U,v $
+?RCS: Revision 3.0.1.3 1995/05/12 12:10:45 ram
+?RCS: patch54: made sure cc and ccflags are conditional dependencies
+?RCS:
+?RCS: Revision 3.0.1.2 1994/10/29 16:09:37 ram
+?RCS: patch36: declare signal handler correctly (ADO)
+?RCS:
+?RCS: Revision 3.0.1.1 1994/08/29 16:07:06 ram
+?RCS: patch32: created by ADO
+?RCS:
+?X:
+?X: Can the compiler cast large floats to 32-bit integers?
+?X:
+?MAKE:d_casti32: cat +cc +ccflags rm_try intsize Setvar test signal_t
+?MAKE: -pick add $@ %<
+?S:d_casti32:
+?S: This variable conditionally defines CASTI32, which indicates
+?S: whether the C compiler can cast large floats to 32-bit ints.
+?S:.
+?C:CASTI32:
+?C: This symbol is defined if the C compiler can cast negative
+?C: or large floating point numbers to 32-bit ints.
+?C:.
+?T:xxx yyy
+?H:#$d_casti32 CASTI32 /**/
+?H:.
+?F:!try
+?LINT:set d_casti32
+: check for ability to cast large floats to 32-bit ints.
+echo " "
+echo 'Checking whether your C compiler can cast large floats to int32.' >&4
+if $test "$intsize" -eq 4; then
+ xxx=int
+else
+ xxx=long
+fi
+$cat >try.c <<EOCP
+#include <sys/types.h>
+#include <signal.h>
+$signal_t blech() { exit(3); }
+int main()
+{
+ $xxx i32;
+ double f;
+ int result = 0;
+ signal(SIGFPE, blech);
+
+ f = (double) 0x7fffffff;
+ f = 10 * f;
+ i32 = ($xxx) f;
+
+ if (i32 != ($xxx) f)
+ result |= 1;
+ exit(result);
+}
+EOCP
+if $cc $ccflags -o try try.c >/dev/null 2>&1; then
+ ./try
+ yyy=$?
+else
+ echo "(I can't seem to compile the test program--assuming it can't)"
+ yyy=1
+fi
+case "$yyy" in
+0) val="$define"
+ echo "Yup, it can."
+ ;;
+*) val="$undef"
+ echo "Nope, it can't."
+ ;;
+esac
+set d_casti32
+eval $setvar
+$rm_try
+
diff --git a/mcon/U/d_castneg.U b/mcon/U/d_castneg.U
new file mode 100644
index 0000000..517ac1c
--- /dev/null
+++ b/mcon/U/d_castneg.U
@@ -0,0 +1,143 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_castneg.U,v $
+?RCS: Revision 3.0.1.2 1995/05/12 12:11:21 ram
+?RCS: patch54: made sure cc and ccflags are conditional dependencies
+?RCS: patch54: added improved test case for Interactive Unix
+?RCS:
+?RCS: Revision 3.0.1.1 1994/10/29 16:10:50 ram
+?RCS: patch36: don't forget to tell user about compilation failures (ADO)
+?RCS: patch36: declare signal handler correctly using 'signal_t' (ADO)
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:05:47 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: Can the compiler cast negative / odd floats to unsigned values.
+?X:
+?MAKE:d_castneg castflags: cat +cc +ccflags rm_try Setvar signal_t
+?MAKE: -pick add $@ %<
+?S:d_castneg:
+?S: This variable conditionally defines CASTNEG, which indicates
+?S: wether the C compiler can cast negative float to unsigned.
+?S:.
+?S:castflags:
+?S: This variable contains a flag that precise difficulties the
+?S: compiler has casting odd floating values to unsigned long:
+?S: 0 = ok
+?S: 1 = couldn't cast < 0
+?S: 2 = couldn't cast >= 0x80000000
+?S: 4 = couldn't cast in argument expression list
+?S:.
+?C:CASTNEGFLOAT:
+?C: This symbol is defined if the C compiler can cast negative
+?C: numbers to unsigned longs, ints and shorts.
+?C:.
+?C:CASTFLAGS:
+?C: This symbol contains flags that say what difficulties the compiler
+?C: has casting odd floating values to unsigned long:
+?C: 0 = ok
+?C: 1 = couldn't cast < 0
+?C: 2 = couldn't cast >= 0x80000000
+?C: 4 = couldn't cast in argument expression list
+?C:.
+?H:#$d_castneg CASTNEGFLOAT /**/
+?H:#define CASTFLAGS $castflags /**/
+?H:.
+?F:!try
+?LINT:set d_castneg
+: check for ability to cast negative floats to unsigned
+echo " "
+echo 'Checking whether your C compiler can cast negative float to unsigned.' >&4
+$cat >try.c <<EOCP
+#include <sys/types.h>
+#include <signal.h>
+$signal_t blech() { exit(7); }
+$signal_t blech_in_list() { exit(4); }
+unsigned long dummy_long(p) unsigned long p; { return p; }
+unsigned int dummy_int(p) unsigned int p; { return p; }
+unsigned short dummy_short(p) unsigned short p; { return p; }
+int main()
+{
+ double f = -123.;
+ unsigned long along;
+ unsigned int aint;
+ unsigned short ashort;
+ int result = 0;
+
+ signal(SIGFPE, blech);
+ along = (unsigned long)f;
+ aint = (unsigned int)f;
+ ashort = (unsigned short)f;
+ if (along != (unsigned long)-123)
+ result |= 1;
+ if (aint != (unsigned int)-123)
+ result |= 1;
+ if (ashort != (unsigned short)-123)
+ result |= 1;
+ f = (double)0x40000000;
+ f = f + f;
+ along = 0;
+ along = (unsigned long)f;
+ if (along != 0x80000000)
+ result |= 2;
+ f -= 1.;
+ along = 0;
+ along = (unsigned long)f;
+ if (along != 0x7fffffff)
+ result |= 1;
+ f += 2.;
+ along = 0;
+ along = (unsigned long)f;
+ if (along != 0x80000001)
+ result |= 2;
+ if (result)
+ exit(result);
+?X:
+?X: The following is a test for Interactive Unix Version 4.1, which
+?X: has an 'improved' compiler which can correctly cast negative
+?X: floats in expression lists, but apparently not in argument lists.
+?X: Contributed by Winfried Koenig <win@incom.rhein-main.de>
+?X:
+ signal(SIGFPE, blech_in_list);
+ f = 123.;
+ along = dummy_long((unsigned long)f);
+ aint = dummy_int((unsigned int)f);
+ ashort = dummy_short((unsigned short)f);
+ if (along != (unsigned long)123)
+ result |= 4;
+ if (aint != (unsigned int)123)
+ result |= 4;
+ if (ashort != (unsigned short)123)
+ result |= 4;
+ exit(result);
+
+}
+EOCP
+if $cc $ccflags -o try try.c >/dev/null 2>&1; then
+ ./try
+ castflags=$?
+else
+ echo "(I can't seem to compile the test program--assuming it can't)"
+ castflags=7
+fi
+case "$castflags" in
+0) val="$define"
+ echo "Yup, it can."
+ ;;
+*) val="$undef"
+ echo "Nope, it can't."
+ ;;
+esac
+set d_castneg
+eval $setvar
+$rm_try
+
diff --git a/mcon/U/d_cbrt.U b/mcon/U/d_cbrt.U
new file mode 100644
index 0000000..42dd284
--- /dev/null
+++ b/mcon/U/d_cbrt.U
@@ -0,0 +1,42 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_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: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_cbrt:
+?S: This variable conditionally defines the HAS_CBRT symbol, which
+?S: indicates to the C program that the cbrt() (cube root) function
+?S: is available.
+?S:.
+?C:HAS_CBRT (CBRT):
+?C: This symbol, if defined, indicates that the cbrt() (cube root)
+?C: function is available.
+?C:.
+?H:#$d_cbrt HAS_CBRT /**/
+?H:.
+?LINT:set d_cbrt
+: see if cbrt exists
+$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
new file mode 100644
index 0000000..2364018
--- /dev/null
+++ b/mcon/U/d_charsprf.U
@@ -0,0 +1,52 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_charsprf.U,v $
+?RCS: Revision 3.0 1993/08/18 12:05:49 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_charsprf: cat rm +cc Setvar
+?MAKE: -pick add $@ %<
+?S:d_charsprf:
+?S: This variable conditionally defines CHARSPRINTF if this system
+?S: declares "char *sprintf()" in stdio.h. The trend seems to be to
+?S: declare it as "int sprintf()".
+?S:.
+?C:CHARSPRINTF:
+?C: This symbol is defined if this system declares "char *sprintf()" in
+?C: stdio.h. The trend seems to be to declare it as "int sprintf()". It
+?C: is up to the package author to declare sprintf correctly based on the
+?C: symbol.
+?C:.
+?H:#$d_charsprf CHARSPRINTF /**/
+?H:.
+?F:!ucbsprf.c !ucbsprf
+?LINT:set d_charsprf
+: see if sprintf is declared as int or pointer to char
+echo " "
+$cat >ucbsprf.c <<'EOF'
+int main()
+{
+ int sprintf();
+ char buf[10];
+ exit((unsigned long)sprintf(buf,"%s","foo") > 10L);
+}
+EOF
+if $cc -o ucbsprf ucbsprf.c >/dev/null 2>&1 && ./ucbsprf; then
+ echo "Your sprintf() returns (int)." >&4
+ val="$undef"
+else
+ echo "Your sprintf() returns (char*)." >&4
+ val="$define"
+fi
+set d_charsprf
+eval $setvar
+$rm -f ucbsprf*
+
diff --git a/mcon/U/d_chown.U b/mcon/U/d_chown.U
new file mode 100644
index 0000000..45fd681
--- /dev/null
+++ b/mcon/U/d_chown.U
@@ -0,0 +1,49 @@
+?RCS: $Id$
+?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: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
+?RCS:
+?RCS: $Log: d_chown.U,v $
+?RCS: Revision 3.0.1.1 1994/08/29 16:07:14 ram
+?RCS: patch32: created by ADO
+?RCS:
+?MAKE:d_chown: Trylink cat i_unistd
+?MAKE: -pick add $@ %<
+?S:d_chown:
+?S: This variable conditionally defines the HAS_CHOWN symbol, which
+?S: indicates to the C program that the chown() routine is available.
+?S:.
+?C:HAS_CHOWN :
+?C: This symbol, if defined, indicates that the chown routine is
+?C: available.
+?C:.
+?H:#$d_chown HAS_CHOWN /**/
+?H:.
+?LINT:set d_chown
+: see if chown exists
+$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
new file mode 100644
index 0000000..ef6f4be
--- /dev/null
+++ b/mcon/U/d_chroot.U
@@ -0,0 +1,46 @@
+?RCS: $Id$
+?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: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
+?RCS:
+?RCS: $Log: d_chroot.U,v $
+?RCS: Revision 3.0.1.1 1994/08/29 16:07:17 ram
+?RCS: patch32: created by ADO
+?RCS:
+?MAKE:d_chroot: Trylink cat i_unistd
+?MAKE: -pick add $@ %<
+?S:d_chroot:
+?S: This variable conditionally defines the HAS_CHROOT symbol, which
+?S: indicates to the C program that the chroot() routine is available.
+?S:.
+?C:HAS_CHROOT :
+?C: This symbol, if defined, indicates that the chroot routine is
+?C: available.
+?C:.
+?H:#$d_chroot HAS_CHROOT /**/
+?H:.
+?LINT:set d_chroot
+: see if chroot exists
+$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
new file mode 100644
index 0000000..7b6bee2
--- /dev/null
+++ b/mcon/U/d_chsize.U
@@ -0,0 +1,42 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_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: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_chsize:
+?S: This variable conditionally defines the CHSIZE symbol, which
+?S: indicates to the C program that the chsize() routine is available
+?S: to truncate files. You might need a -lx to get this routine.
+?S:.
+?C:HAS_CHSIZE (CHSIZE):
+?C: This symbol, if defined, indicates that the chsize routine is available
+?C: to truncate files. You might need a -lx to get this routine.
+?C:.
+?H:#$d_chsize HAS_CHSIZE /**/
+?H:.
+?LINT:set d_chsize
+: see if chsize exists
+$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
new file mode 100644
index 0000000..7e9566a
--- /dev/null
+++ b/mcon/U/d_ckeypad.U
@@ -0,0 +1,56 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_ckeypad.U,v $
+?RCS: Revision 3.0 1993/08/18 12:05:50 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_ckeypad: cat cc termlib Setvar
+?MAKE: -pick add $@ %<
+?S:d_ckeypad:
+?S: This variable controls the definition of HAS_CURSES_KEYPAD,
+?S: which tells the application that the keypad() curses function
+?S: is available.
+?S:.
+?C:HAS_CURSES_KEYPAD:
+?C: This symbol indicates the availability of the keypad() function
+?C: of the curses library.
+?C:.
+?H:#$d_ckeypad HAS_CURSES_KEYPAD /**/
+?H:.
+?LINT:set d_ckeypad
+: 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'
+#include <curses.h>
+int main() {
+ keypad(stdscr, TRUE);
+ exit(0);
+}
+EOCP
+ if $cc c_keypad.c >c_keypad.out 2>&1 ; then
+ val=$define
+ echo "It appears to have the keypad() function."
+ else
+ 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_clearenv.U b/mcon/U/d_clearenv.U
new file mode 100644
index 0000000..d8e892f
--- /dev/null
+++ b/mcon/U/d_clearenv.U
@@ -0,0 +1,38 @@
+?RCS:
+?RCS: Copyright (c) 2015 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_clearenv: Trylink cat i_stdlib
+?MAKE: -pick add $@ %<
+?S:d_clearenv:
+?S: This variable conditionally defines the HAS_CLEARENV
+?S: symbol, which indicates to the C program that clearenv()
+?S: is available to clear the environment.
+?S:.
+?C:HAS_CLEARENV:
+?C: This symbol is defined when clearenv() is there to clear the
+?C: environment.
+?C:.
+?H:#$d_clearenv HAS_CLEARENV
+?H:.
+?LINT: set d_clearenv
+: do we have clearenv?
+$cat >try.c <<EOC
+#$i_stdlib I_STDLIB
+#ifdef I_STDLIB
+#include <stdlib.h>
+#endif
+int main(void)
+{
+ return clearenv();
+}
+EOC
+cyn=clearenv
+set d_clearenv
+eval $trylink
+
diff --git a/mcon/U/d_clock_getres.U b/mcon/U/d_clock_getres.U
new file mode 100644
index 0000000..793692e
--- /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..3e2cf4d
--- /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
new file mode 100644
index 0000000..c0cd33a
--- /dev/null
+++ b/mcon/U/d_closedir.U
@@ -0,0 +1,121 @@
+?RCS: $Id$
+?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: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
+?RCS:
+?RCS: $Log: d_closedir.U,v $
+?RCS: Revision 3.0.1.3 1997/02/28 15:31:26 ram
+?RCS: patch61: added ?F: metalint hint
+?RCS:
+?RCS: Revision 3.0.1.2 1994/10/29 16:11:18 ram
+?RCS: patch36: added 'ldflags' to the test compile line (ADO)
+?RCS:
+?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: Trylink cat i_dirent i_sysdir i_sysndir \
+ cc ccflags ldflags libs Setvar rm
+?MAKE: -pick add $@ %<
+?S:d_closedir:
+?S: This variable conditionally defines HAS_CLOSEDIR if closedir() is
+?S: available.
+?S:.
+?C:HAS_CLOSEDIR:
+?C: This symbol, if defined, indicates that the closedir() routine is
+?C: available.
+?C:.
+?H:#$d_closedir HAS_CLOSEDIR /**/
+?H:.
+?S:d_void_closedir:
+?S: This variable conditionally defines VOID_CLOSEDIR if closedir()
+?S: does not return a value.
+?S:.
+?C:VOID_CLOSEDIR:
+?C: This symbol, if defined, indicates that the closedir() routine
+?C: does not return a value.
+?C:.
+?H:#$d_void_closedir VOID_CLOSEDIR /**/
+?H:.
+?F:!closedir
+?LINT:set d_closedir d_void_closedir
+: see if closedir exists
+$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()
+?X: and check whether it returns a value. The contortions are designed
+?X: to portably pick up the correct directory header, for those
+?X: systems that support various mutually incompatible directory functions.
+?X: This is from perl5's perl.h
+case "$d_closedir" in
+"$define")
+ echo " "
+ echo "Checking whether closedir() returns a status..." >&4
+ cat > closedir.c <<EOM
+#$i_dirent I_DIRENT /**/
+#$i_sysdir I_SYS_DIR /**/
+#$i_sysndir I_SYS_NDIR /**/
+
+#if defined(I_DIRENT)
+#include <dirent.h>
+#if defined(NeXT) && defined(I_SYS_DIR) /* NeXT needs dirent + sys/dir.h */
+#include <sys/dir.h>
+#endif
+#else
+#ifdef I_SYS_NDIR
+#include <sys/ndir.h>
+#else
+#ifdef I_SYS_DIR
+#ifdef hp9000s500
+#include <ndir.h> /* may be wrong in the future */
+#else
+#include <sys/dir.h>
+#endif
+#endif
+#endif
+#endif
+int main() { return closedir(opendir(".")); }
+EOM
+ 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"
+ else
+ echo "No, it doesn't."
+ val="$define"
+ fi
+ else
+ echo "(I can't seem to compile the test program--assuming it doesn't)"
+ val="$define"
+ fi
+ ;;
+*)
+ val="$undef";
+ ;;
+esac
+set d_void_closedir
+eval $setvar
+$rm -f closedir*
+@end
diff --git a/mcon/U/d_closefrom.U b/mcon/U/d_closefrom.U
new file mode 100644
index 0000000..5fd4942
--- /dev/null
+++ b/mcon/U/d_closefrom.U
@@ -0,0 +1,45 @@
+?RCS: $Id$
+?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
new file mode 100644
index 0000000..18afb2b
--- /dev/null
+++ b/mcon/U/d_const.U
@@ -0,0 +1,69 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_const.U,v $
+?RCS: Revision 3.0.1.1 1993/11/10 17:33:41 ram
+?RCS: patch14: stronger const check with added typedef for MIPS cc
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:05:51 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_const: cat rm cc ccflags Setvar
+?MAKE: -pick add $@ %<
+?S:d_const:
+?S: This variable conditionally defines the HASCONST symbol, which
+?S: indicates to the C program that this C compiler knows about the
+?S: const type.
+?S:.
+?C:HASCONST ~ %<:
+?C: This symbol, if defined, indicates that this C compiler knows about
+?C: the const type. There is no need to actually test for that symbol
+?C: within your programs. The mere use of the "const" keyword will
+?C: trigger the necessary tests.
+?C:.
+?H:?%<:#$d_const HASCONST /**/
+?H:?%<:#ifndef HASCONST
+?H:?%<:#define const
+?H:?%<:#endif
+?H:.
+?W:%<:const
+?F:const.c const.o
+?LINT:set d_const
+?LINT:known const
+: check for const keyword
+echo " "
+echo 'Checking to see if your C compiler knows about "const"...' >&4
+$cat >const.c <<'EOCP'
+?X: mmcg@bruce.cs.monash.edu.au reports that:
+?X: The MIPS cc compiler (V2.10) on a dec 5000 running Ultrix 4.2A
+?X: pretends to understand `const' but doesn't - it'll also fail to
+?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(void)
+{
+ static const char *foo;
+ static const spug y;
+ (void) foo;
+ (void) y;
+ return 0;
+}
+EOCP
+if $cc -c $ccflags const.c; then
+ val="$define"
+ echo "Yup, it does."
+else
+ val="$undef"
+ echo "Nope, it doesn't."
+fi
+set d_const
+eval $setvar
+$rm -f const.c const.o
+
diff --git a/mcon/U/d_crypt.U b/mcon/U/d_crypt.U
new file mode 100644
index 0000000..abc32c2
--- /dev/null
+++ b/mcon/U/d_crypt.U
@@ -0,0 +1,82 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_crypt.U,v $
+?RCS: Revision 3.0.1.1 1997/02/28 15:31:47 ram
+?RCS: patch61: replaced .a with $_a all over the place
+?RCS:
+?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 Setvar _a Trylink cat i_unistd
+?MAKE: -pick add $@ %<
+?S:d_crypt:
+?S: This variable conditionally defines the CRYPT symbol, which
+?S: indicates to the C program that the crypt() routine is available
+?S: to encrypt passwords and the like.
+?S:.
+?S:cryptlib:
+?S: This variable holds -lcrypt or the path to a libcrypt.a archive if
+?S: the crypt() function is not defined in the standard C library. It is
+?S: up to the Makefile to use this.
+?S:.
+?C:HAS_CRYPT (CRYPT):
+?C: This symbol, if defined, indicates that the crypt routine is available
+?C: to encrypt passwords and the like.
+?C:.
+?H:#$d_crypt HAS_CRYPT /**/
+?H:.
+?LINT:set d_crypt
+?T:val
+: see if crypt exists
+$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='';;
+*)
+ 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
+;;
+esac
+
diff --git a/mcon/U/d_csh.U b/mcon/U/d_csh.U
new file mode 100644
index 0000000..926f833
--- /dev/null
+++ b/mcon/U/d_csh.U
@@ -0,0 +1,62 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_csh.U,v $
+?RCS: Revision 3.0.1.1 1997/02/28 15:32:18 ram
+?RCS: patch61: added full_csh to preserve the full path even when portable
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:05:53 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_csh full_csh: csh Setvar
+?MAKE: -pick add $@ %<
+?S:d_csh:
+?S: This variable conditionally defines the CSH symbol, which
+?S: indicates to the C program that the C-shell exists.
+?S:.
+?S:full_csh:
+?S: This variable contains the full pathname to 'csh', whether or
+?S: not the user has specified 'portability'. This is only used
+?S: in the compiled C program, and we assume that all systems which
+?S: can share this executable will have the same full pathname to
+?S: 'csh.'
+?S:.
+?C:HAS_CSH:
+?C: This symbol, if defined, indicates that the C-shell exists.
+?C:.
+?C:CSH:
+?C: This symbol, if defined, contains the full pathname of csh.
+?C:.
+?X: Previously, I just did $d_csh CSH "$full_csh", but that caused
+?X: problems on VMS where the config.sh extraction program changes
+?X: $undef to a real cpp undef, and they then had #undef CSH ""
+?X: which the compiler didn't like. It's easy to work around this,
+?X: so I did. --AD 3/1998.
+?X: And we don't want to define CSH if !HAS_CSH, but we don't want
+?X: those lines in config.h if they don't need CSH, so protect with ?CSH
+?X: and not ?%<. --RAM, 15/02/2004
+?H:?%<:#$d_csh HAS_CSH /**/
+?H:?CSH:#ifdef HAS_CSH
+?H:?CSH:#define CSH "$full_csh" /**/
+?H:?CSH:#endif
+?H:.
+?LINT:set d_csh
+: get csh whereabouts
+case "$csh" in
+'csh') val="$undef" ;;
+*) val="$define" ;;
+esac
+set d_csh
+eval $setvar
+: Respect a hint or command line value for full_csh.
+case "$full_csh" in
+'') full_csh=$csh ;;
+esac
+
diff --git a/mcon/U/d_ctermid.U b/mcon/U/d_ctermid.U
new file mode 100644
index 0000000..cf0a110
--- /dev/null
+++ b/mcon/U/d_ctermid.U
@@ -0,0 +1,41 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_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: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_ctermid:
+?S: This variable conditionally defines CTERMID if ctermid() is
+?S: available to generate filename for terminal.
+?S:.
+?C:HAS_CTERMID (CTERMID):
+?C: This symbol, if defined, indicates that the ctermid routine is
+?C: available to generate filename for terminal.
+?C:.
+?H:#$d_ctermid HAS_CTERMID /**/
+?H:.
+?LINT:set d_ctermid
+: see if ctermid exists
+$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
new file mode 100644
index 0000000..d713ad8
--- /dev/null
+++ b/mcon/U/d_cuserid.U
@@ -0,0 +1,44 @@
+?RCS: $Id$
+?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: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
+?RCS:
+?RCS: $Log: d_cuserid.U,v $
+?RCS: Revision 3.0.1.1 1994/08/29 16:07:25 ram
+?RCS: patch32: created by ADO
+?RCS:
+?MAKE:d_cuserid: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_cuserid:
+?S: This variable conditionally defines the HAS_CUSERID symbol, which
+?S: indicates to the C program that the cuserid() routine is available
+?S: to get character login names.
+?S:.
+?C:HAS_CUSERID :
+?C: This symbol, if defined, indicates that the cuserid routine is
+?C: available to get character login names.
+?C:.
+?H:#$d_cuserid HAS_CUSERID /**/
+?H:.
+?LINT:set d_cuserid
+: see if cuserid exists
+$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..5c24755
--- /dev/null
+++ b/mcon/U/d_datastart_symbol.U
@@ -0,0 +1,64 @@
+?RCS: $Id$
+?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
new file mode 100644
index 0000000..30066cd
--- /dev/null
+++ b/mcon/U/d_dbl_dig.U
@@ -0,0 +1,61 @@
+?RCS: $Id$
+?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: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
+?RCS:
+?RCS: $Log: d_dbl_dig.U,v $
+?RCS: Revision 3.0.1.1 1994/08/29 16:07:28 ram
+?RCS: patch32: created by ADO
+?RCS:
+?MAKE:d_dbl_dig: Myread contains cat rm Setvar i_limits i_float \
+ cppstdin cppflags cppminus
+?MAKE: -pick add $@ %<
+?S:d_dbl_dig:
+?S: This variable conditionally defines d_dbl_dig if this system's
+?S: header files provide DBL_DIG, which is the number of significant
+?S: digits in a double precision number.
+?S:.
+?C:HAS_DBL_DIG:
+?C: This symbol, if defined, indicates that this system's <float.h>
+?C: or <limits.h> defines the symbol DBL_DIG, which is the number
+?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:.
+?F:!dbl_dig.c
+?LINT:set d_dbl_dig
+: See if number of significant digits in a double precision number is known
+echo " "
+$cat >dbl_dig.c <<EOM
+#$i_limits I_LIMITS
+#$i_float I_FLOAT
+#ifdef I_LIMITS
+#include <limits.h>
+#endif
+#ifdef I_FLOAT
+#include <float.h>
+#endif
+#ifdef DBL_DIG
+printf("Contains DBL_DIG");
+#endif
+EOM
+$cppstdin $cppflags $cppminus < dbl_dig.c >dbl_dig.E 2>/dev/null
+if $contains 'DBL_DIG' dbl_dig.E >/dev/null 2>&1; then
+ echo "DBL_DIG found." >&4
+ val="$define"
+else
+ echo "DBL_DIG NOT found." >&4
+ val="$undef"
+fi
+$rm -f dbl_dig.?
+set d_dbl_dig
+eval $setvar
+
diff --git a/mcon/U/d_debugging.U b/mcon/U/d_debugging.U
new file mode 100644
index 0000000..3aaa520
--- /dev/null
+++ b/mcon/U/d_debugging.U
@@ -0,0 +1,42 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_debugging: Myread Setvar spackage cat
+?MAKE: -pick add $@ %<
+?S:d_debugging:
+?S: This variable conditionally defines the DEBUGGING symbol.
+?S:.
+?C:DEBUGGING:
+?C: This symbol, when defined, activates extra debugging.
+?C:.
+?H:#$d_debugging DEBUGGING
+?H:.
+?LINT:set d_debugging
+: see whether debugging should be turned on
+$cat <<EOM
+
+$spackage comes with a debugging option. Enabling that option will
+compile extra debugging code that may slow-down the execution and/or
+bloat the size of the executable by a significant amount.
+
+EOM
+case "$d_debugging" in
+"$define") dflt=y;;
+*) dflt=n;;
+esac
+rp='Enable extra debugging code'
+. ./myread
+val="$undef"
+case "$ans" in
+y|Y) val="$define";;
+esac
+set d_debugging
+eval $setvar
+
diff --git a/mcon/U/d_deflate.U b/mcon/U/d_deflate.U
new file mode 100644
index 0000000..604d820
--- /dev/null
+++ b/mcon/U/d_deflate.U
@@ -0,0 +1,42 @@
+?RCS: $Id$
+?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..1731a3c
--- /dev/null
+++ b/mcon/U/d_devpoll.U
@@ -0,0 +1,52 @@
+?RCS: $Id$
+?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
new file mode 100644
index 0000000..82ddb21
--- /dev/null
+++ b/mcon/U/d_difftime.U
@@ -0,0 +1,80 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, 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:
+?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
+?RCS:
+?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 use_difftime
+?T:avoid_difftime
+: see if difftime exists
+$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_namlen.U b/mcon/U/d_dirent_d_namlen.U
new file mode 100644
index 0000000..00fdfb2
--- /dev/null
+++ b/mcon/U/d_dirent_d_namlen.U
@@ -0,0 +1,42 @@
+?RCS:
+?RCS: Copyright (c) 2015 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_dirent_d_namlen: Trylink cat i_dirent
+?MAKE: -pick add $@ %<
+?S:d_dirent_d_namlen:
+?S: This variable conditionally defines the HAS_DIRENT_D_NAMLEN symbol,
+?S: which indicates to the C program that struct dirent has an
+?S: integer member d_namlen. Better check for HAS_DIRENT_D_NAMLEN than
+?S: DIRNAMLEN since the latter has a weaker test not involving compilation.
+?S:.
+?C:HAS_DIRENT_D_NAMLEN:
+?C: This symbol, if defined, indicates that struct dirent has an
+?C: integer member d_namlen to hold the actual string length of d_name.
+?C:.
+?H:#$d_dirent_d_namlen HAS_DIRENT_D_NAMLEN /**/
+?H:.
+?LINT:set d_dirent_d_namlen
+: check whether struct dirent has a member d_namlen.
+$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_namlen |= 1;
+ return 0;
+}
+EOC
+cyn="whether struct dirent has a d_namlen member"
+set d_dirent_d_namlen
+eval $trylink
+
diff --git a/mcon/U/d_dirent_d_type.U b/mcon/U/d_dirent_d_type.U
new file mode 100644
index 0000000..431d299
--- /dev/null
+++ b/mcon/U/d_dirent_d_type.U
@@ -0,0 +1,52 @@
+?RCS: $Id$
+?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. Note that DT_WHT is BSD-specific and may
+?C: not be available. If DT_UNKNOWN is returned, the filesystem does
+?C: not fill d_type even though it is present in the dir entry.
+?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;
+ 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_dirfd.U b/mcon/U/d_dirfd.U
new file mode 100644
index 0000000..3e64671
--- /dev/null
+++ b/mcon/U/d_dirfd.U
@@ -0,0 +1,42 @@
+?RCS:
+?RCS: Copyright (c) 2015 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_dirfd: Trylink cat i_dirent
+?MAKE: -pick add $@ %<
+?S:d_dirfd:
+?S: This variable conditionally defines HAS_DIRFD when dirfd() is
+?S: available to get the underlying file descriptor from opendir().
+?S:.
+?C:HAS_DIRFD:
+?C: This symbol, if defined, indicates that the dirfd() routine is
+?C: available to get the underlying file descriptor from a DIR *
+?C: opened by opendir().
+?C:.
+?H:#$d_dirfd HAS_DIRFD /**/
+?H:.
+?LINT:set d_dirfd
+: see if dirfd exists
+$cat >try.c <<EOC
+#include <sys/types.h>
+#$i_dirent I_DIRENT
+#ifdef I_DIRENT
+#include <dirent.h>
+#endif
+int main(void)
+{
+ static DIR *dir;
+ static int ret;
+ ret = dirfd(dir);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=dirfd
+set d_dirfd
+eval $trylink
+
diff --git a/mcon/U/d_dladdr.U b/mcon/U/d_dladdr.U
new file mode 100644
index 0000000..d0e2d8d
--- /dev/null
+++ b/mcon/U/d_dladdr.U
@@ -0,0 +1,42 @@
+?RCS: $Id$
+?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
new file mode 100644
index 0000000..72a7c7f
--- /dev/null
+++ b/mcon/U/d_dlerror.U
@@ -0,0 +1,50 @@
+?RCS: $Id$
+?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: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
+?RCS:
+?RCS: $Log: d_dlerror.U,v $
+?RCS: Revision 3.0.1.2 1995/07/25 13:52:49 ram
+?RCS: patch56: force compile-link test since symbol might lie in crt0.o (ADO)
+?RCS:
+?RCS: Revision 3.0.1.1 1994/10/29 16:11:23 ram
+?RCS: patch36: created by ADO
+?RCS:
+?MAKE:d_dlerror: Trylink cat i_dlfcn
+?MAKE: -pick add $@ %<
+?S:d_dlerror:
+?S: This variable conditionally defines the HAS_DLERROR symbol, which
+?S: indicates to the C program that the dlerror() routine is available.
+?S:.
+?C:HAS_DLERROR :
+?C: This symbol, if defined, indicates that the dlerror routine is
+?C: available to return a string describing the last error that
+?C: occurred from a call to dlopen(), dlclose() or dlsym().
+?C:.
+?H:#$d_dlerror HAS_DLERROR /**/
+?H:.
+?LINT:set d_dlerror
+: see if dlerror exists
+$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..fd6e2b7
--- /dev/null
+++ b/mcon/U/d_dliterphdr.U
@@ -0,0 +1,44 @@
+?RCS: $Id$
+?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
new file mode 100644
index 0000000..216789b
--- /dev/null
+++ b/mcon/U/d_dlopen.U
@@ -0,0 +1,49 @@
+?RCS: $Id$
+?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: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
+?RCS:
+?RCS: $Log: d_dlopen.U,v $
+?RCS: Revision 3.0.1.2 1995/07/25 13:52:56 ram
+?RCS: patch56: force compile-link test since symbol might lie in crt0.o (ADO)
+?RCS:
+?RCS: Revision 3.0.1.1 1994/08/29 16:07:34 ram
+?RCS: patch32: created by ADO
+?RCS:
+?MAKE:d_dlopen: Trylink cat i_dlfcn
+?MAKE: -pick add $@ %<
+?S:d_dlopen:
+?S: This variable conditionally defines the HAS_DLOPEN symbol, which
+?S: indicates to the C program that the dlopen() routine is available.
+?S:.
+?C:HAS_DLOPEN :
+?C: This symbol, if defined, indicates that the dlopen routine is
+?C: available.
+?C:.
+?H:#$d_dlopen HAS_DLOPEN /**/
+?H:.
+?LINT:set d_dlopen
+: see if dlopen exists
+$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
new file mode 100644
index 0000000..1e82270
--- /dev/null
+++ b/mcon/U/d_dosuid.U
@@ -0,0 +1,169 @@
+?RCS: $Id$
+?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: Tye McQueen <tye@metronet.com> added safe setuid script checks.
+?RCS:
+?RCS: $Log: d_dosuid.U,v $
+?RCS: Revision 3.0.1.2 1997/02/28 15:33:03 ram
+?RCS: patch61: moved unit to TOP via a ?Y: layout directive
+?RCS: patch61: tell them /dev/fd is not about floppy disks
+?RCS:
+?RCS: Revision 3.0.1.1 1994/10/29 16:12:08 ram
+?RCS: patch36: added checks for secure setuid scripts (Tye McQueen)
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:05:55 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_dosuid d_suidsafe: cat contains ls rm test Myread Setvar \
+ Oldconfig Guess package hint
+?MAKE: -pick add $@ %<
+?S:d_suidsafe:
+?S: This variable conditionally defines SETUID_SCRIPTS_ARE_SECURE_NOW
+?S: if setuid scripts can be secure. This test looks in /dev/fd/.
+?S:.
+?S:d_dosuid:
+?S: This variable conditionally defines the symbol DOSUID, which
+?S: tells the C program that it should insert setuid emulation code
+?S: on hosts which have setuid #! scripts disabled.
+?S:.
+?C:SETUID_SCRIPTS_ARE_SECURE_NOW:
+?C: This symbol, if defined, indicates that the bug that prevents
+?C: setuid scripts from being secure is not present in this kernel.
+?C:.
+?C:DOSUID:
+?C: This symbol, if defined, indicates that the C program should
+?C: check the script that it is executing for setuid/setgid bits, and
+?C: attempt to emulate setuid/setgid on systems that have disabled
+?C: setuid #! scripts because the kernel can't do it securely.
+?C: It is up to the package designer to make sure that this emulation
+?C: is done securely. Among other things, it should do an fstat on
+?C: the script it just opened to make sure it really is a setuid/setgid
+?C: script, it should make sure the arguments passed correspond exactly
+?C: to the argument on the #! line, and it should not trust any
+?C: subprocesses to which it must pass the filename rather than the
+?C: file descriptor of the script to be executed.
+?C:.
+?H:#$d_suidsafe SETUID_SCRIPTS_ARE_SECURE_NOW /**/
+?H:#$d_dosuid DOSUID /**/
+?H:.
+?Y:TOP
+?F:!reflect
+?LINT: set d_suidsafe
+?LINT: set d_dosuid
+: see if setuid scripts can be secure
+$cat <<EOM
+
+Some kernels have a bug that prevents setuid #! scripts from being
+secure. Some sites have disabled setuid #! scripts because of this.
+
+First let's decide if your kernel supports secure setuid #! scripts.
+(If setuid #! scripts would be secure but have been disabled anyway,
+don't say that they are secure if asked.)
+
+EOM
+
+val="$undef"
+if $test -d /dev/fd; then
+ echo "#!$ls" >reflect
+ chmod +x,u+s reflect
+ ./reflect >flect 2>&1
+ if $contains "/dev/fd" flect >/dev/null; then
+ echo "Congratulations, your kernel has secure setuid scripts!" >&4
+ val="$define"
+ else
+ $cat <<EOM
+If you are not sure if they are secure, I can check but I'll need a
+username and password different from the one you are using right now.
+If you don't have such a username or don't want me to test, simply
+enter 'none'.
+
+EOM
+ rp='Other username to test security of setuid scripts with?'
+ dflt='none'
+ . ./myread
+ case "$ans" in
+ n|none)
+ case "$d_suidsafe" in
+ '') echo "I'll assume setuid scripts are *not* secure." >&4
+ dflt=n;;
+ "$undef")
+ echo "Well, the $hint value is *not* secure." >&4
+ dflt=n;;
+ *) echo "Well, the $hint value *is* secure." >&4
+ dflt=y;;
+ esac
+ ;;
+ *)
+ $rm -f reflect flect
+ echo "#!$ls" >reflect
+ chmod +x,u+s reflect
+ echo >flect
+ chmod a+w flect
+ echo '"su" will (probably) prompt you for '"$ans's password."
+ su $ans -c './reflect >flect'
+ if $contains "/dev/fd" flect >/dev/null; then
+ echo "Okay, it looks like setuid scripts are secure." >&4
+ dflt=y
+ else
+ echo "I don't think setuid scripts are secure." >&4
+ dflt=n
+ fi
+ ;;
+ esac
+ rp='Does your kernel have *secure* setuid scripts?'
+ . ./myread
+ case "$ans" in
+ [yY]*) val="$define";;
+ *) val="$undef";;
+ esac
+ fi
+else
+ echo "I don't think setuid scripts are secure (no /dev/fd directory)." >&4
+ echo "(That's for file descriptors, not floppy disks.)"
+ val="$undef"
+fi
+set d_suidsafe
+eval $setvar
+
+$rm -f reflect flect
+
+: now see if they want to do setuid emulation
+echo " "
+val="$undef"
+case "$d_suidsafe" in
+"$define")
+ val="$undef"
+ echo "No need to emulate SUID scripts since they are secure here." >& 4
+ ;;
+*)
+ $cat <<EOM
+Some systems have disabled setuid scripts, especially systems where
+setuid scripts cannot be secure. On systems where setuid scripts have
+been disabled, the setuid/setgid bits on scripts are currently
+useless. It is possible for $package to detect those bits and emulate
+setuid/setgid in a secure fashion. This emulation will only work if
+setuid scripts have been disabled in your kernel.
+
+EOM
+ case "$d_dosuid" in
+ "$define") dflt=y ;;
+ *) dflt=n ;;
+ esac
+ rp="Do you want to do setuid/setgid emulation?"
+ . ./myread
+ case "$ans" in
+ [yY]*) val="$define";;
+ *) val="$undef";;
+ esac
+ ;;
+esac
+set d_dosuid
+eval $setvar
+
diff --git a/mcon/U/d_drem.U b/mcon/U/d_drem.U
new file mode 100644
index 0000000..53fa8c7
--- /dev/null
+++ b/mcon/U/d_drem.U
@@ -0,0 +1,45 @@
+?RCS: $Id$
+?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: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
+?RCS:
+?RCS: $Log: d_drem.U,v $
+?RCS: Revision 3.0.1.1 1994/10/29 16:12:14 ram
+?RCS: patch36: created by ADO
+?RCS:
+?MAKE:d_drem: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_drem:
+?S: This variable conditionally defines the HAS_DREM symbol, which
+?S: indicates to the C program that the drem() routine is available.
+?S:.
+?C:HAS_DREM :
+?C: This symbol, if defined, indicates that the drem routine is
+?C: available. This routine is roughly the same as fmod, i.e. it
+?C: computes the remainder r=x-n*y, where n=rint(x/y), whereas fmod
+?C: uses n=trunc(x/y).
+?C:.
+?H:#$d_drem HAS_DREM /**/
+?H:.
+?LINT:set d_drem
+: see if drem exists
+$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
new file mode 100644
index 0000000..f807297
--- /dev/null
+++ b/mcon/U/d_dup2.U
@@ -0,0 +1,44 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_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: Trylink cat i_unistd
+?MAKE: -pick add $@ %<
+?S:d_dup2:
+?S: This variable conditionally defines HAS_DUP2 if dup2() is
+?S: available to duplicate file descriptors.
+?S:.
+?C:HAS_DUP2 (DUP2):
+?C: This symbol, if defined, indicates that the dup2 routine is
+?C: available to duplicate file descriptors.
+?C:.
+?H:#$d_dup2 HAS_DUP2 /**/
+?H:.
+?LINT:set d_dup2
+: see if dup2 exists
+$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..1a46ec2
--- /dev/null
+++ b/mcon/U/d_end_symbol.U
@@ -0,0 +1,37 @@
+?RCS: $Id$
+?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
new file mode 100644
index 0000000..c516ba3
--- /dev/null
+++ b/mcon/U/d_eofpipe.U
@@ -0,0 +1,93 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_eofpipe.U,v $
+?RCS: Revision 3.0.1.1 1994/10/29 16:12:40 ram
+?RCS: patch36: call ./bsd explicitly instead of relying on PATH
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:05:57 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_eofpipe: cat +cc +ccflags +libs rm Oldconfig Guess echo n c
+?MAKE: -pick add $@ %<
+?S:d_eofpipe:
+?S: This variable conditionally defines the EOFPIPE symbol, which
+?S: indicates to the C program that select will correctly detect the EOF
+?S: condition when pipe is closed from the other end.
+?S:.
+?C:EOFPIPE:
+?C: This symbol, if defined, indicates that EOF condition will be detected
+?C: by the reader of the pipe when it is closed by the writing process.
+?C: That is, a select() call on that file descriptor will not block when
+?C: only an EOF remains (typical behaviour for BSD systems).
+?C:.
+?H:#$d_eofpipe EOFPIPE /**/
+?H:.
+?F:!mpipe
+: see if pipe correctly gives the EOF condition
+echo " "
+case "$d_eofpipe" in
+'')
+ echo "Let's see if your pipes return EOF to select() upon closing..." >&4
+ $cat >pipe.c <<'EOP'
+int main()
+{
+ int pd[2];
+ int mask;
+
+ pipe(pd);
+ if (0 == fork()) {
+ close(pd[0]);
+ close(pd[1]);
+ exit(0);
+ }
+
+ close(pd[1]);
+ mask = 1 << pd[0];
+ alarm(2);
+ select(32, &mask, (int *) 0, (int *) 0, (char *) 0);
+ if (0 == read(pd[0], &mask, 1))
+ exit(0);
+
+ exit(1);
+}
+EOP
+ if $cc $ccflags -o pipe pipe.c $libs >/dev/null 2>&1; then
+?X: Use a script to avoid the possible 'alarm call' message
+ echo "./pipe || exit 1" > mpipe
+ chmod +x mpipe
+ ./mpipe >/dev/null 2>&1
+ case $? in
+ 0) d_eofpipe="$define";;
+ *) d_eofpipe="$undef";;
+ esac
+ else
+ echo "(The test program did not compile correctly -- Guessing.)"
+ if ./bsd; then
+ d_eofpipe="$define"
+ else
+ d_eofpipe="$undef"
+ fi
+ fi
+ case "$d_eofpipe" in
+ "$define") echo "Yes, they do.";;
+ *) echo "No, they don't! (sigh)";;
+ esac
+ ;;
+*)
+ $echo $n "Your pipes $c"
+ case "$d_eofpipe" in
+ "$define") echo "allow select() to see EOF upon closing.";;
+ *) echo "won't let select() see EOF on closing.";;
+ esac
+ ;;
+esac
+$rm -f *pipe* core
+
diff --git a/mcon/U/d_epoll.U b/mcon/U/d_epoll.U
new file mode 100644
index 0000000..e039a0d
--- /dev/null
+++ b/mcon/U/d_epoll.U
@@ -0,0 +1,51 @@
+?RCS: $Id$
+?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..076d016
--- /dev/null
+++ b/mcon/U/d_etext_symbol.U
@@ -0,0 +1,37 @@
+?RCS: $Id$
+?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
new file mode 100644
index 0000000..b1e11aa
--- /dev/null
+++ b/mcon/U/d_euc2jis.U
@@ -0,0 +1,32 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_euc2jis.U,v $
+?RCS: Revision 3.0 1993/08/18 12:05:58 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_euc2jis: Inlibc
+?MAKE: -pick add $@ %<
+?S:d_euc2jis:
+?S: This variable conditionally defines the HAS_EUC2JIS symbol, which
+?S: indicates to the C program that the euc2jis() routine is available
+?S: to convert EUC to JIS.
+?S:.
+?C:HAS_EUC2JIS:
+?C: This symbol, if defined, indicates that the euc2jis routine is
+?C: available to convert EUC to JIS.
+?C:.
+?H:#$d_euc2jis HAS_EUC2JIS /**/
+?H:.
+?LINT:set d_euc2jis
+: see if euc2jis exists
+set euc2jis d_euc2jis
+eval $inlibc
+
diff --git a/mcon/U/d_fast_assert.U b/mcon/U/d_fast_assert.U
new file mode 100644
index 0000000..dba5132
--- /dev/null
+++ b/mcon/U/d_fast_assert.U
@@ -0,0 +1,85 @@
+?RCS: $Id$
+?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_fchdir.U b/mcon/U/d_fchdir.U
new file mode 100644
index 0000000..382971d
--- /dev/null
+++ b/mcon/U/d_fchdir.U
@@ -0,0 +1,40 @@
+?RCS:
+?RCS: Copyright (c) 2015 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_fchdir: Trylink cat i_unistd
+?MAKE: -pick add $@ %<
+?S:d_fchdir:
+?S: This variable conditionally defines HAS_FCHDIR if fchdir() is
+?S: available to change the directory to that of an opened directory.
+?S:.
+?C:HAS_FCHDIR:
+?C: This symbol, if defined, indicates that the fchdir routine is
+?C: available to change the working directory to that of the opened
+?C: directory whose file descriptor is given.
+?C:.
+?H:#$d_fchdir HAS_FCHDIR /**/
+?H:.
+?LINT:set d_fchdir
+: see if fchdir exists
+$cat >try.c <<EOC
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static int fd, ret;
+ ret |= fchdir(fd);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=fchdir
+set d_fchdir
+eval $trylink
+
diff --git a/mcon/U/d_fchmod.U b/mcon/U/d_fchmod.U
new file mode 100644
index 0000000..367b216
--- /dev/null
+++ b/mcon/U/d_fchmod.U
@@ -0,0 +1,47 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_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: Trylink cat i_sysstat
+?MAKE: -pick add $@ %<
+?S:d_fchmod:
+?S: This variable conditionally defines the HAS_FCHMOD symbol, which
+?S: indicates to the C program that the fchmod() routine is available
+?S: to change mode of opened files.
+?S:.
+?C:HAS_FCHMOD (FCHMOD):
+?C: This symbol, if defined, indicates that the fchmod routine is available
+?C: to change mode of opened files. If unavailable, use chmod().
+?C:.
+?H:#$d_fchmod HAS_FCHMOD /**/
+?H:.
+?LINT:set d_fchmod
+: see if fchmod exists
+$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
new file mode 100644
index 0000000..731f48b
--- /dev/null
+++ b/mcon/U/d_fchown.U
@@ -0,0 +1,48 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_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: Trylink cat i_unistd
+?MAKE: -pick add $@ %<
+?S:d_fchown:
+?S: This variable conditionally defines the HAS_FCHOWN symbol, which
+?S: indicates to the C program that the fchown() routine is available
+?S: to change ownership of opened files.
+?S:.
+?C:HAS_FCHOWN (FCHOWN):
+?C: This symbol, if defined, indicates that the fchown routine is available
+?C: to change ownership of opened files. If unavailable, use chown().
+?C:.
+?H:#$d_fchown HAS_FCHOWN /**/
+?H:.
+?LINT:set d_fchown
+: see if fchown 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;
+ 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
new file mode 100644
index 0000000..4351354
--- /dev/null
+++ b/mcon/U/d_fcntl.U
@@ -0,0 +1,48 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_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: Trylink cat i_unistd
+?MAKE: -pick add $@ %<
+?S:d_fcntl:
+?S: This variable conditionally defines the HAS_FCNTL symbol, and indicates
+?S: whether the fcntl() function exists
+?S:.
+?C:HAS_FCNTL:
+?C: This symbol, if defined, indicates to the C program that
+?C: the fcntl() function exists.
+?C:.
+?H:#$d_fcntl HAS_FCNTL /**/
+?H:.
+?LINT:set d_fcntl
+: see if this is an fcntl system
+$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
new file mode 100644
index 0000000..dbba6c2
--- /dev/null
+++ b/mcon/U/d_fd_set.U
@@ -0,0 +1,141 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_fd_set.U,v $
+?RCS: Revision 3.0.1.3 1997/02/28 15:33:16 ram
+?RCS: patch61: added ?F: metalint hint
+?RCS:
+?RCS: Revision 3.0.1.2 1994/06/20 06:57:23 ram
+?RCS: patch30: extended scope for fd_set checks (ADO)
+?RCS:
+?RCS: Revision 3.0.1.1 1994/01/24 14:06:27 ram
+?RCS: patch16: comments for HAS_FD_* symbols were not consistent
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:06:02 ram
+?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 i_syssock
+?MAKE: -pick add $@ %<
+?S:d_fd_set:
+?S: This variable contains the eventual value of the HAS_FD_SET symbol,
+?S: which indicates if your C compiler knows about the fd_set typedef.
+?S:.
+?S:d_fd_macros:
+?S: This variable contains the eventual value of the HAS_FD_MACROS symbol,
+?S: which indicates if your C compiler knows about the macros which
+?S: manipulate an fd_set.
+?S:.
+?S:d_fds_bits:
+?S: This variable contains the eventual value of the HAS_FDS_BITS symbol,
+?S: which indicates if your fd_set typedef contains the fds_bits member.
+?S: If you have an fd_set typedef, but the dweebs who installed it did
+?S: a half-fast job and neglected to provide the macros to manipulate
+?S: an fd_set, HAS_FDS_BITS will let us know how to fix the gaffe.
+?S:.
+?C:HAS_FD_SET:
+?C: This symbol, when defined, indicates presence of the fd_set typedef
+?C: in <sys/types.h>
+?C:.
+?C:HAS_FD_MACROS:
+?C: This symbol, when defined, indicates presence of the macros used to
+?C: manipulate an fd_set.
+?C:.
+?C:HAS_FDS_BITS:
+?C: This symbol, when defined, indicates presence of the fds_bits member in
+?C: fd_set. This knowledge is useful if fd_set is available but the macros
+?C: aren't.
+?C:.
+?H:#$d_fd_set HAS_FD_SET /**/
+?H:#$d_fd_macros HAS_FD_MACROS /**/
+?H:#$d_fds_bits HAS_FDS_BITS /**/
+?H:.
+?F:!fd_set
+: check for fd_set items
+$cat <<EOM
+
+Checking to see how well your C compiler handles fd_set and friends ...
+EOM
+?X: The FD_SET macros can be in strange places. On some SysV-based
+?X: systems, they are in <sys/bsdtypes.h>, which is included (perhaps)
+?X: by <sys/socket.h>. We won't force people to include
+?X: <sys/bsdtypes.h> because it might introduce other
+?X: incompatibilities.
+$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
+#ifdef I_SYS_SELECT
+#include <sys/select.h>
+#endif
+int main() {
+ fd_set fds;
+
+#ifdef TRYBITS
+ if(fds.fds_bits);
+#endif
+
+#if defined(FD_SET) && defined(FD_CLR) && defined(FD_ISSET) && defined(FD_ZERO)
+ exit(0);
+#else
+ exit(1);
+#endif
+}
+EOCP
+if $cc $ccflags -DTRYBITS -o fd_set fd_set.c >fd_set.out 2>&1 ; then
+ d_fds_bits="$define"
+ d_fd_set="$define"
+ echo "Well, your system knows about the normal fd_set typedef..." >&4
+ if ./fd_set; then
+ echo "and you have the normal fd_set macros (just as I'd expect)." >&4
+ d_fd_macros="$define"
+ else
+ $cat >&4 <<'EOM'
+but not the normal fd_set macros! Gaaack! I'll have to cover for you.
+EOM
+ d_fd_macros="$undef"
+ fi
+else
+ $cat <<'EOM'
+Hmm, your compiler has some difficulty with fd_set. Checking further...
+EOM
+ if $cc $ccflags -o fd_set fd_set.c >fd_set.out 2>&1 ; then
+ d_fds_bits="$undef"
+ d_fd_set="$define"
+ echo "Well, your system has some sort of fd_set available..." >&4
+ if ./fd_set; then
+ echo "and you have the normal fd_set macros." >&4
+ d_fd_macros="$define"
+ else
+ $cat <<'EOM'
+but not the normal fd_set macros! Gross! More work for me...
+EOM
+ d_fd_macros="$undef"
+ fi
+ else
+ echo "Well, you got zip. That's OK, I can roll my own fd_set stuff." >&4
+ d_fd_set="$undef"
+ d_fds_bits="$undef"
+ d_fd_macros="$undef"
+ fi
+fi
+$rm -f fd_set*
+
+
diff --git a/mcon/U/d_fdatasync.U b/mcon/U/d_fdatasync.U
new file mode 100644
index 0000000..151fc48
--- /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_fdopendir.U b/mcon/U/d_fdopendir.U
new file mode 100644
index 0000000..3fcca91
--- /dev/null
+++ b/mcon/U/d_fdopendir.U
@@ -0,0 +1,42 @@
+?RCS:
+?RCS: Copyright (c) 2015 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_fdopendir: Trylink cat i_dirent
+?MAKE: -pick add $@ %<
+?S:d_fdopendir:
+?S: This variable conditionally defines HAS_FDOPENDIR if fdopendir() is
+?S: available to open a directory using an opened file descriptor already
+?S: referring to that directory.
+?S:.
+?C:HAS_FDOPENDIR:
+?C: This symbol, if defined, indicates that the fdopendir() routine is
+?C: available to open directories using an opened file descriptor already
+?C: referring to that directory.
+?C:.
+?H:#$d_fdopendir HAS_FDOPENDIR /**/
+?H:.
+?LINT:set d_fdopendir
+: see if fdopendir exists
+$cat >try.c <<EOC
+#$i_dirent I_DIRENT
+#include <sys/types.h>
+#ifdef I_DIRENT
+#include <dirent.h>
+#endif
+int main(void)
+{
+ static DIR *d;
+ d = fdopendir(0);
+ return (DIR *) 0 == d;
+}
+EOC
+cyn=fdopendir
+set d_fdopendir
+eval $trylink
+
diff --git a/mcon/U/d_ffs.U b/mcon/U/d_ffs.U
new file mode 100644
index 0000000..93c7667
--- /dev/null
+++ b/mcon/U/d_ffs.U
@@ -0,0 +1,43 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_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: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_ffs:
+?S: This variable conditionally defines the HAS_FFS symbol, which
+?S: indicates to the C program that the ffs() routine is available
+?S: to find the first bit which is set in its integer argument.
+?S:.
+?C:HAS_FFS:
+?C: This symbol, if defined, indicates that the ffs routine is available
+?C: to find the first bit set in its argument. If it's not available,
+?C: roll your own.
+?C:.
+?H:#$d_ffs HAS_FFS /**/
+?H:.
+?LINT:set d_ffs
+: see if ffs exists
+$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
new file mode 100644
index 0000000..ff8541d
--- /dev/null
+++ b/mcon/U/d_fgetpos.U
@@ -0,0 +1,42 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_fgetpos.U,v $
+?RCS: Revision 3.0.1.1 1994/06/20 06:57:33 ram
+?RCS: patch30: created
+?RCS:
+?MAKE:d_fgetpos: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_fgetpos:
+?S: This variable conditionally defines HAS_FGETPOS if fgetpos() is
+?S: available to get the file position indicator.
+?S:.
+?C:HAS_FGETPOS:
+?C: This symbol, if defined, indicates that the fgetpos routine is
+?C: available to get the file position indicator, similar to ftell().
+?C:.
+?H:#$d_fgetpos HAS_FGETPOS /**/
+?H:.
+?LINT:set d_fgetpos
+: see if fgetpos exists
+$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
new file mode 100644
index 0000000..6adb85b
--- /dev/null
+++ b/mcon/U/d_flexfnam.U
@@ -0,0 +1,79 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_flexfnam.U,v $
+?RCS: Revision 3.0 1993/08/18 12:06:04 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_flexfnam: cat rm test Setvar
+?MAKE: -pick add $@ %<
+?S:d_flexfnam:
+?S: This variable conditionally defines the FLEXFILENAMES symbol, which
+?S: indicates that the system supports filenames longer than 14 characters.
+?S:.
+?C:FLEXFILENAMES:
+?C: This symbol, if defined, indicates that the system supports filenames
+?C: longer than 14 characters.
+?C:.
+?H:#$d_flexfnam FLEXFILENAMES /**/
+?H:.
+?T:first second tmpdir
+?LINT:set d_flexfnam
+?LINT:extern TMPDIR
+: see if we can have long filenames
+echo " "
+?X:
+?X: We have to test in both /tmp and . because of NFS (remote server may allow
+?X: long filenames while the local filesystem cannot support them). If at least
+?X: one of those file systems cannot support long filenames, then we assume the
+?X: whole system can't.
+?X:
+tmpdir="${TMPDIR:-/tmp}"
+rmlist="$rmlist $tmpdir/cf$$"
+$test -d "$tmpdir/cf$$" || mkdir "$tmpdir/cf$$"
+first=123456789abcdef
+second="$tmpdir/cf$$/$first"
+$rm -f $first $second
+if (echo hi >$first) 2>/dev/null; then
+ if $test -f 123456789abcde; then
+ echo 'You cannot have filenames longer than 14 characters. Sigh.' >&4
+ val="$undef"
+ else
+ if (echo hi >$second) 2>/dev/null; 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
+I shall consider your system cannot support long filenames at all.
+EOM
+ val="$undef"
+ else
+ echo 'You can have filenames longer than 14 characters.' >&4
+ val="$define"
+ fi
+ else
+ $cat <<'EOM'
+How confusing! Some of your filesystems are sane enough to allow filenames
+longer than 14 characters but some others like /tmp can't even think about them.
+So, for now on, I shall assume your kernel does not allow them at all.
+EOM
+ val="$undef"
+ fi
+ fi
+else
+ $cat <<'EOM'
+You can't have filenames longer than 14 chars. You can't even think about them!
+EOM
+ val="$undef"
+fi
+set d_flexfnam
+eval $setvar
+$rm -rf "$tmpdir/cf$$" 123456789abcde*
+
diff --git a/mcon/U/d_flock.U b/mcon/U/d_flock.U
new file mode 100644
index 0000000..76d20c2
--- /dev/null
+++ b/mcon/U/d_flock.U
@@ -0,0 +1,44 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_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: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_flock:
+?S: This variable conditionally defines HAS_FLOCK if flock() is
+?S: available to do file locking.
+?S:.
+?C:HAS_FLOCK (FLOCK):
+?C: This symbol, if defined, indicates that the flock routine is
+?C: available to do file locking.
+?C:.
+?H:#$d_flock HAS_FLOCK /**/
+?H:.
+?LINT:set d_flock
+: see if flock exists
+$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
new file mode 100644
index 0000000..6be9e81
--- /dev/null
+++ b/mcon/U/d_fmod.U
@@ -0,0 +1,44 @@
+?RCS: $Id$
+?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: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
+?RCS:
+?RCS: $Log: d_fmod.U,v $
+?RCS: Revision 3.0.1.1 1994/10/29 16:12:46 ram
+?RCS: patch36: created by ADO
+?RCS:
+?MAKE:d_fmod: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_fmod:
+?S: This variable conditionally defines the HAS_FMOD symbol, which
+?S: indicates to the C program that the fmod() routine is available.
+?S: See also d_drem for the drem() routine which does roughly the same.
+?S:.
+?C:HAS_FMOD :
+?C: This symbol, if defined, indicates that the fmod routine is
+?C: available to compute the remainder r=x-n*y where n=trunc(x/y).
+?C:.
+?H:#$d_fmod HAS_FMOD /**/
+?H:.
+?LINT:set d_fmod
+: see if fmod exists
+$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
new file mode 100644
index 0000000..562100a
--- /dev/null
+++ b/mcon/U/d_fork.U
@@ -0,0 +1,47 @@
+?RCS: $Id$
+?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: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
+?RCS:
+?RCS: $Log: d_fork.U,v $
+?RCS: Revision 3.0.1.1 1994/08/29 16:07:38 ram
+?RCS: patch32: created by ADO
+?RCS:
+?MAKE:d_fork: Trylink cat i_unistd
+?MAKE: -pick add $@ %<
+?S:d_fork:
+?S: This variable conditionally defines the HAS_FORK symbol, which
+?S: indicates to the C program that the fork() routine is available.
+?S:.
+?C:HAS_FORK :
+?C: This symbol, if defined, indicates that the fork routine is
+?C: available.
+?C:.
+?H:#$d_fork HAS_FORK /**/
+?H:.
+?LINT:set d_fork
+: see if fork exists
+$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
new file mode 100644
index 0000000..15e244a
--- /dev/null
+++ b/mcon/U/d_fsetpos.U
@@ -0,0 +1,42 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_fsetpos.U,v $
+?RCS: Revision 3.0.1.1 1994/06/20 06:57:38 ram
+?RCS: patch30: created
+?RCS:
+?MAKE:d_fsetpos: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_fsetpos:
+?S: This variable conditionally defines HAS_FSETPOS if fsetpos() is
+?S: available to set the file position indicator.
+?S:.
+?C:HAS_FSETPOS:
+?C: This symbol, if defined, indicates that the fsetpos routine is
+?C: available to set the file position indicator, similar to fseek().
+?C:.
+?H:#$d_fsetpos HAS_FSETPOS /**/
+?H:.
+?LINT:set d_fsetpos
+: see if fsetpos exists
+$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_fstatat.U b/mcon/U/d_fstatat.U
new file mode 100644
index 0000000..0f5b008
--- /dev/null
+++ b/mcon/U/d_fstatat.U
@@ -0,0 +1,43 @@
+?RCS:
+?RCS: Copyright (c) 2015 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_fstatat: Trylink cat i_sysstat
+?MAKE: -pick add $@ %<
+?S:d_fstatat:
+?S: This variable conditionally defines HAS_FSTATAT if fstatat() is
+?S: available to do file stats with a relative path interepreted in
+?S: the context of an opened directory.
+?S:.
+?C:HAS_FSTATAT:
+?C: This symbol, if defined, indicates that the fstatat() routine is
+?C: available to do file stats with a relative path interepreted in
+?C: the context of an opened directory.
+?C:.
+?H:#$d_fstatat HAS_FSTATAT /**/
+?H:.
+?LINT:set d_fstatat
+: see if fstatat exists
+$cat >try.c <<EOC
+#$i_sysstat I_SYS_STAT
+#include <fcntl.h> /* AT_* constants */
+#ifdef I_SYS_STAT
+#include <sys/stat.h>
+#endif
+int main(void)
+{
+ static int ret;
+ struct stat sb;
+ ret |= fstatat(AT_FDCWD, "path", &sb, 0);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=fstatat
+set d_fstatat
+eval $trylink
+
diff --git a/mcon/U/d_fsync.U b/mcon/U/d_fsync.U
new file mode 100644
index 0000000..3e9a98f
--- /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
new file mode 100644
index 0000000..f7c1095
--- /dev/null
+++ b/mcon/U/d_ftime.U
@@ -0,0 +1,100 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_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: Trylink cat i_systimeb
+?MAKE: -pick add $@ %<
+?S:d_ftime:
+?S: This variable conditionally defines the HAS_FTIME symbol, which indicates
+?S: that the ftime() routine exists. The ftime() routine is basically
+?S: a sub-second accuracy clock.
+?S:.
+?S:d_gettimeod:
+?S: This variable conditionally defines the HAS_GETTIMEOFDAY symbol, which
+?S: indicates that the gettimeofday() system call exists (to obtain a
+?S: sub-second accuracy clock). You should probably include <sys/resource.h>.
+?S:.
+?C:HAS_FTIME (FTIMER):
+?C: This symbol, if defined, indicates that the ftime() routine exists.
+?C: It is basically a sub-second accuracy clock, but is less accurate
+?C: than gettimeofday(2) anyway. The type "Timeval" should be used to
+?C: refer to "struct timeb".
+?C:.
+?C:HAS_GETTIMEOFDAY (GETTIMEOFDAY):
+?C: This symbol, if defined, indicates that the gettimeofday() system
+?C: call is available for a sub-second accuracy clock. Usually, the file
+?C: <sys/resource.h> needs to be included (see I_SYS_RESOURCE).
+?C: The type "Timeval" should be used to refer to "struct timeval".
+?C:.
+?H:#$d_ftime HAS_FTIME /**/
+?H:#$d_gettimeod HAS_GETTIMEOFDAY /**/
+?H:?%<:@if HAS_FTIME
+?H:?%<:#ifdef HAS_FTIME
+?H:?%<:#define Timeval struct timeb /* Structure used by ftime() */
+?H:?%<:#endif
+?H:?%<:@end
+?H:?%<:@if HAS_GETTIMEOFDAY
+?H:?%<:#ifdef HAS_GETTIMEOFDAY
+?H:?%<:#define Timeval struct timeval /* Structure used by gettimeofday() */
+?H:?%<:#endif
+?H:?%<:@end
+?H:.
+?X:FIXME
+?X:?I:?d_ftime:i_systimeb
+?X:?I:?d_gettimeod:i_sysresrc
+?LINT:set d_gettimeod d_ftime
+?LINT:known Timeval
+: see if gettimeofday or ftime exists
+?X:
+?X: Give priority to gettimeofday(2) because timing is more accurate
+?X:
+$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 " "
+ echo 'No ftime() nor gettimeofday() -- timing may be less accurate.' >&4
+ ;;
+esac
+
diff --git a/mcon/U/d_ftrncate.U b/mcon/U/d_ftrncate.U
new file mode 100644
index 0000000..d96b71f
--- /dev/null
+++ b/mcon/U/d_ftrncate.U
@@ -0,0 +1,46 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_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: Trylink cat i_unistd
+?MAKE: -pick add $@ %<
+?S:d_ftrncate (d_ftruncate):
+?S: This variable conditionally defines the HAS_FTRUNCATE symbol, which
+?S: indicates to the C program that the ftruncate() subroutine exists.
+?S:.
+?C:HAS_FTRUNCATE:
+?C: This symbol, if defined, indicates that the ftruncate() subroutine
+?C: exists.
+?C:.
+?H:#$d_ftrncate HAS_FTRUNCATE /**/
+?H:.
+?LINT:set d_ftrncate
+: see if ftruncate 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 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
new file mode 100644
index 0000000..bc4d89e
--- /dev/null
+++ b/mcon/U/d_gconvert.U
@@ -0,0 +1,147 @@
+?RCS: $Id$
+?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: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
+?RCS:
+?RCS: $Log: d_gconvert.U,v $
+?RCS: Revision 3.0.1.3 1997/02/28 15:33:38 ram
+?RCS: patch61: integrated new unit from perl5
+?RCS:
+?RCS: Revision 3.0.1.2 1995/07/25 13:55:59 ram
+?RCS: patch56: improved comments about the Gconvert macro (ADO)
+?RCS: patch56: force compile-link test since it may exist but be unusable (ADO)
+?RCS:
+?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 rm_try
+?MAKE: -pick add $@ %<
+?S:d_Gconvert:
+?S: This variable holds what Gconvert is defined as to convert
+?S: floating point numbers into strings. It could be 'gconvert'
+?S: or a more complex macro emulating gconvert with gcvt() or sprintf.
+?S:.
+?C:Gconvert:
+?C: This preprocessor macro is defined to convert a floating point
+?C: number to a string without a trailing decimal point. This
+?C: emulates the behavior of sprintf("%g"), but is sometimes much more
+?C: efficient. If gconvert() is not available, but gcvt() drops the
+?C: trailing decimal point, then gcvt() is used. If all else fails,
+?C: a macro using sprintf("%g") is used. Arguments for the Gconvert
+?C: macro are: value, number of digits, whether trailing zeros should
+?C: be retained, and the output buffer.
+?C: Possible values are:
+?C: d_Gconvert='gconvert((x),(n),(t),(b))'
+?C: d_Gconvert='gcvt((x),(n),(b))'
+?C: d_Gconvert='sprintf((b),"%.*g",(n),(x))'
+?C: The last two assume trailing zeros should not be kept.
+?C:.
+?H:#define Gconvert(x,n,t,b) $d_Gconvert
+?H:.
+?T: xxx_list xxx_convert
+?F:!try
+?X:
+: Check how to convert floats to strings.
+echo " "
+echo "Checking for an efficient way to convert floats to strings."
+?X: We want to be sure to drop trailing decimal points (perl5
+?X: needs this).
+$cat >try.c <<'EOP'
+#ifdef TRY_gconvert
+#define Gconvert(x,n,t,b) gconvert((x),(n),(t),(b))
+char *myname = "gconvert";
+#endif
+#ifdef TRY_gcvt
+#define Gconvert(x,n,t,b) gcvt((x),(n),(b))
+char *myname = "gcvt";
+#endif
+#ifdef TRY_sprintf
+#define Gconvert(x,n,t,b) sprintf((b),"%.*g",(n),(x))
+char *myname = "sprintf";
+#endif
+
+#include <stdio.h>
+
+int
+checkit(expect, got)
+char *expect;
+char *got;
+{
+ if (strcmp(expect, got)) {
+ printf("%s oddity: Expected %s, got %s\n",
+ myname, expect, got);
+ exit(1);
+ }
+}
+
+int
+int main()
+{
+ char buf[64];
+ buf[63] = '\0';
+
+ /* This must be 1st test on (which?) platform */
+ /* Alan Burlison <AlanBurlsin@unn.unisys.com> */
+ Gconvert(0.1, 8, 0, buf);
+ checkit("0.1", buf);
+
+ Gconvert(1.0, 8, 0, buf);
+ checkit("1", buf);
+
+ Gconvert(0.0, 8, 0, buf);
+ checkit("0", buf);
+
+ Gconvert(-1.0, 8, 0, buf);
+ checkit("-1", buf);
+
+ /* Some Linux gcvt's give 1.e+5 here. */
+ Gconvert(100000.0, 8, 0, buf);
+ checkit("100000", buf);
+
+ /* Some Linux gcvt's give -1.e+5 here. */
+ Gconvert(-100000.0, 8, 0, buf);
+ checkit("-100000", buf);
+
+ exit(0);
+}
+EOP
+?X: List of order in which to search for functions.
+?X: Usual order of efficiency is gconvert gcvt sprintf
+?X: Respect a previous or hinted value.
+case "$d_Gconvert" in
+gconvert*) xxx_list='gconvert gcvt sprintf' ;;
+gcvt*) xxx_list='gcvt gconvert sprintf' ;;
+sprintf*) xxx_list='sprintf gconvert gcvt' ;;
+*) xxx_list='gconvert gcvt sprintf' ;;
+esac
+
+for xxx_convert in $xxx_list; do
+ echo "Trying $xxx_convert"
+ $rm_try
+ if $cc $ccflags -DTRY_$xxx_convert $ldflags -o try \
+ try.c $libs > /dev/null 2>&1 ; then
+ echo "$xxx_convert" found. >&4
+ if ./try; then
+ echo "I'll use $xxx_convert to convert floats into a string." >&4
+ break;
+ else
+ echo "...But $xxx_convert didn't work as I expected."
+ fi
+ else
+ echo "$xxx_convert NOT found." >&4
+ fi
+done
+
+case "$xxx_convert" in
+gconvert) d_Gconvert='gconvert((x),(n),(t),(b))' ;;
+gcvt) d_Gconvert='gcvt((x),(n),(b))' ;;
+*) d_Gconvert='sprintf((b),"%.*g",(n),(x))' ;;
+esac
+
diff --git a/mcon/U/d_getaddrinfo.U b/mcon/U/d_getaddrinfo.U
new file mode 100644
index 0000000..d36e504
--- /dev/null
+++ b/mcon/U/d_getaddrinfo.U
@@ -0,0 +1,82 @@
+?RCS: $Id$
+?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..eac7d22
--- /dev/null
+++ b/mcon/U/d_getcontext.U
@@ -0,0 +1,38 @@
+?RCS: $Id$
+?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..651ac1f
--- /dev/null
+++ b/mcon/U/d_geteuid.U
@@ -0,0 +1,40 @@
+?RCS: $Id$
+?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
new file mode 100644
index 0000000..5f0ab24
--- /dev/null
+++ b/mcon/U/d_getgrps.U
@@ -0,0 +1,48 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_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: Trylink cat i_unistd
+?MAKE: -pick add $@ %<
+?S:d_getgrps:
+?S: This variable conditionally defines the HAS_GETGROUPS symbol, which
+?S: indicates to the C program that the getgroups() routine is available
+?S: to get the list of process groups.
+?S:.
+?C:HAS_GETGROUPS (GETGROUPS):
+?C: This symbol, if defined, indicates that the getgroups() routine is
+?C: available to get the list of process groups. If unavailable, multiple
+?C: groups are probably not supported.
+?C:.
+?H:#$d_getgrps HAS_GETGROUPS /**/
+?H:.
+?LINT:set d_getgrps
+: see if getgroups 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;
+ 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
new file mode 100644
index 0000000..1b9af63
--- /dev/null
+++ b/mcon/U/d_gethbynm.U
@@ -0,0 +1,42 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_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: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_gethbynm (d_gethhstby):
+?S: This variable conditionally defines the HAS_GETHOSTBYNAME symbol, which
+?S: indicates to the C program that the gethostbyname() routine is available
+?S: to lookup host names in some data base or other.
+?S:.
+?C:HAS_GETHOSTBYNAME (GETHOSTBYNAME):
+?C: This symbol, if defined, indicates that the gethostbyname() routine is
+?C: available to lookup host names in some data base or other.
+?C:.
+?H:#$d_gethbynm HAS_GETHOSTBYNAME /**/
+?H:.
+?LINT:set d_gethbynm
+: see if gethostbyname exists
+$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
new file mode 100644
index 0000000..b0138c5
--- /dev/null
+++ b/mcon/U/d_gethent.U
@@ -0,0 +1,41 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_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: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_gethent:
+?S: This variable conditionally defines HAS_GETHOSTENT if gethostent() is
+?S: available to dup file descriptors.
+?S:.
+?C:HAS_GETHOSTENT (GETHOSTENT):
+?C: This symbol, if defined, indicates that the gethostent routine is
+?C: available to lookup host names in some data base or other.
+?C:.
+?H:#$d_gethent HAS_GETHOSTENT /**/
+?H:.
+?LINT:set d_gethent
+: see if gethostent exists
+$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
new file mode 100644
index 0000000..66fdfb9
--- /dev/null
+++ b/mcon/U/d_gethid.U
@@ -0,0 +1,44 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_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: Trylink cat i_unistd
+?MAKE: -pick add $@ %<
+?S:d_gethid:
+?S: This variable conditionally defines HAS_GETHOSTID if gethostid() is
+?S: available to get the host id.
+?S:.
+?C:HAS_GETHOSTID (GETHOSTID):
+?C: This symbol, if defined, indicates that the gethostid system call is
+?C: available to get the host id.
+?C:.
+?H:#$d_gethid HAS_GETHOSTID /**/
+?H:.
+?LINT:set d_gethid
+: see if gethid exists
+$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
new file mode 100644
index 0000000..46691b3
--- /dev/null
+++ b/mcon/U/d_gethname.U
@@ -0,0 +1,287 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_gethname.U,v $
+?RCS: Revision 3.0.1.1 1994/10/29 16:13:00 ram
+?RCS: patch36: call ./xenix explicitly instead of relying on PATH
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:06:11 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_gethname d_uname d_phostname aphostname: phostname cat \
+ myhostname package d_portable Loc echo n c +i_whoami +usrinc \
+ Myread Guess Oldconfig Csym
+?MAKE: -pick add $@ %<
+?S:d_gethname:
+?S: This variable conditionally defines the HAS_GETHOSTNAME symbol, which
+?S: indicates to the C program that the gethostname() routine may be
+?S: used to derive the host name.
+?S:.
+?S:d_uname:
+?S: This variable conditionally defines the HAS_UNAME symbol, which
+?S: indicates to the C program that the uname() routine may be
+?S: used to derive the host name.
+?S:.
+?S:d_phostname:
+?S: This variable conditionally defines the PHOSTNAME symbol, which
+?S: contains the shell command which, when fed to popen(), may be
+?S: used to derive the host name.
+?S:.
+?S:aphostname:
+?S: Thie variable contains the command which can be used to compute the
+?S: host name. The command is fully qualified by its absolute path, to make
+?S: it safe when used by a process with super-user privileges.
+?S:.
+?C:HAS_GETHOSTNAME (GETHOSTNAME):
+?C: This symbol, if defined, indicates that the C program may use the
+?C: gethostname() routine to derive the host name. See also HAS_UNAME
+?C: and PHOSTNAME.
+?C:.
+?C:HAS_UNAME (UNAME):
+?C: This symbol, if defined, indicates that the C program may use the
+?C: uname() routine to derive the host name. See also HAS_GETHOSTNAME
+?C: and PHOSTNAME.
+?C:.
+?C:PHOSTNAME:
+?C: This symbol, if defined, indicates that the C program may use the
+?C: contents of PHOSTNAME as a command to feed to the popen() routine
+?C: to derive the host name. See also HAS_GETHOSTNAME and HAS_UNAME.
+?C: Note that the command uses a fully qualified path, so that it is safe
+?C: even if used by a process with super-user privileges.
+?C:.
+?H:#$d_gethname HAS_GETHOSTNAME /**/
+?H:#$d_uname HAS_UNAME /**/
+?H:#$d_phostname PHOSTNAME "$aphostname" /* How to get the host name */
+?H:.
+?T:file val call
+?LINT:change i_whoami
+: see how we will look up host name
+echo " "
+if false; then
+ : dummy stub to allow use of elif
+@if HAS_GETHOSTNAME
+elif set gethostname val -f d_gethname; eval $csym; $val; then
+ echo 'gethostname() found.' >&4
+ d_gethname="$define"
+ call=gethostname
+@end
+@if HAS_UNAME
+elif set uname val -f d_uname; eval $csym; $val; then
+ if ./xenix; then
+ $cat <<'EOM'
+uname() was found, but you're running xenix, and older versions of xenix
+have a broken uname(). If you don't really know whether your xenix is old
+enough to have a broken system call, use the default answer.
+
+EOM
+ dflt=y
+ case "$d_uname" in
+ "$define") dflt=n;;
+ esac
+ rp='Is your uname() broken?'
+ . ./myread
+ case "$ans" in
+ n*) d_uname="$define"; call=uname;;
+ esac
+ else
+ echo 'uname() found.' >&4
+ d_uname="$define"
+ call=uname
+ fi
+@end
+fi
+case "$d_gethname" in
+'') d_gethname="$undef";;
+esac
+case "$d_uname" in
+'') d_uname="$undef";;
+esac
+@if PHOSTNAME || MYHOSTNAME
+case "$d_uname$d_gethname" in
+*define*)
+ dflt=n
+ cat <<EOM
+
+Every now and then someone has a $call() that lies about the hostname
+but can't be fixed for political or economic reasons. If you wish, I can
+@if MYHOSTNAME && PHOSTNAME
+pretend $call() isn't there and maybe compile in the hostname or
+compute it from the '$phostname' command at run-time.
+@elsif MYHOSTNAME
+pretend $call() isn't there and maybe compile in the hostname.
+@elsif PHOSTNAME
+pretend $call() isn't there and maybe compute hostname at run-time
+thanks to the '$phostname' command.
+@elsif WHOAMI
+get the hostname from whomai.h (provided you have one).
+@else
+simply ignore your host name and use someting like "noname" instead.
+@end
+
+EOM
+ rp="Shall I ignore $call() from now on?"
+ . ./myread
+ case "$ans" in
+ y*) d_uname="$undef" d_gethname="$undef"; $echo $n "Okay...$c";;
+ esac;;
+esac
+@end
+@if PHOSTNAME || aphostname
+?X: Compute the full path name for the command
+case "$phostname" in
+'') aphostname='';;
+*) case "$aphostname" in
+ /*) ;;
+ *) set X $phostname
+ shift
+ file=$1
+ shift
+ file=`./loc $file $file $pth`
+ aphostname=`echo $file $*`
+ ;;
+ esac
+ ;;
+esac
+@end
+@if PHOSTNAME && MYHOSTNAME
+case "$d_uname$d_gethname" in
+*define*) ;;
+*)
+ case "$phostname" in
+ '') ;;
+ *)
+ $cat <<EOT
+
+There is no gethostname() or uname() on this system. You have two
+possibilities at this point:
+
+1) You can have your host name ($myhostname) compiled into $package, which
+ lets $package start up faster, but makes your binaries non-portable, or
+2) you can have $package use a
+
+ popen("$aphostname","r")
+
+ which will start slower but be more portable.
+
+@ if WHOAMI
+Option 1 will give you the option of using whoami.h if you have one.
+@ end
+If you want option 2 but with a different command, you can edit config.sh at
+the end of this shell script.
+
+EOT
+ case "$d_phostname" in
+ "$define") dflt=n;;
+ "$undef") dflt=y;;
+ '')
+ case "$d_portable" in
+ "$define") dflt=n ;;
+ *) dflt=y ;;
+ esac;;
+ esac
+ rp="Do you want your host name compiled in?"
+ . ./myread
+ case "$ans" in
+ n*) d_phostname="$define" ;;
+ *) aphostname=''; d_phostname="$undef";;
+ esac;;
+ esac
+ case "$aphostname" in
+ '')
+@ if WHOAMI
+ case "$i_whoami" in
+ "$define")
+ dflt=y
+ $cat <<EOM
+
+No hostname function--you can either use the whoami.h file, which has this line:
+
+ `grep sysname $usrinc/whoami.h`
+
+or you can have the name we came up with earlier ($myhostname) hardwired in.
+EOM
+ rp="Use whoami.h to get hostname?"
+ . ./myread
+ case "$ans" in
+ n*) i_whoami="$undef";;
+ esac
+ ;;
+ "$undef")
+ $cat <<EOM
+No hostname function and no whoami.h -- hardwiring "$myhostname".
+EOM
+ ;;
+ esac;;
+@ else
+ echo 'No hostname function -- hardwiring "'$myhostname'".' >&4;;
+@ end
+ esac;;
+esac
+@elsif PHOSTNAME
+case "$d_uname$d_gethname" in
+*define*) ;;
+*)
+ case "$phostname" in
+ '')
+@ if WHOAMI
+ case "$i_whoami" in
+ "$define")
+ $cat <<EOM
+
+No hostname function--we'll use the whoami.h file, which has this line:
+
+ `grep sysname $usrinc/whoami.h`
+
+EOM
+ ;;
+ *) echo "There will be no way for $package to get your hostname." >&4;;
+ esac;;
+@ else
+ echo "There will be no way for $package to get your hostname." >&4;;
+@ end
+ *)
+ echo "I'll use 'popen("'"'$aphostname'", "r")'"' to get your hostname." >&4
+ ;;
+ esac;;
+esac
+@elsif MYHOSTNAME
+case "$d_uname$d_gethname" in
+*define*) ;;
+*)
+@ if WHOAMI
+ case "$i_whoami" in
+ "$define")
+ dflt=y
+ $cat <<EOM
+
+No hostname function--you can either use the whoami.h file, which has this line:
+
+ `grep sysname $usrinc/whoami.h`
+
+or you can have the name we came up with earlier ($myhostname) hardwired in.
+EOM
+ rp="Use whoami.h to get hostname?"
+ . ./myread
+ case "$ans" in
+ n*) i_whoami="$undef";;
+ esac
+ ;;
+ "$undef")
+ echo 'No whoami.h--hardwiring "'$myhostname'".' >&4;;
+ esac;;
+@ else
+ echo 'Hardwiring "'$myhostname'".' >&4;;
+@ end
+esac
+@end
+case "$d_phostname" in
+'') d_phostname="$undef";;
+esac
+
diff --git a/mcon/U/d_getifaddrs.U b/mcon/U/d_getifaddrs.U
new file mode 100644
index 0000000..952726f
--- /dev/null
+++ b/mcon/U/d_getifaddrs.U
@@ -0,0 +1,54 @@
+?RCS: $Id$
+?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..124cde8
--- /dev/null
+++ b/mcon/U/d_getinvent.U
@@ -0,0 +1,37 @@
+?RCS: $Id$
+?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
new file mode 100644
index 0000000..b3c7581
--- /dev/null
+++ b/mcon/U/d_getlogin.U
@@ -0,0 +1,47 @@
+?RCS: $Id$
+?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: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
+?RCS:
+?RCS: $Log: d_getlogin.U,v $
+?RCS: Revision 3.0.1.1 1994/08/29 16:07:41 ram
+?RCS: patch32: created by ADO
+?RCS:
+?MAKE:d_getlogin: Trylink cat i_unistd
+?MAKE: -pick add $@ %<
+?S:d_getlogin:
+?S: This variable conditionally defines the HAS_GETLOGIN symbol, which
+?S: indicates to the C program that the getlogin() routine is available
+?S: to get the login name.
+?S:.
+?C:HAS_GETLOGIN :
+?C: This symbol, if defined, indicates that the getlogin routine is
+?C: available to get the login name.
+?C:.
+?H:#$d_getlogin HAS_GETLOGIN /**/
+?H:.
+?LINT:set d_getlogin
+: see if getlogin exists
+$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..10af525
--- /dev/null
+++ b/mcon/U/d_getnameinfo.U
@@ -0,0 +1,73 @@
+?RCS: $Id$
+?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
new file mode 100644
index 0000000..61accb7
--- /dev/null
+++ b/mcon/U/d_getopt.U
@@ -0,0 +1,46 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_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: Trylink cat i_unistd
+?MAKE: -pick add $@ %<
+?S:d_getopt:
+?S: This variable conditionally defines the HAS_GETOPT symbol, which
+?S: indicates that the getopt() routine exists. The getopt() routine
+?S: parses command line options in a standard fashion.
+?S:.
+?C:HAS_GETOPT (GETOPT):
+?C: This symbol, if defined, indicates that the getopt() routine exists.
+?C:.
+?H:#$d_getopt HAS_GETOPT /**/
+?H:.
+?LINT:set d_getopt
+: see if getopt exists
+$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
new file mode 100644
index 0000000..2499ebe
--- /dev/null
+++ b/mcon/U/d_getpagsz.U
@@ -0,0 +1,122 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_getpagsz.U,v $
+?RCS: Revision 3.0.1.1 1994/10/29 16:13:10 ram
+?RCS: patch36: added ?F: line for metalint file checking
+?RCS:
+?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 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()
+?S: is available to get the system page size.
+?S:.
+?S:pagesize (pagsize):
+?S: This variable holds the size in bytes of a system page.
+?S:.
+?C:HAS_GETPAGESIZE (GETPAGESIZE):
+?C: This symbol, if defined, indicates that the getpagesize system call
+?C: is available to get system page size, which is the granularity of
+?C: many memory management calls.
+?C:.
+?X: Don't name it PAGESIZE, this is sometimes used by <sys/param.h>
+?C:PAGESIZE_VALUE (PAGSIZE):
+?C: This symbol holds the size in bytes of a system page (obtained via
+?C: the getpagesize() system call at configuration time or asked to the
+?C: user if the system call is not available).
+?C:.
+?H:#$d_getpagsz HAS_GETPAGESIZE /**/
+?H:#define PAGESIZE_VALUE $pagesize /* System page size, in bytes */
+?H:.
+?F:!page
+?T:guess
+?LINT:set d_getpagsz
+: see if getpagesize exists
+$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
+echo " "
+guess=' (OK to guess)'
+case "$pagesize" in
+'')
+ $cat >page.c <<EOP
+#include <stdio.h>
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ printf("%d\n", getpagesize());
+}
+EOP
+ echo "Computing the granularity of memory management calls..." >&4
+ dflt='4096'
+ case "$d_getpagsz" in
+ "$define")
+ if $cc $ccflags -o page page.c $libs >/dev/null 2>&1; then
+ dflt=`./page`
+ guess=''
+ else
+ echo "(I can't seem to compile the test program--guessing)"
+ fi
+ ;;
+ *)
+ if $cc $ccflags -o page page.c $libs -lPW >/dev/null 2>&1; then
+ dflt=`./page`
+ guess=''
+ echo "(For your eyes only: I used the getpagesize() from -lPW.)"
+ else
+ if $contains PAGESIZE `./findhdr sys/param.h` >/dev/null 2>&1; then
+ $cat >page.c <<EOP
+#include <sys/param.h>
+#include <stdio.h>
+int main(void)
+{
+ printf("%d\n", (int) PAGESIZE);
+}
+EOP
+ if $cc $ccflags -o page page.c $libs >/dev/null 2>&1; then
+ dflt=`./page`
+ guess=''
+ echo "(Using value of PAGESIZE found in <sys/param.h>.)"
+ fi
+ fi
+ fi
+ ;;
+ esac
+ ;;
+*) dflt="$pagesize"; guess='';;
+esac
+rp="What is the system page size, in bytes$guess?"
+. ./myread
+pagesize=$ans
+$rm -f page.c page
+
+@end
diff --git a/mcon/U/d_getpgid.U b/mcon/U/d_getpgid.U
new file mode 100644
index 0000000..e318ce2
--- /dev/null
+++ b/mcon/U/d_getpgid.U
@@ -0,0 +1,48 @@
+?RCS: $Id$
+?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 License,
+?RCS: as specified in the 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_getpgid.U,v $
+?RCS: Revision 3.0.1.1 1997/02/28 15:33:44 ram
+?RCS: patch61: created
+?RCS:
+?MAKE:d_getpgid: Trylink cat i_unistd
+?MAKE: -pick add $@ %<
+?S:d_getpgid:
+?S: This variable conditionally defines the HAS_GETPGID symbol, which
+?S: indicates to the C program that the getpgid(pid) function
+?S: is available to get the process group id.
+?S:.
+?C:HAS_GETPGID:
+?C: This symbol, if defined, indicates to the C program that
+?C: the getpgid(pid) function is available to get the
+?C: process group id.
+?C:.
+?H:#$d_getpgid HAS_GETPGID /**/
+?H:.
+?LINT:set d_getpgid
+: see if getpgid exists
+$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
new file mode 100644
index 0000000..c11c524
--- /dev/null
+++ b/mcon/U/d_getpgrp.U
@@ -0,0 +1,83 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_getpgrp.U,v $
+?RCS: Revision 3.0.1.1 1997/02/28 15:34:28 ram
+?RCS: patch61: new USE_BSD_GETPGRP to detect the getpgrp() flavour
+?RCS:
+?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: Trylink Setvar cat i_unistd
+?MAKE: -pick add $@ %<
+?S:d_getpgrp:
+?S: This variable conditionally defines HAS_GETPGRP if getpgrp() is
+?S: available to get the current process group.
+?S:.
+?S:d_bsdgetpgrp:
+?S: This variable conditionally defines USE_BSD_GETPGRP if
+?S: getpgrp needs one arguments whereas USG one needs none.
+?S:.
+?C:HAS_GETPGRP (GETPGRP):
+?C: This symbol, if defined, indicates that the getpgrp routine is
+?C: available to get the current process group.
+?C:.
+?C:USE_BSD_GETPGRP:
+?C: This symbol, if defined, indicates that getpgrp needs one
+?C: arguments whereas the USG one needs none.
+?C:.
+?H:#$d_getpgrp HAS_GETPGRP /**/
+?H:#$d_bsdgetpgrp USE_BSD_GETPGRP /**/
+?H:.
+?LINT:set d_getpgrp d_bsdgetpgrp
+: see if getpgrp exists
+$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, 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
+int main(void)
+{
+ static pid_t ret;
+ ret |= getpgrp();
+ return ret ? 0 : 1;
+}
+EOC
+ cyn="whether you have a USG-like getpgrp() instead"
+ set d_getpgrp
+ eval $trylink
+ ;;
+esac
+
diff --git a/mcon/U/d_getpgrp2.U b/mcon/U/d_getpgrp2.U
new file mode 100644
index 0000000..67aec2a
--- /dev/null
+++ b/mcon/U/d_getpgrp2.U
@@ -0,0 +1,46 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_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: Trylink cat i_unistd
+?MAKE: -pick add $@ %<
+?S:d_getpgrp2:
+?S: This variable conditionally defines the HAS_GETPGRP2 symbol, which
+?S: indicates to the C program that the getpgrp2() (as in DG/UX) routine
+?S: is available to get the current process group.
+?S:.
+?C:HAS_GETPGRP2 (GETPGRP2):
+?C: This symbol, if defined, indicates that the getpgrp2() (as in DG/UX)
+?C: routine is available to get the current process group.
+?C:.
+?H:#$d_getpgrp2 HAS_GETPGRP2 /**/
+?H:.
+?LINT:set d_getpgrp2
+: see if getpgrp2 exists
+$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
new file mode 100644
index 0000000..c98debc
--- /dev/null
+++ b/mcon/U/d_getppid.U
@@ -0,0 +1,48 @@
+?RCS: $Id$
+?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: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
+?RCS:
+?RCS: $Log: d_getppid.U,v $
+?RCS: Revision 3.0.1.1 1994/08/29 16:07:45 ram
+?RCS: patch32: created by ADO
+?RCS:
+?MAKE:d_getppid: Trylink cat i_unistd
+?MAKE: -pick add $@ %<
+?S:d_getppid:
+?S: This variable conditionally defines the HAS_GETPPID symbol, which
+?S: indicates to the C program that the getppid() routine is available
+?S: to get the parent process ID.
+?S:.
+?C:HAS_GETPPID :
+?C: This symbol, if defined, indicates that the getppid routine is
+?C: available to get the parent process ID.
+?C:.
+?H:#$d_getppid HAS_GETPPID /**/
+?H:.
+?LINT:set d_getppid
+: see if getppid exists
+$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
new file mode 100644
index 0000000..74bf4bd
--- /dev/null
+++ b/mcon/U/d_getprior.U
@@ -0,0 +1,47 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_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: Trylink cat i_sysresrc
+?MAKE: -pick add $@ %<
+?S:d_getprior:
+?S: This variable conditionally defines HAS_GETPRIORITY if getpriority()
+?S: is available to get a process's priority.
+?S:.
+?C:HAS_GETPRIORITY (GETPRIORITY):
+?C: This symbol, if defined, indicates that the getpriority routine is
+?C: available to get a process's priority.
+?C:.
+?H:#$d_getprior HAS_GETPRIORITY /**/
+?H:.
+: see if getpriority exists
+?LINT:set d_getprior
+$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_getprogname.U b/mcon/U/d_getprogname.U
new file mode 100644
index 0000000..a5a6175
--- /dev/null
+++ b/mcon/U/d_getprogname.U
@@ -0,0 +1,40 @@
+?RCS:
+?RCS: Copyright (c) 2015 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_getprogname: Trylink cat i_stdlib
+?MAKE: -pick add $@ %<
+?S:d_getprogname:
+?S: This variable conditionally defines the HAS_GETPROGNAME
+?S: symbol, which indicates to the C program that getprogname()
+?S: is available to get the program name.
+?S:.
+?C:HAS_GETPROGNAME:
+?C: This symbol is defined when getprogname() is there to get the
+?C: program name.
+?C:.
+?H:#$d_getprogname HAS_GETPROGNAME
+?H:.
+?LINT: set d_getprogname
+: can we use getprogname?
+$cat >try.c <<EOC
+#include <stdio.h>
+#$i_stdlib I_STDLIB
+#ifdef I_STDLIB
+#include <stdlib.h>
+#endif
+int main(void)
+{
+ printf("%s\n", getprogname());
+ return 0;
+}
+EOC
+cyn=getprogname
+set d_getprogname
+eval $trylink
+
diff --git a/mcon/U/d_getpwent.U b/mcon/U/d_getpwent.U
new file mode 100644
index 0000000..b16a012
--- /dev/null
+++ b/mcon/U/d_getpwent.U
@@ -0,0 +1,42 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_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: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_getpwent:
+?S: This variable conditionally defines the HAS_GETPWENT symbol, which
+?S: indicates to the C program that it should use the getpwent()
+?S: routine instead of the getpw() routine.
+?S:.
+?C:HAS_GETPWENT (GETPWENT):
+?C: This symbol, if defined, indicates that the getpwent() routine
+?C: should be used instead of the getpw() routine.
+?C:.
+?H:#$d_getpwent HAS_GETPWENT /**/
+?H:.
+?LINT:set d_getpwent
+: see if there is a getpwent
+$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 $trylink
+
diff --git a/mcon/U/d_getpwnam.U b/mcon/U/d_getpwnam.U
new file mode 100644
index 0000000..f2c784f
--- /dev/null
+++ b/mcon/U/d_getpwnam.U
@@ -0,0 +1,38 @@
+?RCS:
+?RCS: Copyright (c) 2015 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_getpwnam: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_getpwnam:
+?S: This variable conditionally defines the HAS_GETPWNAM symbol, which
+?S: indicates to the C program that it can use the getpwnam() routine
+?S: to get the /etc/passwd structure entries for given user name.
+?S:.
+?C:HAS_GETPWNAM:
+?C: This symbol, if defined, indicates that the getpwnam() routine
+?C: is available to get the /etc/passwd structure entries for given
+?C: user name.
+?C:.
+?H:#$d_getpwnam HAS_GETPWNAM /**/
+?H:.
+?LINT:set d_getpwnam
+: see if there is a getpwnam
+$cat >try.c <<EOC
+#include <pwd.h>
+int main(void)
+{
+ struct passwd pw;
+ pw = *getpwnam("foo");
+ return pw.pw_name ? 0 : 1;
+}
+EOC
+cyn=getpwnam
+set d_getpwnam
+eval $trylink
+
diff --git a/mcon/U/d_getpwuid.U b/mcon/U/d_getpwuid.U
new file mode 100644
index 0000000..af5eb0d
--- /dev/null
+++ b/mcon/U/d_getpwuid.U
@@ -0,0 +1,38 @@
+?RCS:
+?RCS: Copyright (c) 2015 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_getpwuid: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_getpwuid:
+?S: This variable conditionally defines the HAS_GETPWUID symbol, which
+?S: indicates to the C program that it can use the getpwuid() routine
+?S: to get the /etc/passwd structure entries for given user ID.
+?S:.
+?C:HAS_GETPWUID:
+?C: This symbol, if defined, indicates that the getpwuid() routine
+?C: is available to get the /etc/passwd structure entries for given
+?C: user ID.
+?C:.
+?H:#$d_getpwuid HAS_GETPWUID /**/
+?H:.
+?LINT:set d_getpwuid
+: see if there is a getpwuid
+$cat >try.c <<EOC
+#include <pwd.h>
+int main(void)
+{
+ struct passwd pw;
+ pw = *getpwuid(0);
+ return pw.pw_name ? 0 : 1;
+}
+EOC
+cyn=getpwuid
+set d_getpwuid
+eval $trylink
+
diff --git a/mcon/U/d_getrlimit.U b/mcon/U/d_getrlimit.U
new file mode 100644
index 0000000..b50d86f
--- /dev/null
+++ b/mcon/U/d_getrlimit.U
@@ -0,0 +1,46 @@
+?RCS: $Id$
+?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..9e2d4eb
--- /dev/null
+++ b/mcon/U/d_gettext.U
@@ -0,0 +1,37 @@
+?RCS: $Id$
+?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..49071b8
--- /dev/null
+++ b/mcon/U/d_getuid.U
@@ -0,0 +1,40 @@
+?RCS: $Id$
+?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
new file mode 100644
index 0000000..d55cd13
--- /dev/null
+++ b/mcon/U/d_getwd.U
@@ -0,0 +1,48 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_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: Trylink cat i_unistd
+?MAKE: -pick add $@ %<
+?S:d_getwd:
+?S: This variable conditionally defines HAS_GETWD if getwd() is
+?S: available to get working directory. If not, you should
+?S: probably use getcwd().
+?S:.
+?C:HAS_GETWD (GETWD):
+?C: This symbol, if defined, indicates that the getwd routine is
+?C: available to get working directory. If not, you should
+?C: probably use getcwd().
+?C:.
+?H:#$d_getwd HAS_GETWD /**/
+?H:.
+?LINT:set d_getwd
+: see if getwd exists
+$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 $trylink
+
diff --git a/mcon/U/d_gnugettext.U b/mcon/U/d_gnugettext.U
new file mode 100644
index 0000000..8292cd7
--- /dev/null
+++ b/mcon/U/d_gnugettext.U
@@ -0,0 +1,54 @@
+?RCS: $Id$
+?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
new file mode 100644
index 0000000..a839def
--- /dev/null
+++ b/mcon/U/d_gnulibc.U
@@ -0,0 +1,98 @@
+?RCS: $Id$
+?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 License,
+?RCS: as specified in the 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_gnulibc gnulibc_version: Myread Oldconfig Setvar rm_try \
+ cat Compile run
+?MAKE: -pick add $@ %<
+?S:d_gnulibc:
+?S: Defined if we're dealing with the GNU C Library.
+?S:.
+?S:gnulibc_version:
+?S: This variable contains the version number of the GNU C library.
+?S: It is usually something like '2.2.5'. It is a plain '' if this
+?S: is not the GNU C library, or if the version is unknown.
+?S:.
+?C:HAS_GNULIBC ~ %<:
+?C: This symbol, if defined, indicates to the C program that
+?C: the GNU C library is being used. A better check is to use
+?C: the __GLIBC__ and __GLIBC_MINOR__ symbols supplied with glibc.
+?C:.
+?H:?%<:#$d_gnulibc HAS_GNULIBC /**/
+?H:?%<:#if defined(HAS_GNULIBC) && !defined(_GNU_SOURCE)
+?H:?%<:#define _GNU_SOURCE
+?H:?%<:#endif
+?H:.
+?F:!glibc.ver !try.c !try
+?LINT: set d_gnulibc
+?LINT: usefile try.c
+?LINT: known _GNU_SOURCE
+?X: gnulibc can be executed by calling __libc_main().
+?X: Ulrich Drepper doesn't think any other libc does that,
+?X: but we check if it says 'GNU C Library' to be sure.
+?X:
+?X: Alas, as of 3/1998 glibc 2.0.7 reportedly isn't going to
+?X: have __libc_main() anymore. :-(. Fortunately, all released
+?X: versions of glibc 2.x.x _do_ have CPP variables. For 2.0.6,
+?X: they are:
+?X: #define __GLIBC__ 2
+?X: #define__GLIBC_MINOR__ 0.
+?X: (The '6' isn't available :-(.
+?X: glibc2.1 will also have
+?X: extern const char * __gnu_get_libc_release(void);
+?X: extern const char * __gnu_get_libc_version(void);
+?X: functions. --thanks to Andreas Jaeger. --AD 6/1998.
+?X: Although the exact format isn't documented, __gnu_get_libc_version()
+?X: returns a simple string '2.1.3' in glibc 2.1.3.
+?X:
+: determine whether we are using a GNU C library
+echo " "
+echo "Checking for GNU C Library..." >&4
+cat >try.c <<'EOCP'
+/* Find out version of GNU C library. __GLIBC__ and __GLIBC_MINOR__
+ alone are insufficient to distinguish different versions, such as
+ 2.0.6 and 2.0.7. The function gnu_get_libc_version() appeared in
+ libc version 2.1.0. A. Dougherty, June 3, 2002.
+*/
+#include <stdio.h>
+int main(void)
+{
+#ifdef __GLIBC__
+# ifdef __GLIBC_MINOR__
+# if __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1
+# include <gnu/libc-version.h>
+ printf("%s\n", gnu_get_libc_version());
+# else
+ printf("%d.%d\n", __GLIBC__, __GLIBC_MINOR__);
+# endif
+# else
+ printf("%d\n", __GLIBC__);
+# endif
+ return 0;
+#else
+ return 1;
+#endif
+}
+EOCP
+set try
+if eval $compile_ok && $run ./try > glibc.ver; then
+ val="$define"
+ gnulibc_version=`$cat glibc.ver`
+ echo "You are using the GNU C Library version $gnulibc_version"
+else
+ val="$undef"
+ gnulibc_version=''
+ echo "You are not using the GNU C Library"
+fi
+$rm_try glibc.ver
+set d_gnulibc
+eval $setvar
+
diff --git a/mcon/U/d_group.U b/mcon/U/d_group.U
new file mode 100644
index 0000000..3c8f914
--- /dev/null
+++ b/mcon/U/d_group.U
@@ -0,0 +1,23 @@
+?RCS: $Id$
+?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: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
+?RCS:
+?RCS: $Log: d_group.U,v $
+?RCS: Revision 3.0.1.2 1997/02/28 15:34:52 ram
+?RCS: patch61: useless unit dropped.
+?RCS:
+?RCS: Revision 3.0.1.1 1994/08/29 16:07:48 ram
+?RCS: patch32: created by ADO
+?RCS:
+?X:
+?X: Useless unit dropped.
+?X:
+?LINT:empty
diff --git a/mcon/U/d_havetlib.U b/mcon/U/d_havetlib.U
new file mode 100644
index 0000000..24017ad
--- /dev/null
+++ b/mcon/U/d_havetlib.U
@@ -0,0 +1,125 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_havetlib.U,v $
+?RCS: Revision 3.0.1.2 1997/02/28 15:36:31 ram
+?RCS: patch61: replaced .a with $_a all over the place
+?RCS: patch61: likewise for .o replaced by $_o
+?RCS:
+?RCS: Revision 3.0.1.1 1994/05/06 14:44:06 ram
+?RCS: patch23: added AIX support to accept shared lib stub as termlib (WED)
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:06:19 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_havetlib termlib: cat contains Myread Loc Filexp Oldconfig libpth \
+ test uname _a _o
+?MAKE: -pick add $@ %<
+?S:d_havetlib:
+?S: This variable conditionally defines the HAS_TERMLIB symbol, which
+?S: indicates to the C program that termlib-style routines are available.
+?S:.
+?S:termlib:
+?S: This variable contains the argument to pass to the loader to get
+?S: termlib-style routines. It is up to the Makefile.SH to make sure
+?S: the value gets to the right command. Note that on many systems the
+?S: termlib routines are emulated by the curses or terminfo library.
+?S:.
+?C:HAS_TERMLIB (HAVETERMLIB):
+?C: This symbol, when defined, indicates that termlib-style routines
+?C: are available. There is nothing to include.
+?C:.
+?H:#$d_havetlib HAS_TERMLIB /**/
+?H:.
+?T:xxx
+: where do we get termlib routines from
+echo " "
+xxx=`./loc libcurses$_a x $libpth`
+case "$xxx" in
+/*)
+ ar t $xxx >grimble
+ if $contains tputs$_o grimble >/dev/null 2>&1; then
+ termlib='-lcurses'
+ d_havetlib="$define"
+ echo "Terminfo library found." >&4
+ elif $test "x`$uname 2>/dev/null`" = xAIX; then
+ # Ok, do the AIX shr.o fun thing
+ /usr/ccs/bin/nm -en $xxx 2>/dev/null >grimble
+ if $contains '^tputs .*|extern|' grimble >/dev/null 2>&1; then
+ termlib='-lcurses'
+ d_havetlib="$define"
+ echo "AIX Terminfo library found." >&4
+ else
+ xxx=x
+ fi
+ else
+ xxx=x
+ fi
+ rm -f grimble
+ ;;
+esac
+case "$xxx" in
+x)
+ xxx=`./loc libtermlib$_a x $libpth`
+ case "$xxx" in
+ /usr/lib*|/lib*)
+ termlib='-ltermlib'
+ d_havetlib="$define"
+ echo "Termlib library found." >&4
+ ;;
+ /*)
+ termlib="$xxx"
+ d_havetlib="$define"
+ echo "Termlib library found." >&4
+ ;;
+ *)
+ xxx=`./loc libtermcap$_a x $libpth`
+ case "$xxx" in
+ /usr/lib*|/lib*)
+ termlib='-ltermcap'
+ d_havetlib="$define"
+ echo "Termcap library found." >&4
+ ;;
+ /*)
+ termlib="$xxx"
+ d_havetlib="$define"
+ echo "Termcap library found." >&4
+ ;;
+ *)
+ case "$termlib" in
+ '')
+ dflt=y
+rp="Your system appears to NOT have termlib-style routines. Is this true?"
+ . ./myread
+ case "$ans" in
+ n*|f*) d_havetlib="$define"
+ $cat <<'EOM'
+Then where are the termlib-style routines kept? Specify either -llibname
+or a full pathname (~name ok).
+
+EOM
+ dflt=''
+ rp='Specify termlib path:'
+ . ./myread
+ termlib=`./filexp $ans`
+ ;;
+ *)
+ d_havetlib="$undef"
+ termlib=''
+ echo "You will have to play around with term.c then." >&4
+ ;;
+ esac
+ echo " ";;
+ *) echo "You said termlib was $termlib before." >&4;;
+ esac;;
+ esac;;
+ esac;;
+esac
+
diff --git a/mcon/U/d_herror.U b/mcon/U/d_herror.U
new file mode 100644
index 0000000..e379850
--- /dev/null
+++ b/mcon/U/d_herror.U
@@ -0,0 +1,36 @@
+?RCS: $Id$
+?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
new file mode 100644
index 0000000..ffa8a5d
--- /dev/null
+++ b/mcon/U/d_hidnet.U
@@ -0,0 +1,68 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_hidnet.U,v $
+?RCS: Revision 3.0 1993/08/18 12:06:20 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_hidnet hiddennet: cat sed myhostname mydomain Myread Oldconfig
+?MAKE: -pick add $@ %<
+?S:d_hidnet:
+?S: This variable conditionally defines the symbol HIDDEN_NET, which
+?S: tells the C program that it should pretend it is on a different
+?S: host for purposes of advertising a mailing address.
+?S:.
+?S:hiddennet:
+?S: This variable contains the value eventually given to the symbol
+?S: HIDDEN_NET, if d_hidnet defines it. If defined, it's the name
+?S: of the host which serves as the mail server for a network that
+?S: is invisible to the outside world.
+?S:.
+?C:HIDDEN_NET (HIDDENNET):
+?C: This symbol, if defined, contains the host name that you want to
+?C: advertise to the outside world. This name can be different from
+?C: your actual host name, as long as the machine you specify knows
+?C: how to forward mail to you.
+?C:.
+?H:#$d_hidnet HIDDEN_NET "$hiddennet" /**/
+?H:.
+: now get the host name to advertise as our mailing address
+case "$hiddennet" in
+'') dflt=n;;
+*) dflt=y;;
+esac
+$cat <<EOM
+
+Some sites are on "hidden" networks, in the sense that the network appears
+to the outside world as a single machine. The advertised name of any host
+on this hidden network is the name of one machine on the local network which
+knows how to forward mail to any other host on the hidden network.
+
+Do you wish to advertise a different hostname to the world than the one your
+own host ($myhostname$mydomain) has?
+
+EOM
+rp='Use "hidden" network?'
+. ./myread
+case "$ans" in
+n*) d_hidnet="$undef" hiddennet='';;
+*)
+ d_hidnet="$define"
+ echo " "
+ case "$hiddennet" in
+ '') dflt=`echo $mydomain | $sed -e 's/^\.//'`;;
+ *) dflt="$hiddennet";;
+ esac
+ rp='What hostname do you wish to advertise?'
+ . ./myread
+ hiddennet="$ans"
+ ;;
+esac
+
diff --git a/mcon/U/d_hstrerror.U b/mcon/U/d_hstrerror.U
new file mode 100644
index 0000000..5e6a3f2
--- /dev/null
+++ b/mcon/U/d_hstrerror.U
@@ -0,0 +1,37 @@
+?RCS: $Id$
+?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
new file mode 100644
index 0000000..5e601b0
--- /dev/null
+++ b/mcon/U/d_htonl.U
@@ -0,0 +1,80 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_htonl.U,v $
+?RCS: Revision 3.0.1.2 1994/08/29 16:09:25 ram
+?RCS: patch32: now properly handles htonl() and friends when macros (ADO)
+?RCS:
+?RCS: Revision 3.0.1.1 1994/05/06 14:45:00 ram
+?RCS: patch23: now also check for htonl() macro (ADO)
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:06:22 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?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
+?S: friends are available to do network order byte swapping.
+?S:.
+?C:HAS_HTONL (HTONL):
+?C: This symbol, if defined, indicates that the htonl() routine (and
+?C: friends htons() ntohl() ntohs()) are available to do network
+?C: order byte swapping.
+?C:.
+?C:HAS_HTONS (HTONS):
+?C: This symbol, if defined, indicates that the htons() routine (and
+?C: friends htonl() ntohl() ntohs()) are available to do network
+?C: order byte swapping.
+?C:.
+?C:HAS_NTOHL (NTOHL):
+?C: This symbol, if defined, indicates that the ntohl() routine (and
+?C: friends htonl() htons() ntohs()) are available to do network
+?C: order byte swapping.
+?C:.
+?C:HAS_NTOHS (NTOHS):
+?C: This symbol, if defined, indicates that the ntohs() routine (and
+?C: friends htonl() htons() ntohl()) are available to do network
+?C: order byte swapping.
+?C:.
+?H:#$d_htonl HAS_HTONL /**/
+?H:#$d_htonl HAS_HTONS /**/
+?H:#$d_htonl HAS_NTOHL /**/
+?H:#$d_htonl HAS_NTOHS /**/
+?H:.
+?LINT:set d_htonl
+: see if htonl --and friends-- exist
+$cat >try.c <<EOC
+#include <stdio.h>
+#include <sys/types.h>
+#$i_niin I_NETINET_IN
+#ifdef I_NETINET_IN
+#include <netinet/in.h>
+#endif
+#$i_sysin I_SYS_IN
+#ifdef I_SYS_IN
+#include <sys/in.h>
+#endif
+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 $trylink
+
diff --git a/mcon/U/d_iconv.U b/mcon/U/d_iconv.U
new file mode 100644
index 0000000..377f789
--- /dev/null
+++ b/mcon/U/d_iconv.U
@@ -0,0 +1,47 @@
+?RCS: $Id$
+?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..124e09c
--- /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
new file mode 100644
index 0000000..5ac8957
--- /dev/null
+++ b/mcon/U/d_inetaton.U
@@ -0,0 +1,48 @@
+?RCS: $Id$
+?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 License,
+?RCS: as specified in the 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_inetaton.U,v $
+?RCS: Revision 3.0.1.1 1997/02/28 15:36:35 ram
+?RCS: patch61: created
+?RCS:
+?MAKE:d_inetaton: Trylink cat i_arpainet
+?MAKE: -pick add $@ %<
+?S:d_inetaton:
+?S: This variable conditionally defines the HAS_INET_ATON symbol, which
+?S: indicates to the C program that the inet_aton() function is available
+?S: to parse IP address "dotted-quad" strings.
+?S:.
+?C:HAS_INET_ATON:
+?C: This symbol, if defined, indicates to the C program that the
+?C: inet_aton() function is available to parse IP address "dotted-quad"
+?C: strings.
+?C:.
+?H:#$d_inetaton HAS_INET_ATON /**/
+?H:.
+?LINT:set d_inetaton
+: check whether inet_aton exists
+$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
new file mode 100644
index 0000000..52e956d
--- /dev/null
+++ b/mcon/U/d_inetd.U
@@ -0,0 +1,70 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_inetd.U,v $
+?RCS: Revision 3.0 1993/08/18 12:06:23 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_inetd: cat test package Myread Setvar
+?MAKE: -pick add $@ %<
+?S:d_inetd:
+?S: This symbol conditionally defines USE_INETD which indicates to the C
+?S: program that the initial socket connection will be done via inetd.
+?S:.
+?C:USE_INETD (INETD):
+?C: This symbol if defined indicates to the C program that inetd will be
+?C: in charge of the initial socket connection. The file descriptors 0 and
+?C: 1 have been dup()ed from the original connected socket descriptor and
+?C: are ready for send() and recv().
+?C:.
+?H:#$d_inetd USE_INETD /**/
+?H:.
+?LINT:set d_inetd
+: ask whether initial socket connection is to be done via inetd
+echo " "
+dflt=n
+case "$d_inetd" in
+'') if $test -f /etc/inetd.conf; then
+ $cat <<EOM
+Your system provides a so called "Internet super-server", the inetd daemon.
+Network services like ftp or rlogin are usually handled via ftpd and rlogind
+daemons. Without inetd, these daemons must always be running for the service
+to be on. On the contrary, inetd listens to specific ports defined in file
+/etc/inetd.conf and will run the appropriate daemon upon request. This scheme
+avoids eating up the process table and memory with useless daemons.
+
+I can set up things so that internet connections for $package will be done
+using inetd, in which case you will have to edit /etc/inetd.conf to add some
+specific informations.
+
+EOM
+ dflt=y
+ else
+ $cat <<EOM
+I do not see any trace of a configuration file for inetd, hence I assume your
+system does not support the so called "Internet super-server". This means
+$package will need to have a daemon process running on this machine to allow
+network connections.
+
+EOM
+ fi;;
+*) case "$d_inetd" in
+ "$define") dflt=y;;
+ esac;;
+esac
+rp='Do you wish to use inetd for network connections?'
+. ./myread
+val="$undef"
+case "$ans" in
+y*|Y*) val="$define";;
+esac
+set d_inetd
+eval $setvar
+
diff --git a/mcon/U/d_inflate.U b/mcon/U/d_inflate.U
new file mode 100644
index 0000000..6882765
--- /dev/null
+++ b/mcon/U/d_inflate.U
@@ -0,0 +1,42 @@
+?RCS: $Id$
+?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..f1ceb40
--- /dev/null
+++ b/mcon/U/d_initstate.U
@@ -0,0 +1,43 @@
+?RCS: $Id$
+?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
new file mode 100644
index 0000000..684b3e8
--- /dev/null
+++ b/mcon/U/d_internet.U
@@ -0,0 +1,52 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_internet.U,v $
+?RCS: Revision 3.0.1.1 1993/09/13 16:02:04 ram
+?RCS: patch10: most mailers support Internet addresses nowadays (WAD)
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:06:24 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_internet: Myread Oldconfig Setvar
+?MAKE: -pick add $@ %<
+?S:d_internet:
+?S: This variable conditionally defines the INTERNET symbol, which
+?S: indicates to the C program that there is a mailer available which
+?S: supports internet-style addresses (user@site.domain).
+?S:.
+?C:INTERNET:
+?C: This symbol, if defined, indicates that there is a mailer available
+?C: which supports internet-style addresses (user@site.domain).
+?C:.
+?H:#$d_internet INTERNET /**/
+?H:.
+?LINT:set d_internet
+: check for internet mailer
+dflt=y
+case "$d_internet" in
+"$undef") dflt=n;;
+esac
+cat <<EOM
+
+Most mailers can deliver mail to addresses of the INTERNET persuasion,
+such as user@host.edu. Some older mailers, however, require the complete
+path to the destination to be specified in the address.
+
+EOM
+rp="Does your mailer understand INTERNET addresses?"
+. ./myread
+case "$ans" in
+y*) val="$define";;
+*) val="$undef";;
+esac
+set d_internet
+eval $setvar
+
diff --git a/mcon/U/d_iptos.U b/mcon/U/d_iptos.U
new file mode 100644
index 0000000..08db48f
--- /dev/null
+++ b/mcon/U/d_iptos.U
@@ -0,0 +1,94 @@
+?RCS: $Id$
+?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..18b5ccc
--- /dev/null
+++ b/mcon/U/d_ipv6.U
@@ -0,0 +1,91 @@
+?RCS: $Id$
+?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
new file mode 100644
index 0000000..f9784ec
--- /dev/null
+++ b/mcon/U/d_isascii.U
@@ -0,0 +1,46 @@
+?RCS: $Id$
+?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: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
+?RCS:
+?RCS: $Log: d_isascii.U,v $
+?RCS: Revision 3.0.1.2 1994/10/29 16:13:39 ram
+?RCS: patch36: added 'ldflags' to the test compile line (ADO)
+?RCS:
+?RCS: Revision 3.0.1.1 1994/08/29 16:09:32 ram
+?RCS: patch32: created by ADO
+?RCS:
+?MAKE:d_isascii: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_isascii:
+?S: This variable conditionally defines the HAS_ISASCII constant,
+?S: which indicates to the C program that isascii() is available.
+?S:.
+?C:HAS_ISASCII:
+?C: This manifest constant lets the C program know that isascii
+?C: is available.
+?C:.
+?H:#$d_isascii HAS_ISASCII /**/
+?H:.
+?LINT:set d_isascii
+: Look for isascii
+$cat >try.c <<EOC
+#include <ctype.h>
+int main(void)
+{
+ static int ret, c;
+ ret |= isascii(c);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=isascii
+set d_isascii
+eval $trylink
+
diff --git a/mcon/U/d_itimer.U b/mcon/U/d_itimer.U
new file mode 100644
index 0000000..b7018a1
--- /dev/null
+++ b/mcon/U/d_itimer.U
@@ -0,0 +1,46 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_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: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_itimer:
+?S: This variable conditionally defines the HAS_ITIMER symbol, which
+?S: indicates that the setitimer() routine exists. The setitimer()
+?S: routine supports sub-second accuracy for one real-time and two
+?S: cpu clocks.
+?S:.
+?C:HAS_ITIMER (ITIMER):
+?C: This symbol, if defined, indicates that the setitimer() routine exists.
+?C:.
+?H:#$d_itimer HAS_ITIMER /**/
+?H:.
+?LINT:set d_itimer
+: see if setitimer exists
+$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
new file mode 100644
index 0000000..dfa13fd
--- /dev/null
+++ b/mcon/U/d_keepsig.U
@@ -0,0 +1,81 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_keepsig.U,v $
+?RCS: Revision 3.0.1.4 1995/07/25 13:57:56 ram
+?RCS: patch56: made cc and ccflags optional dependencies
+?RCS:
+?RCS: Revision 3.0.1.3 1995/01/11 15:26:25 ram
+?RCS: patch45: protected "sh -c" within backquotes for Linux and SGI
+?RCS:
+?RCS: Revision 3.0.1.2 1994/10/29 16:13:59 ram
+?RCS: patch36: call ./bsd explicitly instead of relying on PATH
+?RCS:
+?RCS: Revision 3.0.1.1 1993/10/16 13:48:47 ram
+?RCS: patch12: comment for SIGNALS_KEPT was the other way round
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:06:26 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_keepsig: cat Compile rm Guess contains echo n c Setvar run
+?MAKE: -pick add $@ %<
+?S:d_keepsig:
+?S: This variable contains the eventual value of the SIGNALS_KEPT symbol,
+?S: which indicates to the C program if signal handlers need not reinstated
+?S: after receipt of a signal.
+?S:.
+?C:SIGNALS_KEPT (PERSISTENT_SIGNAL):
+?C: This symbol is defined if signal handlers needn't be reinstated after
+?C: receipt of a signal.
+?C:.
+?H:#$d_keepsig SIGNALS_KEPT /**/
+?H:.
+?F:!try !try.out
+?LINT:set d_keepsig
+: see if signals are kept
+val="$undef";
+echo " "
+echo "Checking to see if signal handlers stick around..." >&4
+$cat >try.c <<'EOCP'
+foo() {}
+
+int main()
+{
+ signal(2, foo);
+ kill(getpid(), 2);
+ kill(getpid(), 2);
+ printf("abc\n");
+}
+EOCP
+set try
+if eval $compile; then
+?X: On AIX a single ./try will not work (with ksh)
+?X: Backquotes required on Linux and SGI (prevents "ambiguous output redirect")
+?X: (reported by Xavier LeVourch <xavierl@eiffel.com>)
+ echo `sh -c $run ./try >try.out 2>/dev/null` >/dev/null
+ if $contains abc try.out >/dev/null 2>&1; then
+ echo "Yes, they do."
+ val="$define";
+ else
+ echo "No, they don't."
+ fi
+else
+ $echo $n "(I can't seem to compile the test program. Assuming $c"
+ if ./bsd; then
+ echo "they do.)"
+ val="$define"
+ else
+ echo "they don't.)"
+ fi
+fi
+set d_keepsig
+eval $setvar
+$rm -f try*
+
diff --git a/mcon/U/d_kevent_udata.U b/mcon/U/d_kevent_udata.U
new file mode 100644
index 0000000..1af2ecb
--- /dev/null
+++ b/mcon/U/d_kevent_udata.U
@@ -0,0 +1,49 @@
+?RCS: $Id$
+?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
new file mode 100644
index 0000000..77b64ed
--- /dev/null
+++ b/mcon/U/d_killpg.U
@@ -0,0 +1,45 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_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: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_killpg:
+?S: This variable conditionally defines the HAS_KILLPG symbol, which
+?S: indicates to the C program that the killpg() routine is available
+?S: to kill process groups.
+?S:.
+?C:HAS_KILLPG (KILLPG):
+?C: This symbol, if defined, indicates that the killpg routine is available
+?C: to kill process groups. If unavailable, you probably should use kill
+?C: with a negative process number.
+?C:.
+?H:#$d_killpg HAS_KILLPG /**/
+?H:.
+?LINT:set d_killpg
+: see if killpg exists
+$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..c561084
--- /dev/null
+++ b/mcon/U/d_kqueue.U
@@ -0,0 +1,57 @@
+?RCS: $Id$
+?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
new file mode 100644
index 0000000..5848bae
--- /dev/null
+++ b/mcon/U/d_link.U
@@ -0,0 +1,44 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_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: Trylink cat i_unistd
+?MAKE: -pick add $@ %<
+?S:d_link:
+?S: This variable conditionally defines HAS_LINK if link() is
+?S: available to create hard links.
+?S:.
+?C:HAS_LINK:
+?C: This symbol, if defined, indicates that the link routine is
+?C: available to create hard links.
+?C:.
+?H:#$d_link HAS_LINK /**/
+?H:.
+?LINT:set d_link
+: see if link exists
+$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
new file mode 100644
index 0000000..547755d
--- /dev/null
+++ b/mcon/U/d_linuxstd.U
@@ -0,0 +1,55 @@
+?RCS: $Id$
+?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: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
+?RCS:
+?RCS: $Log: d_linuxstd.U,v $
+?RCS: Revision 3.0.1.1 1994/10/29 16:14:05 ram
+?RCS: patch36: created by ADO
+?RCS:
+?MAKE:d_linuxstd: d_stdstdio cppstdin cppflags cppminus \
+ contains rm Setvar Findhdr
+?MAKE: -pick add $@ %<
+?S:d_linuxstd:
+?S: This variable conditionally defines USE_LINUX_STDIO if this system
+?S: has a FILE structure declaring _IO_read_base, _IO_read_ptr,
+?S: and _IO_read_end in stdio.h.
+?S:.
+?C:USE_LINUX_STDIO:
+?C: This symbol is defined if this system has a FILE structure declaring
+?C: _IO_read_base, _IO_read_ptr, and _IO_read_end in stdio.h.
+?C:.
+?H:#$d_linuxstd USE_LINUX_STDIO /**/
+?H:.
+?T:xxx
+?LINT:set d_linuxstd
+: see if stdio is like that in linux
+case "$d_stdstdio" in
+"$undef")
+ echo " "
+ xxx=`./findhdr stdio.h`
+ $cppstdin $cppflags $cppminus < "$xxx" > stdio.E
+ if $contains 'char.*_IO_read_base' stdio.E >/dev/null 2>&1 && \
+ $contains '_IO_read_ptr' stdio.E >/dev/null 2>&1 && \
+ $contains '_IO_read_end' stdio.E >/dev/null 2>&1 ; then
+ echo "Your stdio looks like linux." >&4
+ val="$define"
+ else
+ echo "You don't have linux stdio, either." >&4
+ val="$undef"
+ fi
+ $rm -f stdio.E
+ ;;
+*) val="$undef" ;;
+esac
+
+set d_linuxstd
+eval $setvar
+
diff --git a/mcon/U/d_locale_charset.U b/mcon/U/d_locale_charset.U
new file mode 100644
index 0000000..028fa70
--- /dev/null
+++ b/mcon/U/d_locale_charset.U
@@ -0,0 +1,39 @@
+?RCS: $Id$
+?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
new file mode 100644
index 0000000..e06c152
--- /dev/null
+++ b/mcon/U/d_locconv.U
@@ -0,0 +1,46 @@
+?RCS: $Id$
+?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: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
+?RCS:
+?RCS: $Log: d_locconv.U,v $
+?RCS: Revision 3.0.1.1 1994/10/29 16:14:11 ram
+?RCS: patch36: created by ADO
+?RCS:
+?MAKE:d_locconv: Trylink cat i_locale
+?MAKE: -pick add $@ %<
+?S:d_locconv:
+?S: This variable conditionally defines HAS_LOCALECONV if localeconv() is
+?S: available for numeric and monetary formatting conventions.
+?S:.
+?C:HAS_LOCALECONV:
+?C: This symbol, if defined, indicates that the localeconv routine is
+?C: available for numeric and monetary formatting conventions.
+?C:.
+?H:#$d_locconv HAS_LOCALECONV /**/
+?H:.
+?LINT:set d_locconv
+: see if localeconv exists
+$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
new file mode 100644
index 0000000..1e71ceb
--- /dev/null
+++ b/mcon/U/d_lockf.U
@@ -0,0 +1,51 @@
+?RCS: $Id$
+?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: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
+?RCS:
+?RCS: $Log: d_lockf.U,v $
+?RCS: Revision 3.0.1.1 1994/08/29 16:09:36 ram
+?RCS: patch32: created by ADO
+?RCS:
+?MAKE:d_lockf: Trylink cat i_unistd
+?MAKE: -pick add $@ %<
+?S:d_lockf:
+?S: This variable conditionally defines HAS_LOCKF if lockf() is
+?S: available to do file locking.
+?S:.
+?C:HAS_LOCKF (LOCKF):
+?C: This symbol, if defined, indicates that the lockf routine is
+?C: available to do file locking.
+?C:.
+?H:#$d_lockf HAS_LOCKF /**/
+?H:.
+?LINT:set d_lockf
+: see if lockf 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 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
new file mode 100644
index 0000000..d9a4c7c
--- /dev/null
+++ b/mcon/U/d_lstat.U
@@ -0,0 +1,45 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_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: Trylink cat i_sysstat
+?MAKE: -pick add $@ %<
+?S:d_lstat:
+?S: This variable conditionally defines HAS_LSTAT if lstat() is
+?S: available to do file stats on symbolic links.
+?S:.
+?C:HAS_LSTAT (LSTAT):
+?C: This symbol, if defined, indicates that the lstat routine is
+?C: available to do file stats on symbolic links.
+?C:.
+?H:#$d_lstat HAS_LSTAT /**/
+?H:.
+?LINT:set d_lstat
+: see if lstat exists
+$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..9ef4acb
--- /dev/null
+++ b/mcon/U/d_madvise.U
@@ -0,0 +1,43 @@
+?RCS: $Id$
+?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
new file mode 100644
index 0000000..59eeed5
--- /dev/null
+++ b/mcon/U/d_mblen.U
@@ -0,0 +1,48 @@
+?RCS: $Id$
+?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: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
+?RCS:
+?RCS: $Log: d_mblen.U,v $
+?RCS: Revision 3.0.1.1 1994/08/29 16:09:40 ram
+?RCS: patch32: created by ADO
+?RCS:
+?MAKE:d_mblen: Trylink cat i_stdlib
+?MAKE: -pick add $@ %<
+?S:d_mblen:
+?S: This variable conditionally defines the HAS_MBLEN symbol, which
+?S: indicates to the C program that the mblen() routine is available
+?S: to find the number of bytes in a multibye character.
+?S:.
+?C:HAS_MBLEN:
+?C: This symbol, if defined, indicates that the mblen routine is available
+?C: to find the number of bytes in a multibye character.
+?C:.
+?H:#$d_mblen HAS_MBLEN /**/
+?H:.
+?LINT:set d_mblen
+: see if mblen exists
+$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
new file mode 100644
index 0000000..4e2a67b
--- /dev/null
+++ b/mcon/U/d_mbstowcs.U
@@ -0,0 +1,46 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_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: Trylink cat i_stdlib
+?MAKE: -pick add $@ %<
+?S:d_mbstowcs:
+?S: This variable conditionally defines the HAS_MBSTOWCS symbol, which
+?S: indicates to the C program that the mbstowcs() routine is available
+?S: to convert a multibyte string into a wide character string.
+?S:.
+?C:HAS_MBSTOWCS (MBSTOWCS):
+?C: This symbol, if defined, indicates that the mbstowcs routine is
+?C: available to covert a multibyte string into a wide character string.
+?C:.
+?H:#$d_mbstowcs HAS_MBSTOWCS /**/
+?H:.
+?LINT:set d_mbstowcs
+: see if mbstowcs exists
+$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
new file mode 100644
index 0000000..ae0f12e
--- /dev/null
+++ b/mcon/U/d_mbtowc.U
@@ -0,0 +1,47 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_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: Trylink cat i_stdlib
+?MAKE: -pick add $@ %<
+?S:d_mbtowc:
+?S: This variable conditionally defines the HAS_MBTOWC symbol, which
+?S: indicates to the C program that the mbtowc() routine is available
+?S: to convert multibyte to a wide character.
+?S:.
+?C:HAS_MBTOWC (MBTOWC):
+?C: This symbol, if defined, indicates that the mbtowc routine is available
+?C: to covert a multibyte to a wide character.
+?C:.
+?H:#$d_mbtowc HAS_MBTOWC /**/
+?H:.
+?LINT:set d_mbtowc
+: see if mbtowc exists
+$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
new file mode 100644
index 0000000..86abc55
--- /dev/null
+++ b/mcon/U/d_memalign.U
@@ -0,0 +1,48 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_memalign.U,v $
+?RCS:
+?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
+?S: indicates to the C program that the memalign() routine is available.
+?S:.
+?C:HAS_MEMALIGN :
+?C: This symbol, if defined, indicates that the memalign routine is
+?C: available to allocate aligned memory.
+?C:.
+?H:#$d_memalign HAS_MEMALIGN /**/
+?H:.
+?LINT:set d_memalign
+: see if memalign exists
+$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
new file mode 100644
index 0000000..27f293c
--- /dev/null
+++ b/mcon/U/d_memccpy.U
@@ -0,0 +1,45 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_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: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_memccpy:
+?S: This variable conditionally defines the HAS_MEMCCPY symbol, which
+?S: indicates to the C program that the memccpy() routine is available
+?S: to copy a character into a block of memory.
+?S:.
+?C:HAS_MEMCCPY (MEMCCPY):
+?C: This symbol, if defined, indicates that the memccpy routine is available
+?C: to copy a character into a block of memory. Otherwise you should
+?C: roll your own.
+?C:.
+?H:#$d_memccpy HAS_MEMCCPY /**/
+?H:.
+?LINT:set d_memccpy
+: see if memccpy exists
+$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
new file mode 100644
index 0000000..d9c2c8d
--- /dev/null
+++ b/mcon/U/d_memchr.U
@@ -0,0 +1,44 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_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: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_memchr:
+?S: This variable conditionally defines the HAS_MEMCHR symbol, which
+?S: indicates to the C program that the memchr() routine is available
+?S: to scan a block of memory for a character.
+?S:.
+?C:HAS_MEMCHR:
+?C: This symbol, if defined, indicates that the memchr routine is available
+?C: to scan a block of memory for a character. If undefined, roll your own.
+?C:.
+?H:#$d_memchr HAS_MEMCHR /**/
+?H:.
+?LINT:set d_memchr
+: see if memchr exists
+$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
new file mode 100644
index 0000000..127f6bf
--- /dev/null
+++ b/mcon/U/d_memcmp.U
@@ -0,0 +1,45 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_memcmp.U,v $
+?RCS: Revision 3.0.1.1 1993/09/13 16:02:35 ram
+?RCS: patch10: removed text recommending bcmp over memcmp (WAD)
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:06:33 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_memcmp: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_memcmp:
+?S: This variable conditionally defines the HAS_MEMCMP symbol, which
+?S: indicates to the C program that the memcmp() routine is available
+?S: to compare blocks of memory.
+?S:.
+?C:HAS_MEMCMP (MEMCMP):
+?C: This symbol, if defined, indicates that the memcmp routine is available
+?C: to compare blocks of memory.
+?C:.
+?H:#$d_memcmp HAS_MEMCMP /**/
+?H:.
+?LINT:set d_memcmp
+: see if memcmp exists
+$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
new file mode 100644
index 0000000..1d5cca1
--- /dev/null
+++ b/mcon/U/d_memcpy.U
@@ -0,0 +1,46 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_memcpy.U,v $
+?RCS: Revision 3.0.1.1 1993/09/13 16:02:58 ram
+?RCS: patch10: removed text recommending bcopy over memcpy (WAD)
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:06:34 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_memcpy: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_memcpy:
+?S: This variable conditionally defines the HAS_MEMCPY symbol, which
+?S: indicates to the C program that the memcpy() routine is available
+?S: to copy blocks of memory.
+?S:.
+?C:HAS_MEMCPY (MEMCPY):
+?C: This symbol, if defined, indicates that the memcpy routine is available
+?C: to copy blocks of memory.
+?C:.
+?H:#$d_memcpy HAS_MEMCPY /**/
+?H:.
+?LINT:set d_memcpy
+: see if memcpy exists
+$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
new file mode 100644
index 0000000..c74a5c7
--- /dev/null
+++ b/mcon/U/d_memmove.U
@@ -0,0 +1,45 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_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: 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 potentially overlapping blocks of memory.
+?S:.
+?C:HAS_MEMMOVE:
+?C: This symbol, if defined, indicates that the memmove routine is available
+?C: to copy potentially overlapping blocks of memory. This should be used
+?C: only when HAS_SAFE_BCOPY is not defined. If neither is there, roll your
+?C: own version.
+?C:.
+?H:#$d_memmove HAS_MEMMOVE /**/
+?H:.
+?LINT:set d_memmove
+: see if memmove exists
+$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..fa65fc9
--- /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
new file mode 100644
index 0000000..82e80ca
--- /dev/null
+++ b/mcon/U/d_memset.U
@@ -0,0 +1,47 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_memset.U,v $
+?RCS: Revision 3.0.1.1 1993/09/13 16:03:11 ram
+?RCS: patch10: removed text recommending bzero over memset (WAD)
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:06:36 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_memset: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_memset:
+?S: This variable conditionally defines the HAS_MEMSET symbol, which
+?S: indicates to the C program that the memset() routine is available
+?S: to set blocks of memory.
+?S:.
+?C:HAS_MEMSET (MEMSET):
+?C: This symbol, if defined, indicates that the memset routine is available
+?C: to set blocks of memory.
+?C:.
+?H:#$d_memset HAS_MEMSET /**/
+?H:.
+?LINT:set d_memset
+: see if memset exists
+$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
new file mode 100644
index 0000000..ddbb433
--- /dev/null
+++ b/mcon/U/d_mkdir.U
@@ -0,0 +1,48 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_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: Trylink cat i_sysstat
+?MAKE: -pick add $@ %<
+?S:d_mkdir:
+?S: This variable conditionally defines the HAS_MKDIR symbol, which
+?S: indicates to the C program that the mkdir() routine is available
+?S: to create directories..
+?S:.
+?C:HAS_MKDIR (MKDIR):
+?C: This symbol, if defined, indicates that the mkdir routine is available
+?C: to create directories. Otherwise you should fork off a new process to
+?C: exec /bin/mkdir.
+?C:.
+?H:#$d_mkdir HAS_MKDIR /**/
+?H:.
+?LINT:set d_mkdir
+: see if mkdir exists
+$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
new file mode 100644
index 0000000..d73a93e
--- /dev/null
+++ b/mcon/U/d_mkfifo.U
@@ -0,0 +1,51 @@
+?RCS: $Id$
+?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: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
+?RCS:
+?RCS: $Log: d_mkfifo.U,v $
+?RCS: Revision 3.0.1.1 1994/10/29 16:14:17 ram
+?RCS: patch36: created by ADO
+?RCS:
+?RCS:
+?MAKE:d_mkfifo: Trylink cat i_sysstat
+?MAKE: -pick add $@ %<
+?S:d_mkfifo:
+?S: This variable conditionally defines the HAS_MKFIFO symbol, which
+?S: indicates to the C program that the mkfifo() routine is available.
+?S:.
+?C:HAS_MKFIFO :
+?C: This symbol, if defined, indicates that the mkfifo routine is
+?C: available to create FIFOs. Otherwise, mknod should be able to
+?C: do it for you. However, if mkfifo is there, mknod might require
+?C: super-user privileges which mkfifo will not.
+?C:.
+?H:#$d_mkfifo HAS_MKFIFO /**/
+?H:.
+?LINT:set d_mkfifo
+: see if mkfifo exists
+$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
new file mode 100644
index 0000000..5cd11a3
--- /dev/null
+++ b/mcon/U/d_mktime.U
@@ -0,0 +1,44 @@
+?RCS: $Id$
+?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: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
+?RCS:
+?RCS: $Log: d_mktime.U,v $
+?RCS: Revision 3.0.1.1 1994/08/29 16:09:44 ram
+?RCS: patch32: created by ADO
+?RCS:
+?MAKE:d_mktime: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_mktime:
+?S: This variable conditionally defines the HAS_MKTIME symbol, which
+?S: indicates to the C program that the mktime() routine is available.
+?S:.
+?C:HAS_MKTIME :
+?C: This symbol, if defined, indicates that the mktime routine is
+?C: available.
+?C:.
+?H:#$d_mktime HAS_MKTIME /**/
+?H:.
+?LINT:set d_mktime
+: see if mktime exists
+$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
new file mode 100644
index 0000000..b2f671f
--- /dev/null
+++ b/mcon/U/d_mmap.U
@@ -0,0 +1,53 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_mmap.U,v $
+?RCS: Revision 3.0.1.1 1993/12/15 08:19:12 ram
+?RCS: patch15: created
+?RCS:
+?MAKE:d_mmap: Trylink cat i_sysmman
+?MAKE: -pick add $@ %<
+?S:d_mmap:
+?S: This variable conditionally defines HAS_MMAP if mmap() is
+?S: available to map a file into memory.
+?S:.
+?C:HAS_MMAP:
+?C: This symbol, if defined, indicates that the mmap system call is
+?C: available to map a file into memory.
+?C:.
+?H:#$d_mmap HAS_MMAP /**/
+?H:.
+?LINT:set d_mmap
+: see if mmap 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 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
new file mode 100644
index 0000000..f35de33
--- /dev/null
+++ b/mcon/U/d_msem_lck.U
@@ -0,0 +1,42 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_msem_lck.U,v $
+?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
+?S: available, thereby indicating kernel support for memory semaphores.
+?S:.
+?C:HAS_MSEM_LOCK:
+?C: This symbol, if defined, indicates that memory semaphores are
+?C: available to protect mmap()'ed regions.
+?C:.
+?H:#$d_msem_lck HAS_MSEM_LOCK /**/
+?H:.
+?LINT:set d_msem_lck
+: see if msem_lock exists
+$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
new file mode 100644
index 0000000..748da6a
--- /dev/null
+++ b/mcon/U/d_msg.U
@@ -0,0 +1,64 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_msg.U,v $
+?RCS: Revision 3.0 1993/08/18 12:06:37 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_msg: test d_msgctl d_msgget d_msgsnd d_msgrcv Setvar Findhdr osname
+?MAKE: -pick add $@ %<
+?S:d_msg:
+?S: This variable conditionally defines the HAS_MSG symbol, which
+?S: indicates that the entire msg*(2) library is present.
+?S:.
+?C:HAS_MSG:
+?C: This symbol, if defined, indicates that the entire msg*(2) library is
+?C: supported (IPC mechanism based on message queues).
+?C:.
+?H:#$d_msg HAS_MSG /**/
+?H:.
+?T:h_msg
+?LINT:set d_msg
+: see how much of the 'msg*(2)' library is present.
+h_msg=true
+echo " "
+case "$d_msgctl$d_msgget$d_msgsnd$d_msgrcv" in
+*"$undef"*) h_msg=false;;
+esac
+case "$osname" in
+freebsd)
+ case "`ipcs 2>&1`" in
+ "SVID messages"*"not configured"*)
+ echo "Your $osname does not have the msg*(2) configured." >&4
+ h_msg=false
+ val="$undef"
+ set msgctl d_msgctl
+ eval $setvar
+ set msgget d_msgget
+ eval $setvar
+ set msgsnd d_msgsnd
+ eval $setvar
+ set msgrcv d_msgrcv
+ eval $setvar
+ ;;
+ esac
+ ;;
+esac
+: we could also check for sys/ipc.h ...
+if $h_msg && $test `./findhdr sys/msg.h`; then
+ echo "You have the full msg*(2) library." >&4
+ val="$define"
+else
+ echo "You don't have the full msg*(2) library." >&4
+ val="$undef"
+fi
+set d_msg
+eval $setvar
+
diff --git a/mcon/U/d_msg_flags.U b/mcon/U/d_msg_flags.U
new file mode 100644
index 0000000..0a94db3
--- /dev/null
+++ b/mcon/U/d_msg_flags.U
@@ -0,0 +1,59 @@
+?RCS: $Id$
+?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
new file mode 100644
index 0000000..a18e263
--- /dev/null
+++ b/mcon/U/d_msgctl.U
@@ -0,0 +1,44 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_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: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_msgctl:
+?S: This variable conditionally defines the HAS_MSGCTL symbol, which
+?S: indicates to the C program that the msgctl() routine is available.
+?S:.
+?C:HAS_MSGCTL:
+?C: This symbol, if defined, indicates that the msgctl() routine is
+?C: available to perform message control operations.
+?C:.
+?H:#$d_msgctl HAS_MSGCTL /**/
+?H:.
+?LINT:set d_msgctl
+: see if msgctl exists
+$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
new file mode 100644
index 0000000..9ff25b1
--- /dev/null
+++ b/mcon/U/d_msgget.U
@@ -0,0 +1,45 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_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: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_msgget:
+?S: This variable conditionally defines the HAS_MSGGET symbol, which
+?S: indicates to the C program that the msgget() routine is available.
+?S:.
+?C:HAS_MSGGET:
+?C: This symbol, if defined, indicates that the msgget() routine is
+?C: available to get a new message queue.
+?C:.
+?H:#$d_msgget HAS_MSGGET /**/
+?H:.
+?LINT:set d_msgget
+: see if msgget exists
+$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
new file mode 100644
index 0000000..f5195e6
--- /dev/null
+++ b/mcon/U/d_msgrcv.U
@@ -0,0 +1,47 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_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: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_msgrcv:
+?S: This variable conditionally defines the HAS_MSGRCV symbol, which
+?S: indicates to the C program that the msgrcv() routine is available.
+?S:.
+?C:HAS_MSGRCV:
+?C: This symbol, if defined, indicates that the msgrcv() routine is
+?C: available to extract a message from the message queue.
+?C:.
+?H:#$d_msgrcv HAS_MSGRCV /**/
+?H:.
+?LINT:set d_msgrcv
+: see if msgrcv exists
+$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
new file mode 100644
index 0000000..b40c5ef
--- /dev/null
+++ b/mcon/U/d_msgsnd.U
@@ -0,0 +1,44 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_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: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_msgsnd:
+?S: This variable conditionally defines the HAS_MSGSND symbol, which
+?S: indicates to the C program that the msgsnd() routine is available.
+?S:.
+?C:HAS_MSGSND:
+?C: This symbol, if defined, indicates that the msgsnd() routine is
+?C: available to send a message into the message queue.
+?C:.
+?H:#$d_msgsnd HAS_MSGSND /**/
+?H:.
+?LINT:set d_msgsnd
+: see if msgsnd exists
+$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
new file mode 100644
index 0000000..2d13d74
--- /dev/null
+++ b/mcon/U/d_msync.U
@@ -0,0 +1,49 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_msync.U,v $
+?RCS: Revision 3.0.1.1 1993/12/15 08:19:17 ram
+?RCS: patch15: created
+?RCS:
+?MAKE:d_msync: Trylink cat i_sysmman
+?MAKE: -pick add $@ %<
+?S:d_msync:
+?S: This variable conditionally defines HAS_MSYNC if msync() is
+?S: available to synchronize a mapped file.
+?S:.
+?C:HAS_MSYNC:
+?C: This symbol, if defined, indicates that the msync system call is
+?C: available to synchronize a mapped file.
+?C:.
+?H:#$d_msync HAS_MSYNC /**/
+?H:.
+?LINT:set d_msync
+: see if msync exists
+$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
new file mode 100644
index 0000000..f8e01a6
--- /dev/null
+++ b/mcon/U/d_munmap.U
@@ -0,0 +1,46 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_munmap.U,v $
+?RCS: Revision 3.0.1.1 1993/12/15 08:19:22 ram
+?RCS: patch15: created
+?RCS:
+?MAKE:d_munmap: Trylink cat i_sysmman
+?MAKE: -pick add $@ %<
+?S:d_munmap:
+?S: This variable conditionally defines HAS_MUNMAP if munmap() is
+?S: available to unmap a region mapped by mmap().
+?S:.
+?C:HAS_MUNMAP:
+?C: This symbol, if defined, indicates that the munmap system call is
+?C: available to unmap a region, usually mapped by mmap().
+?C:.
+?H:#$d_munmap HAS_MUNMAP /**/
+?H:.
+?LINT:set d_munmap
+: see if munmap exists
+$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..d65eef6
--- /dev/null
+++ b/mcon/U/d_nanosleep.U
@@ -0,0 +1,38 @@
+?RCS: $Id$
+?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
new file mode 100644
index 0000000..ed51502
--- /dev/null
+++ b/mcon/U/d_newsadm.U
@@ -0,0 +1,72 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_newsadm.U,v $
+?RCS: Revision 3.0.1.2 1997/02/28 15:36:53 ram
+?RCS: patch61: added Guess dependency
+?RCS:
+?RCS: Revision 3.0.1.1 1994/10/29 16:14:33 ram
+?RCS: patch36: call ./eunice explicitly instead of relying on PATH
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:06:42 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_newsadm newsadmin: cat contains Guess Setvar Myread Oldconfig
+?MAKE: -pick add $@ %<
+?S:d_newsadm:
+?S: This variable conditionally defines the NEWS_ADMIN symbol, which
+?S: indicates to the C program that there is a user who is in charge
+?S: of news administration.
+?S:.
+?S:newsadmin:
+?S: This variable holds the login name of the news administrator, if any.
+?S:.
+?C:NEWS_ADMIN (NEWSADMIN):
+?C: This symbol, if defined, contains the login name of the news
+?C: administrator.
+?C:.
+?H:#$d_newsadm NEWS_ADMIN "$newsadmin" /**/
+?H:.
+?LINT:set d_newsadm
+: get news administrator name
+case "$newsadmin" in
+'')
+ if $contains "^news:" /etc/passwd >/dev/null 2>&1 ; then
+ dflt=news
+ elif $contains "^usenet:" /etc/passwd >/dev/null 2>&1 ; then
+ dflt=usenet
+ elif ./eunice; then
+ dflt=system
+ else
+ dflt=root
+ fi
+ ;;
+*)
+ dflt="$newsadmin"
+ ;;
+esac
+$cat <<'EOM'
+
+Many systems keep their news in a private directory, or have a non-superuser
+in charge of administering news. (If you don't have such a user, take the
+default answer.) I need the login name (not directory) which is used for
+news administration.
+
+EOM
+rp="News admin login?"
+. ./myread
+newsadmin="$ans"
+case "$newsadmin" in
+root) val="$undef" ;;
+*) val="$define" ;;
+esac
+set d_newsadm
+eval $setvar
+
diff --git a/mcon/U/d_nice.U b/mcon/U/d_nice.U
new file mode 100644
index 0000000..aacb448
--- /dev/null
+++ b/mcon/U/d_nice.U
@@ -0,0 +1,46 @@
+?RCS: $Id$
+?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: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
+?RCS:
+?RCS: $Log: d_nice.U,v $
+?RCS: Revision 3.0.1.1 1994/08/29 16:09:48 ram
+?RCS: patch32: created by ADO
+?RCS:
+?MAKE:d_nice: Trylink cat i_unistd
+?MAKE: -pick add $@ %<
+?S:d_nice:
+?S: This variable conditionally defines the HAS_NICE symbol, which
+?S: indicates to the C program that the nice() routine is available.
+?S:.
+?C:HAS_NICE :
+?C: This symbol, if defined, indicates that the nice routine is
+?C: available.
+?C:.
+?H:#$d_nice HAS_NICE /**/
+?H:.
+?LINT:set d_nice
+: see if nice exists
+$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..523b203
--- /dev/null
+++ b/mcon/U/d_nls.U
@@ -0,0 +1,45 @@
+?RCS: $Id$
+?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
new file mode 100644
index 0000000..330a643
--- /dev/null
+++ b/mcon/U/d_nolnbuf.U
@@ -0,0 +1,99 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_nolnbuf.U,v $
+?RCS: Revision 3.0.1.1 1994/05/06 14:46:07 ram
+?RCS: patch23: avoid looping in the "see that again?" prompt (WED)
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:06:43 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_nolnbuf: test +cc cat rm Setvar Myread
+?MAKE: -pick add $@ %<
+?S:d_nolnbuf:
+?S: This variable conditionally defines the NOLINEBUF symbol, which
+?S: indicates to the C program that stdout is not buffered, so that
+?S: the program can call setbuf() or setlinebuf() for efficiency.
+?S:.
+?C:NOLINEBUF:
+?C: This symbol, if defined, indicates that stdout is not buffered, so that
+?C: the program can call setbuf() or setlinebuf() for efficiency.
+?C:.
+?H:#$d_nolnbuf NOLINEBUF /**/
+?H:.
+?T:xxx
+?F:!blurfl
+?LINT:set d_nolnbuf
+: check for buffering of stdout
+echo " "
+case "$d_nolnbuf" in
+'')
+ $cat <<'EOT' >blurfl.c
+#include <stdio.h>
+int main()
+{
+ int i;
+
+ for (i = 0; i < 5; i++) {
+ putchar(i+'a');
+ sleep(1);
+ }
+ putchar('\n');
+}
+EOT
+ $cc -o blurfl blurfl.c >/dev/null 2>&1;
+ $rm -f blurfl.c
+ $cat >&4 <<'EOM'
+Checking for buffering of stdout to terminal.
+
+Observe the following characters as they are printed out, to see whether they
+print out all at once, or with a 1 second pause between each of them. If they
+print out one by one, you don't have buffering. If they print together (after
+about a 5 second pause), you do have buffering.
+
+EOM
+ dflt='Type return to start printing the test characters'
+ rp=''
+ . ./myread
+ xxx=y
+ while $test "$xxx" = 'y'; do
+ ./blurfl 1>&4
+ dflt=n
+ rp='Would you like to see that again?'
+ . ./myread
+ case "$ans" in
+ [yY]*) xxx="y";;
+ *) xxx="n";;
+ esac
+ done
+ dflt=y
+ rp="Do you have buffering (printed all at once)?"
+ . ./myread
+ case "$ans" in
+ n*) val="$define";;
+ *) val="$undef";;
+ esac
+ ;;
+*)
+ case "$d_nolnbuf" in
+ "$define") dflt=n;;
+ *) dflt=y;;
+ esac
+ rp="Do you have buffering on stdout to terminals?"
+ . ./myread
+ case "$ans" in
+ n*) val="$define";;
+ *) val="$undef";;
+ esac
+ ;;
+esac
+set d_nolnbuf
+eval $setvar
+
diff --git a/mcon/U/d_normsig.U b/mcon/U/d_normsig.U
new file mode 100644
index 0000000..10a1efd
--- /dev/null
+++ b/mcon/U/d_normsig.U
@@ -0,0 +1,57 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_normsig.U,v $
+?RCS: Revision 3.0.1.2 1997/02/28 15:37:03 ram
+?RCS: patch61: replaced .a with $_a all over the place
+?RCS:
+?RCS: Revision 3.0.1.1 1994/10/29 16:14:48 ram
+?RCS: patch36: call ./bsd explicitly instead of relying on PATH
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:06:44 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_normsig jobslib: test Setvar Guess _a
+?MAKE: -pick add $@ %<
+?S:d_normsig:
+?S: This variable conditionally defines the NORMSIG symbol, which
+?S: indicates to the C program that the normal signal handling routines
+?S: should be used, as opposed to the ones in 4.1bsd (sigset, etc.).
+?S:.
+?S:jobslib:
+?S: This variable holds the argument to be passed to the loader to include
+?S: the strange signal handling routines from 4.1bsd. On systems that
+?S: have NORMSIG defined this variable is null.
+?S:.
+?C:NORMSIG:
+?C: This symbol, if defined, indicates that normal signal handling routines
+?C: should be used, as opposed to the ones in 4.1bsd (sigset, etc.).
+?C:.
+?H:#$d_normsig NORMSIG /**/
+?H:.
+?LINT:set d_normsig
+: see if we need -ljobs and if we have sigset, etc.
+echo " "
+if $test -r /usr/lib/libjobs$_a || $test -r /usr/local/lib/libjobs$_a ; then
+ echo "Jobs library found." >&4
+ val="$undef"
+ jobslib='-ljobs'
+else
+ if ./bsd; then
+ echo "No jobs library found. (I suppose this is at least 4.2...)" >&4
+ else
+ echo "No jobs library found. (That's okay, we all have our faults.)" >&4
+ fi
+ val="$define"
+ jobslib=''
+fi
+set d_normsig
+eval $setvar
+
diff --git a/mcon/U/d_open3.U b/mcon/U/d_open3.U
new file mode 100644
index 0000000..a5fa847
--- /dev/null
+++ b/mcon/U/d_open3.U
@@ -0,0 +1,90 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_open3.U,v $
+?RCS: Revision 3.0.1.2 1997/02/28 15:37:12 ram
+?RCS: patch61: added ?F: metalint hint
+?RCS:
+?RCS: Revision 3.0.1.1 1995/07/25 13:58:26 ram
+?RCS: patch56: added knowledge of the O_NONBLOCK symbol
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:06:44 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_open3: test +cc cat +cppflags h_fcntl h_sysfile rm Setvar Findhdr Warn
+?MAKE: -pick add $@ %<
+?X: It would be easy to separate the h_O_stuff from this.
+?X: Is there a reason to do so? -- HMS
+?S:d_open3:
+?S: This variable conditionally defines the HAS_OPEN3 manifest constant,
+?S: which indicates to the C program that the 3 argument version of
+?S: the open(2) function is available.
+?S:.
+?C:HAS_OPEN3 (OPEN3):
+?C: This manifest constant lets the C program know that the three
+?C: argument form of open(2) is available.
+?C:.
+?H:#$d_open3 HAS_OPEN3 /**/
+?H:.
+?W:%<:O_RDONLY O_WRONLY O_RDWR O_NDELAY O_APPEND O_SYNC O_CREAT O_TRUNC
+?W:%<:O_EXCL O_NONBLOCK
+?F:!open3
+?LINT:set d_open3
+?LINT:change h_fcntl h_sysfile
+: Locate the flags for 'open()'
+echo " "
+$cat >open3.c <<'EOCP'
+#include <sys/types.h>
+#ifdef I_FCNTL
+#include <fcntl.h>
+#endif
+#ifdef I_SYS_FILE
+#include <sys/file.h>
+#endif
+int main(void) {
+ if(O_RDONLY);
+#ifdef O_TRUNC
+ return 0;
+#else
+ return 1;
+#endif
+}
+EOCP
+: check sys/file.h first to get FREAD on Sun
+if $test `./findhdr sys/file.h` && \
+ $cc $cppflags "-DI_SYS_FILE" -o open3 open3.c >/dev/null 2>&1 ; then
+ h_sysfile=true;
+ echo "<sys/file.h> defines the O_* constants..." >&4
+ if ./open3; then
+ echo "and you have the 3 argument form of open()." >&4
+ val="$define"
+ else
+ echo "but not the 3 argument form of open(). Oh, well." >&4
+ val="$undef"
+ fi
+elif $test `./findhdr fcntl.h` && \
+ $cc "-DI_FCNTL" -o open3 open3.c >/dev/null 2>&1 ; then
+ h_fcntl=true;
+ echo "<fcntl.h> defines the O_* constants..." >&4
+ if ./open3; then
+ echo "and you have the 3 argument form of open()." >&4
+ val="$define"
+ else
+ echo "but not the 3 argument form of open(). Oh, well." >&4
+ val="$undef"
+ fi
+else
+ val="$undef"
+ ./warn "I can't find the O_* constant definitions! You got problems." 4>&4
+fi
+set d_open3
+eval $setvar
+$rm -f open3*
+
diff --git a/mcon/U/d_openat.U b/mcon/U/d_openat.U
new file mode 100644
index 0000000..47beb25
--- /dev/null
+++ b/mcon/U/d_openat.U
@@ -0,0 +1,38 @@
+?RCS:
+?RCS: Copyright (c) 2015 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_openat: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_openat:
+?S: This variable conditionally defines HAS_OPENAT if openat() is
+?S: available to open files with a relative path interepreted in
+?S: the context of an opened directory.
+?S:.
+?C:HAS_OPENAT:
+?C: This symbol, if defined, indicates that the openat() routine is
+?C: available to open files with a relative path interepreted in
+?C: the context of an opened directory.
+?C:.
+?H:#$d_openat HAS_OPENAT /**/
+?H:.
+?LINT:set d_openat
+: see if openat exists
+$cat >try.c <<EOC
+#include <fcntl.h> /* AT_* constants */
+int main(void)
+{
+ static int ret;
+ ret |= openat(AT_FDCWD, "path", /* flags */ 0, /* mode */ 0);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=openat
+set d_openat
+eval $trylink
+
diff --git a/mcon/U/d_passwd.U b/mcon/U/d_passwd.U
new file mode 100644
index 0000000..c9e2418
--- /dev/null
+++ b/mcon/U/d_passwd.U
@@ -0,0 +1,23 @@
+?RCS: $Id$
+?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: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
+?RCS:
+?RCS: $Log: d_passwd.U,v $
+?RCS: Revision 3.0.1.2 1997/02/28 15:37:21 ram
+?RCS: patch61: useless unit dropped.
+?RCS:
+?RCS: Revision 3.0.1.1 1994/08/29 16:09:51 ram
+?RCS: patch32: created by ADO
+?RCS:
+?X:
+?X: Useless unit dropped.
+?X:
+?LINT:empty
diff --git a/mcon/U/d_pathconf.U b/mcon/U/d_pathconf.U
new file mode 100644
index 0000000..02b7e52
--- /dev/null
+++ b/mcon/U/d_pathconf.U
@@ -0,0 +1,83 @@
+?RCS: $Id$
+?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: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
+?RCS:
+?RCS: $Log: d_pathconf.U,v $
+?RCS: Revision 3.0.1.1 1994/10/29 16:14:54 ram
+?RCS: patch36: created by ADO
+?RCS:
+?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
+?S: indicates to the C program that the pathconf() routine is available
+?S: to determine file-system related limits and options associated
+?S: with a given filename.
+?S:.
+?S:d_fpathconf:
+?S: This variable conditionally defines the HAS_FPATHCONF symbol, which
+?S: indicates to the C program that the pathconf() routine is available
+?S: to determine file-system related limits and options associated
+?S: with a given open file descriptor.
+?S:.
+?C:HAS_PATHCONF:
+?C: This symbol, if defined, indicates that pathconf() is available
+?C: to determine file-system related limits and options associated
+?C: with a given filename.
+?C:.
+?C:HAS_FPATHCONF:
+?C: This symbol, if defined, indicates that pathconf() is available
+?C: to determine file-system related limits and options associated
+?C: with a given open file descriptor.
+?C:.
+?H:#$d_pathconf HAS_PATHCONF /**/
+?H:#$d_fpathconf HAS_FPATHCONF /**/
+?H:.
+?LINT:set d_pathconf
+?LINT:set d_fpathconf
+: see if pathconf exists
+$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
+$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
new file mode 100644
index 0000000..9acd60d
--- /dev/null
+++ b/mcon/U/d_pause.U
@@ -0,0 +1,47 @@
+?RCS: $Id$
+?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: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
+?RCS:
+?RCS: $Log: d_pause.U,v $
+?RCS: Revision 3.0.1.1 1994/08/29 16:09:54 ram
+?RCS: patch32: created by ADO
+?RCS:
+?MAKE:d_pause: Trylink cat i_unistd
+?MAKE: -pick add $@ %<
+?S:d_pause:
+?S: This variable conditionally defines the HAS_PAUSE symbol, which
+?S: indicates to the C program that the pause() routine is available
+?S: to suspend a process until a signal is received.
+?S:.
+?C:HAS_PAUSE :
+?C: This symbol, if defined, indicates that the pause routine is
+?C: available to suspend a process until a signal is received.
+?C:.
+?H:#$d_pause HAS_PAUSE /**/
+?H:.
+?LINT:set d_pause
+: see if pause exists
+$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
new file mode 100644
index 0000000..50b0aa0
--- /dev/null
+++ b/mcon/U/d_perror.U
@@ -0,0 +1,53 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_perror.U,v $
+?RCS: Revision 3.0.1.1 1994/08/29 16:11:38 ram
+?RCS: patch32: always define HAS_PERROR even when not used in C code
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:06:45 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_perror: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_perror:
+?S: This variable conditionally remaps perror to a null action and
+?S: defines the symbol HAS_PERROR, which indicates to the C program
+?S: that the perror() routine is not available to print system
+?S: error messages.
+?S:.
+?C:HAS_PERROR ~ %<:
+?C: This symbol, if defined, indicates that the perror() routine is
+?C: available to print system error messages. If not defined, you should
+?C: use your own diagnostic routine...
+?C:.
+?C:perror ~ %<:
+?C: This symbol is maped to null if the perror() routine is not
+?C: available to print system error messages.
+?C:.
+?H:?%<:#$d_perror HAS_PERROR /**/
+?H:?%<:#ifndef HAS_PERROR
+?H:?%<:#define perror(s) ; /* mapped to a null statement */
+?H:?%<:#endif
+?H:.
+?LINT:set d_perror
+: see if perror exists
+$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
new file mode 100644
index 0000000..8fedf85
--- /dev/null
+++ b/mcon/U/d_pidcheck.U
@@ -0,0 +1,75 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_pidcheck.U,v $
+?RCS: Revision 3.0.1.1 1997/02/28 15:37:55 ram
+?RCS: patch61: replaced .o with $_o all over the place
+?RCS: patch61: added ?F: metalint hint
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:06:46 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_pidcheck: cat rm +cc _o
+?MAKE: -pick add $@ %<
+?S:d_pidcheck:
+?S: This variable conditionally defines the variable PIDCHECK
+?S: which indicates that kill(pid, 0) will check for an active pid.
+?S:.
+?C:PIDCHECK:
+?C: This symbol, if defined, means that the kill(pid, 0) will
+?C: check for an active pid (i.e. the kernel will run all the
+?C: necessary pid checks, but no signal is actually sent).
+?C:.
+?H:#$d_pidcheck PIDCHECK /**/
+?H:.
+?F:!try
+: check for "kill(pid, 0)"
+echo " "
+case "$d_pidcheck" in
+"$define")
+echo "I already know your system supports kill(pid, 0) for pid checks." >&4
+ ;;
+"$undef")
+echo "We both know your system does not support signal #0 for pid checks." >&4
+ ;;
+*)
+ echo "Checking to see if kill(pid, 0) works..." >&4
+ $cat >try.c <<'EOCP'
+int main()
+ {
+ int pid, status0, status9;
+
+ if ((pid = fork()) == 0)
+ {
+ sleep(30);
+ exit(1);
+ }
+ status0 = kill(pid, 0);
+ status9 = kill(pid, 9);
+ exit(status0 == status9);
+ }
+EOCP
+ if $cc -o try try.c >/dev/null 2>&1 ; then
+ if ./try >/dev/null 2>&1 ; then
+ echo "Yes, it does marvels."
+ d_pidcheck="$undef"
+ else
+ d_pidcheck="$define"
+ echo "No, it doesn't."
+ fi
+ else
+ echo "(I was unable to compile the test program.)"
+ echo "Your system does not appear to support kill(pid, 0)."
+ d_pidcheck="$undef"
+ fi
+ $rm -f try.c try$_o try
+ ;;
+esac
+
diff --git a/mcon/U/d_pipe.U b/mcon/U/d_pipe.U
new file mode 100644
index 0000000..004905f
--- /dev/null
+++ b/mcon/U/d_pipe.U
@@ -0,0 +1,47 @@
+?RCS: $Id$
+?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: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
+?RCS:
+?RCS: $Log: d_pipe.U,v $
+?RCS: Revision 3.0.1.1 1994/08/29 16:11:44 ram
+?RCS: patch32: created by ADO
+?RCS:
+?MAKE:d_pipe: Trylink cat i_unistd
+?MAKE: -pick add $@ %<
+?S:d_pipe:
+?S: This variable conditionally defines the HAS_PIPE symbol, which
+?S: indicates to the C program that the pipe() routine is available
+?S: to create an inter-process channel.
+?S:.
+?C:HAS_PIPE:
+?C: This symbol, if defined, indicates that the pipe routine is
+?C: available to create an inter-process channel.
+?C:.
+?H:#$d_pipe HAS_PIPE /**/
+?H:.
+?LINT:set d_pipe
+: see if pipe exists
+$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_pipe2.U b/mcon/U/d_pipe2.U
new file mode 100644
index 0000000..d64c703
--- /dev/null
+++ b/mcon/U/d_pipe2.U
@@ -0,0 +1,46 @@
+?RCS:
+?RCS: Copyright (c) 2015, 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_pipe2: Trylink cat i_unistd i_sysfile
+?MAKE: -pick add $@ %<
+?S:d_pipe2:
+?S: This variable conditionally defines the HAS_PIPE2 symbol, which
+?S: indicates to the C program that the pipe2() routine is available
+?S: to create an inter-process channel with some flags.
+?S:.
+?C:HAS_PIPE2:
+?C: This symbol, if defined, indicates that the pipe routine is
+?C: available to create an inter-process channel with O_CLOEXEC or
+?C: O_NONBLOCK flags.
+?C:.
+?H:#$d_pipe2 HAS_PIPE2 /**/
+?H:.
+?LINT:set d_pipe2
+: see if pipe2 exists
+$cat >try.c <<EOC
+#$i_unistd I_UNISTD
+#$i_sysfile I_SYS_FILE
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+#ifdef I_SYS_FILE
+#include <sys/file.h> /* For O_* constants */
+#endif
+#include <fcntl.h> /* For O_* constants */
+int main(void)
+{
+ static int fds[2], ret;
+ ret |= pipe2(fds, O_CLOEXEC | O_NONBLOCK);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=pipe2
+set d_pipe2
+eval $trylink
+
diff --git a/mcon/U/d_poll.U b/mcon/U/d_poll.U
new file mode 100644
index 0000000..39d6b40
--- /dev/null
+++ b/mcon/U/d_poll.U
@@ -0,0 +1,64 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_poll.U,v $
+?RCS: Revision 3.0.1.2 1997/02/28 15:38:17 ram
+?RCS: patch61: mention that <poll.h> can be included if HAS_POLL defined
+?RCS:
+?RCS: Revision 3.0.1.1 1995/01/11 15:26:31 ram
+?RCS: patch45: created
+?RCS:
+?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
+?S: indicates to the C program that the poll() routine is available
+?S: to poll active file descriptors.
+?S:.
+?C:HAS_POLL :
+?C: This symbol, if defined, indicates that the poll routine is
+?C: available to poll active file descriptors. Please check I_POLL and
+?C: I_SYS_POLL to know which header should be included as well.
+?C:.
+?H:#$d_poll HAS_POLL /**/
+?H:.
+?LINT:set d_poll
+: see if poll exists
+$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
new file mode 100644
index 0000000..4e5ff55
--- /dev/null
+++ b/mcon/U/d_popen.U
@@ -0,0 +1,42 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_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: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_popen:
+?S: This variable conditionally defines HAS_POPEN if popen() is
+?S: available to open a pipe from a process.
+?S:.
+?C:HAS_POPEN (POPEN):
+?C: This symbol, if defined, indicates that the popen routine is
+?C: available to open a pipe from a process.
+?C:.
+?H:#$d_popen HAS_POPEN /**/
+?H:.
+?LINT:set d_popen
+: see if popen exists
+$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
new file mode 100644
index 0000000..f052d65
--- /dev/null
+++ b/mcon/U/d_portable.U
@@ -0,0 +1,71 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_portable.U,v $
+?RCS: Revision 3.0.1.2 1995/01/11 15:28:52 ram
+?RCS: patch45: executable path stripping moved to the end in Config_sh.U
+?RCS:
+?RCS: Revision 3.0.1.1 1993/12/15 08:21:17 ram
+?RCS: patch15: did not strip variables properly when needed
+?RCS: patch15: now also strips down variables from trylist
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:06:48 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: The Loc unit is wanted to get the definition of all the locating variables.
+?X:
+?MAKE:d_portable: cat Loc Myread Oldconfig
+?MAKE: -pick add $@ %<
+?S:d_portable:
+?S: This variable conditionally defines the PORTABLE symbol, which
+?S: indicates to the C program that it should not assume that it is
+?S: running on the machine it was compiled on.
+?S:.
+?C:PORTABLE:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: not assume that it is running on the machine it was compiled on.
+?C: The program should be prepared to look up the host name, translate
+?C: generic filenames, use PATH, etc.
+?C:.
+?H:#$d_portable PORTABLE /**/
+?H:.
+?D:d_portable=''
+: decide how portable to be
+case "$d_portable" in
+"$define") dflt=y;;
+*) dflt=n;;
+esac
+$cat <<'EOH'
+
+I can set things up so that your shell scripts and binaries are more portable,
+at what may be a noticable cost in performance. In particular, if you
+ask to be portable, the following happens:
+
+ 1) Shell scripts will rely on the PATH variable rather than using
+ the paths derived above.
+ 2) ~username interpretations will be done at run time rather than
+ by Configure.
+@if PHOSTNAME
+ 3) The system name will be determined at run time, if at all possible.
+@end
+
+EOH
+rp="Do you expect to run these scripts and binaries on multiple machines?"
+. ./myread
+case "$ans" in
+ y*) d_portable="$define"
+?X:
+?X: Paths will be stripped down (/usr/bin/vi -> vi) in Config_sh.U if needed.
+?X:
+ ;;
+ *) d_portable="$undef" ;;
+esac
+
diff --git a/mcon/U/d_posix_fadvise.U b/mcon/U/d_posix_fadvise.U
new file mode 100644
index 0000000..eecf982
--- /dev/null
+++ b/mcon/U/d_posix_fadvise.U
@@ -0,0 +1,47 @@
+?RCS: $Id$
+?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..498cf1d
--- /dev/null
+++ b/mcon/U/d_posix_memalign.U
@@ -0,0 +1,41 @@
+?RCS: $Id$
+?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
new file mode 100644
index 0000000..60ab4d9
--- /dev/null
+++ b/mcon/U/d_pread.U
@@ -0,0 +1,48 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_pread.U,v $
+?RCS:
+?MAKE:d_pread: Trylink cat i_unistd
+?MAKE: -pick add $@ %<
+?S:d_pread:
+?S: This variable conditionally defines the HAS_PREAD symbol, which
+?S: indicates to the C program that the pread() routine is available.
+?S:.
+?C:HAS_PREAD :
+?C: This symbol, if defined, indicates that the pread routine is
+?C: available to perform reads on a file descriptor at a given offset.
+?C:.
+?H:#$d_pread HAS_PREAD /**/
+?H:.
+?LINT:set d_pread
+: see if pread exists
+$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
new file mode 100644
index 0000000..4261454
--- /dev/null
+++ b/mcon/U/d_preadv.U
@@ -0,0 +1,48 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_preadv.U,v $
+?RCS:
+?MAKE:d_preadv: Trylink cat i_unistd
+?MAKE: -pick add $@ %<
+?S:d_preadv:
+?S: This variable conditionally defines the HAS_PREADV symbol, which
+?S: indicates to the C program that the preadv() routine is available.
+?S:.
+?C:HAS_PREADV :
+?C: This symbol, if defined, indicates that the preadv routine is
+?C: available to perform vectored reads on a file descriptor at a
+?C: given offset.
+?C:.
+?H:#$d_preadv HAS_PREADV /**/
+?H:.
+?LINT:set d_preadv
+: see if preadv exists
+$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_proginvocname.U b/mcon/U/d_proginvocname.U
new file mode 100644
index 0000000..1ebd177
--- /dev/null
+++ b/mcon/U/d_proginvocname.U
@@ -0,0 +1,40 @@
+?RCS:
+?RCS: Copyright (c) 2015 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_proginvocname: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_proginvocname:
+?S: This variable conditionally defines the HAS_PROGRAM_INVOCATION_NAME
+?S: symbol, which indicates to the C program that the two variables
+?S: program_invocation_name and program_invocation_short_name are set
+?S: at startup time.
+?S:.
+?C:HAS_PROGRAM_INVOCATION_NAME:
+?C: This symbol is defined when the C startup sets the two variables
+?C: program_invocation_name and program_invocation_short_name. To get
+?C: these definitions, <errno.h> must be included with __USE_GNU defined.
+?C:.
+?H:#$d_proginvocname HAS_PROGRAM_INVOCATION_NAME
+?H:.
+?LINT: set d_proginvocname
+: do we have the program_invocation_name variable?
+$cat >try.c <<EOC
+#include <stdio.h>
+#define __USE_GNU
+#include <errno.h>
+int main(void)
+{
+ printf("%s\n%s\n", program_invocation_name, program_invocation_short_name);
+ return 0;
+}
+EOC
+cyn="whether C startup sets program_invocation_name"
+set d_proginvocname
+eval $trylink
+
diff --git a/mcon/U/d_psignal.U b/mcon/U/d_psignal.U
new file mode 100644
index 0000000..6cd2467
--- /dev/null
+++ b/mcon/U/d_psignal.U
@@ -0,0 +1,41 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_psignal.U,v $
+?RCS: Revision 3.0 1993/08/18 12:06:49 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_psignal: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_psignal:
+?S: This variable conditionally defines the HAS_PSIGNAL symbol, which
+?S: indicates that the psignal() routine exists. The psignal() routine
+?S: prints a description of a signal on the standard error output.
+?S:.
+?C:HAS_PSIGNAL (PSIGNAL):
+?C: This symbol, if defined, indicates that the psignal() routine exists.
+?C:.
+?H:#$d_psignal HAS_PSIGNAL /**/
+?H:.
+?LINT:set d_psignal
+: see if psignal exists
+$cat >try.c <<EOC
+#include <signal.h>
+int main(void)
+{
+ static int sig;
+ psignal(sig, "signal");
+ return 0;
+}
+EOC
+cyn=psignal
+set d_psignal
+eval $trylink
+
diff --git a/mcon/U/d_ptattr_setstack.U b/mcon/U/d_ptattr_setstack.U
new file mode 100644
index 0000000..5517390
--- /dev/null
+++ b/mcon/U/d_ptattr_setstack.U
@@ -0,0 +1,40 @@
+?RCS:
+?RCS: Copyright (c) 2013 Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_ptattr_setstack: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_ptattr_setstack:
+?S: This variable conditionally defines the HAS_PTHREAD_ATTR_SETSTACK symbol,
+?S: which indicates to the C program that pthread_attr_setstack() should be
+?S: used to set the thread stack, instead of pthread_attr_setstackaddr().
+?S:.
+?C:HAS_PTHREAD_ATTR_SETSTACK:
+?C: This symbol is defined when pthread_attr_setstack() can be used to set
+?C: the thread stack. Otherwise, use obsoleted pthread_attr_setstackaddr().
+?C:.
+?H:#$d_ptattr_setstack HAS_PTHREAD_ATTR_SETSTACK
+?H:.
+?LINT: set d_ptattr_setstack
+: can we use pthread_attr_setstack
+$cat >try.c <<'EOC'
+#include <pthread.h>
+int main(void)
+{
+ pthread_attr_t attr;
+ void *p = NULL;
+ static int ret;
+
+ ret |= pthread_attr_setstack(&attr, p, 4096);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=pthread_attr_setstack
+set d_ptattr_setstack '-lpthread'
+eval $trylink
+
diff --git a/mcon/U/d_pwrite.U b/mcon/U/d_pwrite.U
new file mode 100644
index 0000000..f811308
--- /dev/null
+++ b/mcon/U/d_pwrite.U
@@ -0,0 +1,48 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_pwrite.U,v $
+?RCS:
+?MAKE:d_pwrite: Trylink cat i_unistd
+?MAKE: -pick add $@ %<
+?S:d_pwrite:
+?S: This variable conditionally defines the HAS_PWRITE symbol, which
+?S: indicates to the C program that the pwrite() routine is available.
+?S:.
+?C:HAS_PWRITE :
+?C: This symbol, if defined, indicates that the pwrite routine is
+?C: available to perform writes on a file descriptor at a given offset.
+?C:.
+?H:#$d_pwrite HAS_PWRITE /**/
+?H:.
+?LINT:set d_pwrite
+: see if pwrite exists
+$cat >try.c <<EOC
+#define _GNU_SOURCE
+#include <sys/types.h>
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static ssize_t ret;
+ static int fd;
+ static char buf[1];
+ static size_t size;
+ static off_t offset;
+ ret |= pwrite(fd, buf, size, offset);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=pwrite
+set d_pwrite
+eval $trylink
+
diff --git a/mcon/U/d_pwritev.U b/mcon/U/d_pwritev.U
new file mode 100644
index 0000000..6612cf7
--- /dev/null
+++ b/mcon/U/d_pwritev.U
@@ -0,0 +1,48 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_pwritev.U,v $
+?RCS:
+?MAKE:d_pwritev: Trylink cat i_unistd
+?MAKE: -pick add $@ %<
+?S:d_pwritev:
+?S: This variable conditionally defines the HAS_PWRITEV symbol, which
+?S: indicates to the C program that the pwritev() routine is available.
+?S:.
+?C:HAS_PWRITEV :
+?C: This symbol, if defined, indicates that the pwritev routine is
+?C: available to perform vectored writes on a file descriptor at a
+?C: given offset.
+?C:.
+?H:#$d_pwritev HAS_PWRITEV /**/
+?H:.
+?LINT:set d_pwritev
+: see if pwritev exists
+$cat >try.c <<EOC
+#include <sys/types.h>
+#include <sys/uio.h>
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static ssize_t ret;
+ static int fd, iovcnt;
+ static struct iovec iov;
+ static off_t offset;
+ ret |= pwritev(fd, &iov, iovcnt, offset);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=pwritev
+set d_pwritev
+eval $trylink
+
diff --git a/mcon/U/d_random.U b/mcon/U/d_random.U
new file mode 100644
index 0000000..8494759
--- /dev/null
+++ b/mcon/U/d_random.U
@@ -0,0 +1,40 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_random: Trylink cat i_stdlib
+?MAKE: -pick add $@ %<
+?S:d_random:
+?S: This variable conditionally defines the HAS_RANDOM symbol, which
+?S: indicates to the C program that the random() routine is available.
+?S:.
+?C:HAS_RANDOM:
+?C: This symbol, if defined, indicates that the random routine is
+?C: available.
+?C:.
+?H:#$d_random HAS_RANDOM /**/
+?H:.
+?LINT:set d_random
+: see if random exists
+$cat >try.c <<EOC
+#$i_stdlib I_STDLIB
+#ifdef I_STDLIB
+#include <stdlib.h>
+#endif
+int main(void)
+{
+ static long ret;
+ ret |= random();
+ return ret ? 0 : 1;
+}
+EOC
+cyn=random
+set d_random
+eval $trylink
+
diff --git a/mcon/U/d_raster.U b/mcon/U/d_raster.U
new file mode 100644
index 0000000..01702fb
--- /dev/null
+++ b/mcon/U/d_raster.U
@@ -0,0 +1,57 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_raster.U,v $
+?RCS: Revision 3.0 1993/08/18 12:06:50 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_raster rasterlib: cat test Setvar Myread Oldconfig
+?MAKE: -pick add $@ %<
+?S:d_raster:
+?S: Conditionally defines RASTER_TEK if this is a raster tech machine.
+?S:.
+?S:rasterlib (d_rasterlib):
+?S: Set to the needed compile flag if this is a raster tech machine.
+?S: It is up to the Makefile to use this variable.
+?S:.
+?C:RASTER_TEK:
+?C: Defined if this is a rastertech machine.
+?C:.
+?H:#$d_raster RASTER_TEK /**/
+?H:.
+?LINT:set d_raster
+: See if this is a raster tech machine.
+val="$undef"
+rasterlib=''
+if $test -r /dev/mirage; then
+ $cat <<'EOM'
+
+You seem to have a mirage device... this is normally associated with a raster
+technologies graphics workstation. If this is right, you may want to use raster
+tech in this program.
+
+EOM
+ dflt=y
+ case "$d_raster" in
+ "$undef") dflt=n;;
+ esac
+ rp='Use raster tech?'
+ . ./myread
+ case "$ans" in
+ y*) val="$define";;
+ esac
+fi
+set d_raster
+eval $setvar
+
+case "$d_raster" in
+"$define") rasterlib='-lphigs';;
+esac
+
diff --git a/mcon/U/d_rdchk.U b/mcon/U/d_rdchk.U
new file mode 100644
index 0000000..12e24ff
--- /dev/null
+++ b/mcon/U/d_rdchk.U
@@ -0,0 +1,42 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_rdchk.U,v $
+?RCS: Revision 3.0 1993/08/18 12:06:51 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_rdchk: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_rdchk:
+?S: This variable conditionally defines the HAS_RDCHK symbol, which
+?S: indicates to the C program that the rdchk() routine is available
+?S: to find out if there is input pending on an IO channel.
+?S:.
+?C:HAS_RDCHK (RDCHK):
+?C: This symbol, if defined, indicates that the rdchk routine is available
+?C: to find out if there is input pending on an IO channel. Generally
+?C: the routine is used only if FIONREAD and O_NDELAY aren't available.
+?C:.
+?H:#$d_rdchk HAS_RDCHK /**/
+?H:.
+?LINT:set d_rdchk
+: see if rdchk exists
+$cat >try.c <<EOC
+int main(void)
+{
+ static int ret, fd;
+ ret |= rdchk(fd);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=rdchk
+set d_rdchk
+eval $trylink
+
diff --git a/mcon/U/d_readdir.U b/mcon/U/d_readdir.U
new file mode 100644
index 0000000..2db9d28
--- /dev/null
+++ b/mcon/U/d_readdir.U
@@ -0,0 +1,135 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_readdir.U,v $
+?RCS: Revision 3.0.1.1 1994/05/06 14:46:37 ram
+?RCS: patch23: added support for seekdir, telldir and rewinddir (ADO)
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:06:52 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_readdir d_seekdir d_telldir d_rewinddir: Trylink cat i_dirent
+?MAKE: -pick add $@ %<
+?S:d_readdir:
+?S: This variable conditionally defines HAS_READDIR if readdir() is
+?S: available to read directory entries.
+?S:.
+?C:HAS_READDIR (READDIR):
+?C: This symbol, if defined, indicates that the readdir routine is
+?C: available to read directory entries. You may have to include
+?C: <dirent.h>. See I_DIRENT.
+?C:.
+?H:#$d_readdir HAS_READDIR /**/
+?H:.
+?S:d_seekdir:
+?S: This variable conditionally defines HAS_SEEKDIR if seekdir() is
+?S: available.
+?S:.
+?C:HAS_SEEKDIR:
+?C: This symbol, if defined, indicates that the seekdir routine is
+?C: available. You may have to include <dirent.h>. See I_DIRENT.
+?C:.
+?H:#$d_seekdir HAS_SEEKDIR /**/
+?H:.
+?S:d_telldir:
+?S: This variable conditionally defines HAS_TELLDIR if telldir() is
+?S: available.
+?S:.
+?C:HAS_TELLDIR:
+?C: This symbol, if defined, indicates that the telldir routine is
+?C: available. You may have to include <dirent.h>. See I_DIRENT.
+?C:.
+?H:#$d_telldir HAS_TELLDIR /**/
+?H:.
+?S:d_rewinddir:
+?S: This variable conditionally defines HAS_REWINDDIR if rewinddir() is
+?S: available.
+?S:.
+?C:HAS_REWINDDIR:
+?C: This symbol, if defined, indicates that the rewinddir routine is
+?C: available. You may have to include <dirent.h>. See I_DIRENT.
+?C:.
+?H:#$d_rewinddir HAS_REWINDDIR /**/
+?H:.
+?LINT:set d_readdir d_seekdir d_telldir d_rewinddir
+: see if readdir and friends exist
+$cat >try.c <<EOC
+#$i_dirent I_DIRENT
+#ifdef I_DIRENT
+#include <dirent.h>
+#endif
+int main(void)
+{
+ static DIR *dir;
+ struct dirent *ret;
+ ret = readdir(dir);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=readdir
+set d_readdir
+eval $trylink
+
+@if d_seekdir || HAS_SEEKDIR
+$cat >try.c <<EOC
+#$i_dirent I_DIRENT
+#ifdef I_DIRENT
+#include <dirent.h>
+#endif
+int main(void)
+{
+ static DIR *dir;
+ static long loc;
+ seekdir(dir, loc);
+ return 0;
+}
+EOC
+cyn=seekdir
+set d_seekdir
+eval $trylink
+@end
+@if d_telldir || HAS_TELLDIR
+$cat >try.c <<EOC
+#$i_dirent I_DIRENT
+#ifdef I_DIRENT
+#include <dirent.h>
+#endif
+int main(void)
+{
+ static DIR *dir;
+ static long ret;
+ ret |= telldir(dir);
+ if (ret)
+ return 1;
+ return 0;
+}
+EOC
+cyn=telldir
+set d_telldir
+eval $trylink
+@end
+@if d_rewinddir || HAS_REWINDDIR
+$cat >try.c <<EOC
+#$i_dirent I_DIRENT
+#ifdef I_DIRENT
+#include <dirent.h>
+#endif
+int main(void)
+{
+ static DIR *dir;
+ rewinddir(dir);
+ return 0;
+}
+EOC
+cyn=rewinddir
+set d_rewinddir
+eval $trylink
+@end
+
diff --git a/mcon/U/d_readlink.U b/mcon/U/d_readlink.U
new file mode 100644
index 0000000..e4e6dc6
--- /dev/null
+++ b/mcon/U/d_readlink.U
@@ -0,0 +1,49 @@
+?RCS: $Id$
+?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: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
+?RCS:
+?RCS: $Log: d_readlink.U,v $
+?RCS: Revision 3.0.1.1 1994/08/29 16:11:52 ram
+?RCS: patch32: created by ADO
+?RCS:
+?MAKE:d_readlink: Trylink cat i_unistd
+?MAKE: -pick add $@ %<
+?S:d_readlink:
+?S: This variable conditionally defines the HAS_READLINK symbol, which
+?S: indicates to the C program that the readlink() routine is available
+?S: to read the value of a symbolic link.
+?S:.
+?C:HAS_READLINK :
+?C: This symbol, if defined, indicates that the readlink routine is
+?C: available to read the value of a symbolic link.
+?C:.
+?H:#$d_readlink HAS_READLINK /**/
+?H:.
+?LINT:set d_readlink
+: see if readlink exists
+$cat >try.c <<EOC
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static ssize_t ret;
+ static char buf[1];
+ static size_t size;
+ ret |= readlink("path", buf, size);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=readlink
+set d_readlink
+eval $trylink
+
diff --git a/mcon/U/d_recvmsg.U b/mcon/U/d_recvmsg.U
new file mode 100644
index 0000000..4e3d488
--- /dev/null
+++ b/mcon/U/d_recvmsg.U
@@ -0,0 +1,70 @@
+?RCS: $Id: d_msg_flags.U 59 2010-12-12 10:14:03Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_recvmsg: Trylink cat i_systypes i_sysselct i_syssock \
+ i_winsock2 i_mswsock d_windows
+?MAKE: -pick add $@ %<
+?S:d_recvmsg:
+?S: This variable conditionally defines the HAS_RECVMSG symbol,
+?S: which indicates to the C program that the recvmsg() function is
+?S: available.
+?S:.
+?C:HAS_RECVMSG:
+?C: This symbol, if defined, indicates that the recvmsg() function
+?C: is available.
+?C:.
+?H:#$d_recvmsg HAS_RECVMSG /**/
+?H:.
+?LINT:set d_recvmsg
+: check for recvmsg function
+$cat >try.c <<EOC
+#$i_systypes I_SYS_TYPES
+#$i_sysselct I_SYS_SELECT
+#$i_syssock I_SYS_SOCKET
+#$i_winsock2 I_WINSOCK2
+#$i_mswsock I_MSWSOCK
+#$d_windows WINDOWS_SYSTEM
+#ifdef WINDOWS_SYSTEM
+#define WINVER 0x0501
+#endif
+#ifdef I_SYS_TYPES
+#include <sys/types.h>
+#endif
+#ifdef I_SYS_SOCKET
+#include <sys/socket.h>
+#endif
+#ifdef I_WINSOCK2
+#include <Winsock2.h>
+#endif
+#ifdef I_MSWSOCK
+#include <Mswsock.h>
+#endif
+int main(void)
+{
+ static struct msghdr msg;
+ int ret, fd, flags;
+
+ fd = 1;
+ flags = 1;
+ msg.msg_name = (void *) 0;
+ msg.msg_namelen |= 1;
+ msg.msg_iov = (void *) 0;
+ msg.msg_iovlen |= 1;
+ /* msg.msg_flags is intentionally excluded, see other unit */
+ msg.msg_control = (void *) 0;
+ msg.msg_controllen |= 1;
+ ret = recvmsg(fd, &msg, flags);
+ return ret ? 0 : 1;
+}
+EOC
+cyn='recvmsg'
+set d_recvmsg
+eval $trylink
+
diff --git a/mcon/U/d_regcmp.U b/mcon/U/d_regcmp.U
new file mode 100644
index 0000000..891ccf5
--- /dev/null
+++ b/mcon/U/d_regcmp.U
@@ -0,0 +1,64 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_regcmp.U,v $
+?RCS: Revision 3.0.1.1 1995/01/30 14:34:45 ram
+?RCS: patch49: now looks for POSIX regcomp() routine
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:06:53 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_regcmp d_re_comp: Csym cat
+?MAKE: -pick add $@ %<
+?X:
+?X: Modern code should use POSIX's regcomp().
+?X:
+?S:d_regcmp:
+?S: This variable conditionally defines the HAS_REGCMP symbol, which
+?S: indicates to the C program that the regcmp() routine is available
+?S: for regular pattern matching (usually on System V).
+?S:.
+?S:d_re_comp:
+?S: This variable conditionally defines the HAS_RECOMP symbol, which
+?S: indicates to the C program that the re_comp() routine is available
+?S: for regular pattern matching (usually on BSD). If so, it is likely that
+?S: re_exec() exists.
+?S:.
+?C:HAS_REGCMP (REGCMP):
+?C: This symbol, if defined, indicates that the regcmp() routine is
+?C: available to do some regular pattern matching (usually on System V).
+?C:.
+?C:HAS_RECOMP (RECOMP):
+?C: This symbol, if defined, indicates that the re_comp() routine is
+?C: available to do some regular pattern matching (usually on BSD). If so,
+?C: it is likely that re_exec() be available.
+?C:.
+?H:#$d_regcmp HAS_REGCMP /* sysV */
+?H:#$d_re_comp HAS_RECOMP /* BSD */
+?H:.
+?T:val
+: see if regcmp or re_comp exist, for regular pattern matching
+echo " "
+if set regcmp val -f d_regcmp; eval $csym; $val; then
+ echo 'regcmp() found.' >&4
+ d_regcmp="$define"
+ d_re_comp="$undef"
+elif set re_comp val -f d_re_comp; eval $csym; $val; then
+ echo 're_comp() found, assuming re_exec() also exists.' >&4
+ d_re_comp="$define"
+ d_regcmp="$undef"
+else
+ $cat >&4 <<EOM
+No regcmp() nor re_comp() found.
+EOM
+ d_regcmp="$undef"
+ d_re_comp="$undef"
+fi
+
diff --git a/mcon/U/d_regcomp.U b/mcon/U/d_regcomp.U
new file mode 100644
index 0000000..885b65e
--- /dev/null
+++ b/mcon/U/d_regcomp.U
@@ -0,0 +1,44 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 2011, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log$
+?MAKE:d_regcomp: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_regcomp:
+?S: This variable conditionally defines the HAS_REGCOMP symbol, which
+?S: indicates to the C program that the regcomp() routine is available
+?S: for regular patern matching (usally on POSIX.2 conforming systems).
+?S:.
+?C:HAS_REGCOMP (REGCOMP):
+?C: This symbol, if defined, indicates that the regcomp() routine is
+?C: available to do some regular patern matching (usually on POSIX.2
+?C: conforming systems).
+?C: When regcomp() exists, it is safe to assume regexec() and regfree()
+?C: are also available.
+?C:.
+?H:#$d_regcomp HAS_REGCOMP /**/
+?H:.
+?LINT:set d_regcomp
+: see if regcomp exists
+$cat >try.c <<EOC
+#include <regex.h>
+int main(void)
+{
+ int ret = 0;
+ regex_t re;
+ ret |= regcomp(&re, ".",
+ REG_EXTENDED | REG_NOSUB | REG_ICASE | REG_NEWLINE);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=regcomp
+set d_regcomp
+eval $trylink
+
diff --git a/mcon/U/d_regparm.U b/mcon/U/d_regparm.U
new file mode 100644
index 0000000..f1d03a5
--- /dev/null
+++ b/mcon/U/d_regparm.U
@@ -0,0 +1,48 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_regparm: Myread Setvar cat rm cc ccflags ldflags gccversion
+?MAKE: -pick add $@ %<
+?S:d_regparm:
+?S: This variable conditionally defines the HAS_REGPARM symbol, which
+?S: indicates to the C program that attribute regparm is available.
+?S:.
+?C:HAS_REGPARM:
+?C: This symbol is defined when __attribute__((__regparm__(n))) can be used.
+?C:.
+?H:#$d_regparm HAS_REGPARM
+?H:.
+?LINT:set d_regparm
+: check whether '__attribute__((__regparm__(n)))' can be used
+val="$undef"
+if [ "x$gccversion" != x ]
+then
+ $cat >try.c <<'EOC'
+static __attribute__((__regparm__(1))) int
+blah(int x)
+{
+ return x / 2;
+}
+int main(int argc, char *argv[])
+{
+ (void) argv;
+ return blah(argc);
+}
+EOC
+ if $cc $ccflags -Werror $ldflags -o try try.c >/dev/null 2>&1
+ then
+ val="$define"
+ fi
+ $rm -rf try try.*
+fi
+
+set d_regparm
+eval $setvar
+
diff --git a/mcon/U/d_rename.U b/mcon/U/d_rename.U
new file mode 100644
index 0000000..445ae43
--- /dev/null
+++ b/mcon/U/d_rename.U
@@ -0,0 +1,43 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_rename.U,v $
+?RCS: Revision 3.0 1993/08/18 12:06:54 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_rename: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_rename:
+?S: This variable conditionally defines the HAS_RENAME symbol, which
+?S: indicates to the C program that the rename() routine is available
+?S: to rename files.
+?S:.
+?C:HAS_RENAME (RENAME):
+?C: This symbol, if defined, indicates that the rename routine is available
+?C: to rename files. Otherwise you should do the unlink(), link(), unlink()
+?C: trick.
+?C:.
+?H:#$d_rename HAS_RENAME /**/
+?H:.
+?LINT:set d_rename
+: see if rename exists
+$cat >try.c <<EOC
+#include <stdio.h>
+int main(void)
+{
+ static int ret;
+ ret |= rename("old", "new");
+ return ret ? 0 : 1;
+}
+EOC
+cyn=rename
+set d_rename
+eval $trylink
+
diff --git a/mcon/U/d_rmdir.U b/mcon/U/d_rmdir.U
new file mode 100644
index 0000000..3a4ca4e
--- /dev/null
+++ b/mcon/U/d_rmdir.U
@@ -0,0 +1,45 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_rmdir.U,v $
+?RCS: Revision 3.0 1993/08/18 12:06:56 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_rmdir: Trylink cat i_unistd
+?MAKE: -pick add $@ %<
+?S:d_rmdir:
+?S: This variable conditionally defines HAS_RMDIR if rmdir() is
+?S: available to remove directories.
+?S:.
+?C:HAS_RMDIR (RMDIR):
+?C: This symbol, if defined, indicates that the rmdir routine is
+?C: available to remove directories. Otherwise you should fork off a
+?C: new process to exec /bin/rmdir.
+?C:.
+?H:#$d_rmdir HAS_RMDIR /**/
+?H:.
+?LINT:set d_rmdir
+: see if rmdir exists
+$cat >try.c <<EOC
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static int ret;
+ ret |= rmdir("path");
+ return ret ? 0 : 1;
+}
+EOC
+cyn=rmdir
+set d_rmdir
+eval $trylink
+
diff --git a/mcon/U/d_rusage.U b/mcon/U/d_rusage.U
new file mode 100644
index 0000000..1864872
--- /dev/null
+++ b/mcon/U/d_rusage.U
@@ -0,0 +1,53 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_rusage.U,v $
+?RCS: Revision 3.0 1993/08/18 12:06:57 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X: We may need to include <sys/resource.h> and <sys/time.h> FIXME
+?X:INC: i_sysresrc i_systime
+?MAKE:d_rusage: Trylink cat i_sysresrc
+?MAKE: -pick add $@ %<
+?S:d_rusage (d_getrusg):
+?S: This variable conditionally defines the HAS_GETRUSAGE symbol, which
+?S: indicates that the getrusage() routine exists. The getrusage() routine
+?S: supports sub-second accuracy for process cpu accounting. You may need
+?S: to include <sys/resource.h> and <sys/time.h>.
+?S:.
+?C:HAS_GETRUSAGE (RUSAGE GETRUSAGE):
+?C: This symbol, if defined, indicates that the getrusage() routine is
+?C: available to get process statistics with a sub-second accuracy.
+?C: Inclusion of <sys/resource.h> and <sys/time.h> may be necessary.
+?C:.
+?H:#$d_rusage HAS_GETRUSAGE /**/
+?H:.
+?LINT:set d_rusage
+: see if getrusage exists
+$cat >try.c <<EOC
+#include <sys/types.h>
+#include <sys/time.h>
+#$i_sysresrc I_SYS_RESOURCE
+#ifdef I_SYS_RESOURCE
+#include <sys/resource.h>
+#endif
+int main(void)
+{
+ static struct rusage ru;
+ static int ret;
+ ret |= getrusage(RUSAGE_SELF, &ru);
+ ret |= getrusage(RUSAGE_CHILDREN, &ru);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=getrusage
+set d_rusage
+eval $trylink
+
diff --git a/mcon/U/d_sa_interrupt.U b/mcon/U/d_sa_interrupt.U
new file mode 100644
index 0000000..443696c
--- /dev/null
+++ b/mcon/U/d_sa_interrupt.U
@@ -0,0 +1,37 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_sa_interrupt: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_sa_interrupt:
+?S: This variable conditionally defines the HAS_SA_INTERRUPT symbol, which
+?S: indicates to the C program that SA_INTERRUPT() is available for
+?S: sigaction().
+?S:.
+?C:HAS_SA_INTERRUPT:
+?C: This symbol is defined when SA_INTERRUPT can be used in sigaction().
+?C:.
+?H:#$d_sa_interrupt HAS_SA_INTERRUPT
+?H:.
+?LINT: set d_sa_interrupt
+: can we use SA_INTERRUPT?
+$cat >try.c <<'EOC'
+#include <signal.h>
+int main(void)
+{
+ static int ret;
+ ret |= SA_INTERRUPT;
+ return ret ? 0 : 1;
+}
+EOC
+cyn="whether SA_INTERRUPT is available in <signal.h>"
+set d_sa_interrupt
+eval $trylink
+
diff --git a/mcon/U/d_safebcpy.U b/mcon/U/d_safebcpy.U
new file mode 100644
index 0000000..68b921e
--- /dev/null
+++ b/mcon/U/d_safebcpy.U
@@ -0,0 +1,124 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_safebcpy.U,v $
+?RCS: Revision 3.0.1.4 1997/02/28 15:40:58 ram
+?RCS: patch61: improved overlapping copy check
+?RCS: patch61: comfort them if they have memmove
+?RCS: patch61: added ?F: metalint hint
+?RCS:
+?RCS: Revision 3.0.1.3 1995/07/25 13:58:40 ram
+?RCS: patch56: re-arranged compile line to include ldflags before objects
+?RCS:
+?RCS: Revision 3.0.1.2 1995/01/11 15:29:23 ram
+?RCS: patch45: added 'ldflags' to the test compile line (ADO)
+?RCS:
+?RCS: Revision 3.0.1.1 1994/05/06 14:49:03 ram
+?RCS: patch23: ensure string is not optimized in read-only memory (ADO)
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:06:58 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_safebcpy: cat d_bcopy +cc +optimize +ccflags +ldflags +libs rm \
+ d_memmove i_memory i_stdlib i_string i_unistd Oldconfig Setvar
+?MAKE: -pick add $@ %<
+?S:d_safebcpy:
+?S: This variable conditionally defines the HAS_SAFE_BCOPY symbol if
+?S: the bcopy() routine can do overlapping copies.
+?S:.
+?C:HAS_SAFE_BCOPY (SAFE_BCOPY):
+?C: This symbol, if defined, indicates that the bcopy routine is available
+?C: to copy potentially overlapping memory blocks. Otherwise you should
+?C: probably use memmove() or memcpy(). If neither is defined, roll your
+?C: own version.
+?C:.
+?H:#$d_safebcpy HAS_SAFE_BCOPY /**/
+?H:.
+?F:!safebcpy
+?LINT: set d_safebcpy
+: can bcopy handle overlapping blocks?
+?X: assume the worst
+val="$undef"
+case "$d_bcopy" in
+"$define")
+ echo " "
+ echo "Checking to see if your bcopy() can do overlapping copies..." >&4
+ $cat >foo.c <<EOCP
+#$i_memory I_MEMORY
+#$i_stdlib I_STDLIB
+#$i_string I_STRING
+#$i_unistd I_UNISTD
+EOCP
+ $cat >>foo.c <<'EOCP'
+#include <stdio.h>
+#ifdef I_MEMORY
+# include <memory.h>
+#endif
+#ifdef I_STDLIB
+# include <stdlib.h>
+#endif
+#ifdef I_STRING
+# include <string.h>
+#else
+# include <strings.h>
+#endif
+#ifdef I_UNISTD
+# include <unistd.h> /* Needed for NetBSD */
+#endif
+int main()
+{
+char buf[128], abc[128];
+char *b;
+int len;
+int off;
+int align;
+
+?X: Copy "abcde..." string to char abc[] so that gcc doesn't
+?X: try to store the string in read-only memory.
+bcopy("abcdefghijklmnopqrstuvwxyz0123456789", abc, 36);
+
+for (align = 7; align >= 0; align--) {
+ for (len = 36; len; len--) {
+ b = buf+align;
+ bcopy(abc, b, len);
+ for (off = 1; off <= len; off++) {
+ bcopy(b, b+off, len);
+ bcopy(b+off, b, len);
+ if (bcmp(b, abc, len))
+ exit(1);
+ }
+ }
+}
+exit(0);
+}
+EOCP
+ if $cc $optimize $ccflags $ldflags \
+ -o safebcpy foo.c $libs >/dev/null 2>&1; then
+ if ./safebcpy 2>/dev/null; then
+ echo "Yes, it can."
+ val="$define"
+ else
+ echo "It can't, sorry."
+ case "$d_memmove" in
+ "$define") echo "But that's Ok since you have memmove()." ;;
+ esac
+ fi
+ else
+ echo "(I can't compile the test program, so we'll assume not...)"
+ case "$d_memmove" in
+ "$define") echo "But that's Ok since you have memmove()." ;;
+ esac
+ fi
+ ;;
+esac
+$rm -f foo.* safebcpy core
+set d_safebcpy
+eval $setvar
+
diff --git a/mcon/U/d_safemcpy.U b/mcon/U/d_safemcpy.U
new file mode 100644
index 0000000..160aa46
--- /dev/null
+++ b/mcon/U/d_safemcpy.U
@@ -0,0 +1,127 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_safemcpy.U,v $
+?RCS: Revision 3.0.1.5 1997/02/28 15:41:12 ram
+?RCS: patch61: improved overlapping copy check
+?RCS: patch61: comfort them if they have memmove
+?RCS: patch61: added ?F: metalint hint
+?RCS:
+?RCS: Revision 3.0.1.4 1995/07/25 13:58:46 ram
+?RCS: patch56: re-arranged compile line to include ldflags before objects
+?RCS:
+?RCS: Revision 3.0.1.3 1995/03/21 08:47:26 ram
+?RCS: patch52: swapped two first arguments of memcpy() calls
+?RCS:
+?RCS: Revision 3.0.1.2 1994/10/29 16:15:10 ram
+?RCS: patch36: added 'ldflags' to the test compile line (ADO)
+?RCS:
+?RCS: Revision 3.0.1.1 1994/05/06 14:53:12 ram
+?RCS: patch23: ensure string is not optimized in read-only memory (ADO)
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:06:58 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_safemcpy: cat d_memcpy +cc +optimize +ccflags +libs +ldflags rm \
+ d_memmove i_memory i_stdlib i_string i_unistd Oldconfig Setvar
+?MAKE: -pick add $@ %<
+?S:d_safemcpy:
+?S: This variable conditionally defines the HAS_SAFE_MEMCPY symbol if
+?S: the memcpy() routine can do overlapping copies.
+?S:.
+?C:HAS_SAFE_MEMCPY (SAFE_MEMCPY):
+?C: This symbol, if defined, indicates that the memcpy routine is available
+?C: to copy potentially overlapping memory blocks. Otherwise you should
+?C: probably use memmove() or memcpy(). If neither is defined, roll your
+?C: own version.
+?C:.
+?H:#$d_safemcpy HAS_SAFE_MEMCPY /**/
+?H:.
+?F:!safemcpy
+?LINT: set d_safemcpy
+: can memcpy handle overlapping blocks?
+?X: assume the worst
+val="$undef"
+case "$d_memcpy" in
+"$define")
+ echo " "
+ echo "Checking to see if your memcpy() can do overlapping copies..." >&4
+ $cat >foo.c <<EOCP
+#$i_memory I_MEMORY
+#$i_stdlib I_STDLIB
+#$i_string I_STRING
+#$i_unistd I_UNISTD
+EOCP
+ $cat >>foo.c <<'EOCP'
+#include <stdio.h>
+#ifdef I_MEMORY
+# include <memory.h>
+#endif
+#ifdef I_STDLIB
+# include <stdlib.h>
+#endif
+#ifdef I_STRING
+# include <string.h>
+#else
+# include <strings.h>
+#endif
+#ifdef I_UNISTD
+# include <unistd.h> /* Needed for NetBSD */
+#endif
+int main()
+{
+char buf[128], abc[128];
+char *b;
+int len;
+int off;
+int align;
+
+/* Copy "abcde..." string to char abc[] so that gcc doesn't
+ try to store the string in read-only memory. */
+memcpy(abc, "abcdefghijklmnopqrstuvwxyz0123456789", 36);
+
+for (align = 7; align >= 0; align--) {
+ for (len = 36; len; len--) {
+ b = buf+align;
+ memcpy(b, abc, len);
+ for (off = 1; off <= len; off++) {
+ memcpy(b+off, b, len);
+ memcpy(b, b+off, len);
+ if (memcmp(b, abc, len))
+ exit(1);
+ }
+ }
+}
+exit(0);
+}
+EOCP
+ if $cc $optimize $ccflags $ldflags \
+ -o safemcpy foo.c $libs >/dev/null 2>&1; then
+ if ./safemcpy 2>/dev/null; then
+ echo "Yes, it can."
+ val="$define"
+ else
+ echo "It can't, sorry."
+ case "$d_memmove" in
+ "$define") echo "But that's Ok since you have memmove()." ;;
+ esac
+ fi
+ else
+ echo "(I can't compile the test program, so we'll assume not...)"
+ case "$d_memmove" in
+ "$define") echo "But that's Ok since you have memmove()." ;;
+ esac
+ fi
+ ;;
+esac
+$rm -f foo.* safemcpy core
+set d_safemcpy
+eval $setvar
+
diff --git a/mcon/U/d_sanemcmp.U b/mcon/U/d_sanemcmp.U
new file mode 100644
index 0000000..f2dc7d9
--- /dev/null
+++ b/mcon/U/d_sanemcmp.U
@@ -0,0 +1,88 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_sanemcmp.U,v $
+?RCS: Revision 3.0.1.1 1997/02/28 15:41:19 ram
+?RCS: patch61: created
+?RCS:
+?RCS:
+?MAKE:d_sanemcmp: cat d_memcmp +cc +optimize +ccflags +libs +ldflags rm_try \
+ i_memory i_stdlib i_string i_unistd Oldconfig Setvar
+?MAKE: -pick add $@ %<
+?S:d_sanemcmp:
+?S: This variable conditionally defines the HAS_SANE_MEMCMP symbol if
+?S: the memcpy() routine is available and can be used to compare relative
+?S: magnitudes of chars with their high bits set.
+?S:.
+?C:HAS_SANE_MEMCMP:
+?C: This symbol, if defined, indicates that the memcmp routine is available
+?C: and can be used to compare relative magnitudes of chars with their high
+?C: bits set. If it is not defined, roll your own version.
+?C:.
+?H:#$d_sanemcmp HAS_SANE_MEMCMP /**/
+?H:.
+?F:!sanemcmp
+?LINT: set d_sanemcmp
+: can memcmp be trusted to compare relative magnitude?
+?X: assume the worst
+val="$undef"
+case "$d_memcmp" in
+"$define")
+ echo " "
+ echo \
+ "Checking to see if your memcmp() can compare relative magnitude..." >&4
+ $cat >foo.c <<EOCP
+#$i_memory I_MEMORY
+#$i_stdlib I_STDLIB
+#$i_string I_STRING
+#$i_unistd I_UNISTD
+EOCP
+ $cat >>foo.c <<'EOCP'
+#include <stdio.h>
+#ifdef I_MEMORY
+# include <memory.h>
+#endif
+#ifdef I_STDLIB
+# include <stdlib.h>
+#endif
+#ifdef I_STRING
+# include <string.h>
+#else
+# include <strings.h>
+#endif
+#ifdef I_UNISTD
+# include <unistd.h> /* Needed for NetBSD */
+#endif
+int main()
+{
+char a = -1;
+char b = 0;
+if ((a < b) && memcmp(&a, &b, 1) < 0)
+ exit(1);
+exit(0);
+}
+EOCP
+ if $cc $optimize $ccflags $ldflags \
+ -o sanemcmp foo.c $libs >/dev/null 2>&1; then
+ if ./sanemcmp 2>/dev/null; then
+ echo "Yes, it can."
+ val="$define"
+ else
+ echo "No, it can't (it uses signed chars)."
+ fi
+ else
+ echo "(I can't compile the test program, so we'll assume not...)"
+ fi
+ ;;
+esac
+$rm_try foo.* sanemcmp
+set d_sanemcmp
+eval $setvar
+
diff --git a/mcon/U/d_sbrk.U b/mcon/U/d_sbrk.U
new file mode 100644
index 0000000..0bb14f2
--- /dev/null
+++ b/mcon/U/d_sbrk.U
@@ -0,0 +1,44 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_sbrk.U,v $
+?RCS: Revision 3.0.1.1 1994/01/24 14:06:31 ram
+?RCS: patch16: created
+?RCS:
+?MAKE:d_sbrk: Trylink cat i_unistd
+?MAKE: -pick add $@ %<
+?S:d_sbrk:
+?S: This variable conditionally defines HAS_SBRK if sbrk() is
+?S: available to add more core to the process.
+?S:.
+?C:HAS_SBRK:
+?C: This symbol, if defined, indicates that the sbrk system call is
+?C: available to add/relase core. Always true on Unix.
+?C:.
+?H:#$d_sbrk HAS_SBRK /**/
+?H:.
+?LINT:set d_sbrk
+: see if sbrk exists
+$cat >try.c <<EOC
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ void *ret;
+ ret = sbrk(1);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=sbrk
+set d_sbrk
+eval $trylink
+
diff --git a/mcon/U/d_scandir.U b/mcon/U/d_scandir.U
new file mode 100644
index 0000000..4c2072d
--- /dev/null
+++ b/mcon/U/d_scandir.U
@@ -0,0 +1,58 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_scandir.U,v $
+?RCS: Revision 3.0.1.1 1994/01/24 14:06:35 ram
+?RCS: patch16: created
+?RCS:
+?MAKE:d_scandir: Trylink cat i_dirent
+?MAKE: -pick add $@ %<
+?S:d_scandir:
+?S: This variable conditionally defines HAS_SCANDIR if scandir() is
+?S: available to scan a directory.
+?S:.
+?C:HAS_SCANDIR:
+?C: This symbol, if defined, indicates that the scandir routine is
+?C: available to scan a directory.
+?C:.
+?H:#$d_scandir HAS_SCANDIR /**/
+?H:.
+?LINT:set d_scandir
+: see if scandir exists
+$cat >try.c <<EOC
+#$i_dirent I_DIRENT
+#ifdef I_DIRENT
+#include <dirent.h>
+#endif
+int filter(const struct dirent *d)
+{
+ (void) d;
+ return 1;
+}
+
+int compare(const struct dirent **a, const struct dirent **b)
+{
+ (void) a;
+ (void) b;
+ return 1;
+}
+
+int main(void)
+{
+ static struct dirent **namelist;
+ static int ret;
+ ret |= scandir("dir", &namelist, filter, compare);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=scandir
+set d_scandir
+eval $trylink
+
diff --git a/mcon/U/d_scannl.U b/mcon/U/d_scannl.U
new file mode 100644
index 0000000..4f31596
--- /dev/null
+++ b/mcon/U/d_scannl.U
@@ -0,0 +1,74 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_scannl.U,v $
+?RCS: Revision 3.0.1.2 1997/02/28 15:41:27 ram
+?RCS: patch61: added ?F: metalint hint
+?RCS:
+?RCS: Revision 3.0.1.1 1995/07/25 13:59:12 ram
+?RCS: patch56: made cc and ccflags optional dependencies
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:07:00 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: Does the scanf routine read "\n" correctly ? This is was not
+?X: the case on AIX...
+?X:
+?MAKE:d_scannl: cat +cc +ccflags rm Setvar
+?MAKE: -pick add $@ %<
+?S:d_scannl:
+?S: This variable conditionally defines SCAN_NL, which indicates
+?S: wether the C library routines scanf() and friends can deal with
+?S: a '\n' in the input correctly. They do most of the time.
+?S:.
+?C:SCAN_NL:
+?C: This symbol is defined if the C library routines scanf() and friends
+?C: can deal with a '\n' in the input correctly, so that you can say
+?C: scanf("%d\n"); instead of scanf("%d"); getc(c); to handle the '\n'.
+?C:.
+?H:#$d_scannl SCAN_NL /* scanf("%d\n") works */
+?H:.
+?F:!try
+?LINT:set d_scannl
+: does scanf handle "\n" correctly ?
+echo " "
+val="$define"
+?X: I really want to say "\n" instead of '\n', because I am referring
+?X: to the string given as argument to scanf().
+echo 'Let'"'"'s see if scanf() handles "\\n" correctly...' >&4
+$cat >try.c <<'EOCP'
+int main()
+{
+ int i = 0, j = 0;
+ scanf("%d\n%d", &i, &j);
+ if (j != 3)
+ exit(1);
+ exit(0);
+}
+EOCP
+if $cc $ccflags -o try try.c >/dev/null 2>&1; then
+ if ./try <<'EOD'
+2
+3
+EOD
+ then
+ echo "Yes, it does."
+ else
+ echo "No, it doesn't."
+ val="$undef"
+ fi
+else
+ echo "(I can't seem to compile the test program. Assuming it does.)"
+fi
+set d_scannl
+eval $setvar
+$rm -f try.* try
+
diff --git a/mcon/U/d_sched_yield.U b/mcon/U/d_sched_yield.U
new file mode 100644
index 0000000..834f6ac
--- /dev/null
+++ b/mcon/U/d_sched_yield.U
@@ -0,0 +1,36 @@
+?RCS: Copyright (c) 2012, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_sched_yield: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_sched_yield:
+?S: This variable conditionally defines the HAS_SCHED_YIELD symbol, which
+?S: indicates to the C program that the sched_yield() routine is available
+?S: to yield the CPU.
+?S:.
+?C:HAS_SCHED_YIELD :
+?C: This symbol, if defined, indicates that the sched_yield() routine is
+?C: available to yield the CPU.
+?C:.
+?H:#$d_sched_yield HAS_SCHED_YIELD /**/
+?H:.
+?LINT:set d_sched_yield
+: see if sched_yield exists
+$cat >try.c <<EOC
+#include <sched.h>
+int main(void)
+{
+ static int ret;
+ ret |= sched_yield();
+ return ret ? 0 : 1;
+}
+EOC
+cyn=sched_yield
+set d_sched_yield
+eval $trylink
+
diff --git a/mcon/U/d_scorfl.U b/mcon/U/d_scorfl.U
new file mode 100644
index 0000000..d53c00f
--- /dev/null
+++ b/mcon/U/d_scorfl.U
@@ -0,0 +1,58 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_scorfl.U,v $
+?RCS: Revision 3.0 1993/08/18 12:07:01 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_scorfl: cat Myread Oldconfig nametype Setvar
+?MAKE: -pick add $@ %<
+?S:d_scorfl:
+?S: This variable conditionally defines the SCOREFULL symbol, which
+?S: indicates to the C program that any scoreboard kept by the program
+?S: should be kept on the basis of the user's full name as opposed to
+?S: the user's login name.
+?S:.
+?C:SCOREFULL:
+?C: This symbol, if defined, indicates that any scoreboard kept by the
+?C: program should be kept on the basis of the user's full name as opposed
+?C: to the user's login name. If the user can change his full name he
+?C: can enter multiple scores if this is defined.
+?C:.
+?H:#$d_scorfl SCOREFULL /**/
+?H:.
+?LINT:set d_scorfl
+: see how they want the scoreboard kept
+case "$d_scorfl" in
+"$define") dflt=y ;;
+*) dflt=n ;;
+esac
+case "$nametype" in
+other) val="$undef" ;;
+*)
+ $cat <<'EOM'
+
+The scoreboard can be kept with one score per login name, or one score per full
+name. If users can change their full name, or if there is more than one person
+on your system with the same full name, you should keep the score by login name
+(the full name is still printed).
+
+EOM
+ rp='Do you want the scoreboard kept by full name?'
+ . ./myread
+ case "$ans" in
+ y*) val="$define" ;;
+ *) val="$undef" ;;
+ esac
+ ;;
+esac
+set d_scorfl
+eval $setvar
+
diff --git a/mcon/U/d_select.U b/mcon/U/d_select.U
new file mode 100644
index 0000000..83216a7
--- /dev/null
+++ b/mcon/U/d_select.U
@@ -0,0 +1,61 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_select.U,v $
+?RCS: Revision 3.0 1993/08/18 12:07:02 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_select: Trylink cat i_unistd i_systypes i_sysselct i_winsock2
+?MAKE: -pick add $@ %<
+?S:d_select:
+?S: This variable conditionally defines HAS_SELECT if select() is
+?S: available to select active file descriptors. A <sys/time.h>
+?S: inclusion may be necessary for the timeout field.
+?S:.
+?C:HAS_SELECT:
+?C: This symbol, if defined, indicates that the select routine is
+?C: available to select active file descriptors. If the timeout field
+?C: is used, <sys/time.h> may need to be included.
+?C:.
+?H:#$d_select HAS_SELECT /**/
+?H:.
+?LINT:set d_select
+: see if select exists
+$cat >try.c <<EOC
+#$i_unistd I_UNISTD
+#$i_systypes I_SYS_TYPES
+#$i_sysselct I_SYS_SELECT
+#$i_winsock2 I_WINSOCK2
+?X: This is still required on some systems
+#ifdef I_SYS_TYPES
+#include <sys/types.h>
+#endif
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+#ifdef I_SYS_SELECT
+#include <sys/select.h>
+#endif
+#ifdef I_WINSOCK2
+#include <Winsock2.h>
+#endif
+int main(void)
+{
+ static int ret, n;
+ static fd_set r, w, x;
+ static struct timeval timeout;
+ ret |= select(n, &r, &w, &x, &timeout);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=select
+set d_select '-lWs2_32'
+eval $trylink
+
diff --git a/mcon/U/d_sem.U b/mcon/U/d_sem.U
new file mode 100644
index 0000000..d4c59aa
--- /dev/null
+++ b/mcon/U/d_sem.U
@@ -0,0 +1,62 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_sem.U,v $
+?RCS: Revision 3.0 1993/08/18 12:07:03 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_sem: test d_semctl d_semget d_semop Setvar Findhdr osname
+?MAKE: -pick add $@ %<
+?S:d_sem:
+?S: This variable conditionally defines the HAS_SEM symbol, which
+?S: indicates that the entire sem*(2) library is present.
+?S:.
+?C:HAS_SEM:
+?C: This symbol, if defined, indicates that the entire sem*(2) library is
+?C: supported.
+?C:.
+?H:#$d_sem HAS_SEM /**/
+?H:.
+?T:h_sem
+?LINT:set d_sem
+: see how much of the 'sem*(2)' library is present.
+h_sem=true
+echo " "
+case "$d_semctl$d_semget$d_semop" in
+*"$undef"*) h_sem=false;;
+esac
+case "$osname" in
+freebsd)
+ case "`ipcs 2>&1`" in
+ "SVID messages"*"not configured"*)
+ echo "Your $osname does not have the sem*(2) configured." >&4
+ h_sem=false
+ val="$undef"
+ set semctl d_semctl
+ eval $setvar
+ set semget d_semget
+ eval $setvar
+ set semop d_semop
+ eval $setvar
+ ;;
+ esac
+ ;;
+esac
+: we could also check for sys/ipc.h ...
+if $h_sem && $test `./findhdr sys/sem.h`; then
+ echo "You have the full sem*(2) library." >&4
+ val="$define"
+else
+ echo "You don't have the full sem*(2) library." >&4
+ val="$undef"
+fi
+set d_sem
+eval $setvar
+
diff --git a/mcon/U/d_semctl.U b/mcon/U/d_semctl.U
new file mode 100644
index 0000000..13b27f7
--- /dev/null
+++ b/mcon/U/d_semctl.U
@@ -0,0 +1,52 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_semctl.U,v $
+?RCS: Revision 3.0 1993/08/18 12:07:04 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_semctl: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_semctl:
+?S: This variable conditionally defines the HAS_SEMCTL symbol, which
+?S: indicates to the C program that the semctl() routine is available.
+?S:.
+?C:HAS_SEMCTL:
+?C: This symbol, if defined, indicates that the semctl() routine is
+?C: available to perform semaphore control operations.
+?C:.
+?H:#$d_semctl HAS_SEMCTL /**/
+?H:.
+?LINT:set d_semctl
+: see if semctl exists
+$cat >try.c <<EOC
+#include <sys/sem.h>
+int main(void)
+{
+ static int ret, id, num;
+ static union semun {
+ int val;
+ struct semid_ds *buf;
+ unsigned short *array;
+ } arg;
+ ret |= semctl(id, num, GETVAL, &arg);
+ ret |= semctl(id, num, SETVAL, &arg);
+ ret |= semctl(id, num, GETPID, &arg);
+ ret |= semctl(id, num, GETNCNT, &arg);
+ ret |= semctl(id, num, GETZCNT, &arg);
+ ret |= semctl(id, num, GETALL, &arg);
+ ret |= semctl(id, num, SETALL, &arg);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=semctl
+set d_semctl
+eval $trylink
+
diff --git a/mcon/U/d_semget.U b/mcon/U/d_semget.U
new file mode 100644
index 0000000..bf93fe3
--- /dev/null
+++ b/mcon/U/d_semget.U
@@ -0,0 +1,46 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_semget.U,v $
+?RCS: Revision 3.0 1993/08/18 12:07:05 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_semget: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_semget:
+?S: This variable conditionally defines the HAS_SEMGET symbol, which
+?S: indicates to the C program that the semget() routine is available.
+?S:.
+?C:HAS_SEMGET:
+?C: This symbol, if defined, indicates that the semget() routine is
+?C: available to get a set of semaphores.
+?C:.
+?H:#$d_semget HAS_SEMGET /**/
+?H:.
+?LINT:set d_semget
+: see if semget exists
+$cat >try.c <<EOC
+#include <sys/ipc.h>
+#include <sys/sem.h>
+int main(void)
+{
+ static int ret, n, flags;
+ static key_t key;
+ key = IPC_PRIVATE;
+ flags |= IPC_CREAT;
+ flags |= IPC_EXCL;
+ ret |= semget(key, n, flags);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=semget
+set d_semget
+eval $trylink
+
diff --git a/mcon/U/d_semop.U b/mcon/U/d_semop.U
new file mode 100644
index 0000000..968bebd
--- /dev/null
+++ b/mcon/U/d_semop.U
@@ -0,0 +1,84 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_semop.U,v $
+?RCS: Revision 3.0 1993/08/18 12:07:05 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_semop d_semtimedop: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_semop:
+?S: This variable conditionally defines the HAS_SEMOP symbol, which
+?S: indicates to the C program that the semop() routine is available.
+?S:.
+?S:d_semtimedop:
+?S: This variable conditionally defines the HAS_SEMTIMEDOP symbol, which
+?S: indicates to the C program that the semtimedop() routine is available.
+?S:.
+?C:HAS_SEMOP:
+?C: This symbol, if defined, indicates that the semop() routine is
+?C: available to execute semaphore operations.
+?C:.
+?C:HAS_SEMTIMEDOP:
+?C: This symbol, if defined, indicates that the semtimedop() routine is
+?C: available to execute semaphore operations with a timeout.
+?C:.
+?H:#$d_semop HAS_SEMOP /**/
+?H:#$d_semtimedop HAS_SEMTIMEDOP /**/
+?H:.
+?LINT:set d_semop d_semtimedop
+: see if semop exists
+$cat >try.c <<EOC
+#include <sys/ipc.h>
+#include <sys/sem.h>
+int main(void)
+{
+ static int ret, id;
+ static size_t n;
+ static struct sembuf buf;
+
+ buf.sem_num |= 1;
+ buf.sem_op |= 1;
+ buf.sem_flg |= SEM_UNDO;
+ buf.sem_flg |= IPC_NOWAIT;
+ ret |= semop(id, &buf, n);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=semop
+set d_semop
+eval $trylink
+
+@if d_semtimedop || HAS_SEMTIMEDOP
+: see if semtimedop exists
+$cat >try.c <<EOC
+#include <sys/types.h>
+#include <sys/ipc.h>
+#include <sys/sem.h>
+int main(void)
+{
+ static int ret, id;
+ static size_t n;
+ static struct sembuf buf;
+
+
+ buf.sem_num |= 1;
+ buf.sem_op |= 1;
+ buf.sem_flg |= SEM_UNDO;
+ buf.sem_flg |= IPC_NOWAIT;
+ ret |= semtimedop(id, &buf, n, (struct timespec *) 0);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=semtimedop
+set d_semtimedop
+eval $trylink
+
+@end
diff --git a/mcon/U/d_sendfile.U b/mcon/U/d_sendfile.U
new file mode 100644
index 0000000..3bac728
--- /dev/null
+++ b/mcon/U/d_sendfile.U
@@ -0,0 +1,41 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_sendfile: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_sendfile:
+?S: This variable conditionally defines the HAS_SENDFILE symbol, which
+?S: indicates to the C program that the sendfile() routine is available.
+?S:.
+?C:HAS_SENDFILE:
+?C: This symbol, if defined, indicates that the sendfile routine is
+?C: available.
+?C:.
+?H:#$d_sendfile HAS_SENDFILE /**/
+?H:.
+?LINT:set d_sendfile
+: see if sendfile exists
+$cat >try.c <<EOC
+#include <sys/types.h>
+#include <sys/sendfile.h>
+int main(void)
+{
+ static ssize_t ret;
+ static int out_fd, in_fd;
+ static off_t offset;
+ static size_t n;
+ ret |= sendfile(out_fd, in_fd, &offset, n);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=sendfile
+set d_sendfile '-lsendfile'
+eval $trylink
+
diff --git a/mcon/U/d_sendmsg.U b/mcon/U/d_sendmsg.U
new file mode 100644
index 0000000..ef668c9
--- /dev/null
+++ b/mcon/U/d_sendmsg.U
@@ -0,0 +1,70 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_sendmsg: Trylink cat i_systypes i_sysselct i_syssock \
+ i_winsock2 i_mswsock d_windows
+?MAKE: -pick add $@ %<
+?S:d_sendmsg:
+?S: This variable conditionally defines the HAS_SENDMSG symbol,
+?S: which indicates to the C program that the sendmsg() function is
+?S: available.
+?S:.
+?C:HAS_SENDMSG:
+?C: This symbol, if defined, indicates that the sendmsg() function
+?C: is available.
+?C:.
+?H:#$d_sendmsg HAS_SENDMSG /**/
+?H:.
+?LINT:set d_sendmsg
+: check for sendmsg function
+$cat >try.c <<EOC
+#$i_systypes I_SYS_TYPES
+#$i_sysselct I_SYS_SELECT
+#$i_syssock I_SYS_SOCKET
+#$i_winsock2 I_WINSOCK2
+#$i_mswsock I_MSWSOCK
+#$d_windows WINDOWS_SYSTEM
+#ifdef WINDOWS_SYSTEM
+#define WINVER 0x0501
+#endif
+#ifdef I_SYS_TYPES
+#include <sys/types.h>
+#endif
+#ifdef I_SYS_SOCKET
+#include <sys/socket.h>
+#endif
+#ifdef I_WINSOCK2
+#include <Winsock2.h>
+#endif
+#ifdef I_MSWSOCK
+#include <Mswsock.h>
+#endif
+int main(void)
+{
+ static struct msghdr msg;
+ int ret, fd, flags;
+
+ fd = 1;
+ flags = 1;
+ msg.msg_name = (void *) 0;
+ msg.msg_namelen |= 1;
+ msg.msg_iov = (void *) 0;
+ msg.msg_iovlen |= 1;
+ /* msg.msg_flags is intentionally excluded, see other unit */
+ msg.msg_control = (void *) 0;
+ msg.msg_controllen |= 1;
+ ret = sendmsg(fd, &msg, flags);
+ return ret ? 0 : 1;
+}
+EOC
+cyn='sendmsg'
+set d_sendmsg
+eval $trylink
+
diff --git a/mcon/U/d_setegid.U b/mcon/U/d_setegid.U
new file mode 100644
index 0000000..b05ed5e
--- /dev/null
+++ b/mcon/U/d_setegid.U
@@ -0,0 +1,47 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_setegid.U,v $
+?RCS: Revision 3.0 1993/08/18 12:07:07 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_setegid: Trylink cat i_unistd
+?MAKE: -pick add $@ %<
+?S:d_setegid:
+?S: This variable conditionally defines the HAS_SETEGID symbol, which
+?S: indicates to the C program that the setegid() routine is available
+?S: to change the effective gid of the current program.
+?S:.
+?C:HAS_SETEGID (SETEGID):
+?C: This symbol, if defined, indicates that the setegid routine is available
+?C: to change the effective gid of the current program.
+?C:.
+?H:#$d_setegid HAS_SETEGID /**/
+?H:.
+?LINT:set d_setegid
+: see if setegid 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;
+ static gid_t gid;
+ ret |= setegid(gid);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=setegid
+set d_setegid
+eval $trylink
+
diff --git a/mcon/U/d_setenv.U b/mcon/U/d_setenv.U
new file mode 100644
index 0000000..9fcfd52
--- /dev/null
+++ b/mcon/U/d_setenv.U
@@ -0,0 +1,38 @@
+?RCS:
+?RCS: Copyright (c) 2015 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_setenv: Trylink cat i_stdlib
+?MAKE: -pick add $@ %<
+?S:d_setenv:
+?S: This variable conditionally defines the HAS_SETENV
+?S: symbol, which indicates to the C program that setenv()
+?S: is available to change or add an environment variable.
+?S:.
+?C:HAS_SETENV:
+?C: This symbol is defined when setenv() is available to change or
+?C: add an environment variable.
+?C:.
+?H:#$d_setenv HAS_SETENV
+?H:.
+?LINT: set d_setenv
+: do we have setenv?
+$cat >try.c <<EOC
+#$i_stdlib I_STDLIB
+#ifdef I_STDLIB
+#include <stdlib.h>
+#endif
+int main(void)
+{
+ return setenv("foo", "bar", 1);
+}
+EOC
+cyn=setenv
+set d_setenv
+eval $trylink
+
diff --git a/mcon/U/d_seteuid.U b/mcon/U/d_seteuid.U
new file mode 100644
index 0000000..2a86744
--- /dev/null
+++ b/mcon/U/d_seteuid.U
@@ -0,0 +1,47 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_seteuid.U,v $
+?RCS: Revision 3.0 1993/08/18 12:07:08 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_seteuid: Trylink cat i_unistd
+?MAKE: -pick add $@ %<
+?S:d_seteuid:
+?S: This variable conditionally defines the HAS_SETEUID symbol, which
+?S: indicates to the C program that the seteuid() routine is available
+?S: to change the effective uid of the current program.
+?S:.
+?C:HAS_SETEUID (SETEUID):
+?C: This symbol, if defined, indicates that the seteuid routine is available
+?C: to change the effective uid of the current program.
+?C:.
+?H:#$d_seteuid HAS_SETEUID /**/
+?H:.
+?LINT:set d_seteuid
+: see if seteuid 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;
+ static uid_t uid;
+ ret |= seteuid(uid);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=seteuid
+set d_seteuid
+eval $trylink
+
diff --git a/mcon/U/d_setgrps.U b/mcon/U/d_setgrps.U
new file mode 100644
index 0000000..bbbbef1
--- /dev/null
+++ b/mcon/U/d_setgrps.U
@@ -0,0 +1,48 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_setgrps.U,v $
+?RCS: Revision 3.0 1993/08/18 12:06:08 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_setgrps: Trylink cat i_unistd
+?MAKE: -pick add $@ %<
+?S:d_setgrps:
+?S: This variable conditionally defines the HAS_SETGROUPS symbol, which
+?S: indicates to the C program that the setgroups() routine is available
+?S: to set the list of process groups.
+?S:.
+?C:HAS_SETGROUPS:
+?C: This symbol, if defined, indicates that the setgroups() routine is
+?C: available to set the list of process groups. If unavailable, multiple
+?C: groups are probably not supported.
+?C:.
+?H:#$d_setgrps HAS_SETGROUPS /**/
+?H:.
+?LINT:set d_setgrps
+: see if setgroups 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, n;
+ static gid_t gids;
+ ret |= setgroups(n, &gids);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=setgroups
+set d_setgrps
+eval $trylink
+
diff --git a/mcon/U/d_setlnbuf.U b/mcon/U/d_setlnbuf.U
new file mode 100644
index 0000000..f91fd5b
--- /dev/null
+++ b/mcon/U/d_setlnbuf.U
@@ -0,0 +1,45 @@
+?RCS: $Id$
+?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: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
+?RCS:
+?RCS: $Log: d_setlnbuf.U,v $
+?RCS: Revision 3.0.1.1 1994/08/29 16:11:57 ram
+?RCS: patch32: created by ADO
+?RCS:
+?MAKE:d_setlinebuf: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_setlinebuf:
+?S: This variable conditionally defines the HAS_SETLINEBUF symbol, which
+?S: indicates to the C program that the setlinebuf() routine is available
+?S: to change stderr or stdout from block-buffered or unbuffered to a
+?S: line-buffered mode.
+?S:.
+?C:HAS_SETLINEBUF :
+?C: This symbol, if defined, indicates that the setlinebuf routine is
+?C: available to change stderr or stdout from block-buffered or unbuffered
+?C: to a line-buffered mode.
+?C:.
+?H:#$d_setlinebuf HAS_SETLINEBUF /**/
+?H:.
+?LINT:set d_setlinebuf
+: see if setlinebuf exists
+$cat >try.c <<EOC
+#include <stdio.h>
+int main(void)
+{
+ setlinebuf(stdout);
+ return 0;
+}
+EOC
+cyn=setlinebuf
+set d_setlinebuf
+eval $trylink
+
diff --git a/mcon/U/d_setlocale.U b/mcon/U/d_setlocale.U
new file mode 100644
index 0000000..1533c12
--- /dev/null
+++ b/mcon/U/d_setlocale.U
@@ -0,0 +1,47 @@
+?RCS: $Id$
+?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: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
+?RCS:
+?RCS: $Log: d_setlocale.U,v $
+?RCS: Revision 3.0.1.1 1994/06/20 06:57:51 ram
+?RCS: patch30: created
+?RCS:
+?MAKE:d_setlocale: Trylink cat i_locale
+?MAKE: -pick add $@ %<
+?S:d_setlocale:
+?S: This variable conditionally defines HAS_SETLOCALE if setlocale() is
+?S: available to handle locale-specific ctype implementations.
+?S:.
+?C:HAS_SETLOCALE:
+?C: This symbol, if defined, indicates that the setlocale routine is
+?C: available to handle locale-specific ctype implementations.
+?C:.
+?H:#$d_setlocale HAS_SETLOCALE /**/
+?H:.
+?LINT:set d_setlocale
+: see if setlocale exists
+$cat >try.c <<EOC
+#$i_locale I_LOCALE
+#ifdef I_LOCALE
+#include <locale.h>
+#endif
+int main(void)
+{
+ static int category;
+ static char ret;
+ ret |= *setlocale(category, "locale");
+ return ret ? 0 : 1;
+}
+EOC
+cyn=setlocale
+set d_setlocale
+eval $trylink
+
diff --git a/mcon/U/d_setpgid.U b/mcon/U/d_setpgid.U
new file mode 100644
index 0000000..26994ce
--- /dev/null
+++ b/mcon/U/d_setpgid.U
@@ -0,0 +1,52 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_setpgid.U,v $
+?RCS: Revision 3.0.1.2 1997/02/28 15:41:49 ram
+?RCS: patch61: reworded symbol comments
+?RCS:
+?RCS: Revision 3.0.1.1 1994/01/24 14:06:40 ram
+?RCS: patch16: created
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:05:56 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_setpgid: Trylink cat i_unistd
+?MAKE: -pick add $@ %<
+?S:d_setpgid:
+?S: This variable conditionally defines the HAS_SETPGID symbol if the
+?S: setpgid(pid, gpid) function is available to set process group ID.
+?S:.
+?C:HAS_SETPGID:
+?C: This symbol, if defined, indicates that the setpgid(pid, gpid)
+?C: routine is available to set process group ID.
+?C:.
+?H:#$d_setpgid HAS_SETPGID /**/
+?H:.
+?LINT:set d_setpgid
+: see if setpgid exists
+$cat >try.c <<EOC
+#include <sys/types.h>
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static pid_t pid, pgid;
+ static int ret;
+ ret |= setpgid(pid, pgid);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=setpgid
+set d_setpgid
+eval $trylink
+
diff --git a/mcon/U/d_setpgrp.U b/mcon/U/d_setpgrp.U
new file mode 100644
index 0000000..8b5e4e1
--- /dev/null
+++ b/mcon/U/d_setpgrp.U
@@ -0,0 +1,96 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_setpgrp.U,v $
+?RCS: Revision 3.0.1.3 1997/02/28 15:44:16 ram
+?RCS: patch61: obsoleted USE_BSDGRP in favor of USE_BSD_SETPGRP
+?RCS: patch61: another unit now also defines a USE_BSD_GETPGRP
+?RCS: patch61: fallback for test program failure improved
+?RCS:
+?RCS: Revision 3.0.1.2 1995/07/25 13:59:30 ram
+?RCS: patch56: re-arranged compile line to include ldflags before objects
+?RCS:
+?RCS: Revision 3.0.1.1 1994/10/29 16:15:37 ram
+?RCS: patch36: added 'ldflags' to the test compile line (ADO)
+?RCS: patch36: call ./usg explicitly instead of relying on PATH
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:07:09 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_setpgrp d_bsdsetpgrp: Trylink Setvar cat i_unistd
+?MAKE: -pick add $@ %<
+?S:d_setpgrp:
+?S: This variable conditionally defines HAS_SETPGRP if setpgrp() is
+?S: available to set the current process group.
+?S:.
+?S:d_bsdsetpgrp (d_bsdpgrp):
+?S: This variable conditionally defines USE_BSD_SETPGRP if
+?S: setpgrp needs two arguments whereas USG one needs none.
+?S: See also d_setpgid for a POSIX interface.
+?S:.
+?C:HAS_SETPGRP (SETPGRP):
+?C: This symbol, if defined, indicates that the setpgrp routine is
+?C: available to set the current process group.
+?C:.
+?C:USE_BSD_SETPGRP (USE_BSDPGRP BSDPGRP):
+?C: This symbol, if defined, indicates that setpgrp needs two
+?C: arguments whereas USG one needs none. See also HAS_SETPGID
+?C: for a POSIX interface.
+?C:.
+?H:#$d_setpgrp HAS_SETPGRP /**/
+?H:#$d_bsdsetpgrp USE_BSD_SETPGRP /**/
+?H:.
+?LINT:set d_setpgrp d_bsdsetpgrp
+: see if setpgrp exists
+$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, pid, pgrp;
+ ret |= setpgrp(pid, pgrp);
+ return ret ? 0 : 1;
+}
+EOC
+cyn="whether you have the BSD flavour of setpgrp()"
+set d_bsdsetpgrp
+eval $trylink
+
+case "$d_bsdsetpgrp" in
+$define)
+ val="$define"
+ set d_setpgrp
+ eval $setvar
+ ;;
+*)
+ $cat >try.c <<EOC
+#include <sys/types.h>
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static pid_t ret;
+ ret |= setpgrp();
+ if (ret)
+ return 1;
+ return 0;
+}
+EOC
+ cyn="whether you have the USG flavour of setpgrp() then"
+ set d_setpgrp
+ eval $trylink
+ ;;
+esac
+
diff --git a/mcon/U/d_setpgrp2.U b/mcon/U/d_setpgrp2.U
new file mode 100644
index 0000000..25647a3
--- /dev/null
+++ b/mcon/U/d_setpgrp2.U
@@ -0,0 +1,47 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_setpgrp2.U,v $
+?RCS: Revision 3.0 1993/08/18 12:07:10 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_setpgrp2: Trylink cat i_unistd
+?MAKE: -pick add $@ %<
+?S:d_setpgrp2:
+?S: This variable conditionally defines the HAS_SETPGRP2 symbol, which
+?S: indicates to the C program that the setpgrp2() (as in DG/UX) routine
+?S: is available to set the current process group.
+?S:.
+?C:HAS_SETPGRP2 (SETPGRP2):
+?C: This symbol, if defined, indicates that the setpgrp2() (as in DG/UX)
+?C: routine is available to set the current process group.
+?C:.
+?H:#$d_setpgrp2 HAS_SETPGRP2 /**/
+?H:.
+?LINT:set d_setpgrp2
+: see if setpgrp2 exists
+$cat >try.c <<EOC
+#include <sys/types.h>
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static pid_t pid;
+ static int ret;
+ ret |= setpgrp2(pid, pid);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=setpgrp2
+set d_setpgrp2
+eval $trylink
+
diff --git a/mcon/U/d_setprior.U b/mcon/U/d_setprior.U
new file mode 100644
index 0000000..c03ebdc
--- /dev/null
+++ b/mcon/U/d_setprior.U
@@ -0,0 +1,47 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_setprior.U,v $
+?RCS: Revision 3.0 1993/08/18 12:07:11 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_setprior: Trylink cat i_sysresrc
+?MAKE: -pick add $@ %<
+?S:d_setprior:
+?S: This variable conditionally defines HAS_SETPRIORITY if setpriority()
+?S: is available to set a process's priority.
+?S:.
+?C:HAS_SETPRIORITY (SETPRIORITY):
+?C: This symbol, if defined, indicates that the setpriority routine is
+?C: available to set a process's priority.
+?C:.
+?H:#$d_setprior HAS_SETPRIORITY /**/
+?H:.
+?LINT:set d_setprior
+: see if setpriority exists
+$cat >try.c <<EOC
+#$i_sysresrc I_SYS_RESOURCE
+#ifdef I_SYS_RESOURCE
+#include <sys/resource.h>
+#endif
+int main(void)
+{
+ static int ret, prio;
+ static id_t id;
+ ret |= setpriority(PRIO_PROCESS, id, prio);
+ ret |= setpriority(PRIO_PGRP, id, prio);
+ ret |= setpriority(PRIO_USER, id, prio);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=setpriority
+set d_setprior
+eval $trylink
+
diff --git a/mcon/U/d_setproctitle.U b/mcon/U/d_setproctitle.U
new file mode 100644
index 0000000..15a880e
--- /dev/null
+++ b/mcon/U/d_setproctitle.U
@@ -0,0 +1,45 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_setproctitle: Trylink cat i_stdlib i_unistd
+?MAKE: -pick add $@ %<
+?S:d_setproctitle:
+?S: This variable conditionally defines the HAS_SETPROCTITLE
+?S: symbol, which indicates to the C program that setproctitle()
+?S: is available.
+?S:.
+?C:HAS_SETPROCTITLE:
+?C: This symbol is defined when setproctitle() can be used and takes a
+?C: format string.
+?C:.
+?H:#$d_setproctitle HAS_SETPROCTITLE
+?H:.
+?LINT: set d_setproctitle
+: can we use setproctitle?
+$cat >try.c <<EOC
+#include <sys/types.h>
+#$i_stdlib I_STDLIB
+#ifdef I_STDLIB
+#include <stdlib.h>
+#endif
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ setproctitle("%s %d %s %c", "blah", 1, "x", 'X');
+ return 0;
+}
+EOC
+cyn=setproctitle
+set d_setproctitle
+eval $trylink
+
diff --git a/mcon/U/d_setprogname.U b/mcon/U/d_setprogname.U
new file mode 100644
index 0000000..0e53fdb
--- /dev/null
+++ b/mcon/U/d_setprogname.U
@@ -0,0 +1,40 @@
+?RCS:
+?RCS: Copyright (c) 2015 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_setprogname: Trylink cat i_stdlib
+?MAKE: -pick add $@ %<
+?S:d_setprogname:
+?S: This variable conditionally defines the HAS_SETPROGNAME
+?S: symbol, which indicates to the C program that setprogname()
+?S: is available to set the program name.
+?S:.
+?C:HAS_SETPROGNAME:
+?C: This symbol is defined when setprogname() is there to set the
+?C: program name.
+?C:.
+?H:#$d_setprogname HAS_SETPROGNAME
+?H:.
+?LINT: set d_setprogname
+: can we use setprogname?
+$cat >try.c <<EOC
+#include <sys/types.h>
+#$i_stdlib I_STDLIB
+#ifdef I_STDLIB
+#include <stdlib.h>
+#endif
+int main(void)
+{
+ setprogname("test");
+ return 0;
+}
+EOC
+cyn=setprogname
+set d_setprogname
+eval $trylink
+
diff --git a/mcon/U/d_setregid.U b/mcon/U/d_setregid.U
new file mode 100644
index 0000000..906e731
--- /dev/null
+++ b/mcon/U/d_setregid.U
@@ -0,0 +1,78 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_setregid.U,v $
+?RCS: Revision 3.0 1993/08/18 12:07:12 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_setregid d_setresgid: Trylink cat i_unistd
+?MAKE: -pick add $@ %<
+?S:d_setregid:
+?S: This variable conditionally defines HAS_SETREGID if setregid() is
+?S: available to change the real and effective gid of the current
+?S: process.
+?S:.
+?S:d_setresgid:
+?S: This variable conditionally defines HAS_SETRESGID if setresgid() is
+?S: available to change the real, effective and saved gid of the current
+?S: process.
+?S:.
+?C:HAS_SETREGID (SETREGID):
+?C: This symbol, if defined, indicates that the setregid routine is
+?C: available to change the real and effective gid of the current
+?C: process.
+?C:.
+?C:HAS_SETRESGID (SETRESGID):
+?C: This symbol, if defined, indicates that the setresgid routine is
+?C: available to change the real, effective and saved gid of the current
+?C: process.
+?C:.
+?H:#$d_setregid HAS_SETREGID /**/
+?H:#$d_setresgid HAS_SETRESGID /**/
+?H:.
+?LINT: set d_setregid d_setresgid
+: see if setregid 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;
+ static gid_t rgid, egid;
+ ret |= setregid(rgid, egid);
+ if (ret)
+ return 1;
+ return 0;
+}
+EOC
+cyn=setregid
+set d_setregid
+eval $trylink
+
+$cat >try.c <<EOC
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static int ret;
+ static gid_t rgid, egid, sgid;
+ ret |= setresgid(rgid, egid, sgid);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=setresgid
+set d_setresgid
+eval $trylink
+
diff --git a/mcon/U/d_setreuid.U b/mcon/U/d_setreuid.U
new file mode 100644
index 0000000..b25b773
--- /dev/null
+++ b/mcon/U/d_setreuid.U
@@ -0,0 +1,78 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_setreuid.U,v $
+?RCS: Revision 3.0 1993/08/18 12:07:13 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_setreuid d_setresuid: Trylink cat i_unistd
+?MAKE: -pick add $@ %<
+?S:d_setreuid:
+?S: This variable conditionally defines HAS_SETREUID if setreuid() is
+?S: available to change the real and effective uid of the current
+?S: process.
+?S:.
+?S:d_setresuid:
+?S: This variable conditionally defines HAS_SETREUID if setresuid() is
+?S: available to change the real, effective and saved uid of the current
+?S: process.
+?S:.
+?C:HAS_SETREUID (SETREUID):
+?C: This symbol, if defined, indicates that the setreuid routine is
+?C: available to change the real and effective uid of the current
+?C: process.
+?C:.
+?C:HAS_SETRESUID (SETRESUID):
+?C: This symbol, if defined, indicates that the setresuid routine is
+?C: available to change the real, effective and saved uid of the current
+?C: process.
+?C:.
+?H:#$d_setreuid HAS_SETREUID /**/
+?H:#$d_setresuid HAS_SETRESUID /**/
+?H:.
+?LINT:set d_setreuid d_setresuid
+: see if setreuid exists
+$cat >try.c <<EOC
+#include <sys/types.h>
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int
+main(void)
+{
+ static uid_t ruid, euid;
+ static int ret;
+ ret |= setreuid(ruid, euid);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=setreuid
+set d_setreuid
+eval $trylink
+
+: see if setresuid exists
+$cat >try.c <<EOC
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static uid_t ruid, euid, suid;
+ static int ret;
+ ret |= setresuid(ruid, euid, suid);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=setresuid
+set d_setresuid
+eval $trylink
+
diff --git a/mcon/U/d_setrgid.U b/mcon/U/d_setrgid.U
new file mode 100644
index 0000000..12c1164
--- /dev/null
+++ b/mcon/U/d_setrgid.U
@@ -0,0 +1,47 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_setrgid.U,v $
+?RCS: Revision 3.0 1993/08/18 12:07:14 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_setrgid: Trylink cat i_unistd
+?MAKE: -pick add $@ %<
+?S:d_setrgid:
+?S: This variable conditionally defines the HAS_SETRGID symbol, which
+?S: indicates to the C program that the setrgid() routine is available
+?S: to change the real gid of the current program.
+?S:.
+?C:HAS_SETRGID (SETRGID):
+?C: This symbol, if defined, indicates that the setrgid routine is available
+?C: to change the real gid of the current program.
+?C:.
+?H:#$d_setrgid HAS_SETRGID /**/
+?H:.
+?LINT:set d_setrgid
+: see if setrgid 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;
+ static gid_t gid;
+ ret |= setrgid(gid);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=setrgid
+set d_setrgid
+eval $trylink
+
diff --git a/mcon/U/d_setrlimit.U b/mcon/U/d_setrlimit.U
new file mode 100644
index 0000000..3e69573
--- /dev/null
+++ b/mcon/U/d_setrlimit.U
@@ -0,0 +1,47 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 2012 Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_setrlimit.U,v $
+?RCS:
+?MAKE:d_setrlimit: Trylink cat i_systime
+?MAKE: -pick add $@ %<
+?S:d_setrlimit:
+?S: This variable conditionally defines the HAS_SETRLIMIT symbol, which
+?S: indicates to the C program that the setrlimit() routine is available
+?S: to set process resource limits.
+?S:.
+?C:HAS_SETRLIMIT :
+?C: This symbol, if defined, indicates that the setrlimit() routine is
+?C: available to set process resource limits.
+?C:.
+?H:#$d_setrlimit HAS_SETRLIMIT /**/
+?H:.
+?LINT:set d_setrlimit
+: see if setrlimit exists
+$cat >try.c <<EOC
+#$i_systime I_SYS_TIME
+#ifdef I_SYS_TIME
+#include <sys/time.h>
+#endif
+#include <sys/resource.h>
+int main(void)
+{
+ static struct rlimit lim;
+ int ret;
+ lim.rlim_cur = 0;
+ lim.rlim_max = 1;
+ ret |= setrlimit(RLIMIT_CORE, &lim);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=setrlimit
+set d_setrlimit
+eval $trylink
+
diff --git a/mcon/U/d_setruid.U b/mcon/U/d_setruid.U
new file mode 100644
index 0000000..e4c07f6
--- /dev/null
+++ b/mcon/U/d_setruid.U
@@ -0,0 +1,47 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_setruid.U,v $
+?RCS: Revision 3.0 1993/08/18 12:07:15 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_setruid: Trylink cat i_unistd
+?MAKE: -pick add $@ %<
+?S:d_setruid:
+?S: This variable conditionally defines the HAS_SETRUID symbol, which
+?S: indicates to the C program that the setruid() routine is available
+?S: to change the real uid of the current program.
+?S:.
+?C:HAS_SETRUID (SETRUID):
+?C: This symbol, if defined, indicates that the setruid routine is available
+?C: to change the real uid of the current program.
+?C:.
+?H:#$d_setruid HAS_SETRUID /**/
+?H:.
+?LINT:set d_setruid
+: see if setruid 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;
+ static uid_t uid;
+ ret |= setruid(uid);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=setruid
+set d_setruid
+eval $trylink
+
diff --git a/mcon/U/d_setsid.U b/mcon/U/d_setsid.U
new file mode 100644
index 0000000..c7ccf16
--- /dev/null
+++ b/mcon/U/d_setsid.U
@@ -0,0 +1,48 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_setsid.U,v $
+?RCS: Revision 3.0.1.1 1994/01/24 14:06:49 ram
+?RCS: patch16: created
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:05:56 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_setsid: Trylink cat i_unistd
+?MAKE: -pick add $@ %<
+?S:d_setsid:
+?S: This variable conditionally defines HAS_SETSID if setsid() is
+?S: available to set the process group ID.
+?S:.
+?C:HAS_SETSID:
+?C: This symbol, if defined, indicates that the setsid routine is
+?C: available to set the process group ID.
+?C:.
+?H:#$d_setsid HAS_SETSID /**/
+?H:.
+?LINT:set d_setsid
+: see if setsid exists
+$cat >try.c <<EOC
+#include <sys/types.h>
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static pid_t ret;
+ ret |= setsid();
+ return ret ? 0 : 1;
+}
+EOC
+cyn=setsid
+set d_setsid
+eval $trylink
+
diff --git a/mcon/U/d_sgndchr.U b/mcon/U/d_sgndchr.U
new file mode 100644
index 0000000..b023f5c
--- /dev/null
+++ b/mcon/U/d_sgndchr.U
@@ -0,0 +1,50 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_sgndchr.U,v $
+?RCS: Revision 3.0.1.2 1997/02/28 15:44:25 ram
+?RCS: patch61: added a ?F: metalint hint
+?RCS:
+?RCS: Revision 3.0.1.1 1995/07/25 14:00:24 ram
+?RCS: patch56: made cc and ccflags optional dependencies
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:07:16 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_sgndchr: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_sgndchr:
+?S: This variable conditionally defines the SIGNEDCHAR symbol, which
+?S: indicates to the C program that signed characters are available.
+?S:.
+?C:SIGNEDCHAR:
+?C: This symbol, if defined, indicates that characters are a signed type.
+?C: If not defined, things declared as signed characters (and that make
+?C: use of negative values) should probably be declared as shorts instead.
+?C:.
+?H:#$d_sgndchr SIGNEDCHAR /**/
+?H:.
+?LINT:set d_sgndchr
+: check for signed chars
+$cat >try.c <<EOC
+int main(void)
+{
+ switch (1) {
+ case 0:
+ case ((char) -1 < 0):
+ break;
+ }
+ return 0;
+}
+EOC
+cyn="whether your C compiler can do signed chars"
+set d_sgndchr
+eval $trylink
+
diff --git a/mcon/U/d_shm.U b/mcon/U/d_shm.U
new file mode 100644
index 0000000..8a403b4
--- /dev/null
+++ b/mcon/U/d_shm.U
@@ -0,0 +1,45 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_shm.U,v $
+?RCS: Revision 3.0 1993/08/18 12:07:17 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_shm: test d_shmctl d_shmget d_shmat d_shmdt Setvar Findhdr
+?MAKE: -pick add $@ %<
+?S:d_shm:
+?S: This variable conditionally defines the HAS_SHM symbol, which
+?S: indicates that the entire shm*(2) library is present.
+?S:.
+?C:HAS_SHM:
+?C: This symbol, if defined, indicates that the entire shm*(2) library is
+?C: supported.
+?C:.
+?H:#$d_shm HAS_SHM /**/
+?H:.
+?T:h_shm
+?LINT:set d_shm
+: see how much of the 'shm*(2)' library is present.
+h_shm=true
+echo " "
+case "$d_shmctl$d_shmget$d_shmat$d_shmdt" in
+*"$undef"*) h_shm=false;;
+esac
+: we could also check for sys/ipc.h ...
+if $h_shm && $test `./findhdr sys/shm.h`; then
+ echo "You have the full shm*(2) library." >&4
+ val="$define"
+else
+ echo "You don't have the full shm*(2) library." >&4
+ val="$undef"
+fi
+set d_shm
+eval $setvar
+
diff --git a/mcon/U/d_shmat.U b/mcon/U/d_shmat.U
new file mode 100644
index 0000000..bf37e88
--- /dev/null
+++ b/mcon/U/d_shmat.U
@@ -0,0 +1,147 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_shmat.U,v $
+?RCS: Revision 3.0.1.3 1995/07/25 14:04:23 ram
+?RCS: patch56: use findhdr to find <sys/shm.h>, to get the right one (ADO)
+?RCS:
+?RCS: Revision 3.0.1.2 1994/05/13 15:18:56 ram
+?RCS: patch27: added new symbol HAS_SHMAT_PROTOTYPE (ADO)
+?RCS:
+?RCS: Revision 3.0.1.1 1994/05/06 14:54:18 ram
+?RCS: patch23: new Shmat_t symbol to declare return type of shmat()
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:07:18 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_shmat shmattype d_shmatprototype: Trylink Setvar cat
+?MAKE: -pick add $@ %<
+?S:d_shmat:
+?S: This variable conditionally defines the HAS_SHMAT symbol, which
+?S: indicates to the C program that the shmat() routine is available.
+?S:.
+?S:shmattype:
+?S: This symbol contains the type of pointer returned by shmat().
+?S: It can be 'void *' or 'char *'.
+?S:.
+?S:d_shmatprototype:
+?S: This variable conditionally defines the HAS_SHMAT_PROTOTYPE
+?S: symbol, which indicates that sys/shm.h has a prototype for
+?S: shmat.
+?S:.
+?C:HAS_SHMAT:
+?C: This symbol, if defined, indicates that the shmat() routine is
+?C: available to attach a shared memory segment to the process space.
+?C:.
+?C:Shmat_t:
+?C: This symbol holds the return type of the shmat() system call.
+?C: Usually set to 'void *' or 'char *'.
+?C:.
+?C:HAS_SHMAT_PROTOTYPE:
+?C: This symbol, if defined, indicates that the sys/shm.h includes
+?C: a prototype for shmat(). Otherwise, it is up to the program to
+?C: guess one. Shmat_t shmat _((int, Shmat_t, int)) is a good guess,
+?C: but not always right so it should be emitted by the program only
+?C: when HAS_SHMAT_PROTOTYPE is not defined to avoid conflicting defs.
+?C:.
+?H:#$d_shmat HAS_SHMAT /**/
+?H:#define Shmat_t $shmattype /**/
+?H:#$d_shmatprototype HAS_SHMAT_PROTOTYPE /**/
+?H:.
+?LINT:set d_shmat d_shmatprototype
+: see if shmat exists
+$cat >try.c <<EOC
+#include <sys/shm.h>
+int main(void)
+{
+ static int id, flags;
+ static void *addr;
+ (void) shmat(id, addr, flags);
+ return 0;
+}
+EOC
+cyn=shmat
+set d_shmat
+eval $trylink
+
+case "$d_shmat" in
+"$define")
+ $cat >try.c <<EOC
+#include <sys/shm.h>
+extern void shmat(void);
+int main(void) { return 0; }
+EOC
+ cyn="whether <sys/shm.h> contains the shmat() prototype"
+ set val
+ eval $trylink
+ case "$val" in
+ "$define") val="$undef";;
+ *) val="$define";;
+ esac
+ ;;
+*) val="$undef";;
+esac
+
+set d_shmatprototype
+eval $setvar
+
+case "$d_shmat" in
+"$define")
+ echo " "
+ echo "Looking for the correct shmat prototype..." >&4
+ ;;
+esac
+
+case "$d_shmat" in
+"$define")
+ $cat >try.c <<EOC
+#include <sys/shm.h>
+extern void *shmat(int, const void *, int);
+int main(void) { return 0; }
+EOC
+ set val
+ eval $trylink
+ ;;
+esac
+
+case "$d_shmat" in
+"$define")
+ $cat >try.c <<EOC
+#include <sys/shm.h>
+extern void *shmat(int, void *, int);
+int main(void) { return 0; }
+EOC
+ set val
+ eval $trylink
+ case "$val" in
+ "$define") shmattype='void *';;
+ esac
+ ;;
+esac
+
+case "$d_shmat" in
+"$define")
+ $cat >try.c <<EOC
+#include <sys/shm.h>
+extern char *shmat(int, char *, int);
+int main(void) { return 0; }
+EOC
+ set val
+ eval $trylink
+ case "$val" in
+ "$define") shmattype='char *';;
+ esac
+ ;;
+esac
+
+case "$d_shmat" in
+"$define") echo "shmat() returns $shmattype";;
+esac
+
diff --git a/mcon/U/d_shmctl.U b/mcon/U/d_shmctl.U
new file mode 100644
index 0000000..555d4af
--- /dev/null
+++ b/mcon/U/d_shmctl.U
@@ -0,0 +1,44 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_shmctl.U,v $
+?RCS: Revision 3.0 1993/08/18 12:07:18 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_shmctl: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_shmctl:
+?S: This variable conditionally defines the HAS_SHMCTL symbol, which
+?S: indicates to the C program that the shmctl() routine is available.
+?S:.
+?C:HAS_SHMCTL:
+?C: This symbol, if defined, indicates that the shmctl() routine is
+?C: available to perform shared memory control operations.
+?C:.
+?H:#$d_shmctl HAS_SHMCTL /**/
+?H:.
+?LINT:set d_shmctl
+: see if shmctl exists
+$cat >try.c <<EOC
+#include <sys/shm.h>
+int main(void)
+{
+ static int ret, id;
+ static struct shmid_ds *buf;
+ ret |= shmctl(id, IPC_STAT, buf);
+ ret |= shmctl(id, IPC_SET, buf);
+ ret |= shmctl(id, IPC_RMID, buf);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=shmctl
+set d_shmctl
+eval $trylink
+
diff --git a/mcon/U/d_shmdt.U b/mcon/U/d_shmdt.U
new file mode 100644
index 0000000..6a243b1
--- /dev/null
+++ b/mcon/U/d_shmdt.U
@@ -0,0 +1,42 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_shmdt.U,v $
+?RCS: Revision 3.0 1993/08/18 12:07:19 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_shmdt: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_shmdt:
+?S: This variable conditionally defines the HAS_SHMDT symbol, which
+?S: indicates to the C program that the shmdt() routine is available.
+?S:.
+?C:HAS_SHMDT:
+?C: This symbol, if defined, indicates that the shmdt() routine is
+?C: available to detach a shared memory segment from the process space.
+?C:.
+?H:#$d_shmdt HAS_SHMDT /**/
+?H:.
+?LINT:set d_shmdt
+: see if shmdt exists
+$cat >try.c <<EOC
+#include <sys/shm.h>
+int main(void)
+{
+ static void *addr;
+ static int ret;
+ ret |= shmdt(addr);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=shmdt
+set d_shmdt
+eval $trylink
+
diff --git a/mcon/U/d_shmget.U b/mcon/U/d_shmget.U
new file mode 100644
index 0000000..4262dbf
--- /dev/null
+++ b/mcon/U/d_shmget.U
@@ -0,0 +1,46 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_shmget.U,v $
+?RCS: Revision 3.0 1993/08/18 12:07:20 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_shmget: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_shmget:
+?S: This variable conditionally defines the HAS_SHMGET symbol, which
+?S: indicates to the C program that the shmget() routine is available.
+?S:.
+?C:HAS_SHMGET:
+?C: This symbol, if defined, indicates that the shmget() routine is
+?C: available to request a shared memory segment from the kernel.
+?C:.
+?H:#$d_shmget HAS_SHMGET /**/
+?H:.
+?LINT:set d_shmget
+: see if shmget exists
+$cat >try.c <<EOC
+#include <sys/shm.h>
+int main(void)
+{
+ static key_t key = IPC_PRIVATE;
+ static size_t size;
+ static int ret, flags;
+ flags |= IPC_CREAT;
+ flags |= IPC_EXCL;
+ flags |= IPC_NOWAIT;
+ ret |= shmget(key, size, flags);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=shmget
+set d_shmget
+eval $trylink
+
diff --git a/mcon/U/d_sigaction.U b/mcon/U/d_sigaction.U
new file mode 100644
index 0000000..ffd58da
--- /dev/null
+++ b/mcon/U/d_sigaction.U
@@ -0,0 +1,45 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_sigaction.U,v $
+?RCS: Revision 3.0.1.1 1997/02/28 15:44:29 ram
+?RCS: patch61: created
+?RCS:
+?RCS:
+?MAKE:d_sigaction: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_sigaction:
+?S: This variable conditionally defines the HAS_SIGACTION symbol, which
+?S: indicates that the Vr4 sigaction() routine is available.
+?S:.
+?C:HAS_SIGACTION:
+?C: This symbol, if defined, indicates that Vr4's sigaction() routine
+?C: is available.
+?C:.
+?H:#$d_sigaction HAS_SIGACTION /**/
+?H:.
+?LINT:set d_sigaction
+: see if we have sigaction
+$cat >try.c <<EOC
+#include <stdio.h>
+#include <sys/types.h>
+#include <signal.h>
+int main(void)
+{
+ struct sigaction act, oact;
+ static int ret, sig;
+ ret |= sigaction(sig, &act, &oact);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=sigaction
+set d_sigaction
+eval $trylink
+
diff --git a/mcon/U/d_sigaltstack.U b/mcon/U/d_sigaltstack.U
new file mode 100644
index 0000000..6bfb22d
--- /dev/null
+++ b/mcon/U/d_sigaltstack.U
@@ -0,0 +1,42 @@
+?RCS:
+?RCS: Copyright (c) 2013, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_sigaltstack: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_sigaltstack:
+?S: This variable conditionally defines the HAS_SIGALTSTACK symbol, which
+?S: indicates that the sigaltstack() routine is available to define an
+?S: alternate signal stack.
+?S:.
+?C:HAS_SIGALTSTACK:
+?C: This symbol, if defined, indicates that the sigaltstack() routine
+?C: is available to define an alternate signal stack.
+?C:.
+?H:#$d_sigaltstack HAS_SIGALTSTACK /**/
+?H:.
+?LINT:set d_sigaltstack
+: see if we have sigaltstack
+$cat >try.c <<EOC
+#include <stdio.h>
+#include <signal.h>
+int main(void)
+{
+ stack_t ss;
+ static int ret;
+ ss.ss_sp = NULL;
+ ss.ss_flags |= SS_ONSTACK | SS_DISABLE;
+ ss.ss_size = SIGSTKSZ + MINSIGSTKSZ;
+ ret |= sigaltstack(&ss, NULL);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=sigaltstack
+set d_sigaltstack
+eval $trylink
+
diff --git a/mcon/U/d_sigblock.U b/mcon/U/d_sigblock.U
new file mode 100644
index 0000000..1ab7f3a
--- /dev/null
+++ b/mcon/U/d_sigblock.U
@@ -0,0 +1,41 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_sigblock.U,v $
+?RCS: Revision 3.0 1993/08/18 12:07:21 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_sigblock: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_sigblock:
+?S: This variable conditionally defines HAS_SIGBLOCK if sigblock() is
+?S: available to block signal reception.
+?S:.
+?C:HAS_SIGBLOCK:
+?C: This symbol, if defined, indicates that the sigblock routine is
+?C: available to block signal reception.
+?C:.
+?H:#$d_sigblock HAS_SIGBLOCK /**/
+?H:.
+?LINT:set d_sigblock
+: see if sigblock exists
+$cat >try.c <<EOC
+#include <signal.h>
+int main(void)
+{
+ static int ret, mask;
+ ret |= sigblock(mask);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=sigblock
+set d_sigblock
+eval $trylink
+
diff --git a/mcon/U/d_sighold.U b/mcon/U/d_sighold.U
new file mode 100644
index 0000000..7fdc2d2
--- /dev/null
+++ b/mcon/U/d_sighold.U
@@ -0,0 +1,41 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_sighold.U,v $
+?RCS: Revision 3.0 1993/08/18 12:07:21 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_sighold: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_sighold:
+?S: This variable conditionally defines HAS_SIGHOLD if sighold() is
+?S: available to hold signals.
+?S:.
+?C:HAS_SIGHOLD:
+?C: This symbol, if defined, indicates that the sighold routine is
+?C: available to hold signals.
+?C:.
+?H:#$d_sighold HAS_SIGHOLD /**/
+?H:.
+?LINT:set d_sighold
+: see if sighold exists
+$cat >try.c <<EOC
+#include <signal.h>
+int main(void)
+{
+ static int ret, sig;
+ ret |= sighold(sig);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=sighold
+set d_sighold
+eval $trylink
+
diff --git a/mcon/U/d_siglist.U b/mcon/U/d_siglist.U
new file mode 100644
index 0000000..f70f5a7
--- /dev/null
+++ b/mcon/U/d_siglist.U
@@ -0,0 +1,41 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_siglist.U,v $
+?RCS: Revision 3.0 1993/08/18 12:07:22 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_siglist: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_siglist:
+?S: This variable conditionally defines HAS_SYS_SIGLIST if sys_siglist[] is
+?S: available to translate signal numbers to strings.
+?S:.
+?C:HAS_SYS_SIGLIST (SYS_SIGLIST):
+?C: This symbol, if defined, indicates that the sys_siglist array is
+?C: available to translate signal numbers to strings.
+?C:.
+?H:#$d_siglist HAS_SYS_SIGLIST /**/
+?H:.
+?LINT:set d_siglist
+: see if sys_siglist[] exists
+$cat >try.c <<EOC
+#include <signal.h>
+int main(void)
+{
+ static char c;
+ c |= *sys_siglist[0];
+ return c ? 0 : 1
+}
+EOC
+cyn="whether sys_siglist[] exists"
+set d_siglist
+eval $trylink
+
diff --git a/mcon/U/d_sigprocmask.U b/mcon/U/d_sigprocmask.U
new file mode 100644
index 0000000..9c68b26
--- /dev/null
+++ b/mcon/U/d_sigprocmask.U
@@ -0,0 +1,42 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_sigprocmask.U,v $
+?RCS: Revision 3.0 1993/08/18 12:07:04 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_sigprocmask: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_sigprocmask:
+?S: This variable conditionally defines the HAS_SIGPROCMASK symbol, which
+?S: indicates to the C program that the sigprocmask() routine is available.
+?S:.
+?C:HAS_SIGPROCMASK:
+?C: This symbol, if defined, indicates that the sigprocmask() routine is
+?C: available to examine and change blocked signals.
+?C:.
+?H:#$d_sigprocmask HAS_SIGPROCMASK /**/
+?H:.
+?LINT:set d_sigprocmask
+: see if sigprocmask exists
+$cat >try.c <<EOC
+#include <signal.h>
+int main(void)
+{
+ static int ret;
+ sigset_t oset;
+ ret |= sigprocmask(SIG_BLOCK, &oset, &oset);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=sigprocmask
+set d_sigprocmask
+eval $trylink
+
diff --git a/mcon/U/d_sigsetjmp.U b/mcon/U/d_sigsetjmp.U
new file mode 100644
index 0000000..99f75e2
--- /dev/null
+++ b/mcon/U/d_sigsetjmp.U
@@ -0,0 +1,104 @@
+?RCS: $Id$
+?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 License,
+?RCS: as specified in the 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: You may distribute under the terms of either the GNU General Public
+?RCS: License or the Artistic License, as specified in the README file.
+?RCS:
+?RCS: $Log: d_sigsetjmp.U,v $
+?RCS: Revision 3.0.1.1 1997/02/28 15:44:33 ram
+?RCS: patch61: created
+?RCS:
+?MAKE:d_sigsetjmp: Setvar cat +cc +ccflags +ldflags libs rm
+?MAKE: -pick add $@ %<
+?S:d_sigsetjmp:
+?S: This variable conditionally defines the HAS_SIGSETJMP symbol,
+?S: which indicates that the sigsetjmp() routine is available to
+?S: call setjmp() and optionally save the process's signal mask.
+?S:.
+?C:HAS_SIGSETJMP:
+?C: This variable indicates to the C program that the sigsetjmp()
+?C: routine is available to save the calling process's registers
+?C: and stack environment for later use by siglongjmp(), and
+?C: to optionally save the process's signal mask. See
+?C: Sigjmp_buf, Sigsetjmp, and Siglongjmp.
+?C:.
+?C:Sigjmp_buf:
+?C: This is the buffer type to be used with Sigsetjmp and Siglongjmp.
+?C:.
+?C:Sigsetjmp:
+?C: This macro is used in the same way as sigsetjmp(), but will invoke
+?C: traditional setjmp() if sigsetjmp isn't available.
+?C: See HAS_SIGSETJMP.
+?C:.
+?C:Siglongjmp:
+?C: This macro is used in the same way as siglongjmp(), but will invoke
+?C: traditional longjmp() if siglongjmp isn't available.
+?C: See HAS_SIGSETJMP.
+?C:.
+?H:?%<:#$d_sigsetjmp HAS_SIGSETJMP /**/
+?H:?%<:#ifdef HAS_SIGSETJMP
+?H:?%<:#define Sigjmp_buf sigjmp_buf
+?H:?%<:#define Sigsetjmp(buf,save_mask) sigsetjmp((buf),(save_mask))
+?H:?%<:#define Siglongjmp(buf,retval) siglongjmp((buf),(retval))
+?H:?%<:#else
+?H:?%<:#define Sigjmp_buf jmp_buf
+?H:?%<:#define Sigsetjmp(buf,save_mask) setjmp((buf))
+?H:?%<:#define Siglongjmp(buf,retval) longjmp((buf),(retval))
+?H:?%<:#endif
+?H:.
+?W:%<:Sigjmp_buf Sigsetjmp Siglongjmp
+?F:!set
+?LINT:set d_sigsetjmp
+: see if sigsetjmp exists
+echo " "
+case "$d_sigsetjmp" in
+'')
+ $cat >set.c <<'EOP'
+#include <setjmp.h>
+sigjmp_buf env;
+int set = 1;
+int main(void)
+{
+ if (sigsetjmp(env,1))
+ return set;
+ set = 0;
+ siglongjmp(env, 1);
+ return 1;
+}
+EOP
+ if $cc $ccflags $ldflags -o set set.c $libs >/dev/null 2>&1; then
+ if ./set >/dev/null 2>&1; then
+ echo "POSIX sigsetjmp() found." >&4
+ val="$define"
+ else
+ $cat >&4 <<EOM
+Uh-Oh!
+You have POSIX sigsetjmp() and siglongjmp(), but they do not work properly!!
+I'll ignore them.
+EOM
+ val="$undef"
+ fi
+ else
+ echo "sigsetjmp() not found." >&4
+ val="$undef"
+ fi
+ ;;
+*) val="$d_sigsetjmp"
+ case "$d_sigsetjmp" in
+ $define) echo "POSIX sigsetjmp() found." >&4;;
+ $undef) echo "sigsetjmp() not found." >&4;;
+ esac
+ ;;
+esac
+set d_sigsetjmp
+eval $setvar
+$rm -f set.c set
+
diff --git a/mcon/U/d_sigsetmk.U b/mcon/U/d_sigsetmk.U
new file mode 100644
index 0000000..48a603e
--- /dev/null
+++ b/mcon/U/d_sigsetmk.U
@@ -0,0 +1,43 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_sigsetmk.U,v $
+?RCS: Revision 3.0 1993/08/18 12:07:23 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_sigsetmk: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_sigsetmk:
+?S: This variable conditionally defines the HAS_SIGSETMASK symbol, which
+?S: indicates to the C program that the sigsetmask() routine is available
+?S: to set current signal mask.
+?S:.
+?C:HAS_SIGSETMASK (SIGSETMASK):
+?C: This symbol, if defined, indicates that the sigsetmask() routine is
+?C: available to set current signal mask. Otherwise, you should probably
+?C: emulate this by using signal(), but fear race conditions...
+?C:.
+?H:#$d_sigsetmk HAS_SIGSETMASK /**/
+?H:.
+?LINT:set d_sigsetmk
+: see if sigsetmask exists
+$cat >try.c <<EOC
+#include <signal.h>
+int main(void)
+{
+ static int ret, mask;
+ ret |= sigsetmask(mask);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=sigsetmask
+set d_sigsetmk
+eval $trylink
+
diff --git a/mcon/U/d_sigvec.U b/mcon/U/d_sigvec.U
new file mode 100644
index 0000000..57c13ca
--- /dev/null
+++ b/mcon/U/d_sigvec.U
@@ -0,0 +1,99 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_sigvec.U,v $
+?RCS: Revision 3.0.1.1 1997/02/28 15:45:37 ram
+?RCS: patch61: there is now a separate routine for sigaction()
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:07:24 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X: d_sigvec.U, from d_ftime.U 1.0
+?X:
+?MAKE:d_sigvec d_sigvectr d_sigintrp: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_sigvec:
+?S: This variable conditionally defines the HAS_SIGVEC symbol, which indicates
+?S: that BSD reliable signals are supported.
+?S:.
+?S:d_sigvectr:
+?S: This variable conditionally defines the HAS_SIGVECTOR symbol, which
+?S: indicates that the sigvec() routine is called sigvector() instead, for
+?S: reasons known only to Hewlett-Packard.
+?S:.
+?S:d_sigintrp:
+?S: This variable conditionally defines the HAS_SIGINTRP symbol, which
+?S: indicates that the siginterrupt() routine is available.
+?S:.
+?C:HAS_SIGVEC (SIGVEC):
+?C: This symbol, if defined, indicates that BSD reliable signals are
+?C: supported.
+?C:.
+?C:HAS_SIGVECTOR (SIGVECTOR):
+?C: This symbol, if defined, indicates that the sigvec() routine is called
+?C: sigvector() instead, and that sigspace() is provided instead of
+?C: sigstack(). This is probably only true for HP-UX.
+?C:.
+?C:HAS_SIGINTRP (SIGINTRP):
+?C: This symbol, if defined, indicates that the siginterrupt() routine
+?C: is available.
+?C:.
+?H:#$d_sigvec HAS_SIGVEC /**/
+?H:#$d_sigvectr HAS_SIGVECTOR /**/
+?H:#$d_sigintrp HAS_SIGINTRP /**/
+?H:.
+?LINT:set d_sigvec d_sigvectr d_sigintrp
+@if d_sigvectr || d_sigvec || HAS_SIGVEC || HAS_SIGVECTOR
+: see if sigvector exists
+$cat >try.c <<EOC
+#include <signal.h>
+int main(void)
+{
+ static int ret, sig;
+ struct sigvec vec, ovec;
+ ret |= sigvector(sig, &vec, &ovec);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=sigvector
+set d_sigvectr
+eval $trylink
+
+$cat >try.c <<EOC
+#include <signal.h>
+int main(void)
+{
+ static int ret, sig;
+ struct sigvec vec, ovec;
+ ret |= sigvec(sig, &vec, &ovec);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=sigvec
+set d_sigvec
+eval $trylink
+
+@end
+@if d_sigintrp || HAS_SIGINTRP
+: see if we have siginterrupt
+$cat >try.c <<EOC
+#include <signal.h>
+int main(void)
+{
+ static int ret, sig, flag;
+ ret |= siginterrupt(sig, flag);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=siginterrupt
+set d_sigintrp
+eval $trylink
+
+@end
diff --git a/mcon/U/d_sjis2jis.U b/mcon/U/d_sjis2jis.U
new file mode 100644
index 0000000..15203df
--- /dev/null
+++ b/mcon/U/d_sjis2jis.U
@@ -0,0 +1,32 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_sjis2jis.U,v $
+?RCS: Revision 3.0 1993/08/18 12:07:25 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_sjis2jis: Inlibc
+?MAKE: -pick add $@ %<
+?S:d_sjis2jis:
+?S: This variable conditionally defines the HAS_SJIS2JIS symbol, which
+?S: indicates to the C program that the sjis2jis() routine is available
+?S: to convert SJIS to JIS.
+?S:.
+?C:HAS_SJIS2JIS:
+?C: This symbol, if defined, indicates that the sjis2jis routine is
+?C: available to convert SJIS to JIS.
+?C:.
+?H:#$d_sjis2jis HAS_SJIS2JIS /**/
+?H:.
+?LINT:set d_sjis2jis
+: see if sjis2jis exists
+set sjis2jis d_sjis2jis
+eval $inlibc
+
diff --git a/mcon/U/d_sockaddr_in_sin_len.U b/mcon/U/d_sockaddr_in_sin_len.U
new file mode 100644
index 0000000..cafb111
--- /dev/null
+++ b/mcon/U/d_sockaddr_in_sin_len.U
@@ -0,0 +1,53 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_sockaddr_in_sin_len: Trylink cat i_arpainet i_syssock i_winsock2 i_niin
+?MAKE: -pick add $@ %<
+?S:d_sockaddr_in_sin_len:
+?S: This variable conditionally defines the HAS_SOCKADDR_IN_SIN_LEN symbol,
+?S: indicates to the C program that struct sockaddr_in has a member named
+?S: "sin_len".
+?S:.
+?C:HAS_SOCKADDR_IN_SIN_LEN:
+?C: This symbol is defined if struct sockaddr_in has sin_len.
+?C:.
+?H:#$d_sockaddr_in_sin_len HAS_SOCKADDR_IN_SIN_LEN
+?H:.
+?LINT: set d_sockaddr_in_sin_len
+: does struct sockaddr_in has sin_len
+$cat >try.c <<EOC
+#$i_syssock I_SYS_SOCKET
+#$i_niin I_NETINET_IN
+#$i_winsock2 I_WINSOCK2
+#$i_arpainet I_ARPA_INET
+#include <sys/types.h>
+#ifdef I_SYS_SOCKET
+#include <sys/socket.h>
+#endif
+#ifdef I_NETINET_IN
+#include <netinet/in.h>
+#endif
+#ifdef I_ARPA_INET
+#include <arpa/inet.h>
+#endif
+#ifdef I_WINSOCK2
+#include <Winsock2.h>
+#endif
+int main(void)
+{
+ static struct sockaddr_in addr;
+ addr.sin_len = 1;
+ return 0;
+}
+EOC
+cyn="whether 'struct sockaddr_in' has a 'sin_len' member"
+set d_sockaddr_in_sin_len
+eval $trylink
+
diff --git a/mcon/U/d_sockaddr_un.U b/mcon/U/d_sockaddr_un.U
new file mode 100644
index 0000000..c4d5f19
--- /dev/null
+++ b/mcon/U/d_sockaddr_un.U
@@ -0,0 +1,61 @@
+?RCS: $Id: d_sockaddr_in_sin_len.U 57 2010-12-11 23:44:52Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2011, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_sockaddr_un: Trylink cat i_arpainet i_syssock i_winsock2 i_niin i_sysun
+?MAKE: -pick add $@ %<
+?S:d_sockaddr_un:
+?S: This variable conditionally defines the HAS_SOCKADDR_UN symbol,
+?S: indicates to the C program that struct sockaddr_un is available to
+?S: create file sockets.
+?S:.
+?C:HAS_SOCKADDR_UN:
+?C: This symbol is defined if struct sockaddr_un exists, allowing the
+?C: creation of file sockets.
+?C:.
+?H:#$d_sockaddr_un HAS_SOCKADDR_UN
+?H:.
+?LINT: set d_sockaddr_un
+: does struct sockaddr_un exists?
+$cat >try.c <<EOC
+#$i_syssock I_SYS_SOCKET
+#$i_sysun I_SYS_UN
+#$i_niin I_NETINET_IN
+#$i_winsock2 I_WINSOCK2
+#$i_arpainet I_ARPA_INET
+#include <sys/types.h>
+#ifdef I_SYS_SOCKET
+#include <sys/socket.h>
+#endif
+#ifdef I_SYS_UN
+#include <sys/un.h>
+#endif
+#ifdef I_NETINET_IN
+#include <netinet/in.h>
+#endif
+#ifdef I_ARPA_INET
+#include <arpa/inet.h>
+#endif
+#ifdef I_WINSOCK2
+#include <Winsock2.h>
+#endif
+#if !defined(AF_LOCAL) && defined(AF_UNIX)
+#define AF_LOCAL AF_UNIX
+#endif
+int main(void)
+{
+ static struct sockaddr_un addr;
+ addr.sun_family = AF_LOCAL;
+ return 0;
+}
+EOC
+cyn="whether 'struct sockaddr_un' is available"
+set d_sockaddr_un
+eval $trylink
+
diff --git a/mcon/U/d_socker_get.U b/mcon/U/d_socker_get.U
new file mode 100644
index 0000000..3d7ae23
--- /dev/null
+++ b/mcon/U/d_socker_get.U
@@ -0,0 +1,65 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_socker_get sockercflags sockerldflags: Trylink cat ccflags ldflags
+?MAKE: -pick add $@ %<
+?S:d_socker_get:
+?S: This variable conditionally defines the HAS_SOCKER_GET symbol, which
+?S: indicates to the C program that socker_get() support is available.
+?S:.
+?S:sockercflags:
+?S: This variable holds the compiler flags required to compile with socker.
+?S:.
+?S:sockerldflags:
+?S: This variable holds the linker flags required to link against socker.
+?S:.
+?C:HAS_SOCKER_GET:
+?C: This symbol is defined when socker_get() can be used to get sockets
+?C: bound to privileged ports.
+?C:.
+?H:#$d_socker_get HAS_SOCKER_GET
+?H:.
+?T:saved_ccflags saved_ldflags
+?LINT:change ccflags ldflags
+?LINT:set d_socker_get
+: determine whether socker_get is available
+case "$d_socker_get" in
+"$undef") echo " "; echo "socker support is disabled." >&4;;
+*)
+ $cat >try.c <<'EOC'
+#include <sys/types.h>
+#include <socker.h>
+int main(void)
+{
+ static int ret;
+ ret |= socker_get(1, 2, 3, "", 5);
+ return ret ? 0 : 1;
+}
+EOC
+ sockercflags=`socker-config --cflags 2>/dev/null`
+ sockerldflags=`socker-config --libs 2>/dev/null`
+ saved_ccflags=$ccflags
+ saved_ldflags=$ldflags
+ ccflags="$ccflags $sockercflags"
+ ldflags="$ldflags $sockerldflags"
+ cyn="whether socket_get() allows binding to privileged ports"
+ set d_socker_get
+ eval $trylink
+ ccflags=$saved_ccflags
+ ldflags=$saved_ldflags
+ case "$d_socker_get" in
+ "$undef")
+ sockercflags=''
+ sockerldflags=''
+ ;;
+ esac
+ ;;
+esac
+
diff --git a/mcon/U/d_socket.U b/mcon/U/d_socket.U
new file mode 100644
index 0000000..3a18daf
--- /dev/null
+++ b/mcon/U/d_socket.U
@@ -0,0 +1,140 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_socket.U,v $
+?RCS: Revision 3.0.1.2 1997/02/28 15:46:00 ram
+?RCS: patch61: replaced .a with $_a all over the place
+?RCS:
+?RCS: Revision 3.0.1.1 1994/01/24 14:08:04 ram
+?RCS: patch16: can now safely declare private nm_extract in dependencies
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:07:26 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_socket d_oldsock d_sockpair socketlib sockethdr: contains libc \
+ echo n c nm_opt nm_extract Trylink Csym _a cat i_syssock i_winsock2
+?MAKE: -pick add $@ %<
+?S:d_socket:
+?S: This variable conditionally defines HAS_SOCKET, which indicates
+?S: that the BSD socket interface is supported.
+?S:.
+?S:d_sockpair:
+?S: This variable conditionally defines the HAS_SOCKETPAIR symbol, which
+?S: indicates that the BSD socketpair() is supported.
+?S:.
+?S:d_oldsock:
+?S: This variable conditionally defines the OLDSOCKET symbol, which
+?S: indicates that the BSD socket interface is based on 4.1c and not 4.2.
+?S:.
+?S:socketlib:
+?S: This variable has the names of any libraries needed for socket support.
+?S:.
+?S:sockethdr:
+?S: This variable has any cpp -I flags needed for socket support.
+?S:.
+?C:HAS_SOCKET:
+?C: This symbol, if defined, indicates that the BSD socket interface is
+?C: supported.
+?C:.
+?C:HAS_SOCKETPAIR:
+?C: This symbol, if defined, indicates that the BSD socketpair() call is
+?C: supported.
+?C:.
+?C:USE_OLDSOCKET:
+?C: This symbol, if defined, indicates that the 4.1c BSD socket interface
+?C: is supported instead of the 4.2/4.3 BSD socket interface. For instance,
+?C: there is no setsockopt() call.
+?C:.
+?H:#$d_socket HAS_SOCKET /**/
+?H:#$d_sockpair HAS_SOCKETPAIR /**/
+?H:#$d_oldsock USE_OLDSOCKET /**/
+?H:.
+?T:val
+?LINT:use libc
+?LINT:set d_sockpair
+: see whether socket exists
+socketlib=''
+sockethdr=''
+echo " "
+$echo $n "Hmm... $c" >&4
+if set socket val -f d_socket; eval $csym; $val; then
+ echo "Looks like you have Berkeley networking support." >&4
+ d_socket="$define"
+?X: now check for advanced features
+ if set setsockopt val -f; eval $csym; $val; then
+ d_oldsock="$undef"
+ else
+ echo "...but it uses the old 4.1c interface, rather than 4.2" >&4
+ d_oldsock="$define"
+ fi
+else
+?X: HP-UX, for one, puts all the socket stuff in socklib.o. Note that if we
+?X: come here on HP-UX, then we must have used nm to get symbols, or we really
+?X: don't have sockets anyway...
+ if $contains socklib libc.list >/dev/null 2>&1; then
+ echo "Looks like you have Berkeley networking support." >&4
+ d_socket="$define"
+ : we will have to assume that it supports the 4.2 BSD interface
+ d_oldsock="$undef"
+ else
+ echo "You don't have Berkeley networking in libc$_a..." >&4
+?X: look for an optional networking library
+ if test -f /usr/lib/libnet$_a; then
+?X: space between two '(' needed for ksh
+ ( (nm $nm_opt /usr/lib/libnet$_a | eval $nm_extract) || \
+ ar t /usr/lib/libnet$_a) 2>/dev/null >> libc.list
+ if $contains socket libc.list >/dev/null 2>&1; then
+ echo "...but the Wollongong group seems to have hacked it in." >&4
+ socketlib="-lnet"
+ sockethdr="-I/usr/netinclude"
+ d_socket="$define"
+?X: now check for advanced features
+ if $contains setsockopt libc.list >/dev/null 2>&1; then
+ d_oldsock="$undef"
+ else
+ echo "...using the old 4.1c interface, rather than 4.2" >&4
+ d_oldsock="$define"
+ fi
+ else
+ echo "or even in libnet$_a, which is peculiar." >&4
+ d_socket="$undef"
+ d_oldsock="$undef"
+ fi
+ else
+ echo "or anywhere else I see." >&4
+ d_socket="$undef"
+ d_oldsock="$undef"
+ fi
+ fi
+fi
+
+@if HAS_SOCKETPAIR || d_sockpair
+: see if socketpair exists
+$cat >try.c <<EOC
+#$i_syssock I_SYS_SOCKET
+#$i_winsock2 I_WINSOCK2
+#ifdef I_SYS_SOCKET
+#include <sys/socket.h>
+#endif
+#ifdef I_WINSOCK2
+#include <Winsock2.h>
+#endif
+int main(void)
+{
+ static int ret, domain, type, protocol, sv[2];
+ ret |= socketpair(domain, type, protocol, sv);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=socketpair
+set d_sockpair
+eval $trylink
+
+@end
diff --git a/mcon/U/d_speedopt.U b/mcon/U/d_speedopt.U
new file mode 100644
index 0000000..e45961c
--- /dev/null
+++ b/mcon/U/d_speedopt.U
@@ -0,0 +1,62 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_speedopt.U,v $
+?RCS: Revision 3.0.1.1 1994/10/29 16:15:51 ram
+?RCS: patch36: call ./Cppsym explicitly instead of relying on PATH
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:07:27 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_speedopt: Myread Cppsym Oldconfig cat models Setvar
+?MAKE: -pick add $@ %<
+?S:d_speedopt:
+?S: This variable conditionally defines the SPEED_OVER_MEM symbol, which
+?S: indicates to the C program that it can burn memory in order to save
+?S: CPU time.
+?S:.
+?C:SPEED_OVER_MEM (SPEEDOVERMEM):
+?C: This symbol, if defined, indicates that the program can use more
+?C: memory in order to reduce CPU time. The symbol doesn't say whether
+?C: we are more interested in saving text space or data space.
+?C:.
+?H:#$d_speedopt SPEED_OVER_MEM /**/
+?H:.
+?LINT:set d_speedopt
+: do we want speed at the expense of memory
+$cat <<'EOM'
+
+I can try to optimize this package for either speed or memory. If you have
+limited address space you may wish to optimize for memory. Otherwise you
+should probably optimize for speed.
+
+EOM
+case "$d_speedopt" in
+'') if ./Cppsym $smallmach; then
+ case "$models" in
+ *large*|*huge*) dflt=speed;;
+ *) dflt=memory;;
+ esac
+ else
+ dflt=speed
+ fi
+ ;;
+*define*) dflt=speed;;
+*) dflt=memory;;
+esac
+rp="What to optimize for?"
+. ./myread
+case "$ans" in
+mem*) val="$undef";;
+*) val="$define";;
+esac
+set d_speedopt
+eval $setvar
+
diff --git a/mcon/U/d_srandom.U b/mcon/U/d_srandom.U
new file mode 100644
index 0000000..d796023
--- /dev/null
+++ b/mcon/U/d_srandom.U
@@ -0,0 +1,39 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_srandom: Trylink cat i_stdlib
+?MAKE: -pick add $@ %<
+?S:d_srandom:
+?S: This variable conditionally defines the HAS_SRANDOM symbol, which
+?S: indicates to the C program that the srandom() routine is available.
+?S:.
+?C:HAS_SRANDOM:
+?C: This symbol, if defined, indicates that the srandom routine is
+?C: available.
+?C:.
+?H:#$d_srandom HAS_SRANDOM /**/
+?H:.
+?LINT:set d_srandom
+: see if srandom exists
+$cat >try.c <<EOC
+#$i_stdlib I_STDLIB
+#ifdef I_STDLIB
+#include <stdlib.h>
+#endif
+int main(void)
+{
+ srandom(1UL);
+ return 0;
+}
+EOC
+cyn=srandom
+set d_srandom
+eval $trylink
+
diff --git a/mcon/U/d_stat.U b/mcon/U/d_stat.U
new file mode 100644
index 0000000..c128284
--- /dev/null
+++ b/mcon/U/d_stat.U
@@ -0,0 +1,45 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_stat.U,v $
+?RCS: Revision 3.0 1993/08/18 12:07:28 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_stat: Trylink cat i_sysstat
+?MAKE: -pick add $@ %<
+?S:d_stat:
+?S: This variable conditionally defines HAS_STAT if stat() is
+?S: available to get file status.
+?S:.
+?C:HAS_STAT (STAT):
+?C: This symbol, if defined, indicates that the stat routine is
+?C: available to get file status.
+?C:.
+?H:#$d_stat HAS_STAT /**/
+?H:.
+?LINT:set d_stat
+: see if stat exists
+$cat >try.c <<EOC
+#$i_sysstat I_SYS_STAT
+#ifdef I_SYS_STAT
+#include <sys/stat.h>
+#endif
+int main(void)
+{
+ static struct stat sb;
+ static int ret;
+ ret |= stat("path", &sb);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=stat
+set d_stat
+eval $trylink
+
diff --git a/mcon/U/d_statblks.U b/mcon/U/d_statblks.U
new file mode 100644
index 0000000..1391ef1
--- /dev/null
+++ b/mcon/U/d_statblks.U
@@ -0,0 +1,46 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_statblks.U,v $
+?RCS: Revision 3.0 1993/08/18 12:07:29 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_statblks: contains Setvar Findhdr
+?MAKE: -pick add $@ %<
+?S:d_statblks:
+?S: This variable conditionally defines USE_STAT_BLOCKS if this system
+?S: has a stat structure declaring st_blksize and st_blocks.
+?S:.
+?C:USE_STAT_BLOCKS (STATBLOCKS):
+?C: This symbol is defined if this system has a stat structure declaring
+?C: st_blksize and st_blocks.
+?C:.
+?H:#$d_statblks USE_STAT_BLOCKS /**/
+?H:.
+?T:xxx
+?LINT:set d_statblks
+: see if stat knows about block sizes
+echo " "
+xxx=`./findhdr sys/stat.h`
+if $contains 'st_blocks;' "$xxx" >/dev/null 2>&1 ; then
+ if $contains 'st_blksize;' "$xxx" >/dev/null 2>&1 ; then
+ echo "Your stat() knows about block sizes." >&4
+ val="$define"
+ else
+ echo "Your stat() doesn't know about block sizes." >&4
+ val="$undef"
+ fi
+else
+ echo "Your stat() doesn't know about block sizes." >&4
+ val="$undef"
+fi
+set d_statblks
+eval $setvar
+
diff --git a/mcon/U/d_statfs.U b/mcon/U/d_statfs.U
new file mode 100644
index 0000000..ff3b43c
--- /dev/null
+++ b/mcon/U/d_statfs.U
@@ -0,0 +1,50 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_statfs: Trylink cat i_sysmount i_sysparam i_sysvfs
+?MAKE: -pick add $@ %<
+?S:d_statfs:
+?S: This variable conditionally defines the HAS_STATFS symbol, which
+?S: indicates to the C program that the statfs() system call is available.
+?S:.
+?C:HAS_STATFS:
+?C: This symbol, if defined, indicates that the Linux statfs() system call
+?C: is available to get filesystem statistics.
+?C:.
+?H:#$d_statfs HAS_STATFS /**/
+?H:.
+?LINT:set d_statfs
+: see if statfs exists
+$cat >try.c <<EOC
+#$i_sysparam I_SYS_PARAM
+#ifdef I_SYS_PARAM
+#include <sys/param.h>
+#endif
+#$i_sysmount I_SYS_MOUNT
+#ifdef I_SYS_MOUNT
+#include <sys/mount.h>
+#endif
+#$i_sysvfs I_SYS_VFS
+#ifdef I_SYS_VFS
+#include <sys/vfs.h>
+#endif
+int main(void)
+{
+ static int ret;
+ static char *p;
+ static struct statfs buf;
+ ret |= statfs(p, &buf);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=statfs
+set d_statfs
+eval $trylink
+
diff --git a/mcon/U/d_statvfs.U b/mcon/U/d_statvfs.U
new file mode 100644
index 0000000..1b0c0e0
--- /dev/null
+++ b/mcon/U/d_statvfs.U
@@ -0,0 +1,39 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_statvfs: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_statvfs:
+?S: This variable conditionally defines the HAS_STATVFS symbol, which
+?S: indicates to the C program that the statvfs() system call is available.
+?S:.
+?C:HAS_STATVFS:
+?C: This symbol, if defined, indicates that the POSIX statvfs() system call
+?C: is available to get filesystem statistics.
+?C:.
+?H:#$d_statvfs HAS_STATVFS /**/
+?H:.
+?LINT:set d_statvfs
+: see if statvfs exists
+$cat >try.c <<EOC
+#include <sys/statvfs.h>
+int main(void)
+{
+ static int ret;
+ static char *p;
+ static struct statvfs buf;
+ ret |= statvfs(p, &buf);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=statvfs
+set d_statvfs
+eval $trylink
+
diff --git a/mcon/U/d_stdstdio.U b/mcon/U/d_stdstdio.U
new file mode 100644
index 0000000..fe3a853
--- /dev/null
+++ b/mcon/U/d_stdstdio.U
@@ -0,0 +1,325 @@
+?RCS: $Id$
+?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: Original Author: Tye McQueen <tye@metronet.com>
+?RCS:
+?RCS: $Log: d_stdstdio.U,v $
+?RCS: Revision 3.0.1.3 1997/02/28 15:46:32 ram
+?RCS: patch61: merged with perl5's unit
+?RCS:
+?RCS: Revision 3.0.1.2 1995/07/25 14:06:54 ram
+?RCS: patch56: typo fix on ?C: line for FILE_bufsiz
+?RCS: patch56: fixed unbalanced parenthesis (ADO)
+?RCS: patch56: check whether FILE_cnt and FILE_ptr can be assigned to (ADO)
+?RCS:
+?RCS: Revision 3.0.1.1 1995/05/12 12:12:11 ram
+?RCS: patch54: complete rewrite by Tye McQueen to fit modern systems
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:07:31 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_stdstdio d_stdiobase stdio_ptr stdio_cnt stdio_base \
+ stdio_bufsiz d_stdio_cnt_lval d_stdio_ptr_lval stdio_filbuf: cat \
+ +cc +ccflags contains +ldflags +libs rm_try \
+ Setvar Findhdr Oldconfig
+?MAKE: -pick add $@ %<
+?S:d_stdstdio:
+?S: This variable conditionally defines USE_STDIO_PTR if this system
+?S: has a FILE structure declaring usable _ptr and _cnt fields (or
+?S: equivalent) in stdio.h.
+?S:.
+?S:stdio_ptr:
+?S: This variable defines how, given a FILE pointer, fp, to access the
+?S: _ptr field (or equivalent) of stdio.h's FILE structure. This will
+?S: be used to define the macro FILE_ptr(fp).
+?S:.
+?S:d_stdio_ptr_lval:
+?S: This variable conditionally defines STDIO_PTR_LVALUE if the
+?S: FILE_ptr macro can be used as an lvalue.
+?S:.
+?S:stdio_cnt:
+?S: This variable defines how, given a FILE pointer, fp, to access the
+?S: _cnt field (or equivalent) of stdio.h's FILE structure. This will
+?S: be used to define the macro FILE_cnt(fp).
+?S:.
+?S:d_stdio_cnt_lval:
+?S: This variable conditionally defines STDIO_CNT_LVALUE if the
+?S: FILE_cnt macro can be used as an lvalue.
+?S:.
+?S:stdio_filbuf:
+?S: This variable defines how, given a FILE pointer, fp, to tell
+?S: stdio to refill it's internal buffers (?). This will
+?S: be used to define the macro FILE_filbuf(fp).
+?S:.
+?S:d_stdiobase:
+?S: This variable conditionally defines USE_STDIO_BASE if this system
+?S: has a FILE structure declaring a usable _base field (or equivalent)
+?S: in stdio.h.
+?S:.
+?S:stdio_base:
+?S: This variable defines how, given a FILE pointer, fp, to access the
+?S: _base field (or equivalent) of stdio.h's FILE structure. This will
+?S: be used to define the macro FILE_base(fp).
+?S:.
+?S:stdio_bufsiz:
+?S: This variable defines how, given a FILE pointer, fp, to determine
+?S: the number of bytes store in the I/O buffer pointer to by the
+?S: _base field (or equivalent) of stdio.h's FILE structure. This will
+?S: be used to define the macro FILE_bufsiz(fp).
+?S:.
+?C:USE_STDIO_PTR ~ d_stdstdio (USE_STD_STDIO STDSTDIO):
+?C: This symbol is defined if the _ptr and _cnt fields (or similar)
+?C: of the stdio FILE structure can be used to access the stdio buffer
+?C: for a file handle. If this is defined, then the FILE_ptr(fp)
+?C: and FILE_cnt(fp) macros will also be defined and should be used
+?C: to access these fields.
+?C:.
+?C:FILE_ptr:
+?C: This macro is used to access the _ptr field (or equivalent) of the
+?C: FILE structure pointed to by its argument. This macro will always be
+?C: defined if USE_STDIO_PTR is defined.
+?C:.
+?C:STDIO_PTR_LVALUE:
+?C: This symbol is defined if the FILE_ptr macro can be used as an
+?C: lvalue.
+?C:.
+?C:FILE_cnt:
+?C: This macro is used to access the _cnt field (or equivalent) of the
+?C: FILE structure pointed to by its argument. This macro will always be
+?C: defined if USE_STDIO_PTR is defined.
+?C:.
+?C:STDIO_CNT_LVALUE:
+?C: This symbol is defined if the FILE_cnt macro can be used as an
+?C: lvalue.
+?C:.
+?C:FILE_filbuf:
+?C: This macro is used to access the internal stdio _filbuf function
+?C: (or equivalent), if STDIO_CNT_LVALUE and STDIO_PTR_LVALUE
+?C: are defined. It is typically either _filbuf or __filbuf.
+?C: This macro will only be defined if both STDIO_CNT_LVALUE and
+?C: STDIO_PTR_LVALUE are defined.
+?C:.
+?H:?d_stdstdio:#$d_stdstdio USE_STDIO_PTR /**/
+?H:?d_stdstdio:#ifdef USE_STDIO_PTR
+?H:#define FILE_ptr(fp) $stdio_ptr
+?H:#$d_stdio_ptr_lval STDIO_PTR_LVALUE /**/
+?H:#define FILE_cnt(fp) $stdio_cnt
+?H:#$d_stdio_cnt_lval STDIO_CNT_LVALUE /**/
+?H:?d_stdstdio:#if defined(STDIO_PTR_LVALUE) && defined(STDIO_CNT_LVALUE)
+?H:#define FILE_filbuf(fp) $stdio_filbuf /**/
+?H:?d_stdstdio:#endif
+?H:?d_stdstdio:#endif
+?H:.
+?W:d_stdstdio:FILE_ptr FILE_cnt FILE_filbuf
+?C:USE_STDIO_BASE ~ d_stdiobase:
+?C: This symbol is defined if the _base field (or similar) of the
+?C: stdio FILE structure can be used to access the stdio buffer for
+?C: a file handle. If this is defined, then the FILE_base(fp) macro
+?C: will also be defined and should be used to access this field.
+?C: Also, the FILE_bufsiz(fp) macro will be defined and should be used
+?C: to determine the number of bytes in the buffer. USE_STDIO_BASE
+?C: will never be defined unless USE_STDIO_PTR is.
+?C:.
+?C:FILE_base:
+?C: This macro is used to access the _base field (or equivalent) of the
+?C: FILE structure pointed to by its argument. This macro will always be
+?C: defined if USE_STDIO_BASE is defined.
+?C:.
+?C:FILE_bufsiz:
+?C: This macro is used to determine the number of bytes in the I/O
+?C: buffer pointed to by _base field (or equivalent) of the FILE
+?C: structure pointed to its argument. This macro will always be defined
+?C: if USE_STDIO_BASE is defined.
+?C:.
+?H:?d_stdiobase:#$d_stdiobase USE_STDIO_BASE /**/
+?H:?d_stdiobase:#ifdef USE_STDIO_BASE
+?H:#define FILE_base(fp) $stdio_base
+?H:#define FILE_bufsiz(fp) $stdio_bufsiz
+?H:?d_stdiobase:#endif
+?H:.
+?W:d_stdiobase:FILE_base FILE_bufsiz
+?LINT:set d_stdstdio d_stdiobase
+?T:ptr_lval cnt_lval filbuf xxx
+?F:!try
+: see if _ptr and _cnt from stdio act std
+echo " "
+if $contains '_IO_fpos_t' `./findhdr stdio.h` >/dev/null 2>&1 ; then
+ echo "(Looks like you have stdio.h from Linux.)"
+ case "$stdio_ptr" in
+ '') stdio_ptr='((fp)->_IO_read_ptr)'
+ ptr_lval=$define
+ ;;
+ *) ptr_lval=$d_stdio_ptr_lval;;
+ esac
+ case "$stdio_cnt" in
+ '') stdio_cnt='((fp)->_IO_read_end - (fp)->_IO_read_ptr)'
+ cnt_lval=$undef
+ ;;
+ *) cnt_lval=$d_stdio_cnt_lval;;
+ esac
+ case "$stdio_base" in
+ '') stdio_base='((fp)->_IO_read_base)';;
+ esac
+ case "$stdio_bufsiz" in
+ '') stdio_bufsiz='((fp)->_IO_read_end - (fp)->_IO_read_base)';;
+ esac
+else
+ case "$stdio_ptr" in
+ '') stdio_ptr='((fp)->_ptr)'
+ ptr_lval=$define
+ ;;
+ *) ptr_lval=$d_stdio_ptr_lval;;
+ esac
+ case "$stdio_cnt" in
+ '') stdio_cnt='((fp)->_cnt)'
+ cnt_lval=$define
+ ;;
+ *) cnt_lval=$d_stdio_cnt_lval;;
+ esac
+ case "$stdio_base" in
+ '') stdio_base='((fp)->_base)';;
+ esac
+ case "$stdio_bufsiz" in
+ '') stdio_bufsiz='((fp)->_cnt + (fp)->_ptr - (fp)->_base)';;
+ esac
+fi
+: test whether _ptr and _cnt really work
+echo "Checking how std your stdio is..." >&4
+$cat >try.c <<EOP
+#include <stdio.h>
+#define FILE_ptr(fp) $stdio_ptr
+#define FILE_cnt(fp) $stdio_cnt
+int main() {
+ FILE *fp = fopen("try.c", "r");
+ char c = getc(fp);
+ if (
+ 18 <= FILE_cnt(fp) &&
+ strncmp(FILE_ptr(fp), "include <stdio.h>\n", 18) == 0
+ )
+ exit(0);
+ exit(1);
+}
+EOP
+val="$undef"
+if $cc $ccflags $ldflags -o try try.c $libs >/dev/null 2>&1; then
+ if ./try; then
+ echo "Your stdio acts pretty std."
+ val="$define"
+ else
+ echo "Your stdio isn't very std."
+ fi
+else
+ echo "Your stdio doesn't appear very std."
+fi
+$rm_try
+set d_stdstdio
+eval $setvar
+
+@if STDIO_PTR_LVALUE || d_stdio_ptr_lval
+: Can _ptr be used as an lvalue?
+?X: Only makes sense if we have a known stdio implementation.
+case "$d_stdstdio$ptr_lval" in
+$define$define) val=$define ;;
+*) val=$undef ;;
+esac
+set d_stdio_ptr_lval
+eval $setvar
+
+@end
+@if STDIO_CNT_LVALUE || d_stdio_cnt_lval
+: Can _cnt be used as an lvalue?
+?X: Only makes sense if we have a known stdio implementation.
+case "$d_stdstdio$cnt_lval" in
+$define$define) val=$define ;;
+*) val=$undef ;;
+esac
+set d_stdio_cnt_lval
+eval $setvar
+
+@end
+@if FILE_filbuf
+: How to access the stdio _filbuf or __filbuf function.
+: If this fails, check how the getc macro in stdio.h works.
+case "${d_stdio_ptr_lval}${d_stdio_cnt_lval}" in
+${define}${define})
+ : Try hint value, if any, then _filbuf, __filbuf, _fill, then punt.
+ : _fill is for OS/2.
+ xxx='notok'
+ for filbuf in $stdio_filbuf '_filbuf(fp)' '__filbuf(fp) ' '_fill(fp)' ; do
+ $cat >try.c <<EOP
+#include <stdio.h>
+#define FILE_ptr(fp) $stdio_ptr
+#define FILE_cnt(fp) $stdio_cnt
+#define FILE_filbuf(fp) $filbuf
+int main() {
+ FILE *fp = fopen("try.c", "r");
+ int c;
+ c = getc(fp);
+ c = FILE_filbuf(fp); /* Just looking for linker errors.*/
+ exit(0);
+}
+EOP
+ if $cc $ccflags $ldflags -o try try.c $libs >/dev/null 2>&1 && ./try; then
+ echo "Your stdio appears to use $filbuf"
+ stdio_filbuf="$filbuf"
+ xxx='ok'
+ break
+ else
+ echo "Hmm. $filbuf doesn't seem to work."
+ fi
+ $rm_try
+ done
+ case "$xxx" in
+ notok) echo "I can't figure out how to access _filbuf"
+ echo "I'll just have to work around it."
+ d_stdio_ptr_lval="$undef"
+ d_stdio_cnt_lval="$undef"
+ ;;
+ esac
+ ;;
+esac
+@end
+@if d_stdiobase || USE_STDIO_BASE || FILE_base || FILE_bufsiz
+: see if _base is also standard
+val="$undef"
+case "$d_stdstdio" in
+$define)
+ $cat >try.c <<EOP
+#include <stdio.h>
+#define FILE_base(fp) $stdio_base
+#define FILE_bufsiz(fp) $stdio_bufsiz
+int main() {
+ FILE *fp = fopen("try.c", "r");
+ char c = getc(fp);
+ if (
+ 19 <= FILE_bufsiz(fp) &&
+ strncmp(FILE_base(fp), "#include <stdio.h>\n", 19) == 0
+ )
+ exit(0);
+ exit(1);
+}
+EOP
+ if $cc $ccflags $ldflags -o try try.c $libs > /dev/null 2>&1; then
+ if ./try; then
+ echo "And its _base field acts std."
+ val="$define"
+ else
+ echo "But its _base field isn't std."
+ fi
+ else
+ echo "However, it seems to be lacking the _base field."
+ fi
+ $rm_try
+ ;;
+esac
+set d_stdiobase
+eval $setvar
+
+@end
diff --git a/mcon/U/d_strcasestr.U b/mcon/U/d_strcasestr.U
new file mode 100644
index 0000000..ef9e6e7
--- /dev/null
+++ b/mcon/U/d_strcasestr.U
@@ -0,0 +1,37 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_strcasestr: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_strcasestr:
+?S: This variable conditionally defines the HAS_STRCASESTR symbol, which
+?S: indicates to the C program that the strcasestr() routine is available.
+?S:.
+?C:HAS_STRCASESTR:
+?C: This symbol, if defined, indicates that the strcasestr routine is
+?C: available.
+?C:.
+?H:#$d_strcasestr HAS_STRCASESTR /**/
+?H:.
+?LINT:set d_strcasestr
+: see if strcasestr exists
+$cat >try.c <<EOC
+#include <string.h>
+int main(void)
+{
+ static char ret;
+ ret |= *strcasestr("big", "little");
+ return ret ? 0 : 1;
+}
+EOC
+cyn=strcasestr
+set d_strcasestr
+eval $trylink
+
diff --git a/mcon/U/d_strccmp.U b/mcon/U/d_strccmp.U
new file mode 100644
index 0000000..cf70f97
--- /dev/null
+++ b/mcon/U/d_strccmp.U
@@ -0,0 +1,49 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_strccmp.U,v $
+?RCS: Revision 3.0.1.2 1994/05/06 14:54:34 ram
+?RCS: patch23: fixed a typo (WED)
+?RCS:
+?RCS: Revision 3.0.1.1 1993/09/13 16:04:39 ram
+?RCS: patch10: created (WAD)
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:06:24 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_strccmp: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_strccmp:
+?S: This variable conditionally defines the HAS_STRCASECMP symbol, which
+?S: indicates to the C program that the strcasecmp() routine is available
+?S: for case-insensitive string compares.
+?S:.
+?C:HAS_STRCASECMP:
+?C: This symbol, if defined, indicates that the strcasecmp() routine is
+?C: available for case-insensitive string compares.
+?C:.
+?H:#$d_strccmp HAS_STRCASECMP /**/
+?H:.
+?LINT:set d_strccmp
+: see if strcasecmp exists
+$cat >try.c <<EOC
+#include <strings.h>
+int
+main(void)
+{
+ static int ret;
+ ret |= strcasecmp("xxx", "XXX");
+ return ret ? 0 : 1;
+}
+EOC
+cyn=strcasecmp
+set d_strccmp
+eval $trylink
+
diff --git a/mcon/U/d_strchr.U b/mcon/U/d_strchr.U
new file mode 100644
index 0000000..ddc44b1
--- /dev/null
+++ b/mcon/U/d_strchr.U
@@ -0,0 +1,87 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_strchr.U,v $
+?RCS: Revision 3.0.1.2 1993/10/16 13:49:20 ram
+?RCS: patch12: added support for HAS_INDEX
+?RCS: patch12: added magic for index() and rindex()
+?RCS:
+?RCS: Revision 3.0.1.1 1993/09/13 16:05:26 ram
+?RCS: patch10: now only defines HAS_STRCHR, no macro remap of index (WAD)
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:07:32 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_strchr d_index: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_strchr:
+?S: This variable conditionally defines HAS_STRCHR if strchr() and
+?S: strrchr() are available for string searching.
+?S:.
+?S:d_index:
+?S: This variable conditionally defines HAS_INDEX if index() and
+?S: rindex() are available for string searching.
+?S:.
+?C:HAS_STRCHR:
+?C: This symbol is defined to indicate that the strchr()/strrchr()
+?C: functions are available for string searching. If not, try the
+?C: index()/rindex() pair.
+?C:.
+?C:HAS_INDEX:
+?C: This symbol is defined to indicate that the index()/rindex()
+?C: functions are available for string searching.
+?C:.
+?H:#$d_strchr HAS_STRCHR /**/
+?H:#$d_index HAS_INDEX /**/
+?H:.
+?M:index: HAS_INDEX
+?M:#ifndef HAS_INDEX
+?M:#ifndef index
+?M:#define index strchr
+?M:#endif
+?M:#endif
+?M:.
+?M:rindex: HAS_INDEX
+?M:#ifndef HAS_INDEX
+?M:#ifndef rindex
+?M:#define rindex strrchr
+?M:#endif
+?M:#endif
+?M:.
+?LINT:set d_strchr d_index
+: index or strchr
+$cat >try.c <<EOC
+#include <string.h>
+int main(void)
+{
+ static char ret;
+ static int c;
+ ret |= *strchr("string", c);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=strchr
+set d_strchr
+eval $trylink
+
+$cat >try.c <<EOC
+#include <strings.h>
+int main(void)
+{
+ static char ret;
+ static int c;
+ ret |= *index("string", c);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=index
+set d_index
+eval $trylink
+
diff --git a/mcon/U/d_strcoll.U b/mcon/U/d_strcoll.U
new file mode 100644
index 0000000..84fc4b3
--- /dev/null
+++ b/mcon/U/d_strcoll.U
@@ -0,0 +1,43 @@
+?RCS: $Id$
+?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: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
+?RCS:
+?RCS: $Log: d_strcoll.U,v $
+?RCS: Revision 3.0.1.1 1994/08/29 16:12:01 ram
+?RCS: patch32: created by ADO
+?RCS:
+?MAKE:d_strcoll: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_strcoll:
+?S: This variable conditionally defines HAS_STRCOLL if strcoll() is
+?S: available to compare strings using collating information.
+?S:.
+?C:HAS_STRCOLL:
+?C: This symbol, if defined, indicates that the strcoll routine is
+?C: available to compare strings using collating information.
+?C:.
+?H:#$d_strcoll HAS_STRCOLL /**/
+?H:.
+?LINT:set d_strcoll
+: see if strcoll exists
+$cat >try.c <<EOC
+#include <string.h>
+int main(void)
+{
+ static int ret;
+ ret |= strcoll("A", "B");
+ return ret ? 0 : 1;
+}
+EOC
+cyn=strcoll
+set d_strcoll
+eval $trylink
+
diff --git a/mcon/U/d_strcspn.U b/mcon/U/d_strcspn.U
new file mode 100644
index 0000000..ed8c439
--- /dev/null
+++ b/mcon/U/d_strcspn.U
@@ -0,0 +1,42 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_strcspn.U,v $
+?RCS: Revision 3.0 1993/08/18 12:07:33 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_strcspn: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_strcspn:
+?S: This variable conditionally defines the HAS_STRCSPN symbol, which
+?S: indicates to the C program that the strcspn() routine is available
+?S: to scan strings.
+?S:.
+?C:HAS_STRCSPN (STRCSPN):
+?C: This symbol, if defined, indicates that the strcspn routine is
+?C: available to scan strings.
+?C:.
+?H:#$d_strcspn HAS_STRCSPN /**/
+?H:.
+?LINT:set d_strcspn
+: see if strcspn exists
+$cat >try.c <<EOC
+#include <string.h>
+int main(void)
+{
+ size_t ret;
+ ret |= strcspn("abc", "x");
+ return ret ? 0 : 1;
+}
+EOC
+cyn=strcspn
+set d_strcspn
+eval $trylink
+
diff --git a/mcon/U/d_strctcpy.U b/mcon/U/d_strctcpy.U
new file mode 100644
index 0000000..c5e9c40
--- /dev/null
+++ b/mcon/U/d_strctcpy.U
@@ -0,0 +1,53 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_strctcpy.U,v $
+?RCS: Revision 3.0 1993/08/18 12:07:34 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_strctcpy: cat rm_try cc Setvar
+?MAKE: -pick add $@ %<
+?S:d_strctcpy:
+?S: This variable conditionally defines the USE_STRUCT_COPY symbol, which
+?S: indicates to the C program that this C compiler knows how to copy
+?S: structures.
+?S:.
+?C:USE_STRUCT_COPY (STRUCTCOPY):
+?C: This symbol, if defined, indicates that this C compiler knows how
+?C: to copy structures. If undefined, you'll need to use a block copy
+?C: routine of some sort instead.
+?C:.
+?H:#$d_strctcpy USE_STRUCT_COPY /**/
+?H:.
+?LINT:set d_strctcpy
+: check for structure copying
+echo " "
+echo "Checking to see if your C compiler can copy structs..." >&4
+$cat >try.c <<'EOCP'
+int main()
+{
+ struct blurfl {
+ int dyick;
+ } foo, bar;
+
+ foo = bar;
+}
+EOCP
+if $cc -c try.c >/dev/null 2>&1 ; then
+ val="$define"
+ echo "Yup, it can."
+else
+ val="$undef"
+ echo "Nope, it can't."
+fi
+set d_strctcpy
+eval $setvar
+$rm_try
+
diff --git a/mcon/U/d_strdup.U b/mcon/U/d_strdup.U
new file mode 100644
index 0000000..314c1b6
--- /dev/null
+++ b/mcon/U/d_strdup.U
@@ -0,0 +1,43 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_strdup.U,v $
+?RCS: Revision 3.0.1.1 1993/12/15 08:21:41 ram
+?RCS: patch15: created
+?RCS:
+?MAKE:d_strdup: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_strdup:
+?S: This variable conditionally defines HAS_STRDUP if strdup() is
+?S: available to duplicate strings in memory.
+?S:.
+?C:HAS_STRDUP:
+?C: This symbol, if defined, indicates that the strdup routine is
+?C: available to duplicate strings in memory. Otherwise, roll up
+?C: your own...
+?C:.
+?H:#$d_strdup HAS_STRDUP /**/
+?H:.
+?LINT:set d_strdup
+: see if strdup exists
+$cat >try.c <<EOC
+#include <string.h>
+int main(void)
+{
+ static char ret;
+
+ ret |= *strdup("x");
+ return ret ? 0 : 1;
+}
+EOC
+cyn=strdup
+set d_strdup
+eval $trylink
+
diff --git a/mcon/U/d_strerror.U b/mcon/U/d_strerror.U
new file mode 100644
index 0000000..774ef1a
--- /dev/null
+++ b/mcon/U/d_strerror.U
@@ -0,0 +1,117 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_strerror.U,v $
+?RCS: Revision 3.0.1.3 1994/05/13 15:20:27 ram
+?RCS: patch27: now uses new macro support for cleaner Strerror def
+?RCS:
+?RCS: Revision 3.0.1.2 1994/05/06 14:58:26 ram
+?RCS: patch23: renamed strerror into Strerror to protect name space (ADO)
+?RCS:
+?RCS: Revision 3.0.1.1 1994/01/24 14:08:56 ram
+?RCS: patch16: protected code looking for sys_errnolist[] with @if
+?RCS: patch16: added default value for d_sysernlst
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:07:35 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_strerror d_syserrlst d_sysernlst d_strerrm: contains Csym Findhdr
+?MAKE: -pick add $@ %<
+?S:d_strerror:
+?S: This variable conditionally defines HAS_STRERROR if strerror() is
+?S: available to translate error numbers to strings.
+?S:.
+?S:d_syserrlst:
+?S: This variable conditionally defines HAS_SYS_ERRLIST if sys_errlist[] is
+?S: available to translate error numbers to strings.
+?S:.
+?S:d_sysernlst:
+?S: This variable conditionally defines HAS_SYS_ERRNOLIST if sys_errnolist[]
+?S: is available to translate error numbers to the symbolic name.
+?S:.
+?S:d_strerrm:
+?S: This variable holds what Strerrr is defined as to translate an error
+?S: code condition into an error message string. It could be 'strerror'
+?S: or a more complex macro emulating strrror with sys_errlist[], or the
+?S: "unknown" string when both strerror and sys_errlist are missing.
+?S:.
+?C:HAS_STRERROR (STRERROR):
+?C: This symbol, if defined, indicates that the strerror routine is
+?C: available to translate error numbers to strings. See the writeup
+?C: of Strerror() in this file before you try to define your own.
+?C:.
+?C:HAS_SYS_ERRLIST (SYSERRLIST):
+?C: This symbol, if defined, indicates that the sys_errlist array is
+?C: available to translate error numbers to strings. The extern int
+?C: sys_nerr gives the size of that table.
+?C:.
+?C:HAS_SYS_ERRNOLIST (SYSERRNOLIST):
+?C: This symbol, if defined, indicates that the sys_errnolist array is
+?C: available to translate an errno code into its symbolic name (e.g.
+?C: ENOENT). The extern int sys_nerrno gives the size of that table.
+?C:.
+?C:Strerror:
+?C: This preprocessor symbol is defined as a macro if strerror() is
+?C: not available to translate error numbers to strings but sys_errlist[]
+?C: array is there.
+?C:.
+?H:#$d_strerror HAS_STRERROR /**/
+?H:#$d_syserrlst HAS_SYS_ERRLIST /**/
+?H:#$d_sysernlst HAS_SYS_ERRNOLIST /**/
+?H:#define Strerror(e) $d_strerrm
+?H:.
+?D:d_sysernlst=''
+?T:xxx val
+: see if strerror and/or sys_errlist[] exist
+echo " "
+if set strerror val -f d_strerror; eval $csym; $val; then
+ echo 'strerror() found.' >&4
+ d_strerror="$define"
+ d_strerrm='strerror(e)'
+ if set sys_errlist val -a d_syserrlst; eval $csym; $val; then
+ echo "(You also have sys_errlist[], so we could roll our own strerror.)"
+ d_syserrlst="$define"
+ else
+ echo "(Since you don't have sys_errlist[], sterror() is welcome.)"
+ d_syserrlst="$undef"
+ fi
+elif xxx=`./findhdr string.h`; test "$xxx" || xxx=`./findhdr strings.h`; \
+ $contains '#[ ]*define.*strerror' "$xxx" >/dev/null 2>&1; then
+ echo 'strerror() found in string header.' >&4
+ d_strerror="$define"
+ d_strerrm='strerror(e)'
+ if set sys_errlist val -a d_syserrlst; eval $csym; $val; then
+ echo "(Most probably, strerror() uses sys_errlist[] for descriptions.)"
+ d_syserrlst="$define"
+ else
+ echo "(You don't appear to have any sys_errlist[], how can this be?)"
+ d_syserrlst="$undef"
+ fi
+elif set sys_errlist val -a d_syserrlst; eval $csym; $val; then
+echo "strerror() not found, but you have sys_errlist[] so we'll use that." >&4
+ d_strerror="$undef"
+ d_syserrlst="$define"
+ d_strerrm='((e)<0||(e)>=sys_nerr?"unknown":sys_errlist[e])'
+else
+ echo 'strerror() and sys_errlist[] NOT found.' >&4
+ d_strerror="$undef"
+ d_syserrlst="$undef"
+ d_strerrm='"unknown"'
+fi
+@if d_sysernlst || HAS_SYS_ERRNOLIST
+if set sys_errnolist val -a d_sysernlst; eval $csym; $val; then
+ echo "(Symbolic error codes can be fetched via the sys_errnolist[] array.)"
+ d_sysernlst="$define"
+else
+ echo "(However, I can't extract the symbolic error code out of errno.)"
+ d_sysernlst="$undef"
+fi
+@end
+
diff --git a/mcon/U/d_strftime.U b/mcon/U/d_strftime.U
new file mode 100644
index 0000000..3c0a777
--- /dev/null
+++ b/mcon/U/d_strftime.U
@@ -0,0 +1,43 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_strftime.U,v $
+?RCS: Revision 3.0 1993/08/18 12:07:36 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_strftime: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_strftime:
+?S: This variable conditionally defines HAS_STRFTIME if strftime() is
+?S: available to format locale-specific times.
+?S:.
+?C:HAS_STRFTIME:
+?C: This symbol, if defined, indicates that the strftime routine is
+?C: available to format locale-specific times.
+?C:.
+?H:#$d_strftime HAS_STRFTIME /**/
+?H:.
+?LINT:set d_strftime
+: see if strftime exists
+$cat >try.c <<EOC
+#include <time.h>
+int main(void)
+{
+ static size_t ret, size;
+ static struct tm tm;
+ static char buf[1];
+ ret |= strftime(buf, size, "%Y-%m-%d", &tm);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=strftime
+set d_strftime
+eval $trylink
+
diff --git a/mcon/U/d_strlcat.U b/mcon/U/d_strlcat.U
new file mode 100644
index 0000000..3e960ff
--- /dev/null
+++ b/mcon/U/d_strlcat.U
@@ -0,0 +1,38 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_strlcat: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_strlcat:
+?S: This variable conditionally defines the HAS_STRLCAT symbol, which
+?S: indicates to the C program that the strlcat() routine is available.
+?S:.
+?C:HAS_STRLCAT:
+?C: This symbol, if defined, indicates that the strlcat routine is
+?C: available.
+?C:.
+?H:#$d_strlcat HAS_STRLCAT /**/
+?H:.
+?LINT:set d_strlcat
+: see if strlcat exists
+$cat >try.c <<EOC
+#include <string.h>
+int main(void)
+{
+ static size_t ret, size;
+ static char dst;
+ ret |= strlcat(&dst, "src", size);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=strlcat
+set d_strlcat
+eval $trylink
+
diff --git a/mcon/U/d_strlcpy.U b/mcon/U/d_strlcpy.U
new file mode 100644
index 0000000..85cc988
--- /dev/null
+++ b/mcon/U/d_strlcpy.U
@@ -0,0 +1,38 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_strlcpy: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_strlcpy:
+?S: This variable conditionally defines the HAS_STRLCPY symbol, which
+?S: indicates to the C program that the strlcpy() routine is available.
+?S:.
+?C:HAS_STRLCPY:
+?C: This symbol, if defined, indicates that the strlcpy routine is
+?C: available.
+?C:.
+?H:#$d_strlcpy HAS_STRLCPY /**/
+?H:.
+?LINT:set d_strlcpy
+: see if strlcpy exists
+$cat >try.c <<EOC
+#include <string.h>
+int main(void)
+{
+ static size_t ret, size;
+ static char dst;
+ ret |= strlcpy(&dst, "src", size);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=strlcpy
+set d_strlcpy
+eval $trylink
+
diff --git a/mcon/U/d_strstr.U b/mcon/U/d_strstr.U
new file mode 100644
index 0000000..8cf8f7a
--- /dev/null
+++ b/mcon/U/d_strstr.U
@@ -0,0 +1,41 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_strstr.U,v $
+?RCS: Revision 3.0 1993/08/18 12:07:37 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_strstr: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_strstr:
+?S: This variable conditionally defines HAS_STRSTR if strstr() is
+?S: available to find substrings.
+?S:.
+?C:HAS_STRSTR (STRSTR):
+?C: This symbol, if defined, indicates that the strstr routine is
+?C: available to find substrings.
+?C:.
+?H:#$d_strstr HAS_STRSTR /**/
+?H:.
+?LINT:set d_strstr
+: see if strstr exists
+$cat >try.c <<EOC
+#include <string.h>
+int main(void)
+{
+ static char ret;
+ ret |= *strstr("abc", "b");
+ return ret ? 0 : 1;
+}
+EOC
+cyn=strstr
+set d_strstr
+eval $trylink
+
diff --git a/mcon/U/d_strtod.U b/mcon/U/d_strtod.U
new file mode 100644
index 0000000..effb49c
--- /dev/null
+++ b/mcon/U/d_strtod.U
@@ -0,0 +1,48 @@
+?RCS: $Id$
+?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 License,
+?RCS: as specified in the 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_strtod.U,v $
+?RCS: Revision 3.0.1.1 1997/02/28 15:46:36 ram
+?RCS: patch61: created
+?RCS:
+?RCS:
+?MAKE:d_strtod: Trylink cat i_stdlib
+?MAKE: -pick add $@ %<
+?S:d_strtod:
+?S: This variable conditionally defines the HAS_STRTOD symbol, which
+?S: indicates to the C program that the strtod() routine is available
+?S: to provide better numeric string conversion than atof().
+?S:.
+?C:HAS_STRTOD (STRTOD):
+?C: This symbol, if defined, indicates that the strtod routine is
+?C: available to provide better numeric string conversion than atof().
+?C:.
+?H:#$d_strtod HAS_STRTOD /**/
+?H:.
+?LINT:set d_strtod
+: see if strtod exists
+$cat >try.c <<EOC
+#$i_stdlib I_STDLIB
+#ifdef I_STDLIB
+#include <stdlib.h>
+#endif
+int main(void)
+{
+ static double ret;
+ static char *endptr;
+ ret = strtod("1.0", &endptr) * 1.0;
+ return ret ? 0 : 1;
+}
+EOC
+cyn=strtod
+set d_strtod
+eval $trylink
+
diff --git a/mcon/U/d_strtok.U b/mcon/U/d_strtok.U
new file mode 100644
index 0000000..fc6a8ec
--- /dev/null
+++ b/mcon/U/d_strtok.U
@@ -0,0 +1,45 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_strtok.U,v $
+?RCS: Revision 3.0 1993/08/18 12:07:38 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: The strtok routine now appears to be a standard one, but it was
+?X: missing in early BSD systems.
+?X:
+?MAKE:d_strtok: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_strtok:
+?S: This variable conditionally defines HAS_STRTOK if strtok() is
+?S: available to scan strings for tokens.
+?S:.
+?C:HAS_STRTOK (STRTOK):
+?C: This symbol, if defined, indicates that the strtok routine is
+?C: available to scan strings for tokens.
+?C:.
+?H:#$d_strtok HAS_STRTOK /**/
+?H:.
+?LINT:set d_strtok
+: see if strtok exists
+$cat >try.c <<EOC
+#include <string.h>
+int main(void)
+{
+ static char s[] = "a.b.c", ret;
+ ret |= *strtok(s, ".");
+ return ret ? 0 : 1;
+}
+EOC
+cyn=strtok
+set d_strtok
+eval $trylink
+
diff --git a/mcon/U/d_strtol.U b/mcon/U/d_strtol.U
new file mode 100644
index 0000000..15a1965
--- /dev/null
+++ b/mcon/U/d_strtol.U
@@ -0,0 +1,46 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_strtol.U,v $
+?RCS: Revision 3.0 1993/08/18 12:07:39 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_strtol: Trylink cat i_stdlib
+?MAKE: -pick add $@ %<
+?S:d_strtol:
+?S: This variable conditionally defines the HAS_STRTOL symbol, which
+?S: indicates to the C program that the strtol() routine is available
+?S: to provide better numeric string conversion than atoi() and friends.
+?S:.
+?C:HAS_STRTOL (STRTOL):
+?C: This symbol, if defined, indicates that the strtol routine is available
+?C: to provide better numeric string conversion than atoi() and friends.
+?C:.
+?H:#$d_strtol HAS_STRTOL /**/
+?H:.
+?LINT:set d_strtol
+: see if strtol exists
+$cat >try.c <<EOC
+#$i_stdlib I_STDLIB
+#ifdef I_STDLIB
+#include <stdlib.h>
+#endif
+int main(void)
+{
+ static long ret;
+ static char *endptr;
+ ret |= strtol("1234", &endptr, 10);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=strtol
+set d_strtol
+eval $trylink
+
diff --git a/mcon/U/d_strtoul.U b/mcon/U/d_strtoul.U
new file mode 100644
index 0000000..83f882a
--- /dev/null
+++ b/mcon/U/d_strtoul.U
@@ -0,0 +1,48 @@
+?RCS: $Id$
+?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 License,
+?RCS: as specified in the 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_strtoul.U,v $
+?RCS: Revision 3.0.1.1 1997/02/28 15:46:43 ram
+?RCS: patch61: created
+?RCS:
+?RCS:
+?MAKE:d_strtoul: Trylink cat i_stdlib
+?MAKE: -pick add $@ %<
+?S:d_strtoul:
+?S: This variable conditionally defines the HAS_STRTOUL symbol, which
+?S: indicates to the C program that the strtoul() routine is available
+?S: to provide conversion of strings to unsigned long.
+?S:.
+?C:HAS_STRTOUL (STRTOUL):
+?C: This symbol, if defined, indicates that the strtoul routine is
+?C: available to provide conversion of strings to unsigned long.
+?C:.
+?H:#$d_strtoul HAS_STRTOUL /**/
+?H:.
+?LINT:set d_strtoul
+: see if strtoul exists
+$cat >try.c <<EOC
+#$i_stdlib I_STDLIB
+#ifdef I_STDLIB
+#include <stdlib.h>
+#endif
+int main(void)
+{
+ static unsigned long ret;
+ static char *endptr;
+ ret |= strtoul("1234", &endptr, 10);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=strtoul
+set d_strtoul
+eval $trylink
+
diff --git a/mcon/U/d_strxfrm.U b/mcon/U/d_strxfrm.U
new file mode 100644
index 0000000..f94a7e9
--- /dev/null
+++ b/mcon/U/d_strxfrm.U
@@ -0,0 +1,44 @@
+?RCS: $Id$
+?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: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
+?RCS:
+?RCS: $Log: d_strxfrm.U,v $
+?RCS: Revision 3.0.1.1 1994/08/29 16:12:04 ram
+?RCS: patch32: created by ADO
+?RCS:
+?MAKE:d_strxfrm: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_strxfrm:
+?S: This variable conditionally defines HAS_STRXFRM if strxfrm() is
+?S: available to transform strings.
+?S:.
+?C:HAS_STRXFRM:
+?C: This symbol, if defined, indicates that the strxfrm() routine is
+?C: available to transform strings.
+?C:.
+?H:#$d_strxfrm HAS_STRXFRM /**/
+?H:.
+?LINT:set d_strxfrm
+: see if strxfrm exists
+$cat >try.c <<EOC
+#include <string.h>
+int main(void)
+{
+ static size_t ret, n;
+ static char dst[] = "xxx", *src;
+ ret |= strxfrm(dst, src, n);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=strxfrm
+set d_strxfrm
+eval $trylink
+
diff --git a/mcon/U/d_su_chown.U b/mcon/U/d_su_chown.U
new file mode 100644
index 0000000..2c9c451
--- /dev/null
+++ b/mcon/U/d_su_chown.U
@@ -0,0 +1,41 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_su_chown.U,v $
+?RCS: Revision 3.0 1993/08/18 12:07:40 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_su_chown: Csym Setvar
+?MAKE: -pick add $@ %<
+?S:d_su_chown (d_rootchown):
+?S: This variable conditionally defines the SU_CHOWN symbol, which
+?S: indicates to the C program that only root can chown() the owner
+?S: of a file.
+?S:.
+?C:SU_CHOWN (ROOT_CHOWN):
+?C: This symbol, if defined, indicates that the system allows only root
+?C: can change the owner of a file with chown().
+?C:.
+?H:#$d_su_chown SU_CHOWN /**/
+?H:.
+?LINT:set d_su_chown
+: see if 'chown()' is restricted.
+: but not too hard, as it is late and I am tired. -- HMS
+echo " "
+if set setreuid val -f d_su_chown; eval $csym; $val; then
+ echo 'It looks like only root can chown() the owner of a file.' >&4
+ val="$define"
+else
+ echo 'It looks like root or the owner can chown() a file away.' >&4
+ val="$undef"
+fi
+set d_su_chown
+eval $setvar
+
diff --git a/mcon/U/d_symlink.U b/mcon/U/d_symlink.U
new file mode 100644
index 0000000..bd10478
--- /dev/null
+++ b/mcon/U/d_symlink.U
@@ -0,0 +1,45 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_symlink.U,v $
+?RCS: Revision 3.0 1993/08/18 12:07:41 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_symlink: Trylink cat i_unistd
+?MAKE: -pick add $@ %<
+?S:d_symlink:
+?S: This variable conditionally defines the HAS_SYMLINK symbol, which
+?S: indicates to the C program that the symlink() routine is available
+?S: to create symbolic links.
+?S:.
+?C:HAS_SYMLINK (SYMLINK):
+?C: This symbol, if defined, indicates that the symlink routine is available
+?C: to create symbolic links.
+?C:.
+?H:#$d_symlink HAS_SYMLINK /**/
+?H:.
+?LINT:set d_symlink
+: see if symlink exists
+$cat >try.c <<EOC
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static int ret;
+ ret |= symlink("name1", "name2");
+ return ret ? 0 : 1;
+}
+EOC
+cyn=symlink
+set d_symlink
+eval $trylink
+
diff --git a/mcon/U/d_sync_atomic.U b/mcon/U/d_sync_atomic.U
new file mode 100644
index 0000000..1a33ea1
--- /dev/null
+++ b/mcon/U/d_sync_atomic.U
@@ -0,0 +1,42 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 2011, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_sync_atomic: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_sync_atomic:
+?S: This variable conditionally defines the HAS_SYNC_ATOMIC symbol, which
+?S: indicates to the C program that __sync_xxx() atomic operations are
+?S: made available by the compiler.
+?S:.
+?C:HAS_SYNC_ATOMIC:
+?C: This symbol, if defined, indicates that __sync_xxx() atomic operations
+?C: are made available by the compiler, namely __sync_synchronize() to
+?C: issue a memory barrieer, __sync_bool_compare_and_swap() for issuing a
+?C: test-and-set and __sync_fetch_and_add() for atomic increases of values.
+?C:.
+?H:#$d_sync_atomic HAS_SYNC_ATOMIC /**/
+?H:.
+?LINT:set d_sync_atomic
+: check for __sync_synchronize and friends
+$cat >try.c <<EOC
+int main(void)
+{
+ static int ret;
+ int i;
+ __sync_synchronize();
+ ret |= __sync_bool_compare_and_swap(&i, 0, 1);
+ ret += __sync_fetch_and_add(&i, 1);
+ return ret;
+}
+EOC
+cyn="whether atomic memory operations are possible"
+set d_sync_atomic
+eval $trylink
+
diff --git a/mcon/U/d_syscall.U b/mcon/U/d_syscall.U
new file mode 100644
index 0000000..868f25b
--- /dev/null
+++ b/mcon/U/d_syscall.U
@@ -0,0 +1,45 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_syscall.U,v $
+?RCS: Revision 3.0 1993/08/18 12:07:42 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_syscall: Trylink cat i_unistd
+?MAKE: -pick add $@ %<
+?S:d_syscall:
+?S: This variable conditionally defines HAS_SYSCALL if syscall() is
+?S: available call arbitrary system calls.
+?S:.
+?C:HAS_SYSCALL (SYSCALL):
+?C: This symbol, if defined, indicates that the syscall routine is
+?C: available to call arbitrary system calls. If undefined, that's tough.
+?C:.
+?H:#$d_syscall HAS_SYSCALL /**/
+?H:.
+?LINT:set d_syscall
+: see if syscall exists
+$cat >try.c <<EOC
+#include <sys/syscall.h>
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static int ret, number;
+ ret |= syscall(number, 0);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=syscall
+set d_syscall
+eval $trylink
+
diff --git a/mcon/U/d_sysconf.U b/mcon/U/d_sysconf.U
new file mode 100644
index 0000000..f02d7cc
--- /dev/null
+++ b/mcon/U/d_sysconf.U
@@ -0,0 +1,47 @@
+?RCS: $Id$
+?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: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
+?RCS:
+?RCS: $Log: d_sysconf.U,v $
+?RCS: Revision 3.0.1.1 1994/10/29 16:15:57 ram
+?RCS: patch36: created by ADO
+?RCS:
+?MAKE:d_sysconf: Trylink cat i_unistd
+?MAKE: -pick add $@ %<
+?S:d_sysconf:
+?S: This variable conditionally defines the HAS_SYSCONF symbol, which
+?S: indicates to the C program that the sysconf() routine is available
+?S: to determine system related limits and options.
+?S:.
+?C:HAS_SYSCONF:
+?C: This symbol, if defined, indicates that sysconf() is available
+?C: to determine system related limits and options.
+?C:.
+?H:#$d_sysconf HAS_SYSCONF /**/
+?H:.
+?LINT:set d_sysconf
+: see if sysconf exists
+$cat >try.c <<EOC
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static long ret;
+ ret |= sysconf(1);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=sysconf
+set d_sysconf
+eval $trylink
+
diff --git a/mcon/U/d_sysctl.U b/mcon/U/d_sysctl.U
new file mode 100644
index 0000000..8628871
--- /dev/null
+++ b/mcon/U/d_sysctl.U
@@ -0,0 +1,41 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_sysctl: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_sysctl:
+?S: This variable conditionally defines the HAS_SYSCTL symbol, which
+?S: indicates to the C program that the sysctl() routine is available.
+?S:.
+?C:HAS_SYSCTL:
+?C: This symbol, if defined, indicates that the sysctl routine is
+?C: available.
+?C:.
+?H:#$d_sysctl HAS_SYSCTL /**/
+?H:.
+?LINT:set d_sysctl
+: see if sysctl exists
+$cat >try.c <<EOC
+#include <sys/param.h>
+#include <sys/sysctl.h>
+int main(void)
+{
+ static int ret, name;
+ static unsigned int namelen;
+ static void *oldp, *newp;
+ static size_t oldlen, newlen;
+ ret |= sysctl(&name, namelen, oldp, &oldlen, newp, newlen);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=sysctl
+set d_sysctl
+eval $trylink
+
diff --git a/mcon/U/d_syslog.U b/mcon/U/d_syslog.U
new file mode 100644
index 0000000..e5e8b75
--- /dev/null
+++ b/mcon/U/d_syslog.U
@@ -0,0 +1,45 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_syslog.U,v $
+?RCS: Revision 3.0.1.1 1997/02/28 15:46:56 ram
+?RCS: patch61: replaced .o with $_o all over the place
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:07:43 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_syslog: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_syslog:
+?S: This variable conditionally defines the HAS_SYSLOG symbol, which
+?S: indicates to the C program that syslog() exists on this system.
+?S:.
+?C:HAS_SYSLOG (LIBSYSLOG):
+?C: This symbol, if defined, indicates that the program can rely on the
+?C: system providing syslog(). Otherwise, the syslog code provided by
+?C: the package should be used.
+?C:.
+?H:#$d_syslog HAS_SYSLOG /**/
+?H:.
+?LINT:set d_syslog
+: see if syslog is available
+$cat >try.c <<EOC
+#include <syslog.h>
+int main(void)
+{
+ static int priority;
+ syslog(priority, "%s", "msg");
+ return 0;
+}
+EOC
+cyn=syslog
+set d_syslog
+eval $trylink
+
diff --git a/mcon/U/d_system.U b/mcon/U/d_system.U
new file mode 100644
index 0000000..f803f01
--- /dev/null
+++ b/mcon/U/d_system.U
@@ -0,0 +1,44 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_system.U,v $
+?RCS: Revision 3.0 1993/08/18 12:07:44 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_system: Trylink cat i_stdlib
+?MAKE: -pick add $@ %<
+?S:d_system:
+?S: This variable conditionally defines HAS_SYSTEM if system() is
+?S: available to issue a shell command.
+?S:.
+?C:HAS_SYSTEM (SYSTEM):
+?C: This symbol, if defined, indicates that the system routine is
+?C: available to issue a shell command.
+?C:.
+?H:#$d_system HAS_SYSTEM /**/
+?H:.
+?LINT:set d_system
+: see if system exists
+$cat >try.c <<EOC
+#$i_stdlib I_STDLIB
+#ifdef I_STDLIB
+#include <stdlib.h>
+#endif
+int main(void)
+{
+ static int ret;
+ ret |= system("command");
+ return ret ? 0 : 1;
+}
+EOC
+cyn=system
+set d_system
+eval $trylink
+
diff --git a/mcon/U/d_table.U b/mcon/U/d_table.U
new file mode 100644
index 0000000..d5a32f9
--- /dev/null
+++ b/mcon/U/d_table.U
@@ -0,0 +1,45 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_table.U,v $
+?RCS: Revision 3.0.1.2 1993/11/10 17:34:14 ram
+?RCS: patch14: wrongly mentioned an obsolete symbol
+?RCS:
+?RCS: Revision 3.0.1.1 1993/10/16 13:49:29 ram
+?RCS: patch12: created
+?RCS:
+?MAKE:d_table: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_table:
+?S: This variable conditionally defines HAS_TABLE if table() is
+?S: available to examine/update elements from a system table.
+?S:.
+?C:HAS_TABLE:
+?C: This symbol, if defined, indicates that the OSF/1 table() system
+?C: call is available to examine/update items from a system table.
+?C:.
+?H:#$d_table HAS_TABLE /**/
+?H:.
+?LINT:set d_table
+: see if table exists
+$cat >try.c <<EOC
+#include <sys/table.h>
+int main(void)
+{
+ static int ret;
+ static void *addr;
+ ret |= table(1, 2L, addr, 3L, 4L, 5L);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=table
+set d_table
+eval $trylink
+
diff --git a/mcon/U/d_tcgtpgrp.U b/mcon/U/d_tcgtpgrp.U
new file mode 100644
index 0000000..5800911
--- /dev/null
+++ b/mcon/U/d_tcgtpgrp.U
@@ -0,0 +1,48 @@
+?RCS: $Id$
+?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: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
+?RCS:
+?RCS: $Log: d_tcgtpgrp.U,v $
+?RCS: Revision 3.0.1.1 1994/08/29 16:12:08 ram
+?RCS: patch32: created by ADO
+?RCS:
+?MAKE:d_tcgetpgrp: Trylink cat i_unistd
+?MAKE: -pick add $@ %<
+?S:d_tcgetpgrp:
+?S: This variable conditionally defines the HAS_TCGETPGRP symbol, which
+?S: indicates to the C program that the tcgetpgrp() routine is available.
+?S: to get foreground process group ID.
+?S:.
+?C:HAS_TCGETPGRP :
+?C: This symbol, if defined, indicates that the tcgetpgrp routine is
+?C: available to get foreground process group ID.
+?C:.
+?H:#$d_tcgetpgrp HAS_TCGETPGRP /**/
+?H:.
+?LINT:set d_tcgetpgrp
+: see if tcgetpgrp exists
+$cat >try.c <<EOC
+#include <sys/types.h>
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static pid_t ret;
+ ret |= tcgetpgrp(1);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=tcgetpgrp
+set d_tcgetpgrp
+eval $trylink
+
diff --git a/mcon/U/d_tcstpgrp.U b/mcon/U/d_tcstpgrp.U
new file mode 100644
index 0000000..5c0dbbd
--- /dev/null
+++ b/mcon/U/d_tcstpgrp.U
@@ -0,0 +1,49 @@
+?RCS: $Id$
+?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: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
+?RCS:
+?RCS: $Log: d_tcstpgrp.U,v $
+?RCS: Revision 3.0.1.1 1994/08/29 16:12:11 ram
+?RCS: patch32: created by ADO
+?RCS:
+?MAKE:d_tcsetpgrp: Trylink cat i_unistd
+?MAKE: -pick add $@ %<
+?S:d_tcsetpgrp:
+?S: This variable conditionally defines the HAS_TCSETPGRP symbol, which
+?S: indicates to the C program that the tcsetpgrp() routine is available
+?S: to set foreground process group ID.
+?S:.
+?C:HAS_TCSETPGRP :
+?C: This symbol, if defined, indicates that the tcsetpgrp routine is
+?C: available to set foreground process group ID.
+?C:.
+?H:#$d_tcsetpgrp HAS_TCSETPGRP /**/
+?H:.
+?LINT:set d_tcsetpgrp
+: see if tcsetpgrp 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 fd, ret;
+ static pid_t pid;
+ ret |= tcsetpgrp(fd, pid);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=tcsetpgrp
+set d_tcsetpgrp
+eval $trylink
+
diff --git a/mcon/U/d_time.U b/mcon/U/d_time.U
new file mode 100644
index 0000000..b783560
--- /dev/null
+++ b/mcon/U/d_time.U
@@ -0,0 +1,66 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_time.U,v $
+?RCS: Revision 3.0.1.2 1995/07/25 14:07:43 ram
+?RCS: patch56: typo fix, sytem -> system
+?RCS:
+?RCS: Revision 3.0.1.1 1994/10/29 16:16:38 ram
+?RCS: patch36: now uses new Typedef unit to compute type information (ADO)
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:07:45 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X: Maybe <sys/types.h> should be included?
+?X:INC: i_systypes
+?MAKE:d_time timetype: Csym Setvar Findhdr Myread Typedef
+?MAKE: -pick add $@ %<
+?S:d_time:
+?S: This variable conditionally defines the HAS_TIME symbol, which indicates
+?S: that the time() routine exists. The time() routine is normally
+?S: provided on UNIX systems.
+?S:.
+?S:timetype:
+?S: This variable holds the type returned by time(). It can be long,
+?S: or time_t on BSD sites (in which case <sys/types.h> should be
+?S: included). Anyway, the type Time_t should be used.
+?S:.
+?C:HAS_TIME (TIMER):
+?C: This symbol, if defined, indicates that the time() routine exists.
+?C:.
+?C:Time_t (TIMETYPE):
+?C: This symbol holds the type returned by time(). It can be long,
+?C: or time_t on BSD sites (in which case <sys/types.h> should be
+?C: included).
+?C:.
+?H:#$d_time HAS_TIME /**/
+?H:#define Time_t $timetype /* Time type */
+?H:.
+?LINT:set d_time
+: see if time exists
+echo " "
+if set time val -f d_time; eval $csym; $val; then
+ echo 'time() found.' >&4
+ val="$define"
+ set time_t timetype long stdio.h sys/types.h
+ eval $typedef
+ dflt="$timetype"
+ echo " "
+ rp="What type is returned by time() on this system?"
+ . ./myread
+ timetype="$ans"
+else
+ echo 'time() not found, hope that will do.' >&4
+ val="$undef"
+ timetype='int';
+fi
+set d_time
+eval $setvar
+
diff --git a/mcon/U/d_times.U b/mcon/U/d_times.U
new file mode 100644
index 0000000..fcaa405
--- /dev/null
+++ b/mcon/U/d_times.U
@@ -0,0 +1,74 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_times.U,v $
+?RCS: Revision 3.0.1.2 1995/07/25 14:07:50 ram
+?RCS: patch56: typo fix, sytem -> system
+?RCS:
+?RCS: Revision 3.0.1.1 1994/08/29 16:14:00 ram
+?RCS: patch32: now uses new Typedef unit to compute type information
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:07:46 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: What is the type returned by times() ?
+?X:
+?X: Force inclusion of <sys/types.h>
+?X:INC: i_systypes
+?MAKE:d_times clocktype: Csym Myread Typedef i_systimes
+?MAKE: -pick add $@ %<
+?S:d_times:
+?S: This variable conditionally defines the HAS_TIMES symbol, which indicates
+?S: that the times() routine exists. The times() routine is normally
+?S: provided on UNIX systems. You may have to include <sys/times.h>.
+?S:.
+?S:clocktype:
+?S: This variable holds the type returned by times(). It can be long,
+?S: or clock_t on BSD sites (in which case <sys/types.h> should be
+?S: included).
+?S:.
+?C:HAS_TIMES (TIMES):
+?C: This symbol, if defined, indicates that the times() routine exists.
+?C: Note that this became obsolete on some systems (SUNOS), which now
+?C: use getrusage(). It may be necessary to include <sys/times.h>.
+?C:.
+?C:Clock_t (CLOCKTYPE):
+?C: This symbol holds the type returned by times(). It can be long,
+?C: or clock_t on BSD sites (in which case <sys/types.h> should be
+?C: included).
+?C:.
+?H:#$d_times HAS_TIMES /**/
+?H:#define Clock_t $clocktype /* Clock time */
+?H:.
+?T:val inc
+: see if times exists
+echo " "
+if set times val -f d_times; eval $csym; $val; then
+ echo 'times() found.' >&4
+ d_times="$define"
+ inc=''
+ case "$i_systimes" in
+ "$define") inc='sys/times.h';;
+ esac
+ set clock_t clocktype long stdio.h sys/types.h $inc
+ eval $typedef
+ dflt="$clocktype"
+ echo " "
+ rp="What type is returned by times() on this system?"
+ . ./myread
+ clocktype="$ans"
+else
+ echo 'times() NOT found, hope that will do.' >&4
+ d_times="$undef"
+?X: The following is needed for typedef (won't like an empty variable)
+ clocktype='int'
+fi
+
diff --git a/mcon/U/d_tminsys.U b/mcon/U/d_tminsys.U
new file mode 100644
index 0000000..60fc95a
--- /dev/null
+++ b/mcon/U/d_tminsys.U
@@ -0,0 +1,41 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_tminsys.U,v $
+?RCS: Revision 3.0 1993/08/18 12:07:47 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_tminsys: contains Setvar Findhdr
+?MAKE: -pick add $@ %<
+?S:d_tminsys:
+?S: This variable conditionally defines TM_IN_SYS if this system
+?S: declares "struct tm" in <sys/time.h> rather than <time.h>.
+?S:.
+?C:TM_IN_SYS (TMINSYS):
+?C: This symbol is defined if this system declares "struct tm" in
+?C: in <sys/time.h> rather than <time.h>. We can't just say
+?C: -I/usr/include/sys because some systems have both time files, and
+?C: the -I trick gets the wrong one.
+?C:.
+?H:#$d_tminsys TM_IN_SYS /**/
+?H:.
+?LINT:set d_tminsys
+: see if struct tm is defined in sys/time.h
+echo " "
+if $contains 'struct tm' `./findhdr time.h` >/dev/null 2>&1 ; then
+ echo "You have struct tm defined in <time.h> rather than <sys/time.h>." >&4
+ val="$undef"
+else
+ echo "You have struct tm defined in <sys/time.h> rather than <time.h>." >&4
+ val="$define"
+fi
+set d_tminsys
+eval $setvar
+
diff --git a/mcon/U/d_truncate.U b/mcon/U/d_truncate.U
new file mode 100644
index 0000000..31a7419
--- /dev/null
+++ b/mcon/U/d_truncate.U
@@ -0,0 +1,46 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_truncate.U,v $
+?RCS: Revision 3.0 1993/08/18 12:07:48 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_truncate: Trylink cat i_unistd
+?MAKE: -pick add $@ %<
+?S:d_truncate:
+?S: This variable conditionally defines HAS_TRUNCATE if truncate() is
+?S: available to truncate files.
+?S:.
+?C:HAS_TRUNCATE (TRUNCATE):
+?C: This symbol, if defined, indicates that the truncate routine is
+?C: available to truncate files.
+?C:.
+?H:#$d_truncate HAS_TRUNCATE /**/
+?H:.
+?LINT:set d_truncate
+: see if truncate 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;
+ static off_t length;
+ ret |= truncate("path", length);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=truncate
+set d_truncate
+eval $trylink
+
diff --git a/mcon/U/d_ttyname.U b/mcon/U/d_ttyname.U
new file mode 100644
index 0000000..06f6de0
--- /dev/null
+++ b/mcon/U/d_ttyname.U
@@ -0,0 +1,47 @@
+?RCS: $Id: d_backtrace.U 65 2011-01-01 22:01:00Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2011, Raphael Manfredi
+?RCS: Copyright (c) 2011, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_semget.U,v $
+?RCS:
+?MAKE:d_ttyname: Trylink cat i_unistd
+?MAKE: -pick add $@ %<
+?S:d_ttyname:
+?S: This variable conditionally defines the HAS_TTYNAME symbol, which
+?S: indicates to the C program that the ttyname() routine is available
+?S: to determine the pathname of the terminal associated with
+?S: a file descriptor.
+?S:.
+?C:HAS_TTYNAME:
+?C: This symbol, if defined, indicates that the ttyname() routine is
+?C: available to determine the pathname of the terminal associated with
+?C: a file descriptor. The <unistd.h> header must be included to use
+?C: this routine.
+?C:.
+?H:#$d_ttyname HAS_TTYNAME /**/
+?H:.
+?LINT:set d_ttyname
+: see if ttyname exists
+$cat >try.c <<EOC
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ char *name = ttyname(1);
+ char c = *ttyname(2);
+ return name[0] == c ? 0 : 1;
+}
+EOC
+cyn=ttyname
+set d_ttyname
+eval $trylink
+
diff --git a/mcon/U/d_tzmin.U b/mcon/U/d_tzmin.U
new file mode 100644
index 0000000..a78e53b
--- /dev/null
+++ b/mcon/U/d_tzmin.U
@@ -0,0 +1,53 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_tzmin.U,v $
+?RCS: Revision 3.0.1.1 1994/10/29 16:16:58 ram
+?RCS: patch36: call ./bsd explicitly instead of relying on PATH
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:07:49 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_tzmin: contains cppstdin cppminus timeincl rm Setvar Guess
+?MAKE: -pick add $@ %<
+?S:d_tzmin:
+?S: This symbol conditionally defines TZ_MINUTESWEST if the system uses
+?S: tz_minuteswest in time header instead of timezone.
+?S:.
+?C:TZ_MINUTESWEST:
+?C: This symbol is defined if this system uses tz_minuteswest
+?C: in time header instead of timezone.
+?C: If not defined, you may have to use struct timeb and ftime() rather
+?C: than the new gettimeofday() system call.
+?C:.
+?H:#$d_tzmin TZ_MINUTESWEST /**/
+?H:.
+?LINT:set d_tzmin
+: see if tz_minuteswest is defined in time header
+echo " "
+val="$undef"
+$cppstdin $cppminus < $timeincl > try 2>&1
+if $contains 'tz_minuteswest' try >/dev/null 2>&1; then
+echo "You have tz_minuteswest defined in $timeincl rather than timezone." >&4
+ val="$define"
+elif $contains 'timezone' try >/dev/null 2>&1; then
+echo "You have timezone defined in $timeincl rather than tz_minuteswest." >&4
+else
+ echo "Your $timeincl file looks strange." >&4
+fi
+if ./bsd; then
+ case "$d_tzmin" in
+ "$undef") echo "(Maybe your system is an USG one after all?)";;
+ esac
+fi
+set d_tzmin
+eval $setvar
+$rm -f try
+
diff --git a/mcon/U/d_tzname.U b/mcon/U/d_tzname.U
new file mode 100644
index 0000000..08ebc73
--- /dev/null
+++ b/mcon/U/d_tzname.U
@@ -0,0 +1,45 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_tzname.U,v $
+?RCS: Revision 3.0.1.2 1994/08/29 16:14:43 ram
+?RCS: patch32: forgot to set proper value in the val variable
+?RCS:
+?RCS: Revision 3.0.1.1 1994/06/20 06:57:55 ram
+?RCS: patch30: created
+?RCS:
+?MAKE:d_tzname: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_tzname:
+?S: This variable conditionally defines HAS_TZNAME if tzname[] is
+?S: available to access timezone names.
+?S:.
+?C:HAS_TZNAME:
+?C: This symbol, if defined, indicates that the tzname[] array is
+?C: available to access timezone names.
+?C:.
+?H:#$d_tzname HAS_TZNAME /**/
+?H:.
+?LINT:set d_tzname
+: see if tzname[] exists
+$cat >try.c <<EOC
+#include <time.h>
+int main(void)
+{
+ extern char *tzname[];
+ static char c;
+ c |= *tzname[0];
+ return c ? 0 : 1;
+}
+EOC
+cyn=tzname
+set d_tzname
+eval $trylink
+
diff --git a/mcon/U/d_uctx_mctx.U b/mcon/U/d_uctx_mctx.U
new file mode 100644
index 0000000..3e60723
--- /dev/null
+++ b/mcon/U/d_uctx_mctx.U
@@ -0,0 +1,44 @@
+?RCS:
+?RCS: Copyright (c) 2012 Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_uctx_mctx: Trylink cat i_ucontext i_sys_ucontext
+?MAKE: -pick add $@ %<
+?S:d_uctx_mctx:
+?S: This variable conditionally defines the HAS_UCONTEXT_MCONTEXT symbol,
+?S: which indicates to the C program that it can access general registers
+?S: through some field in ucontext->uc_mcontext.
+?S:.
+?C:HAS_UCONTEXT_MCONTEXT:
+?C: This symbol, if defined, indicates that the C program can access the
+?C: processor's general registers through some field in the uc_mcontext
+?C: machine context field from the ucontext_t structure.
+?C:.
+?H:#$d_uctx_mctx HAS_UCONTEXT_MCONTEXT /**/
+?H:.
+?LINT:set d_uctx_mctx
+: check for machine context field in the ucontext structure
+$cat >try.c <<EOC
+#$i_ucontext I_UCONTEXT
+#$i_sys_ucontext I_SYS_UCONTEXT
+#ifdef I_UCONTEXT
+#include <ucontext.h>
+#endif
+#ifdef I_SYS_UCONTEXT
+#include <sys/ucontext.h>
+#endif
+int main(void)
+{
+ static ucontext_t *uc = 0;
+ return (int) &uc->uc_mcontext;
+}
+EOC
+cyn="whether 'struct ucontext' has a 'uc_mcontext' member"
+set d_uctx_mctx
+eval $trylink
+
diff --git a/mcon/U/d_uctx_mctx_gregs.U b/mcon/U/d_uctx_mctx_gregs.U
new file mode 100644
index 0000000..bfd07a0
--- /dev/null
+++ b/mcon/U/d_uctx_mctx_gregs.U
@@ -0,0 +1,44 @@
+?RCS:
+?RCS: Copyright (c) 2012 Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_uctx_mctx_gregs: Trylink cat i_ucontext i_sys_ucontext
+?MAKE: -pick add $@ %<
+?S:d_uctx_mctx_gregs:
+?S: This variable conditionally defines the HAS_UCONTEXT_MCONTEXT_GREGS symbol,
+?S: which indicates to the C program that it can access general registers
+?S: through ucontext->uc_mcontext.gregs[].
+?S:.
+?C:HAS_UCONTEXT_MCONTEXT_GREGS:
+?C: This symbol, if defined, indicates that the C program can access the
+?C: processor's general registers through the gregs[] array in the uc_mcontext
+?C: machine context field from the ucontext_t structure.
+?C:.
+?H:#$d_uctx_mctx_gregs HAS_UCONTEXT_MCONTEXT_GREGS /**/
+?H:.
+?LINT:set d_uctx_mctx_gregs
+: check for general register access through the ucontext structure
+$cat >try.c <<EOC
+#$i_ucontext I_UCONTEXT
+#$i_sys_ucontext I_SYS_UCONTEXT
+#ifdef I_UCONTEXT
+#include <ucontext.h>
+#endif
+#ifdef I_SYS_UCONTEXT
+#include <sys/ucontext.h>
+#endif
+int main(void)
+{
+ static ucontext_t uc;
+ return uc.uc_mcontext.gregs[0];
+}
+EOC
+cyn="whether 'struct ucontext' has a 'mcontext.gregs[]' member"
+set d_uctx_mctx_gregs
+eval $trylink
+
diff --git a/mcon/U/d_ulimit.U b/mcon/U/d_ulimit.U
new file mode 100644
index 0000000..66eb545
--- /dev/null
+++ b/mcon/U/d_ulimit.U
@@ -0,0 +1,42 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_ulimit.U,v $
+?RCS: Revision 3.0 1993/08/18 12:07:51 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_ulimit: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_ulimit:
+?S: This variable conditionally defines HAS_ULIMIT if ulimit() is
+?S: available to get the user limits.
+?S:.
+?C:HAS_ULIMIT (ULIMIT):
+?C: This symbol, if defined, indicates that the ulimit system call is
+?C: available to get the user limits.
+?C:.
+?H:#$d_ulimit HAS_ULIMIT /**/
+?H:.
+?LINT:set d_ulimit
+: see if ulimit exists
+$cat >try.c <<EOC
+#include <ulimit.h>
+int main(void)
+{
+ static long ret;
+ ret |= ulimit(UL_GETFSIZE);
+ ret |= ulimit(UL_SETFSIZE, 1L);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=ulimit
+set d_ulimit
+eval $trylink
+
diff --git a/mcon/U/d_umask.U b/mcon/U/d_umask.U
new file mode 100644
index 0000000..c5867f5
--- /dev/null
+++ b/mcon/U/d_umask.U
@@ -0,0 +1,48 @@
+?RCS: $Id$
+?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: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
+?RCS:
+?RCS: $Log: d_umask.U,v $
+?RCS: Revision 3.0.1.1 1994/08/29 16:14:50 ram
+?RCS: patch32: created by ADO
+?RCS:
+?MAKE:d_umask: Trylink cat i_sysstat
+?MAKE: -pick add $@ %<
+?S:d_umask:
+?S: This variable conditionally defines the HAS_UMASK symbol, which
+?S: indicates to the C program that the umask() routine is available.
+?S: to set and get the value of the file creation mask.
+?S:.
+?C:HAS_UMASK :
+?C: This symbol, if defined, indicates that the umask routine is
+?C: available to set and get the value of the file creation mask.
+?C:.
+?H:#$d_umask HAS_UMASK /**/
+?H:.
+?LINT:set d_umask
+: see if umask exists
+$cat >try.c <<EOC
+#include <sys/types.h>
+#$i_sysstat I_SYS_STAT
+#ifdef I_SYS_STAT
+#include <sys/stat.h>
+#endif
+int main(void)
+{
+ mode_t ret, mask;
+ ret |= umask(mask);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=umask
+set d_umask
+eval $trylink
+
diff --git a/mcon/U/d_unsetenv.U b/mcon/U/d_unsetenv.U
new file mode 100644
index 0000000..8fcd511
--- /dev/null
+++ b/mcon/U/d_unsetenv.U
@@ -0,0 +1,38 @@
+?RCS:
+?RCS: Copyright (c) 2015 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_unsetenv: Trylink cat i_stdlib
+?MAKE: -pick add $@ %<
+?S:d_unsetenv:
+?S: This variable conditionally defines the HAS_UNSETENV
+?S: symbol, which indicates to the C program that unsetenv()
+?S: is available to delete an environment variable.
+?S:.
+?C:HAS_UNSETENV:
+?C: This symbol is defined when unsetenv() is available to delete
+?C: an environment variable.
+?C:.
+?H:#$d_unsetenv HAS_UNSETENV
+?H:.
+?LINT: set d_unsetenv
+: do we have unsetenv?
+$cat >try.c <<EOC
+#$i_stdlib I_STDLIB
+#ifdef I_STDLIB
+#include <stdlib.h>
+#endif
+int main(void)
+{
+ return unsetenv("foo");
+}
+EOC
+cyn=unsetenv
+set d_unsetenv
+eval $trylink
+
diff --git a/mcon/U/d_usendir.U b/mcon/U/d_usendir.U
new file mode 100644
index 0000000..4ebf021
--- /dev/null
+++ b/mcon/U/d_usendir.U
@@ -0,0 +1,79 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_usendir.U,v $
+?RCS: Revision 3.0.1.1 1997/02/28 15:47:34 ram
+?RCS: patch61: replaced .a with $_a all over the place
+?RCS: patch61: likewise for .o replaced by $_o
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:07:52 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_usendir i_ndir ndirlib: test Setvar Findhdr d_readdir _a
+?MAKE: -pick add $@ %<
+?S:d_usendir:
+?S: This variable conditionally defines the EMULATE_NDIR symbol, which
+?S: indicates to the C program that it should compile the ndir.c code
+?S: provided with the package.
+?S:.
+?S:i_ndir (d_libndir):
+?S: This variable conditionally defines the I_NDIR symbol, which
+?S: indicates to the C program that it should include the system's
+?S: version of ndir.h, rather than the one with this package.
+?S:.
+?S:ndirlib:
+?S: The name of the library to include at linking stage to resolve ndir
+?S: symbols. It is up to the makefile to use this value.
+?S:.
+?C:EMULATE_NDIR (USENDIR):
+?C: This symbol, if defined, indicates that the program should compile
+?C: the ndir.c code provided with the package.
+?C:.
+?C:I_NDIR (LIBNDIR):
+?C: This symbol, if defined, indicates that the program should include the
+?C: system's version of ndir.h, rather than the one with this package.
+?C:.
+?H:#$d_usendir EMULATE_NDIR /**/
+?H:#$i_ndir I_NDIR /**/
+?H:.
+?T:val2
+?LINT: set d_usendir i_ndir
+: see if there are directory access routines out there
+echo " "
+if $test `./findhdr ndir.h` && \
+ ( $test -r /usr/lib/libndir$_a || $test -r /usr/local/lib/libndir$_a ); then
+ echo "Ndir library found." >&4
+ if $test -r /usr/lib/libndir$_a; then
+ ndirlib='-lndir'
+ else
+ ndirlib="/usr/local/lib/libndir$_a"
+ fi
+ val2="$define"
+ val="$undef"
+else
+ ndirlib=''
+ val2="$undef"
+ case "$d_readdir" in
+ "$define")
+ echo "No ndir library found, but you have readdir() so we'll use that." >&4
+ val="$undef";
+ ;;
+ *)
+ echo "No ndir library found." >&4
+ val="$define"
+ ;;
+ esac
+fi
+set d_usendir
+eval $setvar
+val="$val2"
+set i_ndir
+eval $setvar
+
diff --git a/mcon/U/d_usleep.U b/mcon/U/d_usleep.U
new file mode 100644
index 0000000..f9052a5
--- /dev/null
+++ b/mcon/U/d_usleep.U
@@ -0,0 +1,44 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_usleep.U,v $
+?RCS: Revision 3.0 1993/08/18 12:07:53 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_usleep: Trylink cat i_unistd
+?MAKE: -pick add $@ %<
+?S:d_usleep:
+?S: This variable conditionally defines HAS_USLEEP if usleep() is
+?S: available to do high granularity sleeps.
+?S:.
+?C:HAS_USLEEP (USLEEP):
+?C: This symbol, if defined, indicates that the usleep routine is
+?C: available to let the process sleep on a sub-second accuracy.
+?C:.
+?H:#$d_usleep HAS_USLEEP /**/
+?H:.
+?LINT:set d_usleep
+: see if usleep exists
+$cat >try.c <<EOC
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static unsigned ret;
+ ret |= usleep(1);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=usleep
+set d_usleep
+eval $trylink
+
diff --git a/mcon/U/d_uwait.U b/mcon/U/d_uwait.U
new file mode 100644
index 0000000..3890c3f
--- /dev/null
+++ b/mcon/U/d_uwait.U
@@ -0,0 +1,123 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_uwait.U,v $
+?RCS: Revision 3.0.1.1 1994/01/24 14:10:49 ram
+?RCS: patch16: added knowledge about wait3()
+?RCS: patch16: revised 'union wait' look-up algorithm
+?RCS: patch16: fixed make dependency line accordingly
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:07:54 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_uwait d_uwait3: cat contains cppstdin cppminus +cppflags rm \
+ Setvar Findhdr
+?MAKE: -pick add $@ %<
+?S:d_uwait:
+?S: This symbol conditionally defines UNION_WAIT which indicates to the C
+?S: program that argument for the wait() system call should be declared as
+?S: 'union wait status' instead of 'int status'.
+?S:.
+?S:d_uwait3:
+?S: This symbol conditionally defines UNION_WAIT3 which indicates to the C
+?S: program that the first argument for the wait3() system call should be
+?S: declared as 'union wait status' instead of 'int status'.
+?S:.
+?C:UNION_WAIT:
+?C: This symbol if defined indicates to the C program that the argument
+?C: for the wait() system call should be declared as 'union wait status'
+?C: instead of 'int status'. You probably need to include <sys/wait.h>
+?C: in the former case (see I_SYSWAIT).
+?C:.
+?C:UNION_WAIT3:
+?C: This symbol if defined indicates to the C program that the first argument
+?C: for the wait3() system call should be declared as 'union wait status'
+?C: instead of 'int status'. You probably need to include <sys/wait.h>
+?C: in the former case (see I_SYSWAIT). It seems safe to assume that the
+?C: same rule applies to the second parameter of wait4().
+?C:.
+?H:#$d_uwait UNION_WAIT /**/
+?H:#$d_uwait3 UNION_WAIT3 /**/
+?H:.
+?T:val2 flags f also
+?LINT:set d_uwait d_uwait3
+: see if union wait is available
+echo " "
+?X:
+?X: Unfortunately, we can't just grep <sys/wait.h> for "union wait" because
+?X: some weird systems (did I hear HP-UX?) define union wait only when _BSD
+?X: is defined. The same thing happens on OSF/1, who is pushing weirdness to
+?X: its limits by requiring wait() to use (int *) but wait3() to use
+?X: (union wait *), unless _BSD is defined and -lbsd is used, in which case
+?X: wait() also expects (union wait *). Aaargh!!--RAM
+?X:
+set X $cppflags
+shift
+flags=''
+also=''
+for f in $*; do
+ case "$f" in
+ *NO_PROTO*) ;;
+ *) flags="$flags $f";;
+ esac
+done
+$cat `./findhdr sys/wait.h` /dev/null | \
+ $cppstdin $flags $cppminus >wait.out 2>/dev/null
+if $contains 'union.*wait.*{' wait.out >/dev/null 2>&1 ; then
+ echo "Looks like your <sys/wait.h> knows about 'union wait'..." >&4
+ val="$define"
+@if UNION_WAIT
+ also='also '
+ if $contains 'extern.*wait[ ]*([ ]*int' wait.out >/dev/null 2>&1
+ then
+ echo "But wait() seems to expect an 'int' pointer (POSIX way)." >&4
+ val="$undef"
+ also=''
+ elif $contains 'extern.*wait[ ]*([ ]*union' wait.out >/dev/null 2>&1
+ then
+ echo "And indeed wait() expects an 'union wait' pointer (BSD way)." >&4
+ else
+ echo "So we'll use that for wait()." >&4
+ fi
+@end
+@if UNION_WAIT3 || d_uwait3
+ val2="$define"
+@end
+@if UNION_WAIT3
+ if $contains 'extern.*wait3[ ]*([ ]*int' wait.out >/dev/null 2>&1
+ then
+ echo "However wait3() seems to expect an 'int' pointer, weird." >&4
+ val2="$undef"
+ elif $contains 'extern.*wait3[ ]*([ ]*union' wait.out >/dev/null 2>&1
+ then
+ echo "And wait3() ${also}expects an 'union wait' pointer, fine." >&4
+ else
+ echo "As expected, wait3() ${also}uses an 'union wait' pointer." >&4
+ fi
+@end
+else
+ echo "No trace of 'union wait' in <sys/wait.h>..." >&4
+ val="$undef"
+@if UNION_WAIT && UNION_WAIT3
+ echo "Both wait() and wait3() will use a plain 'int' pointer then." >&4
+@elsif UNION_WAIT
+ echo "Your wait() should be happy with a plain 'int' pointer." >&4
+@elsif UNION_WAIT3
+ echo "Your wait3() should be happy with a plain 'int' pointer." >&4
+@end
+fi
+set d_uwait
+eval $setvar
+@if UNION_WAIT3 || d_uwait3
+val="$val2"; set d_uwait3
+eval $setvar
+@end
+$rm -f wait.out
+
diff --git a/mcon/U/d_vfork.U b/mcon/U/d_vfork.U
new file mode 100644
index 0000000..37b57c9
--- /dev/null
+++ b/mcon/U/d_vfork.U
@@ -0,0 +1,105 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_vfork.U,v $
+?RCS: Revision 3.0.1.6 1994/08/29 16:18:21 ram
+?RCS: patch32: set default to 'y' the first time
+?RCS:
+?RCS: Revision 3.0.1.5 1994/06/20 06:59:14 ram
+?RCS: patch30: usevfork was not always properly set
+?RCS:
+?RCS: Revision 3.0.1.4 1994/05/13 15:20:56 ram
+?RCS: patch27: modified to avoid spurious Whoa warnings (ADO)
+?RCS:
+?RCS: Revision 3.0.1.3 1994/05/06 14:59:09 ram
+?RCS: patch23: now explicitly ask whether vfork() should be used (ADO)
+?RCS:
+?RCS: Revision 3.0.1.2 1993/10/16 13:49:39 ram
+?RCS: patch12: added magic for vfork()
+?RCS:
+?RCS: Revision 3.0.1.1 1993/09/13 16:06:57 ram
+?RCS: patch10: removed automatic remapping of vfork on fork (WAD)
+?RCS: patch10: added compatibility code for older config.sh (WAD)
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:07:55 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_vfork usevfork: Trylink Myread Oldconfig Setvar cat i_unistd
+?MAKE: -pick add $@ %<
+?S:d_vfork:
+?S: This variable conditionally defines the HAS_VFORK symbol, which
+?S: indicates the vfork() routine is available.
+?S:.
+?S:usevfork:
+?S: This variable is set to true when the user accepts to use vfork.
+?S: It is set to false when no vfork is available or when the user
+?S: explicitly requests not to use vfork.
+?S:.
+?C:HAS_VFORK (VFORK):
+?C: This symbol, if defined, indicates that vfork() exists.
+?C:.
+?H:#$d_vfork HAS_VFORK /**/
+?H:.
+?M:vfork: HAS_VFORK
+?M:#ifndef HAS_VFORK
+?M:#define vfork fork
+?M:#endif
+?M:.
+?LINT:set d_vfork
+: see if there is a vfork
+$cat >try.c <<EOC
+#include <sys/types.h>
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+int main(void)
+{
+ static pid_t ret;
+ ret |= vfork();
+ return ret ? 0 : 1;
+}
+EOC
+cyn=vfork
+set val
+eval $trylink
+
+
+: Ok, but do we want to use it. vfork is reportedly unreliable in
+: perl on Solaris 2.x, and probably elsewhere.
+case "$val" in
+$define)
+ echo " "
+ case "$usevfork" in
+ false) dflt='n';;
+ *) dflt='y';;
+ esac
+ rp="Some systems have problems with vfork(). Do you want to use it?"
+ . ./myread
+ case "$ans" in
+ y|Y) ;;
+ *)
+ echo "Ok, we won't use vfork()."
+ val="$undef"
+ ;;
+ esac
+ ;;
+esac
+?X:
+?X: Only set it when final value is known to avoid spurious Whoas
+?X: Then set usevfork accordingly to the current value, for next run
+?X:
+set d_vfork
+eval $setvar
+case "$d_vfork" in
+$define) usevfork='true';;
+*) usevfork='false';;
+esac
+
diff --git a/mcon/U/d_voidsig.U b/mcon/U/d_voidsig.U
new file mode 100644
index 0000000..d00cec1
--- /dev/null
+++ b/mcon/U/d_voidsig.U
@@ -0,0 +1,89 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_voidsig.U,v $
+?RCS: Revision 3.0.1.3 1995/05/12 12:12:46 ram
+?RCS: patch54: made cppflags dependency optional
+?RCS:
+?RCS: Revision 3.0.1.2 1994/08/29 16:20:35 ram
+?RCS: patch32: now sets signal_t only once d_voidsig is known (WED)
+?RCS:
+?RCS: Revision 3.0.1.1 1994/06/20 06:59:54 ram
+?RCS: patch30: now properly sets signal_t when re-using previous value
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:07:56 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_voidsig signal_t: rm contains cppstdin cppminus +cppflags test Myread \
+ Oldconfig Setvar Findhdr
+?MAKE: -pick add $@ %<
+?S:d_voidsig:
+?S: This variable conditionally defines VOIDSIG if this system
+?S: declares "void (*signal(...))()" in signal.h. The old way was to
+?S: declare it as "int (*signal(...))()".
+?S:.
+?S:signal_t:
+?S: This variable holds the type of the signal handler (void or int).
+?S:.
+?C:VOIDSIG:
+?C: This symbol is defined if this system declares "void (*signal(...))()" in
+?C: signal.h. The old way was to declare it as "int (*signal(...))()". It
+?C: is up to the package author to declare things correctly based on the
+?C: symbol.
+?C:.
+?C:Signal_t (SIGNAL_T):
+?C: This symbol's value is either "void" or "int", corresponding to the
+?C: appropriate return type of a signal handler. Thus, you can declare
+?C: a signal handler using "Signal_t (*handler)()", and define the
+?C: handler using "Signal_t handler(sig)".
+?C:.
+?H:#$d_voidsig VOIDSIG /**/
+?H:#define Signal_t $signal_t /* Signal handler's return type */
+?H:.
+?T:xxx
+?LINT:set d_voidsig
+: see if signal is declared as pointer to function returning int or void
+echo " "
+xxx=`./findhdr signal.h`
+$test "$xxx" && $cppstdin $cppminus $cppflags < $xxx >$$.tmp 2>/dev/null
+if $contains 'int.*\*[ ]*signal' $$.tmp >/dev/null 2>&1 ; then
+ echo "You have int (*signal())() instead of void." >&4
+ val="$undef"
+elif $contains 'void.*\*[ ]*signal' $$.tmp >/dev/null 2>&1 ; then
+ echo "You have void (*signal())() instead of int." >&4
+ val="$define"
+elif $contains 'extern[ ]*[(\*]*signal' $$.tmp >/dev/null 2>&1 ; then
+ echo "You have int (*signal())() instead of void." >&4
+ val="$undef"
+else
+ case "$d_voidsig" in
+ '')
+ echo "I can't determine whether signal handler returns void or int..." >&4
+ dflt=void
+ rp="What type does your signal handler return?"
+ . ./myread
+ case "$ans" in
+ v*) val="$define";;
+ *) val="$undef";;
+ esac;;
+ "$define")
+ echo "As you already told me, signal handler returns void." >&4;;
+ *)
+ echo "As you already told me, signal handler returns int." >&4;;
+ esac
+fi
+set d_voidsig
+eval $setvar
+case "$d_voidsig" in
+"$define") signal_t="void";;
+*) signal_t="int";;
+esac
+$rm -f $$.tmp
+
diff --git a/mcon/U/d_volatile.U b/mcon/U/d_volatile.U
new file mode 100644
index 0000000..542f512
--- /dev/null
+++ b/mcon/U/d_volatile.U
@@ -0,0 +1,79 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_volatile.U,v $
+?RCS: Revision 3.0.1.2 1995/07/25 14:08:49 ram
+?RCS: patch56: made cc and ccflags optional dependencies
+?RCS:
+?RCS: Revision 3.0.1.1 1993/09/09 11:49:51 ram
+?RCS: patch9: volatile definition was swapped over with undef
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:07:57 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_volatile: cat +cc +ccflags rm_try Setvar
+?MAKE: -pick add $@ %<
+?S:d_volatile:
+?S: This variable conditionally defines the HASVOLATILE symbol, which
+?S: indicates to the C program that this C compiler knows about the
+?S: volatile declaration.
+?S:.
+?C:HASVOLATILE ~ %<:
+?C: This symbol, if defined, indicates that this C compiler knows about
+?C: the volatile declaration.
+?C:.
+?H:?%<:#$d_volatile HASVOLATILE /**/
+?H:?%<:#ifndef HASVOLATILE
+?H:?%<:#define volatile
+?H:?%<:#endif
+?H:.
+?W:%<:volatile
+?LINT:set d_volatile
+?LINT:known volatile
+: check for volatile keyword
+echo " "
+echo 'Checking to see if your C compiler knows about "volatile"...' >&4
+$cat >try.c <<'EOCP'
+int main(void)
+{
+?X:
+?X: The following seven lines added by Bill Campbell <billc@sierra.com>
+?X: detect that MIPS compilers do not handle volatile in all situations.
+?X:
+ typedef struct _goo_struct goo_struct;
+ goo_struct * volatile goo = ((goo_struct *)0);
+ struct _goo_struct {
+ long long_int;
+ int reg_int;
+ char char_var;
+ };
+ typedef unsigned short foo_t;
+ static char *volatile foo;
+ static volatile int bar;
+ static volatile foo_t blech;
+ foo = foo;
+ (void) goo;
+ (void) foo;
+ (void) bar;
+ (void) blech;
+ return 0;
+}
+EOCP
+if $cc -c $ccflags try.c; then
+ val="$define"
+ echo "Yup, it does."
+else
+ val="$undef"
+ echo "Nope, it doesn't."
+fi
+set d_volatile
+eval $setvar
+$rm_try
+
diff --git a/mcon/U/d_vprintf.U b/mcon/U/d_vprintf.U
new file mode 100644
index 0000000..f7d8c73
--- /dev/null
+++ b/mcon/U/d_vprintf.U
@@ -0,0 +1,81 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_vprintf.U,v $
+?RCS: Revision 3.0 1993/08/18 12:07:59 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_vprintf d_charvspr: Guess cat +cc +ccflags Csym Setvar
+?MAKE: -pick add $@ %<
+?S:d_vprintf:
+?S: This variable conditionally defines the HAS_VPRINTF symbol, which
+?S: indicates to the C program that the vprintf() routine is available
+?S: to printf with a pointer to an argument list.
+?S:.
+?S:d_charvspr:
+?S: This variable conditionally defines CHARVSPRINTF if this system
+?S: has vsprintf returning type (char*). The trend seems to be to
+?S: declare it as "int vsprintf()".
+?S:.
+?C:HAS_VPRINTF (VPRINTF):
+?C: This symbol, if defined, indicates that the vprintf routine is available
+?C: to printf with a pointer to an argument list. If unavailable, you
+?C: may need to write your own, probably in terms of _doprnt().
+?C:.
+?C:USE_CHAR_VSPRINTF (CHARVSPRINTF):
+?C: This symbol is defined if this system has vsprintf() returning type
+?C: (char*). The trend seems to be to declare it as "int vsprintf()". It
+?C: is up to the package author to declare vsprintf correctly based on the
+?C: symbol.
+?C:.
+?H:#$d_vprintf HAS_VPRINTF /**/
+?H:#$d_charvspr USE_CHAR_VSPRINTF /**/
+?H:.
+?F:!vprintf !vprintf.c
+?T:val2
+?LINT:set d_vprintf d_charvspr
+: see if vprintf exists
+echo " "
+if set vprintf val -f d_vprintf; eval $csym; $val; then
+ echo 'vprintf() found.' >&4
+ val="$define"
+ $cat >vprintf.c <<'EOF'
+#include <varargs.h>
+
+int main() { xxx("foo"); }
+
+xxx(va_alist)
+va_dcl
+{
+ va_list args;
+ char buf[10];
+
+ va_start(args);
+ exit((unsigned long)vsprintf(buf,"%s",args) > 10L);
+}
+EOF
+ if $cc $ccflags -o vprintf vprintf.c >/dev/null 2>&1 && ./vprintf; then
+ echo "Your vsprintf() returns (int)." >&4
+ val2="$undef"
+ else
+ echo "Your vsprintf() returns (char*)." >&4
+ val2="$define"
+ fi
+else
+ echo 'vprintf() NOT found.' >&4
+ val="$undef"
+ val2="$undef"
+fi
+set d_vprintf
+eval $setvar
+val=$val2
+set d_charvspr
+eval $setvar
+
diff --git a/mcon/U/d_vsnprintf.U b/mcon/U/d_vsnprintf.U
new file mode 100644
index 0000000..56153d3
--- /dev/null
+++ b/mcon/U/d_vsnprintf.U
@@ -0,0 +1,47 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_vsnprintf: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_vsnprintf:
+?S: This variable conditionally defines the HAS_VSNPRINTF symbol, which
+?S: indicates to the C program that the vsnprintf() routine is available.
+?S:.
+?C:HAS_VSNPRINTF:
+?C: This symbol, if defined, indicates that the vsnprintf routine is
+?C: available.
+?C:.
+?H:#$d_vsnprintf HAS_VSNPRINTF /**/
+?H:.
+?LINT:set d_vsnprintf
+: see if vsnprintf exists
+$cat >try.c <<EOC
+#include <stdarg.h>
+#include <stdio.h>
+int func(char *s, ...)
+{
+ static int ret;
+ static char buf;
+ static size_t n;
+ va_list ap;
+ (void) s;
+ ret |= vsnprintf(&buf, n, "fmt", ap);
+ return ret;
+}
+
+int main(void)
+{
+ return func("xxx", 1);
+}
+EOC
+cyn=vsnprintf
+set d_vsnprintf
+eval $trylink
+
diff --git a/mcon/U/d_wait3.U b/mcon/U/d_wait3.U
new file mode 100644
index 0000000..db57bd2
--- /dev/null
+++ b/mcon/U/d_wait3.U
@@ -0,0 +1,53 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_wait3.U,v $
+?RCS: Revision 3.0 1993/08/18 12:08:01 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_wait3: Trylink cat i_sysresrc i_syswait
+?MAKE: -pick add $@ %<
+?S:d_wait3:
+?S: This variable conditionally defines the HAS_WAIT3 symbol, which
+?S: indicates to the C program that the wait3() subroutine exists.
+?S:.
+?C:HAS_WAIT3:
+?C: This symbol, if defined, indicates that the wait3() subroutine
+?C: exists.
+?C:.
+?H:#$d_wait3 HAS_WAIT3 /**/
+?H:.
+?LINT:set d_wait3
+: see if 'wait3()' exists
+$cat >try.c <<EOC
+#include <sys/types.h>
+#$i_syswait I_SYS_WAIT
+#ifdef I_SYS_WAIT
+#include <sys/wait.h>
+#endif
+#$i_sysresrc I_SYS_RESOURCE
+#ifdef I_SYS_RESOURCE
+#include <sys/resource.h>
+#endif
+int main(void)
+{
+ static pid_t ret;
+ static int status, options;
+ static struct rusage ru;
+ options |= WNOHANG;
+ options |= WUNTRACED;
+ ret |= wait3(&status, options, &ru);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=wait3
+set d_wait3
+eval $trylink
+
diff --git a/mcon/U/d_wait4.U b/mcon/U/d_wait4.U
new file mode 100644
index 0000000..64e1d02
--- /dev/null
+++ b/mcon/U/d_wait4.U
@@ -0,0 +1,52 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_wait4.U,v $
+?RCS: Revision 3.0 1993/08/18 12:08:01 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_wait4: Trylink cat i_sysresrc i_syswait
+?MAKE: -pick add $@ %<
+?S:d_wait4:
+?S: This variable conditionally defines the HAS_WAIT4 symbol, which
+?S: indicates the wait4() routine is available.
+?S:.
+?C:HAS_WAIT4 (WAIT4):
+?C: This symbol, if defined, indicates that wait4() exists.
+?C:.
+?H:#$d_wait4 HAS_WAIT4 /**/
+?H:.
+?LINT:set d_wait4
+: see if there is a wait4
+$cat >try.c <<EOC
+#include <sys/types.h>
+#$i_syswait I_SYS_WAIT
+#ifdef I_SYS_WAIT
+#include <sys/wait.h>
+#endif
+#$i_sysresrc I_SYS_RESOURCE
+#ifdef I_SYS_RESOURCE
+#include <sys/resource.h>
+#endif
+int main(void)
+{
+ static pid_t ret, pid;
+ static int status, options;
+ static struct rusage ru;
+ options |= WNOHANG;
+ options |= WUNTRACED;
+ ret |= wait4(pid, &status, options, &ru);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=wait4
+set d_wait4
+eval $trylink
+
diff --git a/mcon/U/d_waitpid.U b/mcon/U/d_waitpid.U
new file mode 100644
index 0000000..2b31e76
--- /dev/null
+++ b/mcon/U/d_waitpid.U
@@ -0,0 +1,48 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_waitpid.U,v $
+?RCS: Revision 3.0 1993/08/18 12:08:02 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_waitpid: Trylink cat i_syswait
+?MAKE: -pick add $@ %<
+?S:d_waitpid:
+?S: This variable conditionally defines HAS_WAITPID if waitpid() is
+?S: available to wait for child process.
+?S:.
+?C:HAS_WAITPID (WAITPID):
+?C: This symbol, if defined, indicates that the waitpid routine is
+?C: available to wait for child process.
+?C:.
+?H:#$d_waitpid HAS_WAITPID /**/
+?H:.
+?LINT:set d_waitpid
+: see if waitpid exists
+$cat >try.c <<EOC
+#include <sys/types.h>
+#$i_syswait I_SYS_WAIT
+#ifdef I_SYS_WAIT
+#include <sys/wait.h>
+#endif
+int main(void)
+{
+ static pid_t ret, pid;
+ static int status, options;
+ options |= WNOHANG;
+ options |= WUNTRACED;
+ ret |= waitpid(pid, &status, options);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=waitpid
+set d_waitpid
+eval $trylink
+
diff --git a/mcon/U/d_wcstombs.U b/mcon/U/d_wcstombs.U
new file mode 100644
index 0000000..516dbc2
--- /dev/null
+++ b/mcon/U/d_wcstombs.U
@@ -0,0 +1,47 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_wcstombs.U,v $
+?RCS: Revision 3.0 1993/08/18 12:08:03 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_wcstombs: Trylink cat i_stdlib
+?MAKE: -pick add $@ %<
+?S:d_wcstombs:
+?S: This variable conditionally defines the HAS_WCSTOMBS symbol, which
+?S: indicates to the C program that the wcstombs() routine is available
+?S: to convert wide character strings to multibyte strings.
+?S:.
+?C:HAS_WCSTOMBS:
+?C: This symbol, if defined, indicates that the wcstombs routine is
+?C: available to convert wide character strings to multibyte strings.
+?C:.
+?H:#$d_wcstombs HAS_WCSTOMBS /**/
+?H:.
+?LINT:set d_wcstombs
+: see if wcstombs exists
+$cat >try.c <<EOC
+#$i_stdlib I_STDLIB
+#ifdef I_STDLIB
+#include <stdlib.h>
+#endif
+int main(void)
+{
+ static size_t ret, n;
+ static wchar_t wcs;
+ static char buf[1];
+ ret |= wcstombs(buf, &wcs, n);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=wcstombs
+set d_wcstombs
+eval $trylink
+
diff --git a/mcon/U/d_wctomb.U b/mcon/U/d_wctomb.U
new file mode 100644
index 0000000..126bf87
--- /dev/null
+++ b/mcon/U/d_wctomb.U
@@ -0,0 +1,53 @@
+?RCS: $Id$
+?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: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
+?RCS:
+?RCS: $Log: d_wctomb.U,v $
+?RCS: Revision 3.0.1.1 1994/08/29 16:20:43 ram
+?RCS: patch32: created by ADO
+?RCS:
+?MAKE:d_wctomb: Trylink cat i_stdlib i_limits
+?MAKE: -pick add $@ %<
+?S:d_wctomb:
+?S: This variable conditionally defines the HAS_WCTOMB symbol, which
+?S: indicates to the C program that the wctomb() routine is available
+?S: to convert a wide character to a multibyte.
+?S:.
+?C:HAS_WCTOMB (WCTOMB):
+?C: This symbol, if defined, indicates that the wctomb routine is available
+?C: to covert a wide character to a multibyte.
+?C:.
+?H:#$d_wctomb HAS_WCTOMB /**/
+?H:.
+?LINT:set d_wctomb
+: see if wctomb exists
+$cat >try.c <<EOC
+#$i_stdlib I_STDLIB
+#ifdef I_STDLIB
+#include <stdlib.h>
+#endif
+#$i_limits I_LIMITS
+#ifdef I_LIMITS
+#include <limits.h>
+#endif
+int main(void)
+{
+ static int ret;
+ static char dst[MB_LEN_MAX];
+ static wchar_t wc;
+ ret |= wctomb(dst, wc);
+ return ret ? 0 : 1;
+}
+EOC
+cyn=wctomb
+set d_wctomb
+eval $trylink
+
diff --git a/mcon/U/d_wifstat.U b/mcon/U/d_wifstat.U
new file mode 100644
index 0000000..5522942
--- /dev/null
+++ b/mcon/U/d_wifstat.U
@@ -0,0 +1,87 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_wifstat.U,v $
+?RCS: Revision 3.0.1.3 1997/02/28 15:47:43 ram
+?RCS: patch61: added a ?F: metalint hint
+?RCS:
+?RCS: Revision 3.0.1.2 1995/07/25 14:09:10 ram
+?RCS: patch56: re-arranged compile line to include ldflags before objects
+?RCS:
+?RCS: Revision 3.0.1.1 1995/03/21 08:47:46 ram
+?RCS: patch52: created
+?RCS:
+?MAKE:d_wifstat: d_uwait +cc +ccflags +ldflags +libs Oldconfig cat rm
+?MAKE: -pick add $@ %<
+?S:d_wifstat:
+?S: This symbol conditionally defines USE_WIFSTAT if the C program can
+?S: safely use the WIFxxx macros with the kind of wait() parameter
+?S: declared in the program (see UNION_WAIT), or if it can't. Should
+?S: only matter on HP-UX, where the macros are incorrectly written and
+?S: therefore cause programs using them with an 'union wait' variable
+?S: to not compile properly.
+?S:.
+?C:USE_WIFSTAT:
+?C: This symbol, if defined, indicates to the C program that the argument
+?C: for the WIFxxx set of macros such as WIFSIGNALED or WIFEXITED can
+?C: be of the same kind as the one used to hold the wait() status. Should
+?C: only matter on HP-UX, where the macros are incorrectly written and
+?C: therefore cause programs using them with an 'union wait' variable
+?C: to not compile properly. See also UNION_WAIT.
+?C:.
+?H:#$d_wifstat USE_WIFSTAT /**/
+?H:.
+?T:type
+?F:!foo
+: see if we can use WIFxxx macros
+echo " "
+case "$d_wifstat" in
+"$define") echo "As before, you can safely use WIFEXITED and friends!" >&4;;
+"$undef") echo "You still can't use WIFEXITED and friends!" >&4;;
+*)
+ echo "Let's see whether you can use the WIFEXITED(status) macro and its"
+ case "$d_uwait" in
+ "$define") type='union wait';;
+ *) type='int';;
+ esac
+ echo "friends with status declared as '$type status'..."
+ $cat >foo.c <<EOCP
+#include <sys/types.h>
+#include <sys/wait.h>
+
+int main()
+{
+ $type status;
+ int e = 0;
+
+#ifdef WIFEXITED
+ if (WIFEXITED(status))
+ printf("\n");
+ exit(0);
+#else
+ exit(2);
+#endif
+}
+EOCP
+ d_wifstat="$undef"
+ if $cc $ccflags $ldflags -o foo foo.c $libs >/dev/null 2>&1; then
+ if ./foo >/dev/null; then
+ echo "Great! Looks like we can use the WIFxxx macros." >&4
+ d_wifstat="$define"
+ else
+ echo "You don't seem to have WIFxxx macros, but that's ok." >&4
+ fi
+ else
+ echo "Apparently you can't use WIFxxx macros properly." >&4
+ fi
+ $rm -f foo.* foo core
+ ;;
+esac
+
diff --git a/mcon/U/d_xdrs.U b/mcon/U/d_xdrs.U
new file mode 100644
index 0000000..bd727e8
--- /dev/null
+++ b/mcon/U/d_xdrs.U
@@ -0,0 +1,42 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_xdrs.U,v $
+?RCS: Revision 3.0 1993/08/18 12:08:04 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_xdrs: cat Csym Setvar
+?MAKE: -pick add $@ %<
+?S:d_xdrs:
+?S: This symbol conditionally defines HAS_XDRS which indicates to the C
+?S: program that XDR serialization routines are available.
+?S:.
+?C:HAS_XDRS (XDRS):
+?C: This symbol if defined indicates to the C program that the XDR
+?C: serialization routines are available to transfer data accross
+?C: various architectures.
+?C:.
+?H:#$d_xdrs HAS_XDRS /**/
+?H:.
+?LINT:set d_xdrs
+: see if XDR is available
+echo " "
+if set xdr_int val -f d_xdrs; eval $csym; $val; then
+ echo "Ahh! You have XDR routines for network communications." >&4
+ val="$define"
+else
+ $cat >&4 <<EOM
+Sigh! You do not have XDR routines -- Network communications may be hazardous.
+EOM
+ val="$undef"
+fi
+set d_xdrs
+eval $setvar
+
diff --git a/mcon/U/defeditor.U b/mcon/U/defeditor.U
new file mode 100644
index 0000000..d4a2dde
--- /dev/null
+++ b/mcon/U/defeditor.U
@@ -0,0 +1,45 @@
+?RCS: $Id$
+?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: defeditor.U,v $
+?RCS: Revision 3.0.1.1 1995/01/11 15:30:16 ram
+?RCS: patch45: can now use the 'vi' variable since path stripping is deferred
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:08:05 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:defeditor: Getfile Oldconfig Loc vi
+?MAKE: -pick add $@ %<
+?S:defeditor:
+?S: This variable contains the eventual value of the DEFEDITOR symbol,
+?S: which contains the name of the default editor.
+?S:.
+?C:DEFEDITOR:
+?C: This symbol contains the full pathname of the default editor.
+?C:.
+?H:#define DEFEDITOR "$defeditor" /**/
+?H:.
+: determine default editor
+echo " "
+case "$defeditor" in
+'')
+ case "$vi" in
+ */*) dflt="$vi";;
+ *) dflt=/usr/ucb/vi;;
+ esac
+ ;;
+*) dflt="$defeditor"
+ ;;
+esac
+fn=f/
+rp="What is the default editor on your system?"
+. ./getfile
+defeditor="$ans"
+
diff --git a/mcon/U/doublesize.U b/mcon/U/doublesize.U
new file mode 100644
index 0000000..2fc5724
--- /dev/null
+++ b/mcon/U/doublesize.U
@@ -0,0 +1,58 @@
+?RCS: $Id$
+?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: doublesize.U,v $
+?RCS: Revision 3.0.1.1 1994/10/29 16:17:06 ram
+?RCS: patch36: added ?F: line for metalint file checking
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:08:06 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:doublesize: cat rm_try Myread +cc +ccflags
+?MAKE: -pick add $@ %<
+?S:doublesize:
+?S: This variable contains the value of the DOUBLESIZE symbol, which
+?S: indicates to the C program how many bytes there are in a double.
+?S:.
+?C:DOUBLESIZE:
+?C: This symbol contains the size of a double, so that the C preprocessor
+?C: can make decisions based on it.
+?C:.
+?H:#define DOUBLESIZE $doublesize /**/
+?H:.
+?F:!try
+: check for length of double
+echo " "
+case "$doublesize" in
+'')
+ echo "Checking to see how big your double precision numbers are..." >&4
+ $cat >try.c <<'EOCP'
+#include <stdio.h>
+int main()
+{
+ printf("%d\n", sizeof(double));
+}
+EOCP
+ if $cc $ccflags -o try try.c >/dev/null 2>&1 ; then
+ dflt=`./try`
+ else
+ dflt='8'
+ echo "(I can't seem to compile the test program. Guessing...)"
+ fi
+ ;;
+*)
+ dflt="$doublesize"
+ ;;
+esac
+rp="What is the size of a double precision number (in bytes)?"
+. ./myread
+doublesize="$ans"
+$rm_try
+
diff --git a/mcon/U/ebcdic.U b/mcon/U/ebcdic.U
new file mode 100644
index 0000000..6a1dda3
--- /dev/null
+++ b/mcon/U/ebcdic.U
@@ -0,0 +1,58 @@
+?RCS: $Id$
+?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: Copyright (c) 1998 Andy Dougherty
+?RCS:
+?RCS: Original author Jarkko Hietaniemi <jhi@iki.fi>
+?RCS: Merged into dist by Andy Dougherty July 13, 1998
+?RCS:
+?MAKE:ebcdic: Compile Setvar cat rm_try run
+?MAKE: -pick add $@ %<
+?S:ebcdic:
+?S: This variable conditionally defines EBCDIC if this
+?S: system uses EBCDIC encoding. Among other things, this
+?S: means that the character ranges are not contiguous.
+?S: See trnl.U
+?S:.
+?C:EBCDIC:
+?C: This symbol, if defined, indicates that this system uses
+?C: EBCDIC encoding.
+?C:.
+?H:#$ebcdic EBCDIC /**/
+?H:.
+?F:!try
+?LINT:set ebcdic
+: look whether system uses EBCDIC
+echo " "
+echo "Determining whether or not we are on an EBCDIC system..." >&4
+$cat >try.c <<'EOM'
+int main()
+{
+ if ('M'==0xd4) return 0;
+ return 1;
+}
+EOM
+val=$undef
+set try
+if eval $compile_ok; then
+ if $run ./try; then
+ echo "You seem to speak EBCDIC." >&4
+ val="$define"
+ else
+ echo "Nope, no EBCDIC, probably ASCII or some ISO Latin. Or UTF-8." >&4
+ fi
+else
+ echo "I'm unable to compile the test program." >&4
+ echo "I'll assume ASCII or some ISO Latin. Or UTF8." >&4
+fi
+$rm_try
+set ebcdic
+eval $setvar
+
diff --git a/mcon/U/enablenls.U b/mcon/U/enablenls.U
new file mode 100644
index 0000000..ca6bece
--- /dev/null
+++ b/mcon/U/enablenls.U
@@ -0,0 +1,61 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:enablenls d_enablenls: Myread Setvar cat package d_nls
+?MAKE: -pick add $@ %<
+?S:enablenls:
+?S: This variable holds 'true' or 'false' depending on whether we're
+?S: going to enable Native Language Support (NLS).
+?S:.
+?S:d_enablenls:
+?S: This variable conditionally defines ENABLE_NLS.
+?S:.
+?C:ENABLE_NLS:
+?C: This symbol, when defines, indicates that the program should enable
+?C: Native Language Support (NLS) for internationalization (I18N).
+?C:.
+?H:#$d_enablenls ENABLE_NLS /**/
+?H:.
+?LINT:set d_enablenls
+: determine whether to enable NLS
+echo " "
+case "$d_nls" in
+"$undef")
+ echo "I won't enable NLS since you don't have that feature." >&4
+ val="$undef"
+ ;;
+*)
+ $cat <<EOM
+I can compile $package with Native Language Support (NLS), which
+will enable internationalization of some messages, provided there is
+a suitable translation available.
+
+EOM
+ dflt=y
+ case "$d_enablenls" in
+ "$undef") dflt=n;;
+ esac
+ rp='Shall I enable NLS'
+ . ./myread
+ case "$ans" in
+ y) val="$define";;
+ *) val="$undef";;
+ esac
+ ;;
+esac
+set d_enablenls
+eval $setvar
+@if enablenls
+case "$d_enablenls" in
+"$define") enablenls=true;;
+"$undef") enablenls=false;;
+esac
+@end
+
diff --git a/mcon/U/errnolist.U b/mcon/U/errnolist.U
new file mode 100644
index 0000000..1e466b0
--- /dev/null
+++ b/mcon/U/errnolist.U
@@ -0,0 +1,106 @@
+?RCS: $Id$
+?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: errnolist.U,v $
+?RCS: Revision 3.0.1.2 1997/02/28 15:48:01 ram
+?RCS: patch61: replaced .a with $_a all over the place
+?RCS: patch61: likewise for .o replaced by $_o
+?RCS:
+?RCS: Revision 3.0.1.1 1994/01/24 14:10:54 ram
+?RCS: patch16: created
+?RCS:
+?MAKE:errnolist errnolist_SH errnolist_a errnolist_c errnolist_o: cat +cc \
+ +ccflags +libs +d_sysernlst _a _o
+?MAKE: -pick add $@ %<
+?S:errnolist:
+?S: This variable holds the base name of a file containing the
+?S: definition of the sys_errnolist array, if the C library
+?S: doesn't provide it already. Otherwise, its value is empty.
+?S: The following lines should be included in your Makefile.SH:
+?S:
+?S: case "$errnolist" in
+?S: '') ;;
+?S: *)
+?S: $spitshell >>Makefile <<!GROK!THIS!
+?S: $errnolist_c: $errnolist_SH $errnolist_a
+?S: sh ./$errnolist_SH
+?S:
+?S: !GROK!THIS!
+?S: ;;
+?S: esac
+?S:
+?S: You may define the 'errnolist' variable in your Myinit.U if you
+?S: wish to override its default value "errnolist".
+?S:.
+?S:errnolist_SH:
+?S: This is the name of a file which will generate errnolistc.
+?S:.
+?S:errnolist_a:
+?S: This is the name of the awk script called by errnolist_SH.
+?S:.
+?S:errnolist_c:
+?S: This is the name of a generated C file which provides the
+?S: definition of the sys_errnolist array.
+?S:.
+?S:errnolist_o:
+?S: This is the name of the object file which provides the
+?S: definition of the sys_errnolist array, if the C library
+?S: doesn't provide it already. Otherwise, its value is empty.
+?S:.
+?INIT:errnolist=errnolist
+: check for sys_errnolist
+@if d_sysernlst || HAS_SYS_ERRNOLIST
+case "$d_sysernlst" in
+"$define")
+ errnolist=''
+ errnolist_SH=''
+ errnolist_a=''
+ errnolist_c=''
+ errnolist_o=''
+ ;;
+*)
+ echo " "
+ echo "I'll make sure your Makefile provides sys_errnolist in $errnolist.c"
+ errnolist_SH=$errnolist.SH
+ errnolist_a=$errnolist$_a
+ errnolist_c=$errnolist.c
+ errnolist_o=$errnolist$_o
+ ;;
+esac
+@else
+echo " "
+$cat <<EOM
+Checking to see if your C library provides us with sys_errnolist[]...
+EOM
+$cat >errnolist.c <<'EOCP'
+extern char *sys_errnolist[];
+int main() {
+ char *p0 = sys_errnolist[0];
+ char *p1 = sys_errnolist[1];
+
+ return (p0 == p1); /* Make sure they're not optimized away */
+}
+EOCP
+if $cc $ccflags -o errnolist errnolist.c $libs >/dev/null 2>&1 ; then
+ echo "It does."
+ errnolist=''
+ errnolist_SH=''
+ errnolist_a=''
+ errnolist_c=''
+ errnolist_o=''
+else
+ echo "I'll make sure your Makefile provides sys_errnolist in $errnolist.c"
+ errnolist_SH=$errnolist.SH
+ errnolist_a=$errnolist$_a
+ errnolist_c=$errnolist.c
+ errnolist_o=$errnolist$_o
+fi
+@end
+
diff --git a/mcon/U/etc.U b/mcon/U/etc.U
new file mode 100644
index 0000000..a53c2f6
--- /dev/null
+++ b/mcon/U/etc.U
@@ -0,0 +1,42 @@
+?RCS: $Id$
+?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: etc.U,v $
+?RCS: Revision 3.0 1993/08/18 12:08:07 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:etc etcexp: Getfile Loc Oldconfig
+?MAKE: -pick add $@ %<
+?S:etc:
+?S: This variable holds the name of the directory in which the user wants
+?S: to put "administrative" executable images for the package in question.
+?S: It is most often a local directory such as /usr/local/etc. Programs
+?S: relying on this variable must be prepared to deal with ~name
+?S: substitutions.
+?S:.
+?S:etcexp:
+?S: This is the same as the etc variable, but is filename expanded at
+?S: configuration time, for convenient use in makefiles.
+?S:.
+: determine where administrative executables go
+case "$etc" in
+'')
+ dflt=`./loc . /local/etc /usr/local/etc /local/etc /usr/etc /etc`
+ ;;
+*)
+ dflt="$etc"
+ ;;
+esac
+fn=d~
+rp='Where should the administrative executables go?'
+. ./getfile
+etc="$ans"
+etcexp="$ansexp"
+
diff --git a/mcon/U/fieldn.U b/mcon/U/fieldn.U
new file mode 100644
index 0000000..0270a93
--- /dev/null
+++ b/mcon/U/fieldn.U
@@ -0,0 +1,82 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: Findhdr.U,v $
+?RCS: Revision 3.0.1.2 1994/10/29 15:53:08 ram
+?RCS: patch36: added ?F: line for metalint file checking
+?RCS:
+?RCS: Revision 3.0.1.1 1994/05/06 14:03:56 ram
+?RCS: patch23: cppminus must be after other cppflags, not before
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:04:54 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:fieldn cppfilter: grep test tr rm cat startsh \
+ cppstdin cppminus osname
+?MAKE: -pick add $@ %<
+?S:fieldn:
+?S: This variable is used internally by Configure. It contains the position
+?S: of the included file name in cpp output. That is to say, when cpp
+?S: pre-processes a #include <file> line, it replaces it by a # line which
+?S: contains the original position in the input file and the full name of
+?S: included file, between "quotes".
+?S:.
+?S:cppfilter:
+?S: This variable is used internally by Configure. It either contains
+?S: nothing or a shell piping stage to translate path components into "/".
+?S: It is meant to be used as "... | $cppfilter $grep ..." i.e. without any
+?S: explicit "|" character following it.
+?S:.
+?F:!fieldn
+?T:pos testaccess cline
+: determine filename position in cpp output
+echo " "
+echo "Computing filename position in cpp output for #include directives..." >&4
+echo '#include <stdio.h>' > foo.c
+case "$osname" in
+vos)
+ testaccess=-e
+?X: VOS: path component separator is >
+ cppfilter="tr '\\\\>' '/' |"
+ ;;
+*)
+ testaccess=-r
+ cppfilter=''
+ ;;
+esac
+$cat >fieldn <<EOF
+$startsh
+$cppstdin $cppminus <foo.c 2>/dev/null | \
+$grep '^[ ]*#.*stdio\.h' | \
+while read cline; do
+ pos=1
+ set \$cline
+ while $test \$# -gt 0; do
+ if $test $testaccess \`echo \$1 | $tr -d '"'\`; then
+ echo "\$pos"
+ exit 0
+ fi
+ shift
+ pos=\`expr \$pos + 1\`
+ done
+done
+EOF
+chmod +x fieldn
+fieldn=`./fieldn`
+$rm -f foo.c fieldn
+case $fieldn in
+'') pos='???';;
+1) pos=first;;
+2) pos=second;;
+3) pos=third;;
+*) pos="${fieldn}th";;
+esac
+echo "Your cpp writes the filename in the $pos field of the line."
+
diff --git a/mcon/U/filexp_path.U b/mcon/U/filexp_path.U
new file mode 100644
index 0000000..0524ae9
--- /dev/null
+++ b/mcon/U/filexp_path.U
@@ -0,0 +1,30 @@
+?RCS: $Id$
+?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: filexp.U,v $
+?RCS: Revision 3.0 1993/08/18 12:08:08 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:filexp: privlib
+?MAKE: -pick add $@ %<
+?S:filexp:
+?S: This symbol contains the full pathname of the filexp script, in case we
+?S: are saving the script for posterity.
+?S:.
+: must not allow self reference
+case "$privlib" in
+ /*)
+ filexp=$privlib/filexp
+ ;;
+ *)
+ filexp=`pwd`/filexp
+ ;;
+esac
+
diff --git a/mcon/U/floatsize.U b/mcon/U/floatsize.U
new file mode 100644
index 0000000..71e2d06
--- /dev/null
+++ b/mcon/U/floatsize.U
@@ -0,0 +1,58 @@
+?RCS: $Id$
+?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: floatsize.U,v $
+?RCS: Revision 3.0.1.1 1994/10/29 16:17:09 ram
+?RCS: patch36: added ?F: line for metalint file checking
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:08:09 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:floatsize: cat rm Myread +cc +ccflags
+?MAKE: -pick add $@ %<
+?S:floatsize:
+?S: This variable contains the value of the FLOATSIZE symbol, which
+?S: indicates to the C program how many bytes there are in a float.
+?S:.
+?C:FLOATSIZE:
+?C: This symbol contains the size of a float, so that the C preprocessor
+?C: can make decisions based on it.
+?C:.
+?H:#define FLOATSIZE $floatsize /**/
+?H:.
+?F:!try
+: check for length of float
+echo " "
+case "$floatsize" in
+'')
+ echo "Checking to see how big your floating point numbers are..." >&4
+ $cat >try.c <<'EOCP'
+#include <stdio.h>
+int main()
+{
+ printf("%d\n", sizeof(float));
+}
+EOCP
+ if $cc $ccflags -o try try.c >/dev/null 2>&1 ; then
+ dflt=`./try`
+ else
+ dflt='4'
+ echo "(I can't seem to compile the test program. Guessing...)"
+ fi
+ ;;
+*)
+ dflt="$floatsize"
+ ;;
+esac
+rp="What is the size of a floating point number (in bytes)?"
+. ./myread
+floatsize="$ans"
+$rm -f try.c try
+
diff --git a/mcon/U/fpostype.U b/mcon/U/fpostype.U
new file mode 100644
index 0000000..b23bda0
--- /dev/null
+++ b/mcon/U/fpostype.U
@@ -0,0 +1,39 @@
+?RCS: $Id$
+?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: fpostype.U,v $
+?RCS: Revision 3.0.1.2 1994/08/29 16:20:52 ram
+?RCS: patch32: now uses new Typedef unit to compute type information
+?RCS:
+?RCS: Revision 3.0.1.1 1994/06/20 06:59:59 ram
+?RCS: patch30: created
+?RCS:
+?MAKE:fpostype: Myread Typedef
+?MAKE: -pick add $@ %<
+?S:fpostype:
+?S: This variable defines Fpos_t to be something like fpost_t, long,
+?S: uint, or whatever type is used to declare file positions in libc.
+?S:.
+?C:Fpos_t:
+?C: This symbol holds the type used to declare file positions in libc.
+?C: It can be fpos_t, long, uint, etc... It may be necessary to include
+?C: <sys/types.h> to get any typedef'ed information.
+?C:.
+?H:#define Fpos_t $fpostype /* File position type */
+?H:.
+: see what type file positions are declared as in the library
+set fpos_t fpostype long stdio.h sys/types.h
+eval $typedef
+echo " "
+dflt="$fpostype"
+rp="What is the type for file position used by fsetpos()?"
+. ./myread
+fpostype="$ans"
+
diff --git a/mcon/U/fpu.U b/mcon/U/fpu.U
new file mode 100644
index 0000000..7c5f2c8
--- /dev/null
+++ b/mcon/U/fpu.U
@@ -0,0 +1,73 @@
+?RCS: $Id$
+?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: fpu.U,v $
+?RCS: Revision 3.0 1993/08/18 12:08:10 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:fpu: test cat cc Myread
+?MAKE: -pick add $@ %<
+?S:fpu (fpunit):
+?S: Set to be the compile flag for the local floating point unit.
+?S:.
+?C:FPU (FPUNIT):
+?C: String containing the flags for the local floating point unit.
+?C:.
+?H:#define FPU "$fpu" /**/
+?H:.
+: see what floating point compile flags should be used.
+fpu=''
+if $test -r /dev/fpa; then
+ $cat>fpa.c << GOOP
+ main(){return(1);}
+GOOP
+ $cc -ffpa -o fpa fpa.c
+ fpa > fpa.out 2>&1
+ if $test ! -s fpa.out; then
+ dflt='y'
+ $cat <<'EOM'
+
+You seem to have a sun fpa... I can compile the code to use the fpa but it will
+mean that the code can ONLY run on a machine with a fpa...
+
+EOM
+ rp="Should I compile for fpa?"
+ . ./myread
+ if $test $ans = "n"; then
+ fpu=''
+ else
+ fpu='-ffpa'
+ fi
+ else
+ $cat <<'EOM'
+
+You have the fpa device but I can't seem to use it. Maybe you should talk to
+your sysadmin about this. For now, I am not going to compile it in.
+
+EOM
+ fi
+fi
+if $test "$fpu" = ''; then
+ if $test -r /usr/etc/mc68881version; then
+ dflt='y'
+ $cat <<'EOM'
+
+There also seems to be the pieces for a 68881. If I compile this in, it will
+work on almost all Sun 3's except for a few Sun-3/50s without a 68881...
+
+EOM
+ rp="Should I compile for a 68881?"
+ . ./myread
+ if $test $ans = "y"; then
+ fpu='-f68881'
+ fi
+ fi
+fi
+
diff --git a/mcon/U/gccvers.U b/mcon/U/gccvers.U
new file mode 100644
index 0000000..702a5e9
--- /dev/null
+++ b/mcon/U/gccvers.U
@@ -0,0 +1,110 @@
+?RCS: $Id$
+?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: Copyright (c) 2000, Jarkko Hietaniemi
+?RCS:
+?MAKE:gccversion gccosandvers: cat cpp rm +cc \
+ Myread Guess Options Oldconfig Loc osname osvers grep ccname
+?MAKE: -pick add $@ %<
+?S:gccversion:
+?S: If GNU cc (gcc) is used, this variable holds '1' or '3' (for instance)
+?S: to indicate whether the compiler is version 1 or 3. This is used in
+?S: setting some of the default cflags. It is set to '' if not gcc.
+?S:.
+?S:gccosandvers:
+?S: If GNU cc (gcc) is used, this variable the operating system and
+?S: version used to compile the gcc. It is set to '' if not gcc,
+?S: or if nothing useful can be parsed as the os version.
+?S:.
+?T:gccshortvers incdir d
+?F:!try.c !try
+?LINT:extern locincpth ccflags ldflags
+?LINT:change locincpth ccname cpp
+: Check whether they have gcc in any guise.
+echo " "
+echo "Checking for GNU cc in disguise and/or its version number..." >&4
+$cat >try.c <<EOM
+int main(void) {
+#ifdef __GNUC__
+gcc_version_major __GNUC__
+#ifdef __GNUC_MINOR__
+gcc_version_minor __GNUC__
+#endif
+#ifdef __GNUC_PATCHLEVEL__
+gcc_version_patchlevel __GNUC_PATCHLEVEL__
+#endif
+#endif
+}
+EOM
+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."
+ ccname=gcc
+ ;;
+ esac
+else
+ gccversion=''
+fi
+$rm -f try try.*
+case "$gccversion" in
+1*) cpp=`./loc gcc-cpp $cpp $pth` ;;
+esac
+case "$gccversion" in
+'') gccosandvers='' ;;
+*) gccshortvers=`echo "$gccversion"|sed 's/ .*//'`
+ gccosandvers=`$cc -v 2>&1 | \
+ $grep '/specs$'|sed "s!.*/[^-/]*-[^-/]*-\([^-/]*\)/$gccshortvers/specs!\1!"`
+ gccshortvers=''
+ case "$gccosandvers" in
+ $osname) gccosandvers='' ;; # linux gccs seem to have no linux osvers, grr
+ $osname$osvers) ;; # looking good
+ $osname*) cat <<EOM >&4
+
+*** WHOA THERE!!! ***
+
+ Your gcc has not been compiled for the exact release of
+ your operating system ($gccosandvers versus $osname$osvers).
+
+ In general it is a good idea to keep gcc synchronized with
+ the operating system because otherwise serious problems
+ may ensue when trying to compile software, like Perl.
+
+ I'm trying to be optimistic here, though, and will continue.
+ If later during the configuration and build icky compilation
+ problems appear (headerfile conflicts being the most common
+ manifestation), I suggest reinstalling the gcc to match
+ your operating system release.
+
+EOM
+ ;;
+ *) gccosandvers='' ;; # failed to parse, better be silent
+ esac
+ ;;
+esac
+case "$ccname" in
+'') ccname="$cc" ;;
+esac
+
+: gcc 3.1 complains about adding -Idirectories that it already knows about,
+: so we will take those off from locincpth.
+case "$gccversion" in
+3*)
+ echo "main(){}">try.c
+ for incdir in `$cc -v -c try.c 2>&1 | \
+ sed '1,/^#include <\.\.\.>/d;/^End of search list/,$d;s/^ //'` ; do
+ locincpth=`echo $locincpth | sed s!$incdir!!`
+ done
+ $rm -f try try.*
+esac
+
diff --git a/mcon/U/gidtype.U b/mcon/U/gidtype.U
new file mode 100644
index 0000000..c72d52c
--- /dev/null
+++ b/mcon/U/gidtype.U
@@ -0,0 +1,61 @@
+?RCS: $Id$
+?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: gidtype.U,v $
+?RCS: Revision 3.0.1.3 1994/08/29 16:21:44 ram
+?RCS: patch32: now uses new Typedef unit to compute type information
+?RCS: patch32: removed useless usage of Setvar (for now)
+?RCS:
+?RCS: Revision 3.0.1.2 1994/05/13 15:21:07 ram
+?RCS: patch27: added lint hint
+?RCS:
+?RCS: Revision 3.0.1.1 1994/05/06 15:01:51 ram
+?RCS: patch23: protected gidtype setting via setvar (ADO)
+?RCS: patch23: made Gid_t comment more explicit (ADO)
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:08:11 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:gidtype: Myread Typedef Findhdr
+?MAKE: -pick add $@ %<
+?S:gidtype:
+?S: This variable defines Gid_t to be something like gid_t, int,
+?S: ushort, or whatever type is used to declare the return type
+?S: of getgid(). Typically, it is the type of group ids in the kernel.
+?S:.
+?C:Gid_t (GIDTYPE):
+?C: This symbol holds the return type of getgid() and the type of
+?C: argument to setrgid() and related functions. Typically,
+?C: it is the type of group ids in the kernel. It can be int, ushort,
+?C: uid_t, etc... It may be necessary to include <sys/types.h> to get
+?C: any typedef'ed information.
+?C:.
+?H:#define Gid_t $gidtype /* Type for getgid(), etc... */
+?H:.
+?T:xxx
+: see what type gids are declared as in the kernel
+set gid_t gidtype xxx stdio.h sys/types.h
+eval $typedef
+case "$gidtype" in
+xxx)
+ xxx=`./findhdr sys/user.h`
+ set `grep 'groups\[NGROUPS\];' "$xxx" 2>/dev/null` unsigned short
+ case $1 in
+ unsigned) dflt="$1 $2" ;;
+ *) dflt="$1" ;;
+ esac
+ ;;
+*) dflt="$gidtype";;
+esac
+echo " "
+rp="What is the type for group ids returned by getgid()?"
+. ./myread
+gidtype="$ans"
+
diff --git a/mcon/U/groupstype.U b/mcon/U/groupstype.U
new file mode 100644
index 0000000..1a73af8
--- /dev/null
+++ b/mcon/U/groupstype.U
@@ -0,0 +1,63 @@
+?RCS: $Id$
+?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: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
+?RCS:
+?RCS: $Log: groupstype.U,v $
+?RCS: Revision 3.0.1.2 1994/10/29 16:18:08 ram
+?RCS: patch36: no longer uses Setvar to set 'groupstype' (ADO)
+?RCS: patch36: typo fix in the word 'argument' (ADO)
+?RCS:
+?RCS: Revision 3.0.1.1 1994/06/20 07:00:18 ram
+?RCS: patch30: created by ADO
+?RCS:
+?MAKE:groupstype: gidtype d_getgrps Myread Oldconfig Findhdr cat d_setgrps
+?MAKE: -pick add $@ %<
+?INIT:groupstype=''
+?S:groupstype:
+?S: This variable defines Groups_t to be something like gid_t, int,
+?S: ushort, or whatever type is used for the second argument to
+?S: getgroups() and setgroups(). Usually, this is the same as
+?S: gidtype (gid_t), but sometimes it isn't.
+?S:.
+?C:Groups_t (GROUPSTYPE):
+?C: This symbol holds the type used for the second argument to
+?C: getgroups() and setgroups(). Usually, this is the same as
+?C: gidtype (gid_t) , but sometimes it isn't.
+?C: It can be int, ushort, gid_t, etc...
+?C: It may be necessary to include <sys/types.h> to get any
+?C: typedef'ed information. This is only required if you have
+?C: getgroups() or setgroups()..
+?C:.
+?H:?%<:#if defined(HAS_GETGROUPS) || defined(HAS_SETGROUPS)
+?H:?%<:#define Groups_t $groupstype /* Type for 2nd arg to [sg]etgroups() */
+?H:?%<:#endif
+?H:.
+?W:%<:getgroups HAS_GETGROUPS setgroups HAS_SETGROUPS
+: Find type of 2nd arg to 'getgroups()' and 'setgroups()'
+echo " "
+case "$d_getgrps$d_setgrps" in
+*define*)
+ case "$groupstype" in
+ '') dflt="$gidtype" ;;
+ *) dflt="$groupstype" ;;
+ esac
+ $cat <<EOM
+What type of pointer is the second argument to getgroups() and setgroups()?
+Usually this is the same as group ids, $gidtype, but not always.
+
+EOM
+ rp='What type pointer is the second argument to getgroups() and setgroups()?'
+ . ./myread
+ groupstype="$ans"
+ ;;
+*) groupstype="$gidtype";;
+esac
+
diff --git a/mcon/U/h_fcntl.U b/mcon/U/h_fcntl.U
new file mode 100644
index 0000000..db958ea
--- /dev/null
+++ b/mcon/U/h_fcntl.U
@@ -0,0 +1,23 @@
+?RCS: $Id$
+?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: h_fcntl.U,v $
+?RCS: Revision 3.0 1993/08/18 12:08:12 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:h_fcntl: Nothing
+?MAKE: -pick add $@ %<
+?S:h_fcntl:
+?S: This is variable gets set in various places to tell i_fcntl that
+?S: <fcntl.h> should be included.
+?S:.
+: Initialize h_fcntl
+h_fcntl=false
+
diff --git a/mcon/U/h_sysfile.U b/mcon/U/h_sysfile.U
new file mode 100644
index 0000000..1466676
--- /dev/null
+++ b/mcon/U/h_sysfile.U
@@ -0,0 +1,23 @@
+?RCS: $Id$
+?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: h_sysfile.U,v $
+?RCS: Revision 3.0 1993/08/18 12:08:13 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:h_sysfile: Nothing
+?MAKE: -pick add $@ %<
+?S:h_sysfile:
+?S: This is variable gets set in various places to tell i_sys_file that
+?S: <sys/file.h> should be included.
+?S:.
+: Initialize h_sysfile
+h_sysfile=false
+
diff --git a/mcon/U/i_alloca.U b/mcon/U/i_alloca.U
new file mode 100644
index 0000000..038b087
--- /dev/null
+++ b/mcon/U/i_alloca.U
@@ -0,0 +1,36 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 2011, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:i_alloca: Trylink cat
+?MAKE: -pick add $@ %<
+?S:i_alloca:
+?S: This variable conditionally defines the I_ALLOCA symbol, which
+?S: indicates to the C program that <alloca.h> exists and should
+?S: be included.
+?S:.
+?C:I_ALLOCA:
+?C: This symbol, if defined, indicates that <alloca.h> exists and should
+?C: be included.
+?C:.
+?H:#$i_alloca I_ALLOCA /**/
+?H:.
+?LINT:set i_alloca
+: see if alloca.h is available
+$cat >try.c <<EOC
+#include <alloca.h>
+int main(void)
+{
+ void *ret = alloca(1);
+ return (unsigned long) ret & 0x1;
+}
+EOC
+set i_alloca
+eval $trylink
+
diff --git a/mcon/U/i_arpainet.U b/mcon/U/i_arpainet.U
new file mode 100644
index 0000000..f3a322e
--- /dev/null
+++ b/mcon/U/i_arpainet.U
@@ -0,0 +1,31 @@
+?RCS: $Id$
+?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: i_arpainet.U,v $
+?RCS: Revision 3.0 1993/08/18 12:08:15 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:i_arpainet: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_arpainet:
+?S: This variable conditionally defines the I_ARPA_INET symbol,
+?S: and indicates whether a C program should include <arpa/inet.h>.
+?S:.
+?C:I_ARPA_INET:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <arpa/inet.h> to get inet_addr and friends declarations.
+?C:.
+?H:#$i_arpainet I_ARPA_INET /**/
+?H:.
+?LINT:set i_arpainet
+: see if arpa/inet.h has to be included
+set arpa/inet.h i_arpainet
+eval $inhdr
+
diff --git a/mcon/U/i_db.U b/mcon/U/i_db.U
new file mode 100644
index 0000000..dad068e
--- /dev/null
+++ b/mcon/U/i_db.U
@@ -0,0 +1,146 @@
+?RCS: $Id$
+?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: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
+?RCS:
+?RCS: $Log: i_db.U,v $
+?RCS: Revision 3.0.1.3 1995/07/25 14:10:22 ram
+?RCS: patch56: conditionally use const in test programs (ADO)
+?RCS:
+?RCS: Revision 3.0.1.2 1995/05/12 12:14:42 ram
+?RCS: patch54: extended for more intimate DB probing (ADO)
+?RCS:
+?RCS: Revision 3.0.1.1 1994/08/29 16:21:50 ram
+?RCS: patch32: created by ADO
+?RCS:
+?MAKE:i_db db_hashtype db_prefixtype: Inhdr +cc +ccflags rm_try contains cat \
+ d_const
+?MAKE: -pick add $@ %<
+?S:i_db:
+?S: This variable conditionally defines the I_DB symbol, and indicates
+?S: whether a C program may include Berkeley's DB include file <db.h>.
+?S:.
+?S:db_hashtype:
+?S: This variable contains the type of the hash structure element
+?S: in the <db.h> header file. In older versions of DB, it was
+?S: int, while in newer ones it is u_int32_t.
+?S:.
+?S:db_prefixtype:
+?S: This variable contains the type of the prefix structure element
+?S: in the <db.h> header file. In older versions of DB, it was
+?S: int, while in newer ones it is size_t.
+?S:.
+?C:I_DB:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include Berkeley's DB include file <db.h>.
+?C:.
+?C:DB_Prefix_t:
+?C: This symbol contains the type of the prefix structure element
+?C: in the <db.h> header file. In older versions of DB, it was
+?C: int, while in newer ones it is u_int32_t.
+?C:.
+?C:DB_Hash_t:
+?C: This symbol contains the type of the prefix structure element
+?C: in the <db.h> header file. In older versions of DB, it was
+?C: int, while in newer ones it is size_t.
+?C:.
+?H:#$i_db I_DB /**/
+?H:#define DB_Hash_t $db_hashtype /**/
+?H:#define DB_Prefix_t $db_prefixtype /**/
+?H:.
+?LINT:set i_db
+: see if this is a db.h system
+set db.h i_db
+eval $inhdr
+
+@if DB_Hash_t
+case "$i_db" in
+define)
+ : Check the return type needed for hash
+ echo " "
+ echo "Checking return type needed for hash for Berkeley DB ..." >&4
+ $cat >try.c <<EOCP
+#$d_const HASCONST
+#ifndef HASCONST
+#define const
+#endif
+#include <sys/types.h>
+#include <db.h>
+u_int32_t hash_cb (ptr, size)
+const void *ptr;
+size_t size;
+{
+}
+HASHINFO info;
+int main()
+{
+ info.hash = hash_cb;
+}
+EOCP
+ if $cc $ccflags -c try.c >try.out 2>&1 ; then
+ if $contains warning try.out >>/dev/null 2>&1 ; then
+ db_hashtype='int'
+ else
+ db_hashtype='u_int32_t'
+ fi
+ else
+ echo "I can't seem to compile the test program." >&4
+ db_hashtype=int
+ fi
+ $rm_try
+ echo "Your version of Berkeley DB uses $db_hashtype for hash."
+ ;;
+*) db_hashtype=int
+ ;;
+esac
+
+@end
+@if DB_Prefix_t
+case "$i_db" in
+define)
+ : Check the return type needed for prefix
+ echo " "
+ echo "Checking return type needed for prefix for Berkeley DB ..." >&4
+ cat >try.c <<EOCP
+#$d_const HASCONST
+#ifndef HASCONST
+#define const
+#endif
+#include <sys/types.h>
+#include <db.h>
+size_t prefix_cb (key1, key2)
+const DBT *key1;
+const DBT *key2;
+{
+}
+BTREEINFO info;
+int main()
+{
+ info.prefix = prefix_cb;
+}
+EOCP
+ if $cc $ccflags -c try.c >try.out 2>&1 ; then
+ if $contains warning try.out >>/dev/null 2>&1 ; then
+ db_prefixtype='int'
+ else
+ db_prefixtype='size_t'
+ fi
+ else
+ echo "I can't seem to compile the test program." >&4
+ db_prefixtype='int'
+ fi
+ $rm_try
+ echo "Your version of Berkeley DB uses $db_prefixtype for prefix."
+ ;;
+*) db_prefixtype='int'
+ ;;
+esac
+
+@end
diff --git a/mcon/U/i_dbm.U b/mcon/U/i_dbm.U
new file mode 100644
index 0000000..e59737e
--- /dev/null
+++ b/mcon/U/i_dbm.U
@@ -0,0 +1,97 @@
+?RCS: $Id$
+?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: i_dbm.U,v $
+?RCS: Revision 3.0.1.2 1997/02/28 15:48:20 ram
+?RCS: patch61: added I_RPCSVC_DBM check
+?RCS:
+?RCS: Revision 3.0.1.1 1995/05/12 12:16:05 ram
+?RCS: patch54: made more robust by checking both header and lib (ADO)
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:08:15 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:i_dbm i_rpcsvcdbm: Inhdr Trylink Setvar cat
+?MAKE: -pick add $@ %<
+?S:i_dbm (d_odbm):
+?S: This variable conditionally defines the I_DBM symbol, which
+?S: indicates to the C program that <dbm.h> exists and should
+?S: be included.
+?S:.
+?S:i_rpcsvcdbm:
+?S: This variable conditionally defines the I_RPCSVC_DBM symbol, which
+?S: indicates to the C program that <rpcsvc/dbm.h> exists and should
+?S: be included. Some System V systems might need this instead of <dbm.h>.
+?S:.
+?C:I_DBM (HAS_ODBM ODBM):
+?C: This symbol, if defined, indicates that <dbm.h> exists and should
+?C: be included.
+?C:.
+?C:I_RPCSVC_DBM:
+?C: This symbol, if defined, indicates that <rpcsvc/dbm.h> exists and
+?C: should be included.
+?C:.
+?H:#$i_dbm I_DBM /**/
+?H:#$i_rpcsvcdbm I_RPCSVC_DBM /**/
+?H:.
+?T:d_dbmclose
+?LINT:set i_dbm i_rpcsvcdbm
+: see if dbm.h is available
+?X: We might just have the header, not the library.
+?X: We look for dbmclose() rather than dbminit() because
+?X: some versions of SCO Unix have -ldbm, but are missing dbmclose(). -- ADO
+?X: Some System V systems have <rpcsvc/dbm.h> instead of <dbm.h>.
+: see if dbmclose exists
+$cat >try.c <<EOC
+#include <dbm.h>
+int main(void)
+{
+ dbmclose();
+ return 0;
+}
+EOC
+set d_dbmclose
+eval $trylink
+
+case "$d_dbmclose" in
+$define)
+ val="$undef"
+ set i_rpcsvcdbm
+ eval $setvar
+
+ val="$define"
+ set i_dbm
+ eval $setvar
+ ;;
+*)
+ echo " "
+ echo "Hmm... trying to include <rpcsvc/dbm.h> to get dbmclose()..." >&4
+ $cat >try.c <<EOC
+#include <rpcsvc/dbm.h>
+int main(void)
+{
+ static int ret;
+ ret |= dbmclose();
+ return ret ? 0 : 1;
+}
+EOC
+ set d_dbmclose
+ eval $trylink
+
+ val="$d_dbmclose"
+ set i_rpcsvcdbm
+ eval $setvar
+
+ val="$undef"
+ set i_dbm
+ eval $setvar
+ ;;
+esac
+
diff --git a/mcon/U/i_dirent.U b/mcon/U/i_dirent.U
new file mode 100644
index 0000000..9a4b017
--- /dev/null
+++ b/mcon/U/i_dirent.U
@@ -0,0 +1,146 @@
+?RCS: $Id$
+?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: i_dirent.U,v $
+?RCS: Revision 3.0.1.4 1994/10/29 16:20:01 ram
+?RCS: patch36: failed scanning for 'd_namlen' with missing <dirent.h> (ADO)
+?RCS:
+?RCS: Revision 3.0.1.3 1994/06/20 07:01:25 ram
+?RCS: patch30: added direntrytype for hints, merely for NeXT (ADO)
+?RCS: patch30: now checks for both struct dirent and direct (ADO)
+?RCS:
+?RCS: Revision 3.0.1.2 1994/05/13 15:22:37 ram
+?RCS: patch27: new variable direntrytype for proper type setting (ADO)
+?RCS:
+?RCS: Revision 3.0.1.1 1994/01/24 14:11:15 ram
+?RCS: patch16: added new Direntry_t pseudo-type for directory entries
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:08:17 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: This unit looks whether there is a dirent system or not
+?X:
+?MAKE:i_dirent d_dirnamlen direntrytype: test contains Setvar \
+ Myread Findhdr cppstdin cppflags cppminus rm_try
+?MAKE: -pick add $@ %<
+?S:i_dirent:
+?S: This variable conditionally defines I_DIRENT, which indicates
+?S: to the C program that it should include <dirent.h>.
+?S:.
+?S:d_dirnamlen:
+?S: This variable conditionally defines DIRNAMLEN, which indicates
+?S: to the C program that the length of directory entry names is
+?S: provided by a d_namelen field.
+?S:.
+?S:direntrytype:
+?S: This symbol is set to 'struct direct' or 'struct dirent' depending on
+?S: whether dirent is available or not. You should use this pseudo type to
+?S: portably declare your directory entries.
+?S:.
+?C:I_DIRENT:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <dirent.h>. Using this symbol also triggers the definition
+?C: of the Direntry_t define which ends up being 'struct dirent' or
+?C: 'struct direct' depending on the availability of <dirent.h>.
+?C:.
+?C:DIRNAMLEN:
+?C: This symbol, if defined, indicates to the C program that the length
+?C: of directory entry names is provided by a d_namlen field. Otherwise
+?C: you need to do strlen() on the d_name field.
+?C:.
+?C:Direntry_t:
+?C: This symbol is set to 'struct direct' or 'struct dirent' depending on
+?C: whether dirent is available or not. You should use this pseudo type to
+?C: portably declare your directory entries.
+?C:.
+?H:#$i_dirent I_DIRENT /**/
+?H:#$d_dirnamlen DIRNAMLEN /**/
+?H:?%<:@if I_DIRENT && Direntry_t
+?H:?%<:#define Direntry_t $direntrytype
+?H:?%<:@end
+?H:.
+?T:xinc guess1 guess2
+?LINT:set i_dirent d_dirnamlen
+: see if this is a dirent system
+echo " "
+if xinc=`./findhdr dirent.h`; $test "$xinc"; then
+ val="$define"
+ echo "<dirent.h> found." >&4
+else
+ val="$undef"
+ if xinc=`./findhdr sys/dir.h`; $test "$xinc"; then
+ echo "<sys/dir.h> found." >&4
+ echo " "
+ else
+ xinc=`./findhdr sys/ndir.h`
+ fi
+ echo "<dirent.h> NOT found." >&4
+fi
+set i_dirent
+eval $setvar
+
+?X: Use struct dirent or struct direct? If we're using dirent.h,
+?X: it's probably struct dirent, but apparently not always.
+?X: Assume $xinc still contains the name of the header file we're using.
+@if direntrytype || Direntry_t
+: Look for type of directory structure.
+echo " "
+$cppstdin $cppflags $cppminus < "$xinc" > try.c
+
+case "$direntrytype" in
+''|' ')
+ case "$i_dirent" in
+ $define) guess1='struct dirent' ;;
+ *) guess1='struct direct' ;;
+ esac
+ ;;
+*) guess1="$direntrytype"
+ ;;
+esac
+
+case "$guess1" in
+'struct dirent') guess2='struct direct' ;;
+*) guess2='struct dirent' ;;
+esac
+
+if $contains "$guess1" try.c >/dev/null 2>&1; then
+ direntrytype="$guess1"
+ echo "Your directory entries are $direntrytype." >&4
+elif $contains "$guess2" try.c >/dev/null 2>&1; then
+ direntrytype="$guess2"
+ echo "Your directory entries seem to be $direntrytype." >&4
+else
+ echo "I don't recognize your system's directory entries." >&4
+ rp="What type is used for directory entries on this system?"
+ dflt="$guess1"
+ . ./myread
+ direntrytype="$ans"
+fi
+$rm_try
+
+@end
+
+@if d_dirnamlen || DIRNAMLEN
+: see if the directory entry stores field length
+echo " "
+$cppstdin $cppflags $cppminus < "$xinc" > try.c
+if $contains 'd_namlen' try.c >/dev/null 2>&1; then
+ echo "Good, your directory entry keeps length information in d_namlen." >&4
+ val="$define"
+else
+ echo "Your directory entry does not know about the d_namlen field." >&4
+ val="$undef"
+fi
+set d_dirnamlen
+eval $setvar
+$rm_try
+
+@end
diff --git a/mcon/U/i_dld.U b/mcon/U/i_dld.U
new file mode 100644
index 0000000..cd2e3b1
--- /dev/null
+++ b/mcon/U/i_dld.U
@@ -0,0 +1,34 @@
+?RCS: $Id$
+?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: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
+?RCS:
+?RCS: $Log: i_dld.U,v $
+?RCS: Revision 3.0.1.1 1994/10/29 16:20:07 ram
+?RCS: patch36: created by ADO
+?RCS:
+?MAKE:i_dld: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_dld:
+?S: This variable conditionally defines the I_DLD symbol, which
+?S: indicates to the C program that <dld.h> (GNU dynamic loading)
+?S: exists and should be included.
+?S:.
+?C:I_DLD:
+?C: This symbol, if defined, indicates that <dld.h> exists and should
+?C: be included before using GNU dynamic loading features.
+?C:.
+?H:#$i_dld I_DLD /**/
+?H:.
+?LINT:set i_dld
+: see if dld is available
+set dld.h i_dld
+eval $inhdr
+
diff --git a/mcon/U/i_dlfcn.U b/mcon/U/i_dlfcn.U
new file mode 100644
index 0000000..a378c7f
--- /dev/null
+++ b/mcon/U/i_dlfcn.U
@@ -0,0 +1,34 @@
+?RCS: $Id$
+?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: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
+?RCS:
+?RCS: $Log: i_dlfcn.U,v $
+?RCS: Revision 3.0.1.1 1994/08/29 16:21:53 ram
+?RCS: patch32: created by ADO
+?RCS:
+?MAKE:i_dlfcn: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_dlfcn:
+?S: This variable conditionally defines the I_DLFCN symbol, which
+?S: indicates to the C program that <dlfcn.h> exists and should
+?S: be included.
+?S:.
+?C:I_DLFCN:
+?C: This symbol, if defined, indicates that <dlfcn.h> exists and should
+?C: be included.
+?C:.
+?H:#$i_dlfcn I_DLFCN /**/
+?H:.
+?LINT:set i_dlfcn
+: see if dlfcn is available
+set dlfcn.h i_dlfcn
+eval $inhdr
+
diff --git a/mcon/U/i_execinfo.U b/mcon/U/i_execinfo.U
new file mode 100644
index 0000000..e6322bc
--- /dev/null
+++ b/mcon/U/i_execinfo.U
@@ -0,0 +1,27 @@
+?RCS: $Id: i_execinfo.U 34 2010-11-27 11:55:39Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 2011, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:i_execinfo: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_execinfo:
+?S: This variable conditionally defines the I_EXECINFO symbol, and indicates
+?S: whether a C program may include <execinfo.h>, for backtrace() support.
+?S:.
+?C:I_EXECINFO:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <execinfo.h> for backtrace() support.
+?C:.
+?H:#$i_execinfo I_EXECINFO /**/
+?H:.
+?LINT:set i_execinfo
+: see if this is an execinfo.h system
+set execinfo.h i_execinfo
+eval $inhdr
+
diff --git a/mcon/U/i_fcntl.U b/mcon/U/i_fcntl.U
new file mode 100644
index 0000000..d7b3d24
--- /dev/null
+++ b/mcon/U/i_fcntl.U
@@ -0,0 +1,61 @@
+?RCS: $Id$
+?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: i_fcntl.U,v $
+?RCS: Revision 3.0 1993/08/18 12:08:18 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:i_fcntl: h_fcntl h_sysfile +i_sysfile Inhdr Setvar
+?MAKE: -pick add $@ %<
+?S:i_fcntl:
+?S: This variable controls the value of I_FCNTL (which tells
+?S: the C program to include <fcntl.h>).
+?S:.
+?C:I_FCNTL (HDR_O_STUFF FCNTL):
+?C: This manifest constant tells the C program to include <fcntl.h>.
+?C:.
+?H:#$i_fcntl I_FCNTL /**/
+?H:.
+?T:val
+?X: Make line lists +i_sysfile to ensure tests for <sys/file.h> will be
+?X: conducted prior tests for <fcntl.h>, hence making sure the h_sysfile
+?X: variable is correctly set when we reach that unit.
+?LINT:set i_fcntl
+?LINT:use i_sysfile
+?LINT:change h_fcntl
+: see if fcntl.h is there
+val=''
+set fcntl.h val
+eval $inhdr
+
+: see if we can include fcntl.h
+case "$val" in
+"$define")
+ echo " "
+ if $h_fcntl; then
+ val="$define"
+ echo "We'll be including <fcntl.h>." >&4
+ else
+ val="$undef"
+ if $h_sysfile; then
+ echo "We don't need to include <fcntl.h> if we include <sys/file.h>." >&4
+ else
+ echo "We won't be including <fcntl.h>." >&4
+ fi
+ fi
+ ;;
+*)
+ h_fcntl=false
+ val="$undef"
+ ;;
+esac
+set i_fcntl
+eval $setvar
+
diff --git a/mcon/U/i_float.U b/mcon/U/i_float.U
new file mode 100644
index 0000000..73951bb
--- /dev/null
+++ b/mcon/U/i_float.U
@@ -0,0 +1,35 @@
+?RCS: $Id$
+?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: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
+?RCS:
+?RCS: $Log: i_float.U,v $
+?RCS: Revision 3.0.1.1 1994/08/29 16:21:57 ram
+?RCS: patch32: created by ADO
+?RCS:
+?MAKE:i_float: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_float:
+?S: This variable conditionally defines the I_FLOAT symbol, and indicates
+?S: whether a C program may include <float.h> to get symbols like DBL_MAX
+?S: or DBL_MIN, i.e. machine dependent floating point values.
+?S:.
+?C:I_FLOAT:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <float.h> to get definition of symbols like DBL_MAX or
+?C: DBL_MIN, i.e. machine dependent floating point values.
+?C:.
+?H:#$i_float I_FLOAT /**/
+?H:.
+?LINT:set i_float
+: see if this is a float.h system
+set float.h i_float
+eval $inhdr
+
diff --git a/mcon/U/i_gdbm.U b/mcon/U/i_gdbm.U
new file mode 100644
index 0000000..69755ba
--- /dev/null
+++ b/mcon/U/i_gdbm.U
@@ -0,0 +1,46 @@
+?RCS: $Id$
+?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: i_gdbm.U,v $
+?RCS: Revision 3.0.1.1 1995/05/12 12:16:39 ram
+?RCS: patch54: made more robust by checking both header and lib (ADO)
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:08:19 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:i_gdbm: Trylink cat
+?MAKE: -pick add $@ %<
+?S:i_gdbm (d_gdbm):
+?S: This variable conditionally defines the I_GDBM symbol, which
+?S: indicates to the C program that <gdbm.h> exists and should
+?S: be included.
+?S:.
+?C:I_GDBM (HAS_GDBM):
+?C: This symbol, if defined, indicates that <gdbm.h> exists and should
+?C: be included.
+?C:.
+?H:#$i_gdbm I_GDBM /**/
+?H:.
+?LINT:set i_gdbm
+: see if gdbm.h is available
+$cat >try.c <<EOC
+#include <gdbm.h>
+void fatal_func(void) { return; };
+int main(void)
+{
+ GDBM_FILE ret;
+
+ ret = gdbm_open("name", 1, 2, 3, fatal_func);
+ return ret ? 0 : 1;
+}
+EOC
+set i_gdbm
+eval $trylink
+
diff --git a/mcon/U/i_grp.U b/mcon/U/i_grp.U
new file mode 100644
index 0000000..4d6ba4f
--- /dev/null
+++ b/mcon/U/i_grp.U
@@ -0,0 +1,31 @@
+?RCS: $Id$
+?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: i_grp.U,v $
+?RCS: Revision 3.0 1993/08/18 12:08:20 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:i_grp: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_grp:
+?S: This variable conditionally defines the I_GRP symbol, and indicates
+?S: whether a C program should include <grp.h>.
+?S:.
+?C:I_GRP:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <grp.h>.
+?C:.
+?H:#$i_grp I_GRP /**/
+?H:.
+?LINT:set i_grp
+: see if this is an grp system
+set grp.h i_grp
+eval $inhdr
+
diff --git a/mcon/U/i_iconv.U b/mcon/U/i_iconv.U
new file mode 100644
index 0000000..beb2356
--- /dev/null
+++ b/mcon/U/i_iconv.U
@@ -0,0 +1,31 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?X:
+?X: This unit looks whether <iconv.h> is available or not
+?X:
+?MAKE:i_iconv: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_iconv:
+?S: This variable conditionally defines I_ICONV, which indicates
+?S: to the C program that it should include <iconv.h>.
+?S:.
+?C:I_ICONV:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <iconv.h>.
+?C:.
+?H:#$i_iconv I_ICONV /**/
+?H:.
+?Y:BOTTOM
+?LINT:set i_iconv
+: see if this is a iconv.h system
+set iconv.h i_iconv
+eval $inhdr
+
diff --git a/mcon/U/i_ifaddrs.U b/mcon/U/i_ifaddrs.U
new file mode 100644
index 0000000..23ae0bd
--- /dev/null
+++ b/mcon/U/i_ifaddrs.U
@@ -0,0 +1,27 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:i_ifaddrs: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_ifaddrs:
+?S: This variable conditionally defines the I_IFADDRS symbol, and indicates
+?S: whether a C program should include <ifaddrs.h>.
+?S:.
+?C:I_IFADDRS:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <ifaddrs.h>.
+?C:.
+?H:#$i_ifaddrs I_IFADDRS /**/
+?H:.
+?LINT:set i_ifaddrs
+: see if this is a ifaddrs.h system
+set ifaddrs.h i_ifaddrs
+eval $inhdr
+
diff --git a/mcon/U/i_inttypes.U b/mcon/U/i_inttypes.U
new file mode 100644
index 0000000..fb02d0a
--- /dev/null
+++ b/mcon/U/i_inttypes.U
@@ -0,0 +1,35 @@
+?RCS: $Id$
+?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: i_sysun.U,v $
+?RCS: Revision 3.0 1993/08/18 12:08:42 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: This unit looks wether <inttypes.h> is available or not
+?X:
+?MAKE:i_inttypes: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_inttypes:
+?S: This variable conditionally defines I_INTTYPES, which indicates
+?S: to the C program that it should include <inttypes.h> to get
+?S: format conversions of integer types.
+?S:.
+?C:I_INTTYPES:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <inttypes.h> to get format conversions of integer types.
+?C:.
+?H:#$i_inttypes I_INTTYPES /**/
+?H:.
+?LINT:set i_inttypes
+: see if this is a inttypes.h system
+set inttypes.h i_inttypes
+eval $inhdr
+
diff --git a/mcon/U/i_invent.U b/mcon/U/i_invent.U
new file mode 100644
index 0000000..b60ab78
--- /dev/null
+++ b/mcon/U/i_invent.U
@@ -0,0 +1,27 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:i_invent: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_invent:
+?S: This variable conditionally defines the I_INVENT symbol, and indicates
+?S: whether a C program should include <invent.h>.
+?S:.
+?C:I_INVENT:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <invent.h>.
+?C:.
+?H:#$i_invent I_INVENT /**/
+?H:.
+?LINT:set i_invent
+: see if this is a invent.h system
+set invent.h i_invent
+eval $inhdr
+
diff --git a/mcon/U/i_langinfo.U b/mcon/U/i_langinfo.U
new file mode 100644
index 0000000..abc198d
--- /dev/null
+++ b/mcon/U/i_langinfo.U
@@ -0,0 +1,27 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:i_langinfo: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_langinfo:
+?S: This variable conditionally defines the I_LANGINFO symbol, and indicates
+?S: whether a C program should include <langinfo.h>.
+?S:.
+?C:I_LANGINFO:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <langinfo.h>.
+?C:.
+?H:#$i_langinfo I_LANGINFO /**/
+?H:.
+?LINT:set i_langinfo
+: see if this is a langinfo system
+set langinfo.h i_langinfo
+eval $inhdr
+
diff --git a/mcon/U/i_libcharset.U b/mcon/U/i_libcharset.U
new file mode 100644
index 0000000..01109f7
--- /dev/null
+++ b/mcon/U/i_libcharset.U
@@ -0,0 +1,27 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:i_libcharset: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_libcharset:
+?S: This variable conditionally defines the I_LIBCHARSET symbol, and indicates
+?S: whether a C program should include <libcharset.h>.
+?S:.
+?C:I_LIBCHARSET:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <libcharset.h>.
+?C:.
+?H:#$i_libcharset I_LIBCHARSET /**/
+?H:.
+?LINT:set i_libcharset
+: see if this is a libcharset system
+set libcharset.h i_libcharset
+eval $inhdr
+
diff --git a/mcon/U/i_libintl.U b/mcon/U/i_libintl.U
new file mode 100644
index 0000000..6df2988
--- /dev/null
+++ b/mcon/U/i_libintl.U
@@ -0,0 +1,27 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:i_libintl: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_libintl:
+?S: This variable conditionally defines the I_LIBINTL symbol, and indicates
+?S: whether a C program should include <libintl.h>.
+?S:.
+?C:I_LIBINTL:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <libintl.h>.
+?C:.
+?H:#$i_libintl I_LIBINTL /**/
+?H:.
+?LINT:set i_libintl
+: see if this is a libintl system
+set libintl.h i_libintl
+eval $inhdr
+
diff --git a/mcon/U/i_limits.U b/mcon/U/i_limits.U
new file mode 100644
index 0000000..2b9a998
--- /dev/null
+++ b/mcon/U/i_limits.U
@@ -0,0 +1,33 @@
+?RCS: $Id$
+?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: i_limits.U,v $
+?RCS: Revision 3.0 1993/08/18 12:08:20 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:i_limits: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_limits:
+?S: This variable conditionally defines the I_LIMITS symbol, and indicates
+?S: whether a C program may include <limits.h> to get symbols like WORD_BIT
+?S: and friends.
+?S:.
+?C:I_LIMITS:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <limits.h> to get definition of symbols like WORD_BIT or
+?C: LONG_MAX, i.e. machine dependant limitations.
+?C:.
+?H:#$i_limits I_LIMITS /**/
+?H:.
+?LINT:set i_limits
+: see if this is a limits.h system
+set limits.h i_limits
+eval $inhdr
+
diff --git a/mcon/U/i_linux_netlink.U b/mcon/U/i_linux_netlink.U
new file mode 100644
index 0000000..37a4790
--- /dev/null
+++ b/mcon/U/i_linux_netlink.U
@@ -0,0 +1,29 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 2011, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:i_linux_netlink: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_linux_netlink:
+?S: This variable conditionally defines the I_LINUX_NETLINK symbol, and
+?S: indicates whether a C program may include <linux/netlink.h> to define
+?S: the NLMSG_DATA() and other NLMSG_NEXT() macros.
+?S:.
+?C:I_LINUX_NETLINK:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <linux/netlink.h> to get definitions for the NLMSG_DATA() and
+?C: other NLMSG_NEXT() macros.
+?C:.
+?H:#$i_linux_netlink I_LINUX_NETLINK /**/
+?H:.
+?LINT:set i_linux_netlink
+: see if this is a linux/netlink.h system
+set linux/netlink.h i_linux_netlink
+eval $inhdr
+
diff --git a/mcon/U/i_linux_rtnetlink.U b/mcon/U/i_linux_rtnetlink.U
new file mode 100644
index 0000000..8d57ced
--- /dev/null
+++ b/mcon/U/i_linux_rtnetlink.U
@@ -0,0 +1,29 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 2011, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:i_linux_rtnetlink: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_linux_rtnetlink:
+?S: This variable conditionally defines the I_LINUX_RTNETLINK symbol, and
+?S: indicates whether a C program may include <linux/rtnetlink.h> to define
+?S: the RTA_DATA() and other RTA_NEXT() macros.
+?S:.
+?C:I_LINUX_RTNETLINK:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <linux/rtnetlink.h> to get definitions for the RTA_DATA() and
+?C: other RTA_NEXT() macros.
+?C:.
+?H:#$i_linux_rtnetlink I_LINUX_RTNETLINK /**/
+?H:.
+?LINT:set i_linux_rtnetlink
+: see if this is a linux/rtnetlink.h system
+set linux/rtnetlink.h i_linux_rtnetlink
+eval $inhdr
+
diff --git a/mcon/U/i_locale.U b/mcon/U/i_locale.U
new file mode 100644
index 0000000..deeeb44
--- /dev/null
+++ b/mcon/U/i_locale.U
@@ -0,0 +1,32 @@
+?RCS: $Id$
+?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 License,
+?RCS: as specified in the 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: i_locale.U,v $
+?RCS: Revision 3.0.1.1 1997/02/28 15:48:23 ram
+?RCS: patch61: created
+?RCS:
+?MAKE:i_locale: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_locale:
+?S: This variable conditionally defines the I_LOCALE symbol,
+?S: and indicates whether a C program should include <locale.h>.
+?S:.
+?C:I_LOCALE:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <locale.h>.
+?C:.
+?H:#$i_locale I_LOCALE /**/
+?H:.
+?LINT:set i_locale
+: see if locale.h is available
+set locale.h i_locale
+eval $inhdr
+
diff --git a/mcon/U/i_malloc.U b/mcon/U/i_malloc.U
new file mode 100644
index 0000000..0948c17
--- /dev/null
+++ b/mcon/U/i_malloc.U
@@ -0,0 +1,31 @@
+?RCS: $Id$
+?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: i_malloc.U,v $
+?RCS: Revision 3.0 1993/08/18 12:08:21 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:i_malloc: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_malloc:
+?S: This variable conditionally defines the I_MALLOC symbol, and indicates
+?S: whether a C program should include <malloc.h>.
+?S:.
+?C:I_MALLOC:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <malloc.h>.
+?C:.
+?H:#$i_malloc I_MALLOC /**/
+?H:.
+?LINT:set i_malloc
+: see if this is a malloc.h system
+set malloc.h i_malloc
+eval $inhdr
+
diff --git a/mcon/U/i_math.U b/mcon/U/i_math.U
new file mode 100644
index 0000000..057c3e9
--- /dev/null
+++ b/mcon/U/i_math.U
@@ -0,0 +1,52 @@
+?RCS: $Id$
+?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: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
+?RCS:
+?RCS: $Log: i_math.U,v $
+?RCS: Revision 3.0.1.1 1994/08/29 16:21:59 ram
+?RCS: patch32: created by ADO
+?RCS:
+?MAKE:i_math: Inhdr Trylink cat
+?MAKE: -pick add $@ %<
+?X: Are there really systems that *DON'T* have math.h?
+?S:i_math:
+?S: This variable conditionally defines the I_MATH symbol, and indicates
+?S: whether a C program may include <math.h>.
+?S:.
+?C:I_MATH:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <math.h>.
+?C:.
+?H:#$i_math I_MATH /**/
+?H:.
+?LINT:set i_math
+: see if this is a math.h system
+set math.h i_math
+eval $inhdr
+
+: see whether we need libm
+$cat >try.c <<EOC
+#$i_math I_MATH
+#ifdef I_MATH
+#include <math.h>
+#endif
+int main(void)
+{
+ static double ret;
+
+ ret += 1.2 * pow(1.2, 1.2);
+ ret += 1.2 * sqrt(ret);
+ return 0 != ret;
+}
+EOC
+set val '-lm'
+eval $trylink
+
diff --git a/mcon/U/i_memory.U b/mcon/U/i_memory.U
new file mode 100644
index 0000000..952e311
--- /dev/null
+++ b/mcon/U/i_memory.U
@@ -0,0 +1,65 @@
+?RCS: $Id$
+?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: i_memory.U,v $
+?RCS: Revision 3.0.1.3 1994/06/20 07:01:55 ram
+?RCS: patch30: cosmetic changes
+?RCS:
+?RCS: Revision 3.0.1.2 1994/05/13 15:23:56 ram
+?RCS: patch27: modified to avoid spurious Whoa warnings (ADO)
+?RCS:
+?RCS: Revision 3.0.1.1 1994/05/06 15:02:25 ram
+?RCS: patch23: avoid conflicts with <string.h>
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:08:22 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:i_memory: Inhdr strings cppstdin cppflags cppminus contains rm Setvar
+?MAKE: -pick add $@ %<
+?S:i_memory:
+?S: This variable conditionally defines the I_MEMORY symbol, and indicates
+?S: whether a C program should include <memory.h>.
+?S:.
+?C:I_MEMORY:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <memory.h>.
+?C:.
+?H:#$i_memory I_MEMORY /**/
+?H:.
+?LINT:set i_memory
+?X:
+?X: Unfortunately, the definitions of memory functions sometimes
+?X: conflict with those in <string.h>. We'll assume that if
+?X: <string.h> contains memcpy, then we don't need memory.h
+?X:
+: see if memory.h is available.
+val=''
+set memory.h val
+eval $inhdr
+
+: See if it conflicts with string.h
+case "$val" in
+$define)
+ case "$strings" in
+ '') ;;
+ *)
+ $cppstdin $cppflags $cppminus < $strings > mem.h
+ if $contains 'memcpy' mem.h >/dev/null 2>&1; then
+ echo " "
+ echo "We won't be including <memory.h>."
+ val="$undef"
+ fi
+ $rm -f mem.h
+ ;;
+ esac
+esac
+set i_memory
+eval $setvar
+
diff --git a/mcon/U/i_mswsock.U b/mcon/U/i_mswsock.U
new file mode 100644
index 0000000..2622f32
--- /dev/null
+++ b/mcon/U/i_mswsock.U
@@ -0,0 +1,27 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, 2010 Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:i_mswsock: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_mswsock:
+?S: This variable conditionally defines the I_MSWSOCK symbol, and indicates
+?S: whether a C program may include <Mswsock.h>.
+?S:.
+?C:I_MSWSOCK:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <Mswsock.h>.
+?C:.
+?H:#$i_mswsock I_MSWSOCK /**/
+?H:.
+?LINT:set i_mswsock
+: see if this is a mswsock.h system
+set mswsock.h i_mswsock
+eval $inhdr
+
diff --git a/mcon/U/i_ndbm.U b/mcon/U/i_ndbm.U
new file mode 100644
index 0000000..ac8f8e9
--- /dev/null
+++ b/mcon/U/i_ndbm.U
@@ -0,0 +1,49 @@
+?RCS: $Id$
+?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: i_ndbm.U,v $
+?RCS: Revision 3.0.1.1 1995/05/12 12:16:53 ram
+?RCS: patch54: made more robust by checking both header and lib (ADO)
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:08:23 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:i_ndbm: Inhdr Trylink Setvar cat
+?MAKE: -pick add $@ %<
+?S:i_ndbm (d_ndbm):
+?S: This variable conditionally defines the I_NDBM symbol, which
+?S: indicates to the C program that <ndbm.h> exists and should
+?S: be included.
+?S:.
+?C:I_NDBM (HAS_NDBM NDBM):
+?C: This symbol, if defined, indicates that <ndbm.h> exists and should
+?C: be included.
+?C:.
+?H:#$i_ndbm I_NDBM /**/
+?H:.
+?T:d_dbm_open
+?LINT:set i_ndbm
+: see if ndbm.h is available
+$cat >try.c <<EOC
+#include <ndbm.h>
+int main(void)
+{
+ static DBM *dbm;
+ dbm = dbm_open("file", 1, 2);
+ return dbm ? 0 : 1;
+}
+EOC
+set d_dbm_open
+eval $trylink
+
+val="$d_dbm_open"
+set i_ndbm
+eval $setvar
+
diff --git a/mcon/U/i_netdb.U b/mcon/U/i_netdb.U
new file mode 100644
index 0000000..a4ec000
--- /dev/null
+++ b/mcon/U/i_netdb.U
@@ -0,0 +1,27 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:i_netdb: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_netdb:
+?S: This variable conditionally defines the I_NETDB symbol, and indicates
+?S: whether a C program should include <netdb.h>.
+?S:.
+?C:I_NETDB:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <netdb.h>.
+?C:.
+?H:#$i_netdb I_NETDB /**/
+?H:.
+?LINT:set i_netdb
+: see if this is a netdb.h system
+set netdb.h i_netdb
+eval $inhdr
+
diff --git a/mcon/U/i_neterrno.U b/mcon/U/i_neterrno.U
new file mode 100644
index 0000000..7bc231d
--- /dev/null
+++ b/mcon/U/i_neterrno.U
@@ -0,0 +1,65 @@
+?RCS: $Id$
+?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: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
+?RCS:
+?RCS: $Log: i_neterrno.U,v $
+?RCS: Revision 3.0.1.3 1994/10/29 16:20:29 ram
+?RCS: patch36: forgot to initialize 'val' to an empty value (ADO)
+?RCS:
+?RCS: Revision 3.0.1.2 1994/08/29 16:22:10 ram
+?RCS: patch32: removed spurious echo
+?RCS:
+?RCS: Revision 3.0.1.1 1994/06/20 07:02:05 ram
+?RCS: patch30: created by ADO
+?RCS:
+?MAKE:i_neterrno: Inhdr +cc +ccflags rm_try Setvar
+?MAKE: -pick add $@ %<
+?S:i_neterrno:
+?S: This variable conditionally defines the I_NET_ERRNO symbol, which
+?S: indicates to the C program that <net/errno.h> exists and should
+?S: be included.
+?S:.
+?C:I_NET_ERRNO:
+?C: This symbol, if defined, indicates that <net/errno.h> exists and
+?C: should be included.
+?C:.
+?H:#$i_neterrno I_NET_ERRNO /**/
+?H:.
+?LINT:set i_neterrno
+: see if net/errno.h is available
+val=''
+set net/errno.h val
+eval $inhdr
+
+: Unfortunately, it causes problems on some systems. Arrgh.
+case "$val" in
+$define)
+ cat > try.c <<'EOM'
+#include <stdio.h>
+#include <errno.h>
+#include <net/errno.h>
+int func()
+{
+ return ENOTSOCK;
+}
+EOM
+ if $cc $ccflags -c try.c >/dev/null 2>&1; then
+ echo "We'll be including <net/errno.h>." >&4
+ else
+ echo "We won't be including <net/errno.h>." >&4
+ val="$undef"
+ fi
+ $rm_try
+ ;;
+esac
+set i_neterrno
+eval $setvar
+
diff --git a/mcon/U/i_netif.U b/mcon/U/i_netif.U
new file mode 100644
index 0000000..460daf1
--- /dev/null
+++ b/mcon/U/i_netif.U
@@ -0,0 +1,27 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:i_netif: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_netif:
+?S: This variable conditionally defines the I_NET_IF symbol, and indicates
+?S: whether a C program should include <net/if.h>.
+?S:.
+?C:I_NET_IF:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <net/if.h>.
+?C:.
+?H:#$i_netif I_NET_IF /**/
+?H:.
+?LINT:set i_netif
+: see if this is a net/if.h system
+set net/if.h i_netif
+eval $inhdr
+
diff --git a/mcon/U/i_netroute.U b/mcon/U/i_netroute.U
new file mode 100644
index 0000000..8c00e5a
--- /dev/null
+++ b/mcon/U/i_netroute.U
@@ -0,0 +1,30 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 2011, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?X:
+?X: This unit looks whether <net/route.h> is available or not
+?X:
+?MAKE:i_netroute: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_netroute:
+?S: This variable conditionally defines I_NET_ROUTE, which indicates
+?S: to the C program that it can include <net/route.h>.
+?S:.
+?C:I_NET_ROUTE:
+?C: This symbol, if defined, indicates to the C program that it can
+?C: include <net/route.h>.
+?C:.
+?H:#$i_netroute I_NET_ROUTE /**/
+?H:.
+?LINT:set i_netroute
+: see if this is a net/route.h system
+set net/route.h i_netroute
+eval $inhdr
+
diff --git a/mcon/U/i_niin.U b/mcon/U/i_niin.U
new file mode 100644
index 0000000..e24cc4a
--- /dev/null
+++ b/mcon/U/i_niin.U
@@ -0,0 +1,45 @@
+?RCS: $Id$
+?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: i_niin.U,v $
+?RCS: Revision 3.0 1993/08/18 12:08:24 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: This unit looks wether <netinet/in.h> is available or not
+?X:
+?MAKE:i_niin i_sysin: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_niin:
+?S: This variable conditionally defines I_NETINET_IN, which indicates
+?S: to the C program that it should include <netinet/in.h>. Otherwise,
+?S: you may try <sys/in.h>.
+?S:.
+?S:i_sysin:
+?S: This variable conditionally defines I_SYS_IN, which indicates
+?S: to the C program that it should include <sys/in.h> instead of
+?S: <netinet/in.h>.
+?S:.
+?C:I_NETINET_IN:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <netinet/in.h>. Otherwise, you may try <sys/in.h>.
+?C:.
+?C:I_SYS_IN (I_SYSIN):
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <sys/in.h> instead of <netinet/in.h>.
+?C:.
+?H:#$i_niin I_NETINET_IN /**/
+?H:#$i_sysin I_SYS_IN /**/
+?H:.
+?LINT:set i_niin i_sysin
+: see if this is a netinet/in.h or sys/in.h system
+set netinet/in.h i_niin sys/in.h i_sysin
+eval $inhdr
+
diff --git a/mcon/U/i_niip.U b/mcon/U/i_niip.U
new file mode 100644
index 0000000..b04edf1
--- /dev/null
+++ b/mcon/U/i_niip.U
@@ -0,0 +1,30 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?X:
+?X: This unit looks whether <netinet/ip.h> is available or not
+?X:
+?MAKE:i_niip: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_niip:
+?S: This variable conditionally defines I_NETINET_IP, which indicates
+?S: to the C program that it should include <netinet/ip.h>.
+?S:.
+?C:I_NETINET_IP:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <netinet/ip.h>.
+?C:.
+?H:#$i_niip I_NETINET_IP /**/
+?H:.
+?LINT:set i_niip
+: see if this is a netinet/ip.h system
+set netinet/ip.h i_niip
+eval $inhdr
+
diff --git a/mcon/U/i_poll.U b/mcon/U/i_poll.U
new file mode 100644
index 0000000..90a2c7a
--- /dev/null
+++ b/mcon/U/i_poll.U
@@ -0,0 +1,28 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:i_poll: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_poll:
+?S: This variable conditionally defines the I_POLL symbol, which
+?S: indicates to the C program that it should include <poll.h>.
+?S:.
+?C:I_POLL:
+?C: This symbol, if defined, indicates that the program may include
+?C: <poll.h>. If there is no <poll.h>, then you may check I_SYS_POLL
+?C: instead to see whether there is a <sys/poll.h> to include.
+?C:.
+?H:#$i_poll I_POLL /**/
+?H:.
+?LINT:set i_poll
+: see if there is a poll.h file
+set poll.h i_poll
+eval $inhdr
+
diff --git a/mcon/U/i_pthread.U b/mcon/U/i_pthread.U
new file mode 100644
index 0000000..8f14696
--- /dev/null
+++ b/mcon/U/i_pthread.U
@@ -0,0 +1,26 @@
+?RCS:
+?RCS: Copyright (c) 2011, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:i_pthread: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_pthread:
+?S: This variable conditionally defines the I_PTHREAD symbol, and indicates
+?S: whether a C program may include <pthread.h>, for POSIX threads.
+?S:.
+?C:I_PTHREAD:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <pthread.h> for POSIX threads.
+?C:.
+?H:#$i_pthread I_PTHREAD /**/
+?H:.
+?LINT:set i_pthread
+: see if this is a pthread.h system
+set pthread.h i_pthread
+eval $inhdr
+
diff --git a/mcon/U/i_pwd.U b/mcon/U/i_pwd.U
new file mode 100644
index 0000000..8ee4156
--- /dev/null
+++ b/mcon/U/i_pwd.U
@@ -0,0 +1,162 @@
+?RCS: $Id$
+?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: i_pwd.U,v $
+?RCS: Revision 3.0.1.2 1995/07/25 14:10:57 ram
+?RCS: patch56: use setvar so hint file values can override our guesses (ADO)
+?RCS:
+?RCS: Revision 3.0.1.1 1994/05/06 15:03:27 ram
+?RCS: patch23: had forgotten cppminus in cppstdin test (ADO)
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:08:25 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: This unit checks whether there is a pwd system or not
+?X:
+?MAKE:i_pwd d_pwquota d_pwage d_pwchange d_pwclass d_pwexpire d_pwcomment: \
+ contains rm cppstdin cppflags cppminus Inhdr Findhdr Setvar
+?MAKE: -pick add $@ %<
+?S:i_pwd:
+?S: This variable conditionally defines I_PWD, which indicates
+?S: to the C program that it should include <pwd.h>.
+?S:.
+?S:d_pwquota:
+?S: This varaible conditionally defines PWQUOTA, which indicates
+?S: that struct passwd contains pw_quota.
+?S:.
+?S:d_pwage:
+?S: This varaible conditionally defines PWAGE, which indicates
+?S: that struct passwd contains pw_age.
+?S:.
+?S:d_pwchange:
+?S: This varaible conditionally defines PWCHANGE, which indicates
+?S: that struct passwd contains pw_change.
+?S:.
+?S:d_pwclass:
+?S: This varaible conditionally defines PWCLASS, which indicates
+?S: that struct passwd contains pw_class.
+?S:.
+?S:d_pwexpire:
+?S: This varaible conditionally defines PWEXPIRE, which indicates
+?S: that struct passwd contains pw_expire.
+?S:.
+?S:d_pwcomment:
+?S: This varaible conditionally defines PWCOMMENT, which indicates
+?S: that struct passwd contains pw_comment.
+?S:.
+?C:I_PWD:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <pwd.h>.
+?C:.
+?C:PWQUOTA:
+?C: This symbol, if defined, indicates to the C program that struct passwd
+?C: contains pw_quota.
+?C:.
+?C:PWAGE:
+?C: This symbol, if defined, indicates to the C program that struct passwd
+?C: contains pw_age.
+?C:.
+?C:PWCHANGE:
+?C: This symbol, if defined, indicates to the C program that struct passwd
+?C: contains pw_change.
+?C:.
+?C:PWCLASS:
+?C: This symbol, if defined, indicates to the C program that struct passwd
+?C: contains pw_class.
+?C:.
+?C:PWEXPIRE:
+?C: This symbol, if defined, indicates to the C program that struct passwd
+?C: contains pw_expire.
+?C:.
+?C:PWCOMMENT:
+?C: This symbol, if defined, indicates to the C program that struct passwd
+?C: contains pw_comment.
+?C:.
+?H:#$i_pwd I_PWD /**/
+?H:#$d_pwquota PWQUOTA /**/
+?H:#$d_pwage PWAGE /**/
+?H:#$d_pwchange PWCHANGE /**/
+?H:#$d_pwclass PWCLASS /**/
+?H:#$d_pwexpire PWEXPIRE /**/
+?H:#$d_pwcomment PWCOMMENT /**/
+?H:.
+?LINT: set i_pwd d_pwquota d_pwage d_pwchange d_pwclass d_pwexpire d_pwcomment
+?T:xxx
+: see if this is a pwd.h system
+set pwd.h i_pwd
+eval $inhdr
+
+case "$i_pwd" in
+$define)
+ xxx=`./findhdr pwd.h`
+ $cppstdin $cppflags $cppminus < $xxx >$$.h
+
+ if $contains 'pw_quota' $$.h >/dev/null 2>&1; then
+ val="$define"
+ else
+ val="$undef"
+ fi
+ set d_pwquota
+ eval $setvar
+
+ if $contains 'pw_age' $$.h >/dev/null 2>&1; then
+ val="$define"
+ else
+ val="$undef"
+ fi
+ set d_pwage
+ eval $setvar
+
+ if $contains 'pw_change' $$.h >/dev/null 2>&1; then
+ val="$define"
+ else
+ val="$undef"
+ fi
+ set d_pwchange
+ eval $setvar
+
+ if $contains 'pw_class' $$.h >/dev/null 2>&1; then
+ val="$define"
+ else
+ val="$undef"
+ fi
+ set d_pwclass
+ eval $setvar
+
+ if $contains 'pw_expire' $$.h >/dev/null 2>&1; then
+ val="$define"
+ else
+ val="$undef"
+ fi
+ set d_pwexpire
+ eval $setvar
+
+ if $contains 'pw_comment' $$.h >/dev/null 2>&1; then
+ val="$define"
+ else
+ val="$undef"
+ fi
+ set d_pwcomment
+ eval $setvar
+
+ $rm -f $$.h
+ ;;
+*)
+ val="$undef";
+ set d_pwquota; eval $setvar
+ set d_pwage; eval $setvar
+ set d_pwchange; eval $setvar
+ set d_pwclass; eval $setvar
+ set d_pwexpire; eval $setvar
+ set d_pwcomment; eval $setvar
+ ;;
+esac
+
diff --git a/mcon/U/i_regex.U b/mcon/U/i_regex.U
new file mode 100644
index 0000000..81f2311
--- /dev/null
+++ b/mcon/U/i_regex.U
@@ -0,0 +1,35 @@
+?RCS: $Id$
+?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: Original Author: Sidney C. Smith <scsmith@cbda9.apgea.army.mil>
+?RCS:
+?RCS: $Log: i_regex.U,v $
+?RCS: Revision 3.0.1.1 1995/01/30 14:35:45 ram
+?RCS: patch49: created
+?RCS:
+?RCS:
+?MAKE:i_regex: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_regex:
+?S: This variable conditionally defines the I_REGEX symbol, which
+?S: indicates to the C program that <regex.h> exists and should
+?S: be included.
+?S:.
+?C:I_REGEX:
+?C: This symbol, if defined, indicates that <regex.h> exists and should
+?C: be included.
+?C:.
+?H:#$i_regex I_REGEX /**/
+?H:.
+?LINT:set i_regex
+: see if regex is available
+set regex.h i_regex
+eval $inhdr
+
diff --git a/mcon/U/i_sched.U b/mcon/U/i_sched.U
new file mode 100644
index 0000000..de5cfa4
--- /dev/null
+++ b/mcon/U/i_sched.U
@@ -0,0 +1,25 @@
+?RCS: Copyright (c) 2012, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:i_sched: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_sched:
+?S: This variable conditionally defines the I_SCHED symbol, and indicates
+?S: whether a C program may include <sched.h> to get sched_yield().
+?S:.
+?C:I_SCHED:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <sched.h> to get the definition of sched_yield().
+?C:.
+?H:#$i_sched I_SCHED /**/
+?H:.
+?LINT:set i_sched
+: see if this is a sched.h system
+set sched.h i_sched
+eval $inhdr
+
diff --git a/mcon/U/i_sfio.U b/mcon/U/i_sfio.U
new file mode 100644
index 0000000..84730de
--- /dev/null
+++ b/mcon/U/i_sfio.U
@@ -0,0 +1,32 @@
+?RCS: $Id$
+?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 License,
+?RCS: as specified in the 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: i_sfio.U,v $
+?RCS: Revision 3.0.1.1 1997/02/28 15:48:27 ram
+?RCS: patch61: created
+?RCS:
+?MAKE:i_sfio: Inhdr Setvar
+?MAKE: -pick add $@ %<
+?S:i_sfio:
+?S: This variable conditionally defines the I_SFIO symbol,
+?S: and indicates whether a C program should include <sfio.h>.
+?S:.
+?C:I_SFIO:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <sfio.h>.
+?C:.
+?H:#$i_sfio I_SFIO /**/
+?H:.
+?LINT:set i_sfio
+: see if sfio.h is available
+set sfio.h i_sfio
+eval $inhdr
+
diff --git a/mcon/U/i_stddef.U b/mcon/U/i_stddef.U
new file mode 100644
index 0000000..0d9f1d3
--- /dev/null
+++ b/mcon/U/i_stddef.U
@@ -0,0 +1,32 @@
+?RCS: $Id$
+?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: i_stddef.U,v $
+?RCS: Revision 3.0 1993/08/18 12:08:27 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:i_stddef: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_stddef:
+?S: This variable conditionally defines the I_STDDEF symbol, which
+?S: indicates to the C program that <stddef.h> exists and should
+?S: be included.
+?S:.
+?C:I_STDDEF:
+?C: This symbol, if defined, indicates that <stddef.h> exists and should
+?C: be included.
+?C:.
+?H:#$i_stddef I_STDDEF /**/
+?H:.
+?LINT:set i_stddef
+: see if stddef is available
+set stddef.h i_stddef
+eval $inhdr
+
diff --git a/mcon/U/i_stdlib.U b/mcon/U/i_stdlib.U
new file mode 100644
index 0000000..0e41f5e
--- /dev/null
+++ b/mcon/U/i_stdlib.U
@@ -0,0 +1,32 @@
+?RCS: $Id$
+?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: i_stdlib.U,v $
+?RCS: Revision 3.0 1993/08/18 12:08:27 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:i_stdlib: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_stdlib:
+?S: This variable conditionally defines the I_STDLIB symbol, which
+?S: indicates to the C program that <stdlib.h> exists and should
+?S: be included.
+?S:.
+?C:I_STDLIB:
+?C: This symbol, if defined, indicates that <stdlib.h> exists and should
+?C: be included.
+?C:.
+?H:#$i_stdlib I_STDLIB /**/
+?H:.
+?LINT:set i_stdlib
+: see if stdlib is available
+set stdlib.h i_stdlib
+eval $inhdr
+
diff --git a/mcon/U/i_string.U b/mcon/U/i_string.U
new file mode 100644
index 0000000..e43a62a
--- /dev/null
+++ b/mcon/U/i_string.U
@@ -0,0 +1,62 @@
+?RCS: $Id$
+?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: i_string.U,v $
+?RCS: Revision 3.0.1.2 1993/10/16 13:50:12 ram
+?RCS: patch12: special units Loc and Guess were missing from dependencies
+?RCS:
+?RCS: Revision 3.0.1.1 1993/09/13 16:07:26 ram
+?RCS: patch10: removed "(Actually, this looks more like...)" messages (WAD)
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:08:28 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: See if we should include <string.h> or <strings.h>
+?X:
+?MAKE:i_string strings: test Setvar Findhdr Warn
+?MAKE: -pick add $@ %<
+?S:i_string:
+?S: This variable conditionally defines the I_STRING symbol, which
+?S: indicates that <string.h> should be included rather than <strings.h>.
+?S:.
+?S:strings:
+?S: This variable holds the full path of the string header that will be
+?S: used. Typically /usr/include/string.h or /usr/include/strings.h.
+?S:.
+?C:I_STRING:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <string.h> (USG systems) instead of <strings.h> (BSD systems).
+?C:.
+?H:#$i_string I_STRING /**/
+?H:.
+?LINT:set i_string
+: see which of string.h or strings.h is needed
+echo " "
+strings=`./findhdr string.h`
+if $test "$strings" && $test -r "$strings"; then
+ echo "Using <string.h> instead of <strings.h>." >&4
+ val="$define"
+else
+ val="$undef"
+ strings=`./findhdr strings.h`
+ if $test "$strings" && $test -r "$strings"; then
+ echo "Using <strings.h> instead of <string.h>." >&4
+ else
+ ./warn "No string header found -- You'll surely have problems." 4>&4
+ fi
+fi
+set i_string
+eval $setvar
+case "$i_string" in
+"$undef") strings=`./findhdr strings.h`;;
+*) strings=`./findhdr string.h`;;
+esac
+
diff --git a/mcon/U/i_sysdir.U b/mcon/U/i_sysdir.U
new file mode 100644
index 0000000..529bf15
--- /dev/null
+++ b/mcon/U/i_sysdir.U
@@ -0,0 +1,34 @@
+?RCS: $Id$
+?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: i_sysdir.U,v $
+?RCS: Revision 3.0.1.1 1994/08/29 16:22:30 ram
+?RCS: patch32: fixed typo in I_SYS_DIR symbol name
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:08:30 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:i_sysdir: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_sysdir:
+?S: This variable conditionally defines the I_SYS_DIR symbol, and indicates
+?S: whether a C program should include <sys/dir.h>.
+?S:.
+?C:I_SYS_DIR (I_SYSDIR):
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <sys/dir.h>.
+?C:.
+?H:#$i_sysdir I_SYS_DIR /**/
+?H:.
+?LINT:set i_sysdir
+: see if this is an sysdir system
+set sys/dir.h i_sysdir
+eval $inhdr
+
diff --git a/mcon/U/i_sysfile.U b/mcon/U/i_sysfile.U
new file mode 100644
index 0000000..62ea1e8
--- /dev/null
+++ b/mcon/U/i_sysfile.U
@@ -0,0 +1,60 @@
+?RCS: $Id$
+?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: i_sysfile.U,v $
+?RCS: Revision 3.0.1.2 1995/07/25 14:11:36 ram
+?RCS: patch56: removed <> characters from comment, per metalint suggestion
+?RCS:
+?RCS: Revision 3.0.1.1 1993/08/25 14:01:23 ram
+?RCS: patch6: added default for i_sysfile
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:08:31 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:i_sysfile: h_sysfile Inhdr Setvar
+?MAKE: -pick add $@ %<
+?S:i_sysfile:
+?S: This variable conditionally defines the I_SYS_FILE symbol, and indicates
+?S: whether a C program should include <sys/file.h> to get R_OK and friends.
+?S:.
+?C:I_SYS_FILE (I_SYSFILE):
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <sys/file.h> to get definition of R_OK and friends.
+?C:.
+?H:#$i_sysfile I_SYS_FILE /**/
+?H:.
+?T:val
+?D:i_sysfile=''
+?LINT:change h_sysfile
+?LINT:set i_sysfile
+: see if this is a sys/file.h system
+val=''
+set sys/file.h val
+eval $inhdr
+
+: do we need to include sys/file.h ?
+case "$val" in
+"$define")
+ echo " "
+ if $h_sysfile; then
+ val="$define"
+ echo "We'll be including <sys/file.h>." >&4
+ else
+ val="$undef"
+ echo "We won't be including <sys/file.h>." >&4
+ fi
+ ;;
+*)
+ h_sysfile=false
+ ;;
+esac
+set i_sysfile
+eval $setvar
+
diff --git a/mcon/U/i_sysioctl.U b/mcon/U/i_sysioctl.U
new file mode 100644
index 0000000..2b9fcbb
--- /dev/null
+++ b/mcon/U/i_sysioctl.U
@@ -0,0 +1,202 @@
+?RCS: $Id$
+?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: i_sysioctl.U,v $
+?RCS: Revision 3.0.1.2 1994/05/06 15:04:57 ram
+?RCS: patch23: added knowledge for <sys/filio.h> (WED)
+?RCS: patch23: optimized amount of findhdr calls
+?RCS:
+?RCS: Revision 3.0.1.1 1993/11/10 17:36:09 ram
+?RCS: patch14: now use a compiler check for TIOCNOTTY because of HP-UX 9.x
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:08:32 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:i_sysioctl i_bsdioctl i_sysfilio i_syssockio d_voidtty: test contains \
+ cat i_termio i_termios i_sgtty Setvar Findhdr +cc rm Inhdr
+?MAKE: -pick add $@ %<
+?S:i_sysioctl:
+?S: This variable conditionally defines the I_SYS_IOCTL symbol, which
+?S: indicates to the C program that <sys/ioctl.h> exists and should
+?S: be included.
+?S:.
+?S:i_sysfilio:
+?S: This variable conditionally defines the I_SYS_FILIO symbol, which
+?S: indicates to the C program that <sys/filio.h> exists and should
+?S: be included in preference to <sys/ioctl.h>.
+?S:.
+?S:i_bsdioctl:
+?S: This variable conditionally defines the I_SYS_BSDIOCTL symbol, which
+?S: indicates to the C program that <sys/bsdioctl.h> exists and should
+?S: be included.
+?S:.
+?S:i_syssockio:
+?S: This variable conditionally defines I_SYS_SOCKIO to indicate to the
+?S: C program that socket ioctl codes may be found in <sys/sockio.h>
+?S: instead of <sys/ioctl.h>.
+?S:.
+?S:d_voidtty:
+?S: This variable conditionally defines USE_IOCNOTTY to indicate that the
+?S: ioctl() call with TIOCNOTTY should be used to void tty association.
+?S: Otherwise (on USG probably), it is enough to close the standard file
+?S: descriptors and do a setpgrp().
+?S:.
+?C:I_SYS_IOCTL (I_SYSIOCTL):
+?C: This symbol, if defined, indicates that <sys/ioctl.h> exists and should
+?C: be included. Otherwise, include <sgtty.h> or <termio.h>.
+?C:.
+?C:I_SYS_FILIO:
+?C: This symbol, if defined, indicates that <sys/filio.h> exists and
+?C: should be included instead of <sys/ioctl.h>.
+?C:.
+?C:I_SYS_BSDIOCTL (I_BSDIOCTL):
+?C: This symbol, if defined, indicates that <sys/bsdioctl.h> exists and should
+?C: be included. Otherwise, try <sys/ioctl.h>. This is primarly intended for
+?C: definitions of sockets options, like SIOCATMARK.
+?C:.
+?C:I_SYS_SOCKIO (I_SYSSOCKIO):
+?C: This symbol, if defined, indicates the <sys/sockio.h> should be included
+?C: to get socket ioctl options, like SIOCATMARK.
+?C:.
+?C:USE_TIOCNOTTY (VOIDTTY):
+?C: This symbol, if defined indicate to the C program that the ioctl()
+?C: call with TIOCNOTTY should be used to void tty association.
+?C: Otherwise (on USG probably), it is enough to close the standard file
+?C: decriptors and do a setpgrp().
+?C:.
+?H:#$i_sysioctl I_SYS_IOCTL /**/
+?H:#$i_sysfilio I_SYS_FILIO /**/
+?H:#$i_bsdioctl I_SYS_BSDIOCTL /**/
+?H:#$i_syssockio I_SYS_SOCKIO /**/
+?H:#$d_voidtty USE_TIOCNOTTY /**/
+?H:.
+?T:xxx
+: see if ioctl defs are in sgtty, termio, sys/filio or sys/ioctl
+?LINT:set i_sysfilio
+set sys/filio.h i_sysfilio
+eval $inhdr
+echo " "
+if $test `./findhdr sys/ioctl.h`; then
+ val="$define"
+ echo '<sys/ioctl.h> found.' >&4
+else
+ val="$undef"
+ if $test $i_sysfilio = "$define"; then
+ echo '<sys/ioctl.h> NOT found.' >&4
+ else
+ $test $i_sgtty = "$define" && xxx="sgtty.h"
+ $test $i_termio = "$define" && xxx="termio.h"
+ $test $i_termios = "$define" && xxx="termios.h"
+echo "No <sys/ioctl.h> found, assuming ioctl args are defined in <$xxx>." >&4
+ fi
+fi
+?LINT:set i_sysioctl
+set i_sysioctl
+eval $setvar
+
+@if I_BSDIOCTL || i_bsdioctl
+?X:
+?X: The only machine I know where this inclusion was necessary is a
+?X: BULL DPX 5000 (a French machine).
+?X:
+: see if socket ioctl defs are in sys/bsdioctl or sys/ioctl
+echo " "
+xxx=`./findhdr sys/bsdioctl.h`
+if $test "$xxx"; then
+ if $contains SIOCATMARK $xxx >/dev/null 2>&1; then
+ val="$define"
+ echo "You have socket ioctls defined in <sys/bsdioctl.h>." >&4
+ else
+ val="$undef"
+ echo "No socket ioctls found in <sys/bsdioctl.h>." >&4
+ fi
+else
+ val="$undef"
+ echo "<sys/bsdioctl.h> not found, but that's ok." >&4
+fi
+?LINT:set i_bsdioctl
+set i_bsdioctl
+eval $setvar
+
+@end
+@if I_SYSSOCKIO || i_syssockio
+: see if socket ioctl defs are in sys/sockio.h
+echo " "
+xxx=`./findhdr sys/sockio.h`
+if $test "$xxx"; then
+ if $contains SIOCATMARK $xxx >/dev/null 2>&1; then
+ val="$define"
+ echo "You have socket ioctls defined in <sys/sockio.h>." >&4
+ else
+ val="$undef"
+ echo "No socket ioctls found in <sys/sockio.h>." >&4
+ fi
+else
+ val="$undef"
+@if I_BSDIOCTL
+ case "$i_bsdioctl" in
+ "$define") $cat <<EOM
+<sys/sockio.h> not found, using ioctls from <sys/bsdioctl.h>.
+EOM
+ ;;
+ *) $cat <<EOM
+<sys/sockio.h> not found, assuming socket ioctls are in <sys/ioctl.h>.
+EOM
+ ;;
+ esac
+@else
+ $cat <<EOM
+<sys/sockio.h> not found, assuming socket ioctls are in <sys/ioctl.h>.
+EOM
+@end
+fi
+?LINT:set i_syssockio
+set i_syssockio
+eval $setvar
+
+@end
+@if VOIDTTY || d_voidtty
+: check how to void tty association
+echo " "
+case "$i_sysioctl" in
+"$define") xxx='sys/ioctl.h';;
+?X: otherwise $xxx was set during the determination of i_sysioctl, above.
+esac
+?X:
+?X: Can't use $contains here since HP-UX 9.x has TIOCNOTTY between a pair
+?X: of #ifdef/#endif and is never actually defined. Oh well...
+?X:
+$cat > tcio.c <<EOM
+#include <sys/types.h> /* Just in case */
+#include <$xxx>
+
+int main()
+{
+#ifdef TIOCNOTTY
+ exit(0);
+#else
+ exit(1);
+#endif
+}
+EOM
+if ($cc -o tcio tcio.c && ./tcio) >/dev/null 2>&1; then
+ val="$define"
+ echo "TIOCNOTTY found in <$xxx>." >&4
+ echo "Using ioctl() call on /dev/tty to void tty association." >&4
+else
+ val="$undef"
+ echo "Closing standard file descriptors should void tty association." >&4
+fi
+?LINT:set d_voidtty
+set d_voidtty
+eval $setvar
+$rm -f tcio tcio.? core
+
+@end
diff --git a/mcon/U/i_sysipc.U b/mcon/U/i_sysipc.U
new file mode 100644
index 0000000..5c86815
--- /dev/null
+++ b/mcon/U/i_sysipc.U
@@ -0,0 +1,28 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 2012, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:i_sysipc: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_sysipc:
+?S: This variable conditionally defines the I_SYS_IPC symbol, and indicates
+?S: whether a C program should include <sys/ipc.h> to be able to get defines
+?S: for SysV IPCs.
+?S:.
+?C:I_SYS_IPC:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <sys/ipc.h> to get the defines for SysV IPCs.
+?C:.
+?H:#$i_sysipc I_SYS_IPC /**/
+?H:.
+?LINT:set i_sysipc
+: see if this is a sys/ipc system
+set sys/ipc.h i_sysipc
+eval $inhdr
+
diff --git a/mcon/U/i_sysmman.U b/mcon/U/i_sysmman.U
new file mode 100644
index 0000000..4b3c9db
--- /dev/null
+++ b/mcon/U/i_sysmman.U
@@ -0,0 +1,34 @@
+?RCS: $Id$
+?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: i_sysmman.U,v $
+?RCS: Revision 3.0.1.1 1994/01/24 14:11:20 ram
+?RCS: patch16: created
+?RCS:
+?X:
+?X: Look wether <sys/mman.h> needs to be included.
+?X:
+?MAKE:i_sysmman: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_sysmman:
+?S: This variable conditionally defines the I_SYS_MMAN symbol,
+?S: and indicates whether a C program should include <sys/mman.h>.
+?S:.
+?C:I_SYS_MMAN:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <sys/mman.h>.
+?C:.
+?H:#$i_sysmman I_SYS_MMAN /**/
+?H:.
+?LINT:set i_sysmman
+: see if sys/mman.h has to be included
+set sys/mman.h i_sysmman
+eval $inhdr
+
diff --git a/mcon/U/i_sysmount.U b/mcon/U/i_sysmount.U
new file mode 100644
index 0000000..5bb10c8
--- /dev/null
+++ b/mcon/U/i_sysmount.U
@@ -0,0 +1,29 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:i_sysmount: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_sysmount:
+?S: This variable conditionally defines the I_SYS_MOUNT symbol, and
+?S: indicates whether a C program should include <sys/mount.h> to be able
+?S: to issue the statfs() call to get filesystem statistics.
+?S:.
+?C:I_SYS_MOUNT:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <sys/mount.h> to get the struct statfs definition for the
+?C: statfs() system call.
+?C:.
+?H:#$i_sysmount I_SYS_MOUNT /**/
+?H:.
+?LINT:set i_sysmount
+: see if this is a sys/mount system
+set sys/mount.h i_sysmount
+eval $inhdr
+
diff --git a/mcon/U/i_sysndir.U b/mcon/U/i_sysndir.U
new file mode 100644
index 0000000..7521bd0
--- /dev/null
+++ b/mcon/U/i_sysndir.U
@@ -0,0 +1,31 @@
+?RCS: $Id$
+?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: i_sysndir.U,v $
+?RCS: Revision 3.0 1993/08/18 12:08:33 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:i_sysndir: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_sysndir:
+?S: This variable conditionally defines the I_SYS_NDIR symbol, and indicates
+?S: whether a C program should include <sys/ndir.h>.
+?S:.
+?C:I_SYS_NDIR (I_SYSNDIR):
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <sys/ndir.h>.
+?C:.
+?H:#$i_sysndir I_SYS_NDIR /**/
+?H:.
+?LINT:set i_sysndir
+: see if this is an sysndir system
+set sys/ndir.h i_sysndir
+eval $inhdr
+
diff --git a/mcon/U/i_sysparam.U b/mcon/U/i_sysparam.U
new file mode 100644
index 0000000..5ef21dd
--- /dev/null
+++ b/mcon/U/i_sysparam.U
@@ -0,0 +1,31 @@
+?RCS: $Id$
+?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: i_sysparam.U,v $
+?RCS: Revision 3.0.1.1 1994/08/29 16:22:43 ram
+?RCS: patch32: created
+?RCS:
+?MAKE:i_sysparam: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_sysparam:
+?S: This variable conditionally defines the I_SYS_PARAM symbol, and indicates
+?S: whether a C program should include <sys/param.h>.
+?S:.
+?C:I_SYS_PARAM:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <sys/param.h>.
+?C:.
+?H:#$i_sysparam I_SYS_PARAM /**/
+?H:.
+?LINT:set i_sysparam
+: see if this is a sys/param system
+set sys/param.h i_sysparam
+eval $inhdr
+
diff --git a/mcon/U/i_syspoll.U b/mcon/U/i_syspoll.U
new file mode 100644
index 0000000..7d7c86b
--- /dev/null
+++ b/mcon/U/i_syspoll.U
@@ -0,0 +1,28 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:i_syspoll: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_syspoll:
+?S: This variable conditionally defines the I_SYS_POLL symbol, which
+?S: indicates to the C program that it should include <sys/poll.h>.
+?S:.
+?C:I_SYS_POLL:
+?C: This symbol, if defined, indicates that the program may include
+?C: <sys/poll.h>. When I_POLL is also defined, it's probably safest
+?C: to only include <poll.h>.
+?C:.
+?H:#$i_syspoll I_SYS_POLL /**/
+?H:.
+?LINT:set i_syspoll
+: see if there is a sys/poll.h file
+set sys/poll.h i_syspoll
+eval $inhdr
+
diff --git a/mcon/U/i_sysresrc.U b/mcon/U/i_sysresrc.U
new file mode 100644
index 0000000..69f85f1
--- /dev/null
+++ b/mcon/U/i_sysresrc.U
@@ -0,0 +1,34 @@
+?RCS: $Id$
+?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: i_sysresrc.U,v $
+?RCS: Revision 3.0 1993/08/18 12:08:34 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: Look wether <sys/resource.h> needs to be included
+?X:
+?MAKE:i_sysresrc: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_sysresrc:
+?S: This variable conditionally defines the I_SYS_RESOURCE symbol,
+?S: and indicates whether a C program should include <sys/resource.h>.
+?S:.
+?C:I_SYS_RESOURCE (I_SYSRESOURCE):
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <sys/resource.h>.
+?C:.
+?H:#$i_sysresrc I_SYS_RESOURCE /**/
+?H:.
+?LINT:set i_sysresrc
+: see if sys/resource.h has to be included
+set sys/resource.h i_sysresrc
+eval $inhdr
+
diff --git a/mcon/U/i_sysselct.U b/mcon/U/i_sysselct.U
new file mode 100644
index 0000000..7ff37a5
--- /dev/null
+++ b/mcon/U/i_sysselct.U
@@ -0,0 +1,39 @@
+?RCS: $Id$
+?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: i_sysselct.U,v $
+?RCS: Revision 3.0.1.1 1993/08/25 14:01:33 ram
+?RCS: patch6: added default for i_sysselct
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:08:35 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: Look wether <sys/select.h> exists
+?X:
+?MAKE:i_sysselct: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_sysselct:
+?S: This variable conditionally defines I_SYS_SELECT, which indicates
+?S: to the C program that it should include <sys/select.h> in order to
+?S: get the definition of struct timeval.
+?S:.
+?C:I_SYS_SELECT (I_SYSSELECT):
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <sys/select.h> in order to get definition of struct timeval.
+?C:.
+?H:#$i_sysselct I_SYS_SELECT /**/
+?H:.
+?D:i_sysselct=''
+?LINT:set i_sysselct
+: see if sys/select.h has to be included
+set sys/select.h i_sysselct
+eval $inhdr
+
diff --git a/mcon/U/i_syssem.U b/mcon/U/i_syssem.U
new file mode 100644
index 0000000..3e5d68a
--- /dev/null
+++ b/mcon/U/i_syssem.U
@@ -0,0 +1,28 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 2012, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:i_syssem: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_syssem:
+?S: This variable conditionally defines the I_SYS_SEM symbol, and indicates
+?S: whether a C program should include <sys/sem.h> to be able to use SysV
+?S: semaphores.
+?S:.
+?C:I_SYS_SEM:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <sys/sem.h> to use SysV semaphores.
+?C:.
+?H:#$i_syssem I_SYS_SEM /**/
+?H:.
+?LINT:set i_syssem
+: see if this is a sys/sem system
+set sys/sem.h i_syssem
+eval $inhdr
+
diff --git a/mcon/U/i_syssendfile.U b/mcon/U/i_syssendfile.U
new file mode 100644
index 0000000..24a926e
--- /dev/null
+++ b/mcon/U/i_syssendfile.U
@@ -0,0 +1,27 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:i_syssendfile: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_syssendfile:
+?S: This variable conditionally defines the I_SYS_SENDFILE symbol, and indicates
+?S: whether a C program should include <sys/sendfile.h>.
+?S:.
+?C:I_SYS_SENDFILE:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <sys/sendfile.h>.
+?C:.
+?H:#$i_syssendfile I_SYS_SENDFILE /**/
+?H:.
+?LINT:set i_syssendfile
+: see if this is a sys/sendfile system
+set sys/sendfile.h i_syssendfile
+eval $inhdr
+
diff --git a/mcon/U/i_syssock.U b/mcon/U/i_syssock.U
new file mode 100644
index 0000000..357e406
--- /dev/null
+++ b/mcon/U/i_syssock.U
@@ -0,0 +1,32 @@
+?RCS: $Id$
+?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: i_syssock.U,v $
+?RCS: Revision 3.0 1993/08/18 12:08:36 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:i_syssock: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_syssock:
+?S: This variable conditionally defines the I_SYS_SOCKET symbol, and indicates
+?S: whether a C program should include <sys/socket.h> before performing socket
+?S: operations.
+?S:.
+?C:I_SYS_SOCKET:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <sys/socket.h> before performing socket calls.
+?C:.
+?H:#$i_syssock I_SYS_SOCKET /**/
+?H:.
+?LINT:set i_syssock
+: see if this is a sys/socket.h system
+set sys/socket.h i_syssock
+eval $inhdr
+
diff --git a/mcon/U/i_sysstat.U b/mcon/U/i_sysstat.U
new file mode 100644
index 0000000..92f9691
--- /dev/null
+++ b/mcon/U/i_sysstat.U
@@ -0,0 +1,32 @@
+?RCS: $Id$
+?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 License,
+?RCS: as specified in the 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: i_sysstat.U,v $
+?RCS: Revision 3.0.1.1 1997/02/28 15:48:30 ram
+?RCS: patch61: created
+?RCS:
+?MAKE:i_sysstat: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_sysstat:
+?S: This variable conditionally defines the I_SYS_STAT symbol,
+?S: and indicates whether a C program should include <sys/stat.h>.
+?S:.
+?C:I_SYS_STAT (I_SYSSTAT):
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <sys/stat.h>.
+?C:.
+?H:#$i_sysstat I_SYS_STAT /**/
+?H:.
+?LINT:set i_sysstat
+: see if sys/stat.h is available
+set sys/stat.h i_sysstat
+eval $inhdr
+
diff --git a/mcon/U/i_sysstatvfs.U b/mcon/U/i_sysstatvfs.U
new file mode 100644
index 0000000..e1d0859
--- /dev/null
+++ b/mcon/U/i_sysstatvfs.U
@@ -0,0 +1,29 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:i_sysstatvfs: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_sysstatvfs:
+?S: This variable conditionally defines the I_SYS_STATVFS symbol, and indicates
+?S: whether a C program should include <sys/statvfs.h> to be able to issue
+?S: the statvfs() call to get filesystem statistics.
+?S:.
+?C:I_SYS_STATVFS:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <sys/statvfs.h> to get the struct statvfs definition for the
+?C: statvfs() system call.
+?C:.
+?H:#$i_sysstatvfs I_SYS_STATVFS /**/
+?H:.
+?LINT:set i_sysstatvfs
+: see if this is a sys/statvfs system
+set sys/statvfs.h i_sysstatvfs
+eval $inhdr
+
diff --git a/mcon/U/i_syssysctl.U b/mcon/U/i_syssysctl.U
new file mode 100644
index 0000000..a732d2a
--- /dev/null
+++ b/mcon/U/i_syssysctl.U
@@ -0,0 +1,27 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:i_syssysctl: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_syssysctl:
+?S: This variable conditionally defines the I_SYS_SYSCTL symbol, and indicates
+?S: whether a C program should include <sys/sysctl.h>.
+?S:.
+?C:I_SYS_SYSCTL:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <sys/sysctl.h>.
+?C:.
+?H:#$i_syssysctl I_SYS_SYSCTL /**/
+?H:.
+?LINT:set i_syssysctl
+: see if this is a sys/sysctl system
+set sys/sysctl.h i_syssysctl
+eval $inhdr
+
diff --git a/mcon/U/i_systable.U b/mcon/U/i_systable.U
new file mode 100644
index 0000000..20c086c
--- /dev/null
+++ b/mcon/U/i_systable.U
@@ -0,0 +1,32 @@
+?RCS: $Id$
+?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: i_systable.U,v $
+?RCS: Revision 3.0.1.1 1993/10/16 13:50:20 ram
+?RCS: patch12: created
+?RCS:
+?RCS:
+?MAKE:i_systable: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_systable:
+?S: This variable conditionally defines the I_SYS_TABLE symbol, and
+?S: indicates whether a C program should include <sys/table.h>.
+?S:.
+?C:I_SYS_TABLE:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <sys/table.h> for the OSF/1 table() system call.
+?C:.
+?H:#$i_systable I_SYS_TABLE /**/
+?H:.
+?LINT:set i_systable
+: see if this is an OSF sys/table system
+set sys/table.h i_systable
+eval $inhdr
+
diff --git a/mcon/U/i_systimeb.U b/mcon/U/i_systimeb.U
new file mode 100644
index 0000000..38f7853
--- /dev/null
+++ b/mcon/U/i_systimeb.U
@@ -0,0 +1,55 @@
+?RCS: $Id$
+?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: i_systimeb.U,v $
+?RCS: Revision 3.0 1993/08/18 12:08:37 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: This unit looks wether <sys/timeb.h> should be included
+?X: or not when using ftime() (for struct timeb definition).
+?X:
+?X: Force looking for <sys/time.h> for struct timeb.
+?X:INC: i_systime
+?MAKE:i_systimeb: test contains Loc Setvar Findhdr
+?MAKE: -pick add $@ %<
+?S:i_systimeb:
+?S: This variable conditionally defines I_SYS_TIMEB, which indicates
+?S: to the C program that it should include <sys/timeb.h>.
+?S:.
+?C:I_SYS_TIMEB (I_SYSTIMEB):
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <sys/timeb.h>, in order to define struct timeb (some systems
+?C: define this in <sys/time.h>). This is useful when using ftime().
+?C: You should include <sys/time.h> if I_SYS_TIMEB is not defined,
+?C: nor is I_SYS_TIME.
+?C:.
+?H:#$i_systimeb I_SYS_TIMEB /**/
+?H:.
+?T:xxx
+?LINT:set i_systimeb
+: see where struct timeb is defined
+echo " "
+xxx=`./findhdr sys/timeb.h`
+if $test "$xxx"; then
+ if $contains 'struct timeb' $xxx >/dev/null 2>&1; then
+ val="$define"
+ echo "You have struct timeb defined in <sys/timeb.h>." >&4
+ else
+ val="$undef"
+ echo "Assuming struct timeb is defined in <sys/time.h>." >&4
+ fi
+else
+ val="$undef"
+echo "No <sys/timeb.h> -- Assuming struct timeb is defined in <sys/time.h>." >&4
+fi
+set i_systimeb
+eval $setvar
+
diff --git a/mcon/U/i_systimes.U b/mcon/U/i_systimes.U
new file mode 100644
index 0000000..c352d6d
--- /dev/null
+++ b/mcon/U/i_systimes.U
@@ -0,0 +1,31 @@
+?RCS: $Id$
+?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: i_systimes.U,v $
+?RCS: Revision 3.0 1993/08/18 12:08:39 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:i_systimes: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_systimes:
+?S: This variable conditionally defines the I_SYS_TIMES symbol, and indicates
+?S: whether a C program should include <sys/times.h>.
+?S:.
+?C:I_SYS_TIMES (I_SYSTIMES):
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <sys/times.h>.
+?C:.
+?H:#$i_systimes I_SYS_TIMES /**/
+?H:.
+?LINT:set i_systimes
+: see if this is a sys/times.h system
+set sys/times.h i_systimes
+eval $inhdr
+
diff --git a/mcon/U/i_systwgcf.U b/mcon/U/i_systwgcf.U
new file mode 100644
index 0000000..2edeebb
--- /dev/null
+++ b/mcon/U/i_systwgcf.U
@@ -0,0 +1,31 @@
+?RCS: $Id$
+?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: i_systwgcf.U,v $
+?RCS: Revision 3.0 1993/08/18 12:08:39 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:i_systwgcf: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_systwgcf:
+?S: This variable conditionally defines the I_SYS_TWG_CF symbol, and
+?S: indicates whether a C program should include sys/twg_config.h.
+?S:.
+?C:I_SYS_TWG_CF:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include sys/twg_config.h.
+?C:.
+?H:#$i_systwgcf I_SYS_TWG_CF /**/
+?H:.
+?LINT:set i_systwgcf
+: see if this is a sys/twg_config.h system
+set sys/twg_config.h i_systwgcf
+eval $inhdr
+
diff --git a/mcon/U/i_systypes.U b/mcon/U/i_systypes.U
new file mode 100644
index 0000000..3d7fddb
--- /dev/null
+++ b/mcon/U/i_systypes.U
@@ -0,0 +1,34 @@
+?RCS: $Id$
+?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: i_systypes.U,v $
+?RCS: Revision 3.0 1993/08/18 12:08:41 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: Look wether <sys/types.h> needs to be included.
+?X:
+?MAKE:i_systypes: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_systypes:
+?S: This variable conditionally defines the I_SYS_TYPES symbol,
+?S: and indicates whether a C program should include <sys/types.h>.
+?S:.
+?C:I_SYS_TYPES (I_SYSTYPES):
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <sys/types.h>.
+?C:.
+?H:#$i_systypes I_SYS_TYPES /**/
+?H:.
+?LINT:set i_systypes
+: see if sys/types.h has to be included
+set sys/types.h i_systypes
+eval $inhdr
+
diff --git a/mcon/U/i_sysun.U b/mcon/U/i_sysun.U
new file mode 100644
index 0000000..b99f736
--- /dev/null
+++ b/mcon/U/i_sysun.U
@@ -0,0 +1,35 @@
+?RCS: $Id$
+?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: i_sysun.U,v $
+?RCS: Revision 3.0 1993/08/18 12:08:42 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: This unit looks wether <sys/un.h> is available or not
+?X:
+?MAKE:i_sysun: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_sysun:
+?S: This variable conditionally defines I_SYS_UN, which indicates
+?S: to the C program that it should include <sys/un.h> to get UNIX
+?S: domain socket definitions.
+?S:.
+?C:I_SYS_UN:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <sys/un.h> to get UNIX domain socket definitions.
+?C:.
+?H:#$i_sysun I_SYS_UN /**/
+?H:.
+?LINT:set i_sysun
+: see if this is a sys/un.h system
+set sys/un.h i_sysun
+eval $inhdr
+
diff --git a/mcon/U/i_sysutsname.U b/mcon/U/i_sysutsname.U
new file mode 100644
index 0000000..96024be
--- /dev/null
+++ b/mcon/U/i_sysutsname.U
@@ -0,0 +1,27 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:i_sysutsname: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_sysutsname:
+?S: This variable conditionally defines the I_SYS_UTSNAME symbol, and
+?S: indicates whether a C program should include <sys/utsname.h>.
+?S:.
+?C:I_SYS_UTSNAME:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <sys/utsname.h>.
+?C:.
+?H:#$i_sysutsname I_SYS_UTSNAME /**/
+?H:.
+?LINT:set i_sysutsname
+: see if this is a sys/utsname system
+set sys/utsname.h i_sysutsname
+eval $inhdr
+
diff --git a/mcon/U/i_sysvfs.U b/mcon/U/i_sysvfs.U
new file mode 100644
index 0000000..c623528
--- /dev/null
+++ b/mcon/U/i_sysvfs.U
@@ -0,0 +1,29 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:i_sysvfs: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_sysvfs:
+?S: This variable conditionally defines the I_SYS_VFS symbol, and indicates
+?S: whether a C program should include <sys/vfs.h> to be able to issue
+?S: the statfs() call to get filesystem statistics.
+?S:.
+?C:I_SYS_VFS:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <sys/vfs.h> to get the struct statfs definition for the
+?C: statfs() system call.
+?C:.
+?H:#$i_sysvfs I_SYS_VFS /**/
+?H:.
+?LINT:set i_sysvfs
+: see if this is a sys/vfs system
+set sys/vfs.h i_sysvfs
+eval $inhdr
+
diff --git a/mcon/U/i_syswait.U b/mcon/U/i_syswait.U
new file mode 100644
index 0000000..20ff974
--- /dev/null
+++ b/mcon/U/i_syswait.U
@@ -0,0 +1,34 @@
+?RCS: $Id$
+?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: i_syswait.U,v $
+?RCS: Revision 3.0 1993/08/18 12:08:42 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: This unit looks wether <sys/wait.h> is available or not
+?X:
+?MAKE:i_syswait: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_syswait:
+?S: This variable conditionally defines I_SYS_WAIT, which indicates
+?S: to the C program that it should include <sys/wait.h>.
+?S:.
+?C:I_SYS_WAIT (I_SYSWAIT):
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <sys/wait.h>.
+?C:.
+?H:#$i_syswait I_SYS_WAIT /**/
+?H:.
+?LINT:set i_syswait
+: see if this is a syswait system
+set sys/wait.h i_syswait
+eval $inhdr
+
diff --git a/mcon/U/i_termio.U b/mcon/U/i_termio.U
new file mode 100644
index 0000000..b4a229e
--- /dev/null
+++ b/mcon/U/i_termio.U
@@ -0,0 +1,134 @@
+?RCS: $Id$
+?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: i_termio.U,v $
+?RCS: Revision 3.0.1.4 1994/10/29 16:20:54 ram
+?RCS: patch36: call ./usg and ./Cppsym explicitly instead of relying on PATH
+?RCS:
+?RCS: Revision 3.0.1.3 1994/08/29 16:26:38 ram
+?RCS: patch32: don't include all three I_* symbols in config.h
+?RCS: patch32: (had forgotten to undo this part last time)
+?RCS:
+?RCS: Revision 3.0.1.2 1994/05/13 15:25:03 ram
+?RCS: patch27: undone ADO's fix in previous patch since it was useless
+?RCS:
+?RCS: Revision 3.0.1.1 1994/05/06 15:05:23 ram
+?RCS: patch23: now include all three defines in config.h (ADO)
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:08:44 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:i_termio i_sgtty i_termios: Trylink Cppsym Guess Setvar Findhdr Warn \
+ test cat
+?MAKE: -pick add $@ %<
+?S:i_termio:
+?S: This variable conditionally defines the I_TERMIO symbol, which
+?S: indicates to the C program that it should include <termio.h> rather
+?S: than <sgtty.h>.
+?S:.
+?S:i_termios:
+?S: This variable conditionally defines the I_TERMIOS symbol, which
+?S: indicates to the C program that the POSIX <termios.h> file is
+?S: to be included.
+?S:.
+?S:i_sgtty:
+?S: This variable conditionally defines the I_SGTTY symbol, which
+?S: indicates to the C program that it should include <sgtty.h> rather
+?S: than <termio.h>.
+?S:.
+?C:I_TERMIO:
+?C: This symbol, if defined, indicates that the program should include
+?C: <termio.h> rather than <sgtty.h>. There are also differences in
+?C: the ioctl() calls that depend on the value of this symbol.
+?C:.
+?C:I_TERMIOS:
+?C: This symbol, if defined, indicates that the program should include
+?C: the POSIX termios.h rather than sgtty.h or termio.h.
+?C: There are also differences in the ioctl() calls that depend on the
+?C: value of this symbol.
+?C:.
+?C:I_SGTTY:
+?C: This symbol, if defined, indicates that the program should include
+?C: <sgtty.h> rather than <termio.h>. There are also differences in
+?C: the ioctl() calls that depend on the value of this symbol.
+?C:.
+?H:#$i_termio I_TERMIO /**/
+?H:#$i_termios I_TERMIOS /**/
+?H:#$i_sgtty I_SGTTY /**/
+?H:.
+?T:val2 val3
+?LINT:set i_termio i_sgtty i_termios
+: see if this is a termio system
+val="$undef"
+val2="$undef"
+val3="$undef"
+?X: Prefer POSIX-approved termios.h over all else
+$cat >try.c <<EOC
+#include <termios.h>
+int main(void)
+{
+ static struct termios t;
+ static int ret;
+ ret |= tcsetattr(1, 2, &t);
+ return ret ? 0 : 1;
+}
+EOC
+set i_termios
+eval $trylink
+set tcsetattr i_termios
+val3="$i_termios"
+
+echo " "
+case "$val3" in
+"$define") echo "You have POSIX termios.h... good!" >&4;;
+*) if ./Cppsym pyr; then
+ case "`/bin/universe`" in
+ ucb) if $test `./findhdr sgtty.h`; then
+ val2="$define"
+ echo "<sgtty.h> found." >&4
+ else
+ echo "System is pyramid with BSD universe."
+ ./warn "<sgtty.h> not found--you could have problems." 4>&4
+ fi;;
+ *) if $test `./findhdr termio.h`; then
+ val="$define"
+ echo "<termio.h> found." >&4
+ else
+ echo "System is pyramid with USG universe."
+ ./warn "<termio.h> not found--you could have problems." 4>&4
+ fi;;
+ esac
+?X: Start with USG to avoid problems if both usg/bsd was guessed
+ elif ./usg; then
+ if $test `./findhdr termio.h`; then
+ echo "<termio.h> found." >&4
+ val="$define"
+ elif $test `./findhdr sgtty.h`; then
+ echo "<sgtty.h> found." >&4
+ val2="$define"
+ else
+ ./warn "Neither <termio.h> nor <sgtty.h> found--cross fingers!" 4>&4
+ fi
+ else
+ if $test `./findhdr sgtty.h`; then
+ echo "<sgtty.h> found." >&4
+ val2="$define"
+ elif $test `./findhdr termio.h`; then
+ echo "<termio.h> found." >&4
+ val="$define"
+ else
+ ./warn "Neither <sgtty.h> nor <termio.h> found--cross fingers!" 4>&4
+ fi
+ fi;;
+esac
+set i_termio; eval $setvar
+val=$val2; set i_sgtty; eval $setvar
+val=$val3; set i_termios; eval $setvar
+
diff --git a/mcon/U/i_time.U b/mcon/U/i_time.U
new file mode 100644
index 0000000..cd7ec6d
--- /dev/null
+++ b/mcon/U/i_time.U
@@ -0,0 +1,171 @@
+?RCS: $Id$
+?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: i_time.U,v $
+?RCS: Revision 3.0 1993/08/18 12:08:45 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: This unit finds which "time" include to use. If 'timezone' is used by the
+?X: program, we also try to find which header should be included. Eventually,
+?X: we look for <sys/select.h> if I_SYSSELECT is used, to get struct timeval.
+?X:
+?MAKE:i_time i_systime i_systimek timeincl: cat cc ccflags contains rm_try \
+ echo n c +i_sysselct Findhdr
+?MAKE: -pick add $@ %<
+?S:i_time:
+?S: This variable conditionally defines I_TIME, which indicates
+?S: to the C program that it should include <time.h>.
+?S:.
+?S:i_systime:
+?S: This variable conditionally defines I_SYS_TIME, which indicates
+?S: to the C program that it should include <sys/time.h>.
+?S:.
+?S:i_systimek:
+?S: This variable conditionally defines I_SYS_TIME_KERNEL, which
+?S: indicates to the C program that it should include <sys/time.h>
+?S: with KERNEL defined.
+?S:.
+?S:timeincl:
+?S: This variable holds the full path of the included time header(s).
+?S:.
+?C:I_TIME (USE_TIME_H):
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <time.h>.
+?C:.
+?C:I_SYS_TIME (I_SYSTIME USE_SYS_TIME_H NO_TIME_WITH_SYS_TIME):
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <sys/time.h>.
+?C:.
+?C:I_SYS_TIME_KERNEL (I_SYSTIMEKERNEL):
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <sys/time.h> with KERNEL defined.
+?C:.
+?H:#$i_time I_TIME /**/
+?H:#$i_systime I_SYS_TIME /**/
+?H:#$i_systimek I_SYS_TIME_KERNEL /**/
+?H:.
+?W::timezone
+?T:xselect flags sysselect s_timeval s_timezone
+?LINT:change i_sysselct
+: see if we should include time.h, sys/time.h, or both
+echo " "
+echo "Testing to see if we should include <time.h>, <sys/time.h> or both." >&4
+$echo $n "I'm now running the test program...$c"
+$cat >try.c <<'EOCP'
+#include <sys/types.h>
+#ifdef I_TIME
+#include <time.h>
+#endif
+#ifdef I_SYSTIME
+#ifdef SYSTIMEKERNEL
+#define KERNEL
+#endif
+#include <sys/time.h>
+#endif
+#ifdef I_SYSSELECT
+#include <sys/select.h>
+#endif
+int main(void)
+{
+ struct tm foo;
+#ifdef S_TIMEVAL
+ struct timeval bar;
+#endif
+#ifdef S_TIMEZONE
+ struct timezone tzp;
+#endif
+ if (foo.tm_sec == foo.tm_sec)
+ return 0;
+#ifdef S_TIMEVAL
+ if (bar.tv_sec == bar.tv_sec)
+ return 0;
+#endif
+ return 1;
+}
+EOCP
+flags=''
+@if I_SYSSELECT
+if $contains 'timeval.*{' `./findhdr sys/select.h` >/dev/null 2>&1; then
+ xselect='-DI_SYSSELECT'
+else
+ xselect=''
+fi
+@end
+@if timezone
+for s_timezone in '-DS_TIMEZONE' ''; do
+@else
+s_timezone=''
+@end
+?X: Every package is given a try with 'struct timeval'
+@if I_SYSSELECT
+for sysselect in $xselect ''; do
+@else
+sysselect=''
+@end
+for s_timeval in '-DS_TIMEVAL' ''; do
+for i_systimek in '' '-DSYSTIMEKERNEL'; do
+for i_time in '' '-DI_TIME'; do
+for i_systime in '-DI_SYSTIME' ''; do
+ case "$flags" in
+ '') $echo $n ".$c"
+ if $cc $ccflags \
+ $i_time $i_systime $i_systimek $sysselect $s_timeval $s_timezone \
+ -o try try.c >/dev/null 2>&1 ; then
+ set X $i_time $i_systime $i_systimek $sysselect $s_timeval
+ shift
+ flags="$*"
+ echo " "
+ $echo $n "Succeeded with $flags$c"
+ fi
+ ;;
+ esac
+done
+done
+done
+done
+@if I_SYSSELECT
+done
+@end
+@if timezone
+done
+@end
+timeincl=''
+echo " "
+case "$flags" in
+*SYSTIMEKERNEL*) i_systimek="$define"
+ timeincl=`./findhdr sys/time.h`
+ echo "We'll include <sys/time.h> with KERNEL defined." >&4;;
+*) i_systimek="$undef";;
+esac
+case "$flags" in
+*I_TIME*) i_time="$define"
+ timeincl=`./findhdr time.h`" $timeincl"
+ echo "We'll include <time.h>." >&4;;
+*) i_time="$undef";;
+esac
+case "$flags" in
+*I_SYSTIME*) i_systime="$define"
+ timeincl=`./findhdr sys/time.h`" $timeincl"
+ echo "We'll include <sys/time.h>." >&4;;
+*) i_systime="$undef";;
+esac
+@if I_SYSSELECT
+case "$flags" in
+*I_SYSSELECT*) i_sysselct="$define"
+ timeincl=`./findhdr sys/select.h`" $timeincl"
+ echo "We'll also include <sys/select.h> to get struct timeval." >&4;;
+*) case "$i_sysselct" in
+ '') i_sysselct="$undef";;
+ esac
+esac
+@end
+$rm_try
+
diff --git a/mcon/U/i_ucontext.U b/mcon/U/i_ucontext.U
new file mode 100644
index 0000000..8de1d97
--- /dev/null
+++ b/mcon/U/i_ucontext.U
@@ -0,0 +1,96 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 2012 Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:i_ucontext i_sys_ucontext: Inhdr cat echo n c rm \
+ +cc +ccflags +ldflags
+?MAKE: -pick add $@ %<
+?S:i_ucontext:
+?S: This variable conditionally defines the I_UCONTEXT symbol, and indicates
+?S: whether a C program may include <ucontext.h> to get ucontext_t.
+?S:.
+?S:i_sys_ucontext:
+?S: This variable conditionally defines the I_SYS_UCONTEXT symbol, and
+?S: indicates whether a C program may include <sys/ucontext.h> to get
+?S: ucontext_t.
+?S:.
+?C:I_UCONTEXT:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <ucontext.h> to get at the user thread context. A portable
+?C: program must also check I_SYS_UCONTEXT for <sys/ucontex.h> inclusion,
+?C: especially on OSX.
+?C:.
+?C:I_SYS_UCONTEXT:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <sys/ucontext.h> to get at the user thread context. A portable
+?C: program must also check I_UCONTEXT for <ucontex.h> inclusion.
+?C:.
+?H:#$i_ucontext I_UCONTEXT /**/
+?H:#$i_sys_ucontext I_SYS_UCONTEXT /**/
+?H:.
+?T:working
+: see if this is a ucontext.h system
+set ucontext.h i_ucontext
+eval $inhdr
+
+: see if this is a sys/ucontext.h system
+set sys/ucontext.h i_sys_ucontext
+eval $inhdr
+
+: when both ucontext.h and sys/ucontext.h are available, check which one works
+case "$i_ucontext$i_sys_ucontext" in
+"$define$define")
+ echo " "
+ $cat >try.c <<'EOC'
+#ifdef I_UCONTEXT
+#include <ucontext.h>
+#endif
+#ifdef I_SYS_UCONTEXT
+#include <sys/ucontext.h>
+#endif
+
+int main(void)
+{
+ static ucontext_t u;
+ return (int) sizeof(u) & 0xff;
+}
+EOC
+ $echo $n "Checking whether including <ucontext.h> alone works...$c" >&4
+ working=
+ if $cc $ccflags -DI_UCONTEXT -o try try.c $ldflags >/dev/null 2>&1; then
+ working="$define"
+ fi
+ case "$working" in
+ "$define")
+ echo " yes." >&4
+ i_sys_ucontext="$undef"
+ ;;
+ *)
+ echo "no." >&4
+ echo " "
+ $echo $n "Checking whether including <sys/ucontext.h> works...$c" >&4
+ working=
+ if $cc $ccflags -DI_SYS_UCONTEXT \
+ -o try try.c $ldflags >/dev/null 2>&1
+ then
+ working="$define"
+ fi
+ case "$working" in
+ "$define")
+ echo " yes, ignoring <ucontext.h>." >&4
+ i_ucontext="$undef"
+ ;;
+ *) echo " no, we'll include both then." >&4;;
+ esac
+ ;;
+ esac
+ ;;
+esac
+$rm -f try.*
+
diff --git a/mcon/U/i_unistd.U b/mcon/U/i_unistd.U
new file mode 100644
index 0000000..093d1b6
--- /dev/null
+++ b/mcon/U/i_unistd.U
@@ -0,0 +1,31 @@
+?RCS: $Id$
+?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: i_unistd.U,v $
+?RCS: Revision 3.0 1993/08/18 12:08:46 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:i_unistd: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_unistd:
+?S: This variable conditionally defines the I_UNISTD symbol, and indicates
+?S: whether a C program should include <unistd.h>.
+?S:.
+?C:I_UNISTD:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <unistd.h>.
+?C:.
+?H:#$i_unistd I_UNISTD /**/
+?H:.
+?LINT:set i_unistd
+: see if this is a unistd.h system
+set unistd.h i_unistd
+eval $inhdr
+
diff --git a/mcon/U/i_utime.U b/mcon/U/i_utime.U
new file mode 100644
index 0000000..7510b3d
--- /dev/null
+++ b/mcon/U/i_utime.U
@@ -0,0 +1,31 @@
+?RCS: $Id$
+?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: i_utime.U,v $
+?RCS: Revision 3.0 1993/08/18 12:08:47 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:i_utime: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_utime:
+?S: This variable conditionally defines the I_UTIME symbol, and indicates
+?S: whether a C program should include <utime.h>.
+?S:.
+?C:I_UTIME:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <utime.h>.
+?C:.
+?H:#$i_utime I_UTIME /**/
+?H:.
+?LINT:set i_utime
+: see if this is an utime system
+set utime.h i_utime
+eval $inhdr
+
diff --git a/mcon/U/i_values.U b/mcon/U/i_values.U
new file mode 100644
index 0000000..6ab704b
--- /dev/null
+++ b/mcon/U/i_values.U
@@ -0,0 +1,35 @@
+?RCS: $Id$
+?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 License,
+?RCS: as specified in the 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: i_values.U,v $
+?RCS: Revision 3.0.1.1 1997/02/28 15:48:34 ram
+?RCS: patch61: created
+?RCS:
+?MAKE:i_values: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_values:
+?S: This variable conditionally defines the I_VALUES symbol, and indicates
+?S: whether a C program may include <values.h> to get symbols like MAXLONG
+?S: and friends.
+?S:.
+?C:I_VALUES:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <values.h> to get definition of symbols like MINFLOAT or
+?C: MAXLONG, i.e. machine dependant limitations. Probably, you
+?C: should use <limits.h> instead, if it is available.
+?C:.
+?H:#$i_values I_VALUES /**/
+?H:.
+?LINT:set i_values
+: see if this is a values.h system
+set values.h i_values
+eval $inhdr
+
diff --git a/mcon/U/i_varhdr.U b/mcon/U/i_varhdr.U
new file mode 100644
index 0000000..9e1e3ee
--- /dev/null
+++ b/mcon/U/i_varhdr.U
@@ -0,0 +1,165 @@
+?RCS: $Id$
+?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: i_varhdr.U,v $
+?RCS: Revision 3.0.1.3 1997/02/28 15:54:42 ram
+?RCS: patch61: varargs script now starts with leading "startsh"
+?RCS:
+?RCS: Revision 3.0.1.2 1994/10/29 16:21:02 ram
+?RCS: patch36: added ?F: line for metalint file checking
+?RCS:
+?RCS: Revision 3.0.1.1 1994/05/13 15:26:05 ram
+?RCS: patch27: this unit now supersedes old i_stdarg.U and i_varargs.U
+?RCS: patch27: modified to avoid spurious Whoa warnings (ADO)
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:08:49 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:i_stdarg i_varargs i_varhdr: cat +cc +ccflags rm test Setvar \
+ Findhdr Warn startsh _o
+?MAKE: -pick add $@ %<
+?S:i_stdarg:
+?S: This variable conditionally defines the I_STDARG symbol, which
+?S: indicates to the C program that <stdarg.h> exists and should
+?S: be included.
+?S:.
+?S:i_varargs:
+?S: This variable conditionally defines I_VARARGS, which indicates
+?S: to the C program that it should include <varargs.h>.
+?S:.
+?S:i_varhdr:
+?S: Contains the name of the header to be included to get va_dcl definition.
+?S: Typically one of varargs.h or stdarg.h.
+?S:.
+?C:I_STDARG:
+?C: This symbol, if defined, indicates that <stdarg.h> exists and should
+?C: be included.
+?C:.
+?C:I_VARARGS:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <varargs.h>.
+?C:.
+?H:#$i_stdarg I_STDARG /**/
+?H:#$i_varargs I_VARARGS /**/
+?H:.
+?W:%<:va_dcl
+?F:!varargs
+?T:valstd
+?LINT:set i_stdarg i_varargs
+?X:
+?X: Don't use setvar because the varags test below might override these.
+?X: Actually, the messages here are just informative. We don't wish to set
+?X: i_varargs or i_stdarg to their final value before knowing which of the
+?X: two we'll include.
+?X:
+: see if stdarg is available
+echo " "
+if $test `./findhdr stdarg.h`; then
+ echo "<stdarg.h> found." >&4
+ valstd="$define"
+else
+ echo "<stdarg.h> NOT found." >&4
+ valstd="$undef"
+fi
+
+: see if varags is available
+echo " "
+if $test `./findhdr varargs.h`; then
+ echo "<varargs.h> found." >&4
+else
+ echo "<varargs.h> NOT found, but that's ok (I hope)." >&4
+fi
+
+?X:
+?X: if you have stdarg.h, you need to support prototypes to actually use it;
+?X: but if stdarg.h exists and the compiler doesn't support prototypes (for some
+?X: bizarre reason), we'll fall back to varargs.h anyway so it's not so bad.
+?X:
+: set up the varargs testing programs
+$cat > varargs.c <<EOP
+#ifdef I_STDARG
+#include <stdarg.h>
+#endif
+#ifdef I_VARARGS
+#include <varargs.h>
+#endif
+
+#ifdef I_STDARG
+int f(char *p, ...)
+#else
+int f(va_alist)
+va_dcl
+#endif
+{
+ va_list ap;
+#ifndef I_STDARG
+ char *p;
+#endif
+#ifdef I_STDARG
+ va_start(ap,p);
+#else
+ va_start(ap);
+ p = va_arg(ap, char *);
+#endif
+ va_end(ap);
+ return 0;
+}
+EOP
+$cat > varargs <<EOP
+$startsh
+if $cc -c $ccflags -D\$1 varargs.c; then
+ echo "true"
+else
+ echo "false"
+fi
+$rm -f varargs$_o
+EOP
+chmod +x varargs
+
+: now check which varargs header should be included
+echo " "
+i_varhdr=''
+case "$valstd" in
+"$define")
+ if `./varargs I_STDARG`; then
+ val='stdarg.h'
+ elif `./varargs I_VARARGS`; then
+ val='varargs.h'
+ fi
+ ;;
+*)
+ if `./varargs I_VARARGS`; then
+ val='varargs.h'
+ fi
+ ;;
+esac
+case "$val" in
+'')
+ ./warn "I could not find the definition for va_dcl... You have problems..." 4>&4
+ val="$undef"; set i_stdarg; eval $setvar
+ val="$undef"; set i_varargs; eval $setvar
+ ;;
+*)
+ set i_varhdr
+ eval $setvar
+ case "$i_varhdr" in
+ stdarg.h)
+ val="$define"; set i_stdarg; eval $setvar
+ val="$undef"; set i_varargs; eval $setvar
+ ;;
+ varargs.h)
+ val="$undef"; set i_stdarg; eval $setvar
+ val="$define"; set i_varargs; eval $setvar
+ ;;
+ esac
+ echo "We'll include <$i_varhdr> to get va_dcl definition." >&4;;
+esac
+$rm -f varargs*
+
diff --git a/mcon/U/i_vfork.U b/mcon/U/i_vfork.U
new file mode 100644
index 0000000..b32a21f
--- /dev/null
+++ b/mcon/U/i_vfork.U
@@ -0,0 +1,40 @@
+?RCS: $Id$
+?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: i_vfork.U,v $
+?RCS: Revision 3.0.1.1 1994/05/06 15:05:44 ram
+?RCS: patch23: avoid inclusion of <vfork.h> if no vfork() used (ADO)
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:08:50 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:i_vfork: Inhdr d_vfork
+?MAKE: -pick add $@ %<
+?S:i_vfork:
+?S: This variable conditionally defines the I_VFORK symbol, and indicates
+?S: whether a C program should include vfork.h.
+?S:.
+?C:I_VFORK:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include vfork.h.
+?C:.
+?H:#$i_vfork I_VFORK /**/
+?H:.
+: see if this is a vfork system
+case "$d_vfork" in
+"$define")
+ set vfork.h i_vfork
+ eval $inhdr
+ ;;
+*)
+ i_vfork="$undef"
+ ;;
+esac
+
diff --git a/mcon/U/i_whoami.U b/mcon/U/i_whoami.U
new file mode 100644
index 0000000..d1cd36d
--- /dev/null
+++ b/mcon/U/i_whoami.U
@@ -0,0 +1,35 @@
+?RCS: $Id$
+?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: i_whoami.U,v $
+?RCS: Revision 3.0.1.1 1993/08/25 14:02:21 ram
+?RCS: patch6: added default for i_whoami
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:08:50 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:i_whoami: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_whoami (d_whoami):
+?S: This variable conditionally defines the I_WHOAMI symbol, which
+?S: indicates to the C program that it should include <whoami.h>.
+?S:.
+?C:I_WHOAMI (WHOAMI):
+?C: This symbol, if defined, indicates that the program may include
+?C: <whoami.h>.
+?C:.
+?H:#$i_whoami I_WHOAMI /**/
+?H:.
+?D:i_whoami=''
+?LINT:set i_whoami
+: see if there is a whoami.h file
+set whoami.h i_whoami
+eval $inhdr
+
diff --git a/mcon/U/i_winsock2.U b/mcon/U/i_winsock2.U
new file mode 100644
index 0000000..bb93726
--- /dev/null
+++ b/mcon/U/i_winsock2.U
@@ -0,0 +1,27 @@
+?RCS: $Id: i_limits.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:i_winsock2: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_winsock2:
+?S: This variable conditionally defines the I_WINSOCK2 symbol, and indicates
+?S: whether a C program may include <Winsock2.h>.
+?S:.
+?C:I_WINSOCK2:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <Winsock2.h>.
+?C:.
+?H:#$i_winsock2 I_WINSOCK2 /**/
+?H:.
+?LINT:set i_winsock2
+: see if this is a winsock2.h system
+set winsock2.h i_winsock2
+eval $inhdr
+
diff --git a/mcon/U/i_ws2tcpip.U b/mcon/U/i_ws2tcpip.U
new file mode 100644
index 0000000..8c1c079
--- /dev/null
+++ b/mcon/U/i_ws2tcpip.U
@@ -0,0 +1,27 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, 2010, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:i_ws2tcpip: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_ws2tcpip:
+?S: This variable conditionally defines the I_WS2TCPIP symbol, and indicates
+?S: whether a C program may include <Ws2tcpip.h>.
+?S:.
+?C:I_WS2TCPIP:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <Ws2tcpip.h>.
+?C:.
+?H:#$i_ws2tcpip I_WS2TCPIP /**/
+?H:.
+?LINT:set i_ws2tcpip
+: see if this is a ws2tcpip.h system
+set ws2tcpip.h i_ws2tcpip
+eval $inhdr
+
diff --git a/mcon/U/i_zlib.U b/mcon/U/i_zlib.U
new file mode 100644
index 0000000..bb4577a
--- /dev/null
+++ b/mcon/U/i_zlib.U
@@ -0,0 +1,31 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?X:
+?X: This unit looks whether <zlib.h> is available or not
+?X:
+?MAKE:i_zlib: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_zlib:
+?S: This variable conditionally defines I_ZLIB, which indicates
+?S: to the C program that it should include <zlib.h>.
+?S:.
+?C:I_ZLIB:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <zlib.h>.
+?C:.
+?H:#$i_zlib I_ZLIB /**/
+?H:.
+?Y:BOTTOM
+?LINT:set i_zlib
+: see if this is a zlib.h system
+set zlib.h i_zlib
+eval $inhdr
+
diff --git a/mcon/U/ilp.U b/mcon/U/ilp.U
new file mode 100644
index 0000000..7d55ced
--- /dev/null
+++ b/mcon/U/ilp.U
@@ -0,0 +1,116 @@
+?RCS:
+?RCS: Copyright (c) 2012 Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:ilp d_ilp32 d_ilp64 d_lp64 d_can64: Assert Myread Setvar \
+ cat rm +cc +ccflags echo n c intsize longsize ptrsize
+?MAKE: -pick add $@ %<
+?S:ilp:
+?S: This variable contains the largest amount of bits that the CPU supports,
+?S: from the compiler's point of view. Typically 32 or 64.
+?S:.
+?S:d_ilp32:
+?S: This variable conditionally defines the CPU_IS_ILP32.
+?S:.
+?S:d_ilp64:
+?S: This variable conditionally defines the CPU_IS_ILP64.
+?S:.
+?S:d_lp64:
+?S: This variable conditionally defines the CPU_IS_LP64.
+?S:.
+?S:d_can64:
+?S: This variable conditionally defines CAN_HANDLE_64BITS.
+?S:.
+?C:CPU_ILP_MAXBITS:
+?C: This symbol contains the largest amount of bits that the CPU natively
+?C: supports from the compiler's point of view. Typically 32 or 64.
+?C:.
+?C:CPU_IS_ILP32:
+?C: When defined, this indicates that the integer, long and pointer variables
+?C: hold 32-bit values.
+?C:.
+?C:CPU_IS_ILP64:
+?C: When defined, this indicates that the integer, long and pointer variables
+?C: hold 64-bit values.
+?C:.
+?C:CPU_IS_LP64:
+?C: When defined, this indicates that the long and pointer variables hold
+?C: 64-bit values but integers are smaller (probably only 32-bit wide).
+?C:.
+?C:CAN_HANDLE_64BITS:
+?C: When defined, this indicates that the compiler can handle 64-bit values
+?C: despite the CPU having only 32-bit registers. These are available using
+?C: the "long long" C type. It is only defined for ILP32 machines, since
+?C: 64-bit support is naturally available on ILP64 and LP64 machines.
+?C:.
+?H:#define CPU_ILP_MAXBITS $ilp
+?H:#$d_ilp32 CPU_IS_ILP32 /**/
+?H:#$d_ilp64 CPU_IS_ILP64 /**/
+?H:#$d_lp64 CPU_IS_LP64 /**/
+?H:#$d_can64 CAN_HANDLE_64BITS /**/
+?H:.
+?LINT: set d_ilp32 d_ilp64 d_lp64 d_can64
+: check for architecture type
+echo " "
+$echo $n "Computing CPU architecture type...$c" >&4
+ilp=`expr $longsize \* 8`
+case "$ptrsize" in
+8)
+ val=$undef; set d_ilp32; eval $setvar
+ case "$intsize" in
+ 8)
+ echo " ILP64." >&4
+ val=$define; set d_ilp64; eval $setvar
+ val=$undef; set d_lp64; eval $setvar
+ ;;
+ *)
+ echo " LP64." >&4
+ val=$define; set d_lp64; eval $setvar
+ val=$undef; set d_ilp64; eval $setvar
+ ;;
+ esac
+ ;;
+*)
+ echo " ILP${ilp}." >&4
+ case "$ilp" in
+ 32) val=$define;;
+ *) val=$undef;;
+ esac
+ set d_ilp32; eval $setvar
+ val=$undef; set d_ilp64; eval $setvar
+ val=$undef; set d_lp64; eval $setvar
+ ;;
+esac
+
+@if CAN_HANDLE_64BITS || d_can64
+: see whether compiler supports 64-bit emulation
+val=$undef
+case "$ilp" in
+64) val=$define;;
+*)
+ $cat >try.c <<EOCP
+#include "static_assert.h"
+long long foo;
+int main()
+{
+ STATIC_ASSERT(8 == sizeof(foo));
+ return 0;
+}
+EOCP
+ if $cc -c $ccflags try.c >/dev/null 2>&1; then
+ echo " "
+ echo "Your compiler also supports 64-bit emulation." >&4
+ val=$define
+ fi
+ $rm -f try.*
+ ;;
+esac
+set d_can64
+eval $setvar
+
+@end
diff --git a/mcon/U/inc.U b/mcon/U/inc.U
new file mode 100644
index 0000000..7fbb44e
--- /dev/null
+++ b/mcon/U/inc.U
@@ -0,0 +1,39 @@
+?RCS: $Id$
+?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: inc.U,v $
+?RCS: Revision 3.0 1993/08/18 12:08:51 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:inc incexp: Loc Oldconfig Getfile usrinc
+?MAKE: -pick add $@ %<
+?S:inc:
+?S: This variable holds the name of the directory in which the user wants
+?S: to put public header files for the package in question. It is most
+?S: often a local directory such as /usr/local/include.
+?S:.
+?S:incexp:
+?S: This is the same as the inc variable, but is filename-expanded
+?S: at configuration time for convenient use in your makefiles.
+?S:.
+: determine where public header files go
+case "$inc" in
+'')
+ dflt=`./loc . "." /usr/local/include /usr/include/local $usrinc`
+ ;;
+*) dflt="$inc"
+ ;;
+esac
+fn=d~
+rp='Where do you want to put the public header files?'
+. ./getfile
+inc="$ans"
+incexp="$ansexp"
+
diff --git a/mcon/U/install.U b/mcon/U/install.U
new file mode 100644
index 0000000..dde9376
--- /dev/null
+++ b/mcon/U/install.U
@@ -0,0 +1,199 @@
+?RCS: $Id$
+?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: install.U,v $
+?RCS: Revision 3.0.1.2 1995/09/25 09:16:37 ram
+?RCS: patch59: all possible install programs are now looked for
+?RCS:
+?RCS: Revision 3.0.1.1 1995/01/11 15:30:41 ram
+?RCS: patch45: created
+?RCS:
+?MAKE:install installdir: Loc Oldconfig Getfile cat test startsh rm +cc \
+ eunicefix package contains mkdir echo n c awk wc
+?MAKE: -pick add $@ %<
+?S:install:
+?S: This variable contains the name of an install program that can accept
+?S: BSD-style arguments. It must correctly support -c, -s, and -m at least.
+?S: It is a fully qualified pathname when found. If you have a local
+?S: install.SH file at the root directory of your package, it is assumed to
+?S: be the default script emulating a BSD install and the variable will be
+?S: set to ./install. Otherwise, it is set to plain 'install', relying on
+?S: the user's PATH to perform miracles.
+?S:.
+?S:installdir:
+?S: This variable contains the name of a program that can install nested
+?S: directories. Often set to 'mkdir -p', it can also be 'install -d' if
+?S: you have such a beast and lack the former. If you have an install.SH
+?S: file at the root directory of your package, it will be used in last
+?S: resort, setting the variable to './install -d'. Otherwise, it is set to
+?S: plain 'mkdir', and cross your fingers!
+?S:.
+?T:dir file tryit prog creatdir either try_wc d_try_wc tryns_wc d_tryns_wc
+?F:!tryinst
+: locate a BSD compatible install program
+echo " "
+echo "Looking for a BSD-compatible install program..." >&4
+@if installdir
+creatdir=''
+@end
+case "$install" in
+'')
+ tryit=''
+ for dir in $pth; do
+ for file in ginstall installbsd scoinst install; do
+ if $test -f $dir/$file; then
+ tryit="$tryit $dir/$file"
+ fi
+ done
+ done
+ $cat >try.c <<EOC
+int main()
+{
+ printf("OK\n");
+ exit(0);
+}
+EOC
+ if $cc -o try try.c >/dev/null 2>&1; then
+ cp try try.ns
+ strip try >/dev/null 2>&1
+ else
+ echo "(I can't seem to compile a trivial C program -- bypassing.)"
+ echo "try" >try
+ cp try try.ns
+ fi
+ $cat >tryinst <<EOS
+$startsh
+$rm -rf foo d
+@if installdir
+\$1 -d foo/bar
+@end
+$mkdir d
+\$1 -c -m 764 try.ns d
+\$1 -c -s -m 642 try.ns d/try
+EOS
+ chmod +x tryinst
+ $eunicefix tryinst
+ dflt=''
+ either=''
+ for prog in $tryit; do
+ $echo $n "Checking $prog... $c"
+ ./tryinst $prog >/dev/null 2>&1
+@if installdir
+ if $test -d foo/bar; then
+ creatdir="$prog -d"
+ fi
+@end
+ (ls -l d/try >try.ls; ls -l d/try.ns >tryno.ls) 2>/dev/null
+ 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
+ dflt="$prog"
+ echo "ok, that will do."
+ break
+ fi
+ echo "not good$either."
+ either=' either'
+ $rm -f try*.ls
+ done
+ $rm -rf foo d tryinst try try*.ls try.*
+ case "$dflt" in
+ '')
+@if {test -f ../install.SH}
+ echo "Hopefully, $package comes with its own install script!"
+ dflt='./install'
+@else
+ dflt='install'
+@end
+ ;;
+ esac
+ ;;
+*) dflt="$install";;
+esac
+$cat <<EOM
+
+I will be requiring a BSD-compatible install program (one that allows
+options like -s to strip executables or -m to specify a file mode) to
+install $package.
+
+If the question below contains a fully qualified default path, then it
+is probably ok. If it is an unqualified name such as 'install', then it
+means I was unable to find out a good install program I could use. If
+@if {test -f ../install.SH}
+you know of one, please tell me about it. If the default is './install',
+then I shall be using the install script supplied with $package.
+@else
+you know of one, please tell me about it.
+@end
+
+EOM
+@if {test -f ../install.SH}
+fn='/fe~(install,./install)'
+@else
+fn='/fe~(install)'
+@end
+rp='Which install program shall I use?'
+. ./getfile
+install="$ans"
+
+@if installdir
+: how can we create nested directories?
+echo " "
+echo "Ok, let's see how we can create nested directories..." >&4
+case "$installdir" in
+'')
+?X: First time, maybe we already found out a working one in $creatdir above...
+?X: Prefer "mkdir -p" because of bugs in GNU install when not running as root
+ $mkdir -p foo/bar >/dev/null 2>&1
+ if $test -d foo/bar; then
+ echo "Great, we can build them using 'mkdir -p'."
+ creatdir='mkdir -p'
+ else
+ case "$creatdir" in
+ '')
+ if eval "$install -d foo/bar"; $test -d foo/bar; then
+ creatdir="install -d"
+ echo "It looks like '$creatdir' will do it for us."
+ fi
+ ;;
+ *)
+ eval "$creatdir foo/bar" >/dev/null 2>&1
+ if $test -d foo/bar; then
+ echo "Ah! We can use '$creatdir' to do just that."
+ else
+ creatdir=''
+ fi
+ ;;
+ esac
+ fi
+ $rm -rf foo
+ case "$creatdir" in
+ '')
+ echo "Heck! Another ancient system lacking the comfort of modern ones!"
+@if {test -f ../install.SH}
+ echo "You can thank $package for bringing you its own install script!"
+ installdir='./install -d'
+@else
+ echo "We have no choice but to use plain old 'mkdir' -- wish me luck!"
+ installdir=mkdir
+@end
+ ;;
+ *) installdir="$creatdir";;
+ esac
+ ;;
+*) echo "As you already told me, '$installdir' should work.";;
+esac
+
+@end
diff --git a/mcon/U/intsize.U b/mcon/U/intsize.U
new file mode 100644
index 0000000..d5135db
--- /dev/null
+++ b/mcon/U/intsize.U
@@ -0,0 +1,89 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, 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:intsize longsize shortsize: Assert Myread cat rm_try +cc +ccflags echo n c
+?MAKE: -pick add $@ %<
+?S:intsize:
+?S: This variable contains the value of the INTSIZE symbol, which
+?S: indicates to the C program how many bytes there are in an int.
+?S:.
+?S:longsize:
+?S: This variable contains the value of the LONGSIZE symbol, which
+?S: indicates to the C program how many bytes there are in a long.
+?S:.
+?S:shortsize:
+?S: This variable contains the value of the SHORTSIZE symbol which
+?S: indicates to the C program how many bytes there are in a short.
+?S:.
+?C:INTSIZE:
+?C: This symbol contains the value of sizeof(int) so that the C
+?C: preprocessor can make decisions based on it.
+?C:.
+?C:LONGSIZE:
+?C: This symbol contains the value of sizeof(long) so that the C
+?C: preprocessor can make decisions based on it.
+?C:.
+?C:SHORTSIZE:
+?C: This symbol contains the value of sizeof(short) so that the C
+?C: preprocessor can make decisions based on it.
+?C:.
+?H:#define INTSIZE $intsize
+?H:#define LONGSIZE $longsize
+?H:#define SHORTSIZE $shortsize
+?H:.
+?T:types t size var
+?LINT: set shortsize intsize longsize
+: check for lengths of integral types
+echo " "
+types=''
+@if SHORTSIZE || shortsize
+types="$types short"
+@end
+@if INTSIZE || intsize
+types="$types int"
+@end
+@if LONGSIZE || longsize
+types="$types long"
+@end
+for t in $types; do
+ $echo $n "Checking to see how big your ${t}s are...$c" >&4
+ for size in 2 4 8 16 error; do
+ $cat >try.c <<EOCP
+#include "static_assert.h"
+$t foo;
+int main()
+{
+ STATIC_ASSERT($size == sizeof(foo));
+ return 0;
+}
+EOCP
+ if $cc -c $ccflags try.c >/dev/null 2>&1; then break; fi
+ done
+ var=${t}size
+ case "$size" in
+ error)
+ echo " cannot compute it." >&4
+ case $t in
+ short) dflt=2;;
+ int) dflt=4;;
+ long) dflt=4;;
+ esac
+ rp="What is the size of the \"$t\" type (in bytes)?"
+ . ./myread
+ eval $var="$ans"
+ ;;
+ *)
+ echo " $size bytes." >&4
+ eval $var=$size
+ ;;
+ esac
+done
+$rm_try
+
diff --git a/mcon/U/ipc.U b/mcon/U/ipc.U
new file mode 100644
index 0000000..c1f8539
--- /dev/null
+++ b/mcon/U/ipc.U
@@ -0,0 +1,171 @@
+?RCS: $Id$
+?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: ipc.U,v $
+?RCS: Revision 3.0 1993/08/18 12:08:53 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:ipc serve_shm serve_msg serve_inet_udp serve_inet_tcp serve_unix_udp \
+ serve_unix_tcp: test Myread Oldconfig d_socket d_msg d_shm d_sem
+?MAKE: -pick add $@ %<
+?LINT:use d_msg d_sem
+?S:ipc:
+?S: This variable holds the type of IPC service we'll be using. Values
+?S: include "ip", "shm", "msg", "cms" and "os9". We don't worry about
+?S: cms or os9 here, because Configure doesn't run in those places--HMS.
+?S:.
+?S:serve_shm:
+?S: This variable controls the definition of SERVE_SHM, which tells the
+?S: C program to use USG shared memory for IPC.
+?S:.
+?S:serve_msg:
+?S: This variable controls the definition of SERVE_MSG, which tells the
+?S: C program to use USG message queues for IPC.
+?S:.
+?S:serve_inet_udp:
+?S: This variable controls the definition of SERVE_INET_UDP, which tells
+?S: the C program to enable InterNet-domain UDP support for IPC.
+?S:.
+?S:serve_inet_tcp:
+?S: This variable controls the definition of SERVE_INET_TCP, which tells
+?S: the C program to enable InterNet-domain TCP support for IPC.
+?S:.
+?S:serve_unix_udp:
+?S: This variable controls the definition of SERVE_UNIX_UDP, which tells
+?S: the C program to enable Unix-domain UDP support for IPC.
+?S:.
+?S:serve_unix_tcp:
+?S: This variable controls the definition of SERVE_UNIX_TCP, which tells
+?S: the C program to enable Unix-domain TCP support for IPC.
+?S:.
+?C:SERVE_SHM:
+?C: If defined, tells the C program to use USG shared memory for IPC.
+?C:.
+?C:SERVE_MSG:
+?C: If defined, tells the C program to use USG message queues for IPC.
+?C:.
+?C:SERVE_INET_UDP:
+?C: If defined, tells the C program to enable InterNet-domain UDP
+?C: support for IPC.
+?C:.
+?C:SERVE_INET_TCP:
+?C: If defined, tells the C program to enable InterNet-domain TCP
+?C: support for IPC.
+?C:.
+?C:SERVE_UNIX_UDP:
+?C: If defined, tells the C program to enable Unix-domain UDP
+?C: support for IPC.
+?C:.
+?C:SERVE_UNIX_TCP:
+?C: If defined, tells the C program to enable Unix-domain TCP
+?C: support for IPC.
+?C:.
+?H:#$serve_shm SERVE_SHM /**/
+?H:#$serve_msg SERVE_MSG /**/
+?H:#$serve_inet_udp SERVE_INET_UDP /**/
+?H:#$serve_inet_tcp SERVE_INET_TCP /**/
+?H:#$serve_unix_udp SERVE_UNIX_UDP /**/
+?H:#$serve_unix_tcp SERVE_UNIX_TCP /**/
+?H:.
+?X: FIXME -- RAM
+?INIT:serve_shm=''
+?INIT:serve_msg="$undef"
+?INIT:serve_inet_udp=''
+?INIT:serve_inet_tcp=''
+?INIT:serve_unix_udp=''
+?INIT:serve_unix_tcp=''
+: get IPC mechanism
+echo " "
+ipc=''
+while $test -z "$ipc"
+do
+ if $test "$ipc" != "shm" -a "$d_socket" = "$define"; then
+ ipc=''
+ if $test "$serve_inet_udp" = "$undef"; then
+ dflt=n
+ else
+ dflt=y
+ fi
+ rp='Provide InterNet-domain UDP service?'
+ . ./myread
+ dflt=''
+ case "$ans" in
+ n*) serve_inet_udp="$undef";;
+ *)
+ serve_inet_udp="$define"
+ ipc='ip'
+ ;;
+ esac
+
+ if $test "$serve_inet_tcp" = "$define"; then
+ dflt=y
+ else
+ dflt=n
+ fi
+ rp='Provide InterNet-domain TCP service?'
+ . ./myread
+ dflt=''
+ case "$ans" in
+ n*) serve_inet_tcp="$undef";;
+ *)
+ serve_inet_tcp="$define"
+ ipc='ip'
+ ;;
+ esac
+
+ if $test "$serve_unix_udp" = "$define"; then
+ dflt=y
+ else
+ dflt=n
+ fi
+ rp='Provide Unix-domain UDP service?'
+ . ./myread
+ dflt=''
+ case "$ans" in
+ n*) serve_unix_udp="$undef";;
+ *)
+ serve_unix_udp="$define"
+ ipc='ip'
+ ;;
+ esac
+
+ if $test "$serve_unix_tcp" = "$define"; then
+ dflt=y
+ else
+ dflt=n
+ fi
+ rp='Provide Unix-domain TCP service?'
+ . ./myread
+ dflt=''
+ case "$ans" in
+ n*) serve_unix_tcp="$undef";;
+ *)
+ serve_unix_tcp="$define"
+ ipc='ip'
+ ;;
+ esac
+ else
+ serve_inet_udp="$undef"
+ serve_inet_tcp="$undef"
+ serve_unix_udp="$undef"
+ serve_unix_tcp="$undef"
+ fi
+ if $test "$ipc" != "ip" -a "$d_shm" = "$define"; then
+ echo "Providing USG shared memory IPC support." >&4
+ serve_shm="$define"
+ ipc='shm'
+ else
+ serve_shm="$undef"
+ fi
+ if $test -z "$ipc"; then
+ echo "You must select an IPC mechanism." >&4
+ fi
+done
+
diff --git a/mcon/U/issymlink.U b/mcon/U/issymlink.U
new file mode 100644
index 0000000..f1a159f
--- /dev/null
+++ b/mcon/U/issymlink.U
@@ -0,0 +1,86 @@
+?RCS: $Id$
+?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: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
+?RCS:
+?RCS: $Log: lns.U,v $
+?RCS: Revision 3.0.1.1 1994/06/20 07:05:52 ram
+?RCS: patch30: created by ADO
+?RCS:
+?MAKE:issymlink: lns test rm
+?MAKE: -pick add $@ %<
+?S:issymlink:
+?S: This variable holds the test command to test for a symbolic link
+?S: (if they are supported). Typical values include 'test -h' and
+?S: 'test -L'.
+?S:.
+?T:pth p
+?LINT:change PATH test
+?LINT:extern newsh
+: determine whether symbolic links are supported
+echo " "
+case "$lns" in
+*"ln"*" -s")
+ echo "Checking how to test for symbolic links..." >&4
+ $lns blurfl sym
+ if $test "X$issymlink" = X; then
+?X:
+?X: In some AIX 4 versions the (ksh) builtin test (-h) is broken.
+?X:
+ case "$newsh" in
+ '') sh -c "PATH= test -h sym" >/dev/null 2>&1 ;;
+ *) $newsh -c "PATH= test -h sym" >/dev/null 2>&1 ;;
+ esac
+ if test $? = 0; then
+ issymlink="test -h"
+ else
+ echo "Your builtin 'test -h' may be broken." >&4
+ case "$test" in
+ /*) ;;
+ *) pth=`echo $PATH | sed -e "s/$p_/ /g"`
+ for p in $pth
+ do
+ if test -f "$p/$test"; then
+ test="$p/$test"
+ break
+ fi
+ done
+ ;;
+ esac
+ case "$test" in
+ /*)
+ echo "Trying external '$test -h'." >&4
+ issymlink="$test -h"
+ if $test ! -h sym >/dev/null 2>&1; then
+ echo "External '$test -h' is broken, too." >&4
+ issymlink=''
+ fi
+ ;;
+ *) issymlink='' ;;
+ esac
+ fi
+ fi
+ if $test "X$issymlink" = X; then
+ if $test -L sym 2>/dev/null; then
+ issymlink="$test -L"
+ echo "The builtin '$test -L' worked." >&4
+ fi
+ fi
+ if $test "X$issymlink" != X; then
+ echo "You can test for symbolic links with '$issymlink'." >&4
+ else
+ echo "I do not know how you can test for symbolic links." >&4
+ fi
+ $rm -f blurfl sym
+ ;;
+*) echo "No symbolic links, so not testing for their testing..." >&4
+ ;;
+esac
+
diff --git a/mcon/U/kernel.U b/mcon/U/kernel.U
new file mode 100644
index 0000000..a89753b
--- /dev/null
+++ b/mcon/U/kernel.U
@@ -0,0 +1,63 @@
+?RCS: $Id$
+?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: kernel.U,v $
+?RCS: Revision 3.0 1993/08/18 12:08:54 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:kernel: Getfile test
+?MAKE: -pick add $@ %<
+?S:kernel:
+?S: This variable becomes the (fully rooted) path name of the kernel.
+?S:.
+: find the name of the kernel.
+echo " "
+case "$kernel" in
+'')
+ if $test -r /unix; then
+ dflt=/unix
+ elif $test -r /vmunix; then
+ dflt=/vmunix
+ elif $test -r /xenix; then
+ dflt=/xenix
+ elif $test -r /mach; then
+ dflt=/mach
+ elif $test -r /dgux; then
+ dflt=/dgux
+ elif $test -r /hp-ux; then
+ dflt=/hp-ux
+ elif $test -r /syst; then
+ dflt=/syst
+ elif $test -r /arix; then
+ dflt=/arix
+ elif $test -r /irix; then
+ dflt=/arix
+ else
+ dflt='unknown'
+ set X /*x
+ shift
+ case $# in
+ 1)
+ if $test -r "$1"; then
+ dflt="$1"
+ fi
+ ;;
+ esac
+ fi
+ ;;
+*)
+ dflt="$kernel"
+ ;;
+esac
+fn=f
+rp='What is the name of your kernel?'
+. ./getfile
+kernel="$ans"
+
diff --git a/mcon/U/lex.U b/mcon/U/lex.U
new file mode 100644
index 0000000..3ccfc2f
--- /dev/null
+++ b/mcon/U/lex.U
@@ -0,0 +1,67 @@
+?RCS: $Id$
+?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: Original Author: Graham Stoney <greyham@research.canon.oz.au>
+?RCS:
+?RCS: $Log: lex.U,v $
+?RCS: Revision 3.0.1.3 1994/10/29 16:22:50 ram
+?RCS: patch36: spurious single quote could cause Configure to crash
+?RCS: patch36: (reported by Xavier Le Vourch <xavierl@eiffel.com>.)
+?RCS:
+?RCS: Revision 3.0.1.2 1994/08/29 16:27:09 ram
+?RCS: patch32: added lexflags variable for lex flags setting
+?RCS:
+?RCS: Revision 3.0.1.1 1994/05/06 15:06:01 ram
+?RCS: patch23: added trailing blank line for metalint
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:08:55 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:lex lexflags: Guess Myread Oldconfig flex test
+?MAKE: -pick add $@ %<
+?S:lex:
+?S: This variable holds the name of the lexical analyser generator we
+?S: want to use in the Makefile. It can be lex or flex.
+?S:.
+?S:lexflags:
+?S: This variable holds any flags that should be passed to the lexical
+?S: analyzer. It is up to the Makefile to use it.
+?S:.
+: determine lexical analyser generator
+case "$lex" in
+'')
+ dflt=lex;;
+*)
+ dflt="$lex";;
+esac
+echo " "
+if $test -f "$flex"; then
+ rp='Which lexical analyser generator (lex or flex) shall I use?'
+else
+ rp='Which lexical analyser generator shall I use?'
+fi
+. ./myread
+lex="$ans"
+
+@if lexflags
+: if using lex this will normally be useless, but flex frequently takes args
+echo " "
+case "$lexflags" in
+'') dflt='none';;
+*) dflt="$lexflags";;
+esac
+rp="What flags should be given to $lex?"
+. ./myread
+case "$ans" in
+none) lexflags='';;
+*) lexflags="$ans";;
+esac
+
+@end
diff --git a/mcon/U/lib.U b/mcon/U/lib.U
new file mode 100644
index 0000000..92d7751
--- /dev/null
+++ b/mcon/U/lib.U
@@ -0,0 +1,54 @@
+?RCS: $Id$
+?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: lib.U,v $
+?RCS: Revision 3.0.1.3 1995/09/25 09:16:47 ram
+?RCS: patch59: unit is now forced to the top of Configure, if possible
+?RCS:
+?RCS: Revision 3.0.1.2 1995/01/30 14:38:08 ram
+?RCS: patch49: can now handle installation prefix changes (from WED)
+?RCS:
+?RCS: Revision 3.0.1.1 1994/08/29 16:27:40 ram
+?RCS: patch32: now uses installation prefix to set the default
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:08:56 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:lib libexp: Getfile Loc Oldconfig Prefixit Prefixup prefixexp
+?MAKE: -pick add $@ %<
+?Y:TOP
+?S:lib:
+?S: This variable holds the name of the directory in which the user wants
+?S: to put public library files for the package in question. It is most
+?S: often a local directory such as /usr/local/lib. Programs using this
+?S: variable must be prepared to deal with filename expansion.
+?S:.
+?S:libexp:
+?S: This variable is the same as the lib variable, but is filename expanded
+?S: at configuration time, for convenient use in your makefiles.
+?S:.
+: determine where public libraries go
+set lib lib
+eval $prefixit
+case "$lib" in
+'')
+ dflt=`./loc . "." $prefixexp/lib /usr/local/lib /usr/lib /lib`
+ set dflt
+ eval $prefixup
+ ;;
+*) dflt="$lib";;
+esac
+echo " "
+fn=d~
+rp='Where do you want to put the public libraries?'
+. ./getfile
+lib="$ans"
+libexp="$ansexp"
+
diff --git a/mcon/U/libc.U b/mcon/U/libc.U
new file mode 100644
index 0000000..37bdcc9
--- /dev/null
+++ b/mcon/U/libc.U
@@ -0,0 +1,405 @@
+?RCS: $Id$
+?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: libc.U,v $
+?RCS: Revision 3.0.1.10 1997/02/28 15:56:48 ram
+?RCS: patch61: replaced .a with $_a all over the place
+?RCS: patch61: added support for HPUX-10 nm output
+?RCS:
+?RCS: Revision 3.0.1.9 1995/07/25 14:11:56 ram
+?RCS: patch56: now knows about OS/2 platforms
+?RCS:
+?RCS: Revision 3.0.1.8 1995/05/12 12:20:47 ram
+?RCS: patch54: made sure only most recent version of shared lib is picked
+?RCS: patch54: final "nm -p" check now uses xscan and xrun like everybody
+?RCS: patch54: can now grok linux nm output with lead __IO (ADO)
+?RCS: patch54: added support for linux ELF output, using 'W' for alias (ADO)
+?RCS:
+?RCS: Revision 3.0.1.7 1994/10/29 16:23:40 ram
+?RCS: patch36: now looks for shared libraries before anything else (ADO)
+?RCS: patch36: added new nm output format (ADO)
+?RCS:
+?RCS: Revision 3.0.1.6 1994/08/29 16:28:10 ram
+?RCS: patch32: added I-type symbols for nm output parsing on Linux
+?RCS:
+?RCS: Revision 3.0.1.5 1994/06/20 07:03:24 ram
+?RCS: patch30: checks are now presented by succession of if/elif
+?RCS: patch30: uniformized checks for shared objects with new so symbol
+?RCS:
+?RCS: Revision 3.0.1.4 1994/05/06 15:06:33 ram
+?RCS: patch23: added shared library knowledge (ADO and WED)
+?RCS:
+?RCS: Revision 3.0.1.3 1994/01/24 14:12:17 ram
+?RCS: patch16: can now export nm_extract as an internal-use only variable
+?RCS:
+?RCS: Revision 3.0.1.2 1993/09/13 16:09:03 ram
+?RCS: patch10: added special handling for Apollo systems (WAD)
+?RCS:
+?RCS: Revision 3.0.1.1 1993/08/27 14:40:03 ram
+?RCS: patch7: added entry for /usr/shlib/libc.so (OSF/1 machines)
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:08:57 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:libc libnames +nm_extract: echo n c rm test grep Getfile Myread \
+ Oldconfig Loc sed libs incpath libpth ar runnm nm nm_opt nm_so_opt \
+ contains xlibpth so osname trnl tr sort uniq _o _a
+?MAKE: -pick add $@ %<
+?S:libc:
+?S: This variable contains the location of the C library.
+?S:.
+?S:libnames:
+?S: The constructed list of library names. Normally empty, but hint files
+?S: may set this for later perusal by Configure.
+?S:.
+?S:nm_extract:
+?S: This variable holds the name of the extraction command used to process
+?S: the output of nm and yield the list of defined symbols. It is used
+?S: internally by Configure.
+?S:.
+?T:thislib try libnames xxx xscan xrun thisname com tans file
+?F:!libnames !libc.tmp !tmp.imp
+?LINT:change nm_opt runnm
+?INIT:libnames=''
+: Figure out where the libc is located
+case "$runnm" in
+true)
+?X: indentation is wrong on purpose--RAM
+: get list of predefined functions in a handy place
+echo " "
+case "$libc" in
+'') libc=unknown
+ case "$libs" in
+ *-lc_s*) libc=`./loc libc_s$_a $libc $libpth`
+ esac
+ ;;
+esac
+case "$libs" in
+'') ;;
+*) for thislib in $libs; do
+ case "$thislib" in
+ -lc|-lc_s)
+ : Handle C library specially below.
+ ;;
+ -l*)
+ thislib=`echo $thislib | $sed -e 's/^-l//'`
+ if try=`./loc lib$thislib.$so.'*' X $libpth`; $test -f "$try"; then
+ :
+ elif try=`./loc lib$thislib.$so X $libpth`; $test -f "$try"; then
+ :
+ elif try=`./loc lib$thislib$_a X $libpth`; $test -f "$try"; then
+ :
+ elif try=`./loc $thislib$_a X $libpth`; $test -f "$try"; then
+ :
+ elif try=`./loc lib$thislib X $libpth`; $test -f "$try"; then
+ :
+ elif try=`./loc $thislib X $libpth`; $test -f "$try"; then
+ :
+ elif try=`./loc Slib$thislib$_a X $xlibpth`; $test -f "$try"; then
+ :
+ else
+ try=''
+ fi
+ libnames="$libnames $try"
+ ;;
+ *) libnames="$libnames $thislib" ;;
+ esac
+ done
+ ;;
+esac
+?X:
+?X: Some systems (e.g. DG/UX) use "environmental" links, which make the test
+?X: -f fail. Ditto for symbolic links. So in order to reliably check the
+?X: existence of a file, we use test -r. It will still fail with DG/UX links
+?X: though, but at least it will detect symbolic links. At some strategic
+?X: points, we make use of (test -h), using a sub-shell in case builtin test
+?X: does not implement the -h check for symbolic links. This makes it
+?X: possible to preset libc in a hint file for instance and have it show up
+?X: as-is in the question.
+?X:
+xxx=normal
+case "$libc" in
+unknown)
+?X:
+?X: The sed below transforms .so.9 .so.12 into something like .so.0009 .so.0012,
+?X: then sorts on it to allow keeping .so.12 instead of .so.9 as the latest
+?X: up-to-date library. The initial filename (before sed munging, saved in hold
+?X: space via 'h') is appended via 'G' before sorting, then the leading munged
+?X: part is removed after sorting. Nice efficient work from Tye McQueen.
+?X: The initial blurfl is here to prevent the trailing pipe from producing an
+?X: empty string, causing Configure to output all its set variables!
+?X:
+ set /lib/libc.$so
+ for xxx in $libpth; do
+ $test -r $1 || set $xxx/libc.$so
+ : The messy sed command sorts on library version numbers.
+ $test -r $1 || \
+ set `echo blurfl; echo $xxx/libc.$so.[0-9]* | \
+ tr ' ' $trnl | egrep -v '\.[A-Za-z]*$' | $sed -e '
+ h
+ s/[0-9][0-9]*/0000&/g
+ s/0*\([0-9][0-9][0-9][0-9][0-9]\)/\1/g
+ G
+ s/\n/ /' | \
+ $sort | $sed -e 's/^.* //'`
+ eval set \$$#
+ done
+ $test -r $1 || set /usr/ccs/lib/libc.$so
+ $test -r $1 || set /lib/libsys_s$_a
+ ;;
+*)
+?X: ensure the test below for the (shared) C library will fail
+ set blurfl
+ ;;
+esac
+if $test -r "$1"; then
+ echo "Your (shared) C library seems to be in $1."
+ libc="$1"
+elif $test -r /lib/libc && $test -r /lib/clib; then
+?X:
+?X: Apollo has its C library in /lib/clib AND /lib/libc
+?X: not to mention its math library in /lib/syslib...
+?X:
+ echo "Your C library seems to be in both /lib/clib and /lib/libc."
+ xxx=apollo
+ libc='/lib/clib /lib/libc'
+ if $test -r /lib/syslib; then
+ echo "(Your math library is in /lib/syslib.)"
+?X: Put syslib in libc -- not quite right, but won't hurt
+ libc="$libc /lib/syslib"
+ fi
+elif $test -r "$libc" || (test -h "$libc") >/dev/null 2>&1; then
+ echo "Your C library seems to be in $libc, as you said before."
+?X: For mips, and...
+elif $test -r $incpath/usr/lib/libc$_a; then
+ libc=$incpath/usr/lib/libc$_a;
+ echo "Your C library seems to be in $libc. That's fine."
+elif $test -r /lib/libc$_a; then
+ libc=/lib/libc$_a;
+ echo "Your C library seems to be in $libc. You're normal."
+else
+ if tans=`./loc libc$_a blurfl/dyick $libpth`; $test -r "$tans"; then
+ :
+ elif tans=`./loc libc blurfl/dyick $libpth`; $test -r "$tans"; then
+ libnames="$libnames "`./loc clib blurfl/dyick $libpth`
+ elif tans=`./loc clib blurfl/dyick $libpth`; $test -r "$tans"; then
+ :
+ elif tans=`./loc Slibc$_a blurfl/dyick $xlibpth`; $test -r "$tans"; then
+ :
+ elif tans=`./loc Mlibc$_a blurfl/dyick $xlibpth`; $test -r "$tans"; then
+ :
+ else
+ tans=`./loc Llibc$_a blurfl/dyick $xlibpth`
+ fi
+ if $test -r "$tans"; then
+ echo "Your C library seems to be in $tans, of all places."
+ libc=$tans
+ else
+ libc='blurfl'
+ fi
+fi
+if $test $xxx = apollo -o -r "$libc" || (test -h "$libc") >/dev/null 2>&1; then
+ dflt="$libc"
+ cat <<EOM
+
+If the guess above is wrong (which it might be if you're using a strange
+compiler, or your machine supports multiple models), you can override it here.
+
+EOM
+else
+ dflt=''
+ echo $libpth | $tr ' ' $trnl | $sort | $uniq > libpath
+ cat >&4 <<EOM
+I can't seem to find your C library. I've looked in the following places:
+
+EOM
+ $sed 's/^/ /' libpath
+ cat <<EOM
+
+None of these seems to contain your C library. I need to get its name...
+
+EOM
+fi
+fn=f
+rp='Where is your C library?'
+. ./getfile
+libc="$ans"
+
+echo " "
+echo $libc $libnames | $tr ' ' $trnl | $sort | $uniq > libnames
+set X `cat libnames`
+shift
+xxx=files
+case $# in 1) xxx=file; esac
+echo "Extracting names from the following $xxx for later perusal:" >&4
+echo " "
+$sed 's/^/ /' libnames >&4
+echo " "
+$echo $n "This may take a while...$c" >&4
+
+?X:
+?X: Linux may need the special Dynamic option to nm for shared libraries.
+?X: In general, this is stored in the nm_so_opt variable.
+?X: Unfortunately, that option may be fatal on non-shared libraries.
+?X:
+for file in $*; do
+ case $file in
+ *$so*) $nm $nm_so_opt $nm_opt $file 2>/dev/null;;
+ *) $nm $nm_opt $file 2>/dev/null;;
+ esac
+done >libc.tmp
+
+$echo $n ".$c"
+?X:
+?X: To accelerate processing, we look at the correct 'sed' command
+?X: by using a small subset of libc.tmp, i.e. fprintf function.
+?X: When we know which sed command to use, do the name extraction
+?X:
+$grep fprintf libc.tmp > libc.ptf
+?X:
+?X: In order to enhance readability and save some space, we define
+?X: some variables that will be "eval"ed.
+?X:
+xscan='eval "<libc.ptf $com >libc.list"; $echo $n ".$c" >&4'
+xrun='eval "<libc.tmp $com >libc.list"; echo "done." >&4'
+?X: BSD-like output, I and W types added for Linux
+?X: Some versions of Linux include a leading __IO in the symbol name.
+?X: HPUX10 reportedly has trailing spaces, though I'm surprised it has
+?X: BSD-like output. (AD).
+xxx='[ADTSIW]'
+if com="$sed -n -e 's/__IO//' -e 's/^.* $xxx *_[_.]*//p' -e 's/^.* $xxx *//p'";\
+ eval $xscan;\
+ $contains '^fprintf$' libc.list >/dev/null 2>&1; then
+ eval $xrun
+?X: SYSV-like output
+elif com="$sed -n -e 's/^__*//' -e 's/^\([a-zA-Z_0-9$]*\).*xtern.*/\1/p'";\
+ eval $xscan;\
+ $contains '^fprintf$' libc.list >/dev/null 2>&1; then
+ eval $xrun
+elif com="$sed -n -e '/|UNDEF/d' -e '/FUNC..GL/s/^.*|__*//p'";\
+ eval $xscan;\
+ $contains '^fprintf$' libc.list >/dev/null 2>&1; then
+ eval $xrun
+elif com="$sed -n -e 's/^.* D __*//p' -e 's/^.* D //p'";\
+ eval $xscan;\
+ $contains '^fprintf$' libc.list >/dev/null 2>&1; then
+ eval $xrun
+elif com="$sed -n -e 's/^_//' -e 's/^\([a-zA-Z_0-9]*\).*xtern.*text.*/\1/p'";\
+ eval $xscan;\
+ $contains '^fprintf$' libc.list >/dev/null 2>&1; then
+ eval $xrun
+elif com="$sed -n -e 's/^.*|FUNC |GLOB .*|//p'";\
+ eval $xscan;\
+ $contains '^fprintf$' libc.list >/dev/null 2>&1; then
+ eval $xrun
+elif com="$grep '|' | $sed -n -e '/|COMMON/d' -e '/|DATA/d' \
+ -e '/ file/d' -e 's/^\([^ ]*\).*/\1/p'";\
+ eval $xscan;\
+ $contains '^fprintf$' libc.list >/dev/null 2>&1; then
+ eval $xrun
+elif com="$sed -n -e 's/^.*|FUNC |GLOB .*|//p' -e 's/^.*|FUNC |WEAK .*|//p'";\
+ eval $xscan;\
+ $contains '^fprintf$' libc.list >/dev/null 2>&1; then
+ eval $xrun
+?X: mips nm output (sysV)
+elif com="$sed -n -e 's/^__//' -e '/|Undef/d' -e '/|Proc/s/ .*//p'";\
+ eval $xscan;\
+ $contains '^fprintf$' libc.list >/dev/null 2>&1; then
+ eval $xrun
+elif com="$sed -n -e 's/^.*|Proc .*|Text *| *//p'";\
+ eval $xscan;\
+ $contains '^fprintf$' libc.list >/dev/null 2>&1; then
+ eval $xrun
+elif com="$sed -n -e '/Def. Text/s/.* \([^ ]*\)\$/\1/p'";\
+ eval $xscan;\
+ $contains '^fprintf$' libc.list >/dev/null 2>&1; then
+ eval $xrun
+?X: OS/2 nm output
+elif com="$sed -n -e 's/^[-0-9a-f ]*_\(.*\)=.*/\1/p'";\
+ eval $xscan;\
+ $contains '^fprintf$' libc.list >/dev/null 2>&1; then
+ eval $xrun
+elif com="$sed -n -e 's/.*\.text n\ \ \ \.//p'";\
+ eval $xscan;\
+ $contains '^fprintf$' libc.list >/dev/null 2>&1; then
+ eval $xrun
+?X: AIX nm output
+elif com="sed -n -e 's/^__.*//' -e 's/[ ]*D[ ]*[0-9]*.*//p'";\
+ eval $xscan;\
+ $contains '^fprintf$' libc.list >/dev/null 2>&1; then
+ eval $xrun
+else
+ $nm -p $* 2>/dev/null >libc.tmp
+ $grep fprintf libc.tmp > libc.ptf
+ if com="$sed -n -e 's/^.* [ADTSIW] *_[_.]*//p' -e 's/^.* [ADTSIW] //p'";\
+ eval $xscan; $contains '^fprintf$' libc.list >/dev/null 2>&1
+ then
+ nm_opt='-p'
+ eval $xrun
+ else
+ echo " "
+ echo "$nm didn't seem to work right. Trying $ar instead..." >&4
+ com=''
+ if $ar t $libc > libc.tmp && \
+ $contains '^fprintf$' libc.tmp >/dev/null 2>&1
+ then
+ for thisname in $libnames $libc; do
+ $ar t $thisname >>libc.tmp
+ done
+ $sed -e "s/\\$_o\$//" < libc.tmp > libc.list
+ echo "Ok." >&4
+ elif test "X$osname" = "Xos2" && $ar tv $libc > libc.tmp; then
+?X: Repeat libc to extract forwarders to DLL entries too
+ for thisname in $libnames $libc; do
+ $ar tv $thisname >>libc.tmp
+?X: Revision 50 of EMX has bug in ar: it will not extract forwarders
+?X: to DLL entries. Use emximp which will extract exactly them.
+ emximp -o tmp.imp $thisname \
+ 2>/dev/null && \
+ $sed -e 's/^\([_a-zA-Z0-9]*\) .*$/\1/p' \
+ < tmp.imp >>libc.tmp
+ $rm -f tmp.imp
+ done
+ $sed -e "s/\\$_o\$//" -e 's/^ \+//' < libc.tmp > libc.list
+ echo "Ok." >&4
+ else
+ echo "$ar didn't seem to work right." >&4
+ echo "Maybe this is a Cray...trying bld instead..." >&4
+ if
+ bld t $libc | \
+ $sed -e 's/.*\///' -e "s/\\$_o:.*\$//" > libc.list &&
+ $test -s libc.list
+ then
+ for thisname in $libnames; do
+ bld t $libnames | \
+ $sed -e 's/.*\///' -e "s/\\$_o:.*\$//" >>libc.list
+ $ar t $thisname >>libc.tmp
+ done
+ echo "Ok." >&4
+ else
+ echo "That didn't work either." >&4
+ echo "No problem, I'll be compiling test programs then..." >&4
+ runnm=false
+ fi
+ fi
+ fi
+fi
+nm_extract="$com"
+if $test -f /lib/syscalls.exp; then
+ echo " "
+ echo "Also extracting names from /lib/syscalls.exp for good ole AIX..." >&4
+ $sed -n 's/^\([^ ]*\)[ ]*syscall[0-9]*[ ]*$/\1/p' \
+ /lib/syscalls.exp >>libc.list
+fi
+?X: remember, indentation is wrong on purpose--RAM
+;;
+esac
+$rm -f libnames libpath
+
diff --git a/mcon/U/libdbm.U b/mcon/U/libdbm.U
new file mode 100644
index 0000000..239b1db
--- /dev/null
+++ b/mcon/U/libdbm.U
@@ -0,0 +1,47 @@
+?RCS: $Id$
+?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: libdbm.U,v $
+?RCS: Revision 3.0.1.1 1997/02/28 15:56:57 ram
+?RCS: patch61: replaced .a with $_a all over the place
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:08:58 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:libdbm: test Loc libpth _a
+?MAKE: -pick add $@ %<
+?S:libdbm:
+?S: This variable contains the argument to pass to the loader in order
+?S: to get the dbm library routines. If there is no dbm or ndbm
+?S: library, it is null.
+?S:.
+?T:xxx
+: see if we should include -ldbm
+echo " "
+if $test -r /usr/lib/libndbm$_a || $test -r /usr/local/lib/libndbm$_a ; then
+ echo "-lndbm found." >&4
+ libdbm='-lndbm'
+elif $test -r /usr/lib/libdbm$_a || $test -r /usr/local/lib/libdbm$_a ; then
+ echo "-ldbm found." >&4
+ libdbm='-ldbm'
+else
+ xxx=`./loc libdbm$_a x $libpth`
+ case "$xxx" in
+ x)
+ echo "No dbm library found." >&4
+ libdbm=''
+ ;;
+ *)
+ echo "DBM library found in $xxx." >&4
+ libdbm="$xxx"
+ ;;
+ esac
+fi
+
diff --git a/mcon/U/libflex.U b/mcon/U/libflex.U
new file mode 100644
index 0000000..9717d48
--- /dev/null
+++ b/mcon/U/libflex.U
@@ -0,0 +1,65 @@
+?RCS: $Id$
+?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: libflex.U,v $
+?RCS: Revision 3.0.1.3 1997/02/28 15:57:48 ram
+?RCS: patch61: replaced .a with $_a all over the place
+?RCS:
+?RCS: Revision 3.0.1.2 1994/05/06 15:07:02 ram
+?RCS: patch23: now uses full library path instead of -l notation
+?RCS:
+?RCS: Revision 3.0.1.1 1994/01/24 14:13:25 ram
+?RCS: patch16: un-obsoleted this unit to allow smooth lex/flex compilations
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:08:59 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:libflex: Loc lex libpth _a
+?MAKE: -pick add $@ %<
+?S:libflex:
+?S: This variable contains the argument to pass to the loader in order
+?S: to get the flex/lex library routines. If there is no flex or flex
+?S: library, it is null.
+?S:.
+?T:xxx
+: see if we should include -lfl
+echo " "
+case "$lex" in
+*flex)
+ xxx=`./loc libfl$_a x $libpth`
+ case "$xxx" in
+ x)
+ echo "No flex library found." >&4
+ libflex=''
+ ;;
+ *)
+ echo "flex library found in $xxx." >&4
+ libflex="$xxx"
+ ;;
+ esac
+ ;;
+*lex)
+ xxx=`./loc libl$_a x $libpth`
+ case "$xxx" in
+ x)
+ echo "No lex library found." >&4
+ libflex=''
+ ;;
+ *)
+ echo "lex library found in $xxx." >&4
+ libflex="$xxx"
+ ;;
+ esac
+ ;;
+*)
+echo "You don't seem to have lex or flex, so I won't look for libraries." >&4
+ ;;
+esac
+
diff --git a/mcon/U/libnlist.U b/mcon/U/libnlist.U
new file mode 100644
index 0000000..70c52ad
--- /dev/null
+++ b/mcon/U/libnlist.U
@@ -0,0 +1,49 @@
+?RCS: $Id$
+?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: libnlist.U,v $
+?RCS: Revision 3.0.1.1 1997/02/28 16:08:02 ram
+?RCS: patch61: added usrinc and mips on the dependency line
+?RCS: patch61: make sure we call ./mips
+?RCS: patch61: added a ?LINT: hint
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:09:00 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:libnlist: Loc libpth Guess Mips usrinc _a
+?MAKE: -pick add $@ %<
+?S:libnlist (libmld):
+?S: This variable contains the name of the library required to get the
+?S: definition of the nlist() function. On a MIPS RISC/OS box, it is -lmld.
+?S: Under Sys Vr4, it is -lelf. Otherwise, its value is empty.
+?S:.
+?T:xxx
+?LINT:use usrinc
+: see if we need a special library for 'nlist()'
+echo " "
+: How about doing this if nlist is not in libc...
+if ./mips ; then
+ libnlist='-lmld'
+else
+ xxx=`./loc libelf$_a x $libpth`
+ case "$xxx" in
+ x) ;;
+ *)
+ libnlist="$xxx"
+ ;;
+ esac
+fi
+case "$libnlist" in
+'') echo "No special library for nlist() seems necessary." >&4
+ ;;
+*) echo "nlist() can be found in $libnlist." >&4
+ ;;
+esac
+
diff --git a/mcon/U/libnm.U b/mcon/U/libnm.U
new file mode 100644
index 0000000..70045ba
--- /dev/null
+++ b/mcon/U/libnm.U
@@ -0,0 +1,45 @@
+?RCS: $Id$
+?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: libnm.U,v $
+?RCS: Revision 3.0.1.1 1997/02/28 16:08:26 ram
+?RCS: patch61: replaced .a with $_a all over the place
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:09:01 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:libnm: test Loc libpth _a
+?MAKE: -pick add $@ %<
+?S:libnm:
+?S: This variable contains the argument to pass to the loader in order
+?S: to get the new math library routines. If there is no new math
+?S: library, it is null.
+?S:.
+?T:ans
+?O: use libswanted='-lnm' instead (see libs.U).
+: see if we should include -lnm
+echo " "
+if $test -r /usr/lib/libnm$_a || $test -r /usr/local/lib/libnm$_a ; then
+ echo "New math library found." >&4
+ libnm='-lnm'
+else
+ ans=`./loc libnm$_a x $libpth`
+ case "$ans" in
+ x)
+ echo "No nm library found--the normal math library will have to do." >&4
+ libnm=''
+ ;;
+ *)
+ echo "New math library found in $ans." >&4
+ libnm="$ans"
+ ;;
+ esac
+fi
+
diff --git a/mcon/U/libpth.U b/mcon/U/libpth.U
new file mode 100644
index 0000000..85fe159
--- /dev/null
+++ b/mcon/U/libpth.U
@@ -0,0 +1,133 @@
+?RCS: $Id$
+?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: libpth.U,v $
+?RCS: Revision 3.0.1.6 1997/02/28 16:08:49 ram
+?RCS: patch61: new loclibpth variable
+?RCS:
+?RCS: Revision 3.0.1.5 1995/01/11 15:31:30 ram
+?RCS: patch45: call ./mips instead of just mips (WED)
+?RCS:
+?RCS: Revision 3.0.1.4 1994/08/29 16:29:15 ram
+?RCS: patch32: added /lib/pa1.1 for HP-UX specially tuned PA-RISC libs (ADO)
+?RCS: patch32: fixed information message, making it clearer (ADO)
+?RCS:
+?RCS: Revision 3.0.1.3 1994/06/20 07:03:54 ram
+?RCS: patch30: added /usr/shlib to glibpth for shared-only libraries
+?RCS:
+?RCS: Revision 3.0.1.2 1994/05/13 15:26:57 ram
+?RCS: patch27: fixed a typo (libpth -> glibpth)
+?RCS:
+?RCS: Revision 3.0.1.1 1994/05/06 15:07:53 ram
+?RCS: patch23: now asks for library directories to be searched (ADO)
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:09:02 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: This unit initializes the path for C library lookup.
+?X:
+?MAKE:libpth glibpth xlibpth plibpth loclibpth: \
+ usrinc incpath test cat Myread Oldconfig Mips
+?MAKE: -pick add $@ %<
+?S:libpth:
+?S: This variable holds the general path (space-separated) used to find
+?S: libraries. It is intended to be used by other units.
+?S:.
+?S:glibpth:
+?S: This variable holds the general path (space-separated) used to
+?S: find libraries. It may contain directories that do not exist on
+?S: this platform, libpth is the cleaned-up version.
+?S:.
+?S:xlibpth:
+?S: This variable holds extra path (space-separated) used to find
+?S: libraries on this platform, for example CPU-specific libraries
+?S: (on multi-CPU platforms) may be listed here.
+?S:.
+?S:loclibpth:
+?S: This variable holds the paths (space-separated) used to find local
+?S: libraries. It is prepended to libpth, and is intended to be easily
+?S: set from the command line.
+?S:.
+?S:plibpth:
+?S: Holds the private path used by Configure to find out the libraries.
+?S: Its value is prepend to libpth. This variable takes care of special
+?S: machines, like the mips. Usually, it should be empty.
+?S:.
+?T: xxx dlist
+?LINT:use usrinc
+?INIT:: change the next line if compiling for Xenix/286 on Xenix/386
+?INIT:xlibpth='/usr/lib/386 /lib/386'
+?INIT:: Possible local library directories to search.
+?INIT:loclibpth=""
+?INIT:
+?INIT:: general looking path for locating libraries
+?INIT:glibpth="/lib /usr/lib $xlibpth"
+?INIT:glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/local/lib"
+?X: /shlib is for Digital Unix 4.0
+?X: /usr/shlib is for OSF/1 systems.
+?INIT:test -f /usr/shlib/libc.so && glibpth="/usr/shlib $glibpth"
+?INIT:test -f /shlib/libc.so && glibpth="/shlib $glibpth"
+?X: /lib32 and /lib64 are for Linux systems running both 32- and 64-bit programs
+?X: /usr/lib/i386-linux-gnu/ is used on Debian by the libc6-dev package
+?INIT:glibpth="$glibpth /lib32 /lib64 "`ls -1d /usr/lib/*-gnu 2>/dev/null`
+?INIT:: Private path used by Configure to find libraries. Its value
+?INIT:: is prepended to libpth. This variable takes care of special
+?INIT:: machines, like the mips. Usually, it should be empty.
+?INIT:plibpth=''
+?INIT:
+: Set private lib path
+case "$plibpth" in
+'') if ./mips; then
+?X: on mips, we DO NOT want /lib, and we want $incpath/usr/lib
+ plibpth="$incpath/usr/lib /usr/local/lib /usr/ccs/lib"
+ fi;;
+esac
+case "$libpth" in
+' ') dlist='';;
+'') dlist="$loclibpth $plibpth $glibpth";;
+*) dlist="$libpth";;
+esac
+
+: Now check and see which directories actually exist, avoiding duplicates
+libpth=''
+for xxx in $dlist
+do
+ if $test -d $xxx; then
+ case " $libpth " in
+ *" $xxx "*) ;;
+ *) libpth="$libpth $xxx";;
+ esac
+ fi
+done
+$cat <<'EOM'
+
+Some systems have incompatible or broken versions of libraries. Among
+the directories listed in the question below, please remove any you
+know not to be holding relevant libraries, and add any that are needed.
+Say "none" for none.
+
+EOM
+case "$libpth" in
+'') dflt='none';;
+*)
+?X: strip leading space
+ set X $libpth
+ shift
+ dflt=${1+"$@"}
+ ;;
+esac
+rp="Directories to use for library searches?"
+. ./myread
+case "$ans" in
+none) libpth=' ';;
+*) libpth="$ans";;
+esac
+
diff --git a/mcon/U/libs.U b/mcon/U/libs.U
new file mode 100644
index 0000000..d58a15e
--- /dev/null
+++ b/mcon/U/libs.U
@@ -0,0 +1,256 @@
+?RCS: $Id$
+?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: libs.U,v $
+?RCS: Revision 3.0.1.6 1997/02/28 16:09:11 ram
+?RCS: patch61: replaced .a with $_a all over the place
+?RCS:
+?RCS: Revision 3.0.1.5 1995/07/25 14:12:05 ram
+?RCS: patch56: now knows about OS/2 platforms
+?RCS:
+?RCS: Revision 3.0.1.4 1994/10/29 16:24:22 ram
+?RCS: patch36: removed old broken thislib/thatlib processing (ADO)
+?RCS:
+?RCS: Revision 3.0.1.3 1994/06/20 07:05:44 ram
+?RCS: patch30: code cleanup with if/elif by ADO and RAM
+?RCS: patch30: undone patch23 for libswanted default setting
+?RCS:
+?RCS: Revision 3.0.1.2 1994/05/06 15:08:45 ram
+?RCS: patch23: now includes ordered default libswanted variable (ADO)
+?RCS: patch23: major cleanup for library lookups (ADO)
+?RCS:
+?RCS: Revision 3.0.1.1 1993/08/25 14:02:31 ram
+?RCS: patch6: added default for libs
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:09:03 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:libs libsfound libsfiles libsdirs libspath libscheck: \
+ test cat Myread Oldconfig Loc libpth package xlibpth so _a \
+ +usesocks sed +cc +ccflags +ldflags rm
+?MAKE: -pick add $@ %<
+?S:libs:
+?S: This variable holds the additional libraries we want to use.
+?S: It is up to the Makefile to deal with it. The list can be empty.
+?S:.
+?S:libsfound:
+?S: This variable holds the full pathnames of the libraries
+?S: we found and accepted.
+?S:.
+?S:libsfiles:
+?S: This variable holds the filenames aka basenames of the libraries
+?S: we found and accepted.
+?S:.
+?S:libsdirs:
+?S: This variable holds the directory names aka dirnames of the libraries
+?S: we found and accepted, duplicates are removed.
+?S:.
+?S:libspath:
+?S: This variable holds the directory names probed for libraries.
+?S:.
+?S:libscheck:
+?S: This variable is intended to be set by hint files, if needed.
+?S: It should contain shell code that will be eval'ed with $xxx holding
+?S: some library file. It may change $xxx if needed.
+?S: For instance, on an Irix platform, you may make sure the right
+?S: library file is used depending on the cc command line, so that the
+?S: correct library is used depending on the selected ABI (for 32 and
+?S: 64-bit compilations).
+?S:
+?S: Here is an example of code that could be found in a hint file on Irix
+?S: when the selected compiler was for 32-bit -- that code is put in the
+?S: cc.cbu call-back unit to be invoked AFTER the C compiler and its
+?S: flags have been chosen:
+?S:
+?S: libscheck='case "$xxx" in
+?S: *.a) /bin/ar p $xxx `/bin/ar t $xxx | sed q` >$$.o;
+?S: case "`/usr/bin/file $$.o`" in
+?S: *N32*) rm -f $$.o ;;
+?S: *) rm -f $$.o; xxx=/no/n32$xxx ;;
+?S: esac ;;
+?S: *) case "`/usr/bin/file $xxx`" in
+?S: *N32*) ;;
+?S: *) xxx=/no/n32$xxx ;;
+?S: esac ;;
+?S: esac'
+?S:.
+?D:libs=''
+?LINT:extern libswanted
+?LINT:change libswanted
+?INIT:: default library list
+?INIT:libswanted=''
+?X: This order is chosen so that libraries -lndir, -ldir, -lucb, -lbsd,
+?X: -lBSD, -lPW, and -lx only get used if there are unresolved
+?X: routines at link time. Usually, these are backwards compatibility
+?X: libraries, and may not be as reliable as the standard c library.
+?X:
+?X: The -lsocket -linet -lnsl order has been reported to be necessary
+?X: for at least one SVR4 implementation.
+?X: -lc must proceed -lucb or -lbsd for most Solaris applications.
+?X: -lc_s proceeds -lc so we pick up the shared library version, if
+?X: it is available.
+?X:
+?X: The ordering of c, posix, and cposix is a guess and almost
+?X: certainly wrong on about half of all systems.
+?X:
+?X: Set proper libswanted in your private Myinit.U if needed.
+?X:
+?X:: default ordered library list
+?X:libswanted='net socket inet bind nsl nm sdbm gdbm ndbm dbm malloc dl'
+?X:libswanted="$libswanted dld sun m c_s c posix cposix ndir dir ucb"
+?X:libswanted="$libswanted bsd BSD PW x"
+?X:
+?INIT:: should be set by hint files if needed
+?INIT:libscheck=''
+?T:xxx yyy thislib thisdir libstyle linkmsg
+?F:lt.c lt
+: Looking for optional libraries
+echo " "
+echo "Checking for optional libraries..." >&4
+case "$libs" in
+' '|'') dflt='';;
+*) dflt="$libs";;
+esac
+case "$libswanted" in
+'') libswanted='c_s';;
+esac
+?X: libsocks has nasty naming scheme.
+?X: This does not work if somebody wants SOCKS 4.
+case "$usesocks" in
+"$define") libswanted="$libswanted socks5 socks5_sh" ;;
+esac
+?X: Used later for link checks
+echo "extern void abort(void); int main(void) { abort(); return 0; }" > lt.c
+libsfound=''
+libsfiles=''
+libsdirs=''
+libspath=''
+for thisdir in $libpth $xlibpth; do
+ test -d $thisdir && libspath="$libspath $thisdir"
+done
+for thislib in $libswanted; do
+ for thisdir in $libspath; do
+ xxx=''
+ if $test ! -f "$xxx" ; then
+ xxx=`ls $thisdir/lib$thislib.$so.[0-9]* 2>/dev/null | $sed -n '1p'`
+ $test -f "$xxx" && eval $libscheck
+ $test -f "$xxx" && libstyle=shared
+ fi
+ if test ! -f "$xxx"; then
+ xxx=$thisdir/lib$thislib.$so
+ $test -f "$xxx" && eval $libscheck
+ $test -f "$xxx" && libstyle=shared
+ fi
+ if test ! -f "$xxx"; then
+ xxx=$thisdir/lib$thislib$_a
+ $test -f "$xxx" && eval $libscheck
+ $test -f "$xxx" && libstyle=static
+ fi
+ if test ! -f "$xxx"; then
+ xxx=$thisdir/$thislib$_a
+ $test -f "$xxx" && eval $libscheck
+ $test -f "$xxx" && libstyle=static
+ fi
+ if test ! -f "$xxx"; then
+ xxx=$thisdir/lib${thislib}_s$_a
+ $test -f "$xxx" && eval $libscheck
+ $test -f "$xxx" && libstyle=static
+ $test -f "$xxx" && thislib=${thislib}_s
+ fi
+ if test ! -f "$xxx"; then
+ xxx=$thisdir/Slib$thislib$_a
+ $test -f "$xxx" && eval $libscheck
+ $test -f "$xxx" && libstyle=static
+ fi
+ if $test -f "$xxx"; then
+?X:
+?X: It is not sufficient to find a .so on the disk. We must make sure
+?X: that we can indeed supply the -lfoo line on the cc line to link against
+?X: that library. On Linux for instance, a versioned .so will not be
+?X: implicitly linked against, whereas it will work fine on Solaris 2.6.
+?X: --RAM, 10/10/2003
+?X:
+ if $cc -o lt $ccflags $ldflags lt.c -l$thislib >/dev/null 2>&1;
+ then
+ linkmsg=""
+ else
+ linkmsg=" but I can't link against it"
+ fi
+ case "$libstyle" in
+ shared) echo "Found -l$thislib (shared)$linkmsg." ;;
+ static) echo "Found -l$thislib$linkmsg." ;;
+ *) echo "Found -l$thislib ($libstyle)$linkmsg." ;;
+ esac
+ case " $dflt " in
+ *"-l$thislib "*) ;;
+ *)
+ case "$linkmsg" in
+ '')
+ dflt="$dflt -l$thislib"
+ libsfound="$libsfound $xxx"
+ yyy=`basename $xxx`
+ libsfiles="$libsfiles $yyy"
+ yyy=`echo $xxx|$sed -e "s%/$yyy\\$%%"`
+ case " $libsdirs " in
+ *" $yyy "*) ;;
+ *) libsdirs="$libsdirs $yyy" ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ break
+ fi
+ done
+ if $test ! -f "$xxx"; then
+?X:
+?X: Try linking against the library: gcc on linux platforms is notorious for
+?X: using complex library search logic, especially on systems mixing 32-bit
+?X: and 64-bit versions.
+?X:
+ if $cc -o lt $ccflags $ldflags lt.c -l$thislib >/dev/null 2>&1
+ then
+ echo "Found -l$thislib (via $cc)."
+ case " $dflt " in
+ *"-l$thislib "*) ;;
+ *) dflt="$dflt -l$thislib";;
+ esac
+ else
+ echo "No -l$thislib."
+ fi
+ fi
+done
+set X $dflt
+shift
+dflt="$*"
+case "$libs" in
+'') dflt="$dflt";;
+*) dflt="$libs";;
+esac
+case "$dflt" in
+' '|'') dflt='none';;
+esac
+$rm -f lt.c lt
+
+$cat <<EOM
+
+In order to compile $package on your machine, a number of libraries
+are usually needed. Include any other special libraries here as well.
+Say "none" for none. The default list is almost always right.
+EOM
+
+echo " "
+rp="Which libraries to use?"
+. ./myread
+case "$ans" in
+none) libs=' ';;
+*) libs="$ans";;
+esac
+
diff --git a/mcon/U/libyacc.U b/mcon/U/libyacc.U
new file mode 100644
index 0000000..cc7a3f3
--- /dev/null
+++ b/mcon/U/libyacc.U
@@ -0,0 +1,64 @@
+?RCS: $Id$
+?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: libyacc.U,v $
+?RCS: Revision 3.0.1.4 1997/02/28 16:09:19 ram
+?RCS: patch61: replaced .a with $_a all over the place
+?RCS:
+?RCS: Revision 3.0.1.3 1994/05/13 15:27:12 ram
+?RCS: patch27: added byacc case (ADO)
+?RCS:
+?RCS: Revision 3.0.1.2 1994/05/06 15:09:01 ram
+?RCS: patch23: now uses full library path instead of -l notation
+?RCS:
+?RCS: Revision 3.0.1.1 1994/01/24 14:13:49 ram
+?RCS: patch16: un-obsoleted this unit for smooth yacc compilations
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:09:04 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:libyacc: Loc yacc libpth _a
+?MAKE: -pick add $@ %<
+?S:libyacc:
+?S: This variable contains the argument to pass to the loader in order
+?S: to get the yacc library routines. If there is no yacc or yacc
+?S: library, it is null.
+?S:.
+?T:xxx
+: see if we should include -ly
+echo " "
+case "$yacc" in
+*byacc*)
+ echo "You are using byacc, so I won't look for a yacc library." >&4
+ libyacc=''
+ ;;
+*yacc)
+ xxx=`./loc liby$_a x $libpth`
+ case "$xxx" in
+ x)
+ echo "No yacc library found." >&4
+ libyacc=''
+ ;;
+ *)
+ echo "yacc library found in $xxx." >&4
+ libyacc="$xxx"
+ ;;
+ esac
+ ;;
+*bison*)
+ echo "You are using bison, so I won't look for a yacc library." >&4
+ libyacc=''
+ ;;
+*)
+echo "You don't seem to have yacc, so I won't look for the yacc library." >&4
+ libyacc=''
+ ;;
+esac
+
diff --git a/mcon/U/lintlib.U b/mcon/U/lintlib.U
new file mode 100644
index 0000000..a93fd30
--- /dev/null
+++ b/mcon/U/lintlib.U
@@ -0,0 +1,38 @@
+?RCS: $Id$
+?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: lintlib.U,v $
+?RCS: Revision 3.0 1993/08/18 12:09:05 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:lintlib lintlibexp: Getfile Loc Oldconfig
+?MAKE: -pick add $@ %<
+?S:lintlib:
+?S: This variable holds the name of the directory in which the user wants
+?S: to put public lint-library files for the package in question. It is
+?S: most often a local directory such as /usr/local/lib/lint. Programs using
+?S: this variable must be prepared to deal with ~name expansion.
+?S:.
+?S:lintlibexp:
+?S: This variable is the same as the lintlib variable, but is filename
+?S: expanded at configuration time, for convenient use in your makefiles.
+?S:.
+: determine where public lint libraries go
+case "$lintlib" in
+'') dflt=`./loc . "." /usr/local/lib/lint /usr/lib/lint /usr/lib`;;
+*) dflt="$lintlib" ;;
+esac
+echo " "
+fn=d~
+rp='Where do you want to put the public lint libraries?'
+. ./getfile
+lintlib="$ans"
+lintlibexp="$ansexp"
+
diff --git a/mcon/U/lns.U b/mcon/U/lns.U
new file mode 100644
index 0000000..d3cf5aa
--- /dev/null
+++ b/mcon/U/lns.U
@@ -0,0 +1,41 @@
+?RCS: $Id$
+?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: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
+?RCS:
+?RCS: $Log: lns.U,v $
+?RCS: Revision 3.0.1.1 1994/06/20 07:05:52 ram
+?RCS: patch30: created by ADO
+?RCS:
+?X:
+?X: This unit checks whether symbolic links are really supported.
+?X: We can't rely on d_symlink because that may be listed in the
+?X: C library but unimplemented.
+?X:
+?MAKE:lns: ln rm touch test
+?MAKE: -pick add $@ %<
+?S:lns:
+?S: This variable holds the name of the command to make
+?S: symbolic links (if they are supported). It can be used
+?S: in the Makefile. It is either 'ln -s' or 'ln'
+?S:.
+: determine whether symbolic links are supported
+echo " "
+$rm -f blurfl sym
+$touch blurfl
+if $ln -s blurfl sym > /dev/null 2>&1 && $test -f sym; then
+ echo "Symbolic links are supported." >&4
+ lns="$ln -s"
+else
+ echo "Symbolic links are NOT supported." >&4
+ lns="$ln"
+fi
+$rm -f blurfl sym
+
diff --git a/mcon/U/locale.U b/mcon/U/locale.U
new file mode 100644
index 0000000..659c827
--- /dev/null
+++ b/mcon/U/locale.U
@@ -0,0 +1,70 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:locale localeexp: Getfile Loc Oldconfig Prefixit Prefixup \
+ cat prefixexp package spackage enablenls
+?MAKE: -pick add $@ %<
+?Y:TOP
+?S:locale:
+?S: This variable holds the name of the directory in which the user wants
+?S: to put locale library files for the package in question. It is most
+?S: often a local directory such as /usr/share/locale. Programs using this
+?S: variable must be prepared to deal with filename expansion.
+?S: Only meaningful when $enablenls holds true.
+?S:.
+?S:localeexp:
+?S: This variable is the same as the locale variable, but is filename expanded
+?S: at configuration time, for convenient use in your makefiles.
+?S: Only meaningful when $enablenls holds true.
+?S:.
+?C:LOCALE:
+?C: This symbol holds the place where localization files for the package
+?C: are expected to be found. Be prepared to use ~name expansion, or rely
+?C: on LOCALE_EXP to have an expanded value computed at configuration time.
+?C: Only meaningful when ENABLE_NLS is defined.
+?C:.
+?C:LOCALE_EXP:
+?C: This symbol holds the possibly ~name expanded place where localization
+?C: files for the package are expected to be found.
+?C: Only meaningful when ENABLE_NLS is defined.
+?C:.
+?H:#define LOCALE "$locale"
+?H:#define LOCALE_EXP "$localeexp"
+?H:.
+: determine where locale files go
+case "$enablenls" in
+false) ;;
+*)
+ set locale locale
+ eval $prefixit
+ case "$locale" in
+ '')
+ dflt=`./loc . "." $prefixexp/share/locale \
+ /usr/share/locale /usr/local/share/locale`
+ set dflt
+ eval $prefixup
+ ;;
+ *) dflt="$locale";;
+ esac
+ fn=d~
+ $cat <<EOM
+
+$spackage comes with a set of files holding translations for various
+languages. Those need to be installed in order for you to benefit
+from those translations and have $package localized.
+
+EOM
+ rp='Where do you want to put the localization files?'
+ . ./getfile
+ locale="$ans"
+ localeexp="$ansexp"
+ ;;
+esac
+
diff --git a/mcon/U/locdist.U b/mcon/U/locdist.U
new file mode 100644
index 0000000..dc6299c
--- /dev/null
+++ b/mcon/U/locdist.U
@@ -0,0 +1,174 @@
+?RCS: $Id$
+?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: locdist.U,v $
+?RCS: Revision 3.0.1.1 1994/05/06 15:09:20 ram
+?RCS: patch23: added support for multi-state regions (WED)
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:09:06 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:locdist orgdist citydist statedist multistatedist cntrydist contdist: \
+ test newslibexp cat Myread Oldconfig
+?MAKE: -pick add $@ %<
+?S:locdist:
+?S: This variable contains the eventual value of the LOCDIST symbol,
+?S: which is the local organization's distribution name for news.
+?S:.
+?S:orgdist:
+?S: This variable contains the eventual value of the ORGDIST symbol,
+?S: which is the organization's distribution name for news.
+?S:.
+?S:citydist:
+?S: This variable contains the eventual value of the CITYDIST symbol,
+?S: which is the city's distribution name for news.
+?S:.
+?S:statedist:
+?S: This variable contains the eventual value of the STATEDIST symbol,
+?S: which is the state's or province's distribution name for news.
+?S:.
+?S:multistatedist:
+?S: This variable contains the eventual value of the MULTISTATEDIST symbol,
+?S: which is the news distribution code for multi-state region.
+?S:.
+?S:cntrydist:
+?S: This variable contains the eventual value of the CNTRYDIST symbol,
+?S: which is the country's distribution name for news.
+?S:.
+?S:contdist:
+?S: This variable contains the eventual value of the CONTDIST symbol,
+?S: which is the continent's distribution name for news.
+?S:.
+?C:LOCDIST:
+?C: This symbol contains the distribution name for the news system that
+?C: restricts article distribution to the local organization.
+?C:.
+?C:ORGDIST:
+?C: This symbol contains the distribution name for the news system that
+?C: restricts article distribution to the organization.
+?C:.
+?C:CITYDIST:
+?C: This symbol contains the distribution name for the news system that
+?C: restricts article distribution to the city.
+?C:.
+?C:STATEDIST:
+?C: This symbol contains the distribution name for the news system that
+?C: restricts article distribution to the state or province.
+?C:.
+?C:MULTISTATEDIST:
+?C: This symbol contains the distribution name for the news system that
+?C: restricts article distribution to a multi-state region.
+?C:.
+?C:CNTRYDIST:
+?C: This symbol contains the distribution name for the news system that
+?C: restricts article distribution to the country.
+?C:.
+?C:CONTDIST:
+?C: This symbol contains the distribution name for the news system that
+?C: restricts article distribution to the continent.
+?C:.
+?H:#define LOCDIST "$locdist" /**/
+?H:#define ORGDIST "$orgdist" /**/
+?H:#define CITYDIST "$citydist" /**/
+?H:#define MULTISTATEDIST "$multistatedist" /**/
+?H:#define STATEDIST "$statedist" /**/
+?H:#define CNTRYDIST "$cntrydist" /**/
+?H:#define CONTDIST "$contdist" /**/
+?H:.
+: get the local distributions
+$cat <<'EOH'
+
+Distribution groups are the things you use on the Distribution line to limit
+where an article will go to. You are likely to be a member of several
+distribution groups, such as organization, city, state, province, country,
+continent, etc. For example, Los Angeles has the distribution code "la",
+New Jersey has the code "nj", and Europe has the code "eunet".
+
+The categories you will be asked are:
+
+local organization (Could be just one machine or a cluster or an office)
+organization att, dec, kgb, ...
+city la, ny, mosc, ...
+state/province ca, nj, bc, ...
+multi-state region pnw, ne, ...
+country usa, can, rok, whatever
+continent na (North America), asia, etc.
+
+EOH
+if $test -f $newslibexp/distributions; then
+ case "$silent" in
+ true) ;;
+ *) dflt='Hit return to continue'
+ rp=''
+ . ./myread
+ ;;
+ esac
+ echo "Here is your distributions file:" >&4
+ echo " " >&4
+ $cat >&4 $newslibexp/distributions
+ echo " " >&4
+fi
+echo "Use 'none' for any distributions you don't have."
+echo " "
+case "$locdist" in
+'') dflt="none";;
+*) dflt="$locdist";;
+esac
+rp="What is the distribution code for your local organization?"
+. ./myread
+locdist="$ans"
+case "$orgdist" in
+'') dflt="none";;
+*) dflt="$orgdist";;
+esac
+rp="What is the distribution code for your organization?"
+. ./myread
+orgdist="$ans"
+case "$citydist" in
+'') dflt="none";;
+*) dflt="$citydist";;
+esac
+rp="What is the distribution code for your city?"
+. ./myread
+citydist="$ans"
+case "$statedist" in
+'') dflt="none";;
+*) dflt="$statedist";;
+esac
+rp="What is the distribution code for your state/province?"
+. ./myread
+statedist="$ans"
+case "$multistatedist" in
+'') dflt="none";;
+*) dflt="$multistatedist";;
+esac
+rp="What is the distribution code for your multi-state region?"
+. ./myread
+multistatedist="$ans"
+case "$cntrydist" in
+'') dflt="none";;
+*) dflt="$cntrydist";;
+esac
+rp="What is the distribution code for your country?"
+. ./myread
+cntrydist="$ans"
+case "$contdist" in
+'') dflt="none";;
+*) dflt="$contdist";;
+esac
+rp="What is the distribution code for your continent?"
+. ./myread
+contdist="$ans"
+$cat <<'EOM'
+
+If you have any other distribution groups you will need to edit Pnews
+and newsetup to add them.
+EOM
+
diff --git a/mcon/U/longsize.U b/mcon/U/longsize.U
new file mode 100644
index 0000000..5ec0dc3
--- /dev/null
+++ b/mcon/U/longsize.U
@@ -0,0 +1,24 @@
+?RCS: $Id$
+?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: longsize.U,v $
+?RCS: Revision 3.0.1.2 1997/02/28 16:09:35 ram
+?RCS: patch61: code moved to intsize.U
+?RCS:
+?RCS: Revision 3.0.1.1 1994/10/29 16:24:31 ram
+?RCS: patch36: added ?F: line for metalint file checking
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:09:07 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: 'longsize' is now defined within intsize.U
+?X:
+?LINT: empty
diff --git a/mcon/U/lseektype.U b/mcon/U/lseektype.U
new file mode 100644
index 0000000..0223930
--- /dev/null
+++ b/mcon/U/lseektype.U
@@ -0,0 +1,40 @@
+?RCS: $Id$
+?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: lseektype.U,v $
+?RCS: Revision 3.0.1.1 1994/08/29 16:30:10 ram
+?RCS: patch32: now uses new Typedef unit to compute type information
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:09:08 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:lseektype: Myread Typedef
+?MAKE: -pick add $@ %<
+?S:lseektype:
+?S: This variable defines lseektype to be something like off_t, long,
+?S: or whatever type is used to declare lseek offset's type in the
+?S: kernel (which also appears to be lseek's return type).
+?S:.
+?C:Off_t (LSEEKTYPE):
+?C: This symbol holds the type used to declare offsets in the kernel.
+?C: It can be int, long, off_t, etc... It may be necessary to include
+?C: <sys/types.h> to get any typedef'ed information.
+?C:.
+?H:#define Off_t $lseektype /* <offset> type */
+?H:.
+: see what type lseek is declared as in the kernel
+set off_t lseektype long stdio.h sys/types.h
+eval $typedef
+echo " "
+dflt="$lseektype"
+rp="What type is lseek's offset on this system declared as?"
+. ./myread
+lseektype="$ans"
+
diff --git a/mcon/U/maildir.U b/mcon/U/maildir.U
new file mode 100644
index 0000000..cd07290
--- /dev/null
+++ b/mcon/U/maildir.U
@@ -0,0 +1,41 @@
+?RCS: $Id$
+?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: maildir.U,v $
+?RCS: Revision 3.0.1.1 1993/12/15 08:21:56 ram
+?RCS: patch15: now also looks under /var/mail for BSD/386
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:09:09 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:maildir maildirexp: Getfile Loc Oldconfig
+?MAKE: -pick add $@ %<
+?S:maildir:
+?S: This variable contains the name of the directory in which mail is
+?S: spooled. Programs using this variable must be prepared to deal with
+?S: ~name substitutions.
+?S:.
+?S:maildirexp:
+?S: This is the same as the maildir variable, but is filename expanded
+?S: at configuration time, for programs not willing to deal with it at
+?S: run-time.
+?S:.
+: determine where mail is spooled
+case "$maildir" in
+'') dflt=`./loc . /usr/spool/mail /usr/spool/mail /usr/mail /var/mail`;;
+*) dflt="$maildir";;
+esac
+echo " "
+fn=d~
+rp='Where is yet-to-be-read mail spooled?'
+. ./getfile
+maildir="$ans"
+maildirexp="$ansexp"
+
diff --git a/mcon/U/mailer.U b/mcon/U/mailer.U
new file mode 100644
index 0000000..c9ef5e6
--- /dev/null
+++ b/mcon/U/mailer.U
@@ -0,0 +1,61 @@
+?RCS: $Id$
+?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: mailer.U,v $
+?RCS: Revision 3.0.1.3 1995/01/11 15:32:11 ram
+?RCS: patch45: can now use Loc variables since path stripping is deferred
+?RCS:
+?RCS: Revision 3.0.1.2 1994/05/06 15:10:04 ram
+?RCS: patch23: ensure full path value is used for rmail also
+?RCS:
+?RCS: Revision 3.0.1.1 1994/01/24 14:14:18 ram
+?RCS: patch16: now use _sendmail vars and friends for portability issues
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:09:10 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:mailer: test cat rmail mail smail sendmail Getfile Oldconfig
+?MAKE: -pick add $@ %<
+?S:mailer:
+?S: This variable contains the full pathname of a reasonable mailer.
+?S: By reasonable, we mean some program which can understand internet
+?S: addresses or at least forward them to some internet router. This
+?S: mailer should be invoked as "mailer [options] recipients <mail".
+?S:.
+: determine the name of a reasonable mailer
+case "$mailer" in
+'')
+ if $test -f "$sendmail"; then
+ dflt="$sendmail"
+ elif $test -f "$smail"; then
+ dflt="$smail"
+ elif $test -f "$rmail"; then
+ dflt="$rmail"
+ elif $test -f /bin/mail; then
+ dflt=/bin/mail
+ else
+ dflt=$mail
+ fi
+ ;;
+*) dflt="$mailer";;
+esac
+$cat <<EOM
+
+I need the full pathname of the program used to deliver mail on your system.
+A typical answer would be /usr/lib/sendmail or /bin/rmail, but you may choose
+any other program, as long as it can be fed from standard input and will
+honour any user-supplied headers.
+
+EOM
+fn=f
+rp='Mail transport agent to be used?'
+. ./getfile
+mailer="$ans"
+
diff --git a/mcon/U/mailfile.U b/mcon/U/mailfile.U
new file mode 100644
index 0000000..64cd1e0
--- /dev/null
+++ b/mcon/U/mailfile.U
@@ -0,0 +1,56 @@
+?RCS: $Id$
+?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: mailfile.U,v $
+?RCS: Revision 3.0.1.2 1994/10/29 16:24:57 ram
+?RCS: patch36: the Loc unit was missing from the dependency line
+?RCS:
+?RCS: Revision 3.0.1.1 1993/12/15 08:22:08 ram
+?RCS: patch15: now also looks under /var/mail for BSD/386
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:09:11 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:mailfile: Myread Oldconfig Filexp Loc
+?MAKE: -pick add $@ %<
+?S:mailfile:
+?S: This variable contains the eventual value of the MAILFILE symbol,
+?S: which contains an interpretable name of the mail spool file for the
+?S: current user.
+?S:.
+?C:MAILFILE:
+?C: This symbol contains the interpretable name of the mail spool file
+?C: for the current user. The program must be prepared to substitute
+?C: the HOME directory for %~, and the login id for %L.
+?C:.
+?H:#define MAILFILE "$mailfile" /**/
+?H:.
+: determine where mail is spooled
+case "$mailfile" in
+'')
+ dflt=`./loc . XXX /usr/spool/mail /usr/mail /var/mail`
+ case "$dflt" in
+ XXX) dflt='%~/mailbox';;
+ *) dflt="$dflt/%L";;
+ esac
+ ;;
+*) dflt="$mailfile"
+ ;;
+esac
+cat <<'EOM'
+
+In the following question, you may use %~ to represent the user's home
+directory, and %L to represent a users name.
+
+EOM
+rp='In which file is yet-to-be-read mail spooled? (~name ok)'
+. ./myread
+mailfile=`./filexp "$ans"`
+
diff --git a/mcon/U/make.U b/mcon/U/make.U
new file mode 100644
index 0000000..f9191b4
--- /dev/null
+++ b/mcon/U/make.U
@@ -0,0 +1,60 @@
+?RCS: $Id$
+?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 License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: make.U,v $
+?RCS: Revision 3.0.1.1 1997/02/28 16:09:40 ram
+?RCS: patch61: created
+?RCS:
+?MAKE:make_set_make : Loc rm sed make
+?MAKE: -pick add $@ %<
+?S:make_set_make:
+?S: Some versions of 'make' set the variable MAKE. Others do not.
+?S: This variable contains the string to be included in Makefile.SH
+?S: so that MAKE is set if needed, and not if not needed.
+?S: Possible values are:
+?S:
+?S: make_set_make='#' # If your make program handles this for you,
+?S:
+?S: make_set_make="MAKE=$make" # if it doesn't.
+?S:
+?S: This uses a comment character so that we can distinguish a
+?S: 'set' value (from a previous config.sh or Configure -D option)
+?S: from an uncomputed value.
+?S:.
+?LINT: extern MAKE
+?LINT: change MAKE
+?X: This test is based on one from an autoconf-generated configure
+?X: script. Autoconf stole a lot from Configure, but now it's our
+?X: turn to do so... ;-) -- RAM, 21/02/97
+: check whether make sets MAKE
+echo " "
+echo "Checking if your $make program sets \$(MAKE)..." >&4
+case "$make_set_make" in
+'')
+?X: Use sed so we don't have a line beginning with @echo. Metaconfig
+?X: will think that's a command like @if or @end.
+ $sed 's/^X //' > testmake.mak << 'EOF'
+Xall:
+X @echo 'maketemp="$(MAKE)"'
+EOF
+?X: GNU make sometimes prints "make[1]: Entering...", which would confuse us
+ case "`$make -f testmake.mak 2>/dev/null`" in
+ *maketemp=*) make_set_make='#' ;;
+ *) make_set_make="MAKE=$make" ;;
+ esac
+ $rm -f testmake.mak
+ ;;
+esac
+case "$make_set_make" in
+'#') echo "Yup, it does.";;
+*) echo "Nope, it doesn't.";;
+esac
+
diff --git a/mcon/U/mallocsrc.U b/mcon/U/mallocsrc.U
new file mode 100644
index 0000000..233fc03
--- /dev/null
+++ b/mcon/U/mallocsrc.U
@@ -0,0 +1,181 @@
+?RCS: $Id$
+?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: mallocsrc.U,v $
+?RCS: Revision 3.0.1.2 1997/02/28 16:10:26 ram
+?RCS: patch61: added support for Free_t, the type of free()
+?RCS: patch61: replaced .o with $_o all over the place
+?RCS:
+?RCS: Revision 3.0.1.1 1994/05/06 15:10:46 ram
+?RCS: patch23: added support for MYMALLOC, mainly for perl5 (ADO)
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:09:12 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:mallocsrc mallocobj usemymalloc malloctype d_mymalloc \
+ freetype: Myread \
+ Oldconfig package spackage Guess Setvar rm cat +cc +ccflags Findhdr \
+ i_malloc i_stdlib sed libs _o ptrsize
+?MAKE: -pick add $@ %<
+?X: Put near top so that other tests don't erroneously include
+?X: -lmalloc. --AD 22 June 1998
+?Y:TOP
+?S:usemymalloc:
+?S: This variable contains y if the malloc that comes with this package
+?S: is desired over the system's version of malloc. People often include
+?S: special versions of malloc for efficiency, but such versions are often
+?S: less portable. See also mallocsrc and mallocobj.
+?S: If this is 'y', then -lmalloc is removed from $libs.
+?S:.
+?S:mallocsrc:
+?S: This variable contains the name of the malloc.c that comes with
+?S: the package, if that malloc.c is preferred over the system malloc.
+?S: Otherwise the value is null. This variable is intended for generating
+?S: Makefiles.
+?S:.
+?S:d_mymalloc:
+?S: This variable conditionally defines MYMALLOC in case other parts
+?S: of the source want to take special action if MYMALLOC is used.
+?S: This may include different sorts of profiling or error detection.
+?S:.
+?S:mallocobj:
+?S: This variable contains the name of the malloc.o that this package
+?S: generates, if that malloc.o is preferred over the system malloc.
+?S: Otherwise the value is null. This variable is intended for generating
+?S: Makefiles. See mallocsrc.
+?S:.
+?S:freetype:
+?S: This variable contains the return type of free(). It is usually
+?S: void, but occasionally int.
+?S:.
+?S:malloctype:
+?S: This variable contains the kind of ptr returned by malloc and realloc.
+?S:.
+?C:Free_t:
+?C: This variable contains the return type of free(). It is usually
+?C: void, but occasionally int.
+?C:.
+?C:Malloc_t (MALLOCPTRTYPE):
+?C: This symbol is the type of pointer returned by malloc and realloc.
+?C:.
+?H:#define Malloc_t $malloctype /**/
+?H:#define Free_t $freetype /**/
+?H:.
+?C:USE_MY_MALLOC (MYMALLOC):
+?C: This symbol, if defined, indicates that we're using our own malloc.
+?C:.
+?H:#$d_mymalloc USE_MY_MALLOC /**/
+?H:.
+?LINT:change libs
+?X: Cannot test for mallocsrc; it is the unit's name and there is a bug in
+?X: the interpreter which defines all the names, even though they are not used.
+@if mallocobj || USE_MY_MALLOC
+: determine which malloc to compile in
+echo " "
+case "$usemymalloc" in
+[yY]*|true|$define) dflt='y' ;;
+[nN]*|false|$undef) dflt='n' ;;
+*)
+ case "$ptrsize" in
+ 4) dflt='y' ;;
+ *) dflt='n' ;;
+ esac
+ ;;
+esac
+$cat <<EOM
+$spackage comes with its own malloc() implementation that will supersede
+the version included in your C library. Since proper memory allocation is
+critical, you may choose to opt out from this specific implementation and
+rely on the (hopefully) more thoroughly tested version in the C library.
+
+If you change your mind later, you can always re-run this configuration
+script and recompile $package from scratch.
+
+EOM
+rp="Do you wish to attempt to use the malloc() that comes with $package?"
+. ./myread
+usemymalloc="$ans"
+case "$ans" in
+y*|true)
+ usemymalloc='y'
+ mallocsrc='malloc.c'
+ mallocobj="malloc$_o"
+ d_mymalloc="$define"
+?X: Maybe libs.U should be dependent on mallocsrc.U, but then
+?X: most packages that use dist probably don't supply their own
+?X: malloc, so this is probably an o.k. compromise
+ case "$libs" in
+ *-lmalloc*)
+ : Remove malloc from list of libraries to use
+ echo "Removing unneeded -lmalloc from library list" >&4
+ set `echo X $libs | $sed -e 's/-lmalloc / /' -e 's/-lmalloc$//'`
+ shift
+ libs="$*"
+ echo "libs = $libs" >&4
+ ;;
+ esac
+ ;;
+*)
+ usemymalloc='n'
+ mallocsrc=''
+ mallocobj=''
+ d_mymalloc="$undef"
+ ;;
+esac
+
+@end
+@if MALLOCPTRTYPE || Malloc_t || Free_t
+: compute the return types of malloc and free
+echo " "
+$cat >malloc.c <<END
+#$i_malloc I_MALLOC
+#$i_stdlib I_STDLIB
+#include <stdio.h>
+#include <sys/types.h>
+#ifdef I_MALLOC
+#include <malloc.h>
+#endif
+#ifdef I_STDLIB
+#include <stdlib.h>
+#endif
+#ifdef TRY_MALLOC
+void *malloc();
+#endif
+#ifdef TRY_FREE
+void free();
+#endif
+END
+@if MALLOCPTRTYPE || Malloc_t
+case "$malloctype" in
+'')
+ if $cc $ccflags -c -DTRY_MALLOC malloc.c >/dev/null 2>&1; then
+ malloctype='void *'
+ else
+ malloctype='char *'
+ fi
+ ;;
+esac
+echo "Your system wants malloc to return '$malloctype', it would seem." >&4
+@end
+
+@if Free_t
+case "$freetype" in
+'')
+ if $cc $ccflags -c -DTRY_FREE malloc.c >/dev/null 2>&1; then
+ freetype='void'
+ else
+ freetype='int'
+ fi
+ ;;
+esac
+echo "Your system uses $freetype free(), it would seem." >&4
+@end
+$rm -f malloc.[co]
+@end
diff --git a/mcon/U/man1dir.U b/mcon/U/man1dir.U
new file mode 100644
index 0000000..b503690
--- /dev/null
+++ b/mcon/U/man1dir.U
@@ -0,0 +1,147 @@
+?RCS: $Id$
+?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 License,
+?RCS: as specified in the 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: man1dir.U,v $
+?RCS: Revision 3.0.1.1 1997/02/28 16:10:29 ram
+?RCS: patch61: created
+?RCS:
+?X:
+?X: This was originally specific to perl5. Since perl5 has man pages that
+?X: go in both man1/ and man3/ directories, we need both man1dir
+?X: and man3dir. This unit is basically dist's mansrc.U with
+?X: man1 used instead of man everywhere.
+?X:
+?MAKE:man1dir man1direxp man1ext installman1dir: afs cat nroff Loc Oldconfig \
+ spackage test Getfile Prefixit prefixexp Prefixup sysman Myread
+?MAKE: -pick add $@ %<
+?Y:TOP
+?S:man1dir:
+?S: This variable contains the name of the directory in which manual
+?S: source pages are to be put. It is the responsibility of the
+?S: Makefile.SH to get the value of this into the proper command.
+?S: You must be prepared to do the ~name expansion yourself.
+?S:.
+?S:man1direxp:
+?S: This variable is the same as the man1dir variable, but is filename
+?S: expanded at configuration time, for convenient use in makefiles.
+?S:.
+?S:installman1dir:
+?S: This variable is really the same as man1direxp, unless you are using
+?S: AFS in which case it points to the read/write location whereas
+?S: man1direxp only points to the read-only access location. For extra
+?S: portability, you should only use this variable within your makefiles.
+?S:.
+?S:man1ext:
+?S: This variable contains the extension that the manual page should
+?S: have: one of 'n', 'l', or '1'. The Makefile must supply the '.'.
+?S: See man1dir.
+?S:.
+?T:lookpath
+: determine where manual pages go
+set man1dir man1dir none
+eval $prefixit
+$cat <<EOM
+
+$spackage has manual pages available in source form.
+EOM
+case "$nroff" in
+nroff)
+ echo "However, you don't have nroff, so they're probably useless to you."
+ case "$man1dir" in
+ '') man1dir="none";;
+ esac;;
+esac
+echo "If you don't want the manual sources installed, answer 'none'."
+case "$man1dir" in
+' ') dflt=none
+ ;;
+'')
+ lookpath="$prefixexp/man/man1 $prefixexp/man/l_man/man1"
+ lookpath="$lookpath $prefixexp/man/p_man/man1"
+ lookpath="$lookpath $prefixexp/man/u_man/man1"
+ lookpath="$lookpath $prefixexp/man/man.1"
+?X: Experience has shown people expect man1dir to be under prefix,
+?X: so we now always put it there. Users who want other behavior
+?X: can answer interactively or use a command line option.
+?X: Does user have System V-style man paths.
+ case "$sysman" in
+ */?_man*) dflt=`./loc . $prefixexp/l_man/man1 $lookpath` ;;
+ *) dflt=`./loc . $prefixexp/man/man1 $lookpath` ;;
+ esac
+ set dflt
+ eval $prefixup
+ ;;
+*) dflt="$man1dir"
+ ;;
+esac
+echo " "
+fn=dn+~
+rp="Where do the main $spackage manual pages (source) go?"
+. ./getfile
+if $test "X$man1direxp" != "X$ansexp"; then
+ installman1dir=''
+fi
+man1dir="$ans"
+man1direxp="$ansexp"
+case "$man1dir" in
+'') man1dir=' '
+ installman1dir='';;
+esac
+if $afs; then
+ $cat <<EOM
+
+Since you are running AFS, I need to distinguish the directory in which
+manual pages reside from the directory in which they are installed (and from
+which they are presumably copied to the former directory by occult means).
+
+EOM
+ case "$installman1dir" in
+ '') dflt=`echo $man1direxp | sed 's#^/afs/#/afs/.#'`;;
+ *) dflt="$installman1dir";;
+ esac
+ fn=de~
+ rp='Where will man pages be installed?'
+ . ./getfile
+ installman1dir="$ans"
+else
+ installman1dir="$man1direxp"
+fi
+
+: What suffix to use on installed man pages
+
+case "$man1dir" in
+' ')
+ man1ext='0'
+ ;;
+*)
+ rp="What suffix should be used for the main $spackage man pages?"
+ case "$man1ext" in
+ '') case "$man1dir" in
+ *1) dflt=1 ;;
+ *1p) dflt=1p ;;
+ *1pm) dflt=1pm ;;
+ *l) dflt=l;;
+ *n) dflt=n;;
+ *o) dflt=o;;
+ *p) dflt=p;;
+ *C) dflt=C;;
+ *L) dflt=L;;
+ *L1) dflt=L1;;
+ *) dflt=1;;
+ esac
+ ;;
+ *) dflt="$man1ext";;
+ esac
+ . ./myread
+ man1ext="$ans"
+ ;;
+esac
+
diff --git a/mcon/U/man3dir.U b/mcon/U/man3dir.U
new file mode 100644
index 0000000..3aad1b8
--- /dev/null
+++ b/mcon/U/man3dir.U
@@ -0,0 +1,158 @@
+?RCS: $Id$
+?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 License,
+?RCS: as specified in the 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: man3dir.U,v $
+?RCS: Revision 3.0.1.1 1997/02/28 16:10:34 ram
+?RCS: patch61: created
+?RCS:
+?X:
+?X: This was originally specific to perl5. Since perl5 has man pages that
+?X: go in both man1/ and man3/ directories, we need both man1dir
+?X: and man3dir. This unit is basically dist's mansrc.U with
+?X: man3 used instead of man everywhere.
+?X: I then added various tests because perl5 has *lots* of man3
+?X: pages with long file names. -- ADO
+?X:
+?MAKE:man3dir man3direxp man3ext installman3dir: afs cat nroff Loc Oldconfig \
+ sed man1dir spackage package Getfile prefix Prefixit Prefixup \
+ d_flexfnam privlib Myread
+?MAKE: -pick add $@ %<
+?Y:TOP
+?S:man3dir:
+?S: This variable contains the name of the directory in which manual
+?S: source pages are to be put. It is the responsibility of the
+?S: Makefile.SH to get the value of this into the proper command.
+?S: You must be prepared to do the ~name expansion yourself.
+?S:.
+?S:man3direxp:
+?S: This variable is the same as the man3dir variable, but is filename
+?S: expanded at configuration time, for convenient use in makefiles.
+?S:.
+?S:installman3dir:
+?S: This variable is really the same as man3direxp, unless you are using
+?S: AFS in which case it points to the read/write location whereas
+?S: man3direxp only points to the read-only access location. For extra
+?S: portability, you should only use this variable within your makefiles.
+?S:.
+?S:man3ext:
+?S: This variable contains the extension that the manual page should
+?S: have: one of 'n', 'l', or '3'. The Makefile must supply the '.'.
+?S: See man3dir.
+?S:.
+: determine where library module manual pages go
+set man3dir man3dir none
+eval $prefixit
+$cat <<EOM
+
+$spackage has manual pages for many of the library modules.
+EOM
+
+case "$nroff" in
+nroff)
+ $cat <<'EOM'
+However, you don't have nroff, so they're probably useless to you.
+EOM
+ case "$man3dir" in
+ '') man3dir="none";;
+ esac;;
+esac
+
+case "$d_flexfnam" in
+undef)
+ $cat <<'EOM'
+However, your system can't handle the long file names like File::Basename.3.
+EOM
+ case "$man3dir" in
+ '') man3dir="none";;
+ esac;;
+esac
+
+echo "If you don't want the manual sources installed, answer 'none'."
+?X: We dont use /usr/local/man/man3 because some man programs will
+?X: only show the /usr/local/man/man3 contents, and not the system ones,
+?X: thus man less will show the perl module less.pm, but not the system
+?X: less command. We might also conflict with TCL man pages.
+?X: However, something like /opt/perl/man/man3 is fine.
+case "$man3dir" in
+'') case "$prefix" in
+ *$package*) dflt=`echo $man1dir |
+ $sed -e 's/man1/man3/g' -e 's/man\.1/man\.3/g'` ;;
+ *) dflt="$privlib/man/man3" ;;
+ esac
+ ;;
+' ') dflt=none;;
+*) dflt="$man3dir" ;;
+esac
+echo " "
+
+fn=dn+~
+rp="Where do the $package library man pages (source) go?"
+. ./getfile
+if test "X$man3direxp" != "X$ansexp"; then
+ installman3dir=''
+fi
+
+man3dir="$ans"
+man3direxp="$ansexp"
+case "$man3dir" in
+'') man3dir=' '
+ installman3dir='';;
+esac
+if $afs; then
+ $cat <<EOM
+
+Since you are running AFS, I need to distinguish the directory in which
+manual pages reside from the directory in which they are installed (and from
+which they are presumably copied to the former directory by occult means).
+
+EOM
+ case "$installman3dir" in
+ '') dflt=`echo $man3direxp | sed 's#^/afs/#/afs/.#'`;;
+ *) dflt="$installman3dir";;
+ esac
+ fn=de~
+ rp='Where will man pages be installed?'
+ . ./getfile
+ installman3dir="$ans"
+else
+ installman3dir="$man3direxp"
+fi
+
+: What suffix to use on installed man pages
+
+case "$man3dir" in
+' ')
+ man3ext='0'
+ ;;
+*)
+ rp="What suffix should be used for the $package library man pages?"
+ case "$man3ext" in
+ '') case "$man3dir" in
+ *3) dflt=3 ;;
+ *3p) dflt=3p ;;
+ *3pm) dflt=3pm ;;
+ *l) dflt=l;;
+ *n) dflt=n;;
+ *o) dflt=o;;
+ *p) dflt=p;;
+ *C) dflt=C;;
+ *L) dflt=L;;
+ *L3) dflt=L3;;
+ *) dflt=3;;
+ esac
+ ;;
+ *) dflt="$man3ext";;
+ esac
+ . ./myread
+ man3ext="$ans"
+ ;;
+esac
+
diff --git a/mcon/U/manfmt.U b/mcon/U/manfmt.U
new file mode 100644
index 0000000..aac906e
--- /dev/null
+++ b/mcon/U/manfmt.U
@@ -0,0 +1,118 @@
+?RCS: $Id$
+?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: manfmt.U,v $
+?RCS: Revision 3.0.1.5 1997/02/28 16:11:57 ram
+?RCS: patch61: don't ask for AFS when they choose to not install pages
+?RCS:
+?RCS: Revision 3.0.1.4 1995/09/25 09:16:52 ram
+?RCS: patch59: unit is now forced to the top of Configure, if possible
+?RCS:
+?RCS: Revision 3.0.1.3 1995/01/30 14:39:20 ram
+?RCS: patch49: new installmanfmt and AFS-lookup for formatted man pages
+?RCS: patch49: can now handle installation prefix changes (from WED)
+?RCS:
+?RCS: Revision 3.0.1.2 1994/08/29 16:30:31 ram
+?RCS: patch32: now uses installation prefix for default setting
+?RCS:
+?RCS: Revision 3.0.1.1 1993/09/13 16:09:22 ram
+?RCS: patch10: allows for L1 man page extension (WAD)
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:09:13 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:manfmt manfmtexp installmanfmt: Getfile Loc Oldconfig cat manext \
+ spackage Prefixit prefixexp Prefixup afs test
+?MAKE: -pick add $@ %<
+?Y:TOP
+?S:manfmt:
+?S: This variable contains the name of the directory in which formatted
+?S: manual pages are to be put. It is the responsibility of the
+?S: Makefile.SH to get the value of this into the proper command. Note
+?S: that you may have to do ~name substitution. Use manfmtexp otherwise.
+?S:.
+?S:manfmtexp:
+?S: This is the same as the manfmt variable, but is filename expanded
+?S: at configuration time, for programs not willing to deal with it at
+?S: run-time.
+?S:.
+?S:installmanfmt:
+?S: This variable is really the same as manfmtexp, unless you are using
+?S: AFS in which case it points to the read/write location whereas
+?S: mansrcexp only points to the read-only access location. For extra
+?S: portability, you should only use this variable within your makefiles.
+?S:.
+?LINT:change manext
+?T:lookpath
+: determine where manual pages go
+set manfmt manfmt
+eval $prefixit
+$cat <<EOM
+
+$spackage has pre-formatted manual pages. If you don't want these installed,
+answer 'none' to the next question.
+
+EOM
+case "$manfmt" in
+'')
+ lookpath="$prefixexp/catman/man1 $prefixexp/man/cat1"
+ lookpath="$lookpath $prefixexp/catman/u_man/man1"
+ lookpath="$lookpath $prefixexp/catman/l_man/man1"
+ lookpath="$lookpath $prefixexp/catman/cat1 /usr/catman/local/man1"
+ lookpath="$lookpath /usr/catman/manl /usr/man/cat1"
+ lookpath="$lookpath /usr/catman/mann /usr/catman/l_man/man1"
+ lookpath="$lookpath /usr/catman/u_man/man1 /usr/catman/man1"
+ dflt=`./loc . none $lookpath`
+ set dflt
+ eval $prefixup
+ ;;
+*) dflt="$manfmt"
+ ;;
+esac
+fn=dn~
+rp='Where do pre-formatted manual pages go?'
+. ./getfile
+if test "X$manfmtexp" != "X$ansexp"; then
+ installmanfmt=''
+fi
+manfmt="$ans"
+manfmtexp="$ansexp"
+if $afs && $test "$manfmt"; then
+ $cat <<EOM
+
+Since you are running AFS, I need to distinguish the directory in which
+manual pages reside from the directory in which they are installed (and from
+which they are presumably copied to the former directory by occult means).
+
+EOM
+ case "$installmanfmt" in
+ '') dflt=`echo $manfmtexp | sed 's#^/afs/#/afs/.#'`;;
+ *) dflt="$installmanfmt";;
+ esac
+ fn=de~
+ rp='Where will pre-formatted man pages be installed?'
+ . ./getfile
+ installmanfmt="$ans"
+else
+ installmanfmt="$manfmtexp"
+fi
+
+case "$manfmt" in
+'') manext='0';;
+*l) manext=l;;
+*n) manext=n;;
+*o) manext=l;;
+*p) manext=n;;
+*C) manext=C;;
+*L) manext=L;;
+*L1) manext=L1;;
+*) manext=1;;
+esac
+
diff --git a/mcon/U/mansrc.U b/mcon/U/mansrc.U
new file mode 100644
index 0000000..bfca6a1
--- /dev/null
+++ b/mcon/U/mansrc.U
@@ -0,0 +1,150 @@
+?RCS: $Id$
+?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: mansrc.U,v $
+?RCS: Revision 3.0.1.9 1997/02/28 16:12:03 ram
+?RCS: patch61: don't ask for AFS when they choose to not install pages
+?RCS:
+?RCS: Revision 3.0.1.8 1995/09/25 09:16:58 ram
+?RCS: patch59: unit is now forced to the top of Configure, if possible
+?RCS:
+?RCS: Revision 3.0.1.7 1995/02/15 14:15:31 ram
+?RCS: patch51: was mistakenly duplicating /usr/local/man/man1 (ADO)
+?RCS: patch51: added /opt/man/man1 to the lookpath (ADO)
+?RCS:
+?RCS: Revision 3.0.1.6 1995/01/30 14:39:34 ram
+?RCS: patch49: can now handle installation prefix changes (from WED)
+?RCS:
+?RCS: Revision 3.0.1.5 1995/01/11 15:32:25 ram
+?RCS: patch45: can now use Loc variables since path stripping is deferred
+?RCS:
+?RCS: Revision 3.0.1.4 1994/08/29 16:30:38 ram
+?RCS: patch32: now uses installation prefix for default setting
+?RCS:
+?RCS: Revision 3.0.1.3 1994/05/06 15:11:10 ram
+?RCS: patch23: added lint hint, assuring that nroff is used
+?RCS:
+?RCS: Revision 3.0.1.2 1994/01/24 14:14:39 ram
+?RCS: patch16: now uses _nroff in case user asked for portability
+?RCS:
+?RCS: Revision 3.0.1.1 1993/09/13 16:09:31 ram
+?RCS: patch10: allows for L1 man page extension (WAD)
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:09:14 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:mansrc mansrcexp manext installmansrc: afs cat nroff Loc Oldconfig \
+ sysman spackage test Getfile Prefixit prefixexp Prefixup
+?MAKE: -pick add $@ %<
+?Y:TOP
+?S:mansrc:
+?S: This variable contains the name of the directory in which manual
+?S: source pages are to be put. It is the responsibility of the
+?S: Makefile.SH to get the value of this into the proper command.
+?S: You must be prepared to do the ~name expansion yourself.
+?S:.
+?S:mansrcexp:
+?S: This variable is the same as the mansrc variable, but is filename
+?S: expanded at configuration time, for convenient use in makefiles.
+?S:.
+?S:installmansrc:
+?S: This variable is really the same as mansrcexp, unless you are using
+?S: AFS in which case it points to the read/write location whereas
+?S: mansrcexp only points to the read-only access location. For extra
+?S: portability, you should only use this variable within your makefiles.
+?S:.
+?S:manext:
+?S: This variable contains the extension that the manual page should
+?S: have: one of 'n', 'l', or '1'. The Makefile must supply the '.'.
+?S: See mansrc.
+?S:.
+?T:lookpath
+: determine where manual pages go
+set mansrc mansrc none
+eval $prefixit
+$cat <<EOM
+
+$spackage has manual pages available in source form.
+EOM
+case "$nroff" in
+nroff)
+ echo "However, you don't have nroff, so they're probably useless to you."
+ case "$mansrc" in
+ '') mansrc="none";;
+ esac;;
+esac
+echo "If you don't want the manual sources installed, answer 'none'."
+case "$mansrc" in
+'')
+ lookpath="$prefixexp/share/man/man1 $prefixexp/man/man1"
+ lookpath="$lookpath $prefixexp/man/u_man/man1 $prefixexp/man/l_man/man1"
+ lookpath="$lookpath /usr/local/man/man1 /opt/man/man1 /usr/man/manl"
+ lookpath="$lookpath /usr/share/man/man1 /usr/local/share/man/man1"
+ lookpath="$lookpath /usr/man/local/man1 /usr/man/l_man/man1"
+ lookpath="$lookpath /usr/local/man/u_man/man1 /usr/local/man/l_man/man1"
+ lookpath="$lookpath /usr/man/man.L"
+ mansrc=`./loc . $prefixexp/man/man1 $lookpath`
+ if $test -d "$mansrc"; then
+ dflt="$mansrc"
+ else
+ dflt="$sysman"
+ fi
+ set dflt
+ eval $prefixup
+ ;;
+' ') dflt=none;;
+*) dflt="$mansrc"
+ ;;
+esac
+echo " "
+fn=dn~
+rp='Where do the manual pages (source) go?'
+. ./getfile
+if test "X$mansrcexp" != "X$ansexp"; then
+ installmansrc=''
+fi
+mansrc="$ans"
+mansrcexp="$ansexp"
+case "$mansrc" in
+'') mansrc=' '
+ installmansrc='';;
+esac
+if $afs && $test "$mansrc"; then
+ $cat <<EOM
+
+Since you are running AFS, I need to distinguish the directory in which
+manual pages reside from the directory in which they are installed (and from
+which they are presumably copied to the former directory by occult means).
+
+EOM
+ case "$installmansrc" in
+ '') dflt=`echo $mansrcexp | sed 's#^/afs/#/afs/.#'`;;
+ *) dflt="$installmansrc";;
+ esac
+ fn=de~
+ rp='Where will man pages be installed?'
+ . ./getfile
+ installmansrc="$ans"
+else
+ installmansrc="$mansrcexp"
+fi
+
+case "$mansrc" in
+' ') manext='0';;
+*l) manext=l;;
+*n) manext=n;;
+*o) manext=l;;
+*p) manext=n;;
+*C) manext=C;;
+*L) manext=L;;
+*L1) manext=L1;;
+*) manext=1;;
+esac
+
diff --git a/mcon/U/mboxchar.U b/mcon/U/mboxchar.U
new file mode 100644
index 0000000..c837b1b
--- /dev/null
+++ b/mcon/U/mboxchar.U
@@ -0,0 +1,70 @@
+?RCS: $Id$
+?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: mboxchar.U,v $
+?RCS: Revision 3.0.1.2 1995/07/25 14:13:12 ram
+?RCS: patch56: ensure ctrl-A characters are visible in prompt (WED)
+?RCS:
+?RCS: Revision 3.0.1.1 1994/05/06 15:11:22 ram
+?RCS: patch23: added support for MMDF mailboxes (WED)
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:09:15 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:mboxchar: cat package shsharp Myread Oldconfig
+?MAKE: -pick add $@ %<
+?S:mboxchar:
+?S: This variable contains the eventual value of the MBOXCHAR symbol,
+?S: which is how a C program can identify a file as a mailbox.
+?S:.
+?C:MBOXCHAR:
+?C: This symbol contains a character which will match the beginning
+?C: of a mailbox file.
+?C:.
+?H:#define MBOXCHAR '$mboxchar' /**/
+?H:.
+?T:CTRLA
+?INIT:CTRLA=`echo a | tr a '\001'`
+: determine how to determine when a file is a mailbox
+case "$mboxchar" in
+'') dflt=F;;
+?X: The following ^A is two-chars to ensure it will print out -- WED
+"$CTRLA") dflt='^A';;
+*) dflt="$mboxchar";;
+esac
+$cat <<EOM
+
+In saving articles, $package wants to differentiate between saving to
+mailbox format files and normal files. It does this by examining the
+first character of the file in question. On most systems the first line
+starts with "From ...", so the first character is an F. Other systems
+use magic cookies like control codes between articles, so one of those
+would be first. For example, MMDF messages are separated with lines of
+four control-A's (you may specify one as ^A, i.e. caret A).
+
+EOM
+rp="What's the first character of a mailbox file?"
+. ./myread
+mboxchar="$ans"
+case "$mboxchar" in
+'F') ;;
+"$CTRLA") ;;
+'^A'|'^a') mboxchar="$CTRLA";;
+*) cat <<'EOM'
+
+You will need to edit the shell script mbox.saver to properly append an
+article to a mailbox. The arguments to the script are documented in
+EOM
+ case "$shsharp" in
+ false) echo "comments in mbox.saver.std.";;
+ true) echo "comments in the shell script itself.";;
+ esac
+esac
+
diff --git a/mcon/U/mkdep.U b/mcon/U/mkdep.U
new file mode 100644
index 0000000..1bfd974
--- /dev/null
+++ b/mcon/U/mkdep.U
@@ -0,0 +1,271 @@
+?RCS: $Id$
+?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: mkdep.U,v $
+?RCS: Revision 3.0.1.4 1997/02/28 16:13:07 ram
+?RCS: patch61: replaced .o with $_o all over the place
+?RCS:
+?RCS: Revision 3.0.1.3 1994/10/29 16:25:02 ram
+?RCS: patch36: added ?F: line for metalint file checking
+?RCS:
+?RCS: Revision 3.0.1.2 1994/01/24 14:15:12 ram
+?RCS: patch16: cppflags is now an optional dependency
+?RCS:
+?RCS: Revision 3.0.1.1 1993/12/15 08:22:39 ram
+?RCS: patch15: force zero exit status in all mkdep scripts
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:09:16 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: This unit generates the script 'mkdep' in the top-level directory.
+?X: It is up to the makefile to use it for automatic dependencies
+?X: generation (usage: 'mkdep [cppflags] -- *.c').
+?X:
+?MAKE:mkdep: spitshell startsh cpp +cppflags grep contains rm sed sort uniq \
+ Getfile Oldconfig eunicefix cat +cc cppminus test pkgsrc _o
+?MAKE: -pick add $@ %<
+?S:mkdep:
+?S: This variable holds the name of a command to generate makefile
+?S: dependencies on the standard output. It is the pathname of the
+?S: generated mkdep script.
+?S:.
+?F:mkdep
+?T:IFS arg flags takeflags srcfile toplev filebase inc dir files file dep c
+?T:tmpdir
+?LINT:extern TMPDIR
+: find out how to generate dependencies
+echo " "
+echo "Checking how to generate makefile dependencies on your machine..." >&4
+?X: We are in the UU directory
+toplev=`cd ..;pwd`
+$cat >dep.c <<'EOCP'
+#include "dep.h"
+EOCP
+?X: Empty dep.h causes RIOS to barf
+$cat >dep.h <<'EOCP'
+
+EOCP
+takeflags='flags=""
+case "$@" in
+*--*)
+ for arg
+ do
+ shift
+ case "$arg" in
+ --) break;;
+ *) flags="$flags $arg";;
+ esac
+ done;;
+esac'
+case "$mkdep" in
+'')
+ ;;
+*)
+ if test -f "$mkdep" &&
+ $mkdep dep.c >dep.out 2>/dev/null &&
+ $contains "dep$_o:.*dep\.h" dep.out >/dev/null 2>&1
+ then
+ echo "$mkdep works."
+?X: If they copied a config.sh from some other place, they'll have a working
+?X: mkdep script probably, but not located at the top of the sources. And
+?X: the Makefiles generated by jmake expect an mkdep script in the top dir.
+ case "$mkdep" in
+ "$pkgsrc/mkdep");;
+ *) echo "(copying it to $pkgsrc)"
+ cp $mkdep $pkgsrc/mkdep 2>/dev/null
+ if $pkgsrc/mkdep dep.c >dep.out 2>/dev/null &&
+ $contains "dep$_o:.*dep\.h" dep.out >/dev/null 2>&1; then
+ mkdep=$pkgsrc/mkdep
+ else
+ echo "Hmm... The copy failed or something... Guessing again..."
+ mkdep=
+ fi
+ ;;
+ esac
+ else
+ mkdep=
+ fi
+esac
+
+case "$mkdep" in
+'')
+?X: have to figure something out: Try cpp
+?X: have to pass source names one by one to cpp...
+ $spitshell > ../mkdep <<EOM
+$startsh
+$takeflags
+for srcfile
+do
+ $cpp -M $cppflags \$flags \$srcfile 2>/dev/null
+done
+exit 0
+EOM
+ mkdep=$toplev/mkdep
+ chmod +x $mkdep
+ $eunicefix $mkdep
+ if $mkdep dep.c >dep.out 2>/dev/null &&
+ $contains "dep$_o:.*dep\.h" dep.out >/dev/null 2>&1
+ then
+ echo "Looks like we can use $cpp -M."
+ else
+ mkdep=
+ fi
+ ;;
+esac
+
+case "$mkdep" in
+'')
+?X: have to figure something out: on NeXT, use cc -MM
+?X: have to pass source names one by one to cc...
+ $spitshell > ../mkdep <<EOM
+$startsh
+$takeflags
+for srcfile
+do
+ $cc -MM $cppflags \$flags \$srcfile 2>/dev/null
+done
+exit 0
+EOM
+ mkdep=$toplev/mkdep
+ chmod +x $mkdep
+ $eunicefix $mkdep
+ if $mkdep dep.c >dep.out 2>/dev/null &&
+ $contains "dep$_o:.*dep\.h" dep.out >/dev/null 2>&1
+ then
+ echo "Looks like we can use $cc -MM."
+ else
+ mkdep=
+ fi
+ ;;
+esac
+
+case "$mkdep" in
+'')
+?X: still no luck -- try something fancier.
+ $spitshell >../mkdep <<EOS
+$startsh
+$takeflags
+for srcfile
+do
+ case "\$srcfile" in
+ *.c) c='.c';;
+ *.y) c='.y';;
+ *.l) c='.l';;
+ esac
+ filebase=\`basename \$srcfile \$c\`
+ <\$srcfile $cpp $cppminus $cppflags \$flags 2>/dev/null | \\
+ $sed -e '/^# *[0-9]/!d' \\
+ -e 's/^.*"\(.*\)".*\$/'\$filebase'$_o: \1/' \\
+ -e 's|: \./|: |' \\
+ -e 's|: *$|: '\$srcfile'|' | \\
+ $grep -v '^#' | $sort | $uniq
+done
+exit 0
+EOS
+ mkdep=$toplev/mkdep
+ chmod +x $mkdep
+ $eunicefix $mkdep
+ if $mkdep dep.c >dep.out 2>/dev/null &&
+ $contains "dep$_o:.*dep\.h" dep.out >/dev/null 2>&1
+ then
+ echo "A shell script using $cpp does the trick."
+ else
+ echo "$cpp doesn't seem to be any use at all."
+ $spitshell >../mkdep <<EOS
+$startsh
+$takeflags
+files="\$@"
+set X \$flags
+shift
+inc='.'
+while test \$# -gt 0
+do
+ case "\$1" in
+ -I)
+ shift
+ inc="\$inc:\$1"
+ ;;
+ -I*)
+ dir=\`echo \$1 | sed -e 's/^-I//'\`
+ inc="\$inc:\$dir"
+ ;;
+ esac
+ shift
+done
+set X \$files
+shift
+tmpdir="${TMPDIR:-/tmp}"
+trap "$rm -f "$tmpdir/mkdep\$\$"; exit 1" 1 2 3 15
+for srcfile
+do
+ case "\$srcfile" in
+ *.c) c='.c';;
+ *.y) c='.y';;
+ *.l) c='.l';;
+ esac
+ filebase=\`basename \$srcfile \$c\`
+ echo \$filebase$_o: \$srcfile
+ $grep '^#[ ]*include' \$srcfile /dev/null | \
+ $sed -n -e 's/#[ ]*include[ ]*//' \\
+ -e '/<\(.*\)>/ d' \\
+ -e 's/:[^"]*"\([^"]*\)".*/: \1/' \\
+ -e "s/\\.c:/$_o:/p" > "$tmpdir/mkdep\$\$"
+?X: Deal with directories specified via -I requests to locate files
+ IFS=': '
+ while read file dep; do
+ for dir in \$inc; do
+ if $test -f "\$dir/\$dep"; then
+ dep="\$dir/\$dep"
+ break
+ fi
+ done
+ echo "\$file: \$dep" | $sed -e 's,: \./,: ,'
+ done <"$tmpdir/mkdep\$\$"
+ IFS=' '
+ $rm -f "$tmpdir/mkdep\$\$"
+done
+exit 0
+EOS
+ mkdep=$toplev/mkdep
+ chmod +x $mkdep
+ $eunicefix $mkdep
+ if $mkdep dep.c >dep.out 2>/dev/null &&
+ $contains "dep$_o:.*dep\.h" dep.out >/dev/null 2>&1
+ then
+ cat << EOM
+
+I can use a script with grep instead, but it will make some incorrect
+dependencies, since it doesn't understand about conditional compilation.
+Moreover, some dependencies may be missing, because scanning won't be
+a recursive process.
+If you have a program which generates makefile dependencies, you may want
+to use it. If not, you can use the script and edit the Makefile by hand
+if you need to.
+EOM
+ else
+ mkdep=
+ cat << EOM
+
+I can't seem to generate makefile dependencies at all! Perhaps you have a
+program that does? If you don't, you might look at the mkdep script to
+see if you can create one which works.
+EOM
+ fi
+ fi
+esac
+echo " "
+dflt="$mkdep"
+fn=f~/
+rp="Name of program to make makefile dependencies?"
+. ./getfile
+mkdep="$ans"
+$rm -f dep.c dep.h dep$_o dep.out
+
diff --git a/mcon/U/models.U b/mcon/U/models.U
new file mode 100644
index 0000000..77f955d
--- /dev/null
+++ b/mcon/U/models.U
@@ -0,0 +1,214 @@
+?RCS: $Id$
+?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: models.U,v $
+?RCS: Revision 3.0.1.2 1997/02/28 16:13:17 ram
+?RCS: patch61: added ?F: metalint hint
+?RCS:
+?RCS: Revision 3.0.1.1 1993/08/25 14:02:39 ram
+?RCS: patch6: added default for large
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:09:17 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:models split small medium large huge: test cat Myread sysman Oldconfig \
+ Loc Warn contains rm
+?MAKE: -pick add $@ %<
+?S:models:
+?S: This variable contains the list of memory models supported by this
+?S: system. Possible component values are none, split, unsplit, small,
+?S: medium, large, and huge. The component values are space separated.
+?S:.
+?S:split:
+?S: This variable contains a flag which will tell the C compiler and loader
+?S: to produce a program that will run in separate I and D space, for those
+?S: machines that support separation of instruction and data space. It is
+?S: up to the Makefile to use this.
+?S:.
+?S:small:
+?S: This variable contains a flag which will tell the C compiler and loader
+?S: to produce a program running with a small memory model. It is up to
+?S: the Makefile to use this.
+?S:.
+?S:medium:
+?S: This variable contains a flag which will tell the C compiler and loader
+?S: to produce a program running with a medium memory model. If the
+?S: medium model is not supported, contains the flag to produce large
+?S: model programs. It is up to the Makefile to use this.
+?S:.
+?S:large:
+?S: This variable contains a flag which will tell the C compiler and loader
+?S: to produce a program running with a large memory model. It is up to
+?S: the Makefile to use this.
+?S:.
+?S:huge:
+?S: This variable contains a flag which will tell the C compiler and loader
+?S: to produce a program running with a huge memory model. If the
+?S: huge model is not supported, contains the flag to produce large
+?S: model programs. It is up to the Makefile to use this.
+?S:.
+?T:unsplit tans modelcc
+?F:!pdp11
+?D:large=''
+?LINT:extern cc
+: see what memory models we can support
+case "$models" in
+'')
+?X: We may not use Cppsym or we get a circular dependency through cc.
+?X: But this should work regardless of which cc we eventually use.
+ $cat >pdp11.c <<'EOP'
+int main(void) {
+#ifdef pdp11
+ return 0;
+#else
+ return 1;
+#endif
+}
+EOP
+?X: Run cc in a subshell in case they don't have a 'cc' command.
+?X: Presumably they do have gcc or something.
+ case "$cc" in
+ '') modelcc="$cc" ;;
+ *) modelcc="cc" ;;
+ esac
+ ( $modelcc -o pdp11 pdp11.c ) >/dev/null 2>&1
+ if $test -f pdp11 && ./pdp11 2>/dev/null; then
+ dflt='unsplit split'
+ else
+ tans=`./loc . X /lib/small /lib/large /usr/lib/small /usr/lib/large /lib/medium /usr/lib/medium /lib/huge`
+ case "$tans" in
+ X) dflt='none';;
+ *) if $test -d /lib/small || $test -d /usr/lib/small; then
+ dflt='small'
+ else
+ dflt=''
+ fi
+ if $test -d /lib/medium || $test -d /usr/lib/medium; then
+ dflt="$dflt medium"
+ fi
+ if $test -d /lib/large || $test -d /usr/lib/large; then
+ dflt="$dflt large"
+ fi
+ if $test -d /lib/huge || $test -d /usr/lib/huge; then
+ dflt="$dflt huge"
+ fi
+ esac
+ fi;;
+*) dflt="$models";;
+esac
+$cat <<EOM
+
+Some systems have different model sizes. On most systems they are called
+small, medium, large, and huge. On the PDP11 they are called unsplit and
+split. If your system doesn't support different memory models, say "none".
+If you wish to force everything to one memory model, say "none" here and
+put the appropriate flags later when it asks you for other cc and ld flags.
+Venix systems may wish to put "none" and let the compiler figure things out.
+(In the following question multiple model names should be space separated.)
+
+The default for most systems is "none".
+
+EOM
+rp="Which memory models are supported?"
+. ./myread
+models="$ans"
+
+case "$models" in
+none)
+ small=''
+ medium=''
+ large=''
+ huge=''
+ unsplit=''
+ split=''
+ ;;
+*split)
+ case "$split" in
+ '') if $contains '\-i' $sysman/ld.1 >/dev/null 2>&1 || \
+ $contains '\-i' $sysman/cc.1 >/dev/null 2>&1; then
+ dflt='-i'
+ else
+ dflt='none'
+ fi;;
+ *) dflt="$split";;
+ esac
+ rp="What flag indicates separate I and D space?"
+ . ./myread
+ tans="$ans"
+ case "$tans" in
+ none) tans='';;
+ esac
+ split="$tans"
+ unsplit='';;
+*large*|*small*|*medium*|*huge*)
+ case "$models" in
+ *large*)
+ case "$large" in
+ '') dflt='-Ml';;
+ *) dflt="$large";;
+ esac
+ rp="What flag indicates large model?"
+ . ./myread
+ tans="$ans"
+ case "$tans" in
+ none) tans='';
+ esac
+ large="$tans";;
+ *) large='';;
+ esac
+ case "$models" in
+ *huge*) case "$huge" in
+ '') dflt='-Mh';;
+ *) dflt="$huge";;
+ esac
+ rp="What flag indicates huge model?"
+ . ./myread
+ tans="$ans"
+ case "$tans" in
+ none) tans='';
+ esac
+ huge="$tans";;
+ *) huge="$large";;
+ esac
+ case "$models" in
+ *medium*) case "$medium" in
+ '') dflt='-Mm';;
+ *) dflt="$medium";;
+ esac
+ rp="What flag indicates medium model?"
+ . ./myread
+ tans="$ans"
+ case "$tans" in
+ none) tans='';
+ esac
+ medium="$tans";;
+ *) medium="$large";;
+ esac
+ case "$models" in
+ *small*) case "$small" in
+ '') dflt='none';;
+ *) dflt="$small";;
+ esac
+ rp="What flag indicates small model?"
+ . ./myread
+ tans="$ans"
+ case "$tans" in
+ none) tans='';
+ esac
+ small="$tans";;
+ *) small='';;
+ esac
+ ;;
+*)
+ ./warn "Unrecognized memory models--you may have to edit Makefile.SH" 4>&4
+ ;;
+esac
+$rm -f pdp11.* pdp11
+
diff --git a/mcon/U/modetype.U b/mcon/U/modetype.U
new file mode 100644
index 0000000..f048978
--- /dev/null
+++ b/mcon/U/modetype.U
@@ -0,0 +1,40 @@
+?RCS: $Id$
+?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: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
+?RCS:
+?RCS: $Log: modetype.U,v $
+?RCS: Revision 3.0.1.1 1994/10/29 16:25:07 ram
+?RCS: patch36: created by ADO
+?RCS:
+?MAKE:modetype: Myread Typedef
+?MAKE: -pick add $@ %<
+?S:modetype:
+?S: This variable defines modetype to be something like mode_t,
+?S: int, unsigned short, or whatever type is used to declare file
+?S: modes for system calls.
+?S:.
+?C:Mode_t:
+?C: This symbol holds the type used to declare file modes
+?C: for systems calls. It is usually mode_t, but may be
+?C: int or unsigned short. It may be necessary to include <sys/types.h>
+?C: to get any typedef'ed information.
+?C:.
+?H:#define Mode_t $modetype /* file mode parameter for system calls */
+?H:.
+: see what type is used for mode_t
+set mode_t modetype int stdio.h sys/types.h
+eval $typedef
+dflt="$modetype"
+echo " "
+rp="What type is used for file modes?"
+. ./myread
+modetype="$ans"
+
diff --git a/mcon/U/msgmerge_update.U b/mcon/U/msgmerge_update.U
new file mode 100644
index 0000000..9d7c293
--- /dev/null
+++ b/mcon/U/msgmerge_update.U
@@ -0,0 +1,29 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:msgmerge_update: msgmerge grep contains rm
+?MAKE: -pick add $@ %<
+?S:msgmerge_update:
+?S: The command "msgmerge --update" if supported on your system, else ":".
+?S:.
+?F:!msghelp
+: check whether msgmerge supports --update
+echo " "
+echo "Let's see whether your $msgmerge supports the --update flag..." >&4
+$msgmerge --help | $grep -- --update >msghelp
+if $contains update msghelp >/dev/null 2>&1; then
+ echo "Good, it does."
+ msgmerge_update="$msgmerge --update"
+else
+ echo "Sorry, it does not: we'll try to do without it."
+ msgmerge_update=":"
+fi
+$rm -f msghelp
+
diff --git a/mcon/U/myhostname.U b/mcon/U/myhostname.U
new file mode 100644
index 0000000..abbf351
--- /dev/null
+++ b/mcon/U/myhostname.U
@@ -0,0 +1,284 @@
+?RCS: $Id$
+?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: myhostname.U,v $
+?RCS: Revision 3.0.1.3 1997/02/28 16:15:55 ram
+?RCS: patch61: improved hostname lookup by using ypmatch when NIS is used
+?RCS:
+?RCS: Revision 3.0.1.2 1994/10/29 16:25:43 ram
+?RCS: patch36: call ./xenix explicitly instead of relying on PATH
+?RCS: patch36: now uses new Tr unit to convert to/from lowercase
+?RCS:
+?RCS: Revision 3.0.1.1 1994/06/20 07:06:20 ram
+?RCS: patch30: now a little more clever for domain name guessing
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:09:18 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:myhostname phostname mydomain: contains sed test Myread Oldconfig \
+ Guess Loc awk echo sort uniq +usrinc rm hostcat Tr osname
+?MAKE: -pick add $@ %<
+?S:myhostname (hostname):
+?S: This variable contains the eventual value of the MYHOSTNAME symbol,
+?S: which is the name of the host the program is going to run on.
+?S: The domain is not kept with hostname, but must be gotten from mydomain.
+?S: The dot comes with mydomain, and need not be supplied by the program.
+?S:.
+?S:mydomain:
+?S: This variable contains the eventual value of the MYDOMAIN symbol,
+?S: which is the domain of the host the program is going to run on.
+?S: The domain must be appended to myhostname to form a complete host name.
+?S: The dot comes with mydomain, and need not be supplied by the program.
+?S:.
+?S:phostname:
+?S: This variable contains the eventual value of the PHOSTNAME symbol,
+?S: which is a command that can be fed to popen() to get the host name.
+?S: The program should probably not presume that the domain is or isn't
+?S: there already.
+?S:.
+?C:MYHOSTNAME (HOSTNAME):
+?C: This symbol contains name of the host the program is going to run on.
+?C: The domain is not kept with hostname, but must be gotten from MYDOMAIN.
+?C: The dot comes with MYDOMAIN, and need not be supplied by the program.
+?C: If gethostname() or uname() exist, MYHOSTNAME may be ignored. If MYDOMAIN
+?C: is not used, MYHOSTNAME will hold the name derived from PHOSTNAME.
+?C:.
+?C:MYDOMAIN:
+?C: This symbol contains the domain of the host the program is going to
+?C: run on. The domain must be appended to HOSTNAME to form a complete
+?C: host name. The dot comes with MYDOMAIN, and need not be supplied by
+?C: the program. If the host name is derived from PHOSTNAME, the domain
+?C: may or may not already be there, and the program should check.
+?C:.
+?H:#define MYHOSTNAME "$myhostname" /**/
+?H:#define MYDOMAIN "$mydomain" /**/
+?H:.
+?T:cont i tans tmp_re file
+: now get the host name
+echo " "
+echo "Figuring out host name..." >&4
+case "$myhostname" in
+'') cont=true
+ echo 'Maybe "hostname" will work...'
+ if tans=`sh -c hostname 2>&1` ; then
+ myhostname=$tans
+ phostname=hostname
+ cont=''
+ fi
+ ;;
+*) cont='';;
+esac
+if $test "$cont"; then
+ if ./xenix; then
+ echo 'Oh, dear. Maybe "/etc/systemid" is the key...'
+ if tans=`cat /etc/systemid 2>&1` ; then
+ myhostname=$tans
+ phostname='cat /etc/systemid'
+ echo "Whadyaknow. Xenix always was a bit strange..."
+ cont=''
+ fi
+ elif $test -r /etc/systemid; then
+ echo "(What is a non-Xenix system doing with /etc/systemid?)"
+ fi
+fi
+if $test "$cont"; then
+ echo 'No, maybe "uuname -l" will work...'
+ if tans=`sh -c 'uuname -l' 2>&1` ; then
+ myhostname=$tans
+ phostname='uuname -l'
+ else
+ echo 'Strange. Maybe "uname -n" will work...'
+ if tans=`sh -c 'uname -n' 2>&1` ; then
+ myhostname=$tans
+ phostname='uname -n'
+ else
+ echo 'Oh well, maybe I can mine it out of whoami.h...'
+ if tans=`sh -c $contains' sysname $usrinc/whoami.h' 2>&1` ; then
+ myhostname=`echo "$tans" | $sed 's/^.*"\(.*\)"/\1/'`
+ phostname="sed -n -e '"'/sysname/s/^.*\"\\(.*\\)\"/\1/{'"' -e p -e q -e '}' <$usrinc/whoami.h"
+ else
+ case "$myhostname" in
+ '') echo "Does this machine have an identity crisis or something?"
+ phostname='';;
+ *)
+ echo "Well, you said $myhostname before..."
+ phostname='echo $myhostname';;
+ esac
+ fi
+ fi
+ fi
+fi
+case "$myhostname" in
+'') myhostname=noname ;;
+esac
+: you do not want to know about this
+set $myhostname
+myhostname=$1
+
+: verify guess
+if $test "$myhostname" ; then
+ dflt=y
+ rp='Your host name appears to be "'$myhostname'".'" Right?"
+ . ./myread
+ case "$ans" in
+ y*) ;;
+ *) myhostname='';;
+ esac
+fi
+
+: bad guess or no guess
+while $test "X$myhostname" = X ; do
+ dflt=''
+ rp="Please type the (one word) name of your host:"
+ . ./myread
+ myhostname="$ans"
+done
+
+: translate upper to lower if necessary
+case "$myhostname" in
+*[A-Z]*)
+ echo "(Normalizing case in your host name)"
+ myhostname=`echo $myhostname | ./tr '[A-Z]' '[a-z]'`
+ ;;
+esac
+
+?X: Do not ask for domain name if this is not used later on. In that
+?X: case, the hostname may keep its domain name, but it doesn't matter.
+@if MYDOMAIN || mydomain
+case "$myhostname" in
+*.*)
+ dflt=`expr "X$myhostname" : "X[^.]*\(\..*\)"`
+ myhostname=`expr "X$myhostname" : "X\([^.]*\)\."`
+ echo "(Trimming domain name from host name--host name is now $myhostname)"
+ ;;
+*) case "$mydomain" in
+ '')
+?X:
+?X: There is currently no way to say we do not want hostcat if mydomain is not
+?X: used. One way to achieve that would be to put that code in a mydomain.U
+?X: unit. However, we want to stick the sanity checks right after the domain
+?X: name computation, or if none is done, right after the hostname computation.
+?X:
+ {
+?X: If we use NIS, try ypmatch.
+ test "X$hostcat" = "Xypcat hosts" &&
+ ypmatch "$myhostname" hosts 2>/dev/null |\
+ $sed -e 's/[ ]*#.*//; s/$/ /' > hosts && \
+ $test -s hosts
+ } || {
+?X: Extract only the relevant hosts, reducing file size,
+?X: remove comments, insert trailing space for later use.
+ $hostcat | $sed -n -e "s/[ ]*#.*//; s/\$/ /
+ /[ ]$myhostname[ . ]/p" > hosts
+ }
+ tmp_re="[ . ]"
+ $test x`$awk "/[0-9].*[ ]$myhostname$tmp_re/ { sum++ }
+ END { print sum }" hosts` = x1 || tmp_re="[ ]"
+ dflt=.`$awk \
+ "/[0-9].*[ ]$myhostname$tmp_re/ {for(i=2; i<=NF;i++) print \\\$i}" \
+ hosts | $sort | $uniq | \
+ $sed -n -e "s/$myhostname\.\([-a-zA-Z0-9_.]\)/\1/p"`
+ case `$echo X$dflt` in
+ X*\ *) echo "(Several hosts in /etc/hosts matched hostname)"
+ dflt=.
+ ;;
+?X: There is no /etc/hosts on os390
+ X.)
+ if $test -f /etc/hosts; then
+ echo "(You do not have fully-qualified names in /etc/hosts)"
+ else
+ echo "(I cannot locate a hosts database anywhere)"
+ fi
+ ;;
+ esac
+ case "$dflt" in
+ .)
+ tans=`./loc resolv.conf X /etc /usr/etc`
+ if $test -f "$tans"; then
+ echo "(Attempting domain name extraction from $tans)"
+?X: Look for either a search or a domain directive.
+ dflt=.`$sed -n -e 's/ / /g' \
+ -e 's/^search *\([^ ]*\).*/\1/p' $tans \
+ | ./tr '[A-Z]' '[a-z]' 2>/dev/null`
+ case "$dflt" in
+ .) dflt=.`$sed -n -e 's/ / /g' \
+ -e 's/^domain *\([^ ]*\).*/\1/p' $tans \
+ | ./tr '[A-Z]' '[a-z]' 2>/dev/null`
+ ;;
+ esac
+ fi
+ ;;
+ esac
+ case "$dflt" in
+ .) echo "(No help from resolv.conf either -- attempting clever guess)"
+ dflt=.`sh -c domainname 2>/dev/null`
+ case "$dflt" in
+ '') dflt='.';;
+ .nis.*|.yp.*|.main.*) dflt=`echo $dflt | $sed -e 's/^\.[^.]*//'`;;
+ esac
+ ;;
+ esac
+ case "$dflt$osname" in
+ .os390)
+ file="//'SYS1.TCPPARMS(TCPDATA)'"
+ echo "(Attempting domain name extraction from $file)"
+ dflt=.`awk '/^DOMAINORIGIN/ {print $2}' "$file" 2>/dev/null`
+ ;;
+ esac
+ case "$dflt" in
+ .) echo "(Lost all hope -- silly guess then)"
+ dflt='.nonet'
+ ;;
+ esac
+ $rm -f hosts
+ ;;
+ *) dflt="$mydomain";;
+ esac;;
+esac
+echo " "
+rp="What is your domain name?"
+. ./myread
+tans="$ans"
+case "$ans" in
+'') ;;
+.*) ;;
+*) tans=".$tans";;
+esac
+mydomain="$tans"
+
+: translate upper to lower if necessary
+case "$mydomain" in
+*[A-Z]*)
+ echo "(Normalizing case in your domain name)"
+ mydomain=`echo $mydomain | ./tr '[A-Z]' '[a-z]'`
+ ;;
+esac
+
+@end
+: a little sanity check here
+case "$phostname" in
+'') ;;
+*)
+ case `$phostname | ./tr '[A-Z]' '[a-z]'` in
+ $myhostname$mydomain|$myhostname) ;;
+ *)
+ case "$phostname" in
+ sed*)
+ echo "(That doesn't agree with your whoami.h file, by the way.)"
+ ;;
+ *)
+ echo "(That doesn't agree with your $phostname command, by the way.)"
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+esac
+
diff --git a/mcon/U/n.U b/mcon/U/n.U
new file mode 100644
index 0000000..373a9dc
--- /dev/null
+++ b/mcon/U/n.U
@@ -0,0 +1,45 @@
+?RCS: $Id$
+?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: n.U,v $
+?RCS: Revision 3.0 1993/08/18 12:09:19 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:n c: contains
+?MAKE: -pick add $@ %<
+?S:n:
+?S: This variable contains the -n flag if that is what causes the echo
+?S: command to suppress newline. Otherwise it is null. Correct usage is
+?S: $echo $n "prompt for a question: $c".
+?S:.
+?S:c:
+?S: This variable contains the \c string if that is what causes the echo
+?S: command to suppress newline. Otherwise it is null. Correct usage is
+?S: $echo $n "prompt for a question: $c".
+?S:.
+: first determine how to suppress newline on echo command
+echo " "
+echo "Checking echo to see how to suppress newlines..."
+(echo "hi there\c" ; echo " ") >.echotmp
+if $contains c .echotmp >/dev/null 2>&1 ; then
+ echo "...using -n."
+ n='-n'
+ c=''
+else
+ cat <<'EOM'
+...using \c
+EOM
+ n=''
+ c='\c'
+fi
+echo $n "The star should be here-->$c"
+echo '*'
+rm -f .echotmp
+
diff --git a/mcon/U/nametype.U b/mcon/U/nametype.U
new file mode 100644
index 0000000..1a82ffb
--- /dev/null
+++ b/mcon/U/nametype.U
@@ -0,0 +1,134 @@
+?RCS: $Id$
+?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: nametype.U,v $
+?RCS: Revision 3.0.1.3 1994/10/29 16:26:09 ram
+?RCS: patch36: call ./usg and ./bsd explicitly instead of relying on PATH
+?RCS:
+?RCS: Revision 3.0.1.2 1994/08/29 16:36:48 ram
+?RCS: patch32: fixed typo: /etc/password -> /etc/passwd (WED)
+?RCS:
+?RCS: Revision 3.0.1.1 1993/09/13 16:10:09 ram
+?RCS: patch10: made questions more explicit for 'Configure -s' prompting (WAD)
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:09:20 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:nametype d_passnames d_berknames d_usgnames: Myread Guess Oldconfig cat
+?MAKE: -pick add $@ %<
+?S:nametype:
+?S: This variable indicates how full names are stored on this system.
+?S: Values are bsd, usg, and other.
+?S:.
+?S:d_passnames:
+?S: This variable conditionally defines the PASSNAMES symbol,
+?S: which indicates to the C program that full names are stored in
+?S: the /etc/passwd file.
+?S:.
+?S:d_berknames:
+?S: This variable conditionally defines the PASSNAMES symbol,
+?S: which indicates to the C program that full names are stored in
+?S: the /etc/passwd file in Berkeley format.
+?S:.
+?S:d_usgnames:
+?S: This variable conditionally defines the PASSNAMES symbol,
+?S: which indicates to the C program that full names are stored in
+?S: the /etc/passwd file in USG format.
+?S:.
+?C:PASSNAMES:
+?C: This symbol, if defined, indicates that full names are stored in
+?C: the /etc/passwd file.
+?C:.
+?C:BERKNAMES:
+?C: This symbol, if defined, indicates that full names are stored in
+?C: the /etc/passwd file in Berkeley format (name first thing, everything
+?C: up to first comma, with & replaced by capitalized login id, yuck).
+?C:.
+?C:USGNAMES:
+?C: This symbol, if defined, indicates that full names are stored in
+?C: the /etc/passwd file in USG format (everything after - and before ( is
+?C: the name).
+?C:.
+?H:#$d_passnames PASSNAMES /* (undef to take name from ~/.fullname) */
+?H:#$d_berknames BERKNAMES /* (that is, ":name,stuff:") */
+?H:#$d_usgnames USGNAMES /* (that is, ":stuff-name(stuff):") */
+?H:.
+: find out how to find out full name
+case "$d_berknames" in
+"$define")
+ dflt=y;;
+"$undef")
+ dflt=n;;
+*)
+ if ./bsd; then
+ dflt=y
+ elif ./xenix; then
+ dflt=y
+ else
+ dflt=n
+ fi
+ ;;
+esac
+$cat <<'EOM'
+
+Does your /etc/passwd file keep full names in Berkeley/V7 format (name first
+thing after ':' in GCOS field)? In that case, a typical entry in the password
+file looks like this:
+
+ guest:**paswword**:10:100:Mister Guest User:/usr/users:/bin/sh
+ ^^^^^^^^^^^^^^^^^
+EOM
+rp="Berkeley/V7 format for full name in /etc/passwd?"
+. ./myread
+case "$ans" in
+y*) d_passnames="$define"
+ d_berknames="$define"
+ d_usgnames="$undef"
+ nametype=bsd
+ ;;
+*)
+ case "$d_usgnames" in
+ "$define") dflt=y;;
+ "$undef") dflt=n;;
+ *)
+ if ./usg; then
+ dflt=y
+ else
+ dflt=n
+ fi
+ ;;
+ esac
+$cat <<'EOM'
+
+Does your passwd file keep full names in USG format (name sandwiched between a
+'-' and a '(')? In that case, a typical entry in the password file looks like
+this:
+
+ guest:**paswword**:10:100:000-Mister Guest User(000):/usr/users:/bin/sh
+ ^^^^^^^^^^^^^^^^^
+EOM
+ rp="USG format for full name in /etc/passwd?"
+ . ./myread
+ case "$ans" in
+ n*) echo "Full name will be taken from ~/.fullname"
+ d_passnames="$undef"
+ d_berknames="$undef"
+ d_usgnames="$undef"
+ nametype=other
+ ;;
+ *)
+ d_passnames="$define"
+ d_berknames="$undef"
+ d_usgnames="$define"
+ nametype=usg
+ ;;
+ esac;;
+esac
+
diff --git a/mcon/U/nblock_io.U b/mcon/U/nblock_io.U
new file mode 100644
index 0000000..58dd845
--- /dev/null
+++ b/mcon/U/nblock_io.U
@@ -0,0 +1,261 @@
+?RCS: $Id$
+?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: nblock_io.U,v $
+?RCS: Revision 3.0.1.2 1997/02/28 16:17:14 ram
+?RCS: patch61: simplify here document for shells that can't handle them well
+?RCS: patch61: force use of "startsh" at the head of the generated script
+?RCS: patch61: added new files to the ?F: metalint hint
+?RCS:
+?RCS: Revision 3.0.1.1 1995/07/25 14:13:22 ram
+?RCS: patch56: created
+?RCS:
+?X:
+?X: Simplify here document for shells that can't handle them well.
+?X: (Problem reported on FreeBSD; it's unclear if this helps.) --AD
+?X:
+?MAKE:o_nonblock eagain rd_nodata d_eofnblk: cat rm_try +cc +ccflags +ldflags \
+ d_open3 h_sysfile h_fcntl signal_t hint Oldconfig Setvar startsh Warn
+?MAKE: -pick add $@ %<
+?S:o_nonblock:
+?S: This variable bears the symbol value to be used during open() or fcntl()
+?S: to turn on non-blocking I/O for a file descriptor. If you wish to switch
+?S: between blocking and non-blocking, you may try ioctl(FIOSNBIO) instead,
+?S: but that is only supported by some devices.
+?S:.
+?S:eagain:
+?S: This variable bears the symbolic errno code set by read() when no
+?S: data is present on the file and non-blocking I/O was enabled (otherwise,
+?S: read() blocks naturally).
+?S:.
+?S:rd_nodata:
+?S: This variable holds the return code from read() when no data is
+?S: present. It should be -1, but some systems return 0 when O_NDELAY is
+?S: used, which is a shame because you cannot make the difference between
+?S: no data and an EOF.. Sigh!
+?S:.
+?S:d_eofnblk:
+?S: This variable conditionally defines EOF_NONBLOCK if EOF can be seen
+?S: when reading from a non-blocking I/O source.
+?S:.
+?C:VAL_O_NONBLOCK:
+?C: This symbol is to be used during open() or fcntl(F_SETFL) to turn on
+?C: non-blocking I/O for the file descriptor. Note that there is no way
+?C: back, i.e. you cannot turn it blocking again this way. If you wish to
+?C: alternatively switch between blocking and non-blocking, use the
+?C: ioctl(FIOSNBIO) call instead, but that is not supported by all devices.
+?C:.
+?C:VAL_EAGAIN:
+?C: This symbol holds the errno error code set by read() when no data was
+?C: present on the non-blocking file descriptor.
+?C:
+?C: FIXME: And who guarantees this isn't e.g. device-dependent?
+?C: If EAGAIN is defined one should expect it.
+?C: If EWOULDBLOCK is defined one should expect it.
+?C: If both are defined one should expect both.
+?C: -- cbiere, 2011-01-18
+?C:.
+?C:RD_NODATA:
+?C: This symbol holds the return code from read() when no data is present
+?C: on the non-blocking file descriptor. Be careful! If EOF_NONBLOCK is
+?C: not defined, then you can't distinguish between no data and EOF by
+?C: issuing a read(). You'll have to find another way to tell for sure!
+?C:.
+?C:EOF_NONBLOCK:
+?C: This symbol, if defined, indicates to the C program that a read() on
+?C: a non-blocking file descriptor will return 0 on EOF, and not the value
+?C: held in RD_NODATA (-1 usually, in that case!).
+?C:.
+?H:#define VAL_O_NONBLOCK $o_nonblock
+?H:#define VAL_EAGAIN $eagain
+?H:#define RD_NODATA $rd_nodata
+?H:#$d_eofnblk EOF_NONBLOCK
+?H:.
+?F:!try !try.out !try.ret !try.err !mtry
+?T:status
+?LINT:use d_open3
+: check for non-blocking I/O stuff
+case "$h_sysfile" in
+true) echo "#include <sys/file.h>" > head.c;;
+*)
+ case "$h_fcntl" in
+ true) echo "#include <fcntl.h>" > head.c;;
+ *) echo "#include <sys/fcntl.h>" > head.c;;
+ esac
+ ;;
+esac
+echo " "
+echo "Figuring out the flag used by open() for non-blocking I/O..." >&4
+case "$o_nonblock" in
+'')
+ $cat head.c > try.c
+ $cat >>try.c <<'EOCP'
+#include <stdio.h>
+int main(void) {
+#ifdef O_NONBLOCK
+ printf("O_NONBLOCK\n");
+ return 0;
+#endif
+#ifdef O_NDELAY
+ printf("O_NDELAY\n");
+ return 0;
+#endif
+?X: Stevens "Advanced Programming in the UNIX Environment" page 364 mentions
+?X: the FNDELAY symbol, used in 4.33BSD (source: Paul Marquess).
+#ifdef FNDELAY
+ printf("FNDELAY\n");
+#endif
+ return 0;
+}
+EOCP
+ if $cc $ccflags $ldflags -o try try.c >/dev/null 2>&1; then
+ o_nonblock=`./try`
+ case "$o_nonblock" in
+ '') echo "I can't figure it out, assuming O_NONBLOCK will do.";;
+ *) echo "Seems like we can use $o_nonblock.";;
+ esac
+ else
+ echo "(I can't compile the test program; pray O_NONBLOCK is right!)"
+ fi
+ ;;
+*) echo "Using $hint value $o_nonblock.";;
+esac
+$rm_try
+
+echo " "
+echo "Let's see what value errno gets from read() on a $o_nonblock file..." >&4
+case "$eagain" in
+'')
+ $cat head.c > try.c
+ $cat >>try.c <<EOCP
+#include <errno.h>
+#include <sys/types.h>
+#include <signal.h>
+#include <stdlib.h>
+#define MY_O_NONBLOCK $o_nonblock
+extern int errno;
+$signal_t blech(x) int x; { exit(3); }
+EOCP
+ $cat >> try.c <<'EOCP'
+int main()
+{
+ int pd[2];
+ int pu[2];
+ char buf[1];
+ char string[100];
+
+ pipe(pd); /* Down: child -> parent */
+ pipe(pu); /* Up: parent -> child */
+ if (0 != fork()) {
+ int ret;
+ close(pd[1]); /* Parent reads from pd[0] */
+ close(pu[0]); /* Parent writes (blocking) to pu[1] */
+ if (-1 == fcntl(pd[0], F_SETFL, MY_O_NONBLOCK))
+ exit(1);
+ signal(SIGALRM, blech);
+ alarm(5);
+ if ((ret = read(pd[0], buf, 1)) > 0) /* Nothing to read! */
+ exit(2);
+ sprintf(string, "%d\n", ret);
+ write(2, string, strlen(string));
+ alarm(0);
+#ifdef EAGAIN
+ if (errno == EAGAIN) {
+ printf("EAGAIN\n");
+ goto ok;
+ }
+#endif
+#ifdef EWOULDBLOCK
+ if (errno == EWOULDBLOCK)
+ printf("EWOULDBLOCK\n");
+#endif
+ ok:
+ write(pu[1], buf, 1); /* Unblocks child, tell it to close our pipe */
+ sleep(2); /* Give it time to close our pipe */
+ alarm(5);
+ ret = read(pd[0], buf, 1); /* Should read EOF */
+ alarm(0);
+ sprintf(string, "%d\n", ret);
+ write(3, string, strlen(string));
+ exit(0);
+ }
+
+ close(pd[0]); /* We write to pd[1] */
+ close(pu[1]); /* We read from pu[0] */
+ read(pu[0], buf, 1); /* Wait for parent to signal us we may continue */
+ close(pd[1]); /* Pipe pd is now fully closed! */
+ return 0; /* Bye bye, thank you for playing! */
+}
+EOCP
+ if $cc $ccflags $ldflags -o try try.c >/dev/null 2>&1; then
+?X: Use script to avoid the possible 'alarm call' message
+ echo "$startsh" >mtry
+ echo "./try >try.out 2>try.ret 3>try.err || exit 4" >>mtry
+ chmod +x mtry
+ ./mtry >/dev/null 2>&1
+ case $? in
+ 0) eagain=`$cat try.out`;;
+ 1) echo "Could not perform non-blocking setting!";;
+ 2) echo "I did a successful read() for something that was not there!";;
+ 3) echo "Hmm... non-blocking I/O does not seem to be working!";;
+ *) echo "Something terribly wrong happened during testing.";;
+ esac
+ rd_nodata=`$cat try.ret`
+ echo "A read() system call with no data present returns $rd_nodata."
+ case "$rd_nodata" in
+ 0|-1) ;;
+ *)
+ echo "(That's peculiar, fixing that to be -1.)"
+ rd_nodata=-1
+ ;;
+ esac
+ case "$eagain" in
+ '')
+ echo "Forcing errno EAGAIN on read() with no data available."
+ eagain=EAGAIN
+ ;;
+ *)
+ echo "Your read() sets errno to $eagain when no data is available."
+ ;;
+ esac
+ status=`$cat try.err`
+ case "$status" in
+ 0) echo "And it correctly returns 0 to signal EOF.";;
+ -1) echo "But it also returns -1 to signal EOF, so be careful!";;
+ *) echo "However, your read() returns '$status' on EOF??";;
+ esac
+ val="$define"
+ if test "$status" = "$rd_nodata"; then
+ ./warn "your read() can't distinguish between EOF and no data!" 4>&4
+ val="$undef"
+ fi
+ else
+ echo "I can't compile the test program--assuming errno EAGAIN will do."
+ eagain=EAGAIN
+ fi
+ set d_eofnblk
+ eval $setvar
+ ;;
+*)
+ echo "Using $hint value $eagain."
+ echo "Your read() returns $rd_nodata when no data is present."
+ case "$d_eofnblk" in
+ "$define") echo "And you can see EOF because read() returns 0.";;
+ "$undef") echo "But you can't see EOF status from read() returned value.";;
+ *)
+?X: Should not happen, but if it does, assume the worst!
+ echo "(Assuming you can't see EOF status from read anyway.)"
+ d_eofnblk=$undef
+ ;;
+ esac
+ ;;
+esac
+$rm_try head.c mtry
+
diff --git a/mcon/U/newslevel.U b/mcon/U/newslevel.U
new file mode 100644
index 0000000..09bab23
--- /dev/null
+++ b/mcon/U/newslevel.U
@@ -0,0 +1,53 @@
+?RCS: $Id$
+?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: newslevel.U,v $
+?RCS: Revision 3.0 1993/08/18 12:09:21 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:newslevel: cat contains test activeexp newslib Myread Oldconfig
+?MAKE: -pick add $@ %<
+?S:newslevel:
+?S: The current revision level of the Usenet news system, encoded
+?S: as 1000 * major rev + 10 * minor rev + sub rev. For instance,
+?S: news 2.10.3 is encode as 2103, and 2.11 as 2110.
+?S:.
+?C:NEWSLEVEL:
+?C: The current revision level of the Usenet news system, encoded
+?C: as 1000 * major rev + 10 * minor rev + sub rev. For instance,
+?C: news 2.10.3 is encode as 2103, and 2.11 as 2110.
+?C:.
+?H:#define NEWSLEVEL $newslevel /**/
+?H:.
+: check for news version
+if $test -f $activeexp; then
+ if ??? >/dev/null 2>&1; then
+ dflt=2110
+ elif $test -f $newslib/cunbatch; then
+ dflt=2103
+ elif $contains ' [0-9][0-9]* [0-9]' "$activeexp" >/dev/null 2>&1; then
+ dflt=2102
+ else
+ dflt=2101
+ fi
+else
+ dflt=$newslevel
+fi
+$cat <<EOM
+
+The following news version number is a multiplexed integer:
+ 1000 * major rev + 10 * minor rev + sub rev.
+News 2.10.3 would be 2103. 2.11 comes out as 2110.
+
+EOM
+rp="What version of news are you going to be running?"
+. ./myread
+newslevel="$ans"
+
diff --git a/mcon/U/newslib.U b/mcon/U/newslib.U
new file mode 100644
index 0000000..4414039
--- /dev/null
+++ b/mcon/U/newslib.U
@@ -0,0 +1,61 @@
+?RCS: $Id$
+?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: newslib.U,v $
+?RCS: Revision 3.0 1993/08/18 12:09:23 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:newslib newslibexp: test inews Oldconfig Getfile
+?MAKE: -pick add $@ %<
+?S:newslib:
+?S: This variable contains the eventual value of the NEWSLIB symbol,
+?S: which holds the name of the directory serving as the news library.
+?S: It may have a ~ on the front. See newslibexp for expanded version.
+?S:.
+?S:newslibexp:
+?S: This variable contains the ~ expanded name of the news library
+?S: directory. See newslib.
+?S:.
+?C:NEWSLIB:
+?C: This symbol contains the name of the directory serving as the news
+?C: library. The program must be prepared to do ~ expansion on it.
+?C:.
+?C:NEWSLIB_EXP:
+?C: This symbol is the ~ expanded version of NEWSLIB, for programs that
+?C: do not wish to deal with it at run-time.
+?C:.
+?H:#define NEWSLIB "$newslib" /**/
+?H:#define NEWSLIB_EXP "$newslibexp" /**/
+?H:.
+?LINT:change inews
+: figure out news library
+case "$newslib" in
+'')
+ dflt=/usr/lib/news
+ ;;
+*) dflt=$newslib ;;
+esac
+echo " "
+fn=d~
+rp='Where is your news library?'
+. ./getfile
+newslib="$ans"
+newslibexp="$ansexp"
+if $test -f $newslibexp/inews; then
+ echo "Aha! Inews is really in $newslibexp! Maybe this is 2.10.2..." >&4
+ case "$inews" in
+ inews)
+ : null
+ ;;
+ *) echo "(Make sure $inews isn't an old version.)";;
+ esac
+ inews=$newslibexp/inews
+fi
+
diff --git a/mcon/U/newsspool.U b/mcon/U/newsspool.U
new file mode 100644
index 0000000..82467b2
--- /dev/null
+++ b/mcon/U/newsspool.U
@@ -0,0 +1,52 @@
+?RCS: $Id$
+?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: newsspool.U,v $
+?RCS: Revision 3.0 1993/08/18 12:09:24 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:newsspool newsspoolexp: Getfile Oldconfig
+?MAKE: -pick add $@ %<
+?S:newsspool:
+?S: This variable contains the eventual value of the NEWSSPOOL symbol,
+?S: which is the directory name where news articles are spooled. It
+?S: may have a ~ on the front of it.
+?S:.
+?S:newsspoolexp:
+?S: This is the same as the newsspool variable, but is filename expanded
+?S: at configuration time, for programs not wanting to deal with it at
+?S: run-time.
+?S:.
+?C:NEWSSPOOL:
+?C: This symbol contains the directory name where news articles are
+?C: spooled. The program must be prepared to do ~ expansion on it.
+?C:.
+?C:NEWSSPOOL_EXP:
+?C: This is the same as NEWSSPOOL, but is filename expanded at
+?C: configuration time, for use in programs not willing to do so
+?C: at run-time.
+?C:.
+?H:#define NEWSSPOOL "$newsspool" /**/
+?H:#define NEWSSPOOL_EXP "$newsspoolexp" /**/
+?H:.
+: locate news spool directory
+case "$newsspool" in
+'')
+ dflt=/usr/spool/news
+ ;;
+*) dflt="$newsspool";;
+esac
+echo " "
+fn=d~
+rp='Where are news spooled?'
+. ./getfile
+newsspool="$ans"
+newsspoolexp="$ansexp"
+
diff --git a/mcon/U/nis.U b/mcon/U/nis.U
new file mode 100644
index 0000000..06e4c47
--- /dev/null
+++ b/mcon/U/nis.U
@@ -0,0 +1,168 @@
+?RCS: $Id$
+?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: nis.U,v $
+?RCS: Revision 3.0.1.3 1997/02/28 16:17:38 ram
+?RCS: patch61: ensure suitable defaults for hostcat and friends
+?RCS:
+?RCS: Revision 3.0.1.2 1995/03/21 08:48:34 ram
+?RCS: patch52: continued fix for NeXT NIS/NetInfo handling
+?RCS:
+?RCS: Revision 3.0.1.1 1995/02/15 14:16:23 ram
+?RCS: patch51: now correctly handles NeXT using NIS rather than NetInfo
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:09:24 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:passcat groupcat hostcat: Myread Oldconfig test contains
+?MAKE: -pick add $@ %<
+?S:passcat:
+?S: This variable contains a command that produces the text of the
+?S: /etc/passwd file. This is normally "cat /etc/passwd", but can be
+?S: "ypcat passwd" when NIS is used.
+?S:.
+?S:groupcat:
+?S: This variable contains a command that produces the text of the
+?S: /etc/group file. This is normally "cat /etc/group", but can be
+?S: "ypcat group" when NIS is used.
+?S:.
+?S:hostcat:
+?S: This variable contains a command that produces the text of the
+?S: /etc/hosts file. This is normally "cat /etc/hosts", but can be
+?S: "ypcat hosts" when NIS is used.
+?S:.
+: see if we have to deal with yellow pages, now NIS.
+?X: NeXT gives us some fun here, as always, by having both NIS (former YP)
+?X: and NetInfo. But since it has both, it's ok to put the test inside the if.
+?X: Contributed by Thomas Neumann <tom@smart.bo.open.de>.
+if $test -d /usr/etc/yp || $test -d /etc/yp || $test -d /usr/lib/yp; then
+ if $test -f /usr/etc/nibindd; then
+ echo " "
+ echo "I'm fairly confident you're on a NeXT."
+@if passcat || groupcat
+ echo " "
+ rp='Do you get the passwd file via NetInfo?'
+ dflt=y
+ case "$passcat" in
+ nidump*) ;;
+ '') ;;
+ *) dflt=n;;
+ esac
+ . ./myread
+ case "$ans" in
+ y*) passcat='nidump passwd .'
+@if groupcat
+ echo "(Assuming /etc/group is also distributed.)"
+ groupcat='nidump group .'
+@end
+ ;;
+ *) echo "You told me, so don't blame me."
+ case "$passcat" in
+ nidump*) passcat=''
+@if groupcat
+ groupcat='';;
+@end
+ esac
+@if groupcat
+ echo "(Assuming /etc/group is handled the same way.)"
+@end
+ ;;
+ esac
+@end
+@if hostcat
+ echo " "
+ rp='Do you get the hosts file via NetInfo?'
+ dflt=y
+ case "$hostcat" in
+ nidump*) ;;
+ '') ;;
+ *) dflt=n;;
+ esac
+ . ./myread
+ case "$ans" in
+ y*) hostcat='nidump hosts .';;
+ *) case "$hostcat" in
+ nidump*) hostcat='';;
+ esac
+ ;;
+ esac
+@end
+ fi
+@if passcat || groupcat
+ case "$passcat" in
+ nidump*) ;;
+ *)
+ case "$passcat" in
+ *ypcat*) dflt=y;;
+ '') if $contains '^\+' /etc/passwd >/dev/null 2>&1; then
+ dflt=y
+ else
+ dflt=n
+ fi;;
+ *) dflt=n;;
+ esac
+ echo " "
+ rp='Are you getting the passwd file via yellow pages?'
+ . ./myread
+ case "$ans" in
+ y*) passcat='ypcat passwd'
+@if groupcat
+ echo "(Assuming /etc/group is also distributed.)"
+ groupcat='ypcat group'
+@end
+ ;;
+ *) passcat='cat /etc/passwd'
+@if groupcat
+ echo "(Assuming /etc/group is also local.)"
+ groupcat='cat /etc/group'
+@end
+ ;;
+ esac
+ ;;
+ esac
+@end
+@if hostcat
+ case "$hostcat" in
+ nidump*) ;;
+ *)
+ case "$hostcat" in
+ *ypcat*) dflt=y;;
+ '') if $contains '^\+' /etc/passwd >/dev/null 2>&1; then
+ dflt=y
+ else
+ dflt=n
+ fi;;
+ *) dflt=n;;
+ esac
+ echo " "
+ rp='Are you getting the hosts file via yellow pages?'
+ . ./myread
+ case "$ans" in
+ y*) hostcat='ypcat hosts';;
+ *) hostcat='cat /etc/hosts';;
+ esac
+ ;;
+ esac
+@end
+fi
+?X: Ensure suitable default -- Manoj Srivastava
+case "$hostcat" in
+'') hostcat=':'
+ $test -f /etc/hosts && hostcat='cat /etc/hosts';;
+esac
+case "$groupcat" in
+'') groupcat=':'
+ $test -f /etc/group && groupcat='cat /etc/group';;
+esac
+case "$passcat" in
+'') passcat=':'
+ $test -f /etc/passwd && passcat='cat /etc/passwd';;
+esac
+
diff --git a/mcon/U/nlist_pfx.U b/mcon/U/nlist_pfx.U
new file mode 100644
index 0000000..20bca8e
--- /dev/null
+++ b/mcon/U/nlist_pfx.U
@@ -0,0 +1,135 @@
+?RCS: $Id$
+?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: nlist_pfx.U,v $
+?RCS: Revision 3.0.1.1 1994/10/29 16:26:18 ram
+?RCS: patch36: added ?F: line for metalint file checking
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:09:25 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:nlist_pfx nlist_fnd: cat test Myread Oldconfig libnlist \
+ +cc +ccflags
+?MAKE: -pick add $@ %<
+?S:nlist_pfx:
+?S: This variable holds any characters which precede the symbol name
+?S: when doing an nlist search.
+?S:.
+?S:nlist_fnd:
+?S: This variable holds the member of the nlist structure which is
+?S: nonzero if an nlist search succeeds. Presently, it is always "n_value".
+?S:.
+?C:NLIST_PREFIX:
+?C: This manifest constant holds the string of characters which should
+?C: preceed the symbol name when doing an nlist search.
+?C:.
+?C:NLIST_FOUND:
+?C: This manifest constant holds the member of the nlist structure which
+?C: is nonzero if an nlist search succeeds.
+?C:.
+?H:#define NLIST_PREFIX $nlist_pfx /**/
+?H:#define NLIST_FOUND $nlist_fnd /**/
+?H:.
+?F:!nlisttest
+?T:nlist_loc
+: Nose around for nlist stuff
+echo " "
+echo "Checking out nlist stuff..." >&4
+$cat >nlisttest.c <<'EOCP'
+#include <stdio.h>
+#include <nlist.h>
+
+main(argc, argv)
+int argc;
+char **argv;
+{
+ int (*loc)();
+ extern int hereIam();
+ static struct nlist nl[] = {
+ { "IamNotFound", 0 },
+ { "hereIam", 0 },
+ { "_hereIam", 0 },
+ { ".hereIam", 0 },
+ { "", 0 }
+ };
+
+ loc = hereIam;
+
+ if(argc == 1) {
+ printf("%ld\n", loc);}
+ else {
+ int i;
+ int rc;
+
+ if(nlist("./nlisttest", nl) == -1) exit(-1);
+ i = argv[1][0] - '0';
+ printf("%d %d %d\n", nl[i].n_name, nl[i].n_type, nl[i].n_value);
+ }
+ exit(0);}
+
+int hereIam() {
+
+ return;}
+EOCP
+nlist_fnd=n_value
+if $cc $ccflags -o nlisttest nlisttest.c $libnlist >/dev/null 2>&1 ; then
+ set `./nlisttest`
+ nlist_loc=$1
+
+ set `./nlisttest 0`
+ if $test "$3" = "0" ; then
+ echo "$nlist_fnd is 0 if nlist() fails, as I expected."
+ else
+ $cat <<EOM
+Hello, Jim. We have just discovered that $nlist_fnd was nonzero on an
+nlist() lookup failure! Your mission, should you choose to accept it, is to
+edit either config.sh (to provide a Good value for nlist_fnd) or The Code
+(to find an alternative to NLIST_FOUND), and reporting the full details of
+your success to the MetaConfig Police. Of course, should you fail...
+EOM
+ nlist_fnd="/* Bletch! */ */"
+ fi
+
+ set `./nlisttest 1`
+ if $test "$nlist_loc" = "$3" ; then
+ echo "Symbols are stored with no initial characters."
+ nlist_pfx=
+ else
+ set `./nlisttest 2`
+ if $test "$nlist_loc" = "$3" ; then
+ echo "Symbols are stored with an initial underscore."
+ nlist_pfx=_
+ else
+ set `./nlisttest 3`
+ if $test "$nlist_loc" = "$3" ; then
+ echo "Symbols are stored with an initial dot."
+ nlist_pfx=.
+ else
+ $cat <<EOM
+I can't figure out the symbol prefix!
+You get to edit config.sh and fix 'nlist_pfx' (Configure will let you do this
+at the end of its configuration questions), or config.h and fix the value of
+the NLIST_PREFIX symbol.
+EOM
+ nlist_pfx="/* Bletch! */ */"
+ fi
+ fi
+ fi
+else
+ $cat <<EOM
+I can't get the nlist test program working!
+You get to edit config.sh and fix 'nlist_pfx' (Configure will let you do this
+at the end of its configuration questions) and 'nlist_fnd', or config.h and
+fix the value of the NLIST_PREFIX and NLIST_FOUND symbols.
+EOM
+ nlist_pfx="/* Bletch! */ */"
+ nlist_fnd="/* Bletch! */ */"
+fi
+
diff --git a/mcon/U/official.U b/mcon/U/official.U
new file mode 100644
index 0000000..cf372d1
--- /dev/null
+++ b/mcon/U/official.U
@@ -0,0 +1,47 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:official d_official: Myread Setvar Warn
+?MAKE: -pick add $@ %<
+?S:official:
+?S: This variable holds 'true' or 'false' depending on whether we're making
+?S: an "official" build. When not official, generated programs may choose
+?S: to peek within the source directory, for instance via $pkgsrc in the
+?S: shell and PACKAGE_SOURCE_DIR in C programs.
+?S:.
+?S:d_official:
+?S: This variable conditionally defines OFFICIAL_BUILD.
+?S:.
+?C:OFFICIAL_BUILD:
+?C: When defined, the build is "official". Programs generated for an
+?C: official build MUST NOT peek into the place where the sources lie, via
+?C: PACKAGE_SOURCE_DIR or any other means.
+?C:.
+?H:#$d_official OFFICIAL_BUILD /**/
+?H:.
+?Y:TOP
+?LINT:set d_official
+: determine whether this is an official build
+case "$official" in
+false)
+ official=false
+ val="$undef"
+ echo " "
+ ./warn 'This build will not be suitable for distribution.' 4>&4
+
+;;
+*)
+ val="$define"
+ official=true
+ ;;
+esac
+set d_official
+eval $setvar
+
diff --git a/mcon/U/orderlib.U b/mcon/U/orderlib.U
new file mode 100644
index 0000000..b61bf16
--- /dev/null
+++ b/mcon/U/orderlib.U
@@ -0,0 +1,95 @@
+?RCS: $Id$
+?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: orderlib.U,v $
+?RCS: Revision 3.0.1.4 1997/02/28 16:18:18 ram
+?RCS: patch61: replaced .a with $_a all over the place
+?RCS: patch61: likewise for .o replaced by $_o
+?RCS: patch61: now uses the ar located by Loc.U
+?RCS:
+?RCS: Revision 3.0.1.3 1995/01/11 15:33:04 ram
+?RCS: patch45: allows hint files to specify their own value for 'ranlib'
+?RCS:
+?RCS: Revision 3.0.1.2 1994/10/29 16:26:48 ram
+?RCS: patch36: now performs a real small compile for accurate checks (ADO)
+?RCS:
+?RCS: Revision 3.0.1.1 1994/08/29 16:31:17 ram
+?RCS: patch32: use cc variable instead of hardwired 'cc' in 1st compile
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:09:26 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:orderlib ranlib: Loc ar cat test rm +cc +ccflags +ldflags +libs _a _o
+?MAKE: -pick add $@ %<
+?S:orderlib:
+?S: This variable is "true" if the components of libraries must be ordered
+?S: (with `lorder $* | tsort`) before placing them in an archive. Set to
+?S: "false" if ranlib or ar can generate random libraries.
+?S:.
+?S:ranlib:
+?S: This variable is set to the pathname of the ranlib program, if it is
+?S: needed to generate random libraries. Set to ":" if ar can generate
+?S: random libraries or if random libraries are not supported
+?S:.
+?F:!foobar
+: see if ar generates random libraries by itself
+echo " "
+echo "Checking how to generate random libraries on your machine..." >&4
+?X: Some systems (like MIPS) complain when running ar... Others like Ultrix
+?X: need an explicit 'ar ts' to add the table of contents.
+?X: Still others like Linux run ar ts successfully, but still need ranlib.
+?X: This set of tests seems the minimum necessary to check out Linux.
+?X: We need to explicitly put the entries in out-of-order so that Sun's ld
+?X: will fail. (Otherwise it complains, but gives an exit status of 0.)
+echo 'int bar1() { return bar2(); }' > bar1.c
+echo 'int bar2() { return 2; }' > bar2.c
+$cat > foo.c <<'EOP'
+int main() { printf("%d\n", bar1()); return 0; }
+EOP
+$cc $ccflags -c bar1.c >/dev/null 2>&1
+$cc $ccflags -c bar2.c >/dev/null 2>&1
+$cc $ccflags -c foo.c >/dev/null 2>&1
+$ar rc bar$_a bar2$_o bar1$_o >/dev/null 2>&1
+if $cc $ccflags $ldflags -o foobar foo$_o bar$_a $libs > /dev/null 2>&1 &&
+ ./foobar >/dev/null 2>&1; then
+ echo "ar appears to generate random libraries itself."
+ orderlib=false
+ ranlib=":"
+elif $ar ts bar$_a >/dev/null 2>&1 &&
+ $cc $ccflags $ldflags -o foobar foo$_o bar$_a $libs > /dev/null 2>&1 &&
+ ./foobar >/dev/null 2>&1; then
+ echo "a table of contents needs to be added with 'ar ts'."
+ orderlib=false
+ ranlib="$ar ts"
+else
+?X: Allow hints to specify their own ranlib "script". For instance, on
+?X: some NeXT machines, the timestamp put by ranlib is not correct, and this
+?X: may raise tedious recompiles for nothing. Therefore, NeXT may add the
+?X: ranlib='sleep 5; /bin/ranlib' line in their hints to "fix" that.
+?X: (reported by Andreas Koenig <k@franz.ww.tu-berlin.de>)
+ case "$ranlib" in
+ :) ranlib='';;
+ '')
+ ranlib=`./loc ranlib X /usr/bin /bin /usr/local/bin`
+ $test -f $ranlib || ranlib=''
+ ;;
+ esac
+ if $test -n "$ranlib"; then
+ echo "your system has '$ranlib'; we'll use that."
+ orderlib=false
+ else
+ echo "your system doesn't seem to support random libraries"
+ echo "so we'll use lorder and tsort to order the libraries."
+ orderlib=true
+ ranlib=":"
+ fi
+fi
+$rm -f foo* bar*
+
diff --git a/mcon/U/orgname.U b/mcon/U/orgname.U
new file mode 100644
index 0000000..45a51b4
--- /dev/null
+++ b/mcon/U/orgname.U
@@ -0,0 +1,65 @@
+?RCS: $Id$
+?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: orgname.U,v $
+?RCS: Revision 3.0.1.1 1993/09/13 16:10:25 ram
+?RCS: patch10: added support for /local/src to the search (WAD)
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:09:27 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:orgname: sed cat Myread Loc Oldconfig
+?MAKE: -pick add $@ %<
+?S:orgname:
+?S: This variable contains the eventual value of the ORGNAME symbol,
+?S: which contains either the organizaton name or the full pathname
+?S: of a file containing the organization name.
+?S:.
+?C:ORGNAME:
+?C: This symbol contains either the organizaton name or the full pathname
+?C: of a file containing the organization name, which the program must
+?C: be prepared to open and substitute the contents of.
+?C:.
+?H:#define ORGNAME "$orgname" /**/
+?H:.
+?T:longshots xxx
+: get organization name
+longshots='/local/src /usr/src/new /usr/src/local /usr/local/src'
+case "$orgname" in
+'') if xxx=`./loc news/src/defs.h x $longshots`; then
+ dflt=`$sed -n 's/^.*MYORG[ ]*"\(.*\)".*$/\1/p' $xxx`
+ else
+ dflt=''
+ fi
+ ;;
+*) dflt="$orgname";;
+esac
+$cat << 'EOH'
+
+Please type the name of your organization as you want it to appear on the
+Organization line of outgoing articles. (It's nice if this also specifies
+your location. Your city name is probably sufficient if well known.)
+For example:
+
+ University of Southern North Dakota, Hoople
+
+You may also put the name of a file, as long as it begins with a slash.
+For example:
+
+ /etc/organization
+
+EOH
+orgname=""
+while test "X$orgname" = "X"; do
+ rp='Organization:'
+ . ./myread
+ orgname="$ans"
+done
+
diff --git a/mcon/U/packadmin.U b/mcon/U/packadmin.U
new file mode 100644
index 0000000..921c8d1
--- /dev/null
+++ b/mcon/U/packadmin.U
@@ -0,0 +1,33 @@
+?RCS: $Id$
+?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 License,
+?RCS: as specified in the 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:packadmin: cf_email Oldconfig Myread cat spackage package
+?MAKE: -pick add $@ %<
+?Y:TOP
+?S:packadmin:
+?S: Electronic mail address of the package administrator.
+?S:.
+: check wehther they will act as local admin for the package
+$cat <<EOM
+
+If you or somebody else will be maintaining $package at your site, please
+fill in the correct e-mail address here so that they may be contacted
+if necessary. You may enter "none" for no administrator.
+
+EOM
+case "$packadmin" in
+'') dflt="$cf_email";;
+*) dflt="$packadmin";;
+esac
+rp="$spackage administrator e-mail address"
+. ./myread
+packadmin="$ans"
+
diff --git a/mcon/U/package.U b/mcon/U/package.U
new file mode 100644
index 0000000..7dd97e3
--- /dev/null
+++ b/mcon/U/package.U
@@ -0,0 +1,56 @@
+?RCS: $Id$
+?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: package.U,v $
+?RCS: Revision 3.0.1.3 1994/10/29 16:27:21 ram
+?RCS: patch36: beware of non-ascii character sets when translating case
+?RCS:
+?RCS: Revision 3.0.1.2 1993/11/10 17:37:02 ram
+?RCS: patch14: skip definition of spackage if not otherwise used
+?RCS:
+?RCS: Revision 3.0.1.1 1993/09/13 16:11:10 ram
+?RCS: patch10: added spackage, suitable for starting sentences
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:09:28 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:package spackage: Nothing
+?MAKE: -pick wipe $@ %<
+?S:package:
+?S: This variable contains the name of the package being constructed.
+?S: It is primarily intended for the use of later Configure units.
+?S:.
+?S:spackage:
+?S: This variable contains the name of the package being constructed,
+?S: with the first letter uppercased, i.e. suitable for starting
+?S: sentences.
+?S:.
+?C:PACKAGE:
+?C: This variable contains the name of the package being built.
+?C:.
+?H:#define PACKAGE "$package"
+?H:.
+?T:first last
+: set package name
+package='<PACKAGENAME>'
+@if spackage
+first=`echo $package | sed -e 's/^\(.\).*/\1/'`
+last=`echo $package | sed -e 's/^.\(.*\)/\1/'`
+?X:
+?X: So early in the Configure script, we don't have ./tr set up and can't
+?X: include Tr in our dependency or that would create a cycle. Therefore,
+?X: we have to somehow duplicate the work done in Tr. That's life.
+?X:
+case "`echo AbyZ | tr '[:lower:]' '[:upper:]' 2>/dev/null`" in
+ABYZ) spackage=`echo $first | tr '[:lower:]' '[:upper:]'`$last;;
+*) spackage=`echo $first | tr '[a-z]' '[A-Z]'`$last;;
+esac
+@end
+
diff --git a/mcon/U/pager.U b/mcon/U/pager.U
new file mode 100644
index 0000000..e68cf8c
--- /dev/null
+++ b/mcon/U/pager.U
@@ -0,0 +1,62 @@
+?RCS: $Id$
+?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: pager.U,v $
+?RCS: Revision 3.0.1.2 1995/01/30 14:41:26 ram
+?RCS: patch49: ensure dflt gets initialized in case no pagers are found (WED)
+?RCS:
+?RCS: Revision 3.0.1.1 1994/10/29 16:27:45 ram
+?RCS: patch36: replaced Myread by Getfile in the dependency line
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:09:30 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:pager: pg more less Getfile Oldconfig
+?MAKE: -pick add $@ %<
+?S:pager:
+?S: This variable contains the name of the preferred pager on the system.
+?S: Usual values are (the full pathnames of) more, less, pg, or cat.
+?S:.
+: locate the preferred pager for this system
+fn=f/
+case "$pager" in
+'')
+ dflt=''
+ case "$pg" in
+ /*) dflt=$pg;;
+ [a-zA-Z]:/*) dflt=$pg;;
+ esac
+ case "$more" in
+ /*) dflt=$more;;
+ [a-zA-Z]:/*) dflt=$more;;
+ esac
+ case "$less" in
+ /*) dflt=$less;;
+ [a-zA-Z]:/*) dflt=$less;;
+ esac
+ case "$dflt" in
+ '') dflt=/usr/ucb/more;;
+ esac
+ ;;
+*) dflt="$pager"
+ ;;
+esac
+?X: Instruct ./getfile to trust the default pager value,
+?X: even if it does not begin with a slash. For example, on os2,
+?X: pager might be cmd /c more. Also, it might include some options,
+?X: such as '/usr/bin/less -R'. ./getfile would report that
+?X: "/usr/bin/less -R" doesn't exist.
+?X: See comments in Getfile.U.
+fn="f/($dflt)"
+echo " "
+rp='What pager is used on your system?'
+. ./getfile
+pager="$ans"
+
diff --git a/mcon/U/patchlevel.U b/mcon/U/patchlevel.U
new file mode 100644
index 0000000..3da3183
--- /dev/null
+++ b/mcon/U/patchlevel.U
@@ -0,0 +1,69 @@
+?RCS: $Id$
+?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: patchlevel.U,v $
+?RCS: Revision 3.0.1.1 1997/02/28 16:18:41 ram
+?RCS: patch61: added support for src.U
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:09:31 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:patchlevel revision: package baserev test rsrc
+?MAKE: -pick add $@ %<
+?T:Revision
+?S:patchlevel:
+?S: The patchlevel level of this package.
+?S: The value of patchlevel comes from the patchlevel.h file.
+?S:.
+?S:revision:
+?S: The revision / build of this package.
+?S: The value is derived from the REVISION define in the revision.h file.
+?S: When revision is defined, the patch level should be ignored if 0.
+?S:.
+: get the patchlevel / revision
+echo " "
+echo "Getting the current patchlevel / revision..." >&4
+if $test -r $rsrc/patchlevel.h;then
+ patchlevel=`awk \
+ '/^#[ ]*define[ ][ ]*PATCHLEVEL/ {print $3}' \
+ < $rsrc/patchlevel.h`
+else
+ patchlevel=0
+fi
+?X:
+?X: Can handle either one of:
+?X:
+?X: #define REVISION word
+?X: #define REVISION "$Revision$"
+?X:
+if $test -r $rsrc/revision.h;then
+ revision=`awk \
+ '/^#[ ]*define[ ][ ]*REVISION/ {print $3}' \
+ < $rsrc/revision.h`
+ case "$revision" in
+ '"$Revision:')
+ revision=`awk \
+ '/^#[ ]*define[ ][ ]*REVISION/ {print $4}' \
+ < $rsrc/revision.h`
+ ;;
+ esac
+else
+ revision=0
+fi
+case "$revision" in
+0) echo "(You have $package $baserev PL$patchlevel.)" ;;
+*)
+ case "$patchlevel" in
+ 0) echo "(You have $package $baserev-$revision)";;
+ *) echo "(You have $package $baserev-$revision PL$patchlevel)";;
+ esac
+ ;;
+esac
+
diff --git a/mcon/U/perlpath.U b/mcon/U/perlpath.U
new file mode 100644
index 0000000..08a85aa
--- /dev/null
+++ b/mcon/U/perlpath.U
@@ -0,0 +1,56 @@
+?RCS: $Id$
+?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: perlpath.U,v $
+?RCS: Revision 3.0.1.2 1995/09/25 09:17:04 ram
+?RCS: patch59: unit is now forced to the top of Configure, if possible
+?RCS:
+?RCS: Revision 3.0.1.1 1995/01/11 15:33:53 ram
+?RCS: patch45: can now use Loc variables since path stripping is deferred
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:09:32 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: The purpose of this unit is to locate perl good enough to construct a #!
+?X:
+?MAKE:perlpath: Getfile Oldconfig Loc perl
+?MAKE: -pick add $@ %<
+?Y:TOP
+?S:perlpath:
+?S: This variable contains the eventual value of the PERLPATH symbol,
+?S: which contains the absolute location of the perl interpreter.
+?S:.
+?C:PERLPATH:
+?C: This symbol contains the absolute location of the perl interpreter.
+?C:.
+?H:#define PERLPATH "$perlpath" /**/
+?H:.
+: determine perl absolute location
+case "$perlpath" in
+'')
+ if test -f /usr/bin/perl; then
+ dflt=/usr/bin/perl
+ else
+ case "$perl" in
+ */*) dflt="$perl";;
+ *) dflt=/usr/bin/perl;;
+ esac
+ fi
+ ;;
+*) dflt="$perlpath"
+ ;;
+esac
+echo " "
+fn=f~/
+rp="Where is perl located on your system?"
+. ./getfile
+perlpath="$ans"
+
diff --git a/mcon/U/pidtype.U b/mcon/U/pidtype.U
new file mode 100644
index 0000000..22ed2de
--- /dev/null
+++ b/mcon/U/pidtype.U
@@ -0,0 +1,39 @@
+?RCS: $Id$
+?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: pidtype.U,v $
+?RCS: Revision 3.0.1.1 1994/08/29 16:31:27 ram
+?RCS: patch32: now uses new Typedef unit to compute type information
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:09:33 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:pidtype: Myread Typedef
+?MAKE: -pick add $@ %<
+?S:pidtype:
+?S: This variable defines PIDTYPE to be something like pid_t, int,
+?S: ushort, or whatever type is used to declare process ids in the kernel.
+?S:.
+?C:Pid_t (PIDTYPE):
+?C: This symbol holds the type used to declare process ids in the kernel.
+?C: It can be int, uint, pid_t, etc... It may be necessary to include
+?C: <sys/types.h> to get any typedef'ed information.
+?C:.
+?H:#define Pid_t $pidtype /* PID type */
+?H:.
+: see what type pids are declared as in the kernel
+set pid_t pidtype int stdio.h sys/types.h
+eval $typedef
+dflt="$pidtype"
+echo " "
+rp="What type are process ids on this system declared as?"
+. ./myread
+pidtype="$ans"
+
diff --git a/mcon/U/pkgsrc.U b/mcon/U/pkgsrc.U
new file mode 100644
index 0000000..f69c195
--- /dev/null
+++ b/mcon/U/pkgsrc.U
@@ -0,0 +1,26 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:pkgsrc: src rsrc
+?MAKE: -pick add $@ %<
+?S:pkgsrc:
+?S: This variable holds the absolute path of the package source.
+?S:.
+?C:PACKAGE_SOURCE_DIR:
+?C: Holds the directory name holding the package source.
+?C:.
+?H:#define PACKAGE_SOURCE_DIR "$pkgsrc"
+?H:.
+: define absolute package source directory
+case "$src" in
+/*) pkgsrc=$src;;
+*) pkgsrc=`cd $rsrc; pwd`;;
+esac
+
diff --git a/mcon/U/prefix.U b/mcon/U/prefix.U
new file mode 100644
index 0000000..ded5729
--- /dev/null
+++ b/mcon/U/prefix.U
@@ -0,0 +1,80 @@
+?RCS: $Id$
+?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: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
+?RCS:
+?RCS: $Log: prefix.U,v $
+?RCS: Revision 3.0.1.2 1995/01/30 14:44:05 ram
+?RCS: patch49: new prefixexp variable holding a fully expanded prefix
+?RCS: patch49: save off previous prefix value in oldprefix if changed (WED)
+?RCS: patch49: added the INSTALLPREFIX define for C programs to use (WED)
+?RCS:
+?RCS: Revision 3.0.1.1 1994/08/29 16:31:34 ram
+?RCS: patch32: created by ADO
+?RCS:
+?MAKE:prefix prefixexp +oldprefix: Getfile Loc Oldconfig cat package
+?MAKE: -pick add $@ %<
+?S:prefix:
+?S: This variable holds the name of the directory below which the
+?S: user will install the package. Usually, this is /usr/local, and
+?S: executables go in /usr/local/bin, library stuff in /usr/local/lib,
+?S: man pages in /usr/local/man, etc. It is only used to set defaults
+?S: for things in bin.U, mansrc.U, privlib.U, or scriptdir.U.
+?S:.
+?S:prefixexp:
+?S: This variable holds the full absolute path of the directory below
+?S: which the user will install the package. Derived from prefix.
+?S:.
+?S:oldprefix:
+?S: This variable is set non-null if the prefix was previously defined
+?S: and gets set to a new value. Used internally by Configure only.
+?S:.
+?C:INSTALLPREFIX:
+?C: This symbol contains the name of the install prefix for this package.
+?C:.
+?H:#define INSTALLPREFIX "$prefix" /**/
+?H:.
+: determine root of directory hierarchy where package will be installed.
+case "$prefix" in
+'')
+ dflt=`./loc . /usr/local /usr/local /local /opt /usr`
+ ;;
+*)
+ dflt="$prefix"
+ ;;
+esac
+$cat <<EOM
+
+By default, $package will be installed in $dflt/bin, manual
+pages under $dflt/man, etc..., i.e. with $dflt as prefix for
+all installation directories. Typically set to /usr/local, but you
+may choose /usr if you wish to install $package among your system
+binaries. If you wish to have binaries under /bin but manual pages
+under /usr/local/man, that's ok: you will be prompted separately
+for each of the installation directories, the prefix being only used
+to set the defaults.
+
+EOM
+fn=d~
+rp='Installation prefix to use?'
+. ./getfile
+oldprefix=''
+case "$prefix" in
+'') ;;
+*)
+ case "$ans" in
+ "$prefix") ;;
+ *) oldprefix="$prefix";;
+ esac
+ ;;
+esac
+prefix="$ans"
+prefixexp="$ansexp"
+
diff --git a/mcon/U/prefshell.U b/mcon/U/prefshell.U
new file mode 100644
index 0000000..315f689
--- /dev/null
+++ b/mcon/U/prefshell.U
@@ -0,0 +1,60 @@
+?RCS: $Id$
+?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: prefshell.U,v $
+?RCS: Revision 3.0.1.2 1994/10/29 16:28:13 ram
+?RCS: patch36: added SHELL temporary since metalint now sees ${SHELL}
+?RCS:
+?RCS: Revision 3.0.1.1 1993/09/13 16:11:47 ram
+?RCS: patch10: non-portable var substitution was used (WAD)
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:09:34 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:prefshell: cat package Getfile Oldconfig ksh csh bash
+?MAKE: -pick add $@ %<
+?S:prefshell:
+?S: This variable contains the eventual value of the PREFSHELL symbol,
+?S: which contains the full name of the preferred user shell on this
+?S: system. Usual values are /bin/csh, /bin/ksh, /bin/sh.
+?S:.
+?C:PREFSHELL:
+?C: This symbol contains the full name of the preferred user shell on this
+?C: system. Usual values are /bin/csh, /bin/ksh, /bin/sh.
+?C:.
+?H:#define PREFSHELL "$prefshell" /**/
+?H:.
+?T:SHELL
+: find out which shell people like to use most
+case "$prefshell" in
+'')
+ case "$ksh $bash $csh" in
+ */ksh*) dflt="$ksh" ;;
+ */bash*) dflt="$bash" ;;
+ */csh*) dflt="$csh" ;;
+ *) dflt='/bin/sh' ;;
+ esac
+ ;;
+*) dflt="$prefshell";;
+esac
+?X: Some shells (Ultrix) do not understand ${SHELL:-/bin/sh}, sigh!
+$cat <<EOM
+
+Give the full path name of the shell most people like to use on your system.
+This will be used by $package whenever the user wants to get a shell
+escape (for instance) and is not necessarily the same as the shell you are
+currently using (${SHELL-/bin/sh}).
+
+EOM
+fn=f/~
+rp='Preferred shell to be used?'
+. ./getfile
+prefshell=$ans
+
diff --git a/mcon/U/privlib.U b/mcon/U/privlib.U
new file mode 100644
index 0000000..ce166aa
--- /dev/null
+++ b/mcon/U/privlib.U
@@ -0,0 +1,96 @@
+?RCS: $Id$
+?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: privlib.U,v $
+?RCS: Revision 3.0.1.4 1995/09/25 09:17:09 ram
+?RCS: patch59: unit is now forced to the top of Configure, if possible
+?RCS:
+?RCS: Revision 3.0.1.3 1995/01/30 14:44:23 ram
+?RCS: patch49: can now handle installation prefix changes (from WED)
+?RCS:
+?RCS: Revision 3.0.1.2 1994/08/29 16:31:52 ram
+?RCS: patch32: now uses installation prefix
+?RCS:
+?RCS: Revision 3.0.1.1 1993/09/13 16:12:34 ram
+?RCS: patch10: added support for /local/lib (WED)
+?RCS: patch10: prompt phrasing made more explicit (WED)
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:09:35 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:privlib privlibexp installprivlib: afs package cat Getfile \
+ Oldconfig Prefixit test
+?MAKE: -pick add $@ %<
+?Y:TOP
+?S:privlib:
+?S: This variable contains the eventual value of the PRIVLIB symbol,
+?S: which is the name of the private library for this package. It may
+?S: have a ~ on the front. It is up to the makefile to eventually create
+?S: this directory while performing installation (with ~ substitution).
+?S:.
+?S:privlibexp:
+?S: This variable is the ~name expanded version of privlib, so that you
+?S: may use it directly in Makefiles or shell scripts.
+?S:.
+?S:installprivlib:
+?S: This variable is really the same as privlibexp but may differ on
+?S: those systems using AFS. For extra portability, only this variable
+?S: should be used in makefiles.
+?S:.
+?C:PRIVLIB:
+?C: This symbol contains the name of the private library for this package.
+?C: The library is private in the sense that it needn't be in anyone's
+?C: execution path, but it should be accessible by the world. The program
+?C: should be prepared to do ~ expansion.
+?C:.
+?C:PRIVLIB_EXP:
+?C: This symbol contains the ~name expanded version of PRIVLIB, to be used
+?C: in programs that are not prepared to deal with ~ expansion at run-time.
+?C:.
+?H:#define PRIVLIB "$privlib" /**/
+?H:#define PRIVLIB_EXP "$privlibexp" /**/
+?H:.
+: determine where private executables go
+set dflt privlib lib/$package
+eval $prefixit
+$cat <<EOM
+
+There are some auxiliary files for $package that need to be put into a
+private library directory that is accessible by everyone.
+
+EOM
+fn=d~+
+rp='Pathname where the private library files will reside?'
+. ./getfile
+if $test "X$privlibexp" != "X$ansexp"; then
+ installprivlib=''
+fi
+privlib="$ans"
+privlibexp="$ansexp"
+if $afs; then
+ $cat <<EOM
+
+Since you are running AFS, I need to distinguish the directory in which
+private files reside from the directory in which they are installed (and from
+which they are presumably copied to the former directory by occult means).
+
+EOM
+ case "$installprivlib" in
+ '') dflt=`echo $privlibexp | sed 's#^/afs/#/afs/.#'`;;
+ *) dflt="$installprivlib";;
+ esac
+ fn=de~
+ rp='Where will private files be installed?'
+ . ./getfile
+ installprivlib="$ans"
+else
+ installprivlib="$privlibexp"
+fi
+
diff --git a/mcon/U/prototype.U b/mcon/U/prototype.U
new file mode 100644
index 0000000..ff4f85b
--- /dev/null
+++ b/mcon/U/prototype.U
@@ -0,0 +1,117 @@
+?RCS: $Id$
+?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: prototype.U,v $
+?RCS: Revision 3.0.1.3 1994/05/06 15:11:49 ram
+?RCS: patch23: ensure cc flags used when looking for prototype support
+?RCS:
+?RCS: Revision 3.0.1.2 1994/01/24 14:15:36 ram
+?RCS: patch16: prototype handling macros now appear only when needed
+?RCS:
+?RCS: Revision 3.0.1.1 1993/08/25 14:03:12 ram
+?RCS: patch6: defines were referring to non-existent VOID symbol
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:09:36 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:prototype: Myread Oldconfig cat +cc +ccflags rm Setvar
+?MAKE: -pick add $@ %<
+?S:prototype:
+?S: This variable holds the eventual value of CAN_PROTOTYPE, which
+?S: indicates the C compiler can handle function prototypes.
+?S:.
+?C:CAN_PROTOTYPE ~ %<:
+?C: If defined, this macro indicates that the C compiler can handle
+?C: function prototypes.
+?C:.
+?C:DOTS:
+?C: This macro is used to specify the ... in function prototypes which
+?C: have arbitrary additional arguments.
+?C:.
+?C:NXT_ARG:
+?C: This macro is used to separate arguments in the declared argument list.
+?C:.
+?C:P_FUNC:
+?C: This macro is used to declare "private" (static) functions.
+?C: It takes three arguments: the function type and name, a parenthesized
+?C: traditional (comma separated) argument list, and the declared argument
+?C: list (in which arguments are separated with NXT_ARG, and additional
+?C: arbitrary arguments are specified with DOTS). For example:
+?C:
+?C: P_FUNC(int foo, (bar, baz), int bar NXT_ARG char *baz[])
+?C:.
+?C:P_FUNC_VOID:
+?C: This macro is used to declare "private" (static) functions that have
+?C: no arguments. The macro takes one argument: the function type and name.
+?C: For example:
+?C:
+?C: P_FUNC_VOID(int subr)
+?C:.
+?C:V_FUNC:
+?C: This macro is used to declare "public" (non-static) functions.
+?C: It takes three arguments: the function type and name, a parenthesized
+?C: traditional (comma separated) argument list, and the declared argument
+?C: list (in which arguments are separated with NXT_ARG, and additional
+?C: arbitrary arguments are specified with DOTS). For example:
+?C:
+?C: V_FUNC(int main, (argc, argv), int argc NXT_ARG char *argv[])
+?C:.
+?C:V_FUNC_VOID:
+?C: This macro is used to declare "public" (non-static) functions that have
+?C: no arguments. The macro takes one argument: the function type and name.
+?C: For example:
+?C:
+?C: V_FUNC_VOID(int fork)
+?C:.
+?C:_ (P):
+?C: This macro is used to declare function parameters for folks who want
+?C: to make declarations with prototypes using a different style than
+?C: the above macros. Use double parentheses. For example:
+?C:
+?C: int main _((int argc, char *argv[]));
+?C:.
+?H:?%<:#$prototype CAN_PROTOTYPE /**/
+?H:?%<:#ifdef CAN_PROTOTYPE
+?H:?NXT_ARG:#define NXT_ARG ,
+?H:?DOTS:#define DOTS , ...
+?H:?V_FUNC:#define V_FUNC(name, arglist, args)name(args)
+?H:?P_FUNC:#define P_FUNC(name, arglist, args)static name(args)
+?H:?V_FUNC_VOID:#define V_FUNC_VOID(name)name(void)
+?H:?P_FUNC_VOID:#define P_FUNC_VOID(name)static name(void)
+?H:?_:#define _(args) args
+?H:?%<:#else
+?H:?NXT_ARG:#define NXT_ARG ;
+?H:?DOTS:#define DOTS
+?H:?V_FUNC:#define V_FUNC(name, arglist, args)name arglist args;
+?H:?P_FUNC:#define P_FUNC(name, arglist, args)static name arglist args;
+?H:?V_FUNC_VOID:#define V_FUNC_VOID(name)name()
+?H:?P_FUNC_VOID:#define P_FUNC_VOID(name)static name()
+?H:?_:#define _(args) ()
+?H:?%<:#endif
+?H:.
+?W:%<:NXT_ARG DOTS V_FUNC P_FUNC V_FUNC_VOID P_FUNC_VOID _
+?LINT:set prototype
+: Cruising for prototypes
+echo " "
+echo "Checking out function prototypes..." >&4
+$cat >prototype.c <<'EOCP'
+int main(int argc, char *argv[]) { (void) argc; (void) argv; return 0; }
+EOCP
+if $cc $ccflags -c prototype.c; then
+ echo "Your C compiler appears to support function prototypes."
+ val="$define"
+else
+ echo "Your C compiler doesn't seem to understand function prototypes."
+ val="$undef"
+fi
+set prototype
+eval $setvar
+$rm -f prototype*
+
diff --git a/mcon/U/ptrsize.U b/mcon/U/ptrsize.U
new file mode 100644
index 0000000..ed77a4a
--- /dev/null
+++ b/mcon/U/ptrsize.U
@@ -0,0 +1,53 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, 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:ptrsize: Assert Myread cat rm_try +cc +ccflags echo n c
+?MAKE: -pick add $@ %<
+?S:ptrsize:
+?S: This variable contains the value of the PTRSIZE symbol, which
+?S: indicates to the C program how many bytes there are in a pointer.
+?S:.
+?C:PTRSIZE:
+?C: This symbol contains the size of a pointer, so that the C preprocessor
+?C: can make decisions based on it.
+?C:.
+?H:#define PTRSIZE $ptrsize
+?H:.
+?T:size
+: check for length of pointer
+echo " "
+$echo $n "Checking to see how big your pointers are...$c" >&4
+for size in 2 4 8 16 error; do
+ $cat >try.c <<EOCP
+#include "static_assert.h"
+char *foo;
+int main()
+{
+ STATIC_ASSERT($size == sizeof(foo));
+ return 0;
+}
+EOCP
+ if $cc -c $ccflags try.c >/dev/null 2>&1; then break; fi
+done
+case "$size" in
+error)
+ echo " cannot compute it." >&4
+ dflt=4
+ rp="What is the size of a pointer type (in bytes)?"
+ . ./myread
+ ptrsize="$ans"
+ ;;
+*)
+ echo " $size bytes." >&4
+ ptrsize=$size
+ ;;
+esac
+$rm_try
+
diff --git a/mcon/U/randbits.U b/mcon/U/randbits.U
new file mode 100644
index 0000000..b633b17
--- /dev/null
+++ b/mcon/U/randbits.U
@@ -0,0 +1,83 @@
+?RCS: $Id$
+?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: randbits.U,v $
+?RCS: Revision 3.0.1.1 1997/02/28 16:19:29 ram
+?RCS: patch61: added <unistd.h> and <stdlib.h> to the C program test
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:09:38 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: This unit has been somewhat made obsolete with creation of the
+?X: randfunc function (which finds out how to generate random
+?X: numbers between 0 and 1.
+?X:
+?MAKE:randbits: cat rm Myread cc i_unistd i_stdlib
+?MAKE: -pick add $@ %<
+?S:randbits:
+?S: This variable contains the eventual value of the RANDBITS symbol,
+?S: which indicates to the C program how many bits of random number
+?S: the rand() function produces.
+?S:.
+?C:RANDBITS:
+?C: This symbol contains the number of bits of random number the rand()
+?C: function produces. Usual values are 15, 16, and 31.
+?C:.
+?H:#define RANDBITS $randbits /**/
+?H:.
+: check for size of random number generator
+echo " "
+case "$randbits" in
+'')
+ echo "Checking to see how many bits your rand function produces..." >&4
+ $cat >try.c <<EOCP
+#$i_unistd I_UNISTD
+#$i_stdlib I_STDLIB
+#include <stdio.h>
+#ifdef I_UNISTD
+# include <unistd.h>
+#endif
+#ifdef I_STDLIB
+# include <stdlib.h>
+#endif
+EOCP
+ $cat >>try.c <<'EOCP'
+int main()
+{
+ register int i;
+ register unsigned long tmp;
+ register unsigned long max = 0L;
+
+ for (i = 1000; i; i--) {
+ tmp = (unsigned long)rand();
+ if (tmp > max) max = tmp;
+ }
+ for (i = 0; max; i++)
+ max /= 2;
+ printf("%d\n",i);
+}
+EOCP
+ if $cc -o try try.c >/dev/null 2>&1 ; then
+ dflt=`try`
+ else
+ dflt='?'
+ echo "(I can't seem to compile the test program...)"
+ fi
+ ;;
+*)
+ dflt="$randbits"
+ ;;
+esac
+rp='How many bits does your rand() function produce?'
+. ./myread
+randbits="$ans"
+$rm -f try.c try
+
diff --git a/mcon/U/randfunc.U b/mcon/U/randfunc.U
new file mode 100644
index 0000000..850e634
--- /dev/null
+++ b/mcon/U/randfunc.U
@@ -0,0 +1,164 @@
+?RCS: $Id$
+?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: randfunc.U,v $
+?RCS: Revision 3.0 1993/08/18 12:09:39 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: This is the new unit that should be used when random
+?X: functions are to be used. It thus makes randbits.U obsolete.
+?X:
+?MAKE:randfunc mrand seedfunc nrandbits: cat +cc rm test Myread Csym
+?MAKE: -pick add $@ %<
+?S:randfunc:
+?S: Indicates the name of the random number function to use.
+?S: Values include drand48, random, and rand. In C programs,
+?S: the 'nrand' macro is defined to generate uniformly distributed
+?S: random numbers over the range [0., 1.] (see mrand and nrand).
+?S:.
+?S:mrand:
+?S: Indicates the macro to be used to generate normalized
+?S: random numbers. Uses randfunc, often divided by
+?S: (double) ((1 << nrandbits) -1) in order to normalize the result.
+?S: In C programs, the macro 'nrand' is maped on mrand.
+?S:.
+?S:seedfunc:
+?S: Indicates the random number generating seed function.
+?S: Values include srand48, srandom, and srand.
+?S:.
+?S:nrandbits:
+?S: Indicates how many bits are produced by the function used to
+?S: generate normalized random numbers.
+?S:.
+?C:nrand:
+?C: This macro is to be used to generate uniformly distributed
+?C: random numbers over the range [0., 1.].
+?C:.
+?C:seednrand:
+?C: This symbol defines the macro to be used in seeding the
+?C: random number generator (see nrand).
+?C:.
+?H:#define nrand() $mrand /**/
+?H:#define seednrand(x) $seedfunc(x) /**/
+?H:.
+?T:cont val
+?LINT:nothere $nrandbits)
+: How can we generate normalized random numbers ?
+echo " "
+case "$randfunc" in
+'')
+ if set drand48 val -f; eval $csym; $val; then
+ dflt="drand48"
+ echo "Good, found drand48()." >&4
+ elif set random val -f; eval $csym; $val; then
+ dflt="random"
+ echo "OK, found random()." >&4
+ else
+ dflt="rand"
+ echo "Yick, looks like I have to use rand()." >&4
+ fi
+ echo " "
+ ;;
+*)
+ dflt="$randfunc"
+ ;;
+esac
+cont=true
+while $test "$cont"; do
+ rp="Use which function to generate random numbers?"
+ . ./myread
+?X: Invalidates nrandbits if the answer is not the default so
+?X: that the value stored in config.sh will not be used when
+?X: we change our random function.
+ if $test "$ans" = "$dflt"; then
+ : null
+ else
+ nrandbits=''
+ fi
+ randfunc="$ans"
+ if set $ans val -f; eval $csym; $val; then
+ cont=''
+ else
+ dflt=n
+ rp="Function $ans does not exists. Use that name anyway?"
+ . ./myread
+ dflt=rand
+ case "$ans" in
+ [yY]*) cont='';;
+ esac
+ fi
+ case "$cont" in
+ '')
+ case "$randfunc" in
+ drand48)
+ mrand="drand48()"
+ seedfunc="srand48"
+ ;;
+ rand*)
+ case "$nrandbits" in
+ '')
+echo "Checking to see how many bits your $randfunc() function produces..." >&4
+ $cat >try.c <<EOCP
+#include <stdio.h>
+int main()
+{
+ register int i;
+ register unsigned long tmp;
+ register unsigned long max = 0L;
+ extern long random();
+
+ for (i = 1000; i; i--) {
+ tmp = (unsigned long)$randfunc();
+ if (tmp > max) max = tmp;
+ }
+ for (i = 0; max; i++)
+ max /= 2;
+ printf("%d\n",i);
+}
+EOCP
+ if $cc -o try try.c >/dev/null 2>&1 ; then
+ dflt=`try`
+ else
+ dflt='?'
+ echo "(I can't seem to compile the test program...)"
+ fi
+ ;;
+ *)
+ dflt="$nrandbits"
+ ;;
+ esac
+ rp="How many bits does your $randfunc() function produce?"
+ . ./myread
+ nrandbits="$ans"
+ $rm -f try.c try
+ mrand="($randfunc() / (double) ((1 << $nrandbits) -1))"
+ seedfunc="srand"
+ ;;
+?X: The following is provided just in case...
+ *)
+ dflt="31"
+ rp="How many bits does your $randfunc() function produce?"
+ . ./myread
+ nrandbits="$ans"
+ seedfunc="s$randfunc"
+ mrand="($randfunc() / (double) ((1 << $nrandbits) -1))"
+ if set $seedfunc val -f; eval $csym; $val; then
+ echo "(Using $seedfunc() to seed random generator)"
+ else
+ echo "(Warning: no $seedfunc() to seed random generator)"
+ seedfunc=rand
+ fi
+ ;;
+ esac
+ ;;
+ esac
+done
+
diff --git a/mcon/U/rcs_branch.U b/mcon/U/rcs_branch.U
new file mode 100644
index 0000000..5898140
--- /dev/null
+++ b/mcon/U/rcs_branch.U
@@ -0,0 +1,43 @@
+?RCS: $Id$
+?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: rcs_branch.U,v $
+?RCS: Revision 3.0 1993/08/18 12:09:40 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:rcs_branch: Myread contains Loc
+?MAKE: -pick add $@ %<
+?S:rcs_branch:
+?S: This variable will hold "true" if rcs can take the -b<revision>
+?S: option, which can make Life Easier on those folks who like to run
+?S: rcsdiff manually.
+?S:.
+?T:xxx
+: Tra la la la la
+echo " "
+echo "Checking to see if RCS understands the -b switch..." >&4
+xxx=`./loc rcs '' $pth`
+case "$xxx" in
+'')
+ rcs_branch=false
+ echo "Oh. You don't seem to have RCS here."
+ ;;
+*)
+ rcs > rcsbranch.out 2>&1
+ if $contains 'b\[rev\]' rcsbranch.out >/dev/null 2>&1 ; then
+ rcs_branch=true
+ echo "Nice! Your RCS is spiffy!"
+ else
+ rcs_branch=false
+ echo "Well, at least you have RCS. You know, a newer version is available."
+ fi
+ ;;
+esac
+
diff --git a/mcon/U/registers.U b/mcon/U/registers.U
new file mode 100644
index 0000000..f61f290
--- /dev/null
+++ b/mcon/U/registers.U
@@ -0,0 +1,103 @@
+?RCS: $Id$
+?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: registers.U,v $
+?RCS: Revision 3.0.1.2 1997/02/28 16:19:41 ram
+?RCS: patch61: removed empty ?LINT lines
+?RCS:
+?RCS: Revision 3.0.1.1 1994/10/29 16:28:33 ram
+?RCS: patch36: call ./Cppsym explicitly instead of relying on PATH
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:09:41 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:registers reg1 reg2 reg3 reg4 reg5 reg6 reg7 reg8 reg9 reg10 reg11 \
+ reg12 reg13 reg14 reg15 reg16: awk rm Cppsym Myread Oldconfig
+?MAKE: -pick add $@ %<
+?S:registers:
+?S: This variable contains the number of register declarations paid
+?S: attention to by the C compiler.
+?S:.
+?S:reg1:
+?S: This variable, along with reg2, reg3, etc. contains the eventual
+?S: value for the symbols register1, register2, register3, etc. It has
+?S: either the value "register" or is null.
+?S:.
+?C:register1:
+?C: This symbol, along with register2, register3, etc. is either the word
+?C: "register" or null, depending on whether the C compiler pays attention
+?C: to this many register declarations. The intent is that you don't have
+?C: to order your register declarations in the order of importance, so you
+?C: can freely declare register variables in sub-blocks of code and as
+?C: function parameters. Do not use register<n> more than once per routine.
+?C:.
+?LINT:describe reg2 reg3 reg4 reg5 reg6 reg7 reg8 reg9 reg10 reg11
+?LINT:describe reg12 reg13 reg14 reg15 reg16
+?LINT:known register2 register3 register4 register5 register6 register7
+?LINT:known register8 register9 register10 register11 register12 register13
+?LINT:known register14 register15 register16
+?H:#define register1 $reg1 /**/
+?H:#define register2 $reg2 /**/
+?H:#define register3 $reg3 /**/
+?H:#define register4 $reg4 /**/
+?H:#define register5 $reg5 /**/
+?H:#define register6 $reg6 /**/
+?H:#define register7 $reg7 /**/
+?H:#define register8 $reg8 /**/
+?H:#define register9 $reg9 /**/
+?H:#define register10 $reg10 /**/
+?H:#define register11 $reg11 /**/
+?H:#define register12 $reg12 /**/
+?H:#define register13 $reg13 /**/
+?H:#define register14 $reg14 /**/
+?H:#define register15 $reg15 /**/
+?H:#define register16 $reg16 /**/
+?H:.
+?F:!.foo
+: see how many register declarations we want to use
+case "$registers" in
+'')
+ if ./Cppsym vax; then
+ dflt=6
+ elif ./Cppsym sun mc68000 mips; then
+ dflt=10
+ elif ./Cppsym pyr; then
+ dflt=14
+ elif ./Cppsym ns32000 ns16000; then
+ dflt=5
+ elif ./Cppsym $smallmach; then
+ dflt=3
+ else
+ : if you have any other numbers for me, please send them in
+ dflt=6
+ fi;;
+*) dflt=$registers ;;
+esac
+?LINT:set reg2 reg3 reg4 reg5 reg6 reg7 reg8 reg9 reg10 reg11
+?LINT:set reg12 reg13 reg14 reg15 reg16
+cat <<EOM
+
+Different C compilers on different machines pay attention to different numbers
+of register declarations. About how many register declarations in each routine
+does your C compiler pay attention to? (OK to guess)
+
+EOM
+rp="Maximum register declarations?"
+. ./myread
+registers=$ans
+reg1=''
+$awk "BEGIN { for (i=1; i<=16; i++) printf \"reg%d=''\n\", i}" \
+ </dev/null >.foo
+. ./.foo
+$awk "BEGIN { for (i=1; i<=$registers; i++) printf \"reg%d=register\n\", i}" \
+ </dev/null >.foo
+. ./.foo
+$rm -f .foo
+
diff --git a/mcon/U/rootid.U b/mcon/U/rootid.U
new file mode 100644
index 0000000..ec0b196
--- /dev/null
+++ b/mcon/U/rootid.U
@@ -0,0 +1,35 @@
+?RCS: $Id$
+?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: rootid.U,v $
+?RCS: Revision 3.0.1.1 1995/01/30 14:45:36 ram
+?RCS: patch49: now only prints a single empty line when outputting something
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:09:42 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:rootid: sed
+?MAKE: -pick add $@ %<
+?S:rootid:
+?S: This variable contains the eventual value of the ROOTID symbol,
+?S: which is the uid of root.
+?S:.
+?C:ROOTID:
+?C: This symbol contains the uid of root, normally 0.
+?C:.
+?H:#define ROOTID $rootid /**/
+?H:.
+: determine root id
+rootid=`$sed -e "/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*"'$'"/\1/" -e "q" -e "}" -e "d" </etc/passwd`
+case "$rootid" in
+'') rootid=0 ;;
+*) echo " "; echo "Root uid = $rootid" >&4 ;;
+esac
+
diff --git a/mcon/U/sbrksmart.U b/mcon/U/sbrksmart.U
new file mode 100644
index 0000000..c07e9b2
--- /dev/null
+++ b/mcon/U/sbrksmart.U
@@ -0,0 +1,85 @@
+?RCS: $Id$
+?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: sbrksmart.U,v $
+?RCS: Revision 3.0.1.2 1995/01/11 15:35:41 ram
+?RCS: patch45: now sets sbrksmart to undef explicitly when lacking sbrk()
+?RCS: patch45: forgot a cast when using return value from sbrk()
+?RCS:
+?RCS: Revision 3.0.1.1 1994/01/24 14:16:45 ram
+?RCS: patch16: created
+?RCS:
+?MAKE:sbrksmart: cat d_sbrk +cc +ccflags +libs rm
+?MAKE: -pick add $@ %<
+?S:sbrksmart:
+?S: This variable conditionally defines HAS_SMART_SBRK if the sbrk()
+?S: routine honors a negative argument to lower the break value.
+?S:.
+?C:HAS_SMART_SBRK:
+?C: This symbol is defined when the sbrk() system call may be used with
+?C: a negative argument to lower the break value, therefore releasing
+?C: core to the system. If not, you'd probably be better off using the
+?C: mmap() system call.
+?C:.
+?H:#$sbrksmart HAS_SMART_SBRK /**/
+?H:.
+?T:dumb
+?F:!sbrk
+: see whether sbrk can release core to the kernel
+echo " "
+case "$d_sbrk" in
+"$define")
+ echo "Let's see if your sbrk() is smart enough to release core..." >&4
+ $cat > sbrk.c <<EOC
+#define INC 256 /* Small enough to be less than a page size */
+
+int main()
+{
+ char *obrk = (char *) sbrk(0);
+ char *nbrk;
+
+ nbrk = (char *) sbrk(INC);
+ if (nbrk == (char *) -1)
+ exit(1); /* Not enough memory */
+ if (nbrk != obrk)
+ exit(2); /* Unreliable sbrk() */
+ nbrk = (char *) sbrk(-INC);
+ if (nbrk == (char *) -1)
+ exit(3); /* May have understood negative arg as huge positive */
+ if (obrk != (char *) sbrk(0))
+ exit(4); /* Not smart, definitely */
+
+ exit(0); /* Ok */
+}
+EOC
+ sbrksmart="$undef"
+ dumb='-- assuming dumb sbrk().'
+ if $cc $ccflags -o sbrk sbrk.c $libs >/dev/null 2>&1; then
+ ./sbrk >/dev/null 2>&1
+ case $? in
+ 0) sbrksmart="$define"
+ echo "Yes, it can be used with negative values." ;;
+ 1) echo "Sorry, not enough memory $dumb" ;;
+ 2) echo "No it's not, and besides it seems to be buggy..." ;;
+ 3) echo "No, it fails with negative values." ;;
+ 4) echo "Nope, your sbrk() is too dumb." ;;
+ *) echo "Err... Unexpected result $dumb" ;;
+ esac
+ else
+ echo "(Could not compile test program $dumb)"
+ fi
+ ;;
+*)
+ echo "Since you don't have sbrk(), let's forget about the smart test!"
+ sbrksmart="$undef"
+ ;;
+esac
+$rm -f sbrk sbrk.* core
+
diff --git a/mcon/U/sbrktype.U b/mcon/U/sbrktype.U
new file mode 100644
index 0000000..bb4bcc3
--- /dev/null
+++ b/mcon/U/sbrktype.U
@@ -0,0 +1,44 @@
+?RCS: $Id$
+?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: sbrktype.U,v $
+?RCS: Revision 3.0 1993/08/18 12:09:43 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:sbrktype: Myread Oldconfig Loc contains Findhdr
+?MAKE: -pick add $@ %<
+?S:sbrktype:
+?S: This variable defines sbrktype to be something like caddr_t, char *,
+?S: or whatever type is used to declare sbrk() in the kernel.
+?S:.
+?C:Caddr_t (SBRKTYPE):
+?C: This symbol holds the type of a core address. It is inteded to be used
+?C: to safely declare the return type of system calls like sbrk(). It might
+?C: be necessary to include <sys/types.h> as well.
+?C:.
+?H:#define Caddr_t $sbrktype /* <core address> type */
+?H:.
+: see what type sbrk is declared as in the kernel
+case "$sbrktype" in
+'')
+ if $contains 'caddr_t;' `./findhdr sys/types.h` >/dev/null 2>&1 ; then
+ dflt='caddr_t';
+ else
+ dflt='char *';
+ fi
+ ;;
+*) dflt="$sbrktype"
+ ;;
+esac
+echo " "
+rp="What is the return type of sbrk() on this system?"
+. ./myread
+sbrktype="$ans"
+
diff --git a/mcon/U/scriptdir.U b/mcon/U/scriptdir.U
new file mode 100644
index 0000000..c4d10ea
--- /dev/null
+++ b/mcon/U/scriptdir.U
@@ -0,0 +1,110 @@
+?RCS: $Id$
+?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: scriptdir.U,v $
+?RCS: Revision 3.0.1.3 1995/09/25 09:17:15 ram
+?RCS: patch59: unit is now forced to the top of Configure, if possible
+?RCS:
+?RCS: Revision 3.0.1.2 1995/01/30 14:46:13 ram
+?RCS: patch49: can now handle installation prefix changes (from WED)
+?RCS:
+?RCS: Revision 3.0.1.1 1994/08/29 16:32:04 ram
+?RCS: patch32: now uses installation prefix
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:09:45 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:scriptdir scriptdirexp installscript: afs cat test Getfile Loc \
+ Oldconfig +bin Prefixit prefixexp Prefixup
+?MAKE: -pick add $@ %<
+?Y:TOP
+?S:scriptdir:
+?S: This variable holds the name of the directory in which the user wants
+?S: to put publicly scripts for the package in question. It is either
+?S: the same directory as for binaries, or a special one that can be
+?S: mounted across different architectures, like /usr/share. Programs
+?S: must be prepared to deal with ~name expansion.
+?S:.
+?S:scriptdirexp:
+?S: This variable is the same as scriptdir, but is filename expanded
+?S: at configuration time, for programs not wanting to bother with it.
+?S:.
+?S:installscript:
+?S: This variable is usually the same as scriptdirexp, unless you are on
+?S: a system running AFS, in which case they may differ slightly. You
+?S: should always use this variable within your makefiles for portability.
+?S:.
+?C:SCRIPTDIR:
+?C: This symbol holds the name of the directory in which the user wants
+?C: to put publicly executable scripts for the package in question. It
+?C: is often a directory that is mounted across diverse architectures.
+?C: Programs must be prepared to deal with ~name expansion.
+?C:.
+?C:SCRIPTDIR_EXP:
+?C: This is the same as SCRIPTDIR, but is filename expanded at
+?C: configuration time, for use in programs not prepared to do
+?C: ~name substitutions at run-time.
+?C:.
+?H:#define SCRIPTDIR "$scriptdir" /**/
+?H:#define SCRIPTDIR_EXP "$scriptdirexp" /**/
+?H:.
+: determine where public executable scripts go
+set scriptdir scriptdir
+eval $prefixit
+case "$scriptdir" in
+'')
+ dflt="$bin"
+ : guess some guesses
+ $test -d /usr/share/scripts && dflt=/usr/share/scripts
+ $test -d /usr/share/bin && dflt=/usr/share/bin
+ $test -d /usr/local/script && dflt=/usr/local/script
+ $test -d $prefixexp/script && dflt=$prefixexp/script
+ set dflt
+ eval $prefixup
+ ;;
+*) dflt="$scriptdir"
+ ;;
+esac
+$cat <<EOM
+
+Some installations have a separate directory just for executable scripts so
+that they can mount it across multiple architectures but keep the scripts in
+one spot. You might, for example, have a subdirectory of /usr/share for this.
+Or you might just lump your scripts in with all your other executables.
+
+EOM
+fn=d~
+rp='Where do you keep publicly executable scripts?'
+. ./getfile
+if $test "X$ansexp" != "X$scriptdirexp"; then
+ installscript=''
+fi
+scriptdir="$ans"
+scriptdirexp="$ansexp"
+if $afs; then
+ $cat <<EOM
+
+Since you are running AFS, I need to distinguish the directory in which
+scripts reside from the directory in which they are installed (and from
+which they are presumably copied to the former directory by occult means).
+
+EOM
+ case "$installscript" in
+ '') dflt=`echo $scriptdirexp | sed 's#^/afs/#/afs/.#'`;;
+ *) dflt="$installscript";;
+ esac
+ fn=de~
+ rp='Where will public scripts be installed?'
+ . ./getfile
+ installscript="$ans"
+else
+ installscript="$scriptdirexp"
+fi
+
diff --git a/mcon/U/selecttype.U b/mcon/U/selecttype.U
new file mode 100644
index 0000000..bdd5d1c
--- /dev/null
+++ b/mcon/U/selecttype.U
@@ -0,0 +1,116 @@
+?RCS: $Id$
+?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: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
+?RCS:
+?RCS: $Log: selecttype.U,v $
+?RCS: Revision 3.0.1.3 1997/02/28 16:20:09 ram
+?RCS: patch61: always include <sys/select.h> when available for test
+?RCS:
+?RCS: Revision 3.0.1.2 1995/07/25 14:14:06 ram
+?RCS: patch56: removed harmful spaces in assignment
+?RCS:
+?RCS: Revision 3.0.1.1 1994/06/20 07:06:31 ram
+?RCS: patch30: created by ADO
+?RCS:
+?MAKE:selecttype: cat +cc +ccflags rm Oldconfig Myread \
+ d_fd_set d_select d_socket i_systime i_sysselct i_winsock2 i_syssock
+?MAKE: -pick add $@ %<
+?S:selecttype:
+?S: This variable holds the type used for the 2nd, 3rd, and 4th
+?S: arguments to select. Usually, this is 'fd_set *', if HAS_FD_SET
+?S: is defined, and 'int *' otherwise. This is only useful if you
+?S: have select(), naturally.
+?S:.
+?C:Select_fd_set_t:
+?C: This symbol holds the type used for the 2nd, 3rd, and 4th
+?C: arguments to select. Usually, this is 'fd_set *', if HAS_FD_SET
+?C: is defined, and 'int *' otherwise. This is only useful if you
+?C: have select(), of course.
+?C:.
+?H:#define Select_fd_set_t $selecttype /**/
+?H:.
+?T:xxx yyy
+: check for type of arguments to select. This will only really
+: work if the system supports prototypes and provides one for
+: select.
+case "$d_select" in
+$define)
+ : Make initial guess
+ case "$selecttype" in
+ ''|' ')
+ case "$d_fd_set" in
+ $define) xxx='fd_set *' ;;
+ *) xxx='int *' ;;
+ esac
+ ;;
+ *) xxx="$selecttype"
+ ;;
+ esac
+ : backup guess
+ case "$xxx" in
+ 'fd_set *') yyy='int *' ;;
+ 'int *') yyy='fd_set *' ;;
+ esac
+
+ $cat <<EOM
+
+Checking to see what type of arguments are expected by select().
+EOM
+ $cat >try.c <<EOCP
+#$i_systime I_SYS_TIME
+#$i_sysselct I_SYS_SELECT
+#$i_syssock I_SYS_SOCKET
+#$i_winsock2 I_WINSOCK2
+#$d_socket HAS_SOCKET
+#include <sys/types.h>
+#ifdef HAS_SOCKET
+#ifdef I_SYS_SOCKET
+#include <sys/socket.h> /* Might include <sys/bsdtypes.h> */
+#endif
+#endif
+#ifdef I_SYS_TIME
+#include <sys/time.h>
+#endif
+#ifdef I_SYS_SELECT
+#include <sys/select.h>
+#endif
+#ifdef I_WINSOCK2
+#include <Winsock2.h>
+#endif
+int main()
+{
+ int width;
+ Select_fd_set_t readfds;
+ Select_fd_set_t writefds;
+ Select_fd_set_t exceptfds;
+ struct timeval timeout;
+ select(width, readfds, writefds, exceptfds, &timeout);
+ exit(0);
+}
+EOCP
+ if $cc $ccflags -c -DSelect_fd_set_t="$xxx" try.c >/dev/null 2>&1 ; then
+ selecttype="$xxx"
+ echo "Your system uses $xxx for the arguments to select." >&4
+ elif $cc $ccflags -c -DSelect_fd_set_t="$yyy" try.c >/dev/null 2>&1 ; then
+ selecttype="$yyy"
+ echo "Your system uses $yyy for the arguments to select." >&4
+ else
+ rp='What is the type for the 2nd, 3rd, and 4th arguments to select?'
+ dflt="$xxx"
+ . ./myread
+ selecttype="$ans"
+ fi
+ $rm -f try.[co]
+ ;;
+*) selecttype='int *'
+ ;;
+esac
+
diff --git a/mcon/U/sh.U b/mcon/U/sh.U
new file mode 100644
index 0000000..fafe5b1
--- /dev/null
+++ b/mcon/U/sh.U
@@ -0,0 +1,92 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1997, Chip Salzenberg
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the 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: sh.U,v $
+?RCS: Revision 3.0.1.1 1997/02/28 16:20:13 ram
+?RCS: patch61: created
+?RCS:
+?MAKE:sh: Head
+?MAKE: -pick wipe $@ %<
+?S:sh:
+?S: This variable contains the full pathname of the shell used
+?S: on this system to execute Bourne shell scripts. Usually, this will be
+?S: /bin/sh, though it's possible that some systems will have /bin/ksh,
+?S: /bin/pdksh, /bin/ash, /bin/bash, or even something such as
+?S: D:/bin/sh.exe.
+?S: This unit comes before Options.U, so you can't set sh with a -D
+?S: option, though you can override this (and startsh)
+?S: with -O -Dsh=/bin/whatever -Dstartsh=whatever
+?S:.
+?C:SH_PATH:
+?C: This symbol contains the full pathname to the shell used on this
+?C: on this system to execute Bourne shell scripts. Usually, this will be
+?C: /bin/sh, though it's possible that some systems will have /bin/ksh,
+?C: /bin/pdksh, /bin/ash, /bin/bash, or even something such as
+?C: D:/bin/sh.exe.
+?C:.
+?H:#define SH_PATH "$sh" /**/
+?H:.
+?T:xxx try pth p SYSTYPE
+?LINT:extern maintloc maintname
+?X:
+?X: Be quiet unless something unusual happens because this gets
+?X: loaded up even before options are processed.
+?X: Can't use ./loc because that depends on startsh, which, in turn
+?X: depends on this unit.
+?X:
+: Find the basic shell for Bourne shell scripts
+case "$sh" in
+'')
+?X: SYSTYPE is for some older MIPS systems.
+?X: I do not know if it is still needed.
+ case "$SYSTYPE" in
+ *bsd*|sys5*) xxx="/$SYSTYPE/bin/sh";;
+ *) xxx='/bin/sh';;
+ esac
+ if test -f "$xxx"; then
+ sh="$xxx"
+ else
+ : Build up a list and do a single loop so we can 'break' out.
+ pth=`echo $PATH | sed -e "s/$p_/ /g"`
+ for xxx in sh bash ksh pdksh ash; do
+ for p in $pth; do
+ try="$try ${p}/${xxx}"
+ done
+ done
+ for xxx in $try; do
+ if test -f "$xxx"; then
+ sh="$xxx"
+ break
+ elif test -f "$xxx$_exe"; then
+ sh="$xxx$_exe"
+ break
+ elif test -f "$xxx.exe"; then
+ sh="$xxx.exe"
+ break
+ fi
+ done
+ fi
+ ;;
+esac
+
+?X: fd 4 isn't open yet...
+case "$sh" in
+'') cat >&2 <<EOM
+$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 (<$maintname>) at <$maintloc> and
+we'll try to straighten this all out.
+EOM
+ exit 1
+ ;;
+esac
+
diff --git a/mcon/U/shm_for.U b/mcon/U/shm_for.U
new file mode 100644
index 0000000..3f1c7ce
--- /dev/null
+++ b/mcon/U/shm_for.U
@@ -0,0 +1,118 @@
+?RCS: $Id$
+?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: shm_for.U,v $
+?RCS: Revision 3.0.1.1 1994/10/29 16:28:37 ram
+?RCS: patch36: call ./Cppsym explicitly instead of relying on PATH
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:09:46 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:shm_for shm_att shm_lim: Cppsym Myread ipc uname
+?MAKE: -pick add $@ %<
+?S:shm_for:
+?S: This variable tells us the type of machine we're expecting the
+?S: shared memory code to run on. The value is available to C programs
+?S: in the C_SHM_FOR manifest.
+?S:.
+?S:shm_att:
+?S: This variable tells us where a shared memory segment should be
+?S: attached. Good values are HIGH, LOW, and ZERO.
+?S:.
+?S:shm_lim:
+?S: This variable tells us if shared memory attached HIGH should
+?S: have an upper limit.
+?S:.
+?X: ----------------------------------------------------------
+?X: It's a potential lose to define anything beginning with SHM...
+?X: At least we can think that S_ stands for "String version of ..." -- HMS
+?X: ----------------------------------------------------------
+?C:S_SHM_FOR ~ %<:
+?C: This symbol identifies what we chose for the target system's
+?C: default shared memory configuration parameters.
+?C:.
+?C:S_SHM_ATT ~ %<:
+?C: This symbol holds the default "place" to attach shared memory.
+?C: Values are "HIGH", "ZERO", and "LOW".
+?C:.
+?C:S_SHM_LIM ~ %<:
+?C: This symbol holds the default upper bound address limit if shared
+?C: memory is attached HIGH. If zero, there is no upper limit.
+?C:.
+?H:?%<:#ifdef SERVE_SHM
+?H:?%<:#define S_SHM_FOR "$shm_for"
+?H:?%<:#define S_SHM_ATT "$shm_att"
+?H:?%<:#define S_SHM_LIM "$shm_lim"
+?H:?%<:#endif
+?H:.
+?W:%<:S_SHM_FOR S_SHM_ATT S_SHM_LIM
+: see how to attach shared memory
+echo " "
+echo "Deciding how to attach shared memory..." >&4
+
+case "$ipc" in
+shm)
+ shm_for='Default case'
+ shm_att='HIGH'
+ shm_lim='0x0'
+ if ./Cppsym tower32 tower32_600; then
+ echo "NCR Towers are usually normal..."
+ : echo "Oh, an NCR Tower."
+ : This works for the 600
+ shm_for='NCR Tower 32'
+ shm_att='LOW'
+ else
+ case "$uname" in
+ */uname)
+ case "`uname -m`" in
+ ACS??68*)
+ echo "Oh, an Altos 3068."
+ shm_for='Altos 3068:'
+ shm_lim='0x800000'
+ ;;
+ esac
+ ;;
+ *)
+ echo "Looks normal to me..."
+ ;;
+ esac
+ fi
+
+ dflt="$shm_for"
+ rp='Description of shared memory configuration?'
+ . ./myread
+ shm_for="$ans"
+
+ dflt="$shm_att"
+ rp='Where should shared memory be attached?'
+ . ./myread
+ shm_att="$ans"
+
+ case "$shm_att" in
+ HIGH)
+ dflt="$shm_lim"
+ rp='What is the upper address limit for shared memory?'
+ . ./myread
+ shm_lim="$ans"
+ ;;
+ *)
+ shm_lim=''
+ ;;
+ esac
+ ;;
+
+*)
+ echo "but you aren't using shared memory so I won't bother." >&4
+ shm_for='NOT CONFIGURED'
+ shm_att='NONE'
+ shm_lim='-1'
+ ;;
+esac
+
diff --git a/mcon/U/sig_name.U b/mcon/U/sig_name.U
new file mode 100644
index 0000000..ff61f82
--- /dev/null
+++ b/mcon/U/sig_name.U
@@ -0,0 +1,157 @@
+?RCS: $Id$
+?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: sig_name.U,v $
+?RCS: Revision 3.0.1.5 1997/02/28 16:21:25 ram
+?RCS: patch61: brand new algorithm for sig_name and (new!) sig_num
+?RCS:
+?RCS: Revision 3.0.1.4 1995/07/25 14:14:54 ram
+?RCS: patch56: added <asm/signal.h> lookup for linux
+?RCS:
+?RCS: Revision 3.0.1.3 1995/05/12 12:24:11 ram
+?RCS: patch54: now looks for <linux/signal.h> too (ADO)
+?RCS:
+?RCS: Revision 3.0.1.2 1994/06/20 07:06:57 ram
+?RCS: patch30: final echo was missing to close awk-printed string
+?RCS:
+?RCS: Revision 3.0.1.1 1994/05/06 15:17:55 ram
+?RCS: patch23: signal list now formatted to avoid scroll-ups (ADO)
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:09:47 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:sig_name sig_name_init sig_num sig_num_init sig_count sig_size: \
+ awk Signal Oldconfig rm
+?MAKE: -pick add $@ %<
+?S:sig_name:
+?S: This variable holds the signal names, space separated. The leading
+?S: SIG in signal name is removed. A ZERO is prepended to the
+?S: list. This is currently not used.
+?S:.
+?S:sig_name_init:
+?S: This variable holds the signal names, enclosed in double quotes and
+?S: separated by commas, suitable for use in the SIG_NAME definition
+?S: below. A "ZERO" is prepended to the list, and the list is
+?S: terminated with a plain 0. The leading SIG in signal names
+?S: is removed. See sig_num.
+?S:.
+?S:sig_num:
+?S: This variable holds the signal numbers, space separated. A ZERO is
+?S: prepended to the list (corresponding to the fake SIGZERO), and
+?S: the list is terminated with a 0. Those numbers correspond to
+?S: the value of the signal listed in the same place within the
+?S: sig_name list.
+?S:.
+?S:sig_num_init:
+?S: This variable holds the signal numbers, enclosed in double quotes and
+?S: separated by commas, suitable for use in the SIG_NUM definition
+?S: below. A "ZERO" is prepended to the list, and the list is
+?S: terminated with a plain 0.
+?S:.
+?S:sig_count (sig_name.U):
+?S: This variable holds a number larger than the largest valid
+?S: signal number. This is usually the same as the NSIG macro.
+?S:.
+?S:sig_size:
+?S: This variable contains the number of elements of the sig_name
+?S: and sig_num arrays, excluding the final NULL entry.
+?S:.
+?C:SIG_NAME:
+?C: This symbol contains a list of signal names in order of
+?C: signal number. This is intended
+?C: to be used as a static array initialization, like this:
+?C: char *sig_name[] = { SIG_NAME };
+?C: The signals in the list are separated with commas, and each signal
+?C: is surrounded by double quotes. There is no leading SIG in the signal
+?C: name, i.e. SIGQUIT is known as "QUIT".
+?C: Gaps in the signal numbers (up to NSIG) are filled in with NUMnn,
+?C: etc., where nn is the actual signal number (e.g. NUM37).
+?C: The signal number for sig_name[i] is stored in sig_num[i].
+?C: The last element is 0 to terminate the list with a NULL. This
+?C: corresponds to the 0 at the end of the sig_num list.
+?C:.
+?C:SIG_NUM:
+?C: This symbol contains a list of signal numbers, in the same order as the
+?C: SIG_NAME list. It is suitable for static array initialization, as in:
+?C: int sig_num[] = { SIG_NUM };
+?C: The signals in the list are separated with commas, and the indices
+?C: within that list and the SIG_NAME list match, so it's easy to compute
+?C: the signal name from a number or vice versa at the price of a small
+?C: dynamic linear lookup.
+?C: Duplicates are allowed, but are moved to the end of the list.
+?C: The signal number corresponding to sig_name[i] is sig_number[i].
+?C: if (i < NSIG) then sig_number[i] == i.
+?C: The last element is 0, corresponding to the 0 at the end of
+?C: the sig_name list.
+?C:.
+?C:SIG_COUNT:
+?C: This variable contains a number larger than the largest
+?C: signal number. This is usually the same as the NSIG macro.
+?C:.
+?C:SIG_SIZE:
+?C: This variable contains the number of elements of the sig_name
+?C: and sig_num arrays, excluding the final NULL entry.
+?C:.
+?H:#define SIG_NAME $sig_name_init /**/
+?H:#define SIG_NUM $sig_num_init /**/
+?H:#define SIG_COUNT $sig_count /**/
+?H:#define SIG_SIZE $sig_size /**/
+?H:.
+?T:i doinit
+?F:!= !signal_cmd
+?X: signal.cmd creates a file signal.lst which has two columns:
+?X: NAME number, e.g.
+?X: HUP 1
+?X: The list is sorted on signal number, with duplicates moved to
+?X: the end..
+: generate list of signal names
+echo " "
+case "$sig_name_init" in
+'') doinit=yes ;;
+*) case "$sig_num_init" in
+ ''|*,*) doinit=yes ;;
+ esac ;;
+esac
+case "$doinit" in
+yes)
+ echo "Generating a list of signal names and numbers..." >&4
+ . ./signal_cmd
+ sig_count=`$awk '/^NSIG/ { printf "%d", $2 }' signal.lst`
+ sig_name=`$awk 'BEGIN { printf "ZERO " }
+ !/^NSIG/ { printf "%s ", $1 }' signal.lst`
+ sig_num=`$awk 'BEGIN { printf "0 " }
+ !/^NSIG/ { printf "%d ", $2 }' signal.lst`
+ sig_name_init=`$awk 'BEGIN { printf "\"ZERO\", " }
+ !/^NSIG/ { printf "\"%s\", ", $1 }
+ END { printf "0\n" }' signal.lst`
+ sig_num_init=`$awk 'BEGIN { printf "0, " }
+ !/^NSIG/ { printf "%d, ", $2}
+ END { printf "0\n"}' signal.lst`
+ ;;
+esac
+echo "The following $sig_count signals are available:"
+echo " "
+echo $sig_name | $awk \
+'BEGIN { linelen = 0 }
+{
+ for (i = 1; i <= NF; i++) {
+ name = "SIG" $i " "
+ linelen = linelen + length(name)
+ if (linelen > 70) {
+ printf "\n"
+ linelen = length(name)
+ }
+ printf "%s", name
+ }
+ printf "\n"
+}'
+sig_size=`echo $sig_name | awk '{print NF}'`
+$rm -f signal signal.c signal.awk signal.lst signal_cmd
+
diff --git a/mcon/U/sitearch.U b/mcon/U/sitearch.U
new file mode 100644
index 0000000..f2618a1
--- /dev/null
+++ b/mcon/U/sitearch.U
@@ -0,0 +1,94 @@
+?RCS: $Id$
+?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 License,
+?RCS: as specified in the 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: sitearch.U,v $
+?RCS: Revision 3.0.1.1 1997/02/28 16:21:30 ram
+?RCS: patch61: created
+?RCS:
+?MAKE:sitearch sitearchexp installsitearch: afs cat Getfile \
+ Oldconfig Prefixit prefix test archname sitelib
+?MAKE: -pick add $@ %<
+?Y:TOP
+?S:sitearch:
+?S: This variable contains the eventual value of the SITEARCH symbol,
+?S: which is the name of the private library for this package. It may
+?S: have a ~ on the front. It is up to the makefile to eventually create
+?S: this directory while performing installation (with ~ substitution).
+?S:.
+?S:sitearchexp:
+?S: This variable is the ~name expanded version of sitearch, so that you
+?S: may use it directly in Makefiles or shell scripts.
+?S:.
+?S:installsitearch:
+?S: This variable is really the same as sitearchexp but may differ on
+?S: those systems using AFS. For extra portability, only this variable
+?S: should be used in makefiles.
+?S:.
+?C:SITEARCH:
+?C: This symbol contains the name of the private library for this package.
+?C: The library is private in the sense that it needn't be in anyone's
+?C: execution path, but it should be accessible by the world. The program
+?C: should be prepared to do ~ expansion.
+?C: The standard distribution will put nothing in this directory.
+?C: Individual sites may place their own extensions and modules in
+?C: this directory.
+?C:.
+?C:SITEARCH_EXP:
+?C: This symbol contains the ~name expanded version of SITEARCH, to be used
+?C: in programs that are not prepared to deal with ~ expansion at run-time.
+?C:.
+?H:#define SITEARCH "$sitearch" /**/
+?H:#define SITEARCH_EXP "$sitearchexp" /**/
+?H:.
+?T:xxx
+: determine where site specific architecture-dependent libraries go.
+xxx=`echo $sitelib/$archname | sed 's!^$prefix!!'`
+: xxx is usually lib/site_perl/archname.
+set sitearch sitearch none
+eval $prefixit
+case "$sitearch" in
+'') dflt="$sitelib/$archname" ;;
+*) dflt="$sitearch" ;;
+esac
+$cat <<EOM
+
+The installation process will also create a directory for
+architecture-dependent site-specific extensions and modules.
+
+EOM
+fn=nd~+
+rp='Pathname for the site-specific architecture-dependent library files?'
+. ./getfile
+if $test "X$sitearchexp" != "X$ansexp"; then
+ installsitearch=''
+fi
+sitearch="$ans"
+sitearchexp="$ansexp"
+if $afs; then
+ $cat <<EOM
+
+Since you are running AFS, I need to distinguish the directory in which
+private files reside from the directory in which they are installed (and from
+which they are presumably copied to the former directory by occult means).
+
+EOM
+ case "$installsitearch" in
+ '') dflt=`echo $sitearchexp | sed 's#^/afs/#/afs/.#'`;;
+ *) dflt="$installsitearch";;
+ esac
+ fn=de~
+ rp='Where will private files be installed?'
+ . ./getfile
+ installsitearch="$ans"
+else
+ installsitearch="$sitearchexp"
+fi
+
diff --git a/mcon/U/sitelib.U b/mcon/U/sitelib.U
new file mode 100644
index 0000000..898b181
--- /dev/null
+++ b/mcon/U/sitelib.U
@@ -0,0 +1,97 @@
+?RCS: $Id$
+?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 License,
+?RCS: as specified in the 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: sitelib.U,v $
+?RCS: Revision 3.0.1.1 1997/02/28 16:21:35 ram
+?RCS: patch61: created
+?RCS:
+?MAKE:sitelib sitelibexp installsitelib: afs cat Getfile \
+ Oldconfig Prefixit test privlib package sed
+?MAKE: -pick add $@ %<
+?Y:TOP
+?S:sitelib:
+?S: This variable contains the eventual value of the SITELIB symbol,
+?S: which is the name of the private library for this package. It may
+?S: have a ~ on the front. It is up to the makefile to eventually create
+?S: this directory while performing installation (with ~ substitution).
+?S:.
+?S:sitelibexp:
+?S: This variable is the ~name expanded version of sitelib, so that you
+?S: may use it directly in Makefiles or shell scripts.
+?S:.
+?S:installsitelib:
+?S: This variable is really the same as sitelibexp but may differ on
+?S: those systems using AFS. For extra portability, only this variable
+?S: should be used in makefiles.
+?S:.
+?C:SITELIB:
+?C: This symbol contains the name of the private library for this package.
+?C: The library is private in the sense that it needn't be in anyone's
+?C: execution path, but it should be accessible by the world. The program
+?C: should be prepared to do ~ expansion.
+?C: The standard distribution will put nothing in this directory.
+?C: Individual sites may place their own extensions and modules in
+?C: this directory.
+?C:.
+?C:SITELIB_EXP:
+?C: This symbol contains the ~name expanded version of SITELIB, to be used
+?C: in programs that are not prepared to deal with ~ expansion at run-time.
+?C:.
+?H:#define SITELIB "$sitelib" /**/
+?H:#define SITELIB_EXP "$sitelibexp" /**/
+?H:.
+?T:prog
+: determine where site specific libraries go.
+set sitelib sitelib
+eval $prefixit
+case "$sitelib" in
+'')
+?X: remove any trailing -3.0 or other version indentification
+ prog=`echo $package | $sed 's/-*[0-9.]*$//'`
+ dflt="$privlib/site_$prog" ;;
+*) dflt="$sitelib" ;;
+esac
+$cat <<EOM
+
+The installation process will also create a directory for
+site-specific extensions and modules. Some users find it convenient
+to place all local files in this directory rather than in the main
+distribution directory.
+
+EOM
+fn=d~+
+rp='Pathname for the site-specific library files?'
+. ./getfile
+if $test "X$sitelibexp" != "X$ansexp"; then
+ installsitelib=''
+fi
+sitelib="$ans"
+sitelibexp="$ansexp"
+if $afs; then
+ $cat <<EOM
+
+Since you are running AFS, I need to distinguish the directory in which
+private files reside from the directory in which they are installed (and from
+which they are presumably copied to the former directory by occult means).
+
+EOM
+ case "$installsitelib" in
+ '') dflt=`echo $sitelibexp | sed 's#^/afs/#/afs/.#'`;;
+ *) dflt="$installsitelib";;
+ esac
+ fn=de~
+ rp='Where will private files be installed?'
+ . ./getfile
+ installsitelib="$ans"
+else
+ installsitelib="$sitelibexp"
+fi
+
diff --git a/mcon/U/sizetype.U b/mcon/U/sizetype.U
new file mode 100644
index 0000000..f08b4f3
--- /dev/null
+++ b/mcon/U/sizetype.U
@@ -0,0 +1,40 @@
+?RCS: $Id$
+?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: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
+?RCS:
+?RCS: $Log: sizetype.U,v $
+?RCS: Revision 3.0.1.1 1994/08/29 16:32:10 ram
+?RCS: patch32: created by ADO
+?RCS:
+?MAKE:sizetype: Myread Typedef
+?MAKE: -pick add $@ %<
+?S:sizetype:
+?S: This variable defines sizetype to be something like size_t,
+?S: unsigned long, or whatever type is used to declare length
+?S: parameters for string functions.
+?S:.
+?C:Size_t:
+?C: This symbol holds the type used to declare length parameters
+?C: for string functions. It is usually size_t, but may be
+?C: unsigned long, int, etc. It may be necessary to include
+?C: <sys/types.h> to get any typedef'ed information.
+?C:.
+?H:#define Size_t $sizetype /* length paramater for string functions */
+?H:.
+: see what type is used for size_t
+set size_t sizetype 'unsigned int' stdio.h sys/types.h
+eval $typedef
+dflt="$sizetype"
+echo " "
+rp="What type is used for the length parameter for string functions?"
+. ./myread
+sizetype="$ans"
+
diff --git a/mcon/U/so.U b/mcon/U/so.U
new file mode 100644
index 0000000..e0bcf88
--- /dev/null
+++ b/mcon/U/so.U
@@ -0,0 +1,50 @@
+?RCS: $Id$
+?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: so.U,v $
+?RCS: Revision 3.0.1.2 1994/10/29 16:30:04 ram
+?RCS: patch36: now tells user how he can suppress shared lib lookup (ADO)
+?RCS: patch36: removed echo at the top, since it's now in the here-doc (ADO)
+?RCS:
+?RCS: Revision 3.0.1.1 1994/06/20 07:07:02 ram
+?RCS: patch30: created
+?RCS:
+?X:
+?X: This unit computes the shared-object / shared-lib extension
+?X:
+?MAKE:so: test libpth Loc Myread Oldconfig cat
+?MAKE: -pick add $@ %<
+?S:so:
+?S: This variable holds the extension used to identify shared libraries
+?S: (also known as shared objects) on the system. Usually set to 'so'.
+?S:.
+?T: xxx
+: compute shared library extension
+case "$so" in
+'')
+ if xxx=`./loc libc.sl X $libpth`; $test -f "$xxx"; then
+ dflt='sl'
+ else
+ dflt='so'
+ fi
+ ;;
+*) dflt="$so";;
+esac
+$cat <<EOM
+
+On some systems, shared libraries may be available. Answer 'none' if
+you want to suppress searching of shared libraries for the remainder
+of this configuration.
+
+EOM
+rp='What is the file extension used for shared libraries?'
+. ./myread
+so="$ans"
+
diff --git a/mcon/U/sockopt.U b/mcon/U/sockopt.U
new file mode 100644
index 0000000..1eea5dd
--- /dev/null
+++ b/mcon/U/sockopt.U
@@ -0,0 +1,88 @@
+?RCS: $Id$
+?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: sockopt.U,v $
+?RCS: Revision 3.0.1.1 1995/07/25 14:16:14 ram
+?RCS: patch56: obsoleted KEEPALIVE in favor of CAN_KEEPALIVE for consistency
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:09:48 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_keepalive: cat rm contains +cc +ccflags socketlib sockethdr \
+ d_oldsock libs Oldconfig Setvar Findhdr
+?MAKE: -pick add $@ %<
+?S:d_keepalive:
+?S: This symbol conditionally defines CAN_KEEPALIVE which indicates to the C
+?S: program that setsockopt SO_KEEPALIVE will work properly.
+?S:.
+?C:CAN_KEEPALIVE (KEEPALIVE):
+?C: This symbol if defined indicates to the C program that the SO_KEEPALIVE
+?C: option of setsockopt() will work as advertised in the manual.
+?C:.
+?H:#$d_keepalive CAN_KEEPALIVE /**/
+?H:.
+?F:!socket
+?LINT:set d_keepalive
+: see if setsockopt with SO_KEEPALIVE works as advertised
+echo " "
+case "$d_oldsock" in
+"$undef")
+ if $contains SO_KEEPALIVE `./findhdr sys/socket.h` \
+ /dev/null >/dev/null 2>&1
+ then
+ echo "OK, let's see if SO_KEEPALIVE works as advertised..." >&4
+ $cat > socket.c <<EOP
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <netdb.h>
+
+int main()
+{
+ int s = socket(AF_INET, SOCK_STREAM, 0);
+ if (s == -1)
+ exit(1);
+ if (-1 == setsockopt(s, SOL_SOCKET, SO_KEEPALIVE, 0, 0))
+ exit(2);
+ exit(0);
+}
+EOP
+ if $cc $ccflags $sockethdr -o socket socket.c $libs \
+ $socketlib >/dev/null 2>&1; then
+ ./socket >/dev/null 2>&1
+ case $? in
+ 0) echo "Yes, it does!"
+ val="$define";;
+ 1) $cat <<EOM
+(Something went wrong -- Assuming SO_KEEPALIVE is broken)
+EOM
+ val="$undef";;
+ 2) echo "No, it doesn't. Don't trust your manuals!!"
+ val="$undef";;
+ esac
+ else
+ cat <<EOM
+(I can't compile the test program -- Assuming SO_KEEPALIVE is broken)
+EOM
+ val="$undef"
+ fi
+ else
+ echo "Strange!! You have BSD 4.2 sockets but no SO_KEEPALIVE option."
+ val="$undef"
+ fi;;
+*) cat <<EOM
+As you have an old socket interface, you can't have heard of SO_KEEPALIVE.
+EOM
+ val="$undef";;
+esac
+set d_keepalive
+eval $setvar
+$rm -f socket socket.c
+
diff --git a/mcon/U/spitshell.U b/mcon/U/spitshell.U
new file mode 100644
index 0000000..f123fa5
--- /dev/null
+++ b/mcon/U/spitshell.U
@@ -0,0 +1,107 @@
+?RCS: $Id$
+?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: spitshell.U,v $
+?RCS: Revision 3.0.1.4 1997/02/28 16:22:12 ram
+?RCS: patch61: removed useless chatter as this is now done very early
+?RCS:
+?RCS: Revision 3.0.1.3 1995/01/11 15:37:01 ram
+?RCS: patch45: use 'test -f' instead of 'test -r' for exec-only cat progs (WED)
+?RCS: patch45: protected "sh -c" within backquotes for Linux and SGI
+?RCS:
+?RCS: Revision 3.0.1.2 1994/08/29 16:33:00 ram
+?RCS: patch32: don't create spitshell under the UU directory
+?RCS: patch32: allow for cat in /bin or /usr/bin
+?RCS:
+?RCS: Revision 3.0.1.1 1993/09/13 16:12:58 ram
+?RCS: patch10: made #!-failure message more friendly (WAD)
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:09:49 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:spitshell shsharp sharpbang: eunicefix sh Head
+?MAKE: -pick add $@ %<
+?S:spitshell:
+?S: This variable contains the command necessary to spit out a runnable
+?S: shell on this system. It is either cat or a grep -v for # comments.
+?S:.
+?S:shsharp:
+?S: This variable tells further Configure units whether your sh can
+?S: handle # comments.
+?S:.
+?S:sharpbang:
+?S: This variable contains the string #! if this system supports that
+?S: construct.
+?S:.
+?F:!sharp
+?T:xcat p
+?X: "paths" comes from Head
+?LINT:extern paths _exe
+: see if sh knows # comments
+?X: This is loaded up early, so avoid being chatty.
+?X: echo " "
+?X: echo "Checking your $sh to see if it knows about # comments..." >&2
+if `$sh -c '#' >/dev/null 2>&1`; then
+?X: echo "Your $sh handles # comments correctly."
+ shsharp=true
+ spitshell=cat
+?X: echo " "
+?X: echo "Okay, let's see if #! works on this system..."
+ xcat=/bin/cat
+ test -f $xcat$_exe || xcat=/usr/bin/cat
+ if test ! -f $xcat$_exe; then
+ for p in `echo $PATH | sed -e "s/$p_/ /g"` $paths; do
+ if test -f $p/cat$_exe; then
+ xcat=$p/cat
+ break
+ fi
+ done
+ if test ! -f $xcat$_exe; then
+ echo "Can't find cat anywhere!"
+ exit 1
+ fi
+ fi
+ echo "#!$xcat" >sharp
+ $eunicefix sharp
+ chmod +x sharp
+ ./sharp > today 2>/dev/null
+ if test -s today; then
+?X: echo "It does."
+ sharpbang='#!'
+ else
+ echo "#! $xcat" > sharp
+ $eunicefix sharp
+ chmod +x sharp
+ ./sharp > today 2>/dev/null
+ if test -s today; then
+?X: echo "It does."
+ sharpbang='#! '
+ else
+?X: echo "Okay, let's see if #! works on this system..."
+?X: echo "It's just a comment."
+ sharpbang=': use '
+ fi
+ fi
+else
+ echo " "
+ echo "Your $sh doesn't grok # comments--I will strip them later on."
+ shsharp=false
+?X: The spitshell script will be perused, so leave it out the UU directory
+ cd ..
+ echo "exec grep -v '^[ ]*#'" >spitshell
+ chmod +x spitshell
+ $eunicefix spitshell
+ spitshell=`pwd`/spitshell
+ cd UU
+ echo "I presume that if # doesn't work, #! won't work either!"
+ sharpbang=': use '
+fi
+rm -f sharp today
+
diff --git a/mcon/U/src.U b/mcon/U/src.U
new file mode 100644
index 0000000..87471e0
--- /dev/null
+++ b/mcon/U/src.U
@@ -0,0 +1,96 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1996, Cygnus Support
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the 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: Original Author: Tom Tromey <tromey@cygnus.com>
+?RCS:
+?RCS: $Log: src.U,v $
+?RCS: Revision 3.0.1.1 1997/02/28 16:23:54 ram
+?RCS: patch61: created
+?RCS:
+?MAKE:src +rsrc: Options package contains
+?MAKE: -pick add $@ %<
+?Y:TOP
+?S:src (srcdir):
+?S: This variable holds the (possibly relative) path of the package source.
+?S: It is up to the Makefile to use this variable and set VPATH accordingly
+?S: to find the sources remotely. Use $pkgsrc to have an absolute path.
+?S:.
+?S:rsrc (relsrcdir):
+?S: This variable holds a potentially relative path to the package
+?S: source. The contents are correct for the configuration environment,
+?S: i.e. there might be an extra .. prepended to get out of the UU dir.
+?S: Configure units should use this, not the src variable.
+?S:.
+: Find the path to the source tree
+case "$src" in
+'') case "$0" in
+ */*) src=`echo $0 | sed -e 's%/[^/][^/]*$%%'`
+ case "$src" in
+ /*) ;;
+ .) ;;
+ *) src=`cd ../$src && pwd` ;;
+ esac
+ ;;
+ *) src='.';;
+ esac;;
+esac
+case "$src" in
+'') src=/
+ rsrc=/
+ ;;
+/*) rsrc="$src";;
+*) rsrc="../$src";;
+esac
+?X:
+?X: Now check whether we have found the right source tree (i.e. the one for the
+?X: package we're about to configure). The original unit from Tom Tromey forced
+?X: the user to pick a unique file from his distribution, and we were merely
+?X: checking the existence of that file. I prefer to rely on Configure (which
+?X: we know *is* present since this unit is part of it!) and look for the
+?X: definition of the package variable, making sure it's the same as ours.
+?X: If it matches, we know we found the right source tree. -- RAM, 15/03/96
+?X:
+if test -f $rsrc/Configure && \
+ $contains "^package='$package'\$" $rsrc/Configure >/dev/null 2>&1
+then
+ : found it, so we are ok.
+else
+?X: Otherwise try "." and up to 4 parent directories...
+?X: Note that we prepend a ".." to get out of the configuration environment.
+ rsrc=''
+ for src in . .. ../.. ../../.. ../../../..; do
+ if test -f ../$src/Configure && \
+ $contains "^package=$package$" ../$src/Configure >/dev/null 2>&1
+ then
+ rsrc=../$src
+ break
+ fi
+ done
+fi
+case "$rsrc" in
+'')
+ cat <<EOM >&4
+
+Sorry, I can't seem to locate the source dir for $package. Please start
+Configure with an explicit path -- i.e. /some/path/Configure.
+
+EOM
+ exit 1
+ ;;
+?X: Don't echo anything if the sources are in . -- they should know already ;-)
+?X: In that case, rsrc is ../. since we lookup from within UU
+../.) rsrc='..';;
+*)
+ echo " "
+ echo "Sources for $package found in \"$src\"." >&4
+ ;;
+esac
+
diff --git a/mcon/U/ssizetype.U b/mcon/U/ssizetype.U
new file mode 100644
index 0000000..019bdaa
--- /dev/null
+++ b/mcon/U/ssizetype.U
@@ -0,0 +1,91 @@
+?RCS: $Id$
+?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: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
+?RCS:
+?RCS: $Log: ssizetype.U,v $
+?RCS: Revision 3.0.1.3 1997/02/28 16:24:21 ram
+?RCS: patch61: integrated perl5 concerns for mis-configured sfio
+?RCS:
+?RCS: Revision 3.0.1.2 1994/10/29 16:30:28 ram
+?RCS: patch36: added ?F: line for metalint file checking
+?RCS: patch36: added 'ldflags' to the test compile line (ADO)
+?RCS:
+?RCS: Revision 3.0.1.1 1994/08/29 16:33:06 ram
+?RCS: patch32: created by ADO
+?RCS:
+?MAKE:ssizetype: Myread Typedef sizetype cat rm \
+ +cc +optimize +ccflags +ldflags +libs _o
+?MAKE: -pick add $@ %<
+?S:ssizetype:
+?S: This variable defines ssizetype to be something like ssize_t,
+?S: long or int. It is used by functions that return a count
+?S: of bytes or an error condition. It must be a signed type.
+?S: We will pick a type such that sizeof(SSize_t) == sizeof(Size_t).
+?S:.
+?C:SSize_t:
+?C: This symbol holds the type used by functions that return
+?C: a count of bytes or an error condition. It must be a signed type.
+?C: It is usually ssize_t, but may be long or int, etc.
+?C: It may be necessary to include <sys/types.h> or <unistd.h>
+?C: to get any typedef'ed information.
+?C: We will pick a type such that sizeof(SSize_t) == sizeof(Size_t).
+?C:.
+?H:#define SSize_t $ssizetype /* signed count of bytes */
+?H:.
+?F:!ssize.out !ssize
+: see what type is used for signed size_t
+set ssize_t ssizetype int stdio.h sys/types.h
+eval $typedef
+dflt="$ssizetype"
+?X: Now check out whether sizeof(SSize_t) == sizeof(Size_t)
+$cat > ssize.c <<EOM
+#include <stdio.h>
+#include <sys/types.h>
+#define Size_t $sizetype
+#define SSize_t $dflt
+int main()
+{
+ if (sizeof(Size_t) == sizeof(SSize_t))
+ printf("$dflt\n");
+ else if (sizeof(Size_t) == sizeof(int))
+ printf("int\n");
+ else
+ printf("long\n");
+ fflush(stdout);
+ exit(0);
+}
+EOM
+echo " "
+?X: If $libs contains -lsfio, and sfio is mis-configured, then it
+?X: sometimes (apparently) runs and exits with a 0 status, but with no
+?X: output!. Thus we check with test -s whether we actually got any
+?X: output. I think it has to do with sfio's use of _exit vs. exit,
+?X: but I don't know for sure. --Andy Dougherty 1/27/97.
+if $cc $optimize $ccflags $ldflags -o ssize ssize.c $libs > /dev/null 2>&1 &&
+ ./ssize > ssize.out 2>/dev/null && test -s ssize.out ; then
+ ssizetype=`$cat ssize.out`
+ echo "I'll be using $ssizetype for functions returning a byte count." >&4
+else
+ $cat >&4 <<EOM
+Help! I can't compile and run the ssize_t test program: please enlighten me!
+(This is probably a misconfiguration in your system or libraries, and
+you really ought to fix it. Still, I'll try anyway.)
+
+I need a type that is the same size as $sizetype, but is guaranteed to
+be signed. Common values are ssize_t, int and long.
+
+EOM
+ rp="What signed type is the same size as $sizetype?"
+ . ./myread
+ ssizetype="$ans"
+fi
+$rm -f ssize ssize$_o ssize.*
+
diff --git a/mcon/U/startperl.U b/mcon/U/startperl.U
new file mode 100644
index 0000000..c511a54
--- /dev/null
+++ b/mcon/U/startperl.U
@@ -0,0 +1,95 @@
+?RCS: $Id$
+?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: startperl.U,v $
+?RCS: Revision 3.0.1.1 1997/02/28 16:25:06 ram
+?RCS: patch61: warn them if the #! line is too long for their OS
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:09:50 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:startperl: cat rm sharpbang perlpath d_portable Myread
+?MAKE: -pick add $@ %<
+?S:startperl:
+?S: This variable contains the string to put on the front of a perl
+?S: script to make sure (hopefully) that it runs with perl and not some
+?S: shell. Of course, that leading line must be followed by the classical
+?S: perl idiom:
+?S: eval 'exec perl -S $0 ${1+"$@"}'
+?S: if $running_under_some_shell;
+?S: to guarantee perl startup should the shell execute the script. Note
+?S: that this magic incantation is not understood by csh.
+?S:.
+?C:STARTPERL:
+?C: This symbol is the string that should be put on the front of a
+?C: perl script to make sure (hopefully) that it runs with perl and
+?C: not under some shell. That line should be followed by the classical
+?C: invocation magic:
+?C: eval 'exec perl -S $0 ${1+"$@"}'
+?C: if $running_under_some_shell;
+?C: to guarantee perl startup should the shell execute the script at first.
+?C:.
+?H:#define STARTPERL "$startperl"
+?H:.
+?T:pdflt
+?F:!xtry
+: figure out how to guarantee perl startup
+case "$sharpbang" in
+*!)
+?X:
+?X: Make sure the #!$perlpath magic incantation indeed works on this
+?X: system... It might not if the length of the #! hook is greater
+?X: than some hardwired kernel limit. -- RAM, 15/03/96
+?X:
+ $cat >xtry <<EOP
+#!$perlpath
+system("exit 0");
+EOP
+ chmod a+x xtry
+ if ./xtry >/dev/null 2>&1; then
+ $cat <<EOH
+
+I can use the #! construct to start perl on your system. This will make
+startup of perl scripts faster, but may cause problems if you want to share
+those scripts and perl is not in a standard place (/usr/bin/perl) on all your
+platforms. The alternative is to force a shell by starting the script with a
+single ':' character.
+
+EOH
+ pdflt=y
+ else
+ $cat <<EOH
+
+I could use the #! construct to start perl on your system, but using
+ #!$perlpath
+would be too long for your kernel to grok. Indeed, most systems do
+limit the size of the leading #! string to 32 characters.
+
+EOH
+ pdflt=n
+ fi
+ $rm -f xtry
+ case "$startperl" in
+ *!*) dflt=y;;
+ '') case "$d_portable" in
+ "$define") dflt=n;;
+ *) dflt=$pdflt;;
+ esac;;
+ *) dflt=n;;
+ esac
+ rp='Shall I use #! to start up perl?'
+ . ./myread
+ case "$ans" in
+ y*|Y*) startperl="#!$perlpath";;
+ *) startperl=": # use perl";;
+ esac;;
+*) startperl=": # use perl";;
+esac
+
diff --git a/mcon/U/startsh.U b/mcon/U/startsh.U
new file mode 100644
index 0000000..90a4ad9
--- /dev/null
+++ b/mcon/U/startsh.U
@@ -0,0 +1,50 @@
+?RCS: $Id$
+?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: startsh.U,v $
+?RCS: Revision 3.0.1.1 1997/02/28 16:25:31 ram
+?RCS: patch61: avoid needless chatter since this is now done very early
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:09:51 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:startsh: sh sharpbang eunicefix
+?MAKE: -pick add $@ %<
+?S:startsh:
+?S: This variable contains the string to put on the front of a shell
+?S: script to make sure (hopefully) that it runs with sh and not some
+?S: other shell.
+?S:.
+?F:!sharp
+: figure out how to guarantee sh startup
+?X: Avoid needless chatter since this is now done very early.
+?X: echo " "
+?X: echo "Checking out how to guarantee sh startup..." >&2
+case "$startsh" in
+'') startsh=${sharpbang}${sh} ;;
+*)
+?X: echo "Let's see if '$startsh' works..." ;;
+esac
+cat >sharp <<EOSS
+$startsh
+set abc
+test "$?abc" != 1
+EOSS
+
+chmod +x sharp
+$eunicefix sharp
+if ./sharp; then
+ : echo "Yup, it does."
+else
+ echo "Hmm... '$startsh' does not guarantee sh startup..."
+ echo "You may have to fix up the shell scripts to make sure $sh runs them."
+fi
+rm -f sharp
+
diff --git a/mcon/U/stdchar.U b/mcon/U/stdchar.U
new file mode 100644
index 0000000..02c9056
--- /dev/null
+++ b/mcon/U/stdchar.U
@@ -0,0 +1,40 @@
+?RCS: $Id$
+?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: stdchar.U,v $
+?RCS: Revision 3.0 1993/08/18 12:09:52 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:stdchar: contains Findhdr cppstdin cppminus rm
+?MAKE: -pick add $@ %<
+?S:stdchar:
+?S: This variable conditionally defines STDCHAR to be the type of char
+?S: used in stdio.h. It has the values "unsigned char" or "char".
+?S:.
+?C:STDCHAR:
+?C: This symbol is defined to be the type of char used in stdio.h.
+?C: It has the values "unsigned char" or "char".
+?C:.
+?H:#define STDCHAR $stdchar /**/
+?H:.
+?F:!stdioh
+: see what type of char stdio uses.
+echo " "
+?X: untangle the #include nest
+echo '#include <stdio.h>' | $cppstdin $cppminus > stdioh
+if $contains 'unsigned.*char.*_ptr;' stdioh >/dev/null 2>&1 ; then
+ echo "Your stdio uses unsigned chars." >&4
+ stdchar="unsigned char"
+else
+ echo "Your stdio uses signed chars." >&4
+ stdchar="char"
+fi
+$rm -f stdioh
+
diff --git a/mcon/U/sunscanf.U b/mcon/U/sunscanf.U
new file mode 100644
index 0000000..d0c8fa8
--- /dev/null
+++ b/mcon/U/sunscanf.U
@@ -0,0 +1,55 @@
+?RCS: $Id$
+?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: sunscanf.U,v $
+?RCS: Revision 3.0 1993/08/18 12:09:54 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:sunscanf: cat rm Myread +cc +ccflags test Setvar
+?MAKE: -pick add $@ %<
+?S:sunscanf:
+?S: This variable is set if this system runs with the Sun version
+?S: of scanf.
+?S:.
+?C:SUNSCANF:
+?C: This variable is set if this system runs with the Sun version
+?C: of scanf.
+?C:.
+?H:#$sunscanf SUNSCANF /**/
+?H:.
+?LINT:set sunscanf
+: check to see what kinda scanf your using.
+echo " "
+echo "Checking to see what flavor of scanf you have..." >&4
+$cat >scanf.c <<'EOCP'
+int main()
+{
+ float value;
+
+ sscanf("4.5","%g",&value);
+ printf("%d\n", value == 4.5);
+}
+EOCP
+if $cc $ccflags -o scanf scanf.c >/dev/null 2>&1 ; then
+ if $test `scanf` = 0; then
+ echo "Hmm.. seems your not running the USG flavor.."
+ val="$undef"
+ else
+ echo "Uh... your running the USG flavor of scanf."
+ val="$define"
+ fi
+else
+ echo "(I can't seem to compile the test program... Guessing)"
+ val="$undef"
+fi
+set sunscanf
+eval $setvar
+$rm -f scanf*
+
diff --git a/mcon/U/sysman.U b/mcon/U/sysman.U
new file mode 100644
index 0000000..1e21511
--- /dev/null
+++ b/mcon/U/sysman.U
@@ -0,0 +1,50 @@
+?RCS: $Id$
+?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: sysman.U,v $
+?RCS: Revision 3.0.1.2 1994/06/20 07:08:43 ram
+?RCS: patch30: now explicitly states that /usr/man/man1 is the default
+?RCS: patch30: added /usr/local/man/man1 to the search list
+?RCS:
+?RCS: Revision 3.0.1.1 1993/09/13 16:13:50 ram
+?RCS: patch10: added support for /local/man/man1 (WAD)
+?RCS: patch10: added temporary syspath variable to cut down on line length
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:09:55 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:sysman: test Loc Oldconfig
+?MAKE: -pick add $@ %<
+?S:sysman:
+?S: This variable holds the place where the manual is located on this
+?S: system. It is not the place where the user wants to put his manual
+?S: pages. Rather it is the place where Configure may look to find manual
+?S: for unix commands (section 1 of the manual usually). See mansrc.
+?S:.
+?T:syspath
+: determine where manual pages are on this system
+echo " "
+case "$sysman" in
+'')
+ syspath='/usr/share/man/man1 /usr/man/man1'
+ syspath="$syspath /usr/man/mann /usr/man/manl /usr/man/local/man1"
+ syspath="$syspath /usr/man/u_man/man1 /usr/share/man/man1"
+ syspath="$syspath /usr/catman/u_man/man1 /usr/man/l_man/man1"
+ syspath="$syspath /usr/local/man/u_man/man1 /usr/local/man/l_man/man1"
+ syspath="$syspath /usr/man/man.L /local/man/man1 /usr/local/man/man1"
+ sysman=`./loc . /usr/man/man1 $syspath`
+ ;;
+esac
+if $test -d "$sysman"; then
+ echo "System manual is in $sysman." >&4
+else
+ echo "Could not find manual pages in source form." >&4
+fi
+
diff --git a/mcon/U/trnl.U b/mcon/U/trnl.U
new file mode 100644
index 0000000..f8fa904
--- /dev/null
+++ b/mcon/U/trnl.U
@@ -0,0 +1,56 @@
+?RCS: $Id$
+?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: Copyright (c) 1998 Andy Dougherty
+?RCS:
+?RCS: Original author Jarkko Hietaniemi <jhi@iki.fi>
+?RCS: Merged into dist by Andy Dougherty July 13, 1998
+?RCS:
+?MAKE:trnl: Nothing
+?MAKE: -pick add $@ %<
+?S:trnl:
+?S: This variable contains the value to be passed to the tr(1)
+?S: command to transliterate a newline. Typical values are
+?S: '\012' and '\n'. This is needed for EBCDIC systems where
+?S: newline is not necessarily '\012'.
+?S:.
+?T: DJGPP
+: Find the appropriate value for a newline for tr
+?X: We can't use $tr since that would cause a circular dependency via Myread
+?X: dos djgpp uses '\015\012', but reportedly is happy with '\012' in the
+?X: tr command. I don't know why it passes the '\n' test but later
+?X: refuses to work correctly with it. --AD 6/14/98
+if test -n "$DJGPP"; then
+ trnl='\012'
+fi
+if test X"$trnl" = X; then
+ case "`echo foo | tr '\n' x 2>/dev/null`" in
+ foox) trnl='\n' ;;
+ esac
+fi
+if test X"$trnl" = X; then
+ case "`echo foo | tr '\012' x 2>/dev/null`" in
+ foox) trnl='\012' ;;
+ esac
+fi
+if test X"$trnl" = X; then
+ case "`echo foo | tr '\r\n' xy 2>/dev/null`" in
+ fooxy) trnl='\n\r' ;;
+ esac
+fi
+if test X"$trnl" = X; then
+ cat <<EOM >&2
+
+$me: Fatal Error: cannot figure out how to translate newlines with 'tr'.
+
+EOM
+ exit 1
+fi
+
diff --git a/mcon/U/uidtype.U b/mcon/U/uidtype.U
new file mode 100644
index 0000000..ba9368a
--- /dev/null
+++ b/mcon/U/uidtype.U
@@ -0,0 +1,57 @@
+?RCS: $Id$
+?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: uidtype.U,v $
+?RCS: Revision 3.0.1.3 1994/08/29 16:33:25 ram
+?RCS: patch32: now uses new Typedef unit to compute type information
+?RCS:
+?RCS: Revision 3.0.1.2 1994/06/20 07:09:36 ram
+?RCS: patch30: comment for uidtype referred to the obsoleted symbol
+?RCS:
+?RCS: Revision 3.0.1.1 1994/05/13 15:28:27 ram
+?RCS: patch27: made conform to its gidtype.U companion
+?RCS: patch27: question now explicitly mentions getuid()
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:09:56 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:uidtype: Myread Typedef Findhdr
+?MAKE: -pick add $@ %<
+?S:uidtype:
+?S: This variable defines Uid_t to be something like uid_t, int,
+?S: ushort, or whatever type is used to declare user ids in the kernel.
+?S:.
+?C:Uid_t (UIDTYPE):
+?C: This symbol holds the type used to declare user ids in the kernel.
+?C: It can be int, ushort, uid_t, etc... It may be necessary to include
+?C: <sys/types.h> to get any typedef'ed information.
+?C:.
+?H:#define Uid_t $uidtype /* UID type */
+?H:.
+?T:xxx
+: see what type uids are declared as in the kernel
+set uid_t uidtype xxx stdio.h sys/types.h
+eval $typedef
+case "$uidtype" in
+xxx)
+ xxx=`./findhdr sys/user.h`
+ set `grep '_ruid;' "$xxx" 2>/dev/null` unsigned short
+ case $1 in
+ unsigned) dflt="$1 $2" ;;
+ *) dflt="$1" ;;
+ esac
+ ;;
+*) dflt="$uidtype";;
+esac
+echo " "
+rp="What is the type for user ids returned by getuid()?"
+. ./myread
+uidtype="$ans"
+
diff --git a/mcon/U/usenm.U b/mcon/U/usenm.U
new file mode 100644
index 0000000..b11f3c9
--- /dev/null
+++ b/mcon/U/usenm.U
@@ -0,0 +1,144 @@
+?RCS: $Id$
+?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: usenm.U,v $
+?RCS: Revision 3.0.1.1 1997/02/28 16:26:40 ram
+?RCS: patch61: don't use nm with the GNU C library
+?RCS: patch61: added support for Linux shared libs
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:09:57 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:usenm runnm nm_opt nm_so_opt: cat test Myread Oldconfig grep \
+ d_gnulibc nm egrep rsrc osname Guess
+?MAKE: -pick add $@ %<
+?S:usenm:
+?S: This variable contains 'true' or 'false' depending whether the
+?S: nm extraction is wanted or not.
+?S:.
+?S:runnm:
+?S: This variable contains 'true' or 'false' depending whether the
+?S: nm extraction should be performed or not, according to the value
+?S: of usenm and the flags on the Configure command line.
+?S:.
+?S:nm_opt:
+?S: This variable holds the options that may be necessary for nm.
+?S:.
+?S:nm_so_opt:
+?S: This variable holds the options that may be necessary for nm
+?S: to work on a shared library but that can not be used on an
+?S: archive library. Currently, this is only used by Linux, where
+?S: nm --dynamic is *required* to get symbols from an ELF library which
+?S: has been stripped, but nm --dynamic is *fatal* on an archive library.
+?S: Maybe Linux should just always set usenm=false.
+?S:.
+: see if nm is to be used to determine whether a symbol is defined or not
+?X: If there is enough inquiries, it might be worth to wait for the nm
+?X: extraction. Otherwise, the C compilations might be a better deal.
+?X:
+?X: Don't bother if we're using GNU libc -- skimo
+case "$usenm" in
+'')
+ dflt=''
+ case "$d_gnulibc" in
+ "$define")
+ echo " "
+ echo "$nm probably won't work on the GNU C Library." >&4
+ dflt=n
+ ;;
+ esac
+ case "$dflt" in
+ '')
+ if $test "$osname" = aix -a ! -f /lib/syscalls.exp; then
+ echo " "
+ echo "Whoops! This is an AIX system without /lib/syscalls.exp!" >&4
+ echo "'nm' won't be sufficient on this system." >&4
+ dflt=n
+ fi
+ ;;
+ esac
+ case "$dflt" in
+ '')
+ if ./gnu; then
+ echo " "
+ echo "Hmm... A GNU system without a GNU C Library? Weird..." >&4
+ dflt=n
+ else
+ dflt=`$egrep 'inlibc|csym' $rsrc/Configure | wc -l 2>/dev/null`
+ if $test $dflt -gt 20; then
+ dflt=y
+ else
+ dflt=n
+ fi
+ fi
+ ;;
+ esac
+ ;;
+*)
+ case "$usenm" in
+ true|$define) dflt=y;;
+ *) dflt=n;;
+ esac
+ ;;
+esac
+$cat <<EOM
+
+I can use $nm to extract the symbols from your C libraries. This
+is a time consuming task which may generate huge output on the disk (up
+to 3 megabytes) but that should make the symbols extraction faster. The
+alternative is to skip the 'nm' extraction part and to compile a small
+test program instead to determine whether each symbol is present. If
+you have a fast C compiler and/or if your 'nm' output cannot be parsed,
+this may be the best solution.
+
+EOM
+rp='Shall I use nm to extract C symbols from the libraries?'
+. ./myread
+case "$ans" in
+[Nn]*) usenm=false;;
+*) usenm=true;;
+esac
+
+?X: Name extraction is to be run if 'nm' usage is wanted and if no -r flag
+?X: was provided to configure (in which case we simply re-use the previous
+?X: values).
+runnm=$usenm
+case "$reuseval" in
+true) runnm=false;;
+esac
+
+: nm options which may be necessary
+case "$nm_opt" in
+'') if $test -f /mach_boot; then
+ nm_opt='' # Mach
+ elif $test -d /usr/ccs/lib; then
+ nm_opt='-p' # Solaris (and SunOS?)
+ elif $test -f /dgux; then
+ nm_opt='-p' # DG-UX
+ elif $test -f /lib64/rld; then
+ nm_opt='-p' # 64-bit Irix
+ else
+ nm_opt=''
+ fi;;
+esac
+
+?X: nm options which may be necessary for shared libraries but illegal
+?X: for archive libraries. Thank you, Linux.
+case "$nm_so_opt" in
+'') case "$osname" in
+ *linux*)
+ if $nm --help | $grep 'dynamic' > /dev/null 2>&1; then
+ nm_so_opt='--dynamic'
+ fi
+ ;;
+ esac
+ ;;
+esac
+
diff --git a/mcon/U/usesocks.U b/mcon/U/usesocks.U
new file mode 100644
index 0000000..4520b8c
--- /dev/null
+++ b/mcon/U/usesocks.U
@@ -0,0 +1,46 @@
+?RCS: $Id$
+?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: Copyright (c) 1999 Jarkko Hietaniemi
+?RCS:
+?MAKE:usesocks: Myread Oldconfig Setvar spackage package
+?MAKE: -pick add $@ %<
+?Y:TOP
+?S:usesocks:
+?S: This variable conditionally defines the USE_SOCKS symbol,
+?S: and indicates that Perl should be built to use SOCKS.
+?S:.
+?C:USE_SOCKS:
+?C: This symbol, if defined, indicates that Perl should
+?C: be built to use socks.
+?C:.
+?H:?%<:#$usesocks USE_SOCKS /**/
+?H:.
+?D:usesocks=''
+?LINT:set usesocks
+: check for requested SOCKS support
+case "$usesocks" in
+$define|true|[yY]*) dflt='y';;
+*) dflt='n';;
+esac
+cat <<EOM
+
+$spackage can be built to use the SOCKS proxy protocol library.
+If this doesn't make any sense to you, just accept the default '$dflt'.
+EOM
+rp="Build $package for SOCKS?"
+. ./myread
+case "$ans" in
+y|Y) val="$define" ;;
+*) val="$undef" ;;
+esac
+set usesocks
+eval $setvar
+
diff --git a/mcon/U/usrinc.U b/mcon/U/usrinc.U
new file mode 100644
index 0000000..3f8ef00
--- /dev/null
+++ b/mcon/U/usrinc.U
@@ -0,0 +1,54 @@
+?RCS: $Id$
+?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:usrinc: Getfile Oldconfig incpath
+?MAKE: -pick add $@ %<
+?S:usrinc:
+?S: This variable holds the path of the include files, which is
+?S: usually /usr/include. It is mainly used by other Configure units.
+?S:.
+?D:usrinc='/usr/include'
+: What should the include directory be ?
+echo " "
+dflt='/usr/include'
+case "$usrinc" in
+'') dflt="$incpath/usr/include";;
+?X: This is nice, but it does not work on some systems because gcc redirects
+?X: the include to things like ..../gcc45/gcc/4.5.2/include-fixed/stdio.h
+?X: and it does not contain all the files.
+?X:
+?X: $cat >usr.c <<EOC
+?X: #include <stdio.h>
+?X:EOC
+?X: dflt=`$cppstdin $cppminus < usr.c 2>/dev/null | \
+?X: $grep "^[ ]*#.*stdio.h" | $tr -d '"' | \
+?X: $sed -ne "1s,\(.*\)[/\\]stdio.h.*,\1,p" | \
+?X: $awk "{ print \\$$fieldn }"`
+?X: ;;
+*) dflt="$usrinc";;
+esac
+fn=d/
+rp='Where are the include files you want to use?'
+. ./getfile
+usrinc="$ans"
+
diff --git a/mcon/U/vaproto.U b/mcon/U/vaproto.U
new file mode 100644
index 0000000..f165d9f
--- /dev/null
+++ b/mcon/U/vaproto.U
@@ -0,0 +1,65 @@
+?RCS: $Id$
+?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: Original Author: Graham Stoney <greyham@research.canon.oz.au>
+?RCS:
+?RCS: $Log: vaproto.U,v $
+?RCS: Revision 3.0.1.1 1994/01/24 14:17:16 ram
+?RCS: patch16: definition of _V now appears only when needed
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:09:59 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:vaproto: prototype i_stdarg Setvar
+?MAKE: -pick add $@ %<
+?S:vaproto:
+?S: This variable conditionally defines CAN_VAPROTO on systems supporting
+?S: prototype declaration of functions with a variable number of
+?S: arguments. See also prototype.
+?S:.
+?C:CAN_VAPROTO ~ %<:
+?C: This variable is defined on systems supporting prototype declaration
+?C: of functions with a variable number of arguments.
+?C:.
+?C:_V:
+?C: This macro is used to declare function parameters in prototypes for
+?C: functions with a variable number of parameters. Use double parentheses.
+?C: For example:
+?C:
+?C: int printf _V((char *fmt, ...));
+?C:
+?C: Remember to use the plain simple _() macro when declaring a function
+?C: with no variable number of arguments, since it might be possible to
+?C: have a non-effect _V() macro and still get prototypes via _().
+?C:.
+?H:?%<:#$vaproto CAN_VAPROTO /**/
+?H:?_V:#ifdef CAN_VAPROTO
+?H:?_V:#define _V(args) args
+?H:?_V:#else
+?H:?_V:#define _V(args) ()
+?H:?_V:#endif
+?H:.
+?W:%<:_V
+?LINT:set vaproto
+: see if prototypes support variable argument declarations
+echo " "
+case "$prototype$i_stdarg" in
+$define$define)
+ echo "It appears we'll be able to prototype varargs functions." >&4
+ val="$define"
+ ;;
+*)
+ echo "Too bad... We won't be using prototyped varargs functions..." >&4
+ val="$undef"
+ ;;
+esac
+set vaproto
+eval $setvar
+
diff --git a/mcon/U/voidflags.U b/mcon/U/voidflags.U
new file mode 100644
index 0000000..0e0f49c
--- /dev/null
+++ b/mcon/U/voidflags.U
@@ -0,0 +1,180 @@
+?RCS: $Id$
+?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: voidflags.U,v $
+?RCS: Revision 3.0.1.2 1997/02/28 16:27:58 ram
+?RCS: patch61: don't prompt them if the void support is high enough for us
+?RCS:
+?RCS: Revision 3.0.1.1 1995/01/11 15:37:44 ram
+?RCS: patch45: cosmetic change to avoid spurious blank lines when using -s
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:10:01 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:voidflags defvoidused: cat sed rm rm_try contains +cc +ccflags package \
+ Oldconfig Myread
+?MAKE: -pick add $@ %<
+?S:voidflags:
+?S: This variable contains the eventual value of the VOIDFLAGS symbol,
+?S: which indicates how much support of the void type is given by this
+?S: compiler. See VOIDFLAGS for more info.
+?S:.
+?S:defvoidused:
+?S: This variable contains the default value of the VOIDUSED symbol (15).
+?S:.
+?X: Exceptionally, we have to explicitly alias the symbol name for
+?X: config_h.SH, otherwise the comment would not appear.
+?C:VOIDFLAGS ~ %<:
+?C: This symbol indicates how much support of the void type is given by this
+?C: compiler. What various bits mean:
+?C:
+?C: 1 = supports declaration of void
+?C: 2 = supports arrays of pointers to functions returning void
+?C: 4 = supports comparisons between pointers to void functions and
+?C: addresses of void functions
+?C: 8 = suports declaration of generic void pointers
+?C:
+?C: The package designer should define VOIDUSED to indicate the requirements
+?C: of the package. This can be done either by #defining VOIDUSED before
+?C: including config.h, or by defining defvoidused in Myinit.U. If the
+?C: latter approach is taken, only those flags will be tested. If the
+?C: level of void support necessary is not present, defines void to int.
+?C:.
+?H:?%<:#ifndef VOIDUSED
+?H:?%<:#define VOIDUSED $defvoidused
+?H:?%<:#endif
+?H:?%<:#define VOIDFLAGS $voidflags
+?H:?%<:#if (VOIDFLAGS & VOIDUSED) != VOIDUSED
+?H:?%<:#define void int /* is void to be avoided? */
+?H:?%<:#define M_VOID /* Xenix strikes again */
+?H:?%<:#endif
+?H:.
+?W:%<:void
+?F:!.out !try.c !flags
+?LINT:usefile .out flags try.c
+?INIT:: full support for void wanted by default
+?INIT:defvoidused=15
+?INIT:
+?LINT:known void M_VOID VOIDUSED
+: check for void type
+echo " "
+echo "Checking to see how well your C compiler groks the void type..." >&4
+$cat >flags <<EOM
+
+ Support flag bits are:
+ 1: basic void declarations.
+ 2: arrays of pointers to functions returning void.
+ 4: operations between pointers to and addresses of void functions.
+ 8: generic void pointers.
+
+EOM
+case "$voidflags" in
+'')
+ $cat >try.c <<'EOCP'
+extern int doit();
+#if TRY & 1
+void sub() {
+#else
+sub() {
+#endif
+ extern void moo(); /* function returning void */
+ void (*goo)(); /* ptr to func returning void */
+#if TRY & 2
+ static void (*foo[10])();
+#endif
+#if TRY & 8
+ void *hue; /* generic ptr */
+ char buf[] = "buf";
+ int *iptr;
+#endif
+
+#if TRY & 2
+ if (doit()) {
+ foo[0] = moo;
+ (*foo[0])();
+ }
+#endif
+#if TRY & 4
+ if (doit())
+ goo = moo;
+ if (goo == moo)
+ doit();
+#endif
+#if TRY & 8
+ hue = buf;
+ if (doit())
+ iptr = hue;
+#endif
+ doit();
+}
+EOCP
+?X: This unit used to use cc -S in those tests to try to speed up things, but
+?X: unfortunately, AIX 3.2 does not support this option.
+ if $cc $ccflags -c -DTRY=$defvoidused try.c >.out 2>&1 ; then
+ voidflags=$defvoidused
+ echo "Good. It appears to support void to the level $package wants."
+ if $contains warning .out >/dev/null 2>&1; then
+ echo "However, you might get some warnings that look like this:"
+ $sed -e 's/^/ /' .out
+ fi
+ else
+echo "Hmm, your compiler has some difficulty with void. Checking further..." >&4
+ $cat >&4 flags
+ $rm -f flags
+ if $cc $ccflags -c -DTRY=1 try.c >/dev/null 2>&1; then
+ echo "It supports 1..."
+ if $cc $ccflags -c -DTRY=3 try.c >/dev/null 2>&1; then
+ echo "It also supports 2..."
+ if $cc $ccflags -c -DTRY=7 try.c >/dev/null 2>&1; then
+ voidflags=7
+ echo "And it supports 4 but not 8 definitely."
+ else
+ echo "It doesn't support 4..."
+ if $cc $ccflags -c -DTRY=11 try.c >/dev/null 2>&1; then
+ voidflags=11
+ echo "But it supports 8."
+ else
+ voidflags=3
+ echo "Neither does it support 8."
+ fi
+ fi
+ else
+ echo "It does not support 2..."
+ if $cc $ccflags -c -DTRY=13 try.c >/dev/null 2>&1; then
+ voidflags=13
+ echo "But it supports 4 and 8."
+ else
+ if $cc $ccflags -c -DTRY=5 try.c >/dev/null 2>&1; then
+ voidflags=5
+ echo "And it supports 4 but has not heard about 8."
+ else
+ echo "However it supports 8 but not 4."
+ fi
+ fi
+ fi
+ else
+ echo "There is no support at all for void."
+ voidflags=0
+ fi
+ fi
+esac
+?X: Only prompt user if support does not match the level we want
+case "$voidflags" in
+"$defvoidused") ;;
+*)
+ dflt="$voidflags";
+ test -f flags && $cat flags
+ rp="Your void support flags add up to what?"
+ . ./myread
+ voidflags="$ans"
+ ;;
+esac
+$rm_try flags
+
diff --git a/mcon/U/warnflags.U b/mcon/U/warnflags.U
new file mode 100644
index 0000000..0faf3b0
--- /dev/null
+++ b/mcon/U/warnflags.U
@@ -0,0 +1,55 @@
+?RCS: $Id$
+?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: Original Author: Graham Stoney <greyham@research.canon.oz.au>
+?RCS:
+?RCS: $Log: warnflags.U,v $
+?RCS: Revision 3.0 1993/08/18 12:10:02 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:warnflags: cat cc contains Myread Guess Oldconfig Findhdr
+?MAKE: -pick add $@ %<
+?S:warnflags:
+?S: This variable contains any additional C compiler flags to generate
+?S: warnings from the compiler. It is up to the Makefile to use this.
+?S:.
+: offer additional warning flags for compilation
+$cat <<EOH
+
+You may wish to compile with extra compiler warnings enabled.
+Note that doing so enhances your chance of receiving your free set of steak
+knives, particularly if you find any bugs and report them.
+If you don't want extra warnings, answer "none".
+
+EOH
+case "$warnflags" in
+'') case "$cc" in
+ *gcc*)
+ dflt="-Wall -Wno-comment"
+ if $contains 'fprintf' `./findhdr stdio.h` >/dev/null 2>&1; then
+ :
+ else
+ dflt="$dflt -Wno-implicit"
+ fi
+ ;;
+ *) dflt="none";;
+ esac
+ ;;
+' ') dflt="none";;
+*) dflt="$warnflags";;
+esac
+
+rp="Any $cc flags to enable warnings?"
+. ./myread
+case "$ans" in
+none) warnflags=' ';;
+*) warnflags="$ans";;
+esac
+
diff --git a/mcon/U/yacc.U b/mcon/U/yacc.U
new file mode 100644
index 0000000..0a4abfb
--- /dev/null
+++ b/mcon/U/yacc.U
@@ -0,0 +1,90 @@
+?RCS: $Id$
+?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: yacc.U,v $
+?RCS: Revision 3.0.1.1 1994/05/13 15:28:48 ram
+?RCS: patch27: added byacc as another alternative (ADO)
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:10:03 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:yacc yaccflags: Guess Myread Loc Oldconfig byacc bison cat test
+?MAKE: -pick add $@ %<
+?S:yacc:
+?S: This variable holds the name of the compiler compiler we
+?S: want to use in the Makefile. It can be yacc, byacc, or bison -y.
+?S:.
+?S:yaccflags:
+?S: This variable contains any additional yacc flags desired by the
+?S: user. It is up to the Makefile to use this.
+?S:.
+?T:comp
+: determine compiler compiler
+echo " "
+comp='yacc'
+if $test -f "$byacc"; then
+ comp="byacc or $comp"
+fi
+if $test -f "$bison"; then
+ comp="$comp or bison -y"
+fi
+case "$yacc" in
+'')
+ yacc=`./loc yacc yacc $pth`
+ if $test -f "$yacc"; then
+ dflt='yacc'
+ elif $test -f "$byacc"; then
+ dflt='byacc'
+ elif $test -f "$bison"; then
+ dflt='bison'
+ else
+ dflt=''
+ fi
+ ;;
+*) dflt="$yacc";;
+esac
+rp="Which compiler compiler ($comp) shall I use?"
+. ./myread
+yacc="$ans"
+case "$yacc" in
+*bis*)
+ case "$yacc" in
+ *-y*) ;;
+ *)
+ yacc="$yacc -y"
+ echo "(Adding -y option to bison to get yacc-compatible behaviour.)"
+ ;;
+ esac
+ ;;
+esac
+
+@if yaccflags
+: see if we need extra yacc flags
+dflt="$yaccflags"
+case "$dflt" in
+'') dflt=none;;
+esac
+$cat <<EOH
+
+Your yacc program may need extra flags to normally process the parser sources.
+Do NOT specify any -d or -v flags here, since those are explicitly known
+by the various Makefiles. However, if your machine has strange/undocumented
+options (like -Sr# on SCO to specify the maximum number of grammar rules), then
+please add them here. To use no flags, specify the word "none".
+
+EOH
+rp="Any additional yacc flags?"
+. ./myread
+case "$ans" in
+none) yaccflags='';;
+*) yaccflags="$ans";;
+esac
+
+@end