summaryrefslogtreecommitdiff
path: root/mcon
diff options
context:
space:
mode:
Diffstat (limited to 'mcon')
-rw-r--r--mcon/INTRO109
-rw-r--r--mcon/Jmakefile93
-rw-r--r--mcon/Makefile.SH378
-rw-r--r--mcon/NOTES174
-rw-r--r--mcon/README24
-rw-r--r--mcon/U/AAAAA.U46
-rw-r--r--mcon/U/Begin.U39
-rw-r--r--mcon/U/Chk_MANI.U84
-rw-r--r--mcon/U/Chk_whoami.U25
-rw-r--r--mcon/U/Config_h.U104
-rw-r--r--mcon/U/Config_sh.U91
-rw-r--r--mcon/U/Configdir.U28
-rw-r--r--mcon/U/Cppsym.U229
-rw-r--r--mcon/U/Csym.U96
-rw-r--r--mcon/U/End.U28
-rw-r--r--mcon/U/Extract.U119
-rw-r--r--mcon/U/Extractall.U54
-rw-r--r--mcon/U/Filexp.U69
-rw-r--r--mcon/U/Findhdr.U106
-rw-r--r--mcon/U/Finish.U122
-rw-r--r--mcon/U/Getfile.U305
-rw-r--r--mcon/U/Guess.U171
-rw-r--r--mcon/U/Head.U246
-rw-r--r--mcon/U/Inhdr.U78
-rw-r--r--mcon/U/Init.U54
-rw-r--r--mcon/U/Inlibc.U65
-rw-r--r--mcon/U/Instruct.U116
-rw-r--r--mcon/U/Loc.U345
-rw-r--r--mcon/U/Loc_sed.U34
-rw-r--r--mcon/U/Magic_h.U42
-rw-r--r--mcon/U/MailAuthor.U192
-rw-r--r--mcon/U/MailList.U82
-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.U27
-rw-r--r--mcon/U/Obsol_sh.U26
-rw-r--r--mcon/U/Oldconfig.U599
-rw-r--r--mcon/U/Oldsym.U62
-rw-r--r--mcon/U/Options.U255
-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.U192
-rw-r--r--mcon/U/Tr.U60
-rw-r--r--mcon/U/Typedef.U62
-rw-r--r--mcon/U/Unix.U70
-rw-r--r--mcon/U/Warn_v7EXT.U34
-rw-r--r--mcon/U/Warn_v7ND.U33
-rw-r--r--mcon/U/Whoa.U50
-rw-r--r--mcon/U/abortsig.U79
-rw-r--r--mcon/U/active.U50
-rw-r--r--mcon/U/afs.U43
-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.U129
-rw-r--r--mcon/U/ccflags.U399
-rw-r--r--mcon/U/cf_email.U57
-rw-r--r--mcon/U/cf_name.U72
-rw-r--r--mcon/U/cf_who.U60
-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.U118
-rw-r--r--mcon/U/cppfilecom.U202
-rw-r--r--mcon/U/cppstdin.U235
-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.U72
-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.U86
-rw-r--r--mcon/U/d_castneg.U142
-rw-r--r--mcon/U/d_cbrt.U32
-rw-r--r--mcon/U/d_charsprf.U51
-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.U64
-rw-r--r--mcon/U/d_crypt.U70
-rw-r--r--mcon/U/d_csh.U50
-rw-r--r--mcon/U/d_ctermid.U31
-rw-r--r--mcon/U/d_cuserid.U34
-rw-r--r--mcon/U/d_dbl_dig.U60
-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.U168
-rw-r--r--mcon/U/d_drem.U35
-rw-r--r--mcon/U/d_dup2.U31
-rw-r--r--mcon/U/d_eofpipe.U92
-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.U105
-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.U53
-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.U87
-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.U79
-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_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.U28
-rw-r--r--mcon/U/d_mktime.U33
-rw-r--r--mcon/U/d_mmap.U31
-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.U98
-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_psignal.U31
-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_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.U115
-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.U122
-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.U49
-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.U77
-rw-r--r--mcon/U/d_usleep.U31
-rw-r--r--mcon/U/d_uwait.U123
-rw-r--r--mcon/U/d_vfork.U100
-rw-r--r--mcon/U/d_voidsig.U89
-rw-r--r--mcon/U/d_volatile.U74
-rw-r--r--mcon/U/d_vprintf.U80
-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/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/gidtype.U61
-rw-r--r--mcon/U/groupstype.U62
-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_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.U41
-rw-r--r--mcon/U/i_whoami.U35
-rw-r--r--mcon/U/inc.U39
-rw-r--r--mcon/U/install.U188
-rw-r--r--mcon/U/intsize.U124
-rw-r--r--mcon/U/ipc.U171
-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.U368
-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.U126
-rw-r--r--mcon/U/libs.U157
-rw-r--r--mcon/U/libyacc.U64
-rw-r--r--mcon/U/lintlib.U38
-rw-r--r--mcon/U/lns.U40
-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.U57
-rw-r--r--mcon/U/mallocsrc.U163
-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.U149
-rw-r--r--mcon/U/mboxchar.U70
-rw-r--r--mcon/U/mkdep.U251
-rw-r--r--mcon/U/models.U204
-rw-r--r--mcon/U/modetype.U40
-rw-r--r--mcon/U/myhostname.U267
-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.U165
-rw-r--r--mcon/U/nlist_pfx.U135
-rw-r--r--mcon/U/orderlib.U94
-rw-r--r--mcon/U/orgname.U65
-rw-r--r--mcon/U/packadmin.U32
-rw-r--r--mcon/U/package.U51
-rw-r--r--mcon/U/pager.U51
-rw-r--r--mcon/U/patchlevel.U33
-rw-r--r--mcon/U/perlpath.U56
-rw-r--r--mcon/U/pidtype.U39
-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.U163
-rw-r--r--mcon/U/rcs_branch.U43
-rw-r--r--mcon/U/registers.U104
-rw-r--r--mcon/U/rootid.U35
-rw-r--r--mcon/U/sbrksmart.U84
-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.U89
-rw-r--r--mcon/U/shm_for.U118
-rw-r--r--mcon/U/sig_name.U117
-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.U87
-rw-r--r--mcon/U/spitshell.U92
-rw-r--r--mcon/U/src.U97
-rw-r--r--mcon/U/ssizetype.U91
-rw-r--r--mcon/U/startperl.U94
-rw-r--r--mcon/U/startsh.U50
-rw-r--r--mcon/U/stdchar.U36
-rw-r--r--mcon/U/sunscanf.U55
-rw-r--r--mcon/U/sysman.U49
-rw-r--r--mcon/U/uidtype.U57
-rw-r--r--mcon/U/usenm.U121
-rw-r--r--mcon/U/usrinc.U95
-rw-r--r--mcon/U/vaproto.U65
-rw-r--r--mcon/U/voidflags.U159
-rw-r--r--mcon/U/warnflags.U54
-rw-r--r--mcon/U/yacc.U82
-rw-r--r--mcon/configure144
-rw-r--r--mcon/files/Internal.U20
-rw-r--r--mcon/files/README6
-rw-r--r--mcon/files/d_function.U31
-rw-r--r--mcon/files/dir.U47
-rw-r--r--mcon/files/file.U47
-rw-r--r--mcon/files/i_include.U32
-rw-r--r--mcon/files/keyword.U54
-rw-r--r--mcon/files/locate.U47
-rw-r--r--mcon/files/question.U58
-rw-r--r--mcon/files/rcshead.U15
-rw-r--r--mcon/files/shell.U68
-rw-r--r--mcon/files/type.U47
-rwxr-xr-xmcon/makegloss.SH217
-rw-r--r--mcon/man/Jmakefile24
-rw-r--r--mcon/man/Makefile.SH167
-rwxr-xr-xmcon/man/mconfig.SH2097
-rwxr-xr-xmcon/man/mlint.SH489
-rwxr-xr-xmcon/man/mxref.SH133
-rw-r--r--mcon/mconfig.SH179
-rw-r--r--mcon/mlint.SH137
-rw-r--r--mcon/mxref.SH147
-rw-r--r--mcon/pl/common.pl287
-rw-r--r--mcon/pl/configure.pl245
-rw-r--r--mcon/pl/cosmetic.pl114
-rw-r--r--mcon/pl/depend.pl138
-rw-r--r--mcon/pl/eval.pl300
-rw-r--r--mcon/pl/extract.pl109
-rw-r--r--mcon/pl/files.pl109
-rw-r--r--mcon/pl/gensym.pl22
-rw-r--r--mcon/pl/init.pl55
-rw-r--r--mcon/pl/lint.pl1144
-rw-r--r--mcon/pl/locate.pl153
-rw-r--r--mcon/pl/makefile.pl176
-rw-r--r--mcon/pl/obsolete.pl103
-rw-r--r--mcon/pl/order.pl42
-rw-r--r--mcon/pl/tsort.pl166
-rw-r--r--mcon/pl/wanted.pl263
-rw-r--r--mcon/pl/xref.pl67
-rw-r--r--mcon/pl/xwant.pl149
476 files changed, 38785 insertions, 0 deletions
diff --git a/mcon/INTRO b/mcon/INTRO
new file mode 100644
index 0000000..51f4417
--- /dev/null
+++ b/mcon/INTRO
@@ -0,0 +1,109 @@
+This is a quick introduction to metaconfig.
+
+Metaconfig is a combination of a methodology and a program that will
+help you write portable programs. It is well known that all UN*X
+systems are not the same. Instead of writing lots of #ifdef/#endif for
+each machine the program is ported on, it seems better to directly rely
+on the actual possibilities of the system, without having to consider
+whether it comes from HP or SUN. The idea is to write the program using
+some symbols, known by a "unit", for all the hardware- or kernel-
+specific parts of code. A metaconfig unit will automatically define the
+symbol or not, depending on the system. Source files are scanned by
+metaconfig and the necessary units are loaded and put into a shell
+script called Configure. Running the Configure script will
+automatically determine a suitable value for each symbol.
+
+How does a Configure script work ? It studies the environment it runs on
+by extracting names in the C library, by compiling some small sample C
+programs, and by asking questions when in doubt, always providing a
+computed default answer.
+
+Here is a small example.
+
+It is said in the glossary of the symbols that RENAME is defined if the
+rename routine is available to rename files. Without metaconfig, we
+could write (for each occurrence of a "rename" in the code):
+
+#if defined(HP-UX-7.0) || defined(SUN) || defined(BSD)
+ rename(old, new);
+#else
+ unlink(new);
+ link(old, new);
+ unlink(old);
+#endif
+
+With the help of metaconfig, we shall write (once !):
+
+#ifndef HAS_RENAME
+int rename(old, new)
+char *old, *new;
+{
+ (void) unlink(new);
+ if (-1 != link(old, new))
+ return unlink(old);
+ else
+ return -1;
+}
+#endif
+
+ ....
+
+ rename(old, new);
+
+
+And that's all. The Configure script will check whether `rename' is
+available on the target machine and accordingly define the RENAME
+symbol. It is even more powerful that it may appear on a first glance,
+because "rename" was not there on old SUNOS3 systems or HP-UX older than
+6.5 (for series 800) and 7.0 (for series 300). You cannot rely on the
+fact that the target machine has the latest OS release !
+
+Another problem is to determine whether a C program should include
+<time.h>, <sys/time.h> or <sys/time.h> with KERNEL defined. With
+metaconfig, you simply write:
+
+#ifdef I_TIME
+# include <time.h>
+#endif
+#ifdef I_SYS_TIME
+# include <sys/time.h>
+#endif
+#ifdef I_SYS_TIME_KERNEL
+# define KERNEL
+# include <sys/time.h>
+# undef KERNEL
+#endif
+
+and the Configure script will generate a small C program, compile it,
+and correctly define one of the three symbols I_TIME, I_SYS_TIME and
+I_SYS_TIME_KERNEL.
+
+Another kind of precious information can be collected by a Configure
+script. For instance, the symbol USE_STRUCT_COPY will be defined if the
+C compiler can copy structures. It is up to the programmer to use this
+information, of course. The symbol VOIDSIG will be defined if the
+system declares "void (*signal())()" instead of "int (*signal())()".
+Thus you can say:
+
+#ifdef VOIDSIG
+extern void (*signal())();
+#else
+extern int (*signal())();
+#endif
+
+and no suspicious warning will be emitted by the C compiler.
+
+Finally, Configure can help you in shell scripts or in makefile. By
+using a file called Makefile.SH, which will be run through a shell to
+produce a Makefile, you can use the variable substitution feature. The
+variable $ranlib will be set to 'ranlib' or to ': ' (null statement) in
+a makefile, which is useful for random libraries generation. Likewise,
+the variable $bin will hold the full path for installing binaries (a
+question will be issued by Configure).
+
+Needless to say, an initial amount of time must be spent before being
+able to use metaconfig. The proper symbols must be known, and the
+program must be prepared to deal with all the possible configurations.
+But likewise, it will adapt itself to a greater number of systems
+without any further source code modification.
+
diff --git a/mcon/Jmakefile b/mcon/Jmakefile
new file mode 100644
index 0000000..1bf64f2
--- /dev/null
+++ b/mcon/Jmakefile
@@ -0,0 +1,93 @@
+/*
+ * Jmakefile for metaconfig
+ */
+
+;# $Id: Jmakefile,v 3.0.1.4 1995/07/25 13:23:09 ram Exp $
+;#
+;# Copyright (c) 1991-1993, Raphael Manfredi
+;#
+;# You may redistribute only under the terms of the Artistic Licence,
+;# as specified in the README file that comes with the distribution.
+;# You may reuse parts of this distribution only within the terms of
+;# that same Artistic Licence; a copy of which may be found at the root
+;# of the source tree for dist 3.0.
+;#
+;# $Log: Jmakefile,v $
+;# Revision 3.0.1.4 1995/07/25 13:23:09 ram
+;# patch56: installs the GNU configure-like front-end to Configure
+;#
+;# Revision 3.0.1.3 1994/01/24 13:42:29 ram
+;# patch16: added dependency generation stage
+;#
+;# Revision 3.0.1.2 1993/11/02 10:40:01 ram
+;# patch14: now invokes perload explicitely via perl executable
+;#
+;# Revision 3.0.1.1 1993/08/25 08:46:44 ram
+;# patch6: split unit installation to avoid shell command line overflow
+;#
+;# Revision 3.0 1993/08/18 12:04:40 ram
+;# Baseline for dist 3.0 netwide release.
+;#
+
+SetSubdirs(man)
+AllTarget(Glossary)
+
+Glossary: makegloss
+ chmod +x makegloss
+ ./makegloss
+
+SimpleShellScriptTarget(makegloss)
+
+>PRIVLIB /* We need the privlib definition */
+>SCRIPTDIR /* As well as the script directory */
+
+MakeInstallDirectories($(PRIVLIB) $(PRIVLIB)/U)
+InstallNonExec(Glossary,$(PRIVLIB))
+InstallScript(makegloss,$(PRIVLIB))
+InstallScript(configure,$(PRIVLIB))
+
+/* Split install list to avoid make overflow */
+InstallMultipleFlags(U/[a-d]*.U,$(PRIVLIB)/U,-m 444)
+InstallMultipleFlags(U/[A-Ze-z]*.U,$(PRIVLIB)/U,-m 444)
+
+/*
+ * Build up dataloading versions of metalint, metaconfig and metaxref.
+ */
+
+#define SimpleDataloadTarget(file,datafile) @!\
+++BIN datafile @!\
+AllTarget(datafile file) @!\
+SimpleShellScriptTarget(file) @!\
+datafile: file @@\
+ perl $(TOP)/bin/perload -o file > $@ @@\
+ chmod +rx $@ @!\
+ @!\
+InstallScript(datafile,$(SCRIPTDIR))
+
+SimpleDataloadTarget(mconfig,metaconfig)
+SimpleDataloadTarget(mlint,metalint)
+SimpleDataloadTarget(mxref,metaxref)
+
+BINFILES = \
+|expand f!$(BIN)!
+ !f:^meta=m \
+-expand \\
+
+BINSH = \
+|expand f!$(BINFILES)!
+ !f.SH \
+-expand \\
+
+>SED
+>RM
+>MKDEP
+
+depend::
+ ($(SED) '/^# DO NOT DELETE/q' Makefile && \
+ grep '^\$$grep' $(BINSH) | \
+ $(SED) -e "s/^.*' \([^ ]*\) >>\([^ ]*\)/\2: \1/" \
+ ) > Makefile.new
+ cp Makefile Makefile.bak
+ cp Makefile.new Makefile
+ $(RM) Makefile.new
+
diff --git a/mcon/Makefile.SH b/mcon/Makefile.SH
new file mode 100644
index 0000000..3768cb5
--- /dev/null
+++ b/mcon/Makefile.SH
@@ -0,0 +1,378 @@
+: Makefile.SH generated from Jmake.tmpl and Jmakefile [jmake 3.0 PL55]
+: $X-Id: Jmake.tmpl,v 3.0.1.2 1995/01/11 14:50:21 ram Exp ram $
+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
+case "$0" in
+*/*) cd `expr X$0 : 'X\(.*\)/'` ;;
+esac
+CURRENT=mcon
+DIR=`echo $CURRENT/ | sed -e 's/\.\///g'`
+echo "Extracting ${DIR}Makefile (with variable substitutions)"
+
+INSTALL=`echo $install | sed -e 's,\./i,\$(TOP)/i,'`
+INSTALLDIR=`echo $installdir | sed -e 's,\./i,\$(TOP)/i,'`
+DATE=`date`
+
+$spitshell >Makefile <<!GROK!THIS!
+########################################################################
+# Makefile generated from Makefile.SH on $DATE
+
+SHELL = /bin/sh
+JMAKE = jmake
+TOP = ..
+CURRENT = $CURRENT
+DIR = $DIR
+INSTALL = $INSTALL
+INSTALLDIR = $INSTALLDIR
+
+########################################################################
+# Parameters set by Configure -- edit config.sh if changes are needed
+
+CTAGS = ctags
+MAKE = make
+MKDEP = $mkdep \$(DPFLAGS) --
+MV = $mv
+PRIVLIB = $installprivlib
+RM = $rm -f
+SCRIPTDIR = $installscript
+SED = $sed
+
+########################################################################
+# Automatically generated parameters -- do not edit
+
+SUBDIRS = man
+BIN = metaconfig metalint metaxref
+
+!GROK!THIS!
+$spitshell >>Makefile <<'!NO!SUBS!'
+########################################################################
+# Jmake rules for building libraries, programs, scripts, and data files
+# $X-Id: Jmake.rules,v 3.0.1.3 1995/03/21 08:35:28 ram Exp ram $
+########################################################################
+# Force 'make depend' to be performed first -- do not edit
+
+.FORCE_DEPEND::
+
+all:: .FORCE_DEPEND
+
+########################################################################
+# Start of Jmakefile
+
+# $X-Id: Jmakefile,v 3.0.1.4 1995/07/25 13:23:09 ram Exp ram $
+#
+# Copyright (c) 1991-1993, Raphael Manfredi
+#
+# You may redistribute only under the terms of the Artistic Licence,
+# as specified in the README file that comes with the distribution.
+# You may reuse parts of this distribution only within the terms of
+# that same Artistic Licence; a copy of which may be found at the root
+# of the source tree for dist 3.0.
+#
+# $X-Log: Jmakefile,v $
+# Revision 3.0.1.4 1995/07/25 13:23:09 ram
+# patch56: installs the GNU configure-like front-end to Configure
+#
+# Revision 3.0.1.3 1994/01/24 13:42:29 ram
+# patch16: added dependency generation stage
+#
+# Revision 3.0.1.2 1993/11/02 10:40:01 ram
+# patch14: now invokes perload explicitely via perl executable
+#
+# Revision 3.0.1.1 1993/08/25 08:46:44 ram
+# patch6: split unit installation to avoid shell command line overflow
+#
+# Revision 3.0 1993/08/18 12:04:40 ram
+# Baseline for dist 3.0 netwide release.
+#
+
+all:: Glossary
+
+local_realclean::
+ $(RM) Glossary
+
+Glossary: makegloss
+ chmod +x makegloss
+ ./makegloss
+
+all:: makegloss
+
+local_realclean::
+ $(RM) makegloss
+
+makegloss: makegloss.SH
+ /bin/sh makegloss.SH
+
+
+install::
+ @for dir in $(PRIVLIB) $(PRIVLIB)/U; do \
+ case '${MFLAGS}' in *[i]*) set +e;; esac; \
+ (set -x; test -d $$dir || $(INSTALLDIR) $$dir); \
+ done
+
+deinstall::
+ $(RM) -r $(PRIVLIB) $(PRIVLIB)/U
+
+install:: Glossary
+ $(INSTALL) -c -m 444 Glossary $(PRIVLIB)
+
+deinstall::
+ $(RM) $(PRIVLIB)/Glossary
+
+install:: makegloss
+ $(INSTALL) -c -m 555 makegloss $(PRIVLIB)
+
+deinstall::
+ $(RM) $(PRIVLIB)/makegloss
+
+install:: configure
+ $(INSTALL) -c -m 555 configure $(PRIVLIB)
+
+deinstall::
+ $(RM) $(PRIVLIB)/configure
+
+install:: U/[a-d]*.U
+ @case '${MFLAGS}' in *[i]*) set +e;; esac; \
+ for i in U/[a-d]*.U; do \
+ (set -x; $(INSTALL) -c -m 444 $$i $(PRIVLIB)/U); \
+ done
+
+deinstall::
+ @case '${MFLAGS}' in *[i]*) set +e;; esac; \
+ for i in U/[a-d]*.U; do \
+ (set -x; $(RM) $(PRIVLIB)/U/$$i); \
+ done
+
+install:: U/[A-Ze-z]*.U
+ @case '${MFLAGS}' in *[i]*) set +e;; esac; \
+ for i in U/[A-Ze-z]*.U; do \
+ (set -x; $(INSTALL) -c -m 444 $$i $(PRIVLIB)/U); \
+ done
+
+deinstall::
+ @case '${MFLAGS}' in *[i]*) set +e;; esac; \
+ for i in U/[A-Ze-z]*.U; do \
+ (set -x; $(RM) $(PRIVLIB)/U/$$i); \
+ done
+
+all:: metaconfig mconfig
+
+local_realclean::
+ $(RM) metaconfig mconfig
+
+all:: mconfig
+
+local_realclean::
+ $(RM) mconfig
+
+mconfig: mconfig.SH
+ /bin/sh mconfig.SH
+
+metaconfig: mconfig
+ perl $(TOP)/bin/perload -o mconfig > $@
+ chmod +rx $@
+
+install:: metaconfig
+ $(INSTALL) -c -m 555 metaconfig $(SCRIPTDIR)
+
+deinstall::
+ $(RM) $(SCRIPTDIR)/metaconfig
+
+all:: metalint mlint
+
+local_realclean::
+ $(RM) metalint mlint
+
+all:: mlint
+
+local_realclean::
+ $(RM) mlint
+
+mlint: mlint.SH
+ /bin/sh mlint.SH
+
+metalint: mlint
+ perl $(TOP)/bin/perload -o mlint > $@
+ chmod +rx $@
+
+install:: metalint
+ $(INSTALL) -c -m 555 metalint $(SCRIPTDIR)
+
+deinstall::
+ $(RM) $(SCRIPTDIR)/metalint
+
+all:: metaxref mxref
+
+local_realclean::
+ $(RM) metaxref mxref
+
+all:: mxref
+
+local_realclean::
+ $(RM) mxref
+
+mxref: mxref.SH
+ /bin/sh mxref.SH
+
+metaxref: mxref
+ perl $(TOP)/bin/perload -o mxref > $@
+ chmod +rx $@
+
+install:: metaxref
+ $(INSTALL) -c -m 555 metaxref $(SCRIPTDIR)
+
+deinstall::
+ $(RM) $(SCRIPTDIR)/metaxref
+
+BINFILES = \
+ mconfig \
+ mlint \
+ mxref
+
+BINSH = \
+ mconfig.SH \
+ mlint.SH \
+ mxref.SH
+
+depend::
+ ($(SED) '/^# DO NOT DELETE/q' Makefile && \
+ grep '^\$$grep' $(BINSH) | \
+ $(SED) -e "s/^.*' \([^ ]*\) >>\([^ ]*\)/\2: \1/" \
+ ) > Makefile.new
+ cp Makefile Makefile.bak
+ cp Makefile.new Makefile
+ $(RM) Makefile.new
+
+########################################################################
+# Common rules for all Makefiles -- do not edit
+
+emptyrule::
+
+clean: sub_clean local_clean
+realclean: sub_realclean local_realclean
+clobber: sub_clobber local_clobber
+
+local_clean::
+ $(RM) core *~ *.o
+
+local_realclean:: local_clean
+
+local_clobber:: local_realclean
+ $(RM) Makefile config.sh
+
+Makefile.SH: Jmakefile
+ -@if test -f $(TOP)/.package; then \
+ if test -f Makefile.SH; then \
+ echo " $(RM) Makefile.SH~; $(MV) Makefile.SH Makefile.SH~"; \
+ $(RM) Makefile.SH~; $(MV) Makefile.SH Makefile.SH~; \
+ fi; \
+ echo " $(JMAKE) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT)" ; \
+ $(JMAKE) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT) ; \
+ else touch $@; exit 0; fi
+
+Makefile: Makefile.SH
+ /bin/sh Makefile.SH
+
+tags::
+ $(CTAGS) -w *.[ch]
+ $(CTAGS) -xw *.[ch] > tags
+
+local_clobber::
+ $(RM) tags
+
+########################################################################
+# Rules for building in sub-directories -- do not edit
+
+subdirs:
+ @case '${MFLAGS}' in *[ik]*) set +e;; esac; \
+ for i in $(SUBDIRS) ;\
+ do \
+ (cd $$i ; echo $(VERB) "in $(DIR)$$i..."; \
+ $(MAKE) $(MFLAGS) $(FLAGS) $(TARGET)); \
+ done
+
+install::
+ @$(MAKE) subdirs TARGET=install VERB="Installing" FLAGS=
+
+deinstall::
+ @$(MAKE) subdirs TARGET=deinstall VERB="Deinstalling" FLAGS=
+
+install.man::
+ @$(MAKE) subdirs TARGET=install.man VERB="Installing man pages" FLAGS=
+
+deinstall.man::
+ @$(MAKE) subdirs TARGET=deinstall.man VERB="Deinstalling man pages" FLAGS=
+
+sub_clean::
+ @$(MAKE) subdirs TARGET=clean VERB="Cleaning" FLAGS=
+ @echo "Back to $(CURRENT) for "clean...
+
+sub_realclean::
+ @$(MAKE) subdirs TARGET=realclean VERB="Real cleaning" FLAGS=
+ @echo "Back to $(CURRENT) for "realclean...
+
+sub_clobber::
+ @$(MAKE) subdirs TARGET=clobber VERB="Clobbering" FLAGS=
+ @echo "Back to $(CURRENT) for "clobber...
+
+tag::
+ @case '${MFLAGS}' in *[ik]*) set +e;; esac; \
+ for i in $(SUBDIRS) ;\
+ do \
+ (cd $$i ; echo "Tagging" "in $(DIR)$$i..."; \
+ $(MAKE) $(MFLAGS) tag); \
+ done
+
+Makefiles::
+ @case '${MFLAGS}' in *[ik]*) set +e;; esac; \
+ for i in $(SUBDIRS);\
+ do \
+ echo "Making "Makefiles" in $(DIR)$$i..."; \
+ (cd $$i || exit 1; \
+ if test ! -f Makefile; then /bin/sh Makefile.SH; fi; \
+ $(MAKE) $(MFLAGS) Makefiles) \
+ done
+
+Makefiles.SH:: Makefile.SH
+ @case '${MFLAGS}' in *[ik]*) set +e;; esac; \
+ for i in $(SUBDIRS);\
+ do \
+ case "$(DIR)$$i/" in \
+ */*/*/*/) newtop=../../../..;; \
+ */*/*/) newtop=../../..;; \
+ */*/) newtop=../..;; \
+ */) newtop=..;; \
+ esac; \
+ case "$(TOP)" in \
+ /*) newtop="$(TOP)" ;; \
+ esac; \
+ echo "Making Makefiles.SH in $(DIR)$$i..."; \
+ (cd $$i || exit 1; $(MAKE) $(MFLAGS) -f ../Makefile \
+ Makefile TOP=$$newtop CURRENT=$(DIR)$$i;\
+ $(MAKE) $(MFLAGS) Makefiles.SH) \
+ done
+
+all::
+ @$(MAKE) subdirs TARGET=all VERB="Making all" FLAGS=
+
+########################################################################
+# Dependencies generated by make depend
+# DO NOT DELETE THIS LINE -- make depend relies on it
+
+# Put nothing here or make depend will gobble it up
+.FORCE_DEPEND::
+ @echo "You must run 'make depend' in $(TOP) first."; exit 1
+!NO!SUBS!
+chmod 644 Makefile
+$eunicefix Makefile
+
diff --git a/mcon/NOTES b/mcon/NOTES
new file mode 100644
index 0000000..b6762e0
--- /dev/null
+++ b/mcon/NOTES
@@ -0,0 +1,174 @@
+This file shortly documents the built-in interpreter and other new
+features from metaconfig.
+
+The notion of "conditional unit" has been added. In the ?MAKE: line,
+each unit whose name begins with a "+" will not be loaded in the
+Configure script unless its exact value is a mandatory. The default
+value specified in ?DEF: will be used instead. If no ?DEF: line is
+found, then the symbol is initialized with a null default value.
+
+In the config.h.SH file, only the necessary symbols are loaded. Note
+that the format in ?H: line has changed. It is no longer necessary to
+write ?H:?%1: to get a line included in config.h. First of all, the %1
+symbol is not defined any more. Secondly, the unit's name is now %< and
+it does not matter whether the name appears first in the ?MAKE: line or
+not. Lastly, metaconfig can guess for itself whether to include a
+symbol or not.
+
+Sometimes, it is necessary to force a given value, because metaconfig is
+not smart enough to guess 100% of the time. See voidflags.U for an
+example (look at the ?C: and ?H: lines and read the comments).
+
+The Myread.U unit changed. It is now able to do variable substitutions,
+and it sets the prompt correctly if there is no supplied default. Thus,
+instead of the old:
+
+ dflt=y
+ rp="Question? [$dflt]"
+ $echo $n "$rp $c"
+ . myread
+
+you must now write:
+
+ dflt=y
+ rp='Question?'
+ . myread
+
+and 'myread' will take care of echoing the question with the default
+put in square brakets.
+
+Likewise, question asking for filenames or pathnames may now use the Getfile.U
+unit to take care of all the burden. The presetting is the same as for myread
+and the answer is finally held in $ans. But the variable $fn must be set to
+indicate the type of file and enable/disable some of the sanity checks. See
+leading comments in Getfile.U. Here is a simple example to locate the active
+file:
+
+ dflt='~news/lib'
+ fn='l~:active'
+ rp='Where is the active file?'
+ . getfile
+ active="$ans"
+
+The user may answer the question by using ~substitution and giving only the
+directory where the active file is located (in which case getfile will try
+to locate a file named 'active' in that directory). A full path may also be
+given of course, if the basename of the file is not 'active'.
+
+The units are now filtered by a built-in interpreter before getting
+loaded in Configure. That way, a Configure script can be more or less
+tuned. See d_gethname.U for a complex example.
+
+All the interpreter commands start with a leading '@'. Possible
+commands include:
+
+o if/elsif/else/end is the traditional conditional construct.
+o define <symbol> tells metaconfig the <symbol> is to be defined.
+
+Expressions in conditional constructs can include the &&, || and !
+operator with same meaning as in the shell. Backslash at the end of a
+line stands for the continuation character. All the symbols in the
+expression stands for themselves, and their value is true if they are
+defined/wanted and false otherwise.
+
+It is possible to include shell and perl test. All the text enclosed in
+single brackets as {<text>} is expanded in a shell as
+
+ if <text> >/dev/null 2>&1; then exit 0; else exit 1; fi
+
+whereas text in double brackets as {{<text>}} is expanded in perl as
+
+ if (<text> {exit 0;} else {exit 1;}
+
+and the exit status is used in the standard way to get a boolean value
+(i.e 0 is true and everything else is false). See Oldconfig.U for an
+example.
+
+Metaconfig's interpreter has standard C operator priority, but you may
+force the evaluation order with parenthesis. A simple error recovery
+attempt is made, so that you should get meaningful error messages.
+
+The simple test ?sym: means "keep the remaining of the line iff the
+symbol is defined" and %sym: is the same for non-definedness.
+
+Some special symbols may be put in a unit and will get expanded,
+provided the ?MAKE: command line is 'wipe' and not 'add'. Here are the
+available symbols:
+
+ <PACKAGENAME> is the name $package as found in .package
+ <MAINTLOC> is the $maintloc variable as found in .pakcage
+ <VERSION> is metaconfig's version number
+ <PATCHLEVEL> is metaconfig's patchlevel
+ <DATE> is the current frozen date as given by `date`
+
+A 'wipe'ed unit is passed through the interpreter too.
+
+It is also possible to declare a symbol obsolete. A warning message
+will be issued if the symbol is used and the Glossary mentions it.
+the "Obsolete" clause. The syntax is:
+
+ ?C:symbol (obsolete list):
+ ?S:symbol (obsolete list):
+
+If metaconfig is used with the -o option, it will generate code to remap
+those old symbols to the new ones, so the old code does not have to be changed
+right away. If you do not use -o, the Obsolete file will still be generated
+to warn you about obsolete symbols but no maping will be done.
+
+The new ?W: line can be use to tie up the destiny of some symbols. The syntax
+is:
+
+ ?W:shell symbols list:C symbol list
+
+and the symbols in the shell list will be defined if one of the C symbols is.
+For instance, unit d_const.U uses the following:
+
+ ?W:%<:const
+
+so that any 'const' usage in the C code will have %< (the unit name) handled
+as a wanted symbol. In particular, this has the interesting side effect of
+loading the unit into Configure when the 'const' keyword is used.
+
+This shell symbol list part may be left empty. For example unit i_time.U uses:
+
+ ?W::timezone
+
+for its side effect: the symbol 'timezone' may now be part of the interpreter
+tests to conditionally load some code into Configure when struct timezone is
+used.
+
+C symbol aliasing can be used to let metaconfig know that the symbol comment
+is to be loaded in config_h.SH even when the main symbol is not used in C.
+For instance, d_const.U writes:
+
+ ?C:HASCONST ~ %<:
+
+so that the HASCONST hype is loaded iff the unit (%<) is wanted. This is why
+the ?H: lines are also explicitely tied to the wanted-ness of the d_const
+symbol, by writing:
+
+ ?H:?%<:#$d_const HASCONST /**/
+ ?H:?%<:#ifndef HASCONST
+ ?H:?%<:#define const
+ ?H:?%<:#endif
+ ?H:.
+
+because we want all those lines to appear in config_h.SH as soon as the d_const
+unit is loaded into Configure.
+
+Because of the new -s (silent) option of Configure, the important messages which
+are to appear even in silent mode must be written on file descriptor #4. Others
+will simply not be echoed under -s. Note that all the questions and default
+answers are written on #4. You should write:
+
+ echo " "
+ echo "Checking to see if......" >&4
+ .....
+ echo "Yes, it does"
+
+which will have the traditional behaviour unless -s is used, in which case only
+the line
+
+ Checking to see if.....
+
+will echo on the terminal.
diff --git a/mcon/README b/mcon/README
new file mode 100644
index 0000000..0a6b26e
--- /dev/null
+++ b/mcon/README
@@ -0,0 +1,24 @@
+This is the root directory for metaconfig.
+
+If you are new to metaconfig, you may wish to have a look at the INTRO
+file, which gives a quick introduction.
+
+The metaconfig you have here is a modified version of Larry Wall's 2.0
+release. The units themselves have been ripped off from some Configure
+scripts (perl 4.0, elm 2.3). They all carry a copyright from me, which
+is not true, but it was automatically produced and I had no time yet to
+set the proper copyrights for each unit.
+
+Although metaconfig, as being part of dist, is covered by the Artistic
+License, a Configure script is not copyrighted and belongs to the
+public domain. Units can be copyrighted, and credits for each unit may
+appear in the generated Configure script, at the author's request.
+
+The manual page for metaconfig is not up-to-date. The built-in
+interpreter and the changes are documented in NOTES.
+
+The units that come from dist 2.0 need to be changed. A script should be
+provided in the final release to do an automatic conversion, which will
+be fine 90% of the time. If you want to see how new features can be used,
+I would recommend you to have a look at Oldconfig.U, d_gethname.U and
+voidflags.U.
diff --git a/mcon/U/AAAAA.U b/mcon/U/AAAAA.U
new file mode 100644
index 0000000..bdcb211
--- /dev/null
+++ b/mcon/U/AAAAA.U
@@ -0,0 +1,46 @@
+?RCS: $Id: AAAAA.U,v 3.0.1.4 1994/06/20 06:50:26 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..99d968d
--- /dev/null
+++ b/mcon/U/Begin.U
@@ -0,0 +1,39 @@
+?RCS: $Id: Begin.U,v 3.0.1.3 1997/02/28 14:56:35 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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/Chk_MANI.U b/mcon/U/Chk_MANI.U
new file mode 100644
index 0000000..52fc44c
--- /dev/null
+++ b/mcon/U/Chk_MANI.U
@@ -0,0 +1,84 @@
+?RCS: $Id: Chk_MANI.U,v 3.0.1.2 1997/02/28 14:57:25 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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:
+ awk '$1 !~ /PACK[A-Z]+/ {print $1}' $rsrc/MANIFEST | 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..272e16b
--- /dev/null
+++ b/mcon/U/Chk_whoami.U
@@ -0,0 +1,25 @@
+?RCS: $Id: Chk_whoami.U,v 3.0 1993/08/18 12:04:46 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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/Config_h.U b/mcon/U/Config_h.U
new file mode 100644
index 0000000..9793f61
--- /dev/null
+++ b/mcon/U/Config_h.U
@@ -0,0 +1,104 @@
+?RCS: $Id: Config_h.U,v 3.0.1.5 1997/02/28 14:57:43 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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
+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: Config_h.U,v 3.0.1.5 1997/02/28 14:57:43 ram Exp $
+ */
+
+/*
+ * 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..3f9316c
--- /dev/null
+++ b/mcon/U/Config_sh.U
@@ -0,0 +1,91 @@
+?RCS: $Id: Config_sh.U,v 3.0.1.3 1997/02/28 14:57:53 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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
+?MAKE: -pick add.Config_sh $@ %<
+?MAKE: -pick add $@ ./Obsol_sh
+?MAKE: -pick close.Config_sh $@ %<
+?F:!config.over
+?T:file
+: back to where it started
+if test -d ../UU; then
+ cd ..
+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:
+case "$d_portable" in
+"$define")
+ echo " "
+ echo "Stripping down executable paths..." >&4
+ for file in $loclist $trylist; do
+ eval $file="\$file"
+ 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
+
diff --git a/mcon/U/Configdir.U b/mcon/U/Configdir.U
new file mode 100644
index 0000000..ceed327
--- /dev/null
+++ b/mcon/U/Configdir.U
@@ -0,0 +1,28 @@
+?RCS: $Id: Configdir.U,v 3.0.1.1 1997/02/28 14:58:36 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..fc8200a
--- /dev/null
+++ b/mcon/U/Cppsym.U
@@ -0,0 +1,229 @@
+?RCS: $Id: Cppsym.U,v 3.0.1.5 1995/05/12 11:59:11 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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: eunicefix Guess cppstdin awk cat tr sed sort grep rm startsh \
+ contains cppminus +cc +gccversion test comm uniq echo n c Options
+?MAKE: -pick add $@ %<
+?F:./Cppsym
+?T:sym list unknown status also symbols i
+?V:al
+?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:
+?INIT:: list of known cpp symbols, sorted alphabetically
+?INIT:al="AMIX BIT_MSF BSD BSD4_3 BSD_NET2 CMU CRAY DGUX DOLPHIN DPX2"
+?INIT:al="$al GO32 GOULD_PN HP700 I386 I80960 I960 Lynx M68000 M68K MACH"
+?INIT:al="$al MIPSEB MIPSEL MSDOS MTXINU MULTIMAX MVS"
+?INIT:al="$al M_COFF M_I186 M_I286 M_I386 M_I8086 M_I86 M_I86SM"
+?INIT:al="$al M_SYS3 M_SYS5 M_SYSIII M_SYSV M_UNIX M_XENIX"
+?INIT:al="$al NeXT OCS88 OSF1 PARISC PC532 PORTAR POSIX"
+?INIT:al="$al PWB R3000 RES RISC6000 RT Sun386i SVR3 SVR4"
+?INIT:al="$al SYSTYPE_BSD SYSTYPE_SVR4 SYSTYPE_SYSV Tek4132 Tek4300"
+?INIT:al="$al UMAXV USGr4 USGr4_2 UTEK UTS UTek UnicomPBB UnicomPBD Utek"
+?INIT:al="$al VMS Xenix286"
+?INIT:al="$al _AIX _AIX32 _AIX370 _AM29000 _COFF _CRAY _CX_UX _EPI"
+?INIT:al="$al _IBMESA _IBMR2 _M88K _M88KBCS_TARGET"
+?INIT:al="$al _MIPSEB _MIPSEL _M_COFF _M_I86 _M_I86SM _M_SYS3"
+?INIT:al="$al _M_SYS5 _M_SYSIII _M_SYSV _M_UNIX _M_XENIX _NLS _PGC_ _R3000"
+?INIT:al="$al _SYSTYPE_BSD _SYSTYPE_BSD43 _SYSTYPE_SVR4"
+?INIT:al="$al _SYSTYPE_SYSV _SYSV3 _U370 _UNICOS"
+?INIT:al="$al __386BSD__ __BIG_ENDIAN __BIG_ENDIAN__ __BSD_4_4__"
+?INIT:al="$al __DGUX__ __DPX2__ __H3050R __H3050RX"
+?INIT:al="$al __LITTLE_ENDIAN __LITTLE_ENDIAN__ __MACH__"
+?INIT:al="$al __MIPSEB __MIPSEB__ __MIPSEL __MIPSEL__"
+?INIT:al="$al __Next__ __OSF1__ __PARAGON__ __PGC__ __PWB __STDC__"
+?INIT:al="$al __SVR4_2__ __UMAXV__"
+?INIT:al="$al ____386BSD____ __alpha __alpha__ __amiga"
+?INIT:al="$al __bsd4_2 __bsd4_2__ __bsdi__ __convex__"
+?INIT:al="$al __host_mips__"
+?INIT:al="$al __hp9000s200 __hp9000s300 __hp9000s400 __hp9000s500"
+?INIT:al="$al __hp9000s500 __hp9000s700 __hp9000s800"
+?INIT:al="$al __hppa __hpux __hp_osf __i286 __i286__ __i386 __i386__"
+?INIT:al="$al __i486 __i486__ __i860 __i860__ __ibmesa __ksr1__ __linux__"
+?INIT:al="$al __m68k __m68k__ __m88100__ __m88k __m88k__"
+?INIT:al="$al __mc68000 __mc68000__ __mc68020 __mc68020__"
+?INIT:al="$al __mc68030 __mc68030__ __mc68040 __mc68040__"
+?INIT:al="$al __mc88100 __mc88100__ __mips __mips__"
+?INIT:al="$al __motorola__ __osf__ __pa_risc __sparc__ __stdc__"
+?INIT:al="$al __sun __sun__ __svr3__ __svr4__ __ultrix __ultrix__"
+?INIT:al="$al __unix __unix__ __uxpm__ __uxps__ __vax __vax__"
+?INIT:al="$al _host_mips _mips _unix"
+?INIT:al="$al a29k aegis aix aixpc alliant alpha am29000 amiga ansi ardent"
+?INIT:al="$al apollo ardent att386 att3b"
+?INIT:al="$al bsd bsd43 bsd4_2 bsd4_3 bsd4_4 bsdi bull"
+?INIT:al="$al cadmus clipper concurrent convex cray ctix"
+?INIT:al="$al dmert encore gcos gcx gimpel gould"
+?INIT:al="$al hbullx20 hcx host_mips hp200 hp300 hp700 hp800"
+?INIT:al="$al hp9000 hp9000s300 hp9000s400 hp9000s500"
+?INIT:al="$al hp9000s700 hp9000s800 hp9k8 hppa hpux"
+?INIT:al="$al i186 i286 i386 i486 i8086"
+?INIT:al="$al i80960 i860 iAPX286 ibm ibm032 ibmrt interdata is68k"
+?INIT:al="$al ksr1 linux luna luna88k m68k m88100 m88k"
+?INIT:al="$al mc300 mc500 mc68000 mc68010 mc68020 mc68030"
+?INIT:al="$al mc68040 mc68060 mc68k mc68k32 mc700"
+?INIT:al="$al mc88000 mc88100 merlin mert mips mvs n16"
+?INIT:al="$al ncl_el ncl_mr"
+?INIT:al="$al news1500 news1700 news1800 news1900 news3700"
+?INIT:al="$al news700 news800 news900 ns16000 ns32000"
+?INIT:al="$al ns32016 ns32332 ns32k nsc32000 os osf"
+?INIT:al="$al parisc pc532 pdp11 plexus posix pyr"
+?INIT:al="$al riscix riscos scs sequent sgi sinix sony sony_news"
+?INIT:al="$al sonyrisc sparc sparclite spectrum stardent stratos"
+?INIT:al="$al sun sun3 sun386 svr4 sysV68 sysV88"
+?INIT:al="$al titan tower tower32 tower32_200 tower32_600 tower32_700"
+?INIT:al="$al tower32_800 tower32_850 tss u370 u3b u3b2 u3b20 u3b200"
+?INIT:al="$al u3b20d u3b5 ultrix unix unixpc unos vax venix vms"
+?INIT:al="$al xenix z8000"
+?INIT:
+: get C preprocessor symbols handy
+echo " "
+$echo $n "Hmm... $c"
+?X: The following used to be tr '[ - ]' ... but this was rejected by AIX 3.2
+?X: since the endpoints where the same (from patch 12u8 to patch).
+echo $al | $tr ' ' '\012' >Cppsym.know
+$cat <<EOSS >Cppsym
+$startsh
+case "\$1" in
+-l) list=true
+ shift
+ ;;
+esac
+unknown=''
+case "\$list\$#" in
+1|2)
+ for sym do
+ if $contains "^\$1$" Cppsym.true >/dev/null 2>&1; then
+ exit 0
+ elif $contains "^\$1$" Cppsym.know >/dev/null 2>&1; then
+ :
+ else
+ unknown="\$unknown \$sym"
+ fi
+ done
+ set X \$unknown
+ shift
+ ;;
+esac
+case \$# in
+0) exit 1;;
+esac
+echo \$* | $tr ' ' '\012' | $sed -e 's/\(.*\)/\\
+#ifdef \1\\
+exit 0; _ _ _ _\1\\ \1\\
+#endif\\
+/' >Cppsym\$\$
+echo "exit 1; _ _ _" >>Cppsym\$\$
+$cppstdin $cppminus <Cppsym\$\$ | $grep '^exit [01]; _ _' >Cppsym2\$\$
+case "\$list" in
+true) $awk 'NF > 5 {print substr(\$6,2,100)}' <Cppsym2\$\$ ;;
+*)
+ sh Cppsym2\$\$
+ status=\$?
+ ;;
+esac
+$rm -f Cppsym\$\$ Cppsym2\$\$
+exit \$status
+EOSS
+chmod +x Cppsym
+$eunicefix Cppsym
+./Cppsym -l $al | $sort | $grep -v '^$' >Cppsym.true
+
+: now check the C compiler for additional symbols
+?X: suggested by Jarkko Hietaniemi <jhi@snakemail.hut.fi>, thanks!
+$cat >ccsym <<EOS
+$startsh
+$cat >tmp.c <<EOF
+extern int foo;
+EOF
+for i in \`$cc -v -c tmp.c 2>&1\`
+do
+ case "\$i" in
+ -D*) echo "\$i" | $sed 's/^-D//';;
+ -A*) $test "$gccversion" && echo "\$i" | $sed 's/^-A\(.*\)(\(.*\))/\1=\2/';;
+ esac
+done
+$rm -f try.c
+EOS
+chmod +x ccsym
+$eunicefix ccsym
+./ccsym | $sort | $uniq >ccsym.raw
+?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"=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=''
+symbols='symbols'
+if $test -z ccsym.raw; then
+ echo "Your C compiler doesn't seem to define any symbol!" >&4
+ echo " "
+ echo "However, your C preprocessor defines the following ones:"
+ $cat Cppsym.true
+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'
+ $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 '
+ $test "$silent" || sleep 1
+ fi
+ if $test -s ccsym.own; then
+ $test "$also" && echo " "
+ echo "Your C compiler ${also}defines the following cpp variables:"
+ $sed -e 's/\(.*\)=1/\1/' ccsym.own
+ $sed -e 's/\(.*\)=.*/\1/' ccsym.own | $uniq >>Cppsym.true
+ $test "$silent" || sleep 1
+ fi
+fi
+$rm -f ccsym*
+
diff --git a/mcon/U/Csym.U b/mcon/U/Csym.U
new file mode 100644
index 0000000..0b0bd2c
--- /dev/null
+++ b/mcon/U/Csym.U
@@ -0,0 +1,96 @@
+?RCS: $Id: Csym.U,v 3.0.1.4 1995/07/25 13:36:29 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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: Put symbol inside a printf to fool optimizing compilers...
+?X:
+?X: We use 'short' 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 'short' 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 'short'
+?X: trick is obsoleted by future gcc releases). -- RAM
+?X:
+ echo "main() { extern short $1$tdc; printf(\"%hd\", $1$tc); }" > 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..2de82eb
--- /dev/null
+++ b/mcon/U/End.U
@@ -0,0 +1,28 @@
+?RCS: $Id: End.U,v 3.0 1993/08/18 12:04:51 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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."
+echo " "
+
diff --git a/mcon/U/Extract.U b/mcon/U/Extract.U
new file mode 100644
index 0000000..d4a8f55
--- /dev/null
+++ b/mcon/U/Extract.U
@@ -0,0 +1,119 @@
+?RCS: $Id: Extract.U,v 3.0.1.2 1997/02/28 14:58:52 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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: src
+?MAKE: -pick add $@ %<
+?F:./extract
+?T:CONFIG dir file name create mkdir_p
+: script used to extract .SH files with variable substitutions
+cat >extract <<'EOS'
+CONFIG=true
+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
+?X: script to emulate mkdir -p
+mkdir_p='
+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
+'
+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.*/\(.*\)'`
+ (set x $dir; shift; eval $mkdir_p)
+ sh <$src/$dir/$file
+ ;;
+ *)
+ sh <$src/$file
+ ;;
+ esac
+ ;;
+ esac
+done
+if test -f $src/config_h.SH; then
+ if test ! -f config.h; then
+ : oops, they left it out of MANIFEST, probably, so do it anyway.
+ . $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..eb69b75
--- /dev/null
+++ b/mcon/U/Extractall.U
@@ -0,0 +1,54 @@
+?RCS: $Id: Extractall.U,v 3.0.1.1 1997/02/28 15:00:43 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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 rsrc
+?MAKE: -pick wipe $@ %<
+?T:config
+: 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'; config="$rsrc/config.sh";;
+ /*) config="$config_sh";;
+ *) config="$rsrc/$config_sh";;
+ esac
+ echo " "
+ echo "Fetching answers from $config_sh..."
+ . $config
+ test "$override" && . ./optdef.sh
+ echo " "
+?X: extract has to be run from the top directory, not within UU.
+ cd ..
+ . UU/extract
+ rm -rf UU
+ echo "Done."
+ exit 0
+ ;;
+esac
+
diff --git a/mcon/U/Filexp.U b/mcon/U/Filexp.U
new file mode 100644
index 0000000..9713a87
--- /dev/null
+++ b/mcon/U/Filexp.U
@@ -0,0 +1,69 @@
+?RCS: $Id: Filexp.U,v 3.0.1.2 1994/10/29 15:52:53 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..48d4d75
--- /dev/null
+++ b/mcon/U/Findhdr.U
@@ -0,0 +1,106 @@
+?RCS: $Id: Findhdr.U,v 3.0.1.2 1994/10/29 15:53:08 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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
+?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
+: determine filename position in cpp output
+echo " "
+echo "Computing filename position in cpp output for #include directives..." >&4
+echo '#include <stdio.h>' > foo.c
+$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 -r \`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=''
+if test -f $usrinc/\$wanted; then
+ echo "$usrinc/\$wanted"
+ exit 0
+fi
+awkprg='{ print \$$fieldn }'
+echo "#include <\$wanted>" > foo\$\$.c
+$cppstdin $cppminus $cppflags < foo\$\$.c 2>/dev/null | \
+$grep "^[ ]*#.*\$wanted" | \
+while read cline; do
+ name=\`echo \$cline | $awk "\$awkprg" | $tr -d '"'\`
+ case "\$name" in
+ */\$wanted) echo "\$name"; exit 0;;
+ *) name='';;
+ esac;
+done;
+$rm -f foo\$\$.c;
+case "\$name" in
+'') exit 1;;
+esac
+EOF
+chmod +x findhdr
+
diff --git a/mcon/U/Finish.U b/mcon/U/Finish.U
new file mode 100644
index 0000000..9aedfdc
--- /dev/null
+++ b/mcon/U/Finish.U
@@ -0,0 +1,122 @@
+?RCS: $Id: Finish.U,v 3.0.1.6 1995/02/15 14:09:30 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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
+?MAKE: -pick add $@ %<
+?F:!config.sh
+: Finish up by extracting the .SH files
+case "$alldone" in
+exit)
+ $rm -rf UU
+ echo "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
+. ./UU/extract
+
+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 a 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 "Done."
+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..787a62c
--- /dev/null
+++ b/mcon/U/Getfile.U
@@ -0,0 +1,305 @@
+?RCS: $Id: Getfile.U,v 3.0.1.7 1997/02/28 15:01:06 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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:
+?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
+?MAKE: -pick add $@ %<
+?V:ansexp:fn
+?F:./getfile
+?T:tilde type what orig_rp orig_dflt fullpath already redo skip none_ok \
+ value exp_file nopath_ok loc_file
+?LINT:change ans
+: 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"
+
+?X: Begin by stripping out any (...) grouping.
+case "$fn" in
+*\(*)
+ expr $fn : '.*(\(.*\)).*' | tr ',' '\012' >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" ;;
+ *)
+ 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)
+ if test -f "$ansexp"; then
+ type=''
+ elif test -r "$ansexp" || (test -h "$ansexp") >/dev/null 2>&1
+ then
+ echo "($value is not a plain file, but that's ok.)"
+ type=''
+ fi
+ ;;
+ Directory)
+ if test -d "$ansexp"; then
+ type=''
+ fi
+ ;;
+ 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
+EOSC
+
diff --git a/mcon/U/Guess.U b/mcon/U/Guess.U
new file mode 100644
index 0000000..faa4ea2
--- /dev/null
+++ b/mcon/U/Guess.U
@@ -0,0 +1,171 @@
+?RCS: $Id: Guess.U,v 3.0.1.5 1995/07/25 13:37:14 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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: cat test echo n c contains rm Loc eunicefix
+?MAKE: -pick add $@ %<
+?S:d_eunice:
+?S: This variable conditionally defines the symbols EUNICE and VAX, 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, which alerts
+?S: the C program that it runs under Xenix.
+?S:.
+?S:d_bsd:
+?S: This symbol conditionally defines the symbol BSD when running on a
+?S: BSD system.
+?S:.
+?C: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:
+?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:
+?C: This symbol, if defined, indicates thet the program is running under
+?C: Xenix (at least 3.0 ?).
+?C:.
+?C:BSD:
+?C: This symbol, if defined, indicates that the program is running under
+?C: a BSD system.
+?C:.
+?H:#$d_eunice EUNICE /**/
+?H:#$d_eunice VMS /**/
+?H:#$d_xenix XENIX /**/
+?H:#$d_bsd BSD /**/
+?H:.
+?F:./bsd ./usg ./v7 ./osf1 ./eunice ./xenix ./venix ./os2
+?T:xxx
+: 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
+d_bsd="$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
+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...
+lemme think...does HAL ring a bell?...no, of course, you're only running OS/2!
+EOI
+ echo exit 0 >os2
+ ;;
+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 os2
+$eunicefix bsd usg v7 osf1 eunice xenix venix os2
+$rm -f foo
+
diff --git a/mcon/U/Head.U b/mcon/U/Head.U
new file mode 100644
index 0000000..cdffded
--- /dev/null
+++ b/mcon/U/Head.U
@@ -0,0 +1,246 @@
+?RCS: $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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_ me
+?T:argv Id p paths OS2_SHELL
+?T:inksh needksh avoidksh newsh changesh reason
+#! /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-3.0 package (which contains metaconfig) was posted in
+# comp.sources.misc and is available on CPAN under authors/id/RAM so
+# you may fetch it yourself from your nearest archive site.)
+#
+?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: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
+#
+# Generated on <DATE> [metaconfig <VERSION> PL<PATCHLEVEL>]
+
+cat >/tmp/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 >/tmp/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 /tmp/c1$$ /tmp/c2$$
+true || exec sh $0 $argv:q
+
+(exit $?0) || cat /tmp/c2$$
+(exit $?0) || exec sh $0 $argv:q
+rm -f /tmp/c1$$ /tmp/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 OS/2.
+?X:
+: Proper PATH separator
+p_=:
+: On OS/2 this directory should exist if this is not floppy only system :-]
+if test -d c:/.; 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]'`
+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"
+
+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: If we are not in ksh and need it, then feed us back to it
+case "$inksh/$needksh" in
+/[a-z]*)
+?X: Unset ENV to avoid any ~/.kshrc that could alias cd or whatever...
+ unset 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)
+ 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
+
+: Configure runs within the UU subdirectory
+test -d UU || mkdir UU
+?X: Use ./* to avoid any confirmation prompts from enhanced shells -- WED
+?X: Unset CDPATH to avoid surprised when using cd under some shells
+unset CDPATH
+cd UU && rm -f ./*
+
diff --git a/mcon/U/Inhdr.U b/mcon/U/Inhdr.U
new file mode 100644
index 0000000..c55db84
--- /dev/null
+++ b/mcon/U/Inhdr.U
@@ -0,0 +1,78 @@
+?RCS: $Id: Inhdr.U,v 3.0.1.2 1995/05/12 12:01:31 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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
+?LINT:use ccflags
+?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..9ccb68d
--- /dev/null
+++ b/mcon/U/Init.U
@@ -0,0 +1,54 @@
+?RCS: $Id: Init.U,v 3.0.1.1 1994/10/31 09:45:59 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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: 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:.
+?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:
+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
+
diff --git a/mcon/U/Inlibc.U b/mcon/U/Inlibc.U
new file mode 100644
index 0000000..a34d4e2
--- /dev/null
+++ b/mcon/U/Inlibc.U
@@ -0,0 +1,65 @@
+?RCS: $Id: Inlibc.U,v 3.0.1.1 1994/10/29 15:55:08 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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
+?LINT:use libc
+?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..5c6ff21
--- /dev/null
+++ b/mcon/U/Instruct.U
@@ -0,0 +1,116 @@
+?RCS: $Id: Instruct.U,v 3.0.1.3 1997/02/28 15:02:55 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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 remaining 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..e54b817
--- /dev/null
+++ b/mcon/U/Loc.U
@@ -0,0 +1,345 @@
+?RCS: $Id: Loc.U,v 3.0.1.10 1997/02/28 15:04:16 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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 \
+ gcc gzip grep inews ksh less line lint ln lp lpr ls mail mailx \
+ make mkdir more mv nroff perl pg pmake pr rm rmail sed sendmail \
+ shar sleep smail sort submit tail tar tbl test touch tr troff \
+ uname uniq uuname vi zcat zip: eunicefix n c Instruct Myread \
+ startsh
+?MAKE: -pick weed $@ %<
+?LINT:describe Loc Mcc awk ar bash bison byacc cat chgrp chmod chown \
+ comm compress cp cpio cpp csh date echo egrep emacs expr find flex \
+ gcc gzip grep inews ksh less line lint ln lp lpr ls mail mailx \
+ make mkdir more mv nroff perl pg pmake pr rm rmail sed sendmail \
+ shar sleep smail sort submit tail tar tbl test touch tr troff \
+ uname uniq uuname vi zcat zip
+?V::pth loclist trylist
+?F:./loc
+?T:thisthing thing xxx dir file say _test
+?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 \$dir/\$thing.exe; then
+ : on Eunice apparently
+ echo \$dir/\$thing
+ exit 0
+ fi
+ ;;
+ esac
+done
+echo \$dflt
+exit 1
+EOSC
+chmod +x loc
+$eunicefix loc
+loclist="
+?awk:awk
+?cat:cat
+?chgrp:chgrp
+?chmod:chmod
+?chown:chown
+?comm:comm
+?cp:cp
+?echo:echo
+?expr:expr
+?find:find
+?grep:grep
+?ls:ls
+?make:make
+?mkdir:mkdir
+?mv:mv
+?rm:rm
+?sed:sed
+?sleep:sleep
+?sort:sort
+?tail:tail
+?touch:touch
+?tr:tr
+?uniq:uniq
+"
+trylist="
+?Mcc:Mcc
+?ar:ar
+?bash:bash
+?bison:bison
+?byacc:byacc
+?compress:compress
+?cpio:cpio
+?cpp:cpp
+?csh:csh
+?date:date
+?egrep:egrep
+?emacs:emacs
+?flex:flex
+?gcc:gcc
+?gzip:gzip
+?inews:inews
+?ksh:ksh
+?less:less
+?line:line
+?lint:lint
+?ln:ln
+?lp:lp
+?lpr:lpr
+?mail:mail
+?mailx:mailx
+?more:more
+?nroff:nroff
+?perl:perl
+?pg:pg
+?pmake:pmake
+?pr:pr
+?rmail:rmail
+?sendmail:sendmail
+?shar:shar
+?smail:smail
+?submit:submit
+?tar:tar
+?tbl:tbl
+?test:test
+?troff:troff
+?uname:uname
+?uuname:uuname
+?vi:vi
+?zcat:zcat
+?zip:zip
+"
+?LINT:set Loc Mcc awk ar bash bison byacc cat chgrp chmod chown \
+ comm compress cp cpio cpp csh date echo egrep emacs expr find flex \
+ gcc gzip grep inews ksh less line lint ln lp lpr ls mail mailx \
+ make mkdir more mv nroff perl pg pmake pr rm rmail sed sendmail \
+ shar sleep smail sort submit tail tar tbl test 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
+ echo "WARNING: no $xxx -- ignoring your setting for $file." >&4
+ xxx=`./loc $file $file $pth`
+ fi
+ ;;
+ '') xxx=`./loc $file $file $pth`;;
+ *) xxx=`./loc $xxx $xxx $pth`;;
+ esac
+ eval $file=$xxx
+ eval _$file=$xxx
+ case "$xxx" in
+ /*)
+ echo $file is in $xxx.
+ ;;
+?X: Under OS/2, we have PC-like paths
+ ?:[\\/]*)
+ echo $file is in $xxx.
+ ;;
+ *)
+ echo "I don't know where '$file' is, and my life depends on it." >&4
+ echo "Go find a public domain implementation or fix your PATH 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
+ echo "WARNING: no $xxx -- ignoring your setting for $file." >&4
+ xxx=`./loc $file $file $pth`
+ fi
+ ;;
+ '') xxx=`./loc $file $file $pth`;;
+ *) xxx=`./loc $xxx $xxx $pth`;;
+ esac
+ eval $file=$xxx
+ eval _$file=$xxx
+ case "$xxx" in
+ /*)
+ echo $file is in $xxx.
+ ;;
+?X: Under OS/2, we have PC-like paths
+ ?:[\\/]*)
+ echo $file is in $xxx.
+ ;;
+ *)
+ echo "I don't see $file out there, $say."
+ say=either
+ ;;
+ esac
+done
+case "$egrep" in
+egrep)
+ echo "Substituting grep for egrep."
+ egrep=$grep
+ ;;
+esac
+@if ln
+case "$ln" in
+ln)
+ echo "Substituting cp for ln."
+ ln=$cp
+ ;;
+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..e587af6
--- /dev/null
+++ b/mcon/U/Loc_sed.U
@@ -0,0 +1,34 @@
+?RCS: $Id: Loc_sed.U,v 3.0.1.1 1997/02/28 15:04:22 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1996, Andy Dougherty
+?RCS: Copyright (c) 1991-1993, 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 3.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:.
+?LINT:use sed
+: 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..27f1e19
--- /dev/null
+++ b/mcon/U/Magic_h.U
@@ -0,0 +1,42 @@
+?RCS: $Id: Magic_h.U,v 3.0.1.2 1993/11/10 17:32:58 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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
+/*
+ * 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: Magic_h.U,v 3.0.1.2 1993/11/10 17:32:58 ram Exp $
+ */
+
+#ifndef _confmagic_h_
+#define _confmagic_h_
+
diff --git a/mcon/U/MailAuthor.U b/mcon/U/MailAuthor.U
new file mode 100644
index 0000000..741a978
--- /dev/null
+++ b/mcon/U/MailAuthor.U
@@ -0,0 +1,192 @@
+?RCS: $Id: MailAuthor.U,v 3.0.1.5 1997/02/28 15:04:41 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..80233fb
--- /dev/null
+++ b/mcon/U/MailList.U
@@ -0,0 +1,82 @@
+?RCS: $Id: MailList.U,v 3.0.1.1 1994/01/24 14:01:49 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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/Myinit.U b/mcon/U/Myinit.U
new file mode 100644
index 0000000..b4dab64
--- /dev/null
+++ b/mcon/U/Myinit.U
@@ -0,0 +1,26 @@
+?RCS: $Id: Myinit.U,v 3.0.1.1 1994/10/31 09:47:29 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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 $@ %<
+
diff --git a/mcon/U/Myread.U b/mcon/U/Myread.U
new file mode 100644
index 0000000..6a2fdb2
--- /dev/null
+++ b/mcon/U/Myread.U
@@ -0,0 +1,199 @@
+?RCS: $Id: Myread.U,v 3.0.1.6 1997/02/28 15:05:39 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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
+?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 '\012' ' '\`
+ 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..59c9e32
--- /dev/null
+++ b/mcon/U/Nothing.U
@@ -0,0 +1,19 @@
+?RCS: $Id: Nothing.U,v 3.0 1993/08/18 12:05:09 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..d3b7f51
--- /dev/null
+++ b/mcon/U/Null.U
@@ -0,0 +1,20 @@
+?RCS: $Id: Null.U,v 3.0 1993/08/18 12:05:10 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..e11626d
--- /dev/null
+++ b/mcon/U/Obsol_h.U
@@ -0,0 +1,27 @@
+?RCS: $Id: Obsol_h.U,v 3.0 1993/08/18 12:05:11 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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
+/*
+ * 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..ecabb9a
--- /dev/null
+++ b/mcon/U/Obsol_sh.U
@@ -0,0 +1,26 @@
+?RCS: $Id: Obsol_sh.U,v 3.0 1993/08/18 12:05:11 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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
+#
+# 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..1e18b0f
--- /dev/null
+++ b/mcon/U/Oldconfig.U
@@ -0,0 +1,599 @@
+?RCS: $Id: Oldconfig.U,v 3.0.1.10 1997/02/28 15:06:39 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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 uname \
+ sh awk sed test cat rm lns n c contains Loc Options Tr src
+?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:.
+?H:#define OSNAME "$osname" /**/
+?H:.
+?F:!config.sh
+?T:tmp tmp_n tmp_c tmp_sh file
+?T:xxxxfile xxxfile xxfile xfile hintfile newmyuname
+?T:tans _ isesix INITPROG
+?LINT:change n c sh
+: Try to determine whether config.sh was made on this system
+case "$config_sh" in
+'')
+?X: indentation wrong on purpose--RAM
+?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 uname is not found; e.g.
+?X: old SUN-OS 3.2 would not execute hostname in (uname -a || hostname). Sigh!
+myuname=`( ($uname -a) 2>/dev/null || hostname) 2>&1`
+?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 '\012' ' '`
+?X: Save the value we just computed to reset myuname after we get done here.
+newmyuname="$myuname"
+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
+
+@if {test -d ../hints}
+: Get old answers from old config file if Configure was run on the
+: same system, otherwise use the hints.
+hint=default
+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
+ echo " "
+ rp="I see a config.sh file. Shall I use it to set the defaults?"
+ . UU/myread
+ case "$ans" in
+ n*|N*) echo "OK, I'll ignore it."; mv config.sh config.sh.old;;
+ *) 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 UU
+ n="$tmp_n"
+ c="$tmp_c"
+ : Older versions did not always set $sh. Catch re-use of such
+ : an old config.sh.
+ case "$sh" in
+ '') sh="$tmp_sh" ;;
+ esac
+ hint=previous
+ ;;
+ esac
+fi
+if test ! -f config.sh; then
+ $cat <<EOM
+
+First time through, eh? I have some defaults handy for the following systems:
+
+EOM
+ (cd $src/hints; ls -C *.sh) | $sed 's/\.sh/ /g' >&4
+ dflt=''
+ : Half the following guesses are probably wrong... If you have better
+ : tests or hints, please send them to <MAINTLOC>
+ : The metaconfig authors would also appreciate a copy...
+ $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.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
+ if $test -d /MachTen; 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
+?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 -f $uname; 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 ;;
+ news*) osname=news ;;
+?X: Interactive Unix.
+ i386*)
+ if $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
+ ;;
+ 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
+ ;;
+ *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="$3"
+ ;;
+ freebsd) osname=freebsd
+ osvers="$3" ;;
+ genix) osname=genix ;;
+ hp*) osname=hpux
+ case "$3" in
+ *.08.*) osvers=9 ;;
+ *.09.*) osvers=9 ;;
+ *.10.*) osvers=10 ;;
+ *) osvers="$3" ;;
+ esac
+ ;;
+ irix*) osname=irix
+ case "$3" in
+ 4*) osvers=4 ;;
+ 5*) osvers=5 ;;
+ *) osvers="$3" ;;
+ esac
+ ;;
+ linux) osname=linux
+ case "$3" in
+ 1*) osvers=1 ;;
+ *) osvers="$3" ;;
+ esac
+ ;;
+ netbsd*) osname=netbsd
+ osvers="$3"
+ ;;
+ bsd386) osname=bsd386
+ osvers=`$uname -r`
+ ;;
+ next*) osname=next ;;
+ 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 either vn.n or tn.n.
+ osname=dec_osf
+ osvers=`echo "$3" | sed 's/^[vt]//'`
+ ;;
+ hp*) osname=hp_osf1 ;;
+ mips) osname=mips_osf1 ;;
+?X: hp and mips were unsupported Technology Releases -- ADO, 24/10/94
+ esac
+ ;;
+ uts) osname=uts
+ osvers="$3"
+ ;;
+ qnx) osname=qnx
+ osvers="$4"
+ ;;
+ $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 sco_$1_$2_$3.sh; then
+ osvers=$1.$2.$3
+ elif $test -f sco_$1_$2.sh; then
+ osvers=$1.$2
+ elif $test -f 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 an OS/2
+ elif test -d c:/.; then
+ set X $myuname
+ osname=os2
+ osvers="$5"
+ fi
+ fi
+
+ : 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
+ ;;
+ *)
+ dflt=`echo $hintfile | $sed 's/\.sh$//'`
+ ;;
+ esac
+
+ $cat <<EOM
+
+You may give one or more space-separated answers, or "none" if appropriate.
+If your OS version has no hints, DO NOT give a wrong version -- say "none".
+
+EOM
+ rp="Which of these apply, if any?"
+ . UU/myread
+ tans=$ans
+ for file in $tans; do
+ if $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
+@else
+: Get old answers, if there is a config file out there
+hint=default
+hintfile=''
+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.";;
+ *) echo "Fetching default answers from your old config.sh file..." >&4
+ tmp_n="$n"
+ tmp_c="$c"
+ . ../config.sh
+ cp ../config.sh .
+ n="$tmp_n"
+ c="$tmp_c"
+ hint=previous
+ ;;
+ esac
+fi
+@end
+?X: remember, indentation is wrong--RAM
+;;
+*)
+ echo " "
+ echo "Fetching default answers from $config_sh..." >&4
+ tmp_n="$n"
+ tmp_c="$c"
+ 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
+test "$override" && . ./optdef.sh
+myuname="$newmyuname"
+
+: Restore computed paths
+for file in $loclist $trylist; do
+ eval $file="\$_$file"
+done
+
+@if osname || osvers
+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..c49cb64
--- /dev/null
+++ b/mcon/U/Oldsym.U
@@ -0,0 +1,62 @@
+?RCS: $Id: Oldsym.U,v 3.0.1.1 1997/02/28 15:06:58 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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 test hint src
+?MAKE: -pick add $@ %<
+?T:CONFIG sym tmp s
+: 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:
+ 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..0985d3e
--- /dev/null
+++ b/mcon/U/Options.U
@@ -0,0 +1,255 @@
+?RCS: $Id: Options.U,v 3.0.1.7 1997/02/28 15:08:15 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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 symbol
+?F:./optdef.sh
+: produce awk script to parse command line options
+cat >options.awk <<'EOF'
+BEGIN {
+ optstr = "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
+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
+ ;;
+ -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=]
+ -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
+ -V : print version number and exit (with a zero status).
+EOM
+ exit 1
+ ;;
+esac
+
+?X:
+?X: Unless they specified both -d and -e/E, make sure we're running
+?X: interactively, i.e. attached to a terminal. Moved from Head.U to be able
+?X: 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) ;;
+*)
+ if test ! -t 0; then
+ echo "Say 'sh Configure', not 'sh <Configure'"
+ exit 1
+ fi
+ ;;
+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
+
diff --git a/mcon/U/Prefixit.U b/mcon/U/Prefixit.U
new file mode 100644
index 0000000..91f11aa
--- /dev/null
+++ b/mcon/U/Prefixit.U
@@ -0,0 +1,68 @@
+?RCS: $Id: Prefixit.U,v 3.0.1.1 1995/01/30 14:29:22 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..11b633a
--- /dev/null
+++ b/mcon/U/Prefixup.U
@@ -0,0 +1,38 @@
+?RCS: $Id: Prefixup.U,v 3.0.1.1 1995/01/30 14:30:40 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..e7f4bd7
--- /dev/null
+++ b/mcon/U/Rcs.U
@@ -0,0 +1,34 @@
+?RCS: $Id: Rcs.U,v 3.0 1993/08/18 12:05:15 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..645d271
--- /dev/null
+++ b/mcon/U/Setvar.U
@@ -0,0 +1,50 @@
+?RCS: $Id: Setvar.U,v 3.0.1.1 1994/10/29 15:58:28 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..2eb4ea9
--- /dev/null
+++ b/mcon/U/Signal.U
@@ -0,0 +1,192 @@
+?RCS: $Id: Signal.U,v 3.0.1.1 1997/02/28 15:20:01 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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: 1- A signal.c file, which, when compiled and ran, 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: 3- A signal_cmd script to compile signal.c and run it
+?X: through sort -n +1 | uniq | awk -f signal.awk.
+?X: (This is called signal_cmd to avoid OS/2 confusion with
+?X: signal.cmd vs. signal.
+?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 +cc +ccflags +ldflags _o
+?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
+: Trace out the files included by signal.h, then look for SIGxxx names.
+: Remove SIGARRAYSIZE used by HPUX.
+: Remove SIGTYP void lines used by OS2.
+xxx=`echo '#include <signal.h>' |
+ $cppstdin $cppminus $cppflags 2>/dev/null |
+ $grep '^[ ]*#.*include' |
+ $awk "{print \\$$fieldn}" | $sed 's!"!!g' | $sort | $uniq`
+: Check this list of files to be sure we have parsed the cpp output ok.
+: This will also avoid potentially non-existent files, such
+: 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
+: 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/ && $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 CHLD CLD CONT DIL EMT FPE HUP ILL INT IO IOT KILL"
+xxx="$xxx LOST PHONE PIPE POLL PROF PWR QUIT SEGV STKFLT STOP SYS TERM TRAP"
+xxx="$xxx TSTP TTIN TTOU URG USR1 USR2 USR3 USR4 VTALRM"
+xxx="$xxx WINCH WIND WINDOW XCPU XFSZ"
+: generate a few handy files for later
+$cat > signal.c <<'EOP'
+#include <sys/types.h>
+#include <signal.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);
+
+EOP
+echo $xxx | $tr ' ' '\012' | $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 "}\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 }
+ 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
+$test -s signal.lst && exit 0
+if $cc $ccflags signal.c -o signal $ldflags >/dev/null 2>&1; then
+ ./signal | $sort -n +1 | $uniq | $awk -f signal.awk >signal.lst
+else
+ echo "(I can't seem be able to compile the test program -- Guessing)"
+ 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 ' ' '\012' | \
+ $awk '{ printf $1; printf " %d\n", ++s; }' >signal.lst
+fi
+$rm -f signal.c signal signal$_o
+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..883d13c
--- /dev/null
+++ b/mcon/U/Tr.U
@@ -0,0 +1,60 @@
+?RCS: $Id: Tr.U,v 3.0.1.2 1994/10/29 18:00:54 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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
+: see whether [:lower:] and [:upper:] are supported character classes
+echo " "
+up='[A-Z]'
+low='[a-z]'
+case "`echo AbyZ | $tr '[:lower:]' '[:upper:]' 2>/dev/null`" in
+ABYZ)
+ echo "Good, your tr supports [:lower:] and [:upper:] to convert case." >&4
+ up='[:upper:]'
+ low='[:lower:]'
+ ;;
+*)
+ echo "Your tr only supports [a-z] and [A-Z] to convert case." >&4
+ ;;
+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]') exec $tr '$up' '$low';;
+'[a-z][A-Z]') exec $tr '$low' '$up';;
+esac
+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..2018d4a
--- /dev/null
+++ b/mcon/U/Typedef.U
@@ -0,0 +1,62 @@
+?RCS: $Id: Typedef.U,v 3.0.1.3 1995/07/25 13:42:07 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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 $@ %<
+?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..4c40623
--- /dev/null
+++ b/mcon/U/Unix.U
@@ -0,0 +1,70 @@
+?RCS: $Id: Unix.U,v 3.0.1.1 1997/02/28 15:20:06 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1996, Andy Dougherty
+?RCS: Copyright (c) 1991-1993, 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 3.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 _exe _a _o firstmakefile archobjs: Oldconfig
+?MAKE: -pick add $@ %<
+?S:_exe:
+?S: This variable defines the extension used for executable files.
+?S: For unix it is empty. Other possible values include '.exe'.
+?S:.
+?S:_a:
+?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:
+?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:: No trailing extension on UNIX executables
+?INIT:_exe=''
+?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_v7EXT.U b/mcon/U/Warn_v7EXT.U
new file mode 100644
index 0000000..2d5be5a
--- /dev/null
+++ b/mcon/U/Warn_v7EXT.U
@@ -0,0 +1,34 @@
+?RCS: $Id: Warn_v7EXT.U,v 3.0.1.1 1994/10/29 16:01:42 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..2760c18
--- /dev/null
+++ b/mcon/U/Warn_v7ND.U
@@ -0,0 +1,33 @@
+?RCS: $Id: Warn_v7ND.U,v 3.0.1.1 1994/10/29 16:01:46 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..cb993d0
--- /dev/null
+++ b/mcon/U/Whoa.U
@@ -0,0 +1,50 @@
+?RCS: $Id: Whoa.U,v 3.0.1.2 1997/02/28 15:21:21 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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 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..f7b1efb
--- /dev/null
+++ b/mcon/U/abortsig.U
@@ -0,0 +1,79 @@
+?RCS: $Id: abortsig.U,v 3.0.1.1 1994/10/29 16:02:19 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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); }
+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..bd977c4
--- /dev/null
+++ b/mcon/U/active.U
@@ -0,0 +1,50 @@
+?RCS: $Id: active.U,v 3.0 1993/08/18 12:05:21 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..bcd787b
--- /dev/null
+++ b/mcon/U/afs.U
@@ -0,0 +1,43 @@
+?RCS: $Id: afs.U,v 3.0.1.2 1997/02/28 15:23:06 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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: Nothing
+?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:.
+: is AFS running?
+echo " "
+case "$afs" in
+$define|true) afs=true ;;
+$undef|false) afs=false ;;
+*) if test -d /afs; 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..94f1826
--- /dev/null
+++ b/mcon/U/alignbytes.U
@@ -0,0 +1,64 @@
+?RCS: $Id: alignbytes.U,v 3.0.1.2 1994/10/29 16:02:28 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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;
+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..343e032
--- /dev/null
+++ b/mcon/U/archlib.U
@@ -0,0 +1,125 @@
+?RCS: $Id: archlib.U,v 3.0.1.5 1997/02/28 15:23:38 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..1ff5a9a
--- /dev/null
+++ b/mcon/U/archname.U
@@ -0,0 +1,76 @@
+?RCS: $Id: archname.U,v 3.0.1.3 1997/02/28 15:24:32 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..6dd04b0
--- /dev/null
+++ b/mcon/U/baserev.U
@@ -0,0 +1,22 @@
+?RCS: $Id: baserev.U,v 3.0 1993/08/18 12:05:24 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..36f03b9
--- /dev/null
+++ b/mcon/U/basicshell.U
@@ -0,0 +1,47 @@
+?RCS: $Id: basicshell.U,v 3.0 1993/08/18 12:05:25 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..26ec89d
--- /dev/null
+++ b/mcon/U/bin.U
@@ -0,0 +1,88 @@
+?RCS: $Id: bin.U,v 3.0.1.4 1995/09/25 09:15:32 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..978757f
--- /dev/null
+++ b/mcon/U/bitpbyte.U
@@ -0,0 +1,74 @@
+?RCS: $Id: bitpbyte.U,v 3.0.1.1 1994/10/29 16:02:54 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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
+main()
+{
+ printf("%d\n", BITSPERBYTE);
+}
+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. 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..1ef79f8
--- /dev/null
+++ b/mcon/U/byteorder.U
@@ -0,0 +1,99 @@
+?RCS: $Id: byteorder.U,v 3.0.1.2 1997/02/28 15:24:55 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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>
+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 try.c -o try >/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..0c63735
--- /dev/null
+++ b/mcon/U/cc.U
@@ -0,0 +1,129 @@
+?RCS: $Id: cc.U,v 3.0.1.4 1995/05/12 12:06:47 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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 gccversion: cat contains sysman +large cpp rm \
+ Mcc Myread Guess Options Oldconfig Loc
+?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", "Mcc", "cc -M", and "gcc".
+?S:.
+?S:gccversion:
+?S: If GNU cc (gcc) is used, this variable holds '1' or '2' to
+?S: indicate whether the compiler is version 1 or 2. This is used in
+?S: setting some of the default cflags. It is set to '' if not gcc.
+?S:.
+?F:!gccvers
+?D:cc='cc'
+?D:gccversion=''
+?LINT:change cpp
+: see if we need a special compiler
+echo " "
+if ./usg; then
+ case "$cc" in
+ '') case "$Mcc" in
+ /*) dflt='Mcc';;
+ *) case "$large" in
+ -M*) dflt='cc';;
+ *) if $contains '\-M' $sysman/cc.1 >/dev/null 2>&1 ; then
+ if $contains '\-M' $sysman/cpp.1 >/dev/null 2>&1; then
+ dflt='cc'
+ else
+ dflt='cc -M'
+ fi
+ else
+ dflt='cc'
+ fi;;
+ esac;;
+ esac;;
+ *) dflt="$cc";;
+ esac
+ $cat <<'EOM'
+On some systems the default C compiler will not resolve multiple global
+references that happen to have the same name. On some such systems the "Mcc"
+command may be used to force these to be resolved. On other systems a "cc -M"
+command is required. (Note that the -M flag on other systems indicates a
+memory model to use!) If you have the Gnu C compiler, you might wish to use
+that instead.
+
+EOM
+ rp="What command will force resolution on this system?"
+ . ./myread
+ cc="$ans"
+else
+ case "$cc" in
+ '') dflt=cc;;
+ *) dflt="$cc";;
+ esac
+ rp="Use which C compiler?"
+ . ./myread
+ cc="$ans"
+fi
+?X: Check if they have gcc in any guise. This is really only needed
+?X: if the user has version 1.x.x and needs -fpcc-struct-return. Alas
+?X: BSD/386 ships a version of gcc 1.4.2 and calls it cc. Hence the
+?X: paranoid test -- ADO.
+echo " "
+echo "Checking for GNU cc in disguise and/or its version number..." >&4
+$cat >gccvers.c <<EOM
+#include <stdio.h>
+int main() {
+#ifdef __GNUC__
+#ifdef __VERSION__
+ printf("%s\n", __VERSION__);
+#else
+ printf("%s\n", "1");
+#endif
+#endif
+ exit(0);
+}
+EOM
+if $cc -o gccvers gccvers.c >/dev/null 2>&1; then
+ gccversion=`./gccvers`
+ case "$gccversion" in
+ '') echo "You are not using GNU cc." ;;
+ *) echo "You are using GNU cc $gccversion." ;;
+ esac
+else
+ echo " "
+ echo "*** WHOA THERE!!! ***" >&4
+ echo " Your C compiler \"$cc\" doesn't seem to be working!" >&4
+?X: using -K will prevent aborting--maybe they're cross compiling?
+ case "$knowitall" in
+ '')
+ echo " You'd better start hunting for one and let me know about it." >&4
+ exit 1
+ ;;
+ esac
+fi
+$rm -f gccvers*
+case "$gccversion" in
+1*) cpp=`./loc gcc-cpp $cpp $pth` ;;
+esac
+
diff --git a/mcon/U/ccflags.U b/mcon/U/ccflags.U
new file mode 100644
index 0000000..dc8beb7
--- /dev/null
+++ b/mcon/U/ccflags.U
@@ -0,0 +1,399 @@
+?RCS: $Id: ccflags.U,v 3.0.1.9 1997/02/28 15:27:07 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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
+?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
+' ') 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
+none|recommended)
+ case "$gccversion" in
+ 1*) dflt='-fpcc-struct-return' ;;
+ esac
+ case "$optimize" in
+ *-g*) dflt="$dflt -DDEBUGGING";;
+ 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
+ ;;
+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
+none|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. If you
+want $package to honor its debug switch, you should include -DDEBUG here.
+
+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' ;;
+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 try.c -o try
+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>
+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 try.c -o try $ldflags" >>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
+?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..979cfd4
--- /dev/null
+++ b/mcon/U/cf_email.U
@@ -0,0 +1,57 @@
+?RCS: $Id: cf_email.U,v 3.0.1.1 1994/01/24 14:05:06 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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
+$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 the 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..6e7ee67
--- /dev/null
+++ b/mcon/U/cf_name.U
@@ -0,0 +1,72 @@
+?RCS: $Id: cf_name.U,v 3.0.1.2 1994/05/06 14:29:36 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..7c7deac
--- /dev/null
+++ b/mcon/U/cf_who.U
@@ -0,0 +1,60 @@
+?RCS: $Id: cf_who.U,v 3.0.1.2 1997/02/28 15:28:50 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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:.
+: who configured the system
+cf_time=`$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..2731c61
--- /dev/null
+++ b/mcon/U/charorder.U
@@ -0,0 +1,143 @@
+?RCS: $Id: charorder.U,v 3.0.1.1 1994/10/29 16:07:08 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..baf3aac
--- /dev/null
+++ b/mcon/U/charsize.U
@@ -0,0 +1,58 @@
+?RCS: $Id: charsize.U,v 3.0.1.1 1994/10/29 16:07:13 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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>
+main()
+{
+ printf("%d\n", sizeof(char));
+}
+EOCP
+ if $cc $ccflags try.c -o try >/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..7d9883a
--- /dev/null
+++ b/mcon/U/contains.U
@@ -0,0 +1,43 @@
+?RCS: $Id: contains.U,v 3.0 1993/08/18 12:05:35 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..67b16c6
--- /dev/null
+++ b/mcon/U/cpp_stuff.U
@@ -0,0 +1,118 @@
+?RCS: $Id: cpp_stuff.U,v 3.0.1.2 1997/02/28 15:30:48 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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: cat contains cppstdin cppflags cppminus rm
+?MAKE: -pick add $@ %<
+?S:cpp_stuff:
+?S: This variable contains an identification of the catenation mechanism
+?S: used by the C preprocessor.
+?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)"a
+?H:?%<:#define EQuoTe(a)a"
+?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
+?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:?%<:#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
+?LINT:known StGiFy EQuoTe SQuoTe
+: how do we catenate cpp tokens here?
+echo " "
+echo "Checking to see how your cpp does stuff like catenate tokens..." >&4
+$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
+ $cat <<EOM
+Ah, yes! The good old days!
+However, in the good old days we don't know how to stringify and
+catify at the same time...
+Unless we have a cute trick... which I have!
+EOM
+ cpp_stuff=1
+else
+ $cat >&4 <<EOM
+Hmm, I don't seem to be able to catenate tokens with your cpp. You're going
+to have to edit the values of CAT[2-5] and SCAT[2-5] in config.h...
+EOM
+?X: It would be nice to have configure remind us at the end that some manual
+?X: intervention is needed -- FIXME
+ cpp_stuff="/* Help! How do we handle cpp_stuff? */*/"
+fi
+$rm -f cpp_stuff.*
+
diff --git a/mcon/U/cppfilecom.U b/mcon/U/cppfilecom.U
new file mode 100644
index 0000000..3caa41c
--- /dev/null
+++ b/mcon/U/cppfilecom.U
@@ -0,0 +1,202 @@
+?RCS: $Id: cppfilecom.U,v 3.0 1993/08/18 12:05:37 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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
+?LINT:set d_cppcanstdin d_cppignhdrs
+: 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..7153ac3
--- /dev/null
+++ b/mcon/U/cppstdin.U
@@ -0,0 +1,235 @@
+?RCS: $Id: cppstdin.U,v 3.0.1.4 1994/10/29 16:08:34 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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
+?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 a minus
+?S: 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
+?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 ..
+echo 'cat >.$$.c; '"$cc"' -E ${1+"$@"} .$$.c; rm .$$.c' >cppstdin
+chmod 755 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") ;;
+*) $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..45ebabd
--- /dev/null
+++ b/mcon/U/d_NOFILE.U
@@ -0,0 +1,189 @@
+?RCS: $Id: d_NOFILE.U,v 3.0.1.1 1994/10/29 16:08:38 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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 libc 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>
+main()
+{
+ printf("%d\n", getdtablesize());
+}
+EOCP
+ nofile=''
+ if $cc $ccflags nofile.c -o nofile $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
+main()
+{
+ printf("%d %d\n",
+#ifdef NOFILE
+ NOFILE,
+#else
+ 0,
+#endif
+ ulimit(4,0));
+ exit(0);
+}
+EOCP
+ if $cc $ccflags -DGETPARAM_H nofile.c -o nofile $libs >/dev/null 2>&1 \
+ || $cc $ccflags nofile.c -o nofile $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
+main()
+{
+ printf("%d\n",
+#ifdef NOFILE
+ NOFILE,
+#else
+ 0,
+#endif
+ );
+ exit(0);
+}
+EOCP
+ if $cc $ccflags -DGETPARAM_H nofile.c -o nofile $libs >/dev/null 2>&1 \
+ || $cc $ccflags nofile.c -o nofile $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..687e01e
--- /dev/null
+++ b/mcon/U/d_NeWS.U
@@ -0,0 +1,101 @@
+?RCS: $Id: d_NeWS.U,v 3.0 1993/08/18 12:05:39 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..4be99b2
--- /dev/null
+++ b/mcon/U/d_PORTAR.U
@@ -0,0 +1,79 @@
+?RCS: $Id: d_PORTAR.U,v 3.0.1.1 1994/10/29 16:08:42 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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>
+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 portar.c -o portar >/dev/null 2>&1 || \
+ $cc -DPORTAR=1 portar.c -o portar >/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..78ea122
--- /dev/null
+++ b/mcon/U/d_SHM_MAC.U
@@ -0,0 +1,141 @@
+?RCS: $Id: d_SHM_MAC.U,v 3.0 1993/08/18 12:05:41 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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
+
+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 shm_mac.c $ccflags \
+ $D_sys_immu $D_sys_param $D_sys_sysmacros $D_sys_seg \
+ -o shm_mac >/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..ddef65f
--- /dev/null
+++ b/mcon/U/d_access.U
@@ -0,0 +1,74 @@
+?RCS: $Id: d_access.U,v 3.0 1993/08/18 12:05:42 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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
+main() {
+ exit(R_OK);
+}
+EOCP
+ : check sys/file.h first, no particular reason here
+ if $test `./findhdr sys/file.h` && \
+ $cc $cppflags -DI_SYS_FILE access.c -o access >/dev/null 2>&1 ; then
+ h_sysfile=true;
+ echo "<sys/file.h> defines the *_OK access constants." >&4
+ elif $test `./findhdr fcntl.h` && \
+ $cc $cppflags -DI_FCNTL access.c -o access >/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 $cppflags -DI_UNISTD access.c -o access >/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..db57207
--- /dev/null
+++ b/mcon/U/d_alarm.U
@@ -0,0 +1,33 @@
+?RCS: $Id: d_alarm.U,v 3.0.1.1 1994/08/29 16:06:58 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..bcd3ae1
--- /dev/null
+++ b/mcon/U/d_attribut.U
@@ -0,0 +1,64 @@
+?RCS: $Id: d_attribut.U,v 3.0.1.3 1995/01/30 14:33:45 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..5090523
--- /dev/null
+++ b/mcon/U/d_bcmp.U
@@ -0,0 +1,44 @@
+?RCS: $Id: d_bcmp.U,v 3.0.1.2 1993/10/16 13:47:52 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..c373d29
--- /dev/null
+++ b/mcon/U/d_bcopy.U
@@ -0,0 +1,44 @@
+?RCS: $Id: d_bcopy.U,v 3.0.1.2 1993/10/16 13:48:04 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..29886f3
--- /dev/null
+++ b/mcon/U/d_brokstat.U
@@ -0,0 +1,72 @@
+?RCS: $Id: d_brokstat.U,v 3.0.1.1 1997/02/28 15:30:53 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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:.
+?LINT:set d_brokstat
+?X: This test inspired by autoconf -- RAM, 28/02/97
+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..61ed61c
--- /dev/null
+++ b/mcon/U/d_bsdjmp.U
@@ -0,0 +1,86 @@
+?RCS: $Id: d_bsdjmp.U,v 3.0.1.2 1997/02/28 15:31:10 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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;
+main()
+{
+ if (_setjmp(env))
+ exit(set);
+ set = 0;
+ _longjmp(env, 1);
+ exit(1);
+}
+EOP
+ if $cc set.c -o set $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..75bfbf0
--- /dev/null
+++ b/mcon/U/d_byacc.U
@@ -0,0 +1,33 @@
+?RCS: $Id: d_byacc.U,v 3.0.1.1 1997/02/28 15:31:14 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1996, Andy Dougherty
+?RCS: Copyright (c) 1991-1993, 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 3.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..a891c26
--- /dev/null
+++ b/mcon/U/d_bzero.U
@@ -0,0 +1,44 @@
+?RCS: $Id: d_bzero.U,v 3.0.1.2 1993/10/16 13:48:15 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..7a0a189
--- /dev/null
+++ b/mcon/U/d_casti32.U
@@ -0,0 +1,86 @@
+?RCS: $Id: d_casti32.U,v 3.0.1.3 1995/05/12 12:10:45 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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:.
+?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); }
+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 -o try $ccflags 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..815003f
--- /dev/null
+++ b/mcon/U/d_castneg.U
@@ -0,0 +1,142 @@
+?RCS: $Id: d_castneg.U,v 3.0.1.2 1995/05/12 12:11:21 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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:.
+?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; }
+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 -o try $ccflags 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..a245789
--- /dev/null
+++ b/mcon/U/d_cbrt.U
@@ -0,0 +1,32 @@
+?RCS: $Id: d_cbrt.U,v 3.0 1993/08/18 12:05:48 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..473ba97
--- /dev/null
+++ b/mcon/U/d_charsprf.U
@@ -0,0 +1,51 @@
+?RCS: $Id: d_charsprf.U,v 3.0 1993/08/18 12:05:49 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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:.
+?LINT:set d_charsprf
+: see if sprintf is declared as int or pointer to char
+echo " "
+$cat >ucbsprf.c <<'EOF'
+main()
+{
+ int sprintf();
+ char buf[10];
+ exit((unsigned long)sprintf(buf,"%s","foo") > 10L);
+}
+EOF
+if $cc ucbsprf.c -o ucbsprf >/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..f7e619f
--- /dev/null
+++ b/mcon/U/d_chown.U
@@ -0,0 +1,33 @@
+?RCS: $Id: d_chown.U,v 3.0.1.1 1994/08/29 16:07:14 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..3a31a23
--- /dev/null
+++ b/mcon/U/d_chroot.U
@@ -0,0 +1,33 @@
+?RCS: $Id: d_chroot.U,v 3.0.1.1 1994/08/29 16:07:17 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..a815c4c
--- /dev/null
+++ b/mcon/U/d_chsize.U
@@ -0,0 +1,32 @@
+?RCS: $Id: d_chsize.U,v 3.0 1993/08/18 12:05:50 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..c1f8307
--- /dev/null
+++ b/mcon/U/d_ckeypad.U
@@ -0,0 +1,54 @@
+?RCS: $Id: d_ckeypad.U,v 3.0 1993/08/18 12:05:50 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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>
+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..94f02ad
--- /dev/null
+++ b/mcon/U/d_closedir.U
@@ -0,0 +1,107 @@
+?RCS: $Id: d_closedir.U,v 3.0.1.3 1997/02/28 15:31:26 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..cde8bd1
--- /dev/null
+++ b/mcon/U/d_const.U
@@ -0,0 +1,64 @@
+?RCS: $Id: d_const.U,v 3.0.1.1 1993/11/10 17:33:41 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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 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
+?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;
+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
+
diff --git a/mcon/U/d_crypt.U b/mcon/U/d_crypt.U
new file mode 100644
index 0000000..ff5d791
--- /dev/null
+++ b/mcon/U/d_crypt.U
@@ -0,0 +1,70 @@
+?RCS: $Id: d_crypt.U,v 3.0.1.1 1997/02/28 15:31:47 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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
+?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 " "
+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
+
diff --git a/mcon/U/d_csh.U b/mcon/U/d_csh.U
new file mode 100644
index 0000000..47d64b7
--- /dev/null
+++ b/mcon/U/d_csh.U
@@ -0,0 +1,50 @@
+?RCS: $Id: d_csh.U,v 3.0.1.1 1997/02/28 15:32:18 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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:.
+?X: Yes, I know about the C symbol PORTABLE, but I think csh
+?X: is unlikely to move, and I'm too lazy to add all the
+?X: #ifdef PORTABLE sections to the perl source.
+?X:
+?C:CSH:
+?C: This symbol, if defined, indicates that the C-shell exists.
+?C: If defined, contains the full pathname of csh.
+?C:.
+?H:#$d_csh CSH "$full_csh" /**/
+?H:.
+?LINT:set d_csh
+: get csh whereabouts
+case "$csh" in
+'csh') val="$undef" ;;
+*) val="$define" ;;
+esac
+set d_csh
+eval $setvar
+full_csh=$csh
+
diff --git a/mcon/U/d_ctermid.U b/mcon/U/d_ctermid.U
new file mode 100644
index 0000000..8d363e7
--- /dev/null
+++ b/mcon/U/d_ctermid.U
@@ -0,0 +1,31 @@
+?RCS: $Id: d_ctermid.U,v 3.0 1993/08/18 12:05:54 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..7b38dbb
--- /dev/null
+++ b/mcon/U/d_cuserid.U
@@ -0,0 +1,34 @@
+?RCS: $Id: d_cuserid.U,v 3.0.1.1 1994/08/29 16:07:25 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..12f824e
--- /dev/null
+++ b/mcon/U/d_dbl_dig.U
@@ -0,0 +1,60 @@
+?RCS: $Id: d_dbl_dig.U,v 3.0.1.1 1994/08/29 16:07:28 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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:.
+?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_difftime.U b/mcon/U/d_difftime.U
new file mode 100644
index 0000000..f83c78d
--- /dev/null
+++ b/mcon/U/d_difftime.U
@@ -0,0 +1,33 @@
+?RCS: $Id: d_difftime.U,v 3.0.1.1 1994/08/29 16:07:31 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..d019764
--- /dev/null
+++ b/mcon/U/d_dlerror.U
@@ -0,0 +1,46 @@
+?RCS: $Id: d_dlerror.U,v 3.0.1.2 1995/07/25 13:52:49 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..9491ba7
--- /dev/null
+++ b/mcon/U/d_dlopen.U
@@ -0,0 +1,45 @@
+?RCS: $Id: d_dlopen.U,v 3.0.1.2 1995/07/25 13:52:56 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..7b15577
--- /dev/null
+++ b/mcon/U/d_dosuid.U
@@ -0,0 +1,168 @@
+?RCS: $Id: d_dosuid.U,v 3.0.1.2 1997/02/28 15:33:03 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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
+?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..4e86499
--- /dev/null
+++ b/mcon/U/d_drem.U
@@ -0,0 +1,35 @@
+?RCS: $Id: d_drem.U,v 3.0.1.1 1994/10/29 16:12:14 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..b63babb
--- /dev/null
+++ b/mcon/U/d_dup2.U
@@ -0,0 +1,31 @@
+?RCS: $Id: d_dup2.U,v 3.0 1993/08/18 12:05:56 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..7f77c08
--- /dev/null
+++ b/mcon/U/d_eofpipe.U
@@ -0,0 +1,92 @@
+?RCS: $Id: d_eofpipe.U,v 3.0.1.1 1994/10/29 16:12:40 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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:.
+: 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'
+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 pipe.c -o pipe $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..4e02da7
--- /dev/null
+++ b/mcon/U/d_euc2jis.U
@@ -0,0 +1,32 @@
+?RCS: $Id: d_euc2jis.U,v 3.0 1993/08/18 12:05:58 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..4880384
--- /dev/null
+++ b/mcon/U/d_fchmod.U
@@ -0,0 +1,32 @@
+?RCS: $Id: d_fchmod.U,v 3.0 1993/08/18 12:05:59 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..296bfd7
--- /dev/null
+++ b/mcon/U/d_fchown.U
@@ -0,0 +1,32 @@
+?RCS: $Id: d_fchown.U,v 3.0 1993/08/18 12:06:01 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..8e9b005
--- /dev/null
+++ b/mcon/U/d_fcntl.U
@@ -0,0 +1,31 @@
+?RCS: $Id: d_fcntl.U,v 3.0 1993/08/18 12:06:01 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..1b08f5d
--- /dev/null
+++ b/mcon/U/d_fd_set.U
@@ -0,0 +1,138 @@
+?RCS: $Id: d_fd_set.U,v 3.0.1.3 1997/02/28 15:33:16 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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
+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 fd_set.c -o fd_set >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 fd_set.c -o fd_set >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..fc381eb
--- /dev/null
+++ b/mcon/U/d_ffs.U
@@ -0,0 +1,33 @@
+?RCS: $Id: d_ffs.U,v 3.0 1993/08/18 12:06:03 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..3c8ebc9
--- /dev/null
+++ b/mcon/U/d_fgetpos.U
@@ -0,0 +1,31 @@
+?RCS: $Id: d_fgetpos.U,v 3.0.1.1 1994/06/20 06:57:33 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..4e1ddbf
--- /dev/null
+++ b/mcon/U/d_flexfnam.U
@@ -0,0 +1,77 @@
+?RCS: $Id: d_flexfnam.U,v 3.0 1993/08/18 12:06:04 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..fd17308
--- /dev/null
+++ b/mcon/U/d_flock.U
@@ -0,0 +1,31 @@
+?RCS: $Id: d_flock.U,v 3.0 1993/08/18 12:06:05 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..d3d053c
--- /dev/null
+++ b/mcon/U/d_fmod.U
@@ -0,0 +1,34 @@
+?RCS: $Id: d_fmod.U,v 3.0.1.1 1994/10/29 16:12:46 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..41c35b9
--- /dev/null
+++ b/mcon/U/d_fork.U
@@ -0,0 +1,33 @@
+?RCS: $Id: d_fork.U,v 3.0.1.1 1994/08/29 16:07:38 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..6c31190
--- /dev/null
+++ b/mcon/U/d_fsetpos.U
@@ -0,0 +1,31 @@
+?RCS: $Id: d_fsetpos.U,v 3.0.1.1 1994/06/20 06:57:38 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..6888499
--- /dev/null
+++ b/mcon/U/d_ftime.U
@@ -0,0 +1,78 @@
+?RCS: $Id: d_ftime.U,v 3.0 1993/08/18 12:06:06 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..b81f281
--- /dev/null
+++ b/mcon/U/d_ftrncate.U
@@ -0,0 +1,31 @@
+?RCS: $Id: d_ftrncate.U,v 3.0 1993/08/18 12:06:07 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..b664cbc
--- /dev/null
+++ b/mcon/U/d_gconvert.U
@@ -0,0 +1,147 @@
+?RCS: $Id: d_gconvert.U,v 3.0.1.3 1997/02/28 15:33:38 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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
+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..c05d531
--- /dev/null
+++ b/mcon/U/d_getgrps.U
@@ -0,0 +1,33 @@
+?RCS: $Id: d_getgrps.U,v 3.0 1993/08/18 12:06:08 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..f5ed463
--- /dev/null
+++ b/mcon/U/d_gethbynm.U
@@ -0,0 +1,32 @@
+?RCS: $Id: d_gethbynm.U,v 3.0 1993/08/18 12:06:08 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..4a39465
--- /dev/null
+++ b/mcon/U/d_gethent.U
@@ -0,0 +1,31 @@
+?RCS: $Id: d_gethent.U,v 3.0 1993/08/18 12:06:09 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..c5131b6
--- /dev/null
+++ b/mcon/U/d_gethid.U
@@ -0,0 +1,31 @@
+?RCS: $Id: d_gethid.U,v 3.0 1993/08/18 12:06:10 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..67b59f0
--- /dev/null
+++ b/mcon/U/d_gethname.U
@@ -0,0 +1,287 @@
+?RCS: $Id: d_gethname.U,v 3.0.1.1 1994/10/29 16:13:00 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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 libc 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..f93b762
--- /dev/null
+++ b/mcon/U/d_getlogin.U
@@ -0,0 +1,34 @@
+?RCS: $Id: d_getlogin.U,v 3.0.1.1 1994/08/29 16:07:41 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..de625dc
--- /dev/null
+++ b/mcon/U/d_getopt.U
@@ -0,0 +1,31 @@
+?RCS: $Id: d_getopt.U,v 3.0 1993/08/18 12:06:13 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..428e64e
--- /dev/null
+++ b/mcon/U/d_getpagsz.U
@@ -0,0 +1,104 @@
+?RCS: $Id: d_getpagsz.U,v 3.0.1.1 1994/10/29 16:13:10 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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();
+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 page.c -o page $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 page.c -o page $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>
+main()
+{
+ printf("%d\n", PAGESIZE);
+}
+EOP
+ if $cc $ccflags page.c -o page $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..5462570
--- /dev/null
+++ b/mcon/U/d_getpgid.U
@@ -0,0 +1,34 @@
+?RCS: $Id: d_getpgid.U,v 3.0.1.1 1997/02/28 15:33:44 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1996, Andy Dougherty
+?RCS: Copyright (c) 1991-1993, 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 3.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..c4d6d01
--- /dev/null
+++ b/mcon/U/d_getpgrp.U
@@ -0,0 +1,105 @@
+?RCS: $Id: d_getpgrp.U,v 3.0.1.1 1997/02/28 15:34:28 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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:.
+?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
+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..f10152a
--- /dev/null
+++ b/mcon/U/d_getpgrp2.U
@@ -0,0 +1,32 @@
+?RCS: $Id: d_getpgrp2.U,v 3.0 1993/08/18 12:06:15 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..ca73aa5
--- /dev/null
+++ b/mcon/U/d_getppid.U
@@ -0,0 +1,34 @@
+?RCS: $Id: d_getppid.U,v 3.0.1.1 1994/08/29 16:07:45 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..a8708ad
--- /dev/null
+++ b/mcon/U/d_getprior.U
@@ -0,0 +1,31 @@
+?RCS: $Id: d_getprior.U,v 3.0 1993/08/18 12:06:16 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..6cdf6bc
--- /dev/null
+++ b/mcon/U/d_getpwent.U
@@ -0,0 +1,40 @@
+?RCS: $Id: d_getpwent.U,v 3.0 1993/08/18 12:06:17 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..ab56449
--- /dev/null
+++ b/mcon/U/d_getwd.U
@@ -0,0 +1,41 @@
+?RCS: $Id: d_getwd.U,v 3.0 1993/08/18 12:06:18 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..7cf63ca
--- /dev/null
+++ b/mcon/U/d_gnulibc.U
@@ -0,0 +1,53 @@
+?RCS: $Id: d_gnulibc.U,v 3.0.1.1 1997/02/28 15:34:33 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1996, Andy Dougherty
+?RCS: Copyright (c) 1996, Sven Verdoolaege
+?RCS: Copyright (c) 1991-1993, 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 3.0.
+?RCS:
+?RCS: $Log: d_gnulibc.U,v $
+?RCS: Revision 3.0.1.1 1997/02/28 15:34:33 ram
+?RCS: patch61: created
+?RCS:
+?MAKE:d_gnulibc: Myread Oldconfig Setvar contains rm \
+ +cc +ccflags +ldflags +libs
+?MAKE: -pick add $@ %<
+?S:d_gnulibc:
+?S: Defined if we're dealing with the GNU C Library.
+?S:.
+?C:HAS_GNULIBC:
+?C: This symbol, if defined, indicates to the C program that
+?C: the GNU C library is being used.
+?C:.
+?H:#$d_gnulibc HAS_GNULIBC /**/
+?H.
+?LINT: set d_gnulibc
+?X: gnulibc can be executed by calling this entry point.
+?X: Ulrich Drepper doesn't think any other libc does that,
+?X: but we check if it says 'GNU C Library' to be sure.
+echo " "
+echo "Checking for GNU C Library..." >&4
+cat >gnulibc.c <<EOM
+int
+main()
+{
+ return __libc_main();
+}
+EOM
+if $cc $ccflags $ldflags -o gnulibc gnulibc.c $libs >/dev/null 2>&1 && \
+ ./gnulibc | $contains '^GNU C Library' >/dev/null 2>&1; then
+ val="$define"
+ echo "You are using the GNU C Library"
+else
+ val="$undef"
+ echo "You are not using the GNU C Library"
+fi
+$rm -f gnulibc*
+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..ebcb4fb
--- /dev/null
+++ b/mcon/U/d_group.U
@@ -0,0 +1,23 @@
+?RCS: $Id: d_group.U,v 3.0.1.2 1997/02/28 15:34:52 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..4abfb71
--- /dev/null
+++ b/mcon/U/d_havetlib.U
@@ -0,0 +1,125 @@
+?RCS: $Id: d_havetlib.U,v 3.0.1.2 1997/02/28 15:36:31 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..0388b6b
--- /dev/null
+++ b/mcon/U/d_hidnet.U
@@ -0,0 +1,68 @@
+?RCS: $Id: d_hidnet.U,v 3.0 1993/08/18 12:06:20 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..6db8771
--- /dev/null
+++ b/mcon/U/d_htonl.U
@@ -0,0 +1,87 @@
+?RCS: $Id: d_htonl.U,v 3.0.1.2 1994/08/29 16:09:25 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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:.
+?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..ef14bde
--- /dev/null
+++ b/mcon/U/d_inetaton.U
@@ -0,0 +1,34 @@
+?RCS: $Id: d_inetaton.U,v 3.0.1.1 1997/02/28 15:36:35 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1996, Spider Boardman
+?RCS: Copyright (c) 1991-1993, 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 3.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..169fbbe
--- /dev/null
+++ b/mcon/U/d_inetd.U
@@ -0,0 +1,70 @@
+?RCS: $Id: d_inetd.U,v 3.0 1993/08/18 12:06:23 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..8554eb0
--- /dev/null
+++ b/mcon/U/d_internet.U
@@ -0,0 +1,52 @@
+?RCS: $Id: d_internet.U,v 3.0.1.1 1993/09/13 16:02:04 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..925aeab
--- /dev/null
+++ b/mcon/U/d_isascii.U
@@ -0,0 +1,57 @@
+?RCS: $Id: d_isascii.U,v 3.0.1.2 1994/10/29 16:13:39 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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>
+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..0ef5164
--- /dev/null
+++ b/mcon/U/d_itimer.U
@@ -0,0 +1,32 @@
+?RCS: $Id: d_itimer.U,v 3.0 1993/08/18 12:06:25 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..403150f
--- /dev/null
+++ b/mcon/U/d_keepsig.U
@@ -0,0 +1,79 @@
+?RCS: $Id: d_keepsig.U,v 3.0.1.4 1995/07/25 13:57:56 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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 +cc +ccflags rm Guess contains echo n c Setvar
+?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:.
+?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() {}
+
+main()
+{
+ signal(2, foo);
+ kill(getpid(), 2);
+ kill(getpid(), 2);
+ printf("abc\n");
+}
+EOCP
+if $cc -o try $ccflags try.c >/dev/null 2>&1; 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>)
+ `sh -c ./try >try.out 2>/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..e4b1105
--- /dev/null
+++ b/mcon/U/d_killpg.U
@@ -0,0 +1,33 @@
+?RCS: $Id: d_killpg.U,v 3.0 1993/08/18 12:06:27 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..c37ec99
--- /dev/null
+++ b/mcon/U/d_link.U
@@ -0,0 +1,31 @@
+?RCS: $Id: d_link.U,v 3.0.1.1 1993/08/25 14:01:13 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..29ce10a
--- /dev/null
+++ b/mcon/U/d_linuxstd.U
@@ -0,0 +1,55 @@
+?RCS: $Id: d_linuxstd.U,v 3.0.1.1 1994/10/29 16:14:05 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..3ac86be
--- /dev/null
+++ b/mcon/U/d_locconv.U
@@ -0,0 +1,33 @@
+?RCS: $Id: d_locconv.U,v 3.0.1.1 1994/10/29 16:14:11 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..45bbc57
--- /dev/null
+++ b/mcon/U/d_lockf.U
@@ -0,0 +1,33 @@
+?RCS: $Id: d_lockf.U,v 3.0.1.1 1994/08/29 16:09:36 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..dd6f7e7
--- /dev/null
+++ b/mcon/U/d_lstat.U
@@ -0,0 +1,31 @@
+?RCS: $Id: d_lstat.U,v 3.0 1993/08/18 12:06:28 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..d7d273f
--- /dev/null
+++ b/mcon/U/d_mblen.U
@@ -0,0 +1,34 @@
+?RCS: $Id: d_mblen.U,v 3.0.1.1 1994/08/29 16:09:40 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..06617a5
--- /dev/null
+++ b/mcon/U/d_mbstowcs.U
@@ -0,0 +1,32 @@
+?RCS: $Id: d_mbstowcs.U,v 3.0 1993/08/18 12:06:29 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..0010b03
--- /dev/null
+++ b/mcon/U/d_mbtowc.U
@@ -0,0 +1,32 @@
+?RCS: $Id: d_mbtowc.U,v 3.0 1993/08/18 12:06:30 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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_memccpy.U b/mcon/U/d_memccpy.U
new file mode 100644
index 0000000..251a406
--- /dev/null
+++ b/mcon/U/d_memccpy.U
@@ -0,0 +1,33 @@
+?RCS: $Id: d_memccpy.U,v 3.0 1993/08/18 12:06:31 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..fcb44a7
--- /dev/null
+++ b/mcon/U/d_memchr.U
@@ -0,0 +1,32 @@
+?RCS: $Id: d_memchr.U,v 3.0 1993/08/18 12:06:32 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..8e5a0a8
--- /dev/null
+++ b/mcon/U/d_memcmp.U
@@ -0,0 +1,35 @@
+?RCS: $Id: d_memcmp.U,v 3.0.1.1 1993/09/13 16:02:35 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..3b6899c
--- /dev/null
+++ b/mcon/U/d_memcpy.U
@@ -0,0 +1,35 @@
+?RCS: $Id: d_memcpy.U,v 3.0.1.1 1993/09/13 16:02:58 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..79be88c
--- /dev/null
+++ b/mcon/U/d_memmove.U
@@ -0,0 +1,34 @@
+?RCS: $Id: d_memmove.U,v 3.0 1993/08/18 12:06:35 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..e5aab60
--- /dev/null
+++ b/mcon/U/d_memset.U
@@ -0,0 +1,35 @@
+?RCS: $Id: d_memset.U,v 3.0.1.1 1993/09/13 16:03:11 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..08c761e
--- /dev/null
+++ b/mcon/U/d_mkdir.U
@@ -0,0 +1,33 @@
+?RCS: $Id: d_mkdir.U,v 3.0 1993/08/18 12:06:37 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..c235d41
--- /dev/null
+++ b/mcon/U/d_mkfifo.U
@@ -0,0 +1,28 @@
+?RCS: $Id: d_mkfifo.U,v 3.0.1.1 1994/10/29 16:14:17 ram Exp $
+?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..0e3c46d
--- /dev/null
+++ b/mcon/U/d_mktime.U
@@ -0,0 +1,33 @@
+?RCS: $Id: d_mktime.U,v 3.0.1.1 1994/08/29 16:09:44 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..e151b6f
--- /dev/null
+++ b/mcon/U/d_mmap.U
@@ -0,0 +1,31 @@
+?RCS: $Id: d_mmap.U,v 3.0.1.1 1993/12/15 08:19:12 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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_msg.U b/mcon/U/d_msg.U
new file mode 100644
index 0000000..a2742df
--- /dev/null
+++ b/mcon/U/d_msg.U
@@ -0,0 +1,45 @@
+?RCS: $Id: d_msg.U,v 3.0 1993/08/18 12:06:37 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..997d520
--- /dev/null
+++ b/mcon/U/d_msgctl.U
@@ -0,0 +1,31 @@
+?RCS: $Id: d_msgctl.U,v 3.0 1993/08/18 12:06:38 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..9a615a7
--- /dev/null
+++ b/mcon/U/d_msgget.U
@@ -0,0 +1,31 @@
+?RCS: $Id: d_msgget.U,v 3.0 1993/08/18 12:06:39 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..8dadcfa
--- /dev/null
+++ b/mcon/U/d_msgrcv.U
@@ -0,0 +1,31 @@
+?RCS: $Id: d_msgrcv.U,v 3.0 1993/08/18 12:06:40 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..e1e7d67
--- /dev/null
+++ b/mcon/U/d_msgsnd.U
@@ -0,0 +1,31 @@
+?RCS: $Id: d_msgsnd.U,v 3.0 1993/08/18 12:06:41 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..34e1cf4
--- /dev/null
+++ b/mcon/U/d_msync.U
@@ -0,0 +1,31 @@
+?RCS: $Id: d_msync.U,v 3.0.1.1 1993/12/15 08:19:17 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..08bb791
--- /dev/null
+++ b/mcon/U/d_munmap.U
@@ -0,0 +1,31 @@
+?RCS: $Id: d_munmap.U,v 3.0.1.1 1993/12/15 08:19:22 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..6a01138
--- /dev/null
+++ b/mcon/U/d_newsadm.U
@@ -0,0 +1,72 @@
+?RCS: $Id: d_newsadm.U,v 3.0.1.2 1997/02/28 15:36:53 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..9c0c83b
--- /dev/null
+++ b/mcon/U/d_nice.U
@@ -0,0 +1,33 @@
+?RCS: $Id: d_nice.U,v 3.0.1.1 1994/08/29 16:09:48 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..8770dbb
--- /dev/null
+++ b/mcon/U/d_nolnbuf.U
@@ -0,0 +1,98 @@
+?RCS: $Id: d_nolnbuf.U,v 3.0.1.1 1994/05/06 14:46:07 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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
+?LINT:set d_nolnbuf
+: check for buffering of stdout
+echo " "
+case "$d_nolnbuf" in
+'')
+ $cat <<'EOT' >blurfl.c
+#include <stdio.h>
+main()
+{
+ int i;
+
+ for (i = 0; i < 5; i++) {
+ putchar(i+'a');
+ sleep(1);
+ }
+ putchar('\n');
+}
+EOT
+ $cc blurfl.c -o blurfl >/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..c1e67bb
--- /dev/null
+++ b/mcon/U/d_normsig.U
@@ -0,0 +1,57 @@
+?RCS: $Id: d_normsig.U,v 3.0.1.2 1997/02/28 15:37:03 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..4abe42b
--- /dev/null
+++ b/mcon/U/d_open3.U
@@ -0,0 +1,90 @@
+?RCS: $Id: d_open3.U,v 3.0.1.2 1997/02/28 15:37:12 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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
+?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
+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" open3.c -o open3 >/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" open3.c -o open3 >/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"
+ echo "I can't find the O_* constant definitions! You got problems." >&4
+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..4b74e6b
--- /dev/null
+++ b/mcon/U/d_passwd.U
@@ -0,0 +1,23 @@
+?RCS: $Id: d_passwd.U,v 3.0.1.2 1997/02/28 15:37:21 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..6856ce4
--- /dev/null
+++ b/mcon/U/d_pathconf.U
@@ -0,0 +1,55 @@
+?RCS: $Id: d_pathconf.U,v 3.0.1.1 1994/10/29 16:14:54 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..675d91b
--- /dev/null
+++ b/mcon/U/d_pause.U
@@ -0,0 +1,34 @@
+?RCS: $Id: d_pause.U,v 3.0.1.1 1994/08/29 16:09:54 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..5e87a75
--- /dev/null
+++ b/mcon/U/d_perror.U
@@ -0,0 +1,44 @@
+?RCS: $Id: d_perror.U,v 3.0.1.1 1994/08/29 16:11:38 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..ac62132
--- /dev/null
+++ b/mcon/U/d_pidcheck.U
@@ -0,0 +1,75 @@
+?RCS: $Id: d_pidcheck.U,v 3.0.1.1 1997/02/28 15:37:55 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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'
+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 try.c -o try >/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..b7ac152
--- /dev/null
+++ b/mcon/U/d_pipe.U
@@ -0,0 +1,34 @@
+?RCS: $Id: d_pipe.U,v 3.0.1.1 1994/08/29 16:11:44 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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..f8a0037
--- /dev/null
+++ b/mcon/U/d_poll.U
@@ -0,0 +1,36 @@
+?RCS: $Id: d_poll.U,v 3.0.1.2 1997/02/28 15:38:17 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.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.
+?C:.
+?H:#$d_poll HAS_POLL /**/
+?H:.
+?LINT:set d_poll
+: see if poll exists
+set poll d_poll
+eval $inlibc
+
diff --git a/mcon/U/d_popen.U b/mcon/U/d_popen.U
new file mode 100644
index 0000000..d8d7365
--- /dev/null
+++ b/mcon/U/d_popen.U
@@ -0,0 +1,31 @@
+?RCS: $Id: d_popen.U,v 3.0 1993/08/18 12:06:47 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.0.
+?RCS:
+?RCS: $Log: d_popen.U,v $
+?RCS: Revision 3.0 1993/08/18 12:06:47 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_popen: Inlibc
+?MAKE: -pick add $@ %<
+?S:d_popen:
+?S: This variable conditionally defines HAS_POPEN if popen() is
+?S: available to open a pipe from a process.
+?S:.
+?C:HAS_POPEN (POPEN):
+?C: This symbol, if defined, indicates that the popen routine is
+?C: available to open a pipe from a process.
+?C:.
+?H:#$d_popen HAS_POPEN /**/
+?H:.
+?LINT:set d_popen
+: see if popen exists
+set popen d_popen
+eval $inlibc
+
diff --git a/mcon/U/d_portable.U b/mcon/U/d_portable.U
new file mode 100644
index 0000000..89bf8f5
--- /dev/null
+++ b/mcon/U/d_portable.U
@@ -0,0 +1,71 @@
+?RCS: $Id: d_portable.U,v 3.0.1.2 1995/01/11 15:28:52 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.0.
+?RCS:
+?RCS: $Log: d_portable.U,v $
+?RCS: Revision 3.0.1.2 1995/01/11 15:28:52 ram
+?RCS: patch45: executable path stripping moved to the end in Config_sh.U
+?RCS:
+?RCS: Revision 3.0.1.1 1993/12/15 08:21:17 ram
+?RCS: patch15: did not strip variables properly when needed
+?RCS: patch15: now also strips down variables from trylist
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:06:48 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: The Loc unit is wanted to get the definition of all the locating variables.
+?X:
+?MAKE:d_portable: cat Loc Myread Oldconfig
+?MAKE: -pick add $@ %<
+?S:d_portable:
+?S: This variable conditionally defines the PORTABLE symbol, which
+?S: indicates to the C program that it should not assume that it is
+?S: running on the machine it was compiled on.
+?S:.
+?C:PORTABLE:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: not assume that it is running on the machine it was compiled on.
+?C: The program should be prepared to look up the host name, translate
+?C: generic filenames, use PATH, etc.
+?C:.
+?H:#$d_portable PORTABLE /**/
+?H:.
+?D:d_portable=''
+: decide how portable to be
+case "$d_portable" in
+"$define") dflt=y;;
+*) dflt=n;;
+esac
+$cat <<'EOH'
+
+I can set things up so that your shell scripts and binaries are more portable,
+at what may be a noticable cost in performance. In particular, if you
+ask to be portable, the following happens:
+
+ 1) Shell scripts will rely on the PATH variable rather than using
+ the paths derived above.
+ 2) ~username interpretations will be done at run time rather than
+ by Configure.
+@if PHOSTNAME
+ 3) The system name will be determined at run time, if at all possible.
+@end
+
+EOH
+rp="Do you expect to run these scripts and binaries on multiple machines?"
+. ./myread
+case "$ans" in
+ y*) d_portable="$define"
+?X:
+?X: Paths will be stripped down (/usr/bin/vi -> vi) in Config_sh.U if needed.
+?X:
+ ;;
+ *) d_portable="$undef" ;;
+esac
+
diff --git a/mcon/U/d_psignal.U b/mcon/U/d_psignal.U
new file mode 100644
index 0000000..ca535f5
--- /dev/null
+++ b/mcon/U/d_psignal.U
@@ -0,0 +1,31 @@
+?RCS: $Id: d_psignal.U,v 3.0 1993/08/18 12:06:49 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.0.
+?RCS:
+?RCS: $Log: d_psignal.U,v $
+?RCS: Revision 3.0 1993/08/18 12:06:49 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_psignal: Inlibc
+?MAKE: -pick add $@ %<
+?S:d_psignal:
+?S: This variable conditionally defines the HAS_PSIGNAL symbol, which
+?S: indicates that the psignal() routine exists. The psignal() routine
+?S: prints a description of a signal on the standard error output.
+?S:.
+?C:HAS_PSIGNAL (PSIGNAL):
+?C: This symbol, if defined, indicates that the psignal() routine exists.
+?C:.
+?H:#$d_psignal HAS_PSIGNAL /**/
+?H:.
+?LINT:set d_psignal
+: see if psignal exists
+set psignal d_psignal
+eval $inlibc
+
diff --git a/mcon/U/d_raster.U b/mcon/U/d_raster.U
new file mode 100644
index 0000000..85dcaad
--- /dev/null
+++ b/mcon/U/d_raster.U
@@ -0,0 +1,57 @@
+?RCS: $Id: d_raster.U,v 3.0 1993/08/18 12:06:50 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.0.
+?RCS:
+?RCS: $Log: d_raster.U,v $
+?RCS: Revision 3.0 1993/08/18 12:06:50 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_raster rasterlib: cat test Setvar Myread Oldconfig
+?MAKE: -pick add $@ %<
+?S:d_raster:
+?S: Conditionally defines RASTER_TEK if this is a raster tech machine.
+?S:.
+?S:rasterlib (d_rasterlib):
+?S: Set to the needed compile flag if this is a raster tech machine.
+?S: It is up to the Makefile to use this variable.
+?S:.
+?C:RASTER_TEK:
+?C: Defined if this is a rastertech machine.
+?C:.
+?H:#$d_raster RASTER_TEK /**/
+?H:.
+?LINT:set d_raster
+: See if this is a raster tech machine.
+val="$undef"
+rasterlib=''
+if $test -r /dev/mirage; then
+ $cat <<'EOM'
+
+You seem to have a mirage device... this is normally associated with a raster
+technologies graphics workstation. If this is right, you may want to use raster
+tech in this program.
+
+EOM
+ dflt=y
+ case "$d_raster" in
+ "$undef") dflt=n;;
+ esac
+ rp='Use raster tech?'
+ . ./myread
+ case "$ans" in
+ y*) val="$define";;
+ esac
+fi
+set d_raster
+eval $setvar
+
+case "$d_raster" in
+"$define") rasterlib='-lphigs';;
+esac
+
diff --git a/mcon/U/d_rdchk.U b/mcon/U/d_rdchk.U
new file mode 100644
index 0000000..21ca6fc
--- /dev/null
+++ b/mcon/U/d_rdchk.U
@@ -0,0 +1,33 @@
+?RCS: $Id: d_rdchk.U,v 3.0 1993/08/18 12:06:51 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.0.
+?RCS:
+?RCS: $Log: d_rdchk.U,v $
+?RCS: Revision 3.0 1993/08/18 12:06:51 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_rdchk: Inlibc
+?MAKE: -pick add $@ %<
+?S:d_rdchk:
+?S: This variable conditionally defines the HAS_RDCHK symbol, which
+?S: indicates to the C program that the rdchk() routine is available
+?S: to find out if there is input pending on an IO channel.
+?S:.
+?C:HAS_RDCHK (RDCHK):
+?C: This symbol, if defined, indicates that the rdchk routine is available
+?C: to find out if there is input pending on an IO channel. Generally
+?C: the routine is used only if FIONREAD and O_NDELAY aren't available.
+?C:.
+?H:#$d_rdchk HAS_RDCHK /**/
+?H:.
+?LINT:set d_rdchk
+: see if rdchk exists
+set rdchk d_rdchk
+eval $inlibc
+
diff --git a/mcon/U/d_readdir.U b/mcon/U/d_readdir.U
new file mode 100644
index 0000000..75997b7
--- /dev/null
+++ b/mcon/U/d_readdir.U
@@ -0,0 +1,79 @@
+?RCS: $Id: d_readdir.U,v 3.0.1.1 1994/05/06 14:46:37 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.0.
+?RCS:
+?RCS: $Log: d_readdir.U,v $
+?RCS: Revision 3.0.1.1 1994/05/06 14:46:37 ram
+?RCS: patch23: added support for seekdir, telldir and rewinddir (ADO)
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:06:52 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X: Force checking for <dirent.h> inclusion
+?X:INC: i_dirent
+?MAKE:d_readdir d_seekdir d_telldir d_rewinddir: Inlibc
+?MAKE: -pick add $@ %<
+?S:d_readdir:
+?S: This variable conditionally defines HAS_READDIR if readdir() is
+?S: available to read directory entries.
+?S:.
+?C:HAS_READDIR (READDIR):
+?C: This symbol, if defined, indicates that the readdir routine is
+?C: available to read directory entries. You may have to include
+?C: <dirent.h>. See I_DIRENT.
+?C:.
+?H:#$d_readdir HAS_READDIR /**/
+?H:.
+?S:d_seekdir:
+?S: This variable conditionally defines HAS_SEEKDIR if seekdir() is
+?S: available.
+?S:.
+?C:HAS_SEEKDIR:
+?C: This symbol, if defined, indicates that the seekdir routine is
+?C: available. You may have to include <dirent.h>. See I_DIRENT.
+?C:.
+?H:#$d_seekdir HAS_SEEKDIR /**/
+?H:.
+?S:d_telldir:
+?S: This variable conditionally defines HAS_TELLDIR if telldir() is
+?S: available.
+?S:.
+?C:HAS_TELLDIR:
+?C: This symbol, if defined, indicates that the telldir routine is
+?C: available. You may have to include <dirent.h>. See I_DIRENT.
+?C:.
+?H:#$d_telldir HAS_TELLDIR /**/
+?H:.
+?S:d_rewinddir:
+?S: This variable conditionally defines HAS_REWINDDIR if rewinddir() is
+?S: available.
+?S:.
+?C:HAS_REWINDDIR:
+?C: This symbol, if defined, indicates that the rewinddir routine is
+?C: available. You may have to include <dirent.h>. See I_DIRENT.
+?C:.
+?H:#$d_rewinddir HAS_REWINDDIR /**/
+?H:.
+?LINT:set d_readdir d_seekdir d_telldir d_rewinddir
+: see if readdir and friends exist
+set readdir d_readdir
+eval $inlibc
+@if d_seekdir || HAS_SEEKDIR
+set seekdir d_seekdir
+eval $inlibc
+@end
+@if d_telldir || HAS_TELLDIR
+set telldir d_telldir
+eval $inlibc
+@end
+@if d_rewinddir || HAS_REWINDDIR
+set rewinddir d_rewinddir
+eval $inlibc
+@end
+
diff --git a/mcon/U/d_readlink.U b/mcon/U/d_readlink.U
new file mode 100644
index 0000000..2dd1d28
--- /dev/null
+++ b/mcon/U/d_readlink.U
@@ -0,0 +1,34 @@
+?RCS: $Id: d_readlink.U,v 3.0.1.1 1994/08/29 16:11:52 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.0.
+?RCS:
+?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
+?RCS:
+?RCS: $Log: d_readlink.U,v $
+?RCS: Revision 3.0.1.1 1994/08/29 16:11:52 ram
+?RCS: patch32: created by ADO
+?RCS:
+?MAKE:d_readlink: Inlibc
+?MAKE: -pick add $@ %<
+?S:d_readlink:
+?S: This variable conditionally defines the HAS_READLINK symbol, which
+?S: indicates to the C program that the readlink() routine is available
+?S: to read the value of a symbolic link.
+?S:.
+?C:HAS_READLINK :
+?C: This symbol, if defined, indicates that the readlink routine is
+?C: available to read the value of a symbolic link.
+?C:.
+?H:#$d_readlink HAS_READLINK /**/
+?H:.
+?LINT:set d_readlink
+: see if readlink exists
+set readlink d_readlink
+eval $inlibc
+
diff --git a/mcon/U/d_regcmp.U b/mcon/U/d_regcmp.U
new file mode 100644
index 0000000..2a5073c
--- /dev/null
+++ b/mcon/U/d_regcmp.U
@@ -0,0 +1,80 @@
+?RCS: $Id: d_regcmp.U,v 3.0.1.1 1995/01/30 14:34:45 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.0.
+?RCS:
+?RCS: $Log: d_regcmp.U,v $
+?RCS: Revision 3.0.1.1 1995/01/30 14:34:45 ram
+?RCS: patch49: now looks for POSIX regcomp() routine
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:06:53 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_regcmp d_re_comp d_regcomp: Csym cat
+?MAKE: -pick add $@ %<
+?S:d_regcomp:
+?S: This variable conditionally defines the HAS_REGCOMP symbol, which
+?S: indicates to the C program that the regcomp() routine is available
+?S: for regular patern matching (usally on POSIX.2 conforming systems).
+?S:.
+?S:d_regcmp:
+?S: This variable conditionally defines the HAS_REGCMP symbol, which
+?S: indicates to the C program that the regcmp() routine is available
+?S: for regular patern matching (usally on System V).
+?S:.
+?S:d_re_comp:
+?S: This variable conditionally defines the HAS_RECOMP symbol, which
+?S: indicates to the C program that the re_comp() routine is available
+?S: for regular patern matching (usally on BSD). If so, it is likely that
+?S: re_exec() exists.
+?S:.
+?C:HAS_REGCOMP (REGCOMP):
+?C: This symbol, if defined, indicates that the regcomp() routine is
+?C: available to do some regular patern matching (usually on POSIX.2
+?C: conforming systems).
+?C:.
+?C:HAS_REGCMP (REGCMP):
+?C: This symbol, if defined, indicates that the regcmp() routine is
+?C: available to do some regular patern matching (usually on System V).
+?C:.
+?C:HAS_RECOMP (RECOMP):
+?C: This symbol, if defined, indicates that the re_comp() routine is
+?C: available to do some regular patern matching (usually on BSD). If so,
+?C: it is likely that re_exec() be available.
+?C:.
+?H:#$d_regcomp HAS_REGCOMP /* POSIX.2 */
+?H:#$d_regcmp HAS_REGCMP /* sysV */
+?H:#$d_re_comp HAS_RECOMP /* BSD */
+?H:.
+?T:val
+: see if regcomp, regcmp, or re_comp exist, for regular pattern matching
+echo " "
+if set regcomp val -f d_regcomp; eval $csym; $val; then
+ echo 'regcomp() found.' >&4
+ d_regcomp="$define"
+ d_regcmp="$undef"
+ d_re_comp="$undef"
+elif set regcmp val -f d_regcmp; eval $csym; $val; then
+ echo 'regcmp() found.' >&4
+ d_regcmp="$define"
+ d_regcomp="$undef"
+ d_re_comp="$undef"
+elif set re_comp val -f d_re_comp; eval $csym; $val; then
+ echo 're_comp() found, assuming re_exec() also exists.' >&4
+ d_re_comp="$define"
+ d_regcomp="$undef"
+ d_regcmp="$undef"
+else
+ $cat >&4 <<EOM
+No regcomp(), regcmp() nor re_comp() found !! No regular pattern matching.
+EOM
+ d_regcmp="$undef"
+ d_re_comp="$undef"
+ d_regcomp="$undef"
+fi
+
diff --git a/mcon/U/d_rename.U b/mcon/U/d_rename.U
new file mode 100644
index 0000000..211feb5
--- /dev/null
+++ b/mcon/U/d_rename.U
@@ -0,0 +1,33 @@
+?RCS: $Id: d_rename.U,v 3.0 1993/08/18 12:06:54 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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 3.0.
+?RCS:
+?RCS: $Log: d_rename.U,v $
+?RCS: Revision 3.0 1993/08/18 12:06:54 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_rename: Inlibc
+?MAKE: -pick add $@ %<
+?S:d_rename:
+?S: This variable conditionally defines the HAS_RENAME symbol, which
+?S: indicates to the C program that the rename() routine is available
+?S: to rename files.
+?S:.
+?C:HAS_RENAME (RENAME):
+?C: This symbol, if defined, indicates that the rename routine is available
+?C: to rename files. Otherwise you should do the unlink(), link(), unlink()
+?C: trick.
+?C:.
+?H:#$d_rename HAS_RENAME /**/
+?H:.
+?LINT:set d_rename
+: see if rename exists
+set rename d_rename
+eval $inlibc
+
diff --git a/mcon/U/d_rmdir.U b/mcon/U/d_rmdir.U
new file mode 100644
index 0000000..6e1b49e
--- /dev/null
+++ b/mcon/U/d_rmdir.U
@@ -0,0 +1,32 @@
+?RCS: $Id: d_rmdir.U,v 3.0 1993/08/18 12:06:56 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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.