diff options
-rwxr-xr-x | Configure | 45 | ||||
-rw-r--r-- | MANIFEST | 16 | ||||
-rw-r--r-- | jmake/files/Jmake.rules | 41 | ||||
-rw-r--r-- | jmake/files/Jmake.tmpl | 8 | ||||
-rw-r--r-- | mcon/U/Options.U | 15 | ||||
-rw-r--r-- | mcon/U/d_bfd_lib.U | 5 | ||||
-rw-r--r-- | mcon/U/d_bsearch.U | 39 | ||||
-rw-r--r-- | mcon/U/d_cbrt.U | 4 | ||||
-rw-r--r-- | mcon/U/d_clearenv.U | 38 | ||||
-rw-r--r-- | mcon/U/d_dirent_d_namlen.U | 42 | ||||
-rw-r--r-- | mcon/U/d_dirent_d_type.U | 11 | ||||
-rw-r--r-- | mcon/U/d_dirfd.U | 42 | ||||
-rw-r--r-- | mcon/U/d_fchdir.U | 40 | ||||
-rw-r--r-- | mcon/U/d_fdopendir.U | 42 | ||||
-rw-r--r-- | mcon/U/d_fstatat.U | 43 | ||||
-rw-r--r-- | mcon/U/d_getprogname.U | 40 | ||||
-rw-r--r-- | mcon/U/d_getpwnam.U | 38 | ||||
-rw-r--r-- | mcon/U/d_getpwuid.U | 38 | ||||
-rw-r--r-- | mcon/U/d_openat.U | 38 | ||||
-rw-r--r-- | mcon/U/d_pipe.U | 4 | ||||
-rw-r--r-- | mcon/U/d_pipe2.U | 46 | ||||
-rw-r--r-- | mcon/U/d_proginvocname.U | 40 | ||||
-rw-r--r-- | mcon/U/d_setenv.U | 38 | ||||
-rw-r--r-- | mcon/U/d_setprogname.U | 40 | ||||
-rw-r--r-- | mcon/U/d_unsetenv.U | 38 |
25 files changed, 753 insertions, 38 deletions
@@ -14,11 +14,11 @@ # Note: this Configure script was generated automatically. Rather than # working with this copy of Configure, you may wish to get metaconfig. # The dist package (which contains metaconfig) is available via SVN: -# svn co https://svn.sourceforge.net/svnroot/dist/trunk/dist +# svn co https://svn.code.sf.net/p/dist/code/trunk/dist -# $Id: Head.U 41 2010-11-28 00:21:26Z rmanfredi $ +# $Id: Head.U 167 2013-05-08 17:58:00Z rmanfredi $ # -# Generated on Tue Feb 7 19:02:16 RST 2012 [metaconfig 3.5-123] +# Generated on Sat Nov 14 16:05:58 CET 2015 [metaconfig 3.5-197] cat >c1$$ <<EOF ARGGGHHHH!!!!! @@ -283,6 +283,7 @@ ldflags='' lkflags='' locincpth='' optimize='' +pthread='' cf_email='' cf_by='' cf_time='' @@ -721,7 +722,7 @@ while test $# -gt 0; do esac shift ;; - -V) echo "$me generated by metaconfig 3.5-123." >&2 + -V) echo "$me generated by metaconfig 3.5-197." >&2 exit 0;; --) break;; -*) echo "$me: unknown option $1" >&2; shift; error=true;; @@ -787,8 +788,13 @@ 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 +if grep -q '\\' optdef.sh >/dev/null 2>&1; then + echo "Configure does not support \\ in -D or -U arguments" >&2 + exit 1 +fi + +: run the defines and the undefines, if any, but leave the file out there... . ./optdef.sh : create the posthint manipulation script and leave the file out there... touch posthint.sh @@ -1620,6 +1626,7 @@ EOSC : determine whether symbolic links are supported echo " " $rm -f blurfl sym +$touch blurfl if $ln -s blurfl sym > /dev/null 2>&1 && $test -f sym; then echo "Symbolic links are supported." >&4 lns="$ln -s" @@ -2136,6 +2143,7 @@ esac saved_osname="$osname" saved_osvers="$osvers" +saved_libswanted="$libswanted" tmp_n="$n" tmp_c="$c" tmp_sh="$sh" @@ -2196,6 +2204,12 @@ osvers="$saved_osvers" n="$tmp_n" c="$tmp_c" +case "$libswanted" in +"$saved_libswanted") ;; +*) libs='';; +esac +libswanted="$saved_libswanted" + . ./checkcc case "$targetarch" in '') ;; @@ -3314,9 +3328,19 @@ your organization... EOM cont=x while test "$cont"; do + case "$MAILDOMAIN" in + '') + if $test -s /etc/mailname; then + maildomain=`$cat /etc/mailname` + else + maildomain="$myhostname$mydomain" + fi + ;; + *) maildomain="$MAILDOMAIN";; + esac case "$cf_email" in - '') dflt="$cf_by@$myhostname$mydomain";; - *) dflt="$cf_email";; + '') dflt="$cf_by@$maildomain";; + *) dflt="$cf_email";; esac rp='What is your e-mail address?' . ./myread @@ -3675,6 +3699,7 @@ case "$optimize" in 'none') optimize=" ";; esac + dflt='' : We will not override a previous value, but we might want to : augment a hint file @@ -3868,7 +3893,7 @@ rmlist="$rmlist pdp11" : coherency check echo " " echo "Checking your choice of C compiler and flags for coherency..." >&4 -set X $cc $optimize $ccflags $ldflags -o try try.c +set X $cc $optimize $pthread $ccflags $ldflags -o try try.c shift $cat >try.msg <<EOM I've tried to compile and run a simple program with: @@ -4544,6 +4569,7 @@ prefix='$prefix' prefixexp='$prefixexp' privlib='$privlib' privlibexp='$privlibexp' +pthread='$pthread' revision='$revision' rm='$rm' rmail='$rmail' @@ -4626,8 +4652,7 @@ fi : Finish up by extracting the .SH files case "$alldone" in exit) - $rm -rf UU - echo "Extraction done." + echo "Stopping at your request, leaving temporary files around." exit 0 ;; cont) @@ -173,6 +173,7 @@ mcon/U/d_bfd_lib.U Is the BFD library available? mcon/U/d_bindtxtcode.U Do we have bind_textdomain_codeset()? mcon/U/d_brokstat.U Check whether stat() macros are broken mcon/U/d_bsdjmp.U Do we have BSD _setjmp() and _longjmp()? +mcon/U/d_bsearch.U Do we have bsearch()? mcon/U/d_built_bswap32.U Is __builtin_bswap32() available? mcon/U/d_built_bswap64.U Is __builtin_bswap64() available? mcon/U/d_built_clz.U Is __builtin_clz() available? @@ -189,6 +190,7 @@ mcon/U/d_chown.U Do we have chown()? mcon/U/d_chroot.U Do we have chroot()? mcon/U/d_chsize.U Size of a char mcon/U/d_ckeypad.U Do we have the curses keypad()? +mcon/U/d_clearenv.U Do we have clearenv()? mcon/U/d_clock_getres.U Do we have clock_getres()? mcon/U/d_clock_gettime.U Do we have clock_gettime()? mcon/U/d_closedir.U Do we have closedir()? @@ -204,7 +206,9 @@ mcon/U/d_debugging.U Conditionally defines -DDEBUGGING mcon/U/d_deflate.U Do we have zlib's deflate()? mcon/U/d_devpoll.U Can we use /dev/poll? mcon/U/d_difftime.U Do we have difftime()? +mcon/U/d_dirent_d_namlen.U Does struct dirent has a member d_namlen? mcon/U/d_dirent_d_type.U Does struct dirent has a member d_type? +mcon/U/d_dirfd.U Do we have dirfd()? mcon/U/d_dladdr.U Do we have dladdr()? mcon/U/d_dlerror.U Do we have dlerror()? mcon/U/d_dliterphdr.U Do we have dl_iterate_phdr()? @@ -218,11 +222,13 @@ mcon/U/d_epoll.U Can we use epoll_xxx() routines? mcon/U/d_etext_symbol.U Whether linker defines the "etext" symbol mcon/U/d_euc2jis.U Do we have euc2jis()? mcon/U/d_fast_assert.U Can we use fast assertions? +mcon/U/d_fchdir.U Do we have fchdir()? mcon/U/d_fchmod.U Do we have fchmod()? mcon/U/d_fchown.U Do we have fchown()? mcon/U/d_fcntl.U Do we have fcntl()? mcon/U/d_fd_set.U Do we have the fd set manipulation macros? mcon/U/d_fdatasync.U Do we have fdatasync()? +mcon/U/d_fdopendir.U Do we have fdopendir()? mcon/U/d_ffs.U Do we have ffs()? mcon/U/d_fgetpos.U Do we have fgetpos()? mcon/U/d_flexfnam.U Long filenames? @@ -230,6 +236,7 @@ mcon/U/d_flock.U Do we have flock()? mcon/U/d_fmod.U Do we have fmod()? mcon/U/d_fork.U Do we have fork()? mcon/U/d_fsetpos.U Do we have fsetpos()? +mcon/U/d_fstatat.U Do we have fstatat()? mcon/U/d_fsync.U Do we have fsync()? mcon/U/d_ftime.U Do we have ftime()? mcon/U/d_ftrncate.U Do we have ftruncate()? @@ -253,7 +260,10 @@ mcon/U/d_getpgrp.U Do we have getpgrp()? mcon/U/d_getpgrp2.U Do we have getpgrp2()? (DG/UX) mcon/U/d_getppid.U Do we have getppid()? mcon/U/d_getprior.U Do we have getpriority()? +mcon/U/d_getprogname.U Do we have getprogname()? mcon/U/d_getpwent.U How is passwd info gotten? +mcon/U/d_getpwnam.U Do we have getpwnam()? +mcon/U/d_getpwuid.U Do we have getpwuid()? mcon/U/d_getrlimit.U Do we have getrlimit()? mcon/U/d_gettext.U Checks whether gettext() is available mcon/U/d_gettext.U Do we have gettext()? @@ -320,12 +330,14 @@ mcon/U/d_nls.U Do we support NLS? mcon/U/d_nolnbuf.U Is stdout line buffered? mcon/U/d_normsig.U signal() vs sigset() mcon/U/d_open3.U Do we have the 3 arguments form for open()? +mcon/U/d_openat.U Do we have openat()? mcon/U/d_passwd.U Do we have passwd()? mcon/U/d_pathconf.U Do we have pathconf()? mcon/U/d_pause.U Do we have pause()? mcon/U/d_perror.U Do we have perror()? mcon/U/d_pidcheck.U Is kill(pid, 0) allowed for PID checks? mcon/U/d_pipe.U Do we have pipe()? +mcon/U/d_pipe2.U Do we have pipe2()? mcon/U/d_poll.U Do we have poll()? mcon/U/d_popen.U Do we have popen()? mcon/U/d_portable.U How portable do we want to be? @@ -333,6 +345,7 @@ mcon/U/d_posix_fadvise.U Do we have posix_fadvise()? mcon/U/d_posix_memalign.U Do we have posix_memalign()? mcon/U/d_pread.U Do we have pread()? mcon/U/d_preadv.U Do we have preadv()? +mcon/U/d_proginvocname.U Do we have program_invocation_name variables? mcon/U/d_psignal.U Do we have psignal()? mcon/U/d_ptattr_setstack.U Do we have pthread_attr_setstack()? mcon/U/d_pwrite.U Do we have pwrite()? @@ -366,6 +379,7 @@ mcon/U/d_semop.U Do we have semop()? mcon/U/d_sendfile.U Do we have sendfile()? mcon/U/d_sendmsg.U Do we have sendmsg()? mcon/U/d_setegid.U Do we have setegid()? +mcon/U/d_setenv.U Do we have setenv()? mcon/U/d_seteuid.U Do we have seteuid()? mcon/U/d_setgrps.U Do we have setgroups()? mcon/U/d_setlnbuf.U Do we have setlinebuf()? @@ -375,6 +389,7 @@ mcon/U/d_setpgrp.U Do we have setpgrp()? mcon/U/d_setpgrp2.U Do we have setpgrp2()? (DG/UX) mcon/U/d_setprior.U Do we have setpriority()? mcon/U/d_setproctitle.U Do we have setproctitle()? +mcon/U/d_setprogname.U Do we have setprogname()? mcon/U/d_setregid.U Do we have setregid()? mcon/U/d_setreuid.U Do we have setreuid()? mcon/U/d_setrgid.U Do we have setrgid()? @@ -446,6 +461,7 @@ mcon/U/d_uctx_mctx.U Do we have a uc_mcontext field in struct ucontext? mcon/U/d_uctx_mctx_gregs.U Do we have uc_mcontext.gregs[] in struct ucontext? mcon/U/d_ulimit.U Do we have ulimit()? mcon/U/d_umask.U Do we have umask()? +mcon/U/d_unsetenv.U Do we have unsetenv()? mcon/U/d_usendir.U Use our own ndir routines? mcon/U/d_usleep.U Do we have usleep()? mcon/U/d_uwait.U Is there a 'union wait' declaration around here? diff --git a/jmake/files/Jmake.rules b/jmake/files/Jmake.rules index 0b0c02d..f02bd9b 100644 --- a/jmake/files/Jmake.rules +++ b/jmake/files/Jmake.rules @@ -1,12 +1,12 @@ ;######################################################################## ;# Jmake rules for building libraries, programs, scripts, and data files -;# $Id: Jmake.rules 174 2014-04-05 08:19:48Z rmanfredi $ +;# $Id: Jmake.rules 195 2015-04-27 21:30:17Z rmanfredi $ /* * MACHINE-INDEPENDENT RULES -- DO NOT MODIFY */ -/* $Id: Jmake.rules 174 2014-04-05 08:19:48Z rmanfredi $ +/* $Id: Jmake.rules 195 2015-04-27 21:30:17Z rmanfredi $ * * Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi * @@ -282,7 +282,7 @@ local_deinstall.man:: @@\ * Generate rules to install the indicated library. */ #define InstallLibrary(libname,dest) @!\ -local_install:: lib^^libname.a @@\ +local_install local_install-strip:: lib^^libname.a @@\ _MakeInstallDirIgnore(dest) \ @@\ $(INSTALL) -c -m 644 lib^^libname.a $(INSTALL_PREFIX)^^^dest @@\ $(RANLIB) dest/lib^^libname.a @@\ @@ -297,7 +297,7 @@ local_deinstall:: @@\ * Generate rules to install the shared library. */ #define InstallSharedLibrary(libname,rev,dest) @!\ -local_install:: lib^^libname.so.rev @@\ +local_install local_install-strip:: lib^^libname.so.rev @@\ _MakeInstallDirIgnore(dest) \ @@\ $(INSTALL) -c -m 444 lib^^libname.so.rev $(INSTALL_PREFIX)^^^dest @!\ @!\ @@ -310,7 +310,7 @@ local_deinstall:: @@\ * Generate rules to install the shared library data */ #define InstallSharedLibraryData(libname,rev,dest) @!\ -local_install:: lib^^libname.sa.rev @@\ +local_install local_install-strip:: lib^^libname.sa.rev @@\ _MakeInstallDirIgnore(dest) \ @@\ $(INSTALL) -c -m 444 lib^^libname.sa.rev $(INSTALL_PREFIX)^^^dest @!\ @!\ @@ -324,7 +324,7 @@ local_deinstall:: @@\ * for the purposes of aliasing. */ #define InstallLibraryAlias(libname,alias,dest) @!\ -local_install:: lib^^libname.a @@\ +local_install local_install-strip:: lib^^libname.a @@\ $(RM) lib^^alias.a @@\ -(cd dest; $(LN) lib^^libname.a lib^^alias.a) @!\ @!\ @@ -376,7 +376,7 @@ InstallManPageLong(file,dest,file) * install flags. */ #define InstallNonExec(file,dest) @!\ -local_install:: file @@\ +local_install local_install-strip:: file @@\ _MakeInstallDirIgnore(dest) \ @@\ $(INSTALL) -c -m 444 file $(INSTALL_PREFIX)^^^dest @!\ @!\ @@ -388,10 +388,16 @@ local_deinstall:: @@\ * InstallProgramWithFlags: * Generate rules to install an executable program using given * install flags. + * By default, program is not stripped, but the install-strip target + * will force stripping. */ #define InstallProgramWithFlags(program,dest,flags) @!\ local_install:: program @@\ _MakeInstallDirIgnore(dest) \ @@\ + $(INSTALL) -c -m 555 flags program^^^$(_EXE) $(INSTALL_PREFIX)^^^dest @!\ + @!\ +local_install-strip:: program @@\ + _MakeInstallDirIgnore(dest) \ @@\ $(INSTALL) -c -s -m 555 flags program^^^$(_EXE) $(INSTALL_PREFIX)^^^dest @!\ @!\ local_deinstall:: @@\ @@ -401,10 +407,10 @@ local_deinstall:: @@\ /* * InstallProgramNoStripWithFlags: * Generate rules to install an executable program using given - * install flags. + * install flags. The program is never stripped. */ #define InstallProgramNoStripWithFlags(program,dest,flags) @!\ -local_install:: program @@\ +local_install local_install-strip:: program @@\ _MakeInstallDirIgnore(dest) \ @@\ $(INSTALL) -c -m 555 flags program^^^$(_EXE) $(INSTALL_PREFIX)^^^dest @!\ @!\ @@ -416,6 +422,8 @@ local_deinstall:: @@\ * InstallProgram: * Generate rules to install an executable program using any special * install flags set in $(INSTALLFLAGS). + * By default, program is not stripped, but the install-strip target + * will force stripping. */ #define InstallProgram(program,dest) @!\ InstallProgramWithFlags(program,dest,^^) @@ -437,7 +445,7 @@ InstallProgramNoStripWithFlags(program,dest,^^) * install flags. */ #define InstallScriptWithFlags(script,dest,flags) @!\ -local_install:: script @@\ +local_install local_install-strip:: script @@\ _MakeInstallDirIgnore(dest) \ @@\ $(INSTALL) -c -m 555 flags script $(INSTALL_PREFIX)^^^dest @!\ @!\ @@ -461,7 +469,7 @@ InstallScriptWithFlags(script,dest,^^) */ #define InstallScripts() @!\ |once _InstallScripts_ @!\ -local_install:: $(SCRIPTS) $(LSCRIPTS) @@\ +local_install local_install-strip:: $(SCRIPTS) $(LSCRIPTS) @@\ _MakeInstallDirIgnore($(SCRIPTDIR)) \ @@\ for file in $(SCRIPTS) $(LSCRIPTS); do \ @@\ (set -x; \ @@\ @@ -644,6 +652,10 @@ local_clobber:: local_realclean @!\ %SUBDIRS:install:: local_install @@\ @exit 0 @!\ @!\ +?SUBDIRS:install-strip:: local_install-strip sub_install-strip @!\ +%SUBDIRS:install-strip:: local_install-strip @@\ + @exit 0 @!\ + @!\ ?SUBDIRS:install.man:: maybe_install.man sub_install.man @!\ %SUBDIRS:install.man:: maybe_install.man @!\ ?SUBDIRS:deinstall:: sub_deinstall local_deinstall @!\ @@ -1194,7 +1206,7 @@ subdirs: @@\ @case '${MFLAGS}' in *[ik]*) set +e;; *) set -e;; esac; \ @@\ for i in dirs ;\ @@\ do \ @@\ - (cd $$i ; echo $(VERB) "in $(DIR)$$i..."; \ @@\ + (cd $$i ; echo "$(VERB) in $(DIR)$$i..."; \ @@\ $(MAKE) $(MFLAGS) $(FLAGS) $(TARGET)) || exit 1; \ @@\ done @@ -1292,7 +1304,8 @@ DependDirs($(SUBDIRS)) * files. */ #define InstallSubdirs() \ -NamedSubTargetSubdirs(install,"Installing",^^) @!\ +NamedSubTargetSubdirs(install,"Installing",^^) @!\ +NamedSubTargetSubdirs(install-strip,"Installing (strip)",^^) @!\ NamedDepthTargetSubdirs(deinstall,"Deinstalling",^^) @@ -1425,7 +1438,7 @@ step:: @@\ * time (removed by deinstall). */ #define MakeInstallDirectories(dirs) @!\ -local_install:: @@\ +local_install local_install-strip:: @@\ _MakeInstallDirs(dirs) @!\ @!\ local_deinstall:: @@\ diff --git a/jmake/files/Jmake.tmpl b/jmake/files/Jmake.tmpl index a06d405..7765fba 100644 --- a/jmake/files/Jmake.tmpl +++ b/jmake/files/Jmake.tmpl @@ -1,7 +1,7 @@ /* * Generic jmake template * - * $Id: Jmake.tmpl 156 2012-12-19 16:44:39Z rmanfredi $ + * $Id: Jmake.tmpl 183 2015-04-12 09:48:11Z rmanfredi $ * * Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi * @@ -27,7 +27,7 @@ */ : Makefile.SH generated from Jmake.tmpl and Jmakefile <TAG> -: $Id: Jmake.tmpl 156 2012-12-19 16:44:39Z rmanfredi $ +: $Id: Jmake.tmpl 183 2015-04-12 09:48:11Z rmanfredi $ /************************************************************************* * * @@ -217,6 +217,7 @@ MakeSubdirs() * in this directory. */ local_install:: +local_install-strip:: local_deinstall:: local_install.man:: local_deinstall.man:: @@ -229,6 +230,9 @@ local_deinstall.man:: local_install:: @echo "install in $(CURRENT) done." +local_install-strip:: + @echo "install (strip) in $(CURRENT) done." + local_deinstall:: @echo "deinstall in $(CURRENT) done." diff --git a/mcon/U/Options.U b/mcon/U/Options.U index c9b5632..6dbf001 100644 --- a/mcon/U/Options.U +++ b/mcon/U/Options.U @@ -1,4 +1,4 @@ -?RCS: $Id: Options.U 167 2013-05-08 17:58:00Z rmanfredi $ +?RCS: $Id: Options.U 191 2015-04-19 10:04:17Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: @@ -354,8 +354,19 @@ case "$silent" in true) exec 1>/dev/null;; esac -: run the defines and the undefines, if any, but leave the file out there... +?X: Patch from H.Merijn Brand -- 2015-04-19 +?X: The reasoning behind this change is that optdef.sh gets sourced and the +?X: arguments, like prefix, are passed around in different quotation styles +?X: and subshells all around, and the (unescaped) backslash will not be +?X: pertained in the final config.sh +?X: Note that -q is POSIX but to be sure, we also silence all output --RAM touch optdef.sh +if grep -q '\\' optdef.sh >/dev/null 2>&1; then + echo "Configure does not support \\ in -D or -U arguments" >&2 + exit 1 +fi + +: run the defines and the undefines, if any, but leave the file out there... . ./optdef.sh : create the posthint manipulation script and leave the file out there... ?X: this file will be perused by Oldconfig.U diff --git a/mcon/U/d_bfd_lib.U b/mcon/U/d_bfd_lib.U index cf21c45..a58d1c1 100644 --- a/mcon/U/d_bfd_lib.U +++ b/mcon/U/d_bfd_lib.U @@ -42,7 +42,10 @@ int main(void) } EOC cyn="whether the BFD library is available" +?X: Modern BFD library versions no longer require -lintl and -liberty but do +?X: require -ldl, on Linux at least. -- RAM, 2014-07-22 set d_bfd_lib '-lbfd -lintl -liberty' '-lbfd -liberty' '-lbfd -liberty -lz' \ - '-lbfd -lintl -liberty -lz' '-lbfd -lz' '-lbfd -lintl -lz' + '-lbfd -lintl -liberty -lz' '-lbfd -lz' '-lbfd -lintl -lz' \ + '-lbfd -lz -ldl' eval $trylink diff --git a/mcon/U/d_bsearch.U b/mcon/U/d_bsearch.U new file mode 100644 index 0000000..17ac23a --- /dev/null +++ b/mcon/U/d_bsearch.U @@ -0,0 +1,39 @@ +?RCS: +?RCS: Copyright (c) 2015 Raphael Manfredi +?RCS: +?RCS: You may redistribute only under the terms of the Artistic License, +?RCS: as specified in the README file that comes with the distribution. +?RCS: You may reuse parts of this distribution only within the terms of +?RCS: that same Artistic License; a copy of which may be found at the root +?RCS: of the source tree for dist 4.0. +?RCS: +?MAKE:d_bsearch: Trylink cat +?MAKE: -pick add $@ %< +?S:d_bsearch: +?S: This variable conditionally defines the HAS_BSEARCH symbol, which +?S: indicates to the C program that it can use the bsearch() routine +?S: to perform a binary search on a sorted array. +?S:. +?C:HAS_BSEARCH: +?C: This symbol, if defined, indicates that the bsearch() routine +?C: is available to perform a binary search on a sorted array. +?C:. +?H:#$d_bsearch HAS_BSEARCH /**/ +?H:. +?LINT:set d_bsearch +: see if there is a bsearch +$cat >try.c <<EOC +#include <stdlib.h> +int mycmp(const void *a, const void *b) +{ + return (char *) a - (char *) b; +} +int main(int argc, char **argv) +{ + return NULL == bsearch("foo", argv, argc, sizeof argv[0], mycmp); +} +EOC +cyn=bsearch +set d_bsearch +eval $trylink + diff --git a/mcon/U/d_cbrt.U b/mcon/U/d_cbrt.U index 66014e2..c04a7c8 100644 --- a/mcon/U/d_cbrt.U +++ b/mcon/U/d_cbrt.U @@ -1,4 +1,4 @@ -?RCS: $Id: d_cbrt.U 167 2013-05-08 17:58:00Z rmanfredi $ +?RCS: $Id: d_cbrt.U 182 2014-11-23 16:40:05Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: @@ -15,7 +15,7 @@ ?MAKE:d_cbrt: Trylink cat ?MAKE: -pick add $@ %< ?S:d_cbrt: -?S: This variable conditionally defines the CBRT symbol, which +?S: This variable conditionally defines the HAS_CBRT symbol, which ?S: indicates to the C program that the cbrt() (cube root) function ?S: is available. ?S:. diff --git a/mcon/U/d_clearenv.U b/mcon/U/d_clearenv.U new file mode 100644 index 0000000..d8e892f --- /dev/null +++ b/mcon/U/d_clearenv.U @@ -0,0 +1,38 @@ +?RCS: +?RCS: Copyright (c) 2015 Raphael Manfredi +?RCS: +?RCS: You may redistribute only under the terms of the Artistic License, +?RCS: as specified in the README file that comes with the distribution. +?RCS: You may reuse parts of this distribution only within the terms of +?RCS: that same Artistic License; a copy of which may be found at the root +?RCS: of the source tree for dist 4.0. +?RCS: +?MAKE:d_clearenv: Trylink cat i_stdlib +?MAKE: -pick add $@ %< +?S:d_clearenv: +?S: This variable conditionally defines the HAS_CLEARENV +?S: symbol, which indicates to the C program that clearenv() +?S: is available to clear the environment. +?S:. +?C:HAS_CLEARENV: +?C: This symbol is defined when clearenv() is there to clear the +?C: environment. +?C:. +?H:#$d_clearenv HAS_CLEARENV +?H:. +?LINT: set d_clearenv +: do we have clearenv? +$cat >try.c <<EOC +#$i_stdlib I_STDLIB +#ifdef I_STDLIB +#include <stdlib.h> +#endif +int main(void) +{ + return clearenv(); +} +EOC +cyn=clearenv +set d_clearenv +eval $trylink + diff --git a/mcon/U/d_dirent_d_namlen.U b/mcon/U/d_dirent_d_namlen.U new file mode 100644 index 0000000..00fdfb2 --- /dev/null +++ b/mcon/U/d_dirent_d_namlen.U @@ -0,0 +1,42 @@ +?RCS: +?RCS: Copyright (c) 2015 Raphael Manfredi +?RCS: +?RCS: You may redistribute only under the terms of the Artistic License, +?RCS: as specified in the README file that comes with the distribution. +?RCS: You may reuse parts of this distribution only within the terms of +?RCS: that same Artistic License; a copy of which may be found at the root +?RCS: of the source tree for dist 4.0. +?RCS: +?MAKE:d_dirent_d_namlen: Trylink cat i_dirent +?MAKE: -pick add $@ %< +?S:d_dirent_d_namlen: +?S: This variable conditionally defines the HAS_DIRENT_D_NAMLEN symbol, +?S: which indicates to the C program that struct dirent has an +?S: integer member d_namlen. Better check for HAS_DIRENT_D_NAMLEN than +?S: DIRNAMLEN since the latter has a weaker test not involving compilation. +?S:. +?C:HAS_DIRENT_D_NAMLEN: +?C: This symbol, if defined, indicates that struct dirent has an +?C: integer member d_namlen to hold the actual string length of d_name. +?C:. +?H:#$d_dirent_d_namlen HAS_DIRENT_D_NAMLEN /**/ +?H:. +?LINT:set d_dirent_d_namlen +: check whether struct dirent has a member d_namlen. +$cat >try.c <<EOC +#include <sys/types.h> +#$i_dirent I_DIRENT +#ifdef I_DIRENT +#include <dirent.h> +#endif +int main(void) +{ + static struct dirent dir_entry; + dir_entry.d_namlen |= 1; + return 0; +} +EOC +cyn="whether struct dirent has a d_namlen member" +set d_dirent_d_namlen +eval $trylink + diff --git a/mcon/U/d_dirent_d_type.U b/mcon/U/d_dirent_d_type.U index 6334118..3ee08cc 100644 --- a/mcon/U/d_dirent_d_type.U +++ b/mcon/U/d_dirent_d_type.U @@ -1,4 +1,4 @@ -?RCS: $Id: d_dirent_d_type.U 167 2013-05-08 17:58:00Z rmanfredi $ +?RCS: $Id: d_dirent_d_type.U 185 2015-04-17 07:20:44Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 2006, Christian Biere ?RCS: @@ -13,11 +13,13 @@ ?S:d_dirent_d_type: ?S: This variable conditionally defines the HAS_DIRENT_D_TYPE symbol, ?S: which indicates to the C program that struct dirent has an -?S: integer member d_type. +?S: integer member d_type. ?S:. ?C:HAS_DIRENT_D_TYPE: ?C: This symbol, if defined, indicates that struct dirent has an -?C: integer member d_type. +?C: integer member d_type. Note that DT_WHT is BSD-specific and may +?C: not be available. If DT_UNKNOWN is returned, the filesystem does +?C: not fill d_type even though it is present in the dir entry. ?C:. ?H:#$d_dirent_d_type HAS_DIRENT_D_TYPE /**/ ?H:. @@ -40,8 +42,7 @@ int main(void) | DT_BLK | DT_REG | DT_LNK - | DT_SOCK - | DT_WHT; + | DT_SOCK; return 0; } EOC diff --git a/mcon/U/d_dirfd.U b/mcon/U/d_dirfd.U new file mode 100644 index 0000000..269b2d4 --- /dev/null +++ b/mcon/U/d_dirfd.U @@ -0,0 +1,42 @@ +?RCS: +?RCS: Copyright (c) 2015 Raphael Manfredi +?RCS: +?RCS: You may redistribute only under the terms of the Artistic License, +?RCS: as specified in the README file that comes with the distribution. +?RCS: You may reuse parts of this distribution only within the terms of +?RCS: that same Artistic License; a copy of which may be found at the root +?RCS: of the source tree for dist 4.0. +?RCS: +?MAKE:d_dirfd: Trylink cat i_dirent +?MAKE: -pick add $@ %< +?S:d_dirfd: +?S: This variable conditionally defines HAS_DIRFD when dirfd() is +?S: available to get the underlying file descriptor from opendir(). +?S:. +?C:HAS_DIRFD: +?C: This symbol, if defined, indicates that the dirfd() routine is +?C: available to get the underlying file descriptor from a DIR * +?C: opened by opendir(). +?C:. +?H:#$d_dirfd HAS_DIRFD /**/ +?H:. +?LINT:set d_dirfd +: see if dirfd exists +$cat >try.c <<EOC +#include <sys/types.h> +#$i_dirent I_DIRENT +#ifdef I_DIRENT +#include <dirent.h> +#endif +int main(void) +{ + static DIR *dir; + static int ret; + ret = dirfd(dir); + return ret ? 0 : 1; +} +EOC +cyn=dirfd +set d_dirfd +eval $trylink + diff --git a/mcon/U/d_fchdir.U b/mcon/U/d_fchdir.U new file mode 100644 index 0000000..2ed47e2 --- /dev/null +++ b/mcon/U/d_fchdir.U @@ -0,0 +1,40 @@ +?RCS: +?RCS: Copyright (c) 2015 Raphael Manfredi +?RCS: +?RCS: You may redistribute only under the terms of the Artistic License, +?RCS: as specified in the README file that comes with the distribution. +?RCS: You may reuse parts of this distribution only within the terms of +?RCS: that same Artistic License; a copy of which may be found at the root +?RCS: of the source tree for dist 4.0. +?RCS: +?MAKE:d_fchdir: Trylink cat i_unistd +?MAKE: -pick add $@ %< +?S:d_fchdir: +?S: This variable conditionally defines HAS_FCHDIR if fchdir() is +?S: available to change the directory to that of an opened directory. +?S:. +?C:HAS_FCHDIR: +?C: This symbol, if defined, indicates that the fchdir routine is +?C: available to change the working directory to that of the opened +?C: directory whose file descriptor is given. +?C:. +?H:#$d_fchdir HAS_FCHDIR /**/ +?H:. +?LINT:set d_fchdir +: see if fchdir exists +$cat >try.c <<EOC +#$i_unistd I_UNISTD +#ifdef I_UNISTD +#include <unistd.h> +#endif +int main(void) +{ + static int fd, ret; + ret |= fchdir(fd); + return ret ? 0 : 1; +} +EOC +cyn=fchdir +set d_fchdir +eval $trylink + diff --git a/mcon/U/d_fdopendir.U b/mcon/U/d_fdopendir.U new file mode 100644 index 0000000..02a0ddc --- /dev/null +++ b/mcon/U/d_fdopendir.U @@ -0,0 +1,42 @@ +?RCS: +?RCS: Copyright (c) 2015 Raphael Manfredi +?RCS: +?RCS: You may redistribute only under the terms of the Artistic License, +?RCS: as specified in the README file that comes with the distribution. +?RCS: You may reuse parts of this distribution only within the terms of +?RCS: that same Artistic License; a copy of which may be found at the root +?RCS: of the source tree for dist 4.0. +?RCS: +?MAKE:d_fdopendir: Trylink cat i_dirent +?MAKE: -pick add $@ %< +?S:d_fdopendir: +?S: This variable conditionally defines HAS_FDOPENDIR if fdopendir() is +?S: available to open a directory using an opened file descriptor already +?S: referring to that directory. +?S:. +?C:HAS_FDOPENDIR: +?C: This symbol, if defined, indicates that the fdopendir() routine is +?C: available to open directories using an opened file descriptor already +?C: referring to that directory. +?C:. +?H:#$d_fdopendir HAS_FDOPENDIR /**/ +?H:. +?LINT:set d_fdopendir +: see if fdopendir exists +$cat >try.c <<EOC +#$i_dirent I_DIRENT +#include <sys/types.h> +#ifdef I_DIRENT +#include <dirent.h> +#endif +int main(void) +{ + static DIR *d; + d = fdopendir(0); + return (DIR *) 0 == d; +} +EOC +cyn=fdopendir +set d_fdopendir +eval $trylink + diff --git a/mcon/U/d_fstatat.U b/mcon/U/d_fstatat.U new file mode 100644 index 0000000..55412f7 --- /dev/null +++ b/mcon/U/d_fstatat.U @@ -0,0 +1,43 @@ +?RCS: +?RCS: Copyright (c) 2015 Raphael Manfredi +?RCS: +?RCS: You may redistribute only under the terms of the Artistic License, +?RCS: as specified in the README file that comes with the distribution. +?RCS: You may reuse parts of this distribution only within the terms of +?RCS: that same Artistic License; a copy of which may be found at the root +?RCS: of the source tree for dist 4.0. +?RCS: +?MAKE:d_fstatat: Trylink cat i_sysstat +?MAKE: -pick add $@ %< +?S:d_fstatat: +?S: This variable conditionally defines HAS_FSTATAT if fstatat() is +?S: available to do file stats with a relative path interepreted in +?S: the context of an opened directory. +?S:. +?C:HAS_FSTATAT: +?C: This symbol, if defined, indicates that the fstatat() routine is +?C: available to do file stats with a relative path interepreted in +?C: the context of an opened directory. +?C:. +?H:#$d_fstatat HAS_FSTATAT /**/ +?H:. +?LINT:set d_fstatat +: see if fstatat exists +$cat >try.c <<EOC +#$i_sysstat I_SYS_STAT +#include <fcntl.h> /* AT_* constants */ +#ifdef I_SYS_STAT +#include <sys/stat.h> +#endif +int main(void) +{ + static int ret; + struct stat sb; + ret |= fstatat(AT_FDCWD, "path", &sb, 0); + return ret ? 0 : 1; +} +EOC +cyn=fstatat +set d_fstatat +eval $trylink + diff --git a/mcon/U/d_getprogname.U b/mcon/U/d_getprogname.U new file mode 100644 index 0000000..a5a6175 --- /dev/null +++ b/mcon/U/d_getprogname.U @@ -0,0 +1,40 @@ +?RCS: +?RCS: Copyright (c) 2015 Raphael Manfredi +?RCS: +?RCS: You may redistribute only under the terms of the Artistic License, +?RCS: as specified in the README file that comes with the distribution. +?RCS: You may reuse parts of this distribution only within the terms of +?RCS: that same Artistic License; a copy of which may be found at the root +?RCS: of the source tree for dist 4.0. +?RCS: +?MAKE:d_getprogname: Trylink cat i_stdlib +?MAKE: -pick add $@ %< +?S:d_getprogname: +?S: This variable conditionally defines the HAS_GETPROGNAME +?S: symbol, which indicates to the C program that getprogname() +?S: is available to get the program name. +?S:. +?C:HAS_GETPROGNAME: +?C: This symbol is defined when getprogname() is there to get the +?C: program name. +?C:. +?H:#$d_getprogname HAS_GETPROGNAME +?H:. +?LINT: set d_getprogname +: can we use getprogname? +$cat >try.c <<EOC +#include <stdio.h> +#$i_stdlib I_STDLIB +#ifdef I_STDLIB +#include <stdlib.h> +#endif +int main(void) +{ + printf("%s\n", getprogname()); + return 0; +} +EOC +cyn=getprogname +set d_getprogname +eval $trylink + diff --git a/mcon/U/d_getpwnam.U b/mcon/U/d_getpwnam.U new file mode 100644 index 0000000..74d117a --- /dev/null +++ b/mcon/U/d_getpwnam.U @@ -0,0 +1,38 @@ +?RCS: +?RCS: Copyright (c) 2015 Raphael Manfredi +?RCS: +?RCS: You may redistribute only under the terms of the Artistic License, +?RCS: as specified in the README file that comes with the distribution. +?RCS: You may reuse parts of this distribution only within the terms of +?RCS: that same Artistic License; a copy of which may be found at the root +?RCS: of the source tree for dist 4.0. +?RCS: +?MAKE:d_getpwnam: Trylink cat +?MAKE: -pick add $@ %< +?S:d_getpwnam: +?S: This variable conditionally defines the HAS_GETPWNAM symbol, which +?S: indicates to the C program that it can use the getpwnam() routine +?S: to get the /etc/passwd structure entries for given user name. +?S:. +?C:HAS_GETPWNAM: +?C: This symbol, if defined, indicates that the getpwnam() routine +?C: is available to get the /etc/passwd structure entries for given +?C: user name. +?C:. +?H:#$d_getpwnam HAS_GETPWNAM /**/ +?H:. +?LINT:set d_getpwnam +: see if there is a getpwnam +$cat >try.c <<EOC +#include <pwd.h> +int main(void) +{ + struct passwd pw; + pw = *getpwnam("foo"); + return pw.pw_name ? 0 : 1; +} +EOC +cyn=getpwnam +set d_getpwnam +eval $trylink + diff --git a/mcon/U/d_getpwuid.U b/mcon/U/d_getpwuid.U new file mode 100644 index 0000000..8c49ea3 --- /dev/null +++ b/mcon/U/d_getpwuid.U @@ -0,0 +1,38 @@ +?RCS: +?RCS: Copyright (c) 2015 Raphael Manfredi +?RCS: +?RCS: You may redistribute only under the terms of the Artistic License, +?RCS: as specified in the README file that comes with the distribution. +?RCS: You may reuse parts of this distribution only within the terms of +?RCS: that same Artistic License; a copy of which may be found at the root +?RCS: of the source tree for dist 4.0. +?RCS: +?MAKE:d_getpwuid: Trylink cat +?MAKE: -pick add $@ %< +?S:d_getpwuid: +?S: This variable conditionally defines the HAS_GETPWUID symbol, which +?S: indicates to the C program that it can use the getpwuid() routine +?S: to get the /etc/passwd structure entries for given user ID. +?S:. +?C:HAS_GETPWUID: +?C: This symbol, if defined, indicates that the getpwuid() routine +?C: is available to get the /etc/passwd structure entries for given +?C: user ID. +?C:. +?H:#$d_getpwuid HAS_GETPWUID /**/ +?H:. +?LINT:set d_getpwuid +: see if there is a getpwuid +$cat >try.c <<EOC +#include <pwd.h> +int main(void) +{ + struct passwd pw; + pw = *getpwuid(0); + return pw.pw_name ? 0 : 1; +} +EOC +cyn=getpwuid +set d_getpwuid +eval $trylink + diff --git a/mcon/U/d_openat.U b/mcon/U/d_openat.U new file mode 100644 index 0000000..8565ee5 --- /dev/null +++ b/mcon/U/d_openat.U @@ -0,0 +1,38 @@ +?RCS: +?RCS: Copyright (c) 2015 Raphael Manfredi +?RCS: +?RCS: You may redistribute only under the terms of the Artistic License, +?RCS: as specified in the README file that comes with the distribution. +?RCS: You may reuse parts of this distribution only within the terms of +?RCS: that same Artistic License; a copy of which may be found at the root +?RCS: of the source tree for dist 4.0. +?RCS: +?MAKE:d_openat: Trylink cat +?MAKE: -pick add $@ %< +?S:d_openat: +?S: This variable conditionally defines HAS_OPENAT if openat() is +?S: available to open files with a relative path interepreted in +?S: the context of an opened directory. +?S:. +?C:HAS_OPENAT: +?C: This symbol, if defined, indicates that the openat() routine is +?C: available to open files with a relative path interepreted in +?C: the context of an opened directory. +?C:. +?H:#$d_openat HAS_OPENAT /**/ +?H:. +?LINT:set d_openat +: see if openat exists +$cat >try.c <<EOC +#include <fcntl.h> /* AT_* constants */ +int main(void) +{ + static int ret; + ret |= openat(AT_FDCWD, "path", /* flags */ 0, /* mode */ 0); + return ret ? 0 : 1; +} +EOC +cyn=openat +set d_openat +eval $trylink + diff --git a/mcon/U/d_pipe.U b/mcon/U/d_pipe.U index a0cd165..19952c6 100644 --- a/mcon/U/d_pipe.U +++ b/mcon/U/d_pipe.U @@ -1,4 +1,4 @@ -?RCS: $Id: d_pipe.U 167 2013-05-08 17:58:00Z rmanfredi $ +?RCS: $Id: d_pipe.U 196 2015-11-01 14:35:37Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: @@ -21,7 +21,7 @@ ?S: indicates to the C program that the pipe() routine is available ?S: to create an inter-process channel. ?S:. -?C:HAS_PIPE : +?C:HAS_PIPE: ?C: This symbol, if defined, indicates that the pipe routine is ?C: available to create an inter-process channel. ?C:. diff --git a/mcon/U/d_pipe2.U b/mcon/U/d_pipe2.U new file mode 100644 index 0000000..df03115 --- /dev/null +++ b/mcon/U/d_pipe2.U @@ -0,0 +1,46 @@ +?RCS: +?RCS: Copyright (c) 2015, Raphael Manfredi +?RCS: +?RCS: You may redistribute only under the terms of the Artistic License, +?RCS: as specified in the README file that comes with the distribution. +?RCS: You may reuse parts of this distribution only within the terms of +?RCS: that same Artistic License; a copy of which may be found at the root +?RCS: of the source tree for dist 4.0. +?RCS: +?MAKE:d_pipe2: Trylink cat i_unistd i_sysfile +?MAKE: -pick add $@ %< +?S:d_pipe2: +?S: This variable conditionally defines the HAS_PIPE2 symbol, which +?S: indicates to the C program that the pipe2() routine is available +?S: to create an inter-process channel with some flags. +?S:. +?C:HAS_PIPE2: +?C: This symbol, if defined, indicates that the pipe routine is +?C: available to create an inter-process channel with O_CLOEXEC or +?C: O_NONBLOCK flags. +?C:. +?H:#$d_pipe2 HAS_PIPE2 /**/ +?H:. +?LINT:set d_pipe2 +: see if pipe2 exists +$cat >try.c <<EOC +#$i_unistd I_UNISTD +#$i_sysfile I_SYS_FILE +#ifdef I_UNISTD +#include <unistd.h> +#endif +#ifdef I_SYS_FILE +#include <sys/file.h> /* For O_* constants */ +#endif +#include <fcntl.h> /* For O_* constants */ +int main(void) +{ + static int fds[2], ret; + ret |= pipe2(fds, O_CLOEXEC | O_NONBLOCK); + return ret ? 0 : 1; +} +EOC +cyn=pipe2 +set d_pipe2 +eval $trylink + diff --git a/mcon/U/d_proginvocname.U b/mcon/U/d_proginvocname.U new file mode 100644 index 0000000..1ebd177 --- /dev/null +++ b/mcon/U/d_proginvocname.U @@ -0,0 +1,40 @@ +?RCS: +?RCS: Copyright (c) 2015 Raphael Manfredi +?RCS: +?RCS: You may redistribute only under the terms of the Artistic License, +?RCS: as specified in the README file that comes with the distribution. +?RCS: You may reuse parts of this distribution only within the terms of +?RCS: that same Artistic License; a copy of which may be found at the root +?RCS: of the source tree for dist 4.0. +?RCS: +?MAKE:d_proginvocname: Trylink cat +?MAKE: -pick add $@ %< +?S:d_proginvocname: +?S: This variable conditionally defines the HAS_PROGRAM_INVOCATION_NAME +?S: symbol, which indicates to the C program that the two variables +?S: program_invocation_name and program_invocation_short_name are set +?S: at startup time. +?S:. +?C:HAS_PROGRAM_INVOCATION_NAME: +?C: This symbol is defined when the C startup sets the two variables +?C: program_invocation_name and program_invocation_short_name. To get +?C: these definitions, <errno.h> must be included with __USE_GNU defined. +?C:. +?H:#$d_proginvocname HAS_PROGRAM_INVOCATION_NAME +?H:. +?LINT: set d_proginvocname +: do we have the program_invocation_name variable? +$cat >try.c <<EOC +#include <stdio.h> +#define __USE_GNU +#include <errno.h> +int main(void) +{ + printf("%s\n%s\n", program_invocation_name, program_invocation_short_name); + return 0; +} +EOC +cyn="whether C startup sets program_invocation_name" +set d_proginvocname +eval $trylink + diff --git a/mcon/U/d_setenv.U b/mcon/U/d_setenv.U new file mode 100644 index 0000000..9fcfd52 --- /dev/null +++ b/mcon/U/d_setenv.U @@ -0,0 +1,38 @@ +?RCS: +?RCS: Copyright (c) 2015 Raphael Manfredi +?RCS: +?RCS: You may redistribute only under the terms of the Artistic License, +?RCS: as specified in the README file that comes with the distribution. +?RCS: You may reuse parts of this distribution only within the terms of +?RCS: that same Artistic License; a copy of which may be found at the root +?RCS: of the source tree for dist 4.0. +?RCS: +?MAKE:d_setenv: Trylink cat i_stdlib +?MAKE: -pick add $@ %< +?S:d_setenv: +?S: This variable conditionally defines the HAS_SETENV +?S: symbol, which indicates to the C program that setenv() +?S: is available to change or add an environment variable. +?S:. +?C:HAS_SETENV: +?C: This symbol is defined when setenv() is available to change or +?C: add an environment variable. +?C:. +?H:#$d_setenv HAS_SETENV +?H:. +?LINT: set d_setenv +: do we have setenv? +$cat >try.c <<EOC +#$i_stdlib I_STDLIB +#ifdef I_STDLIB +#include <stdlib.h> +#endif +int main(void) +{ + return setenv("foo", "bar", 1); +} +EOC +cyn=setenv +set d_setenv +eval $trylink + diff --git a/mcon/U/d_setprogname.U b/mcon/U/d_setprogname.U new file mode 100644 index 0000000..0e53fdb --- /dev/null +++ b/mcon/U/d_setprogname.U @@ -0,0 +1,40 @@ +?RCS: +?RCS: Copyright (c) 2015 Raphael Manfredi +?RCS: +?RCS: You may redistribute only under the terms of the Artistic License, +?RCS: as specified in the README file that comes with the distribution. +?RCS: You may reuse parts of this distribution only within the terms of +?RCS: that same Artistic License; a copy of which may be found at the root +?RCS: of the source tree for dist 4.0. +?RCS: +?MAKE:d_setprogname: Trylink cat i_stdlib +?MAKE: -pick add $@ %< +?S:d_setprogname: +?S: This variable conditionally defines the HAS_SETPROGNAME +?S: symbol, which indicates to the C program that setprogname() +?S: is available to set the program name. +?S:. +?C:HAS_SETPROGNAME: +?C: This symbol is defined when setprogname() is there to set the +?C: program name. +?C:. +?H:#$d_setprogname HAS_SETPROGNAME +?H:. +?LINT: set d_setprogname +: can we use setprogname? +$cat >try.c <<EOC +#include <sys/types.h> +#$i_stdlib I_STDLIB +#ifdef I_STDLIB +#include <stdlib.h> +#endif +int main(void) +{ + setprogname("test"); + return 0; +} +EOC +cyn=setprogname +set d_setprogname +eval $trylink + diff --git a/mcon/U/d_unsetenv.U b/mcon/U/d_unsetenv.U new file mode 100644 index 0000000..8fcd511 --- /dev/null +++ b/mcon/U/d_unsetenv.U @@ -0,0 +1,38 @@ +?RCS: +?RCS: Copyright (c) 2015 Raphael Manfredi +?RCS: +?RCS: You may redistribute only under the terms of the Artistic License, +?RCS: as specified in the README file that comes with the distribution. +?RCS: You may reuse parts of this distribution only within the terms of +?RCS: that same Artistic License; a copy of which may be found at the root +?RCS: of the source tree for dist 4.0. +?RCS: +?MAKE:d_unsetenv: Trylink cat i_stdlib +?MAKE: -pick add $@ %< +?S:d_unsetenv: +?S: This variable conditionally defines the HAS_UNSETENV +?S: symbol, which indicates to the C program that unsetenv() +?S: is available to delete an environment variable. +?S:. +?C:HAS_UNSETENV: +?C: This symbol is defined when unsetenv() is available to delete +?C: an environment variable. +?C:. +?H:#$d_unsetenv HAS_UNSETENV +?H:. +?LINT: set d_unsetenv +: do we have unsetenv? +$cat >try.c <<EOC +#$i_stdlib I_STDLIB +#ifdef I_STDLIB +#include <stdlib.h> +#endif +int main(void) +{ + return unsetenv("foo"); +} +EOC +cyn=unsetenv +set d_unsetenv +eval $trylink + |