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/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.U349
-rw-r--r--mcon/U/Csym.U97
-rw-r--r--mcon/U/End.U27
-rw-r--r--mcon/U/Extract.U105
-rw-r--r--mcon/U/Extractall.U51
-rw-r--r--mcon/U/Filexp.U69
-rw-r--r--mcon/U/Findhdr.U126
-rw-r--r--mcon/U/Finish.U141
-rw-r--r--mcon/U/Getfile.U339
-rw-r--r--mcon/U/Guess.U228
-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/Loc.U381
-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/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.U687
-rw-r--r--mcon/U/Oldsym.U66
-rw-r--r--mcon/U/Options.U363
-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/Setvar.U50
-rw-r--r--mcon/U/Signal.U271
-rw-r--r--mcon/U/Tr.U103
-rw-r--r--mcon/U/Typedef.U63
-rw-r--r--mcon/U/Unix.U64
-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.U79
-rw-r--r--mcon/U/active.U50
-rw-r--r--mcon/U/afs.U55
-rw-r--r--mcon/U/alignbytes.U64
-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.U99
-rw-r--r--mcon/U/cc.U58
-rw-r--r--mcon/U/ccflags.U403
-rw-r--r--mcon/U/cf_email.U58
-rw-r--r--mcon/U/cf_name.U72
-rw-r--r--mcon/U/cf_who.U62
-rw-r--r--mcon/U/charorder.U143
-rw-r--r--mcon/U/charsize.U58
-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.U101
-rw-r--r--mcon/U/d_PORTAR.U79
-rw-r--r--mcon/U/d_SHM_MAC.U141
-rw-r--r--mcon/U/d_access.U74
-rw-r--r--mcon/U/d_alarm.U33
-rw-r--r--mcon/U/d_attribut.U64
-rw-r--r--mcon/U/d_bcmp.U44
-rw-r--r--mcon/U/d_bcopy.U44
-rw-r--r--mcon/U/d_brokstat.U75
-rw-r--r--mcon/U/d_bsdjmp.U86
-rw-r--r--mcon/U/d_byacc.U33
-rw-r--r--mcon/U/d_bzero.U44
-rw-r--r--mcon/U/d_casti32.U87
-rw-r--r--mcon/U/d_castneg.U143
-rw-r--r--mcon/U/d_cbrt.U32
-rw-r--r--mcon/U/d_charsprf.U52
-rw-r--r--mcon/U/d_chown.U33
-rw-r--r--mcon/U/d_chroot.U33
-rw-r--r--mcon/U/d_chsize.U32
-rw-r--r--mcon/U/d_ckeypad.U54
-rw-r--r--mcon/U/d_closedir.U107
-rw-r--r--mcon/U/d_const.U66
-rw-r--r--mcon/U/d_crypt.U76
-rw-r--r--mcon/U/d_csh.U62
-rw-r--r--mcon/U/d_ctermid.U31
-rw-r--r--mcon/U/d_cuserid.U34
-rw-r--r--mcon/U/d_dbl_dig.U61
-rw-r--r--mcon/U/d_debugging.U42
-rw-r--r--mcon/U/d_difftime.U33
-rw-r--r--mcon/U/d_dlerror.U46
-rw-r--r--mcon/U/d_dlopen.U45
-rw-r--r--mcon/U/d_dosuid.U169
-rw-r--r--mcon/U/d_drem.U35
-rw-r--r--mcon/U/d_dup2.U31
-rw-r--r--mcon/U/d_eofpipe.U93
-rw-r--r--mcon/U/d_euc2jis.U32
-rw-r--r--mcon/U/d_fchmod.U32
-rw-r--r--mcon/U/d_fchown.U32
-rw-r--r--mcon/U/d_fcntl.U31
-rw-r--r--mcon/U/d_fd_set.U138
-rw-r--r--mcon/U/d_ffs.U33
-rw-r--r--mcon/U/d_fgetpos.U31
-rw-r--r--mcon/U/d_flexfnam.U77
-rw-r--r--mcon/U/d_flock.U31
-rw-r--r--mcon/U/d_fmod.U34
-rw-r--r--mcon/U/d_fork.U33
-rw-r--r--mcon/U/d_fsetpos.U31
-rw-r--r--mcon/U/d_ftime.U78
-rw-r--r--mcon/U/d_ftrncate.U31
-rw-r--r--mcon/U/d_gconvert.U147
-rw-r--r--mcon/U/d_getgrps.U33
-rw-r--r--mcon/U/d_gethbynm.U32
-rw-r--r--mcon/U/d_gethent.U31
-rw-r--r--mcon/U/d_gethid.U31
-rw-r--r--mcon/U/d_gethname.U287
-rw-r--r--mcon/U/d_getlogin.U34
-rw-r--r--mcon/U/d_getopt.U31
-rw-r--r--mcon/U/d_getpagsz.U104
-rw-r--r--mcon/U/d_getpgid.U34
-rw-r--r--mcon/U/d_getpgrp.U108
-rw-r--r--mcon/U/d_getpgrp2.U32
-rw-r--r--mcon/U/d_getppid.U34
-rw-r--r--mcon/U/d_getprior.U31
-rw-r--r--mcon/U/d_getpwent.U40
-rw-r--r--mcon/U/d_getwd.U41
-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_hidnet.U68
-rw-r--r--mcon/U/d_htonl.U88
-rw-r--r--mcon/U/d_inetaton.U34
-rw-r--r--mcon/U/d_inetd.U70
-rw-r--r--mcon/U/d_internet.U52
-rw-r--r--mcon/U/d_isascii.U57
-rw-r--r--mcon/U/d_itimer.U32
-rw-r--r--mcon/U/d_keepsig.U81
-rw-r--r--mcon/U/d_killpg.U33
-rw-r--r--mcon/U/d_link.U31
-rw-r--r--mcon/U/d_linuxstd.U55
-rw-r--r--mcon/U/d_locconv.U33
-rw-r--r--mcon/U/d_lockf.U33
-rw-r--r--mcon/U/d_lstat.U31
-rw-r--r--mcon/U/d_mblen.U34
-rw-r--r--mcon/U/d_mbstowcs.U32
-rw-r--r--mcon/U/d_mbtowc.U32
-rw-r--r--mcon/U/d_memalign.U29
-rw-r--r--mcon/U/d_memccpy.U33
-rw-r--r--mcon/U/d_memchr.U32
-rw-r--r--mcon/U/d_memcmp.U35
-rw-r--r--mcon/U/d_memcpy.U35
-rw-r--r--mcon/U/d_memmove.U34
-rw-r--r--mcon/U/d_memset.U35
-rw-r--r--mcon/U/d_mkdir.U33
-rw-r--r--mcon/U/d_mkfifo.U36
-rw-r--r--mcon/U/d_mktime.U33
-rw-r--r--mcon/U/d_mmap.U31
-rw-r--r--mcon/U/d_msem_lck.U28
-rw-r--r--mcon/U/d_msg.U45
-rw-r--r--mcon/U/d_msgctl.U31
-rw-r--r--mcon/U/d_msgget.U31
-rw-r--r--mcon/U/d_msgrcv.U31
-rw-r--r--mcon/U/d_msgsnd.U31
-rw-r--r--mcon/U/d_msync.U31
-rw-r--r--mcon/U/d_munmap.U31
-rw-r--r--mcon/U/d_newsadm.U72
-rw-r--r--mcon/U/d_nice.U33
-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_passwd.U23
-rw-r--r--mcon/U/d_pathconf.U55
-rw-r--r--mcon/U/d_pause.U34
-rw-r--r--mcon/U/d_perror.U44
-rw-r--r--mcon/U/d_pidcheck.U75
-rw-r--r--mcon/U/d_pipe.U34
-rw-r--r--mcon/U/d_poll.U36
-rw-r--r--mcon/U/d_popen.U31
-rw-r--r--mcon/U/d_portable.U71
-rw-r--r--mcon/U/d_pread.U29
-rw-r--r--mcon/U/d_preadv.U30
-rw-r--r--mcon/U/d_psignal.U31
-rw-r--r--mcon/U/d_pwrite.U29
-rw-r--r--mcon/U/d_pwritev.U30
-rw-r--r--mcon/U/d_raster.U57
-rw-r--r--mcon/U/d_rdchk.U33
-rw-r--r--mcon/U/d_readdir.U79
-rw-r--r--mcon/U/d_readlink.U34
-rw-r--r--mcon/U/d_regcmp.U80
-rw-r--r--mcon/U/d_rename.U33
-rw-r--r--mcon/U/d_rmdir.U32
-rw-r--r--mcon/U/d_rusage.U36
-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.U31
-rw-r--r--mcon/U/d_scandir.U31
-rw-r--r--mcon/U/d_scannl.U74
-rw-r--r--mcon/U/d_scorfl.U58
-rw-r--r--mcon/U/d_select.U33
-rw-r--r--mcon/U/d_sem.U45
-rw-r--r--mcon/U/d_semctl.U31
-rw-r--r--mcon/U/d_semget.U31
-rw-r--r--mcon/U/d_semop.U31
-rw-r--r--mcon/U/d_setegid.U32
-rw-r--r--mcon/U/d_seteuid.U32
-rw-r--r--mcon/U/d_setgrps.U33
-rw-r--r--mcon/U/d_setlnbuf.U36
-rw-r--r--mcon/U/d_setlocale.U33
-rw-r--r--mcon/U/d_setpgid.U37
-rw-r--r--mcon/U/d_setpgrp.U116
-rw-r--r--mcon/U/d_setpgrp2.U32
-rw-r--r--mcon/U/d_setprior.U31
-rw-r--r--mcon/U/d_setregid.U46
-rw-r--r--mcon/U/d_setreuid.U46
-rw-r--r--mcon/U/d_setrgid.U32
-rw-r--r--mcon/U/d_setruid.U32
-rw-r--r--mcon/U/d_setsid.U34
-rw-r--r--mcon/U/d_sgndchr.U59
-rw-r--r--mcon/U/d_shm.U45
-rw-r--r--mcon/U/d_shmat.U93
-rw-r--r--mcon/U/d_shmctl.U31
-rw-r--r--mcon/U/d_shmdt.U31
-rw-r--r--mcon/U/d_shmget.U31
-rw-r--r--mcon/U/d_sigaction.U61
-rw-r--r--mcon/U/d_sigblock.U31
-rw-r--r--mcon/U/d_sighold.U31
-rw-r--r--mcon/U/d_siglist.U39
-rw-r--r--mcon/U/d_sigsetjmp.U105
-rw-r--r--mcon/U/d_sigsetmk.U41
-rw-r--r--mcon/U/d_sigvec.U79
-rw-r--r--mcon/U/d_sjis2jis.U32
-rw-r--r--mcon/U/d_socket.U123
-rw-r--r--mcon/U/d_speedopt.U62
-rw-r--r--mcon/U/d_stat.U31
-rw-r--r--mcon/U/d_statblks.U46
-rw-r--r--mcon/U/d_stdstdio.U325
-rw-r--r--mcon/U/d_strccmp.U38
-rw-r--r--mcon/U/d_strchr.U95
-rw-r--r--mcon/U/d_strcoll.U33
-rw-r--r--mcon/U/d_strcspn.U32
-rw-r--r--mcon/U/d_strctcpy.U53
-rw-r--r--mcon/U/d_strdup.U32
-rw-r--r--mcon/U/d_strerror.U117
-rw-r--r--mcon/U/d_strftime.U31
-rw-r--r--mcon/U/d_strstr.U31
-rw-r--r--mcon/U/d_strtod.U34
-rw-r--r--mcon/U/d_strtok.U35
-rw-r--r--mcon/U/d_strtol.U32
-rw-r--r--mcon/U/d_strtoul.U34
-rw-r--r--mcon/U/d_strxfrm.U33
-rw-r--r--mcon/U/d_su_chown.U41
-rw-r--r--mcon/U/d_symlink.U32
-rw-r--r--mcon/U/d_syscall.U31
-rw-r--r--mcon/U/d_sysconf.U34
-rw-r--r--mcon/U/d_syslog.U44
-rw-r--r--mcon/U/d_system.U31
-rw-r--r--mcon/U/d_table.U34
-rw-r--r--mcon/U/d_tcgtpgrp.U34
-rw-r--r--mcon/U/d_tcstpgrp.U34
-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.U31
-rw-r--r--mcon/U/d_tzmin.U53
-rw-r--r--mcon/U/d_tzname.U42
-rw-r--r--mcon/U/d_ulimit.U31
-rw-r--r--mcon/U/d_umask.U34
-rw-r--r--mcon/U/d_usendir.U79
-rw-r--r--mcon/U/d_usleep.U31
-rw-r--r--mcon/U/d_uwait.U123
-rw-r--r--mcon/U/d_vfork.U91
-rw-r--r--mcon/U/d_voidsig.U89
-rw-r--r--mcon/U/d_volatile.U74
-rw-r--r--mcon/U/d_vprintf.U81
-rw-r--r--mcon/U/d_wait3.U31
-rw-r--r--mcon/U/d_wait4.U30
-rw-r--r--mcon/U/d_waitpid.U31
-rw-r--r--mcon/U/d_wcstombs.U32
-rw-r--r--mcon/U/d_wctomb.U34
-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/errnolist.U106
-rw-r--r--mcon/U/etc.U42
-rw-r--r--mcon/U/filexp.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.U117
-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_arpainet.U31
-rw-r--r--mcon/U/i_db.U146
-rw-r--r--mcon/U/i_dbm.U79
-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_fcntl.U61
-rw-r--r--mcon/U/i_float.U35
-rw-r--r--mcon/U/i_gdbm.U53
-rw-r--r--mcon/U/i_grp.U31
-rw-r--r--mcon/U/i_inttypes.U35
-rw-r--r--mcon/U/i_limits.U33
-rw-r--r--mcon/U/i_locale.U32
-rw-r--r--mcon/U/i_malloc.U31
-rw-r--r--mcon/U/i_math.U34
-rw-r--r--mcon/U/i_memory.U65
-rw-r--r--mcon/U/i_ndbm.U53
-rw-r--r--mcon/U/i_neterrno.U65
-rw-r--r--mcon/U/i_niin.U45
-rw-r--r--mcon/U/i_pwd.U162
-rw-r--r--mcon/U/i_regex.U35
-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_sysmman.U34
-rw-r--r--mcon/U/i_sysndir.U31
-rw-r--r--mcon/U/i_sysparam.U31
-rw-r--r--mcon/U/i_sysresrc.U34
-rw-r--r--mcon/U/i_sysselct.U39
-rw-r--r--mcon/U/i_syssock.U32
-rw-r--r--mcon/U/i_sysstat.U32
-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_syswait.U34
-rw-r--r--mcon/U/i_termio.U123
-rw-r--r--mcon/U/i_time.U171
-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.U164
-rw-r--r--mcon/U/i_vfork.U40
-rw-r--r--mcon/U/i_whoami.U35
-rw-r--r--mcon/U/inc.U39
-rw-r--r--mcon/U/install.U194
-rw-r--r--mcon/U/intsize.U124
-rw-r--r--mcon/U/ipc.U171
-rw-r--r--mcon/U/issymlink.U85
-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.U132
-rw-r--r--mcon/U/libs.U242
-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/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.U171
-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.U268
-rw-r--r--mcon/U/models.U214
-rw-r--r--mcon/U/modetype.U40
-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.U254
-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/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.U59
-rw-r--r--mcon/U/patchlevel.U35
-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.U118
-rw-r--r--mcon/U/ptrsize.U58
-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.U109
-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.U92
-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.U59
-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.U93
-rw-r--r--mcon/U/vaproto.U65
-rw-r--r--mcon/U/voidflags.U168
-rw-r--r--mcon/U/warnflags.U55
-rw-r--r--mcon/U/yacc.U90
453 files changed, 32635 insertions, 0 deletions
diff --git a/mcon/U/AAAAA.U b/mcon/U/AAAAA.U
new file mode 100644
index 0000000..b2f6211
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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/Begin.U b/mcon/U/Begin.U
new file mode 100644
index 0000000..c05d239
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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..ac1b513
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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 <<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..121ce9d
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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..a18ae1d
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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..a8af2e0
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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..04336c2
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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..3d71a2e
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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..1dfcf70
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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 explicitely 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..ab6bf7c
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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..feaef31
--- /dev/null
+++ b/mcon/U/Cross.U
@@ -0,0 +1,349 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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
+: 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=/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..e7c7c4b
--- /dev/null
+++ b/mcon/U/Csym.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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 bypasss 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 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
+: 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;
+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 lifes so easy! :-)
+?X: (An alternative for the future would be to use our knowledge about gcc
+?X: to force a -fno-builtin option in the compile test, in case the 'char'
+?X: trick is obsoleted by future gcc releases). -- RAM
+?X:
+?X: Lastly, gcc 3.4 otimizes &missing == 0 away, so we use + 2 instead now.
+?X: The GNU folks like to do weird things, don't they? -- RAM, 2004-06-05
+?X:
+ echo "extern char $1$tdc; int main() { return &$1$tc + 2; }" > t.c;
+ if $cc $ccflags $ldflags -o t t.c $libs >/dev/null 2>&1;
+ then tval=true;
+ else tval=false;
+ fi;
+ $rm -f t t.c;;
+ esac;;
+*)
+ case "$tval" in
+ $define) tval=true;;
+ *) tval=false;;
+ esac;;
+esac;
+eval "$2=$tval"'
+
diff --git a/mcon/U/End.U b/mcon/U/End.U
new file mode 100644
index 0000000..165b5af
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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..d01d324
--- /dev/null
+++ b/mcon/U/Extract.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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 dir file
+: script used to extract .SH files with variable substitutions
+cat >extract <<EOS
+CONFIG=true
+SRC="$src"
+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..e764c20
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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..7602808
--- /dev/null
+++ b/mcon/U/Filexp.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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
+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..50f7ba7
--- /dev/null
+++ b/mcon/U/Findhdr.U
@@ -0,0 +1,126 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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 test tr rm +usrinc awk cat startsh \
+ cppstdin cppminus +cppflags eunicefix osname
+?MAKE: -pick add $@ %<
+?LINT:define fieldn
+?S:fieldn:
+?S: This variable is used internally by Configure. It contains the position
+?S: of the included file name in cpp output. That is to say, when cpp
+?S: pre-processes a #include <file> line, it replaces it by a # line which
+?S: contains the original position in the input file and the full name of
+?S: included file, between "quotes".
+?S:.
+?V:fieldn
+?F:./findhdr !fieldn
+?T:cline pos wanted name awkprg cppfilter testaccess status usrincdir
+: determine filename position in cpp output
+echo " "
+echo "Computing filename position in cpp output for #include directives..." >&4
+echo '#include <stdio.h>' > foo.c
+case "$osname" in
+vos)
+ testaccess=-e
+?X: VOS: path component separator is >
+ cppfilter="tr '\\\\>' '/' |"
+ ;;
+*)
+ testaccess=-r
+ cppfilter=''
+ ;;
+esac
+$cat >fieldn <<EOF
+$startsh
+$cppstdin $cppflags $cppminus <foo.c 2>/dev/null | \
+$grep '^[ ]*#.*stdio\.h' | \
+while read cline; do
+ pos=1
+ set \$cline
+ while $test \$# -gt 0; do
+ if $test $testaccess \`echo \$1 | $tr -d '"'\`; then
+ echo "\$pos"
+ exit 0
+ fi
+ shift
+ pos=\`expr \$pos + 1\`
+ done
+done
+EOF
+chmod +x fieldn
+fieldn=`./fieldn`
+$rm -f foo.c fieldn
+case $fieldn in
+'') pos='???';;
+1) pos=first;;
+2) pos=second;;
+3) pos=third;;
+*) pos="${fieldn}th";;
+esac
+echo "Your cpp writes the filename in the $pos field of the line."
+
+?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..2ed7bd9
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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)
+ $rm -rf UU
+ echo "Extraction done."
+ 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 explicitely 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/Getfile.U b/mcon/U/Getfile.U
new file mode 100644
index 0000000..fe917ad
--- /dev/null
+++ b/mcon/U/Getfile.U
@@ -0,0 +1,339 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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
+ [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..3459325
--- /dev/null
+++ b/mcon/U/Guess.U
@@ -0,0 +1,228 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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 explicitely 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: 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:.
+?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:.
+?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:.
+?F:./bsd ./usg ./v7 ./osf1 ./eunice ./xenix ./venix ./dos ./os2 ./gnu ./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
+d_bsd="$undef"
+d_linux="$undef"
+d_dos="$undef"
+d_os2="$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
+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
+ case "X${MACHTYPE:-nonesuchmach}" in
+ cygwin) echo "hah!... you're running under Cygwin!";;
+ *) echo "got it... you're running DOS with DJGPP!";;
+ esac
+ echo exit 0 >dos
+ d_dos="$define"
+ else
+ $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
+$eunicefix bsd usg v7 osf1 eunice xenix venix dos os2 gnu linux
+$rm -f foo
+
diff --git a/mcon/U/Head.U b/mcon/U/Head.U
new file mode 100644
index 0000000..1ee0e6b
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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 at
+# http://sourceforge.net/projects/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> PL<PATCHLEVEL>]
+
+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) ;;
+ *) 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 compromize 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 explicitely, 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..e06282f
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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 explicitely 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..892579d
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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..64fd37a
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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 explicitely 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..deccaf8
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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: 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/Loc.U b/mcon/U/Loc.U
new file mode 100644
index 0000000..bf8c056
--- /dev/null
+++ b/mcon/U/Loc.U
@@ -0,0 +1,381 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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 Mcc awk ar bash bison byacc cat chgrp chmod chown \
+ comm compress cp cpio cpp csh date echo egrep emacs expr find flex \
+ gmake gzip grep inews ksh less line lint ln lp lpr ls mail mailx \
+ make mkdir more mv nm nroff perl pg pmake pr rm rmail sed sendmail \
+ shar sleep smail sort submit tail tar tbl tee test touch tr troff \
+ uname uniq uuname vi zcat zip: eunicefix n c startsh Instruct Warn
+?MAKE: -pick weed $@ %<
+?LINT: describe Mcc awk ar bash bison byacc cat chgrp chmod chown \
+ comm compress cp cpio cpp csh date echo egrep emacs expr find flex \
+ gmake gzip grep inews ksh less line lint ln lp lpr ls mail mailx \
+ make mkdir more mv nm nroff perl pg pmake pr rm rmail sed sendmail \
+ shar sleep smail sort submit tail tar tbl tee test touch tr troff \
+ uname uniq uuname vi zcat zip
+?V::pth loclist trylist
+?F:./loc
+?T:thisthing thing xxx dir file say DJGPP
+?T:_test _grep _cp _gmake _egrep _ln _make dflt
+?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
+?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
+?gzip:gzip
+?inews:inews
+?ksh:ksh
+?less:less
+?line:line
+?lint:lint
+?ln:ln
+?lp:lp
+?lpr:lpr
+?mail:mail
+?mailx:mailx
+?make:make
+?more:more
+?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
+?zcat:zcat
+?zip:zip
+"
+?LINT: set awk ar bash bison byacc cat chgrp chmod chown \
+ comm compress cp cpio cpp csh date echo emacs expr find flex \
+ gmake gzip grep inews ksh less line lint lp lpr ls mail mailx \
+ mkdir more mv nm nroff perl pg pmake pr rm rmail sed sendmail \
+ shar sleep smail sort submit tail tar tbl tee touch tr troff \
+ uname uniq uuname vi zcat zip
+pth=`echo $PATH | sed -e "s/$p_/ /g"`
+pth="$pth /lib /usr/lib"
+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."
+ xxx=`./loc $file $file $pth`
+ fi
+ ;;
+ '') xxx=`./loc $file $file $pth`;;
+ *) xxx=`./loc $xxx $xxx $pth`;;
+ esac
+ eval $file=$xxx$_exe
+ 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 setting!" >&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."
+ xxx=`./loc $file $file $pth`
+ fi
+ ;;
+ '') xxx=`./loc $file $file $pth`;;
+ *) xxx=`./loc $xxx $xxx $pth`;;
+ esac
+ eval $file=$xxx$_exe
+ 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)
+ echo "Substituting grep for egrep."
+ egrep=$grep
+ _egrep=$_grep
+ ;;
+esac
+@if ln
+case "$ln" in
+ln)
+ echo "Substituting cp for ln."
+ ln=$cp
+ _ln=$_cp
+ ;;
+esac
+@end
+@if make || gmake
+case "$make" in
+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) ;;
+*) # We can't have osname yet.
+ if test -f "/system/gnu_library/bin/ar.pm"; then # Stratus VOS
+ # Assume that gmake, if found, is definitely GNU make
+ # and prefer it over the system make.
+ echo "Substituting gmake for make."
+ make=$gmake
+ _make=$_gmake
+ fi
+ ;;
+esac
+@end
+case "$test" in
+test)
+ echo "Hopefully test is built into your sh."
+ ;;
+*)
+ 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 "Hopefully echo is built into your sh."
+ ;;
+?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..f61a876
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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..8e2556c
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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..61c226a
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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: dependancies 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..e9fb039
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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: dependancies 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/Mkdirp.U b/mcon/U/Mkdirp.U
new file mode 100644
index 0000000..bad6081
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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..92318a8
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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..0ab97f4
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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..330f503
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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..fe40801
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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..bb218b0
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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..1061aa9
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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..0a976bf
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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..9e079dd
--- /dev/null
+++ b/mcon/U/Oldconfig.U
@@ -0,0 +1,687 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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
+?D:osname=''
+?LINT:change n c sh
+?LINT:extern hostarch
+?LINT:change hostarch
+: 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"
+$test -f "$uname$_exe" && 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 enought 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="$3"
+ ;;
+ *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
+
+: 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
+ tmp_n="$n"
+ tmp_c="$c"
+ tmp_sh="$sh"
+ . ../config.sh
+ cp ../config.sh .
+ n="$tmp_n"
+ c="$tmp_c"
+ hint=previous
+ ;;
+ esac
+fi
+?X: remember, case indentation is wrong--RAM
+;;
+*)
+ echo " "
+ echo "Fetching default answers from $config_sh..." >&4
+ tmp_n="$n"
+ tmp_c="$c"
+ tmp_sh="$sh"
+ cd ..
+?X: preserve symbolic links, if any
+ cp $config_sh config.sh 2>/dev/null
+ chmod +w config.sh
+ . ./config.sh
+ cd UU
+ cp ../config.sh .
+ n="$tmp_n"
+ c="$tmp_c"
+ 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
+
+. ./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..8b11133
--- /dev/null
+++ b/mcon/U/Oldsym.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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
+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..a38f565
--- /dev/null
+++ b/mcon/U/Options.U
@@ -0,0 +1,363 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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 setttings
+?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 prependend 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> PL<PATCHLEVEL>." >&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
+
+: run the defines and the undefines, if any, but leave the file out there...
+touch optdef.sh
+. ./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..dae8dba
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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..46b0b15
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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..255fcb6
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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/Setvar.U b/mcon/U/Setvar.U
new file mode 100644
index 0000000..75b640c
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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 explicitely 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..6ac5eb8
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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
+?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 "exit(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..a7320fe
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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/Typedef.U b/mcon/U/Typedef.U
new file mode 100644
index 0000000..fd16777
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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..4c05c7b
--- /dev/null
+++ b/mcon/U/Unix.U
@@ -0,0 +1,64 @@
+?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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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 accross 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: Oldconfig
+?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:.
+?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
+
+@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..ffab53e
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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..d015400
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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 explicitely 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..d7ef599
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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 explicitely 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..7519fac
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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..a13f30f
--- /dev/null
+++ b/mcon/U/abortsig.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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 explicitely 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
+#include <signal.h>
+caught() { exit(0); }
+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..3a1a65c
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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..4cf024b
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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 explicitely 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..f31ec80
--- /dev/null
+++ b/mcon/U/alignbytes.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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: Myread cat cc ccflags rm
+?MAKE: -pick add $@ %<
+?S:alignbytes:
+?S: This variable holds the number of bytes required to align a
+?S: double. Usual values are 2, 4 and 8.
+?S:.
+?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:.
+?F:!try
+: check for alignment requirements
+echo " "
+case "$alignbytes" in
+'') echo "Checking alignment constraints..." >&4
+ $cat >try.c <<'EOCP'
+struct foobar {
+ char foo;
+ double bar;
+} try;
+int main()
+{
+ printf("%d\n", (char *)&try.bar - (char *)&try.foo);
+}
+EOCP
+ if $cc $ccflags try.c -o try >/dev/null 2>&1; then
+ dflt=`./try`
+ else
+ dflt='8'
+ echo "(I can't seem to compile the test program...)"
+ fi
+ ;;
+*) dflt="$alignbytes"
+ ;;
+esac
+rp="Doubles must be aligned on a how-many-byte boundary?"
+. ./myread
+alignbytes="$ans"
+$rm -f try.c try
+
diff --git a/mcon/U/archlib.U b/mcon/U/archlib.U
new file mode 100644
index 0000000..d0c2b29
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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..231e159
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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..3fc675c
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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..b5ccfbc
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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..81c0a96
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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 explicitely 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..c56ac01
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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..a337080
--- /dev/null
+++ b/mcon/U/byteorder.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: byteorder.U,v $
+?RCS: Revision 3.0.1.2 1997/02/28 15:24:55 ram
+?RCS: patch61: no longer ask the user if the test runs ok
+?RCS:
+?RCS: Revision 3.0.1.1 1994/10/29 16:02:58 ram
+?RCS: patch36: added ?F: line for metalint file checking
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:05:28 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:byteorder: cat Myread Oldconfig Loc +cc +ccflags rm
+?MAKE: -pick add $@ %<
+?S:byteorder:
+?S: This variable holds the byte order. In the following, larger digits
+?S: indicate more significance. The variable byteorder is either 4321
+?S: on a big-endian machine, or 1234 on a little-endian, or 87654321
+?S: on a Cray ... or 3412 with weird order !
+?S:.
+?C:BYTEORDER:
+?C: This symbol hold the hexadecimal constant defined in byteorder,
+?C: i.e. 0x1234 or 0x4321, etc...
+?C:.
+?H:#define BYTEORDER 0x$byteorder /* large digits for MSB */
+?H:.
+?T:xxx_prompt
+?F:!try
+: check for ordering of bytes in a long
+case "$byteorder" in
+'')
+ $cat <<'EOM'
+
+In the following, larger digits indicate more significance. A big-endian
+machine like a Pyramid or a Motorola 680?0 chip will come out to 4321. A
+little-endian machine like a Vax or an Intel 80?86 chip would be 1234. Other
+machines may have weird orders like 3412. A Cray will report 87654321. If
+the test program works the default is probably right.
+I'm now running the test program...
+EOM
+ $cat >try.c <<'EOCP'
+#include <stdio.h>
+int main()
+{
+ int i;
+ union {
+ unsigned long l;
+ char c[sizeof(long)];
+ } u;
+
+ if (sizeof(long) > 4)
+ u.l = (0x08070605L << 32) | 0x04030201L;
+ else
+ u.l = 0x04030201L;
+ for (i = 0; i < sizeof(long); i++)
+ printf("%c", u.c[i]+'0');
+ printf("\n");
+ exit(0);
+}
+EOCP
+ xxx_prompt=y
+ if $cc $ccflags -o try try.c >/dev/null 2>&1 && ./try > /dev/null; then
+ dflt=`./try`
+ case "$dflt" in
+ [1-4][1-4][1-4][1-4]|12345678|87654321)
+ echo "(The test program ran ok.)"
+ echo "byteorder=$dflt"
+ xxx_prompt=n
+ ;;
+ ????|????????) echo "(The test program ran ok.)" ;;
+ *) echo "(The test program didn't run right for some reason.)" ;;
+ esac
+ else
+ dflt='4321'
+ cat <<'EOM'
+(I can't seem to compile the test program. Guessing big-endian...)
+EOM
+ fi
+ case "$xxx_prompt" in
+ y)
+ rp="What is the order of bytes in a long?"
+ . ./myread
+ byteorder="$ans"
+ ;;
+ *) byteorder=$dflt
+ ;;
+ esac
+ ;;
+esac
+$rm -f try.c try
+
diff --git a/mcon/U/cc.U b/mcon/U/cc.U
new file mode 100644
index 0000000..15366ff
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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..8e61474
--- /dev/null
+++ b/mcon/U/ccflags.U
@@ -0,0 +1,403 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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 versionning 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: explicitely 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 locincpth: test cat \
+ Myread Guess Options Oldconfig gccversion mips_type +usrinc \
+ package contains rm +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: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=''
+?INIT:: Possible local include directories to search.
+?INIT:: Set locincpth to "" in a hint file to defeat local include searches.
+?INIT:locincpth="/usr/local/include /opt/local/include /usr/gnu/include"
+?INIT:locincpth="$locincpth /opt/gnu/include /usr/GNU/include /opt/GNU/include"
+?INIT::
+?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';;
+'') dflt='-O';;
+*) dflt="$optimize";;
+esac
+$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
+rp="What optimizer/debugger flag should be used?"
+. ./myread
+optimize="$ans"
+case "$optimize" in
+'none') optimize=" ";;
+esac
+
+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" by default
+ *) dflt="$dflt -W -Wall -Wformat=2";;
+ 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="$ccflags $dflt" ;;
+*) 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 $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'
+#include <stdio.h>
+int main() { exit(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 -f try try.* core
+
diff --git a/mcon/U/cf_email.U b/mcon/U/cf_email.U
new file mode 100644
index 0000000..caad32e
--- /dev/null
+++ b/mcon/U/cf_email.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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 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
+: 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 "$cf_email" in
+ '') dflt="$cf_by@$myhostname$mydomain";;
+ *) 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..c1ea650
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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..2643d24
--- /dev/null
+++ b/mcon/U/cf_who.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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: Parens 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.
+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
+
diff --git a/mcon/U/charorder.U b/mcon/U/charorder.U
new file mode 100644
index 0000000..8ed5428
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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..ba6b9b3
--- /dev/null
+++ b/mcon/U/charsize.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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: cat rm Myread +cc +ccflags
+?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:.
+?F:!try
+: check for length of character
+echo " "
+case "$charsize" in
+'')
+ echo "Checking to see how big your characters are..." >&4
+ $cat >try.c <<'EOCP'
+#include <stdio.h>
+int main()
+{
+ printf("%d\n", sizeof(char));
+}
+EOCP
+ if $cc $ccflags -o try try.c >/dev/null 2>&1 ; then
+ dflt=`./try`
+ else
+ dflt='1'
+ echo "(I can't seem to compile the test program. Guessing...)"
+ fi
+ ;;
+*)
+ dflt="$charsize"
+ ;;
+esac
+rp="What is the size of a character (in bytes)?"
+. ./myread
+charsize="$ans"
+$rm -f try.c try
+
diff --git a/mcon/U/contains.U b/mcon/U/contains.U
new file mode 100644
index 0000000..fcfd216
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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..2473ef2
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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 <<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..7b0fa85
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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..d796ce8
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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..85d556d
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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..7685cd1
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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..29d1539
--- /dev/null
+++ b/mcon/U/d_NeWS.U
@@ -0,0 +1,101 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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
+
+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..55251c7
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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..f8e87aa
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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..2e1db7d
--- /dev/null
+++ b/mcon/U/d_access.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_access.U,v $
+?RCS: Revision 3.0 1993/08/18 12:05:42 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_access: test +cc cat +cppflags h_fcntl h_sysfile rm Inlibc Findhdr
+?MAKE: -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
+set access d_access
+eval $inlibc
+
+: 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() {
+ exit(R_OK);
+}
+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..589d125
--- /dev/null
+++ b/mcon/U/d_alarm.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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: Inlibc
+?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
+set alarm d_alarm
+eval $inlibc
+
diff --git a/mcon/U/d_attribut.U b/mcon/U/d_attribut.U
new file mode 100644
index 0000000..8ff5422
--- /dev/null
+++ b/mcon/U/d_attribut.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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 cat cc ccflags rm Setvar contains
+?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
+echo " "
+echo "Checking whether your compiler can handle __attribute__ ..." >&4
+$cat >attrib.c <<'EOCP'
+#include <stdio.h>
+void croak (char* pat,...) __attribute__((format(printf,1,2),noreturn));
+EOCP
+if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then
+ if $contains 'warning' attrib.out >/dev/null 2>&1; then
+ echo "Your C compiler doesn't fully support __attribute__."
+ val="$undef"
+ else
+ echo "Your C compiler supports __attribute__."
+ val="$define"
+ fi
+else
+ echo "Your C compiler doesn't seem to understand __attribute__ at all."
+ val="$undef"
+fi
+set d_attribut
+eval $setvar
+$rm -f attrib*
+
diff --git a/mcon/U/d_bcmp.U b/mcon/U/d_bcmp.U
new file mode 100644
index 0000000..ae2e4bd
--- /dev/null
+++ b/mcon/U/d_bcmp.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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: Inlibc
+?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
+set bcmp d_bcmp
+eval $inlibc
+
diff --git a/mcon/U/d_bcopy.U b/mcon/U/d_bcopy.U
new file mode 100644
index 0000000..2ae3ad8
--- /dev/null
+++ b/mcon/U/d_bcopy.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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: Inlibc
+?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
+set bcopy d_bcopy
+eval $inlibc
+
diff --git a/mcon/U/d_brokstat.U b/mcon/U/d_brokstat.U
new file mode 100644
index 0000000..a330dba
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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..da2f496
--- /dev/null
+++ b/mcon/U/d_bsdjmp.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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 explicitely 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
+?X: We can't check for these symbols with Inlibc because of the leading "_"
+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_byacc.U b/mcon/U/d_byacc.U
new file mode 100644
index 0000000..aa02d79
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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..6c7d87b
--- /dev/null
+++ b/mcon/U/d_bzero.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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: Inlibc
+?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
+set bzero d_bzero
+eval $inlibc
+
diff --git a/mcon/U/d_casti32.U b/mcon/U/d_casti32.U
new file mode 100644
index 0000000..7d24f08
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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 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 -f try try.*
+
diff --git a/mcon/U/d_castneg.U b/mcon/U/d_castneg.U
new file mode 100644
index 0000000..ce879df
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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 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 -f try.*
+
diff --git a/mcon/U/d_cbrt.U b/mcon/U/d_cbrt.U
new file mode 100644
index 0000000..11f8baa
--- /dev/null
+++ b/mcon/U/d_cbrt.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_cbrt.U,v $
+?RCS: Revision 3.0 1993/08/18 12:05:48 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_cbrt: Inlibc
+?MAKE: -pick add $@ %<
+?S:d_cbrt:
+?S: This variable conditionally defines the 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
+set cbrt d_cbrt
+eval $inlibc
+
diff --git a/mcon/U/d_charsprf.U b/mcon/U/d_charsprf.U
new file mode 100644
index 0000000..c7d5522
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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..c0fff39
--- /dev/null
+++ b/mcon/U/d_chown.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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: Inlibc
+?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
+set chown d_chown
+eval $inlibc
+
diff --git a/mcon/U/d_chroot.U b/mcon/U/d_chroot.U
new file mode 100644
index 0000000..c31ef3c
--- /dev/null
+++ b/mcon/U/d_chroot.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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: Inlibc
+?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
+set chroot d_chroot
+eval $inlibc
+
diff --git a/mcon/U/d_chsize.U b/mcon/U/d_chsize.U
new file mode 100644
index 0000000..236effb
--- /dev/null
+++ b/mcon/U/d_chsize.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_chsize.U,v $
+?RCS: Revision 3.0 1993/08/18 12:05:50 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_chsize: Inlibc
+?MAKE: -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
+set chsize d_chsize
+eval $inlibc
+
diff --git a/mcon/U/d_ckeypad.U b/mcon/U/d_ckeypad.U
new file mode 100644
index 0000000..0430877
--- /dev/null
+++ b/mcon/U/d_ckeypad.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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_closedir.U b/mcon/U/d_closedir.U
new file mode 100644
index 0000000..071f242
--- /dev/null
+++ b/mcon/U/d_closedir.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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: Inlibc 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
+set closedir d_closedir
+eval $inlibc
+
+@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 $ldflags -o closedir closedir.c $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_const.U b/mcon/U/d_const.U
new file mode 100644
index 0000000..4801d09
--- /dev/null
+++ b/mcon/U/d_const.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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()
+{
+ const char *foo;
+ const spug y;
+}
+EOCP
+if $cc -c $ccflags const.c >/dev/null 2>&1 ; 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..84906e6
--- /dev/null
+++ b/mcon/U/d_crypt.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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 Csym Setvar _a Inlibc
+?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
+echo " "
+set crypt d_crypt
+eval $inlibc
+case "$d_crypt" in
+$define) cryptlib='' ;;
+*) if set crypt val -f d_crypt; eval $csym; $val; then
+ echo 'crypt() found.' >&4
+ val="$define"
+ cryptlib=''
+ else
+ cryptlib=`./loc Slibcrypt$_a "" $xlibpth`
+ if $test -z "$cryptlib"; then
+ cryptlib=`./loc Mlibcrypt$_a "" $xlibpth`
+ else
+ cryptlib=-lcrypt
+ fi
+ if $test -z "$cryptlib"; then
+ cryptlib=`./loc Llibcrypt$_a "" $xlibpth`
+ else
+ cryptlib=-lcrypt
+ fi
+ if $test -z "$cryptlib"; then
+ cryptlib=`./loc libcrypt$_a "" $libpth`
+ else
+ cryptlib=-lcrypt
+ fi
+ if $test -z "$cryptlib"; then
+ echo 'crypt() NOT found.' >&4
+ val="$undef"
+ else
+ val="$define"
+ fi
+ fi
+ set d_crypt
+ eval $setvar
+ ;;
+esac
+
diff --git a/mcon/U/d_csh.U b/mcon/U/d_csh.U
new file mode 100644
index 0000000..c0a792e
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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..5f1f7ee
--- /dev/null
+++ b/mcon/U/d_ctermid.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_ctermid.U,v $
+?RCS: Revision 3.0 1993/08/18 12:05:54 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_ctermid: Inlibc
+?MAKE: -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
+set ctermid d_ctermid
+eval $inlibc
+
diff --git a/mcon/U/d_cuserid.U b/mcon/U/d_cuserid.U
new file mode 100644
index 0000000..a6d46c5
--- /dev/null
+++ b/mcon/U/d_cuserid.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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: Inlibc
+?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
+set cuserid d_cuserid
+eval $inlibc
+
diff --git a/mcon/U/d_dbl_dig.U b/mcon/U/d_dbl_dig.U
new file mode 100644
index 0000000..aa53e73
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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..fabe096
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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_difftime.U b/mcon/U/d_difftime.U
new file mode 100644
index 0000000..364ccbc
--- /dev/null
+++ b/mcon/U/d_difftime.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
+?RCS:
+?RCS: $Log: d_difftime.U,v $
+?RCS: Revision 3.0.1.1 1994/08/29 16:07:31 ram
+?RCS: patch32: created by ADO
+?RCS:
+?MAKE:d_difftime: Inlibc
+?MAKE: -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:.
+?C:HAS_DIFFTIME :
+?C: This symbol, if defined, indicates that the difftime routine is
+?C: available.
+?C:.
+?H:#$d_difftime HAS_DIFFTIME /**/
+?H:.
+?LINT:set d_difftime
+: see if difftime exists
+set difftime d_difftime
+eval $inlibc
+
diff --git a/mcon/U/d_dlerror.U b/mcon/U/d_dlerror.U
new file mode 100644
index 0000000..a3bb995
--- /dev/null
+++ b/mcon/U/d_dlerror.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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: Inlibc runnm
+?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:.
+?T: xxx_runnm
+?LINT:set d_dlerror
+?X: We don't permanently change runnm, but we do temporarily.
+?LINT: change runnm
+: see if dlerror exists
+?X: On NetBSD and FreeBSD, dlerror might be available, but it is in
+?X: /usr/lib/crt0.o, not in any of the libraries. Therefore, do not
+?X: use the nm extraction, but use a real compile and link test instead.
+xxx_runnm="$runnm"
+runnm=false
+set dlerror d_dlerror
+eval $inlibc
+runnm="$xxx_runnm"
+
diff --git a/mcon/U/d_dlopen.U b/mcon/U/d_dlopen.U
new file mode 100644
index 0000000..ad62c53
--- /dev/null
+++ b/mcon/U/d_dlopen.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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: Inlibc runnm
+?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:.
+?T: xxx_runnm
+?LINT:set d_dlopen
+?X: We don't permanently change runnm, but we do temporarily.
+?LINT: change runnm
+: see if dlopen exists
+?X: On NetBSD and FreeBSD, dlopen is available, but it is in
+?X: /usr/lib/crt0.o, not in any of the libraries. Therefore, do not
+?X: use the nm extraction, but use a real compile and link test instead.
+xxx_runnm="$runnm"
+runnm=false
+set dlopen d_dlopen
+eval $inlibc
+runnm="$xxx_runnm"
+
diff --git a/mcon/U/d_dosuid.U b/mcon/U/d_dosuid.U
new file mode 100644
index 0000000..a584e1a
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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..4da2414
--- /dev/null
+++ b/mcon/U/d_drem.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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: Inlibc
+?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
+set drem d_drem
+eval $inlibc
+
diff --git a/mcon/U/d_dup2.U b/mcon/U/d_dup2.U
new file mode 100644
index 0000000..070bfaa
--- /dev/null
+++ b/mcon/U/d_dup2.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_dup2.U,v $
+?RCS: Revision 3.0 1993/08/18 12:05:56 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_dup2: Inlibc
+?MAKE: -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
+set dup2 d_dup2
+eval $inlibc
+
diff --git a/mcon/U/d_eofpipe.U b/mcon/U/d_eofpipe.U
new file mode 100644
index 0000000..86b30a5
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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 explicitely 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_euc2jis.U b/mcon/U/d_euc2jis.U
new file mode 100644
index 0000000..a80406d
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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_fchmod.U b/mcon/U/d_fchmod.U
new file mode 100644
index 0000000..1939d78
--- /dev/null
+++ b/mcon/U/d_fchmod.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_fchmod.U,v $
+?RCS: Revision 3.0 1993/08/18 12:05:59 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_fchmod: Inlibc
+?MAKE: -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
+set fchmod d_fchmod
+eval $inlibc
+
diff --git a/mcon/U/d_fchown.U b/mcon/U/d_fchown.U
new file mode 100644
index 0000000..0efbbe2
--- /dev/null
+++ b/mcon/U/d_fchown.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_fchown.U,v $
+?RCS: Revision 3.0 1993/08/18 12:06:01 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_fchown: Inlibc
+?MAKE: -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
+set fchown d_fchown
+eval $inlibc
+
diff --git a/mcon/U/d_fcntl.U b/mcon/U/d_fcntl.U
new file mode 100644
index 0000000..24ea9b2
--- /dev/null
+++ b/mcon/U/d_fcntl.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_fcntl.U,v $
+?RCS: Revision 3.0 1993/08/18 12:06:01 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_fcntl: Inlibc
+?MAKE: -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
+set fcntl d_fcntl
+eval $inlibc
+
diff --git a/mcon/U/d_fd_set.U b/mcon/U/d_fd_set.U
new file mode 100644
index 0000000..8e13de2
--- /dev/null
+++ b/mcon/U/d_fd_set.U
@@ -0,0 +1,138 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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
+?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
+#include <sys/types.h>
+#ifdef HAS_SOCKET
+#include <sys/socket.h> /* Might include <sys/bsdtypes.h> */
+#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_ffs.U b/mcon/U/d_ffs.U
new file mode 100644
index 0000000..cda3896
--- /dev/null
+++ b/mcon/U/d_ffs.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_ffs.U,v $
+?RCS: Revision 3.0 1993/08/18 12:06:03 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_ffs: Inlibc
+?MAKE: -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
+set ffs d_ffs
+eval $inlibc
+
diff --git a/mcon/U/d_fgetpos.U b/mcon/U/d_fgetpos.U
new file mode 100644
index 0000000..8553f96
--- /dev/null
+++ b/mcon/U/d_fgetpos.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_fgetpos.U,v $
+?RCS: Revision 3.0.1.1 1994/06/20 06:57:33 ram
+?RCS: patch30: created
+?RCS:
+?MAKE:d_fgetpos: Inlibc
+?MAKE: -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
+set fgetpos d_fgetpos
+eval $inlibc
+
diff --git a/mcon/U/d_flexfnam.U b/mcon/U/d_flexfnam.U
new file mode 100644
index 0000000..0f53a0b
--- /dev/null
+++ b/mcon/U/d_flexfnam.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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
+?LINT:set d_flexfnam
+: 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:
+rmlist="$rmlist /tmp/cf$$"
+$test -d /tmp/cf$$ || mkdir /tmp/cf$$
+first=123456789abcdef
+second=/tmp/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 /tmp/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 /tmp/cf$$ 123456789abcde*
+
diff --git a/mcon/U/d_flock.U b/mcon/U/d_flock.U
new file mode 100644
index 0000000..c3252e3
--- /dev/null
+++ b/mcon/U/d_flock.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_flock.U,v $
+?RCS: Revision 3.0 1993/08/18 12:06:05 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_flock: Inlibc
+?MAKE: -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
+set flock d_flock
+eval $inlibc
+
diff --git a/mcon/U/d_fmod.U b/mcon/U/d_fmod.U
new file mode 100644
index 0000000..bad72e7
--- /dev/null
+++ b/mcon/U/d_fmod.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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: Inlibc
+?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
+set fmod d_fmod
+eval $inlibc
+
diff --git a/mcon/U/d_fork.U b/mcon/U/d_fork.U
new file mode 100644
index 0000000..796aee3
--- /dev/null
+++ b/mcon/U/d_fork.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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: Inlibc
+?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
+set fork d_fork
+eval $inlibc
+
diff --git a/mcon/U/d_fsetpos.U b/mcon/U/d_fsetpos.U
new file mode 100644
index 0000000..ce3d195
--- /dev/null
+++ b/mcon/U/d_fsetpos.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_fsetpos.U,v $
+?RCS: Revision 3.0.1.1 1994/06/20 06:57:38 ram
+?RCS: patch30: created
+?RCS:
+?MAKE:d_fsetpos: Inlibc
+?MAKE: -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
+set fsetpos d_fsetpos
+eval $inlibc
+
diff --git a/mcon/U/d_ftime.U b/mcon/U/d_ftime.U
new file mode 100644
index 0000000..0e41cc7
--- /dev/null
+++ b/mcon/U/d_ftime.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_ftime.U,v $
+?RCS: Revision 3.0 1993/08/18 12:06:06 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_ftime d_gettimeod: Inlibc Setvar
+?MAKE: -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:
+set gettimeofday d_gettimeod
+eval $inlibc
+case "$d_gettimeod" in
+"$undef")
+ set ftime d_ftime
+ eval $inlibc
+ ;;
+*)
+ val="$undef"; set d_ftime; eval $setvar
+ ;;
+esac
+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..29202b2
--- /dev/null
+++ b/mcon/U/d_ftrncate.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_ftrncate.U,v $
+?RCS: Revision 3.0 1993/08/18 12:06:07 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_ftrncate: Inlibc
+?MAKE: -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
+set ftruncate d_ftrncate
+eval $inlibc
+
diff --git a/mcon/U/d_gconvert.U b/mcon/U/d_gconvert.U
new file mode 100644
index 0000000..367da20
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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 Inlibc rm _o
+?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 -f try try$_o
+ 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_getgrps.U b/mcon/U/d_getgrps.U
new file mode 100644
index 0000000..0cd16ea
--- /dev/null
+++ b/mcon/U/d_getgrps.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_getgrps.U,v $
+?RCS: Revision 3.0 1993/08/18 12:06:08 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_getgrps: Inlibc
+?MAKE: -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
+set getgroups d_getgrps
+eval $inlibc
+
diff --git a/mcon/U/d_gethbynm.U b/mcon/U/d_gethbynm.U
new file mode 100644
index 0000000..a7040ed
--- /dev/null
+++ b/mcon/U/d_gethbynm.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_gethbynm.U,v $
+?RCS: Revision 3.0 1993/08/18 12:06:08 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_gethbynm: Inlibc
+?MAKE: -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
+set gethostbyname d_gethbynm
+eval $inlibc
+
diff --git a/mcon/U/d_gethent.U b/mcon/U/d_gethent.U
new file mode 100644
index 0000000..fa1427f
--- /dev/null
+++ b/mcon/U/d_gethent.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_gethent.U,v $
+?RCS: Revision 3.0 1993/08/18 12:06:09 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_gethent: Inlibc
+?MAKE: -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
+set gethostent d_gethent
+eval $inlibc
+
diff --git a/mcon/U/d_gethid.U b/mcon/U/d_gethid.U
new file mode 100644
index 0000000..d19c9f8
--- /dev/null
+++ b/mcon/U/d_gethid.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_gethid.U,v $
+?RCS: Revision 3.0 1993/08/18 12:06:10 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_gethid: Inlibc
+?MAKE: -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
+set gethostid d_gethid
+eval $inlibc
+
diff --git a/mcon/U/d_gethname.U b/mcon/U/d_gethname.U
new file mode 100644
index 0000000..8ce181f
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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 explicitely 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_getlogin.U b/mcon/U/d_getlogin.U
new file mode 100644
index 0000000..abb9dd5
--- /dev/null
+++ b/mcon/U/d_getlogin.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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: Inlibc
+?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
+set getlogin d_getlogin
+eval $inlibc
+
diff --git a/mcon/U/d_getopt.U b/mcon/U/d_getopt.U
new file mode 100644
index 0000000..c5438b4
--- /dev/null
+++ b/mcon/U/d_getopt.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_getopt.U,v $
+?RCS: Revision 3.0 1993/08/18 12:06:13 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_getopt: Inlibc
+?MAKE: -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
+set getopt d_getopt
+eval $inlibc
+
diff --git a/mcon/U/d_getpagsz.U b/mcon/U/d_getpagsz.U
new file mode 100644
index 0000000..6083653
--- /dev/null
+++ b/mcon/U/d_getpagsz.U
@@ -0,0 +1,104 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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 Inlibc cat contains +cc +ccflags \
+ libs rm Findhdr
+?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
+set getpagesize d_getpagsz
+eval $inlibc
+
+@if pagesize || PAGESIZE_VALUE
+: determine the system page size
+echo " "
+guess=' (OK to guess)'
+case "$pagesize" in
+'')
+ $cat >page.c <<EOP
+extern int getpagesize();
+int main()
+{
+ 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>
+int main()
+{
+ printf("%d\n", 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..de6a1a7
--- /dev/null
+++ b/mcon/U/d_getpgid.U
@@ -0,0 +1,34 @@
+?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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_getpgid.U,v $
+?RCS: Revision 3.0.1.1 1997/02/28 15:33:44 ram
+?RCS: patch61: created
+?RCS:
+?MAKE:d_getpgid: Inlibc
+?MAKE: -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
+set getpgid d_getpgid
+eval $inlibc
+
diff --git a/mcon/U/d_getpgrp.U b/mcon/U/d_getpgrp.U
new file mode 100644
index 0000000..bc5f5d2
--- /dev/null
+++ b/mcon/U/d_getpgrp.U
@@ -0,0 +1,108 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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: Guess Inlibc Setvar cat rm \
+ +cc +ccflags +ldflags +libs 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 USG one needs none.
+?C:.
+?H:#$d_getpgrp HAS_GETPGRP /**/
+?H:#$d_bsdgetpgrp USE_BSD_GETPGRP /**/
+?H:.
+?F:!set !set.c
+?T:xxx
+?LINT:set d_getpgrp d_bsdgetpgrp
+: see if getpgrp exists
+set getpgrp d_getpgrp
+eval $inlibc
+
+@if USE_BSD_GETPGRP || d_bsdgetpgrp
+case "$d_getpgrp" in
+"$define")
+ echo " "
+ echo "Checking to see which flavor of getpgrp is in use..."
+ $cat >set.c <<EOP
+#$i_unistd I_UNISTD
+#include <sys/types.h>
+#ifdef I_UNISTD
+# include <unistd.h>
+#endif
+int main()
+{
+ if (getuid() == 0) {
+ printf("(I see you are running Configure as super-user...)\n");
+ setuid(1);
+ }
+#ifdef TRY_BSD_PGRP
+ if (getpgrp(1) == 0)
+ exit(0);
+#else
+ if (getpgrp() > 0)
+ exit(0);
+#endif
+ exit(1);
+}
+EOP
+ if $cc -DTRY_BSD_PGRP $ccflags $ldflags -o set set.c $libs >/dev/null 2>&1
+ && ./set
+ then
+ echo "You have to use getpgrp(pid) instead of getpgrp()." >&4
+ val="$define"
+ elif $cc $ccflags $ldflags -o set set.c $libs >/dev/null 2>&1 && ./set; then
+ echo "You have to use getpgrp() instead of getpgrp(pid)." >&4
+ val="$undef"
+ else
+ echo "I can't seem to compile and run the test program."
+ if ./usg; then
+ xxx="a USG one, i.e. you use getpgrp()."
+ else
+ # SVR4 systems can appear rather BSD-ish.
+ case "$i_unistd" in
+ $undef)
+ xxx="a BSD one, i.e. you use getpgrp(pid)."
+ val="$define"
+ ;;
+ $define)
+ xxx="probably a USG one, i.e. you use getpgrp()."
+ val="$undef"
+ ;;
+ esac
+ fi
+ echo "Assuming your getpgrp is $xxx" >&4
+ fi
+ ;;
+*) val="$undef";;
+esac
+set d_bsdgetpgrp
+eval $setvar
+$rm -f set set.c
+@end
+
diff --git a/mcon/U/d_getpgrp2.U b/mcon/U/d_getpgrp2.U
new file mode 100644
index 0000000..3aa5e1d
--- /dev/null
+++ b/mcon/U/d_getpgrp2.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_getpgrp2.U,v $
+?RCS: Revision 3.0 1993/08/18 12:06:15 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_getpgrp2: Inlibc
+?MAKE: -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
+set getpgrp2 d_getpgrp2
+eval $inlibc
+
diff --git a/mcon/U/d_getppid.U b/mcon/U/d_getppid.U
new file mode 100644
index 0000000..6754924
--- /dev/null
+++ b/mcon/U/d_getppid.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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: Inlibc
+?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
+set getppid d_getppid
+eval $inlibc
+
diff --git a/mcon/U/d_getprior.U b/mcon/U/d_getprior.U
new file mode 100644
index 0000000..0397f1c
--- /dev/null
+++ b/mcon/U/d_getprior.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_getprior.U,v $
+?RCS: Revision 3.0 1993/08/18 12:06:16 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_getprior: Inlibc
+?MAKE: -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
+set getpriority d_getprior
+eval $inlibc
+
diff --git a/mcon/U/d_getpwent.U b/mcon/U/d_getpwent.U
new file mode 100644
index 0000000..fbec685
--- /dev/null
+++ b/mcon/U/d_getpwent.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_getpwent.U,v $
+?RCS: Revision 3.0 1993/08/18 12:06:17 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_getpwent: Csym Setvar
+?MAKE: -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
+echo " "
+if set getpwent val -f d_getpwent; eval $csym; $val; then
+ echo "getpwent() found." >&4
+ val="$define"
+else
+ echo "No getpwent() found -- will use getpw() instead." >&4
+ val="$undef"
+fi
+set d_getpwent
+eval $setvar
+
diff --git a/mcon/U/d_getwd.U b/mcon/U/d_getwd.U
new file mode 100644
index 0000000..987e93b
--- /dev/null
+++ b/mcon/U/d_getwd.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_getwd.U,v $
+?RCS: Revision 3.0 1993/08/18 12:06:18 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_getwd: Csym Setvar
+?MAKE: -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
+echo " "
+if set getwd val -f d_getwd; eval $csym; $val; then
+ echo 'getwd() found.' >&4
+ val="$define"
+else
+ echo 'getwd() not found. Assuming getcwd() exists.' >&4
+ val="$undef"
+fi
+set d_getwd
+eval $setvar
+
diff --git a/mcon/U/d_gnulibc.U b/mcon/U/d_gnulibc.U
new file mode 100644
index 0000000..ead5dfa
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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 \
+ 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 -f try 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..af841a7
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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..b564e65
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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_hidnet.U b/mcon/U/d_hidnet.U
new file mode 100644
index 0000000..ce952f4
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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_htonl.U b/mcon/U/d_htonl.U
new file mode 100644
index 0000000..82b176d
--- /dev/null
+++ b/mcon/U/d_htonl.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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: Inlibc Setvar i_niin i_sysin cat rm contains \
+ cppstdin cppflags cppminus
+?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:.
+?F:!htonl.c
+?LINT:set d_htonl
+: see if htonl --and friends-- exists
+val=''
+set htonl val
+eval $inlibc
+
+: Maybe they are macros.
+case "$val" in
+$undef)
+ $cat >htonl.c <<EOM
+#include <stdio.h>
+#include <sys/types.h>
+#$i_niin I_NETINET_IN
+#$i_sysin I_SYS_IN
+#ifdef I_NETINET_IN
+#include <netinet/in.h>
+#endif
+#ifdef I_SYS_IN
+#include <sys/in.h>
+#endif
+#ifdef htonl
+printf("Defined as a macro.");
+#endif
+EOM
+ $cppstdin $cppflags $cppminus < htonl.c >htonl.E 2>/dev/null
+ if $contains 'Defined as a macro' htonl.E >/dev/null 2>&1; then
+ val="$define"
+ echo "But it seems to be defined as a macro." >&4
+ fi
+ $rm -f htonl.?
+ ;;
+esac
+set d_htonl
+eval $setvar
+
diff --git a/mcon/U/d_inetaton.U b/mcon/U/d_inetaton.U
new file mode 100644
index 0000000..d3a4607
--- /dev/null
+++ b/mcon/U/d_inetaton.U
@@ -0,0 +1,34 @@
+?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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_inetaton.U,v $
+?RCS: Revision 3.0.1.1 1997/02/28 15:36:35 ram
+?RCS: patch61: created
+?RCS:
+?MAKE:d_inetaton: Inlibc
+?MAKE: -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
+set inet_aton d_inetaton
+eval $inlibc
+
diff --git a/mcon/U/d_inetd.U b/mcon/U/d_inetd.U
new file mode 100644
index 0000000..02881ad
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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_internet.U b/mcon/U/d_internet.U
new file mode 100644
index 0000000..ca2d3fc
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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_isascii.U b/mcon/U/d_isascii.U
new file mode 100644
index 0000000..a4a0fff
--- /dev/null
+++ b/mcon/U/d_isascii.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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: cc cat ccflags ldflags rm libs Setvar
+?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
+?X: Can't use Inlibc because isascii() might be a macro.
+: Look for isascii
+echo " "
+$cat >isascii.c <<'EOCP'
+#include <stdio.h>
+#include <ctype.h>
+int main() {
+ int c = 'A';
+ if (isascii(c))
+ exit(0);
+ else
+ exit(1);
+}
+EOCP
+if $cc $ccflags $ldflags -o isascii isascii.c $libs >/dev/null 2>&1 ; then
+ echo "isascii() found." >&4
+ val="$define"
+else
+ echo "isascii() NOT found." >&4
+ val="$undef"
+fi
+set d_isascii
+eval $setvar
+$rm -f isascii*
+
diff --git a/mcon/U/d_itimer.U b/mcon/U/d_itimer.U
new file mode 100644
index 0000000..027112e
--- /dev/null
+++ b/mcon/U/d_itimer.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_itimer.U,v $
+?RCS: Revision 3.0 1993/08/18 12:06:25 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_itimer: Inlibc
+?MAKE: -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
+set setitimer d_itimer
+eval $inlibc
+
diff --git a/mcon/U/d_keepsig.U b/mcon/U/d_keepsig.U
new file mode 100644
index 0000000..43a8f88
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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 explicitely 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_killpg.U b/mcon/U/d_killpg.U
new file mode 100644
index 0000000..220932a
--- /dev/null
+++ b/mcon/U/d_killpg.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_killpg.U,v $
+?RCS: Revision 3.0 1993/08/18 12:06:27 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_killpg: Inlibc
+?MAKE: -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
+set killpg d_killpg
+eval $inlibc
+
diff --git a/mcon/U/d_link.U b/mcon/U/d_link.U
new file mode 100644
index 0000000..cd5d889
--- /dev/null
+++ b/mcon/U/d_link.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_link.U,v $
+?RCS: Revision 3.0.1.1 1993/08/25 14:01:13 ram
+?RCS: patch6: created for completeness
+?RCS:
+?MAKE:d_link: Inlibc
+?MAKE: -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
+set link d_link
+eval $inlibc
+
diff --git a/mcon/U/d_linuxstd.U b/mcon/U/d_linuxstd.U
new file mode 100644
index 0000000..a18890a
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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_locconv.U b/mcon/U/d_locconv.U
new file mode 100644
index 0000000..a7bec1f
--- /dev/null
+++ b/mcon/U/d_locconv.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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: Inlibc
+?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
+set localeconv d_locconv
+eval $inlibc
+
diff --git a/mcon/U/d_lockf.U b/mcon/U/d_lockf.U
new file mode 100644
index 0000000..062f753
--- /dev/null
+++ b/mcon/U/d_lockf.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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: Inlibc
+?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
+set lockf d_lockf
+eval $inlibc
+
diff --git a/mcon/U/d_lstat.U b/mcon/U/d_lstat.U
new file mode 100644
index 0000000..4d5bc46
--- /dev/null
+++ b/mcon/U/d_lstat.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_lstat.U,v $
+?RCS: Revision 3.0 1993/08/18 12:06:28 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_lstat: Inlibc
+?MAKE: -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
+set lstat d_lstat
+eval $inlibc
+
diff --git a/mcon/U/d_mblen.U b/mcon/U/d_mblen.U
new file mode 100644
index 0000000..b990066
--- /dev/null
+++ b/mcon/U/d_mblen.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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: Inlibc
+?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
+set mblen d_mblen
+eval $inlibc
+
diff --git a/mcon/U/d_mbstowcs.U b/mcon/U/d_mbstowcs.U
new file mode 100644
index 0000000..c73ca45
--- /dev/null
+++ b/mcon/U/d_mbstowcs.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_mbstowcs.U,v $
+?RCS: Revision 3.0 1993/08/18 12:06:29 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_mbstowcs: Inlibc
+?MAKE: -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
+set mbstowcs d_mbstowcs
+eval $inlibc
+
diff --git a/mcon/U/d_mbtowc.U b/mcon/U/d_mbtowc.U
new file mode 100644
index 0000000..ea24f92
--- /dev/null
+++ b/mcon/U/d_mbtowc.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_mbtowc.U,v $
+?RCS: Revision 3.0 1993/08/18 12:06:30 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_mbtowc: Inlibc
+?MAKE: -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
+set mbtowc d_mbtowc
+eval $inlibc
+
diff --git a/mcon/U/d_memalign.U b/mcon/U/d_memalign.U
new file mode 100644
index 0000000..a27a559
--- /dev/null
+++ b/mcon/U/d_memalign.U
@@ -0,0 +1,29 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_memalign.U,v $
+?RCS:
+?MAKE:d_memalign: Inlibc
+?MAKE: -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
+set memalign d_memalign
+eval $inlibc
+
diff --git a/mcon/U/d_memccpy.U b/mcon/U/d_memccpy.U
new file mode 100644
index 0000000..386ee30
--- /dev/null
+++ b/mcon/U/d_memccpy.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_memccpy.U,v $
+?RCS: Revision 3.0 1993/08/18 12:06:31 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_memccpy: Inlibc
+?MAKE: -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
+set memccpy d_memccpy
+eval $inlibc
+
diff --git a/mcon/U/d_memchr.U b/mcon/U/d_memchr.U
new file mode 100644
index 0000000..00b5b87
--- /dev/null
+++ b/mcon/U/d_memchr.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_memchr.U,v $
+?RCS: Revision 3.0 1993/08/18 12:06:32 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_memchr: Inlibc
+?MAKE: -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
+set memchr d_memchr
+eval $inlibc
+
diff --git a/mcon/U/d_memcmp.U b/mcon/U/d_memcmp.U
new file mode 100644
index 0000000..1761865
--- /dev/null
+++ b/mcon/U/d_memcmp.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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: Inlibc
+?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
+set memcmp d_memcmp
+eval $inlibc
+
diff --git a/mcon/U/d_memcpy.U b/mcon/U/d_memcpy.U
new file mode 100644
index 0000000..b500662
--- /dev/null
+++ b/mcon/U/d_memcpy.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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: Inlibc
+?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
+set memcpy d_memcpy
+eval $inlibc
+
diff --git a/mcon/U/d_memmove.U b/mcon/U/d_memmove.U
new file mode 100644
index 0000000..34280e0
--- /dev/null
+++ b/mcon/U/d_memmove.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_memmove.U,v $
+?RCS: Revision 3.0 1993/08/18 12:06:35 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_memmove: Inlibc
+?MAKE: -pick add $@ %<
+?S:d_memmove:
+?S: This variable conditionally defines the HAS_MEMMOVE symbol, which
+?S: indicates to the C program that the memmove() routine is available
+?S: to copy potentatially overlapping blocks of memory.
+?S:.
+?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
+set memmove d_memmove
+eval $inlibc
+
diff --git a/mcon/U/d_memset.U b/mcon/U/d_memset.U
new file mode 100644
index 0000000..812c4de
--- /dev/null
+++ b/mcon/U/d_memset.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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: Inlibc
+?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
+set memset d_memset
+eval $inlibc
+
diff --git a/mcon/U/d_mkdir.U b/mcon/U/d_mkdir.U
new file mode 100644
index 0000000..9cb6961
--- /dev/null
+++ b/mcon/U/d_mkdir.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_mkdir.U,v $
+?RCS: Revision 3.0 1993/08/18 12:06:37 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_mkdir: Inlibc
+?MAKE: -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
+set mkdir d_mkdir
+eval $inlibc
+
diff --git a/mcon/U/d_mkfifo.U b/mcon/U/d_mkfifo.U
new file mode 100644
index 0000000..cca2262
--- /dev/null
+++ b/mcon/U/d_mkfifo.U
@@ -0,0 +1,36 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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: Inlibc
+?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
+set mkfifo d_mkfifo
+eval $inlibc
+
diff --git a/mcon/U/d_mktime.U b/mcon/U/d_mktime.U
new file mode 100644
index 0000000..fd62716
--- /dev/null
+++ b/mcon/U/d_mktime.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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: Inlibc
+?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
+set mktime d_mktime
+eval $inlibc
+
diff --git a/mcon/U/d_mmap.U b/mcon/U/d_mmap.U
new file mode 100644
index 0000000..ad5448e
--- /dev/null
+++ b/mcon/U/d_mmap.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_mmap.U,v $
+?RCS: Revision 3.0.1.1 1993/12/15 08:19:12 ram
+?RCS: patch15: created
+?RCS:
+?MAKE:d_mmap: Inlibc
+?MAKE: -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
+set mmap d_mmap
+eval $inlibc
+
diff --git a/mcon/U/d_msem_lck.U b/mcon/U/d_msem_lck.U
new file mode 100644
index 0000000..80308a4
--- /dev/null
+++ b/mcon/U/d_msem_lck.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_msem_lck.U,v $
+?MAKE:d_msem_lck: Inlibc
+?MAKE: -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
+set msem_lock d_msem_lck
+eval $inlibc
+
diff --git a/mcon/U/d_msg.U b/mcon/U/d_msg.U
new file mode 100644
index 0000000..7f090da
--- /dev/null
+++ b/mcon/U/d_msg.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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
+?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
+: 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_msgctl.U b/mcon/U/d_msgctl.U
new file mode 100644
index 0000000..4f50ad3
--- /dev/null
+++ b/mcon/U/d_msgctl.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_msgctl.U,v $
+?RCS: Revision 3.0 1993/08/18 12:06:38 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_msgctl: Inlibc
+?MAKE: -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
+set msgctl d_msgctl
+eval $inlibc
+
diff --git a/mcon/U/d_msgget.U b/mcon/U/d_msgget.U
new file mode 100644
index 0000000..8313591
--- /dev/null
+++ b/mcon/U/d_msgget.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_msgget.U,v $
+?RCS: Revision 3.0 1993/08/18 12:06:39 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_msgget: Inlibc
+?MAKE: -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
+set msgget d_msgget
+eval $inlibc
+
diff --git a/mcon/U/d_msgrcv.U b/mcon/U/d_msgrcv.U
new file mode 100644
index 0000000..9f7c27e
--- /dev/null
+++ b/mcon/U/d_msgrcv.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_msgrcv.U,v $
+?RCS: Revision 3.0 1993/08/18 12:06:40 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_msgrcv: Inlibc
+?MAKE: -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
+set msgrcv d_msgrcv
+eval $inlibc
+
diff --git a/mcon/U/d_msgsnd.U b/mcon/U/d_msgsnd.U
new file mode 100644
index 0000000..924d59a
--- /dev/null
+++ b/mcon/U/d_msgsnd.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_msgsnd.U,v $
+?RCS: Revision 3.0 1993/08/18 12:06:41 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_msgsnd: Inlibc
+?MAKE: -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
+set msgsnd d_msgsnd
+eval $inlibc
+
diff --git a/mcon/U/d_msync.U b/mcon/U/d_msync.U
new file mode 100644
index 0000000..49db7e2
--- /dev/null
+++ b/mcon/U/d_msync.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_msync.U,v $
+?RCS: Revision 3.0.1.1 1993/12/15 08:19:17 ram
+?RCS: patch15: created
+?RCS:
+?MAKE:d_msync: Inlibc
+?MAKE: -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
+set msync d_msync
+eval $inlibc
+
diff --git a/mcon/U/d_munmap.U b/mcon/U/d_munmap.U
new file mode 100644
index 0000000..d1cc5a0
--- /dev/null
+++ b/mcon/U/d_munmap.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?RCS: $Log: d_munmap.U,v $
+?RCS: Revision 3.0.1.1 1993/12/15 08:19:22 ram
+?RCS: patch15: created
+?RCS:
+?MAKE:d_munmap: Inlibc
+?MAKE: -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
+set munmap d_munmap
+eval $inlibc
+
diff --git a/mcon/U/d_newsadm.U b/mcon/U/d_newsadm.U
new file mode 100644
index 0000000..cd13f41
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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 explicitely 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..3ca22a6
--- /dev/null
+++ b/mcon/U/d_nice.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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: Inlibc
+?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
+set nice d_nice
+eval $inlibc
+
diff --git a/mcon/U/d_nolnbuf.U b/mcon/U/d_nolnbuf.U
new file mode 100644
index 0000000..9e63280
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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..ae3c7e5
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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 explicitely 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..4d24d51
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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() {
+ if(O_RDONLY);
+#ifdef O_TRUNC
+ exit(0);
+#else
+ exit(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."
+fi
+set d_open3
+eval $setvar
+$rm -f open3*
+
diff --git a/mcon/U/d_passwd.U b/mcon/U/d_passwd.U
new file mode 100644
index 0000000..2504e6c
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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..b39ccb5
--- /dev/null
+++ b/mcon/U/d_pathconf.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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: Inlibc
+?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
+set pathconf d_pathconf
+eval $inlibc
+
+@if d_fpathconf || HAS_FPATHCONF
+: see if fpathconf exists
+set fpathconf d_fpathconf
+eval $inlibc
+
+@end
diff --git a/mcon/U/d_pause.U b/mcon/U/d_pause.U
new file mode 100644
index 0000000..f161b4f
--- /dev/null
+++ b/mcon/U/d_pause.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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: Inlibc
+?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
+set pause d_pause
+eval $inlibc
+
diff --git a/mcon/U/d_perror.U b/mcon/U/d_perror.U
new file mode 100644
index 0000000..56df478
--- /dev/null
+++ b/mcon/U/d_perror.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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: Inlibc
+?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
+set perror d_perror
+eval $inlibc
+
diff --git a/mcon/U/d_pidcheck.U b/mcon/U/d_pidcheck.U
new file mode 100644
index 0000000..6744334
--- /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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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..e139dd0
--- /dev/null
+++ b/mcon/U/d_pipe.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 Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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: Inlibc
+?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
+set pipe d_pipe
+eval $inlibc
+
diff --git a/mcon/U/d_poll.U b/mcon/U/d_poll.U
new file mode 100644
index 0000000..f07ef0e
--- /dev/null
+++ b/mcon/U/d_poll.U
@@ -0,0 +1,36 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; 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: Inlibc
+?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. You may safely
+?C: include <poll.h> when this symbol is defined.