From 25010febb3425cd5dbf42e7b2b60d26d06383296 Mon Sep 17 00:00:00 2001 From: christos Date: Sun, 5 Feb 2006 16:12:04 +0000 Subject: [PATCH] Import am-utils; changes in ChangeLog. Summary: - bound string operations - better detection of filesystem names - pawd call now gets the resolved directory in the rpc All our local changes have been submitted and incorporated. --- dist/am-utils/AUTHORS | 4 + dist/am-utils/ChangeLog | 264 ++ dist/am-utils/INSTALL | 5 +- dist/am-utils/Makefile.am | 2 + dist/am-utils/Makefile.in | 2 + dist/am-utils/NEWS | 27 +- dist/am-utils/README.attrcache | 14 + dist/am-utils/README.autofs | 2 +- dist/am-utils/acinclude.m4 | 283 ++- dist/am-utils/amd/amfs_generic.c | 9 +- dist/am-utils/amd/amq_svc.c | 8 +- dist/am-utils/amd/info_exec.c | 5 +- dist/am-utils/amd/info_nisplus.c | 33 +- dist/am-utils/amd/nfs_prot_svc.c | 8 +- dist/am-utils/amd/rpc_fwd.c | 4 +- dist/am-utils/amq/amq.h | 3 +- dist/am-utils/amq/amq_clnt.c | 34 +- dist/am-utils/buildall | 2 +- dist/am-utils/conf/autofs/autofs_linux.c | 19 +- dist/am-utils/conf/autofs/autofs_solaris_v1.c | 31 +- dist/am-utils/conf/autofs/autofs_solaris_v1.h | 24 +- .../conf/autofs/autofs_solaris_v2_v3.c | 46 +- dist/am-utils/conf/mount/mount_linux.c | 44 +- dist/am-utils/conf/mtab/mtab_file.c | 6 +- dist/am-utils/conf/mtab/mtab_linux.c | 12 +- dist/am-utils/conf/mtab/mtab_mach3.c | 10 +- dist/am-utils/conf/mtab/mtab_osf.c | 6 +- dist/am-utils/conf/mtab/mtab_svr4.c | 4 +- .../conf/nfs_prot/nfs_prot_netbsd1_4.h | 5 +- dist/am-utils/conf/transp/transp_tli.c | 4 +- dist/am-utils/config.guess | 526 ++-- dist/am-utils/config.guess.long | 10 +- dist/am-utils/config.h.in | 39 + dist/am-utils/config.sub | 50 +- dist/am-utils/configure | 2116 +++++++++++++++-- dist/am-utils/configure.in | 23 +- dist/am-utils/hlfsd/stubs.c | 14 +- dist/am-utils/ldap-id.ms | 62 +- dist/am-utils/libamu/Makefile.am | 2 +- dist/am-utils/libamu/strutil.c | 272 +++ dist/am-utils/ltmain.sh | 196 +- dist/am-utils/m4/macros/check_mnttab_type.m4 | 23 +- .../m4/macros/check_varargs_macros.m4 | 39 + dist/am-utils/m4/macros/expand_run_string.m4 | 6 +- dist/am-utils/m4/macros/header_templates.m4 | 18 + dist/am-utils/m4/macros/libtool.m4 | 174 +- dist/am-utils/m4/macros/os_cflags.m4 | 4 - dist/am-utils/m4/macros/type_pte_t.m4 | 15 + dist/am-utils/mk-amd-map/Makefile.am | 2 +- dist/am-utils/scripts/Makefile.am | 3 +- dist/am-utils/scripts/test-attrcache.in | 135 ++ dist/am-utils/vers.m4 | 2 +- 52 files changed, 3728 insertions(+), 923 deletions(-) create mode 100644 dist/am-utils/libamu/strutil.c create mode 100644 dist/am-utils/m4/macros/check_varargs_macros.m4 create mode 100644 dist/am-utils/m4/macros/type_pte_t.m4 create mode 100755 dist/am-utils/scripts/test-attrcache.in diff --git a/dist/am-utils/AUTHORS b/dist/am-utils/AUTHORS index 734720c5d00b..fffd2e4655ad 100644 --- a/dist/am-utils/AUTHORS +++ b/dist/am-utils/AUTHORS @@ -396,6 +396,7 @@ AIX. October 22, 2004: patch/fix to move mlock/mlockall/plock code after the fork(). June 29, 2005: core dump going off end of exported_ap[] array. +September 29, 2005: patch/fix for pawd not to go into an infinite loop. * David Rage January 17, 2005: prevent Amd from logging 'Read-only filesystem' errors @@ -423,3 +424,6 @@ expects. * Graeme Wilford July 4, 2005: buffer overflow in pawd. +* Steve Plite +September 22, 2005: repair reversed meaning of D_AMQ, so amq will unregister +on exit. diff --git a/dist/am-utils/ChangeLog b/dist/am-utils/ChangeLog index af98b5be7f7b..0048bb12fb71 100644 --- a/dist/am-utils/ChangeLog +++ b/dist/am-utils/ChangeLog @@ -1,3 +1,267 @@ +2005-10-10 Erez Zadok + + ******************************************************************* + *** Released am-utils-6.1.3 *** + ******************************************************************* + +2005-10-07 Erez Zadok + + * m4/macros/check_mnttab_type.m4: move the test for MOUNT_* to the + very end, after the test using getvfsbyname(). + + * m4/macros/expand_run_string.m4: if the string value returned is + empty, consider it invalid. + + * m4/macros/check_varargs_macros.m4: rewrite macro so it'll + try and compile the varargs test, not just cpp it. Some systems + pass the old cpp test, but not when you actually try to compile + the code (Tru64's cc). + + * conf/autofs/autofs_solaris_v1.h: redefine + autofs_strdup_space_hack as a macro to str3cat(NULL,(s)," ",""). + This works everywhere and we avoid linking problems, inline + functions, etc. + + * conf/autofs/autofs_solaris_v1.c (autofs_mount_fs): remove + autofs_strdup_space_hack() function altogether. + + * m4/macros/os_cflags.m4: remove hack that hardcodes pte_t=u_int. + + * configure.in: test for header. + Test for pte_t, but only on IRIX6 systems. + + * Makefile.am (EXTRA_DIST_M4): distribute new type_pte_t.m4 file. + + * m4/macros/type_pte_t.m4: new test for existence of pte_t + typedef, needed on some IRIX-6.5/gcc systems. + + * m4/macros/header_templates.m4: add missing templates for + HAVE_EXTERN_GETDTABLESIZE, HAVE_EXTERN_GETWD, and + HAVE_EXTERN_UALARM. + + * amd/info_exec.c (exec_map_open): break assignment from inside + conditional, to work around an IRIX-6.5 cc bug. + + * fsinfo/fsi_util.c (set_ether_if), amd/map.c (unmount_mp), + libamu/xutil.c (expand_error), libamu/strutil.c (xsnprintf): avoid + comparison between signed and unsigned integers. + + * conf/autofs/autofs_solaris_v1.h, conf/autofs/autofs_solaris_v1.c + (autofs_strdup_space_hack): move "space_hack" function from static + inline in header, into the only source file that needs it. This + is cleaner and also prevents linking problem with some compilers + that won't apply CPP macros inside static inline functions (for + the strl* functions). + + * amq/pawd.c (find_mt, find_mlp): remove obsolete, inefficient + code. + (transform_dir): call the new, efficient amqproc_pawd_1() routine. + + * amq/amq_clnt.c (amqproc_pawd_1): AMQPROC_PAWD wrapper routine. + + * amq/amq.h (amqproc_pawd_1): extern for amq's AMQPROC_PAWD + wrapper routine. + + * amd/amq_svc.c (amq_program_1): dispatch point for + amqproc_pawd_1_svc. + + * amd/amq_subr.c (amqproc_pawd_1_svc): moved pawd's path-matching + functionality into Amd, where it can be done a lot more + efficiently. We don't have to construct and ship a whole export + tree from Amd to pawd. We just get a variable-length + xdr_wrapstring for the user's path, iterate over the entire export + list inside Amd, and return only a matched string if found + (otherwise we return "" to indicate that there was no match, and + let pawd printf the same string it sent over). + + * amd/amd.h: extern for amqproc_pawd_1_svc, amd's service routine + the AMQPROC_PAWD RPC. + +2005-10-06 Erez Zadok + + * ltmain.sh, m4/macros/libtool.m4: update to libtool-1.5.20. + Fixes Tru64 bugs when using ksh. + + * amd/amfs_toplvl.c (amfs_toplvl_mount): break complex ifdef macro + into two sections, to workaround a C99 varargs-macro bug in + gcc-3.2.2 (RH9). + + * libamu/wire.c (print_wires): convert argument-less xsnprintf to + xstrlcpy. + + * include/am_utils.h: use new HAVE_C99_VARARGS_MACROS or + HAVE_GCC_VARARGS_MACROS to pass file name and line number to + xsnprintf/xvsnprintf. + + * libamu/strutil.c (xsnprintf, xvsnprintf): if debugging is on, + then also print the source file name and line number that called + xsnprintf/xvsnprintf with a buffer that wasn't large enough (most + likely an am-utils bug). + + * Makefile.am (EXTRA_DIST_M4): distribute new + check_varargs_macros.m4 file. + + * configure.in: execute new AMU_VARARGS_MACROS test. + + * m4/macros/check_varargs_macros.m4: new test to check what style + of variable-length argument macros, if any, does the + compiler/pre-processor supports. + + * conf/autofs/autofs_solaris_v2_v3.c (autofs_lookup_2_req) + conf/autofs/autofs_solaris_v1.c (autofs_mount_1_req), amd/opts.c, + amd/nfs_subr.c (nfsproc_lookup_2_svc), amd/nfs_start.c + (mount_automounter), amd/get_args.c (get_args), amd/amfs_toplvl.c, + amd/amfs_auto.c (amfs_auto_mount), amd/amd.h, amd/amd.c (main): + use sizeof() instead of fixed SIZEOF_* macros. + + * libamu/strutil.c (xstrlcat, xstrlcpy), include/am_utils.h + (DEBUG): if debugging is on, then also print the source file name + and line number that called xstrl* with a buffer that wasn't large + enough (most likely an am-utils bug) + + * include/am_compat.h (INADDR_NONE): define in a common location, + if OS doesn't have it, use 0xffffffffU which should work with any + ANSI compiler. + + * fixmount/fixmount.c, libamu/wire.c: remove local definition of + INADDR_NONE. + + * amd/amfs_toplvl.c (amfs_toplvl_mount), amd/amfs_auto.c + (amfs_auto_mount): use common SIZEOF_OPTS in definition and call + to autofs_get_opts. + + * amd/amd.h (SIZEOF_OPTS): moved #define to common header. + +2005-10-06 Rainer Orth + + * amd/opts.c (expand_op): Need to check BUFSPACE for env for + vlen+1. Likewise for cp and strlen(cp)+1. + + * amd/amfs_toplvl.c (amfs_toplvl_mount) [HAVE_FS_AUTOFS]: Pass new + size argument to autofs_get_opts. + +2005-10-05 Erez Zadok + + * amq/pawd.c (transform_dir): was using UDP only. Now will also + try TCP if UDP failed. Destroy client after use to avoid leftover + TCP sockets in the kernel. + + * libamu/hasmntopt.c (amu_hasmntopt): increase size of MNTMAXSTR + from 128 to to 256, because some users have really long option + strings. Suggestion from jon+amd-at-spock.org. + + * amd/opts.c (expand_op): should check BUFSPACE for vlen+1, not + just vlen. Bug discovered when started using xstrlcpy(). + + * ALL: convert from using strcat to the safer xstrlcat, and from + strcpy to safer xstrlcpy. + +2005-10-04 Erez Zadok + + * hlfsd/hlfsd.h: remove old fatalerror() and ERRM macros. + + * hlfsd/hlfsd.c (fatalerror): new function instead of macro. + Easier to use xstrlcat in this new function. + + * amd/amd.h, include/am_utils.h, amd/amd.c: moved 'hostd' extern + from am_utils.h to amd.h, and define its size as a macro that + could be passed to xstrl*(). + + * ALL: convert from using sprintf to the safer xsnprintf. + + * mk-amd-map/Makefile.am (LDADD): link with libamu to get + xsnprintf(). + + * amd/amd.h, amd/amd.c, include/am_utils.h: moved pid_fsname + extern from am_utils.h to amd.h, and define its size as a macro + that could be passed to xsnprintf(). + +2005-10-02 Erez Zadok + + * include/am_utils.h: extern for xvsnprintf(). + + * amd/autil.c: move strsplit() to libamu/strutil.c. + + * libamu/Makefile.am: use strutil.c, not util.c. + + * libamu/strutil.c: rename from util.c to explain better purpose + of file. Move xvsnprintf and xsnprintf from xutil.c to this + file. Sync up with 6.2 version of file. + + * libamu/xutil.c: explain purpose of file. Move mkdirs/rmdirs + code from old util.c. + +2005-10-01 Erez Zadok + + * m4/macros/header_templates.m4: templates for FFS. + + * m4/macros/check_mnttab_type.m4: on BSD44 systems, check for file + system mount table name via the MOUNT_* mount(2) macros (because + BSD44 keeps the mount table in the kernel). + + * configure.in: synchronise order of searching for mnttab entries + and mount names. The new order is "ext3 ext2 ffs ufs 4.2 4.3 4.4 + efs xfs jfs ultrix" (which would prefer ffs on BSD44 instead of + ufs, and ext3 instead of ext2 on Linux). + + * include/am_defs.h: include if it exists. + + * conf/nfs_prot/nfs_prot_netbsd1_4.h: NetBSD 3 has both statfs() + and statvfs(), but the latter is preferred, so #define to use + statvfs. + + * configure.in: check for statfs(), statvfs(), and + . + + * config.guess.long: strip trailing '.' on "netbsdelf3.0." + (Beta). Workaround for bug in config.guess. + + * config.{guess,sub}: update to latest versions. + +2005-09-30 Christos Zoulas + + * fsinfo/fsi_util.c (set_ether_if): use INADDR_NONE instead of + hard-coded value of -1. + + * include/amq_defs.h (AMQ_STRLEN): increase default size from 2KB + to 16KB. We can afford it these days. + + * libamu/strcasecmp.c (strcasecmp): use unsigned chars in + tolower() to avoid sign/size promotion bugs. + + * libamu/xutil.c (switch_to_logfile): don't output to LOG_CONS by + default (it's unfriendly). If user really wants to, they can set + it in /etc/syslog.conf. + +2005-09-29 Erez Zadok + + * amq/pawd.c (find_mt): if the auto mount type is used, pawd could + go into an infinite loop since the mt_directory and mt_mountpoint + fields are the same for auto mounts. Solution: ignore type auto + mounts, similar to toplvl. Bug fix from Jonathan Chen + . + + * README.attrcache: document test-attrcache script. + + * scripts/Makefile.am (noinst_SCRIPTS): build test-attrcache + script. + + * configure.in: build scripts/test-attrcache script and chmod it + so it can be executed in place. + + * scripts/test-attrcache.in: script to test the NFS attribute + cache using Amd. + +2005-09-26 Erez Zadok + + * libamu/xutil.c (unregister_amq): repair broken meaning of D_AMQ, + which was reversed in am-utils-6.2. Bug fix from Steve Plite + . + + * hlfsd/stubs.c (nfsproc_getattr_2_svc, nfsproc_lookup_2_svc, + nfsproc_readlink_2_svc, nfsproc_readdir_2_svc), hlfsd/hlfsd.c + (hlfsd_init): use new clocktime() function. + 2005-09-18 Erez Zadok ******************************************************************* diff --git a/dist/am-utils/INSTALL b/dist/am-utils/INSTALL index 3323920131e0..273fe02f4548 100644 --- a/dist/am-utils/INSTALL +++ b/dist/am-utils/INSTALL @@ -43,12 +43,13 @@ i386-unknown-freebsd5.2 ezk ezk ezk ezk - i386-unknown-freebsd5.2.1 ezk ezk ezk ezk - i386-unknown-freebsd5.3 ezk ezk ezk ezk - i386-unknown-freebsd5.4 ezk ezk ezk ezk - -i386-unknown-freebsd6 (SNAP1) ezk ezk ezk ezk - +i386-unknown-freebsd6 (BETA5) ezk ezk ezk ezk - i386-unknown-netbsd1.6A ezk ezk ezk ezk - i386-unknown-netbsdelf1.6.1 ezk ezk ezk ezk - i386-unknown-netbsdelf1.6.2 ezk ezk ezk ezk - i386-unknown-netbsdelf2.0 ezk ezk ezk ezk - i386-unknown-netbsdelf2.0.2 ezk ezk ezk ezk - +i386-unknown-netbsdelf3.0 ezk ezk ezk ezk - i386-unknown-openbsd3.3 ezk ezk ezk ezk - i386-unknown-openbsd3.6 ezk ezk ezk ezk - i386-unknown-openbsd3.7 ezk ezk ezk ezk - @@ -104,7 +105,7 @@ FOOTNOTES: [1] Due to limitations in the Sun autofs v1 implementation, some amd features cannot be properly supported. More precisely, trying to access a link mount -pointing to another amd entry will result in failure and/or deadlock. +pointing to another amd entry will result in failure and/or deadlock. Ordinary nfs and link mounts work well, however. [2] AIX autofs appears to be a variant of the Sun autofs v1 protocol, but diff --git a/dist/am-utils/Makefile.am b/dist/am-utils/Makefile.am index d39e144c4f32..5aa7c1afc785 100644 --- a/dist/am-utils/Makefile.am +++ b/dist/am-utils/Makefile.am @@ -81,6 +81,7 @@ EXTRA_DIST_M4 = \ m4/macros/check_umount_style.m4 \ m4/macros/check_unmount_args.m4 \ m4/macros/check_unmount_call.m4 \ + m4/macros/check_varargs_macros.m4 \ m4/macros/expand_cpp_hex.m4 \ m4/macros/expand_cpp_int.m4 \ m4/macros/expand_cpp_string.m4 \ @@ -126,6 +127,7 @@ EXTRA_DIST_M4 = \ m4/macros/type_lofs_args.m4 \ m4/macros/type_mfs_args.m4 \ m4/macros/type_pcfs_args.m4 \ + m4/macros/type_pte_t.m4 \ m4/macros/type_recvfrom_fromlen.m4 \ m4/macros/type_rfs_args.m4 \ m4/macros/type_rpcvers_t.m4 \ diff --git a/dist/am-utils/Makefile.in b/dist/am-utils/Makefile.in index 81b3ecf592cc..1ac5107de324 100644 --- a/dist/am-utils/Makefile.in +++ b/dist/am-utils/Makefile.in @@ -271,6 +271,7 @@ EXTRA_DIST_M4 = \ m4/macros/check_umount_style.m4 \ m4/macros/check_unmount_args.m4 \ m4/macros/check_unmount_call.m4 \ + m4/macros/check_varargs_macros.m4 \ m4/macros/expand_cpp_hex.m4 \ m4/macros/expand_cpp_int.m4 \ m4/macros/expand_cpp_string.m4 \ @@ -316,6 +317,7 @@ EXTRA_DIST_M4 = \ m4/macros/type_lofs_args.m4 \ m4/macros/type_mfs_args.m4 \ m4/macros/type_pcfs_args.m4 \ + m4/macros/type_pte_t.m4 \ m4/macros/type_recvfrom_fromlen.m4 \ m4/macros/type_rfs_args.m4 \ m4/macros/type_rpcvers_t.m4 \ diff --git a/dist/am-utils/NEWS b/dist/am-utils/NEWS index 023e7c59d79e..ddefefe80754 100644 --- a/dist/am-utils/NEWS +++ b/dist/am-utils/NEWS @@ -1,9 +1,27 @@ +*** Notes specific to am-utils version 6.1.3 + +- Bugs fixed: + * amq should de-register properly on exit + * convert all sprintf to safer xsnprintf + * convert all strcat to safer xstrlcat + * convert all strcpy to safer xstrlcpy + * fix three buffer overruns in expand_op (amd/opts.c) + * pawd was trying UDP only, now try TCP if UDP failed + +Moved pawd's path-matching functionality into Amd, where it can be done a +lot more efficiently (we no longer need to construct and send the whole +mounted tree, only to match small parts of it). This will lessen the CPU +and network load on systems that use pawd heavily, and also minimize the +chance that we exceed default or hard-coded UDP/TCP RPC packet sizes. + *** Notes specific to am-utils version 6.1.2.1 - Bugs fixed: - * properly turn off the attrcache in freebsd and openbsd + * properly turn off the attrcache in freebsd and openbsd * can turn off attrcache on netbsd, but need kernel patch, see README.attrcache + * pawd goes into an infinite loop on type:=auto + * consistent search for file system mnttab/mount names *** Notes specific to am-utils version 6.1.2 @@ -35,8 +53,15 @@ NFS attribute cache entirely. This means that Amd cannot work fully reliability on these systems, not under heavy load. This is documented in detail in the README.attrcache file included with this distribution. +Include test-attrcache script to test the NFS attribute cache behavior using +Amd. + +Tell syslog not to log automatically to /dev/console; it's unfriendly. If +user really wants to, they can set it in /etc/syslog.conf. + - minor new ports: i386-pc-linux-deb3.1 + i386-unknown-netbsdelf3.0 powerpc-apple-darwin8.2.0 - bugs fixed: diff --git a/dist/am-utils/README.attrcache b/dist/am-utils/README.attrcache index d5291be09bea..e8522d226ebe 100644 --- a/dist/am-utils/README.attrcache +++ b/dist/am-utils/README.attrcache @@ -111,5 +111,19 @@ After applying this patch and rebuilding your kernel, reboot with the new kernel. Then copy the new nfs.h and nfsmount.h from /sys/nfs/ to /usr/include/nfs/, and finally rebuild am-utils from scratch. +** Testing + +When you build am-utils, a script named scripts/test-attrcache is built, +which can be used to test the NFS attribute cache behavior of the current +OS. You can run this script as root as follows: + +# make install +# cd scripts +# sh test-attrcache + +If you run this script on an OS whose status is known (and not listed +above), please report it to am-utils@am-utils.org, so we can record it in +this file. + Sincerely, Erez. diff --git a/dist/am-utils/README.autofs b/dist/am-utils/README.autofs index d2f91eeb6373..866cbca8dd05 100644 --- a/dist/am-utils/README.autofs +++ b/dist/am-utils/README.autofs @@ -10,7 +10,7 @@ - The autofs code in am-utils is gamma quality for Linux, beta quality for Solaris 2.5+ and non-working for all the other systems. -- Link, lofs, ufs, nfs, nfsl, and auto mounts were tested and work properly; +- Link, lofs, ufs, nfs, nfsl, and auto mounts were tested and work properly; the others should work, but were not tested. * Caveats: diff --git a/dist/am-utils/acinclude.m4 b/dist/am-utils/acinclude.m4 index 0c0a13678931..66cac61639a9 100644 --- a/dist/am-utils/acinclude.m4 +++ b/dist/am-utils/acinclude.m4 @@ -1557,7 +1557,7 @@ do break fi - # finally run a test program for bsdi3 + # then run a test program for bsdi3, tru64, and others AC_TRY_RUN( [ #include @@ -1576,6 +1576,27 @@ main() break ] ) + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # finally try to run a program that derefences a static array (bsd44) + AMU_EXPAND_RUN_STRING( + AMU_MOUNT_HEADERS( + [ + ]), + [ + if (argc > 1) + printf("\"%s\"", MOUNT_$ac_upcase_fs_symbol); + ], [ eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\"" + ]) + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi done @@ -2321,6 +2342,47 @@ fi dnl ====================================================================== +dnl ###################################################################### +dnl check if compiler can handle variable-length argument macros +AC_DEFUN([AMU_VARARGS_MACROS], +[ +AC_CACHE_CHECK(if compiler can handle variable-length macros, +ac_cv_varargs_macros, +[ +# try C99 style +AC_TRY_COMPILE( +[ +#define foo(str,size,fmt,...) bar(__FILE__,__LINE__,(str),(size),(fmt),__VA_ARGS__) +], +[ +char a[80]; +foo(a, sizeof(a), "%d,%d", 1, 2); +], ac_cv_varargs_macros=c99, +# else try gcc style +AC_TRY_COMPILE( +[ +#define foo(str,size,args...) bar(__FILE__,__LINE__,(str),(size),(fmt),args) +], +[ +char a[80]; +foo(a, sizeof(a), "%d,%d", 1, 2); +], ac_cv_varargs_macros=gcc, ac_cv_varargs_macros=none)) +]) +if test "$ac_cv_varargs_macros" = c99 +then + AC_DEFINE(HAVE_C99_VARARGS_MACROS, 1, + [System supports C99-style variable-length argument macros]) +else + if test "$ac_cv_varargs_macros" = gcc + then + AC_DEFINE(HAVE_GCC_VARARGS_MACROS, 1, + [System supports GCC-style variable-length argument macros]) + fi +fi +]) +dnl ====================================================================== + + dnl ###################################################################### dnl Expand the value of a CPP macro into a printable hex number. dnl Takes: header, macro, [action-if-found, [action-if-not-found]] @@ -2463,7 +2525,11 @@ int argc; { $2 exit(0); -}], value=`./conftest dummy 2>>config.log`, value="notfound", value="notfound") +}], +[ +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" +], value="notfound", value="notfound") if test "$value" = notfound then : @@ -2756,6 +2822,9 @@ AH_TEMPLATE([HAVE_MAP_EXEC], AH_TEMPLATE([HAVE_FS_UFS], [Define if have UFS filesystem]) +AH_TEMPLATE([HAVE_FS_FFS], +[Define if have FFS filesystem]) + AH_TEMPLATE([HAVE_FS_XFS], [Define if have XFS filesystem (irix)]) @@ -2810,6 +2879,9 @@ AH_TEMPLATE([HAVE_FS_UMAPFS], AH_TEMPLATE([MOUNT_TYPE_UFS], [Mount(2) type/name for UFS filesystem]) +AH_TEMPLATE([MOUNT_TYPE_FFS], +[Mount(2) type/name for FFS filesystem]) + AH_TEMPLATE([MOUNT_TYPE_XFS], [Mount(2) type/name for XFS filesystem (irix)]) @@ -2864,6 +2936,9 @@ AH_TEMPLATE([MOUNT_TYPE_UMAPFS], AH_TEMPLATE([MNTTAB_TYPE_UFS], [Mount-table entry name for UFS filesystem]) +AH_TEMPLATE([MNTTAB_TYPE_FFS], +[Mount-table entry name for FFS filesystem]) + AH_TEMPLATE([MNTTAB_TYPE_XFS], [Mount-table entry name for XFS filesystem (irix)]) @@ -3572,6 +3647,9 @@ AH_TEMPLATE([HAVE_EXTERN_GETCCENT], AH_TEMPLATE([HAVE_EXTERN_GETDOMAINNAME], [does extern definition for getdomainname() exist?]) +AH_TEMPLATE([HAVE_EXTERN_GETDTABLESIZE], +[does extern definition for getdtablesize() exist?]) + AH_TEMPLATE([HAVE_EXTERN_GETHOSTNAME], [does extern definition for gethostname() exist?]) @@ -3584,6 +3662,9 @@ AH_TEMPLATE([HAVE_EXTERN_GETTABLESIZE], AH_TEMPLATE([HAVE_EXTERN_GETPAGESIZE], [does extern definition for getpagesize() exist?]) +AH_TEMPLATE([HAVE_EXTERN_GETWD], +[does extern definition for getwd() exist?]) + AH_TEMPLATE([HAVE_EXTERN_HOSTS_CTL], [does extern definition for hosts_ctl() exist?]) @@ -3623,6 +3704,9 @@ AH_TEMPLATE([HAVE_EXTERN_STRLCPY], AH_TEMPLATE([HAVE_EXTERN_STRSTR], [does extern definition for strstr() exist?]) +AH_TEMPLATE([HAVE_EXTERN_UALARM], +[does extern definition for ualarm() exist?]) + AH_TEMPLATE([HAVE_EXTERN_USLEEP], [does extern definition for usleep() exist?]) @@ -3800,7 +3884,7 @@ AC_DEFUN([AC_PROG_LIBTOOL], [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. -AC_PROVIDE_IFELSE([AC_PROG_CXX], + AC_PROVIDE_IFELSE([AC_PROG_CXX], [AC_LIBTOOL_CXX], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX ])]) @@ -3911,7 +3995,7 @@ rm="rm -f" default_ofile=libtool can_build_shared=yes -# All known linkers require a `.a' archive for static linking (except M$VC, +# All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" @@ -4127,8 +4211,8 @@ if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if (echo_test_string="`eval $cmd`") 2>/dev/null && - echo_test_string="`eval $cmd`" && + if (echo_test_string=`eval $cmd`) 2>/dev/null && + echo_test_string=`eval $cmd` && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break @@ -4297,7 +4381,7 @@ x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then - case "`/usr/bin/file conftest.o`" in + case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*linux*) @@ -4379,7 +4463,7 @@ AC_CACHE_CHECK([$1], [$2], # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) @@ -4418,7 +4502,7 @@ AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], LDFLAGS="$LDFLAGS $3" printf "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The compiler can only warn and ignore the option if not recognized + # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. @@ -4493,7 +4577,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else - lt_cv_sys_max_cmd_len=65536 # usable default for *BSD + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` @@ -4505,7 +4589,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 - # + # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; @@ -4622,7 +4706,7 @@ int main () }] EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) 2>/dev/null + (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; @@ -4771,7 +4855,7 @@ AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) @@ -4789,7 +4873,7 @@ AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi - chmod u+w . + chmod u+w . 2>&AS_MESSAGE_LOG_FD $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation @@ -5049,7 +5133,8 @@ cygwin* | mingw* | pw32*) dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' @@ -5102,7 +5187,7 @@ darwin* | rhapsody*) soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` @@ -5140,7 +5225,14 @@ kfreebsd*-gnu) freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. - objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[[123]]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) @@ -5185,7 +5277,7 @@ hpux9* | hpux10* | hpux11*) version_type=sunos need_lib_prefix=no need_version=no - case "$host_cpu" in + case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes @@ -5581,7 +5673,7 @@ AC_DEFUN([AC_LIBTOOL_DLOPEN], # AC_LIBTOOL_WIN32_DLL # -------------------- -# declare package support for building win32 dll's +# declare package support for building win32 DLLs AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) ])# AC_LIBTOOL_WIN32_DLL @@ -5755,7 +5847,7 @@ dnl not every word. This closes a longstanding sh security hole. if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) - file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then @@ -5865,7 +5957,7 @@ AC_CACHE_VAL(lt_cv_path_LD, if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some GNU ld's only accept -v. + # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 ) +dnl Note: some gcc's on Irix 6.5 are broken and don't recognize pte_t, +dnl so I'm defining it here to unsigned int, which is not necessarily correct, +dnl but at least it gets am-utils to compile. +AC_DEFUN([AMU_TYPE_PTE_T], +[AC_CHECK_TYPE(pte_t, , +[AC_DEFINE_UNQUOTED(pte_t, unsigned int, + [Check if pte_t is defined in ])], +[ +#ifdef HAVE_SYS_IMMU_H +# include +#endif /* HAVE_SYS_IMMU_H */ +])]) +dnl ====================================================================== + + dnl ###################################################################### dnl check the correct type for the 6th argument to recvfrom() AC_DEFUN([AMU_TYPE_RECVFROM_FROMLEN], diff --git a/dist/am-utils/amd/amfs_generic.c b/dist/am-utils/amd/amfs_generic.c index 993aa827a1af..065c15ca1239 100644 --- a/dist/am-utils/amd/amfs_generic.c +++ b/dist/am-utils/amd/amfs_generic.c @@ -1,4 +1,4 @@ -/* $NetBSD: amfs_generic.c,v 1.1.1.3 2005/09/20 17:14:39 rpaulo Exp $ */ +/* $NetBSD: amfs_generic.c,v 1.1.1.4 2006/02/05 16:13:30 christos Exp $ */ /* * Copyright (c) 1997-2005 Erez Zadok @@ -365,7 +365,7 @@ amfs_lookup_mntfs(am_node *new_mp, int *error_return) if (mp->am_pref) { if (strlen(mp->am_pref) + strlen(new_mp->am_name) >= sizeof(path_name)) ereturn(ENAMETOOLONG); - sprintf(path_name, "%s%s", mp->am_pref, new_mp->am_name); + xsnprintf(path_name, sizeof(path_name), "%s%s", mp->am_pref, new_mp->am_name); pfname = path_name; } else { pfname = new_mp->am_name; @@ -1045,8 +1045,9 @@ amfs_parse_defaults(am_node *mp, mntfs *mf, char *def_opts) * otherwise just use these defaults. */ if (*def_opts && *dfl) { - char *nopts = (char *) xmalloc(strlen(def_opts) + strlen(dfl) + 2); - sprintf(nopts, "%s;%s", dfl, def_opts); + size_t l = strlen(def_opts) + strlen(dfl) + 2; + char *nopts = (char *) xmalloc(l); + xsnprintf(nopts, l, "%s;%s", dfl, def_opts); XFREE(def_opts); def_opts = nopts; } else if (*dfl) { diff --git a/dist/am-utils/amd/amq_svc.c b/dist/am-utils/amd/amq_svc.c index bea96c7fd3e1..9f288b5207ba 100644 --- a/dist/am-utils/amd/amq_svc.c +++ b/dist/am-utils/amd/amq_svc.c @@ -1,4 +1,4 @@ -/* $NetBSD: amq_svc.c,v 1.1.1.9 2005/09/20 17:14:44 rpaulo Exp $ */ +/* $NetBSD: amq_svc.c,v 1.1.1.10 2006/02/05 16:13:33 christos Exp $ */ /* * Copyright (c) 1997-2005 Erez Zadok @@ -195,6 +195,12 @@ amq_program_1(struct svc_req *rqstp, SVCXPRT *transp) local = (amqsvcproc_t) amqproc_getpid_1_svc; break; + case AMQPROC_PAWD: + xdr_argument = (xdrproc_t) xdr_amq_string; + xdr_result = (xdrproc_t) xdr_amq_string; + local = (amqsvcproc_t) amqproc_pawd_1_svc; + break; + default: svcerr_noproc(transp); return; diff --git a/dist/am-utils/amd/info_exec.c b/dist/am-utils/amd/info_exec.c index e37b59f1b168..06d40c523be6 100644 --- a/dist/am-utils/amd/info_exec.c +++ b/dist/am-utils/amd/info_exec.c @@ -1,4 +1,4 @@ -/* $NetBSD: info_exec.c,v 1.1.1.2 2005/09/20 17:14:55 rpaulo Exp $ */ +/* $NetBSD: info_exec.c,v 1.1.1.3 2006/02/05 16:13:40 christos Exp $ */ /* * Copyright (c) 1997-2005 Erez Zadok @@ -286,7 +286,8 @@ exec_map_open(char *emap, char *key) return -1; case 0: /* child #1 */ - switch ((p2 = vfork())) { + p2 = vfork(); + switch (p2) { case -1: /* child #1: fork error */ exit(errno); diff --git a/dist/am-utils/amd/info_nisplus.c b/dist/am-utils/amd/info_nisplus.c index ce9ca132b005..1e2d9adb0056 100644 --- a/dist/am-utils/amd/info_nisplus.c +++ b/dist/am-utils/amd/info_nisplus.c @@ -1,4 +1,4 @@ -/* $NetBSD: info_nisplus.c,v 1.1.1.9 2005/09/20 17:14:55 rpaulo Exp $ */ +/* $NetBSD: info_nisplus.c,v 1.1.1.10 2006/02/05 16:13:40 christos Exp $ */ /* * Copyright (c) 1997-2005 Erez Zadok @@ -94,6 +94,7 @@ nisplus_reload(mnt_map *m, char *map, void (*fn) ()) nis_result *result; char *org; /* if map does not have ".org_dir" then append it */ nis_name map_name; + size_t l; org = strstr(map, NISPLUS_ORGDIR); if (org == NULL) @@ -102,13 +103,14 @@ nisplus_reload(mnt_map *m, char *map, void (*fn) ()) org = ""; /* make some room for the NIS map_name */ - map_name = xmalloc(strlen(map) + sizeof(NISPLUS_ORGDIR)); + l = strlen(map) + sizeof(NISPLUS_ORGDIR); + map_name = xmalloc(l); if (map_name == NULL) { plog(XLOG_ERROR, "Unable to create map_name %s: %s", map, strerror(ENOMEM)); return ENOMEM; } - sprintf(map_name, "%s%s", map, org); + xsnprintf(map_name, l, "%s%s", map, org); data.ncd_m = m; data.ncd_map = map_name; @@ -161,6 +163,7 @@ nisplus_search(mnt_map *m, char *map, char *key, char **val, time_t *tp) struct nisplus_search_callback_data data; nis_name index; char *org; /* if map does not have ".org_dir" then append it */ + size_t l; org = strstr(map, NISPLUS_ORGDIR); if (org == NULL) @@ -169,14 +172,14 @@ nisplus_search(mnt_map *m, char *map, char *key, char **val, time_t *tp) org = ""; /* make some room for the NIS index */ - index = xmalloc(sizeof('[') /* for opening selection criteria */ - +sizeof(NISPLUS_KEY) - + strlen(key) - + sizeof(']') /* for closing selection criteria */ - +sizeof(',') /* + 1 for , separator */ - +strlen(map) - + sizeof(NISPLUS_ORGDIR) - ); + l = sizeof('[') /* for opening selection criteria */ + + sizeof(NISPLUS_KEY) + + strlen(key) + + sizeof(']') /* for closing selection criteria */ + + sizeof(',') /* + 1 for , separator */ + + strlen(map) + + sizeof(NISPLUS_ORGDIR); + index = xmalloc(l); if (index == NULL) { plog(XLOG_ERROR, "Unable to create index %s: %s", @@ -184,7 +187,7 @@ nisplus_search(mnt_map *m, char *map, char *key, char **val, time_t *tp) strerror(ENOMEM)); return ENOMEM; } - sprintf(index, "[%s%s],%s%s", NISPLUS_KEY, key, map, org); + xsnprintf(index, l, "[%s%s],%s%s", NISPLUS_KEY, key, map, org); data.key = key; data.value = NULL; @@ -256,6 +259,7 @@ nisplus_init(mnt_map *m, char *map, time_t *tp) char *org; /* if map does not have ".org_dir" then append it */ nis_name map_name; int error = 0; + size_t l; org = strstr(map, NISPLUS_ORGDIR); if (org == NULL) @@ -264,7 +268,8 @@ nisplus_init(mnt_map *m, char *map, time_t *tp) org = ""; /* make some room for the NIS map_name */ - map_name = xmalloc(strlen(map) + sizeof(NISPLUS_ORGDIR)); + l = strlen(map) + sizeof(NISPLUS_ORGDIR); + map_name = xmalloc(l); if (map_name == NULL) { plog(XLOG_ERROR, "Unable to create map_name %s: %s", @@ -272,7 +277,7 @@ nisplus_init(mnt_map *m, char *map, time_t *tp) strerror(ENOMEM)); return ENOMEM; } - sprintf(map_name, "%s%s", map, org); + xsnprintf(map_name, l, "%s%s", map, org); result = nis_lookup(map_name, (EXPAND_NAME | FOLLOW_LINKS | FOLLOW_PATH)); diff --git a/dist/am-utils/amd/nfs_prot_svc.c b/dist/am-utils/amd/nfs_prot_svc.c index 7b2a991c7ed7..82fdbb607a10 100644 --- a/dist/am-utils/amd/nfs_prot_svc.c +++ b/dist/am-utils/amd/nfs_prot_svc.c @@ -1,4 +1,4 @@ -/* $NetBSD: nfs_prot_svc.c,v 1.1.1.9 2005/09/20 17:14:45 rpaulo Exp $ */ +/* $NetBSD: nfs_prot_svc.c,v 1.1.1.10 2006/02/05 16:13:34 christos Exp $ */ /* * Copyright (c) 1997-2005 Erez Zadok @@ -129,7 +129,7 @@ nfs_program_2(struct svc_req *rqstp, SVCXPRT *transp) ntohs(sinp->sin_port) >= IPPORT_RESERVED && !(gopt.flags & CFM_NFS_INSECURE_PORT)) { plog(XLOG_WARNING, "ignoring request from %s:%u, port not reserved", - inet_dquad(dq, sinp->sin_addr.s_addr), + inet_dquad(dq, sizeof(dq), sinp->sin_addr.s_addr), ntohs(sinp->sin_port)); return; } @@ -137,9 +137,9 @@ nfs_program_2(struct svc_req *rqstp, SVCXPRT *transp) /* if the address does not match, ignore the request */ if (sinp && sinp->sin_addr.s_addr != myipaddr.s_addr) { plog(XLOG_WARNING, "ignoring request from %s:%u, expected %s", - inet_dquad(dq, sinp->sin_addr.s_addr), + inet_dquad(dq, sizeof(dq), sinp->sin_addr.s_addr), ntohs(sinp->sin_port), - inet_dquad(dq2, myipaddr.s_addr)); + inet_dquad(dq2, sizeof(dq2), myipaddr.s_addr)); return; } #endif /* not HAVE_TRANPORT_TYPE_TLI */ diff --git a/dist/am-utils/amd/rpc_fwd.c b/dist/am-utils/amd/rpc_fwd.c index f7cc56ed4348..cb3f758be9ab 100644 --- a/dist/am-utils/amd/rpc_fwd.c +++ b/dist/am-utils/amd/rpc_fwd.c @@ -1,4 +1,4 @@ -/* $NetBSD: rpc_fwd.c,v 1.1.1.9 2005/09/20 17:14:53 rpaulo Exp $ */ +/* $NetBSD: rpc_fwd.c,v 1.1.1.10 2006/02/05 16:13:39 christos Exp $ */ /* * Copyright (c) 1997-2005 Erez Zadok @@ -306,7 +306,7 @@ fwd_packet(int type_id, char *pkt, int len, struct sockaddr_in *fwdto, struct so if (p && fwdto) dlog("Sending packet id %#x to %s:%d", p->rf_xid, - inet_dquad(dq, fwdto->sin_addr.s_addr), + inet_dquad(dq, sizeof(dq), fwdto->sin_addr.s_addr), ntohs(fwdto->sin_port)); } #endif /* DEBUG */ diff --git a/dist/am-utils/amq/amq.h b/dist/am-utils/amq/amq.h index 015e51310810..66623e52ab9b 100644 --- a/dist/am-utils/amq/amq.h +++ b/dist/am-utils/amq/amq.h @@ -1,4 +1,4 @@ -/* $NetBSD: amq.h,v 1.1.1.9 2005/09/20 17:15:01 rpaulo Exp $ */ +/* $NetBSD: amq.h,v 1.1.1.10 2006/02/05 16:13:44 christos Exp $ */ /* * Copyright (c) 1997-2005 Erez Zadok @@ -60,5 +60,6 @@ extern amq_mount_info_list *amqproc_getmntfs_1(voidp argp, CLIENT *rqstp); extern int *amqproc_mount_1(voidp argp, CLIENT *rqstp); extern amq_string *amqproc_getvers_1(voidp argp, CLIENT *rqstp); extern int *amqproc_getpid_1(voidp argp, CLIENT *rqstp); +extern amq_string *amqproc_pawd_1(amq_string *argp, CLIENT *rqstp); #endif /* not _AMQ_H */ diff --git a/dist/am-utils/amq/amq_clnt.c b/dist/am-utils/amq/amq_clnt.c index 4cda9e5c14c4..f01311af25e5 100644 --- a/dist/am-utils/amq/amq_clnt.c +++ b/dist/am-utils/amq/amq_clnt.c @@ -1,4 +1,4 @@ -/* $NetBSD: amq_clnt.c,v 1.1.1.9 2005/09/20 17:15:02 rpaulo Exp $ */ +/* $NetBSD: amq_clnt.c,v 1.1.1.10 2006/02/05 16:13:45 christos Exp $ */ /* * Copyright (c) 1997-2005 Erez Zadok @@ -77,7 +77,7 @@ amqproc_mnttree_1(amq_string *argp, CLIENT *clnt) memset((char *) &res, 0, sizeof(res)); if (clnt_call(clnt, AMQPROC_MNTTREE, (XDRPROC_T_TYPE) xdr_amq_string, (SVC_IN_ARG_TYPE) argp, - (XDRPROC_T_TYPE) xdr_amq_mount_tree_p, (SVC_IN_ARG_TYPE) & res, + (XDRPROC_T_TYPE) xdr_amq_mount_tree_p, (SVC_IN_ARG_TYPE) &res, TIMEOUT) != RPC_SUCCESS) { return (NULL); } @@ -110,7 +110,7 @@ amqproc_stats_1(voidp argp, CLIENT *clnt) if (clnt_call(clnt, AMQPROC_STATS, (XDRPROC_T_TYPE) xdr_void, argp, (XDRPROC_T_TYPE) xdr_amq_mount_stats, - (SVC_IN_ARG_TYPE) & res, + (SVC_IN_ARG_TYPE) &res, TIMEOUT) != RPC_SUCCESS) { return (NULL); } @@ -127,7 +127,7 @@ amqproc_export_1(voidp argp, CLIENT *clnt) if (clnt_call(clnt, AMQPROC_EXPORT, (XDRPROC_T_TYPE) xdr_void, argp, (XDRPROC_T_TYPE) xdr_amq_mount_tree_list, - (SVC_IN_ARG_TYPE) & res, TIMEOUT) != RPC_SUCCESS) { + (SVC_IN_ARG_TYPE) &res, TIMEOUT) != RPC_SUCCESS) { return (NULL); } return (&res); @@ -142,7 +142,7 @@ amqproc_setopt_1(amq_setopt *argp, CLIENT *clnt) memset((char *) &res, 0, sizeof(res)); if (clnt_call(clnt, AMQPROC_SETOPT, (XDRPROC_T_TYPE) xdr_amq_setopt, (SVC_IN_ARG_TYPE) argp, (XDRPROC_T_TYPE) xdr_int, - (SVC_IN_ARG_TYPE) & res, TIMEOUT) != RPC_SUCCESS) { + (SVC_IN_ARG_TYPE) &res, TIMEOUT) != RPC_SUCCESS) { return (NULL); } return (&res); @@ -157,7 +157,7 @@ amqproc_getmntfs_1(voidp argp, CLIENT *clnt) memset((char *) &res, 0, sizeof(res)); if (clnt_call(clnt, AMQPROC_GETMNTFS, (XDRPROC_T_TYPE) xdr_void, argp, (XDRPROC_T_TYPE) xdr_amq_mount_info_list, - (SVC_IN_ARG_TYPE) & res, TIMEOUT) != RPC_SUCCESS) { + (SVC_IN_ARG_TYPE) &res, TIMEOUT) != RPC_SUCCESS) { return (NULL); } return (&res); @@ -171,7 +171,7 @@ amqproc_mount_1(voidp argp, CLIENT *clnt) memset((char *) &res, 0, sizeof(res)); if (clnt_call(clnt, AMQPROC_MOUNT, (XDRPROC_T_TYPE) xdr_amq_string, argp, - (XDRPROC_T_TYPE) xdr_int, (SVC_IN_ARG_TYPE) & res, + (XDRPROC_T_TYPE) xdr_int, (SVC_IN_ARG_TYPE) &res, TIMEOUT) != RPC_SUCCESS) { return (NULL); } @@ -186,7 +186,7 @@ amqproc_getvers_1(voidp argp, CLIENT *clnt) memset((char *) &res, 0, sizeof(res)); if (clnt_call(clnt, AMQPROC_GETVERS, (XDRPROC_T_TYPE) xdr_void, argp, - (XDRPROC_T_TYPE) xdr_amq_string, (SVC_IN_ARG_TYPE) & res, + (XDRPROC_T_TYPE) xdr_amq_string, (SVC_IN_ARG_TYPE) &res, TIMEOUT) != RPC_SUCCESS) { return (NULL); } @@ -201,7 +201,23 @@ amqproc_getpid_1(voidp argp, CLIENT *clnt) memset((char *) &res, 0, sizeof(res)); if (clnt_call(clnt, AMQPROC_GETPID, (XDRPROC_T_TYPE) xdr_void, argp, - (XDRPROC_T_TYPE) xdr_int, (SVC_IN_ARG_TYPE) & res, + (XDRPROC_T_TYPE) xdr_int, (SVC_IN_ARG_TYPE) &res, + TIMEOUT) != RPC_SUCCESS) { + return (NULL); + } + return (&res); +} + + +amq_string * +amqproc_pawd_1(amq_string *argp, CLIENT *clnt) +{ + static amq_string res; + + memset((char *) &res, 0, sizeof(res)); + if (clnt_call(clnt, AMQPROC_PAWD, + (XDRPROC_T_TYPE) xdr_amq_string, (SVC_IN_ARG_TYPE) argp, + (XDRPROC_T_TYPE) xdr_amq_string, (SVC_IN_ARG_TYPE) &res, TIMEOUT) != RPC_SUCCESS) { return (NULL); } diff --git a/dist/am-utils/buildall b/dist/am-utils/buildall index a47a986fd5ab..50f3d64eb533 100755 --- a/dist/am-utils/buildall +++ b/dist/am-utils/buildall @@ -271,7 +271,7 @@ if test -d ./A.${host_alias} ; then else mkdir ./A.${host_alias} fi -echo "Configuring/building am-utils in directory ./A.${host_alias} ..." +echo "Configuring/building am-utils in directory ./A.${host_alias} ..." echo cd ./A.${host_alias} cd ./A.${host_alias} || exit 1 diff --git a/dist/am-utils/conf/autofs/autofs_linux.c b/dist/am-utils/conf/autofs/autofs_linux.c index 9b088cad2f5a..45938fd8a4e6 100644 --- a/dist/am-utils/conf/autofs/autofs_linux.c +++ b/dist/am-utils/conf/autofs/autofs_linux.c @@ -1,4 +1,4 @@ -/* $NetBSD: autofs_linux.c,v 1.1.1.5 2005/09/20 17:15:04 rpaulo Exp $ */ +/* $NetBSD: autofs_linux.c,v 1.1.1.6 2006/02/05 16:13:47 christos Exp $ */ /* * Copyright (c) 1999-2003 Ion Badulescu @@ -79,7 +79,8 @@ static int numfds = 0; static int bind_works = 1; -static void hash_init(void) +static void +hash_init(void) { int i; struct rlimit rlim; @@ -100,7 +101,8 @@ static void hash_init(void) } -static void hash_insert(int fd, am_node *mp) +static void +hash_insert(int fd, am_node *mp) { if (hash[fd] != 0) plog(XLOG_ERROR, "file descriptor %d already in the hash", fd); @@ -111,7 +113,8 @@ static void hash_insert(int fd, am_node *mp) } -static void hash_delete(int fd) +static void +hash_delete(int fd) { int i; @@ -639,7 +642,7 @@ autofs_mount_fs(am_node *mp, mntfs *mf) out: if (target2) - free(target2); + XFREE(target2); if (err) return errno; @@ -780,10 +783,10 @@ autofs_mount_failed(am_node *mp) void -autofs_get_opts(char *opts, autofs_fh_t *fh) +autofs_get_opts(char *opts, size_t l, autofs_fh_t *fh) { - sprintf(opts, "fd=%d,minproto=%d,maxproto=%d", - fh->kernelfd, AUTOFS_MIN_VERSION, AUTOFS_MAX_VERSION); + xsnprintf(opts, l, "fd=%d,minproto=%d,maxproto=%d", + fh->kernelfd, AUTOFS_MIN_VERSION, AUTOFS_MAX_VERSION); } diff --git a/dist/am-utils/conf/autofs/autofs_solaris_v1.c b/dist/am-utils/conf/autofs/autofs_solaris_v1.c index 4fbe151d3afc..cdb68e0ba538 100644 --- a/dist/am-utils/conf/autofs/autofs_solaris_v1.c +++ b/dist/am-utils/conf/autofs/autofs_solaris_v1.c @@ -1,4 +1,4 @@ -/* $NetBSD: autofs_solaris_v1.c,v 1.1.1.5 2005/09/20 17:15:06 rpaulo Exp $ */ +/* $NetBSD: autofs_solaris_v1.c,v 1.1.1.6 2006/02/05 16:13:48 christos Exp $ */ /* * Copyright (c) 1999-2003 Ion Badulescu @@ -98,6 +98,7 @@ static int autofs_unmount_1_req(struct umntrequest *ur, struct umntres *result, /* * AUTOFS XDR FUNCTIONS: */ + #ifndef HAVE_XDR_MNTREQUEST bool_t xdr_mntrequest(XDR *xdrs, mntrequest *objp) @@ -197,8 +198,8 @@ autofs_mount_1_req(struct mntrequest *m, m->name, m->map, m->opts, m->path); /* find the effective uid/gid from RPC request */ - sprintf(opt_uid, "%d", (int) cred->aup_uid); - sprintf(opt_gid, "%d", (int) cred->aup_gid); + xsnprintf(opt_uid, sizeof(uid_str), "%d", (int) cred->aup_uid); + xsnprintf(opt_gid, sizeof(gid_str), "%d", (int) cred->aup_gid); mp = find_ap(m->path); if (!mp) { @@ -385,10 +386,10 @@ autofs_get_fh(am_node *mp) * SET MOUNT ARGS */ if (uname(&utsname) < 0) { - strcpy(buf, "localhost.autofs"); + xstrlcpy(buf, "localhost.autofs", sizeof(buf)); } else { - strcpy(buf, utsname.nodename); - strcat(buf, ".autofs"); + xstrlcpy(buf, utsname.nodename, sizeof(buf)); + xstrlcat(buf, ".autofs", sizeof(buf)); } #ifdef HAVE_AUTOFS_ARGS_T_ADDR fh->addr.buf = strdup(buf); @@ -420,7 +421,7 @@ autofs_release_fh(am_node *mp) { autofs_fh_t *fh = mp->am_autofs_fh; #ifdef HAVE_AUTOFS_ARGS_T_ADDR - free(fh->addr.buf); + XFREE(fh->addr.buf); #endif /* HAVE_AUTOFS_ARGS_T_ADDR */ XFREE(fh); mp->am_autofs_fh = NULL; @@ -548,9 +549,9 @@ autofs_mount_fs(am_node *mp, mntfs *mf) } out: - free(space_hack); + XFREE(space_hack); if (target2) - free(target2); + XFREE(target2); if (err) return errno; @@ -588,7 +589,7 @@ autofs_umount_fs(am_node *mp, mntfs *mf) } out: - free(space_hack); + XFREE(space_hack); return err; } @@ -616,6 +617,7 @@ autofs_umount_succeeded(am_node *mp) return 0; } + int autofs_umount_failed(am_node *mp) { @@ -667,7 +669,7 @@ autofs_mount_succeeded(am_node *mp) mp->am_dev = stb.st_dev; mp->am_rdev = stb.st_rdev; } - free(space_hack); + XFREE(space_hack); /* don't expire the entries -- the kernel will do it for us */ mp->am_flags |= AMF_NOTIMEOUT; @@ -700,10 +702,10 @@ autofs_mount_failed(am_node *mp) void -autofs_get_opts(char *opts, autofs_fh_t *fh) +autofs_get_opts(char *opts, size_t l, autofs_fh_t *fh) { - sprintf(opts, "%sdirect", - fh->direct ? "" : "in"); + xsnprintf(opts, l, "%sdirect", + fh->direct ? "" : "in"); } @@ -720,5 +722,4 @@ void autofs_timeout_mp(am_node *mp) /* We don't want any timeouts on autofs nodes */ mp->am_autofs_ttl = NEVER; } - #endif /* HAVE_FS_AUTOFS */ diff --git a/dist/am-utils/conf/autofs/autofs_solaris_v1.h b/dist/am-utils/conf/autofs/autofs_solaris_v1.h index d63262730348..95e0dd40ab16 100644 --- a/dist/am-utils/conf/autofs/autofs_solaris_v1.h +++ b/dist/am-utils/conf/autofs/autofs_solaris_v1.h @@ -1,4 +1,4 @@ -/* $NetBSD: autofs_solaris_v1.h,v 1.1.1.4 2005/09/20 17:15:03 rpaulo Exp $ */ +/* $NetBSD: autofs_solaris_v1.h,v 1.1.1.5 2006/02/05 16:13:46 christos Exp $ */ /* * Copyright (c) 1999-2003 Ion Badulescu @@ -57,21 +57,13 @@ typedef autofs_args_t autofs_fh_t; #define NEED_AUTOFS_SPACE_HACK - -static inline char *autofs_strdup_space_hack(char *s) -{ - /* - * autofs hack: append a space to the directory name - * to stop the kernel->daemon recursion. - * - * Returns malloc'ed space which needs to be freed by the caller. - */ - extern void *malloc(size_t); - char *tmp = malloc(strlen(s) + 2); - strcpy(tmp, s); - strcat(tmp, " "); - return tmp; -} +/* + * autofs hack: append a space to the directory name + * to stop the kernel->daemon recursion. + * + * Returns malloc'ed space which needs to be freed by the caller. + */ +#define autofs_strdup_space_hack(s) str3cat(NULL, (s), " ", "") #define AUTOFS_AUTO_FS_FLAGS (FS_AMQINFO | FS_DIRECTORY | FS_AUTOFS | FS_ON_AUTOFS) #define AUTOFS_DIRECT_FS_FLAGS (FS_DIRECT | FS_NOTIMEOUT | FS_BACKGROUND | FS_AMQINFO | FS_DIRECTORY | FS_AUTOFS) diff --git a/dist/am-utils/conf/autofs/autofs_solaris_v2_v3.c b/dist/am-utils/conf/autofs/autofs_solaris_v2_v3.c index 5fe8fa73caf7..5348b127b57d 100644 --- a/dist/am-utils/conf/autofs/autofs_solaris_v2_v3.c +++ b/dist/am-utils/conf/autofs/autofs_solaris_v2_v3.c @@ -1,4 +1,4 @@ -/* $NetBSD: autofs_solaris_v2_v3.c,v 1.1.1.5 2005/09/20 17:15:06 rpaulo Exp $ */ +/* $NetBSD: autofs_solaris_v2_v3.c,v 1.1.1.6 2006/02/05 16:13:48 christos Exp $ */ /* * Copyright (c) 1999-2003 Ion Badulescu @@ -100,6 +100,7 @@ bool_t xdr_postmountres(XDR *xdrs, postmountres *objp); /* * AUTOFS XDR FUNCTIONS: */ + bool_t xdr_autofs_stat(XDR *xdrs, autofs_stat *objp) { @@ -108,6 +109,7 @@ xdr_autofs_stat(XDR *xdrs, autofs_stat *objp) return (TRUE); } + bool_t xdr_autofs_action(XDR *xdrs, autofs_action *objp) { @@ -116,6 +118,7 @@ xdr_autofs_action(XDR *xdrs, autofs_action *objp) return (TRUE); } + bool_t xdr_linka(XDR *xdrs, linka *objp) { @@ -126,6 +129,7 @@ xdr_linka(XDR *xdrs, linka *objp) return (TRUE); } + bool_t xdr_autofs_netbuf(XDR *xdrs, struct netbuf *objp) { @@ -138,6 +142,7 @@ xdr_autofs_netbuf(XDR *xdrs, struct netbuf *objp) return (dummy); } + bool_t xdr_autofs_args(XDR *xdrs, autofs_args *objp) { @@ -162,6 +167,7 @@ xdr_autofs_args(XDR *xdrs, autofs_args *objp) return (TRUE); } + bool_t xdr_mounta(XDR *xdrs, struct mounta *objp) { @@ -181,6 +187,7 @@ xdr_mounta(XDR *xdrs, struct mounta *objp) return (TRUE); } + bool_t xdr_action_list_entry(XDR *xdrs, action_list_entry *objp) { @@ -201,6 +208,7 @@ xdr_action_list_entry(XDR *xdrs, action_list_entry *objp) return (TRUE); } + bool_t xdr_action_list(XDR *xdrs, action_list *objp) { @@ -212,6 +220,7 @@ xdr_action_list(XDR *xdrs, action_list *objp) return (TRUE); } + bool_t xdr_umntrequest(XDR *xdrs, umntrequest *objp) { @@ -254,6 +263,7 @@ xdr_umntres(XDR *xdrs, umntres *objp) return (TRUE); } + /* * These exist only in the AutoFS V2 protocol. */ @@ -272,6 +282,7 @@ xdr_postumntreq(XDR *xdrs, postumntreq *objp) return (TRUE); } + bool_t xdr_postumntres(XDR *xdrs, postumntres *objp) { @@ -280,6 +291,7 @@ xdr_postumntres(XDR *xdrs, postumntres *objp) return (TRUE); } + bool_t xdr_postmountreq(XDR *xdrs, postmountreq *objp) { @@ -296,6 +308,7 @@ xdr_postmountreq(XDR *xdrs, postmountreq *objp) return (TRUE); } + bool_t xdr_postmountres(XDR *xdrs, postmountres *objp) { @@ -305,6 +318,7 @@ xdr_postmountres(XDR *xdrs, postmountres *objp) } #endif /* AUTOFS_POSTUNMOUNT */ + bool_t xdr_autofs_res(XDR *xdrs, autofs_res *objp) { @@ -313,6 +327,7 @@ xdr_autofs_res(XDR *xdrs, autofs_res *objp) return (TRUE); } + bool_t xdr_autofs_lookupargs(XDR *xdrs, autofs_lookupargs *objp) { @@ -355,6 +370,7 @@ xdr_mount_result_type(XDR *xdrs, mount_result_type *objp) return (TRUE); } + bool_t xdr_autofs_mountres(XDR *xdrs, autofs_mountres *objp) { @@ -369,6 +385,7 @@ xdr_autofs_mountres(XDR *xdrs, autofs_mountres *objp) return (TRUE); } + bool_t xdr_lookup_result_type(XDR *xdrs, lookup_result_type *objp) { @@ -385,6 +402,7 @@ xdr_lookup_result_type(XDR *xdrs, lookup_result_type *objp) return (TRUE); } + bool_t xdr_autofs_lookupres(XDR *xdrs, autofs_lookupres *objp) { @@ -397,6 +415,7 @@ xdr_autofs_lookupres(XDR *xdrs, autofs_lookupres *objp) return (TRUE); } + bool_t xdr_autofs_rddirargs(XDR *xdrs, autofs_rddirargs *objp) { @@ -490,8 +509,8 @@ autofs_lookup_2_req(autofs_lookupargs *m, m->path, m->isdirect); /* find the effective uid/gid from RPC request */ - sprintf(opt_uid, "%d", (int) cred->aup_uid); - sprintf(opt_gid, "%d", (int) cred->aup_gid); + xsnprintf(opt_uid, sizeof(uid_str), "%d", (int) cred->aup_uid); + xsnprintf(opt_gid, sizeof(gid_str), "%d", (int) cred->aup_gid); mp = find_ap(m->path); if (!mp) { @@ -558,8 +577,8 @@ autofs_mount_2_req(autofs_lookupargs *m, m->path, m->isdirect); /* find the effective uid/gid from RPC request */ - sprintf(opt_uid, "%d", (int) cred->aup_uid); - sprintf(opt_gid, "%d", (int) cred->aup_gid); + xsnprintf(opt_uid, sizeof(uid_str), "%d", (int) cred->aup_uid); + xsnprintf(opt_gid, sizeof(gid_str), "%d", (int) cred->aup_gid); mp = find_ap(m->path); if (!mp) { @@ -957,10 +976,10 @@ autofs_get_fh(am_node *mp) * SET MOUNT ARGS */ if (uname(&utsname) < 0) { - strcpy(buf, "localhost.autofs"); + xstrlcpy(buf, "localhost.autofs", sizeof(buf)); } else { - strcpy(buf, utsname.nodename); - strcat(buf, ".autofs"); + xstrlcpy(buf, utsname.nodename, sizeof(buf)); + xstrlcat(buf, ".autofs", sizeof(buf)); } #ifdef HAVE_AUTOFS_ARGS_T_ADDR fh->addr.buf = strdup(buf); @@ -997,7 +1016,7 @@ autofs_release_fh(am_node *mp) { autofs_fh_t *fh = mp->am_autofs_fh; #ifdef HAVE_AUTOFS_ARGS_T_ADDR - free(fh->addr.buf); + XFREE(fh->addr.buf); #endif /* HAVE_AUTOFS_ARGS_T_ADDR */ XFREE(fh); mp->am_autofs_fh = NULL; @@ -1115,7 +1134,7 @@ autofs_mount_fs(am_node *mp, mntfs *mf) out: if (target2) - free(target2); + XFREE(target2); if (err) return errno; @@ -1167,6 +1186,7 @@ autofs_umount_succeeded(am_node *mp) return 0; } + int autofs_umount_failed(am_node *mp) { @@ -1256,10 +1276,10 @@ autofs_mount_failed(am_node *mp) void -autofs_get_opts(char *opts, autofs_fh_t *fh) +autofs_get_opts(char *opts, size_t l, autofs_fh_t *fh) { - sprintf(opts, "%sdirect", - fh->direct ? "" : "in"); + xsnprintf(opts, l, "%sdirect", + fh->direct ? "" : "in"); } diff --git a/dist/am-utils/conf/mount/mount_linux.c b/dist/am-utils/conf/mount/mount_linux.c index 989fafbfa0e9..2ef3d56032b4 100644 --- a/dist/am-utils/conf/mount/mount_linux.c +++ b/dist/am-utils/conf/mount/mount_linux.c @@ -1,4 +1,4 @@ -/* $NetBSD: mount_linux.c,v 1.1.1.9 2005/09/20 17:15:09 rpaulo Exp $ */ +/* $NetBSD: mount_linux.c,v 1.1.1.10 2006/02/05 16:13:51 christos Exp $ */ /* * Copyright (c) 1997-2005 Erez Zadok @@ -145,6 +145,7 @@ parse_opts(char *type, const char *optstr, int *flags, char **xopts, int *noauto const struct opt_map *std_opts; const struct fs_opts *dev_opts; char *opt, *topts, *xoptstr; + size_t l; if (optstr == NULL) return NULL; @@ -152,8 +153,9 @@ parse_opts(char *type, const char *optstr, int *flags, char **xopts, int *noauto xoptstr = strdup(optstr); /* because strtok is destructive below */ *noauto = 0; - *xopts = (char *) xmalloc (strlen(optstr) + 2); - topts = (char *) xmalloc (strlen(optstr) + 2); + l = strlen(optstr) + 2; + *xopts = (char *) xmalloc(l); + topts = (char *) xmalloc(l); *topts = '\0'; **xopts = '\0'; @@ -166,8 +168,8 @@ parse_opts(char *type, const char *optstr, int *flags, char **xopts, int *noauto !NSTREQ(std_opts->opt, opt, strlen(std_opts->opt))) ++std_opts; if (!(*noauto = STREQ(opt, MNTTAB_OPT_NOAUTO)) || std_opts->opt) { - strcat(topts, opt); - strcat(topts, ","); + xstrlcat(topts, opt, l); + xstrlcat(topts, ",", l); if (std_opts->inv) *flags &= ~std_opts->mask; else @@ -213,8 +215,8 @@ do_opts: ++dev_opts; } if (dev_opts->opt && *xopts) { - strcat(*xopts, opt); - strcat(*xopts, ","); + xstrlcat(*xopts, opt, l); + xstrlcat(*xopts, ",", l); } } /* @@ -413,17 +415,19 @@ mount_linux_nonfs(MTYPE_TYPE type, mntent_t *mnt, int flags, caddr_t data) tmp_opts = parse_opts(type, mnt->mnt_opts, &flags, &extra_opts, &noauto); -#if defined(MOUNT_TYPE_LOFS) +#ifdef MOUNT_TYPE_LOFS if (STREQ(type, MOUNT_TYPE_LOFS)) { -# if defined(MNT2_GEN_OPT_BIND) - /* use bind mounts for lofs */ - flags |= MNT2_GEN_OPT_BIND; -# else /* not MNT2_GEN_OPT_BIND */ +# ifndef MNT2_GEN_OPT_BIND + size_t l; /* this is basically a hack to support fist lofs */ XFREE(extra_opts); - extra_opts = (char *) xmalloc(strlen(mnt->mnt_fsname) + sizeof("dir=") + 1); - sprintf(extra_opts, "dir=%s", mnt->mnt_fsname); -# endif /* not MNT2_GEN_OPT_BIND */ + l = strlen(mnt->mnt_fsname) + sizeof("dir=") + 1; + extra_opts = (char *) xmalloc(l); + xsnprintf(extra_opts, l, sizeof(extra_opts), "dir=%s", mnt->mnt_fsname); +# else /* MNT2_GEN_OPT_BIND */ + /* use bind mounts for lofs */ + flags |= MNT2_GEN_OPT_BIND; +# endif /* MNT2_GEN_OPT_BIND */ errorcode = do_mount_linux(type, mnt, flags, extra_opts); } else /* end of "if type is LOFS" */ #endif /* MOUNT_TYPE_LOFS */ @@ -440,16 +444,16 @@ mount_linux_nonfs(MTYPE_TYPE type, mntent_t *mnt, int flags, caddr_t data) S_ISREG(buf.st_mode)) { if ((loopdev = setup_loop_device(mnt->mnt_fsname)) != NULL) { char *str; - int len; + size_t l; plog(XLOG_INFO, "setup loop device %s over %s OK", loopdev, mnt->mnt_fsname); old_fsname = mnt->mnt_fsname; mnt->mnt_fsname = loopdev; /* XXX: hack, append loop=/dev/loopX to mnttab opts */ - len = strlen(mnt->mnt_opts) + 7 + strlen(loopdev); - str = (char *) xmalloc(len); + l = strlen(mnt->mnt_opts) + 7 + strlen(loopdev); + str = (char *) xmalloc(l); if (str) { - sprintf(str, "%s,loop=%s", mnt->mnt_opts, loopdev); + xsnprintf(str, l, "%s,loop=%s", mnt->mnt_opts, loopdev); XFREE(mnt->mnt_opts); mnt->mnt_opts = str; } @@ -757,7 +761,7 @@ find_unused_loop_device(void) #define LOOP_FMT_SIZE(a) (sizeof(a)/sizeof(a[0])) for (j = 0; j < (int) LOOP_FMT_SIZE(loop_formats); j++) { for(i = 0; i < 256; i++) { - sprintf(dev, loop_formats[j], i); + xsnprintf(dev, sizeof(dev), loop_formats[j], i); if (stat(dev, &statbuf) == 0 && S_ISBLK(statbuf.st_mode)) { somedev++; fd = open(dev, O_RDONLY); diff --git a/dist/am-utils/conf/mtab/mtab_file.c b/dist/am-utils/conf/mtab/mtab_file.c index 9e246ae1448a..c53575295df9 100644 --- a/dist/am-utils/conf/mtab/mtab_file.c +++ b/dist/am-utils/conf/mtab/mtab_file.c @@ -1,4 +1,4 @@ -/* $NetBSD: mtab_file.c,v 1.1.1.9 2005/09/20 17:15:10 rpaulo Exp $ */ +/* $NetBSD: mtab_file.c,v 1.1.1.10 2006/02/05 16:13:51 christos Exp $ */ /* * Copyright (c) 1997-2005 Erez Zadok @@ -256,7 +256,7 @@ rewrite_mtab(mntlist *mp, const char *mnttabname) char *cp; char mcp[128]; - strcpy(mcp, mnttabname); + xstrlcpy(mcp, mnttabname, sizeof(mcp)); cp = strrchr(mcp, '/'); if (cp) { memmove(tmpname, mcp, cp - mcp); @@ -266,7 +266,7 @@ rewrite_mtab(mntlist *mp, const char *mnttabname) tmpname[0] = '.'; tmpname[1] = '\0'; } - strcat(tmpname, "/mtabXXXXXX"); + xstrlcat(tmpname, "/mtabXXXXXX", sizeof(tmpname)); retries = 0; enfile1: #ifdef HAVE_MKSTEMP diff --git a/dist/am-utils/conf/mtab/mtab_linux.c b/dist/am-utils/conf/mtab/mtab_linux.c index 7b5595f62a31..00612d83cb28 100644 --- a/dist/am-utils/conf/mtab/mtab_linux.c +++ b/dist/am-utils/conf/mtab/mtab_linux.c @@ -1,4 +1,4 @@ -/* $NetBSD: mtab_linux.c,v 1.1.1.1 2005/09/20 17:15:11 rpaulo Exp $ */ +/* $NetBSD: mtab_linux.c,v 1.1.1.2 2006/02/05 16:13:53 christos Exp $ */ /* * Copyright (c) 1997-2005 Erez Zadok @@ -161,6 +161,7 @@ lock_mtab(void) { int tries = 100000, i; char *linktargetfile; + size_t l; /* * Redhat's original code set a signal handler called "handler()" for all @@ -177,8 +178,9 @@ lock_mtab(void) /* somewhat clumsy, but some ancient systems do not have snprintf() */ /* use 20 as upper bound for the length of %d output */ - linktargetfile = xmalloc(strlen(MOUNTLOCK_LINKTARGET) + 20); - sprintf(linktargetfile, MOUNTLOCK_LINKTARGET, getpid()); + l = strlen(MOUNTLOCK_LINKTARGET) + 20; + linktargetfile = xmalloc(l); + xsnprintf(linktargetfile, l, MOUNTLOCK_LINKTARGET, getpid()); i = open(linktargetfile, O_WRONLY|O_CREAT, 0); if (i < 0) { @@ -344,7 +346,7 @@ rewrite_mtab(mntlist *mp, const char *mnttabname) * Concoct a temporary name in the same directory as the target mount * table so that rename() will work. */ - strcpy(mcp, mnttabname); + xstrlcpy(mcp, mnttabname, sizeof(mcp)); cp = strrchr(mcp, '/'); if (cp) { memmove(tmpname, mcp, cp - mcp); @@ -354,7 +356,7 @@ rewrite_mtab(mntlist *mp, const char *mnttabname) tmpname[0] = '.'; tmpname[1] = '\0'; } - strcat(tmpname, "/mtabXXXXXX"); + xstrlcat(tmpname, "/mtabXXXXXX", sizeof(tmpname)); retries = 0; enfile1: #ifdef HAVE_MKSTEMP diff --git a/dist/am-utils/conf/mtab/mtab_mach3.c b/dist/am-utils/conf/mtab/mtab_mach3.c index 0b2a718dae1d..62368f3dea34 100644 --- a/dist/am-utils/conf/mtab/mtab_mach3.c +++ b/dist/am-utils/conf/mtab/mtab_mach3.c @@ -1,4 +1,4 @@ -/* $NetBSD: mtab_mach3.c,v 1.1.1.9 2005/09/20 17:15:11 rpaulo Exp $ */ +/* $NetBSD: mtab_mach3.c,v 1.1.1.10 2006/02/05 16:13:53 christos Exp $ */ /* * Copyright (c) 1997-2005 Erez Zadok @@ -312,15 +312,15 @@ rewrite_mtab(mntlist *mp, const char *mnttabname) FILE *mfp; int error = 0; /* - * Concoct a temporary name in the same - * directory as the target mount table - * so that rename() will work. + * Concoct a temporary name in the same directory as the target mount + * table so that rename() will work. */ char tmpname[64]; int retries; int tmpfd; char *cp; char *mcp = mnttabname; + cp = strrchr(mcp, '/'); if (cp) { memmove(tmpname, mcp, cp - mcp); @@ -330,7 +330,7 @@ rewrite_mtab(mntlist *mp, const char *mnttabname) tmpname[0] = '.'; tmpname[1] = '\0'; } - strcat(tmpname, "/mtabXXXXXX"); + xstrlcat(tmpname, "/mtabXXXXXX", sizeof(tmpname)); retries = 0; enfile1: #ifdef HAVE_MKSTEMP diff --git a/dist/am-utils/conf/mtab/mtab_osf.c b/dist/am-utils/conf/mtab/mtab_osf.c index c91927e7232e..711ed2c55ecd 100644 --- a/dist/am-utils/conf/mtab/mtab_osf.c +++ b/dist/am-utils/conf/mtab/mtab_osf.c @@ -1,4 +1,4 @@ -/* $NetBSD: mtab_osf.c,v 1.1.1.9 2005/09/20 17:15:11 rpaulo Exp $ */ +/* $NetBSD: mtab_osf.c,v 1.1.1.10 2006/02/05 16:13:53 christos Exp $ */ /* * Copyright (c) 1997-2005 Erez Zadok @@ -74,8 +74,8 @@ mnt_dup(struct statfs *mp) #endif /* HAVE_FS_NFS3 */ at = strchr(mp->f_mntfromname, '@'); if (at != '\0') { - strcpy(mntfrombuf, (at + 1)); - strcat(mntfrombuf, ":"); + xstrlcpy(mntfrombuf, (at + 1), sizeof(mntfrombuf)); + xstrlcat(mntfrombuf, ":", sizeof(mntfrombuf)); strncat(mntfrombuf, mp->f_mntfromname, (at - mp->f_mntfromname)); mntfromptr = mntfrombuf; } diff --git a/dist/am-utils/conf/mtab/mtab_svr4.c b/dist/am-utils/conf/mtab/mtab_svr4.c index 83198b20ffc0..e3bb0e218318 100644 --- a/dist/am-utils/conf/mtab/mtab_svr4.c +++ b/dist/am-utils/conf/mtab/mtab_svr4.c @@ -1,4 +1,4 @@ -/* $NetBSD: mtab_svr4.c,v 1.1.1.9 2005/09/20 17:15:12 rpaulo Exp $ */ +/* $NetBSD: mtab_svr4.c,v 1.1.1.10 2006/02/05 16:13:53 christos Exp $ */ /* * Copyright (c) 1997-2005 Erez Zadok @@ -183,7 +183,7 @@ update_mnttab_fields(const mntent_t *mnt) if (gettimeofday(&tv, NULL) < 0) timestr[0] = '\0'; else - sprintf(timestr, "%ld", tv.tv_sec); + xsnprintf(timestr, sizeof(timestr), "%ld", tv.tv_sec); mt.mnt_time = timestr; diff --git a/dist/am-utils/conf/nfs_prot/nfs_prot_netbsd1_4.h b/dist/am-utils/conf/nfs_prot/nfs_prot_netbsd1_4.h index 79c8d8337e61..70a3fc6dfb56 100644 --- a/dist/am-utils/conf/nfs_prot/nfs_prot_netbsd1_4.h +++ b/dist/am-utils/conf/nfs_prot/nfs_prot_netbsd1_4.h @@ -1,4 +1,4 @@ -/* $NetBSD: nfs_prot_netbsd1_4.h,v 1.1.1.9 2005/09/20 17:15:19 rpaulo Exp $ */ +/* $NetBSD: nfs_prot_netbsd1_4.h,v 1.1.1.10 2006/02/05 16:14:10 christos Exp $ */ /* * Copyright (c) 1997-2005 Erez Zadok @@ -81,6 +81,9 @@ typedef int (*ypall_callback_fxn_t)(u_long, char *, int, char *, int, void *); typedef int (*ypall_callback_fxn_t)(int, char *, int, char *, int, char *); #endif /* DEFINED_YPALL_CALLBACK_FXN_T */ +#ifdef HAVE_STATVFS +# define statfs statvfs +#endif /* HAVE_STATVFS */ /* * MACROS: diff --git a/dist/am-utils/conf/transp/transp_tli.c b/dist/am-utils/conf/transp/transp_tli.c index 480b951beecf..2075655ac360 100644 --- a/dist/am-utils/conf/transp/transp_tli.c +++ b/dist/am-utils/conf/transp/transp_tli.c @@ -1,4 +1,4 @@ -/* $NetBSD: transp_tli.c,v 1.1.1.9 2005/09/20 17:15:26 rpaulo Exp $ */ +/* $NetBSD: transp_tli.c,v 1.1.1.10 2006/02/05 16:14:14 christos Exp $ */ /* * Copyright (c) 1997-2005 Erez Zadok @@ -89,7 +89,7 @@ amu_get_myaddress(struct in_addr *iap, const char *preferred_localhost) char dq[20]; if (preferred_localhost) plog(XLOG_INFO, "localhost_address \"%s\" requested, using %s", - preferred_localhost, inet_dquad(dq, iap->s_addr)); + preferred_localhost, inet_dquad(dq, sizeof(dq), iap->s_addr)); iap->s_addr = sinp->sin_addr.s_addr; /* XXX: used to be htonl() */ } diff --git a/dist/am-utils/config.guess b/dist/am-utils/config.guess index 45bee1398730..d0d57f6945f8 100755 --- a/dist/am-utils/config.guess +++ b/dist/am-utils/config.guess @@ -3,7 +3,7 @@ # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. -timestamp='2005-04-22' +timestamp='2005-09-19' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -17,13 +17,15 @@ timestamp='2005-04-22' # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. + # Originally written by Per Bothner . # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. @@ -66,11 +68,11 @@ Try \`$me --help' for more information." while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) - echo "$timestamp" ; exit 0 ;; + echo "$timestamp" ; exit ;; --version | -v ) - echo "$version" ; exit 0 ;; + echo "$version" ; exit ;; --help | --h* | -h ) - echo "$usage"; exit 0 ;; + echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. @@ -123,7 +125,7 @@ case $CC_FOR_BUILD,$HOST_CC,$CC in ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ;' +esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) @@ -196,55 +198,20 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" - exit 0 ;; - amd64:OpenBSD:*:*) - echo x86_64-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - amiga:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - cats:OpenBSD:*:*) - echo arm-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - hp300:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - luna88k:OpenBSD:*:*) - echo m88k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mac68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - macppc:OpenBSD:*:*) - echo powerpc-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme88k:OpenBSD:*:*) - echo m88k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvmeppc:OpenBSD:*:*) - echo powerpc-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - sgi:OpenBSD:*:*) - echo mips64-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - sun3:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; + exit ;; *:OpenBSD:*:*) - echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} - exit 0 ;; + exit ;; macppc:MirBSD:*:*) echo powerppc-unknown-mirbsd${UNAME_RELEASE} - exit 0 ;; + exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} - exit 0 ;; + exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) @@ -297,40 +264,43 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit 0 ;; + exit ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix - exit 0 ;; + exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 - exit 0 ;; + exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 - exit 0;; + exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos - exit 0 ;; + exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos - exit 0 ;; + exit ;; *:OS/390:*:*) echo i370-ibm-openedition - exit 0 ;; + exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe - exit 0 ;; + exit ;; *:OS400:*:*) echo powerpc-ibm-os400 - exit 0 ;; + exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} - exit 0;; + exit ;; + arm:riscos:*:*|arm:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp - exit 0;; + exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then @@ -338,32 +308,32 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in else echo pyramid-pyramid-bsd fi - exit 0 ;; + exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 - exit 0 ;; + exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 - exit 0 ;; + exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7 && exit 0 ;; + sparc) echo sparc-icl-nx7; exit ;; esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; + exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; + exit ;; i86pc:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; + exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; + exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) @@ -372,10 +342,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit 0 ;; + exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} - exit 0 ;; + exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 @@ -387,10 +357,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in echo sparc-sun-sunos${UNAME_RELEASE} ;; esac - exit 0 ;; + exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} - exit 0 ;; + exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor @@ -401,40 +371,40 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} - exit 0 ;; + exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} - exit 0 ;; + exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 - exit 0 ;; + exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} - exit 0 ;; + exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} - exit 0 ;; + exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} - exit 0 ;; + exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c @@ -458,32 +428,33 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in exit (-1); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c \ - && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ - && exit 0 + $CC_FOR_BUILD -o $dummy $dummy.c && + dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`$dummy $dummyarg` && + { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} - exit 0 ;; + exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax - exit 0 ;; + exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax - exit 0 ;; + exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax - exit 0 ;; + exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix - exit 0 ;; + exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 - exit 0 ;; + exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 - exit 0 ;; + exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 - exit 0 ;; + exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` @@ -499,29 +470,29 @@ EOF else echo i586-dg-dgux${UNAME_RELEASE} fi - exit 0 ;; + exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 - exit 0 ;; + exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 - exit 0 ;; + exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 - exit 0 ;; + exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd - exit 0 ;; + exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit 0 ;; + exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix - exit 0 ;; + exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` @@ -529,7 +500,7 @@ EOF IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit 0 ;; + exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build @@ -544,14 +515,18 @@ EOF exit(0); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 - echo rs6000-ibm-aix3.2.5 + if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + then + echo "$SYSTEM_NAME" + else + echo rs6000-ibm-aix3.2.5 + fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi - exit 0 ;; + exit ;; *:AIX:*:[45]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then @@ -565,28 +540,28 @@ EOF IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit 0 ;; + exit ;; *:AIX:*:*) echo rs6000-ibm-aix - exit 0 ;; + exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 - exit 0 ;; + exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit 0 ;; # report: romp-ibm BSD 4.3 + exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx - exit 0 ;; + exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 - exit 0 ;; + exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd - exit 0 ;; + exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 - exit 0 ;; + exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in @@ -648,9 +623,19 @@ EOF esac if [ ${HP_ARCH} = "hppa2.0w" ] then - # avoid double evaluation of $set_cc_for_build - test -n "$CC_FOR_BUILD" || eval $set_cc_for_build - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null + eval $set_cc_for_build + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + grep __LP64__ >/dev/null then HP_ARCH="hppa2.0w" else @@ -658,11 +643,11 @@ EOF fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit 0 ;; + exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} - exit 0 ;; + exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c @@ -690,161 +675,166 @@ EOF exit (0); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 + $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 - exit 0 ;; + exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd - exit 0 ;; + exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd - exit 0 ;; + exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix - exit 0 ;; + exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf - exit 0 ;; + exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf - exit 0 ;; + exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi - exit 0 ;; + exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites - exit 0 ;; + exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd - exit 0 ;; + exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi - exit 0 ;; + exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd - exit 0 ;; + exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd - exit 0 ;; + exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd - exit 0 ;; + exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit 0 ;; + exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit 0 ;; + exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit 0 ;; + exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} - exit 0 ;; + exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit 0 ;; + exit ;; *:FreeBSD:*:*) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit 0 ;; + exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin - exit 0 ;; + exit ;; i*:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 - exit 0 ;; + exit ;; + i*:windows32*:*) + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 + exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 - exit 0 ;; + exit ;; x86:Interix*:[34]*) echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' - exit 0 ;; + exit ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks - exit 0 ;; + exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix - exit 0 ;; + exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin - exit 0 ;; - amd64:CYGWIN*:*:*) + exit ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin - exit 0 ;; + exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin - exit 0 ;; + exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; + exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit 0 ;; + exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu - exit 0 ;; + exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix - exit 0 ;; + exit ;; arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu - exit 0 ;; + exit ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu - exit 0 ;; + exit ;; frv:Linux:*:*) echo frv-unknown-linux-gnu - exit 0 ;; + exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + exit ;; mips:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c @@ -862,7 +852,7 @@ EOF #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` - test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; mips64:Linux:*:*) eval $set_cc_for_build @@ -881,14 +871,17 @@ EOF #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` - test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; + or32:Linux:*:*) + echo or32-unknown-linux-gnu + exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu - exit 0 ;; + exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu - exit 0 ;; + exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; @@ -902,7 +895,7 @@ EOF objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit 0 ;; + exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in @@ -910,25 +903,25 @@ EOF PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac - exit 0 ;; + exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu - exit 0 ;; + exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux - exit 0 ;; + exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu - exit 0 ;; + exit ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent @@ -946,15 +939,15 @@ EOF ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" - exit 0 ;; + exit ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" - exit 0 ;; + exit ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. echo "${UNAME_MACHINE}-pc-linux-gnuoldld" - exit 0 ;; + exit ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build @@ -982,15 +975,18 @@ EOF #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` - test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 - test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 + test x"${LIBC}" != x && { + echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + exit + } + test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 - exit 0 ;; + exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... @@ -998,27 +994,27 @@ EOF # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit 0 ;; + exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx - exit 0 ;; + exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop - exit 0 ;; + exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos - exit 0 ;; - i*86:syllable:*:*) + exit ;; + i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable - exit 0 ;; + exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; + exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit 0 ;; + exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then @@ -1026,15 +1022,16 @@ EOF else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi - exit 0 ;; - i*86:*:5:[78]*) + exit ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - exit 0 ;; + exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi - exit 0 ;; + exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv - exit 0 ;; + exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv - exit 0 ;; + exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix - exit 0 ;; + exit ;; M68*:*:R3V[5678]*:*) - test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && echo i486-ncr-sysv4.3${OS_REL} && exit 0 + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && echo i486-ncr-sysv4 && exit 0 ;; + && { echo i486-ncr-sysv4; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; + exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 - exit 0 ;; + exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; + exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; + exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; + exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} - exit 0 ;; + exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 - exit 0 ;; + exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 - exit 0 ;; + exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` @@ -1126,73 +1123,72 @@ EOF else echo ns32k-sni-sysv fi - exit 0 ;; + exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 - exit 0 ;; + exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 - exit 0 ;; + exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 - exit 0 ;; + exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos - exit 0 ;; + exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos - exit 0 ;; + exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} - exit 0 ;; + exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 - exit 0 ;; + exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi - exit 0 ;; + exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos - exit 0 ;; + exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos - exit 0 ;; + exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos - exit 0 ;; + exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} - exit 0 ;; + exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} - exit 0 ;; + exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} - exit 0 ;; + exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit 0 ;; + exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit 0 ;; + exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in - *86) UNAME_PROCESSOR=i686 ;; unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} - exit 0 ;; + exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then @@ -1200,25 +1196,25 @@ EOF UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} - exit 0 ;; + exit ;; *:QNX:*:4*) echo i386-pc-qnx - exit 0 ;; + exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} - exit 0 ;; + exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} - exit 0 ;; + exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux - exit 0 ;; + exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv - exit 0 ;; + exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit 0 ;; + exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 @@ -1229,41 +1225,44 @@ EOF UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 - exit 0 ;; + exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 - exit 0 ;; + exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex - exit 0 ;; + exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 - exit 0 ;; + exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 - exit 0 ;; + exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 - exit 0 ;; + exit ;; *:ITS:*:*) echo pdp10-unknown-its - exit 0 ;; + exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} - exit 0 ;; + exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit 0 ;; + exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in - A*) echo alpha-dec-vms && exit 0 ;; - I*) echo ia64-dec-vms && exit 0 ;; - V*) echo vax-dec-vms && exit 0 ;; + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix - exit 0 ;; + exit ;; + i*86:skyos:*:*) + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 @@ -1295,7 +1294,7 @@ main () #endif #if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix"); exit (0); + printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) @@ -1384,11 +1383,12 @@ main () } EOF -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) @@ -1397,22 +1397,22 @@ then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd - exit 0 ;; + exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi - exit 0 ;; + exit ;; c34*) echo c34-convex-bsd - exit 0 ;; + exit ;; c38*) echo c38-convex-bsd - exit 0 ;; + exit ;; c4*) echo c4-convex-bsd - exit 0 ;; + exit ;; esac fi diff --git a/dist/am-utils/config.guess.long b/dist/am-utils/config.guess.long index 481cd340d7b4..e6468df9cc31 100755 --- a/dist/am-utils/config.guess.long +++ b/dist/am-utils/config.guess.long @@ -62,8 +62,12 @@ case "${GCONFIG}" in else echo ${GCONFIG} fi - ;; - * ) echo ${GCONFIG} - ;; + ;; + *netbsdelf3* ) # remove trailing '.' from beta + echo ${GCONFIG} | sed 's/\.$//g' + ;; + * ) + echo ${GCONFIG} + ;; esac exit 0 diff --git a/dist/am-utils/config.h.in b/dist/am-utils/config.h.in index ab6b4e411c7f..5f61468f0dcd 100644 --- a/dist/am-utils/config.h.in +++ b/dist/am-utils/config.h.in @@ -105,6 +105,9 @@ /* Define to 1 if you have the `bzero' function. */ #undef HAVE_BZERO +/* System supports C99-style variable-length argument macros */ +#undef HAVE_C99_VARARGS_MACROS + /* Define to 1 if `flags' is member of `cdfs_args_t'. */ #undef HAVE_CDFS_ARGS_T_FLAGS @@ -196,6 +199,9 @@ /* does extern definition for getdomainname() exist? */ #undef HAVE_EXTERN_GETDOMAINNAME +/* does extern definition for getdtablesize() exist? */ +#undef HAVE_EXTERN_GETDTABLESIZE + /* does extern definition for gethostname() exist? */ #undef HAVE_EXTERN_GETHOSTNAME @@ -208,6 +214,9 @@ /* does extern definition for gettablesize() exist? */ #undef HAVE_EXTERN_GETTABLESIZE +/* does extern definition for getwd() exist? */ +#undef HAVE_EXTERN_GETWD + /* does extern definition for get_myaddress() exist? */ #undef HAVE_EXTERN_GET_MYADDRESS @@ -259,6 +268,9 @@ /* does extern definition for sys_errlist[] exist? */ #undef HAVE_EXTERN_SYS_ERRLIST +/* does extern definition for ualarm() exist? */ +#undef HAVE_EXTERN_UALARM + /* does extern definition for usleep() exist? */ #undef HAVE_EXTERN_USLEEP @@ -310,6 +322,9 @@ /* Define if have EFS filesystem (irix) */ #undef HAVE_FS_EFS +/* Define if have FFS filesystem */ +#undef HAVE_FS_FFS + /* Define if have HSFS filesystem */ #undef HAVE_FS_HSFS @@ -352,6 +367,9 @@ /* Define if have XFS filesystem (irix) */ #undef HAVE_FS_XFS +/* System supports GCC-style variable-length argument macros */ +#undef HAVE_GCC_VARARGS_MACROS + /* Define to 1 if you have the header file. */ #undef HAVE_GDBM_NDBM_H @@ -857,6 +875,12 @@ /* Define to 1 if you have the header file. */ #undef HAVE_STATBUF_H +/* Define to 1 if you have the `statfs' function. */ +#undef HAVE_STATFS + +/* Define to 1 if you have the `statvfs' function. */ +#undef HAVE_STATVFS + /* Define to 1 if you have the header file. */ #undef HAVE_STDARG_H @@ -1007,6 +1031,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_FS_XFS_CLNT_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_IMMU_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_IOCTL_H @@ -1067,6 +1094,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STATFS_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STATVFS_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H @@ -1841,6 +1871,9 @@ /* Mount-table entry name for EFS filesystem (irix) */ #undef MNTTAB_TYPE_EFS +/* Mount-table entry name for FFS filesystem */ +#undef MNTTAB_TYPE_FFS + /* Mount-table entry name for LOFS filesystem */ #undef MNTTAB_TYPE_LOFS @@ -1895,6 +1928,9 @@ /* Mount(2) type/name for EFS filesystem (irix) */ #undef MOUNT_TYPE_EFS +/* Mount(2) type/name for FFS filesystem */ +#undef MOUNT_TYPE_FFS + /* Mount(2) type/name for IGNORE filesystem (not real just ignore for df) */ #undef MOUNT_TYPE_IGNORE @@ -2080,6 +2116,9 @@ /* Define to `int' if does not define. */ #undef pid_t +/* Check if pte_t is defined in */ +#undef pte_t + /* Define a type for the rfs_args structure */ #undef rfs_args_t diff --git a/dist/am-utils/config.sub b/dist/am-utils/config.sub index 87a1ee49e67b..1c366dfde9ab 100755 --- a/dist/am-utils/config.sub +++ b/dist/am-utils/config.sub @@ -3,7 +3,7 @@ # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. -timestamp='2005-04-22' +timestamp='2005-07-08' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -21,14 +21,15 @@ timestamp='2005-04-22' # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, -# Boston, MA 02111-1307, USA. - +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, USA. +# # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. + # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # @@ -83,11 +84,11 @@ Try \`$me --help' for more information." while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) - echo "$timestamp" ; exit 0 ;; + echo "$timestamp" ; exit ;; --version | -v ) - echo "$version" ; exit 0 ;; + echo "$version" ; exit ;; --help | --h* | -h ) - echo "$usage"; exit 0 ;; + echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. @@ -99,7 +100,7 @@ while test $# -gt 0 ; do *local*) # First pass through any local machine types. echo $1 - exit 0;; + exit ;; * ) break ;; @@ -247,6 +248,7 @@ case $basic_machine in | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ @@ -255,13 +257,14 @@ case $basic_machine in | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ + | ms1 \ | msp430 \ | ns16k | ns32k \ - | openrisc | or32 \ + | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ - | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ + | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b \ @@ -273,6 +276,9 @@ case $basic_machine in | z8k) basic_machine=$basic_machine-unknown ;; + m32c) + basic_machine=$basic_machine-unknown + ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown @@ -321,6 +327,7 @@ case $basic_machine in | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ + | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ @@ -329,6 +336,7 @@ case $basic_machine in | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ + | ms1-* \ | msp430-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ @@ -336,7 +344,7 @@ case $basic_machine in | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ - | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \ | sparclite-* \ @@ -351,6 +359,8 @@ case $basic_machine in | ymp-* \ | z8k-*) ;; + m32c-*) + ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) @@ -761,9 +771,8 @@ case $basic_machine in basic_machine=hppa1.1-oki os=-proelf ;; - or32 | or32-*) + openrisc | openrisc-*) basic_machine=or32-unknown - os=-coff ;; os400) basic_machine=powerpc-ibm @@ -1089,12 +1098,9 @@ case $basic_machine in we32k) basic_machine=we32k-att ;; - sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) + sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; - sh64) - basic_machine=sh64-unknown - ;; sparc | sparcv8 | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; @@ -1181,7 +1187,8 @@ case $os in | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*) + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ + | -skyos* | -haiku*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1199,7 +1206,7 @@ case $os in os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) @@ -1388,6 +1395,9 @@ case $basic_machine in *-be) os=-beos ;; + *-haiku) + os=-haiku + ;; *-ibm) os=-aix ;; @@ -1559,7 +1569,7 @@ case $basic_machine in esac echo $basic_machine$os -exit 0 +exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) diff --git a/dist/am-utils/configure b/dist/am-utils/configure index c03eb3d85535..c66a934e25fd 100755 --- a/dist/am-utils/configure +++ b/dist/am-utils/configure @@ -1,7 +1,7 @@ #! /bin/sh -# From configure.in Revision: 1.107.2.4 . +# From configure.in Revision: 1.107.2.9 . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59 for am-utils 6.1.2.1. +# Generated by GNU Autoconf 2.59 for am-utils 6.1.3. # # Report bugs to . # @@ -290,8 +290,8 @@ if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if (echo_test_string="`eval $cmd`") 2>/dev/null && - echo_test_string="`eval $cmd`" && + if (echo_test_string=`eval $cmd`) 2>/dev/null && + echo_test_string=`eval $cmd` && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break @@ -426,8 +426,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='am-utils' PACKAGE_TARNAME='am-utils' -PACKAGE_VERSION='6.1.2.1' -PACKAGE_STRING='am-utils 6.1.2.1' +PACKAGE_VERSION='6.1.3' +PACKAGE_STRING='am-utils 6.1.3' PACKAGE_BUGREPORT='https://bugzilla.am-utils.org/ or am-utils@am-utils.org' ac_unique_file="amd/amd.c" @@ -957,7 +957,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures am-utils 6.1.2.1 to adapt to many kinds of systems. +\`configure' configures am-utils 6.1.3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1023,7 +1023,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of am-utils 6.1.2.1:";; + short | recursive ) echo "Configuration of am-utils 6.1.3:";; esac cat <<\_ACEOF @@ -1172,7 +1172,7 @@ fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -am-utils configure 6.1.2.1 +am-utils configure 6.1.3 generated by GNU Autoconf 2.59 Copyright (C) 2003 Free Software Foundation, Inc. @@ -1188,7 +1188,7 @@ cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by am-utils $as_me 6.1.2.1, which was +It was created by am-utils $as_me 6.1.3, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ @@ -4722,7 +4722,7 @@ else if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some GNU ld's only accept -v. + # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &6 if test "${lt_cv_prog_gnu_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - # I'd rather use --version here, but apparently some GNU ld's only accept -v. + # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 (exit $ac_status); }; then - case "`/usr/bin/file conftest.o`" in + case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*linux*) @@ -6612,7 +6612,7 @@ else elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else - lt_cv_sys_max_cmd_len=65536 # usable default for *BSD + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` @@ -6927,7 +6927,7 @@ rm="rm -f" default_ofile=libtool can_build_shared=yes -# All known linkers require a `.a' archive for static linking (except M$VC, +# All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" @@ -7248,7 +7248,7 @@ else if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) - file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then @@ -7310,7 +7310,7 @@ else if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) - file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then @@ -7459,7 +7459,7 @@ else LDFLAGS="$LDFLAGS $lt_prog_compiler_static" printf "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The compiler can only warn and ignore the option if not recognized + # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. @@ -7514,7 +7514,7 @@ else # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:7520: $lt_compile\"" >&5) @@ -7604,7 +7604,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) # +Z the default ;; @@ -7651,7 +7651,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) # +Z the default ;; @@ -7681,12 +7681,12 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; - pgcc* | pgf77* | pgf90*) + pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-static' + lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' @@ -7776,7 +7776,7 @@ else # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:7782: $lt_compile\"" >&5) @@ -7810,7 +7810,7 @@ else fi fi -case "$host_os" in +case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= @@ -7838,7 +7838,7 @@ else # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:7844: $lt_compile\"" >&5) @@ -7856,7 +7856,7 @@ else lt_cv_prog_compiler_c_o=yes fi fi - chmod u+w . + chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation @@ -8056,11 +8056,11 @@ EOF tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler - whole_archive_flag_spec='${wl}--whole-archive,`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; - pgf77* | pgf90* ) # Portland Group f77 and f90 compilers - whole_archive_flag_spec='${wl}--whole-archive,`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; @@ -8368,7 +8368,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec=' ' archive_cmds_need_lc=yes - # This is similar to how AIX traditionally builds it's shared libraries. + # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi @@ -8408,7 +8408,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; darwin* | rhapsody*) - case "$host_os" in + case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag='${wl}-undefined ${wl}suppress' ;; @@ -8437,7 +8437,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi output_verbose_link_cmd='echo' archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else @@ -8446,7 +8446,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi output_verbose_link_cmd='echo' archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; @@ -8512,7 +8512,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hpux10* | hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; @@ -8521,7 +8521,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; esac else - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' ;; @@ -8531,7 +8531,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi esac fi if test "$with_gnu_ld" = no; then - case "$host_cpu" in + case $host_cpu in hppa*64*) hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_flag_spec_ld='+b $libdir' @@ -8990,7 +8990,8 @@ cygwin* | mingw* | pw32*) dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' @@ -9043,7 +9044,7 @@ darwin* | rhapsody*) soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` @@ -9081,7 +9082,14 @@ kfreebsd*-gnu) freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. - objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) @@ -9126,7 +9134,7 @@ hpux9* | hpux10* | hpux11*) version_type=sunos need_lib_prefix=no need_version=no - case "$host_cpu" in + case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes @@ -10081,7 +10089,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) 2>/dev/null + (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; @@ -10179,7 +10187,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) 2>/dev/null + (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; @@ -10295,7 +10303,7 @@ test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. -case "$host_os" in +case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then @@ -10898,7 +10906,7 @@ postdeps_CXX= compiler_lib_search_path_CXX= # Source file extension for C++ test sources. -ac_ext=cc +ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o @@ -11034,7 +11042,7 @@ else if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some GNU ld's only accept -v. + # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &6 if test "${lt_cv_prog_gnu_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - # I'd rather use --version here, but apparently some GNU ld's only accept -v. + # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 # The `*' in the case matches for architectures that use `case' in # $output_verbose_cmd can trigger glob expansion during the loop # eval without this substitution. - output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`" + output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` for p in `eval $output_verbose_link_cmd`; do case $p in @@ -12129,6 +12130,20 @@ fi $rm -f confest.$objext +# PORTME: override above test on systems where it is broken +case $host_os in +solaris*) + case $cc_basename in + CC*) + # Adding this requires a known-good setup of shared libraries for + # Sun compiler versions before 5.6, else PIC objects from an old + # archive will be linked into the output, leading to subtle bugs. + postdeps_CXX='-lCstd -lCrun' + ;; + esac +esac + + case " $postdeps_CXX " in *" -lc "*) archive_cmds_need_lc_CXX=no ;; esac @@ -12184,7 +12199,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) ;; *) @@ -12253,7 +12268,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 aCC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) # +Z the default ;; @@ -12294,7 +12309,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 # Portland Group C++ compiler. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fpic' - lt_prog_compiler_static_CXX='-static' + lt_prog_compiler_static_CXX='-Bstatic' ;; cxx*) # Compaq C++ @@ -12428,14 +12443,14 @@ else # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:12434: $lt_compile\"" >&5) + (eval echo "\"\$as_me:12449: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:12438: \$? = $ac_status" >&5 + echo "$as_me:12453: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -12462,7 +12477,7 @@ else fi fi -case "$host_os" in +case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_CXX= @@ -12490,14 +12505,14 @@ else # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:12496: $lt_compile\"" >&5) + (eval echo "\"\$as_me:12511: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:12500: \$? = $ac_status" >&5 + echo "$as_me:12515: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -12508,7 +12523,7 @@ else lt_cv_prog_compiler_c_o_CXX=yes fi fi - chmod u+w . + chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation @@ -12771,7 +12786,8 @@ cygwin* | mingw* | pw32*) dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' @@ -12824,7 +12840,7 @@ darwin* | rhapsody*) soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` @@ -12862,7 +12878,14 @@ kfreebsd*-gnu) freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. - objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) @@ -12907,7 +12930,7 @@ hpux9* | hpux10* | hpux11*) version_type=sunos need_lib_prefix=no need_version=no - case "$host_cpu" in + case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes @@ -13862,7 +13885,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) 2>/dev/null + (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; @@ -13960,7 +13983,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) 2>/dev/null + (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; @@ -14582,7 +14605,7 @@ test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. -case "$host_os" in +case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then @@ -14670,7 +14693,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) # +Z the default ;; @@ -14717,7 +14740,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 lt_prog_compiler_wl_F77='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) # +Z the default ;; @@ -14747,12 +14770,12 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-static' ;; - pgcc* | pgf77* | pgf90*) + pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-fpic' - lt_prog_compiler_static_F77='-static' + lt_prog_compiler_static_F77='-Bstatic' ;; ccc*) lt_prog_compiler_wl_F77='-Wl,' @@ -14842,14 +14865,14 @@ else # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14848: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14871: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:14852: \$? = $ac_status" >&5 + echo "$as_me:14875: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -14876,7 +14899,7 @@ else fi fi -case "$host_os" in +case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_F77= @@ -14904,14 +14927,14 @@ else # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14910: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14933: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:14914: \$? = $ac_status" >&5 + echo "$as_me:14937: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -14922,7 +14945,7 @@ else lt_cv_prog_compiler_c_o_F77=yes fi fi - chmod u+w . + chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation @@ -15122,11 +15145,11 @@ EOF tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler - whole_archive_flag_spec_F77='${wl}--whole-archive,`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; - pgf77* | pgf90* ) # Portland Group f77 and f90 compilers - whole_archive_flag_spec_F77='${wl}--whole-archive,`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; @@ -15414,7 +15437,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_F77=' ' archive_cmds_need_lc_F77=yes - # This is similar to how AIX traditionally builds it's shared libraries. + # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi @@ -15454,7 +15477,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; darwin* | rhapsody*) - case "$host_os" in + case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag_F77='${wl}-undefined ${wl}suppress' ;; @@ -15483,7 +15506,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi output_verbose_link_cmd='echo' archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else @@ -15492,7 +15515,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi output_verbose_link_cmd='echo' archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; @@ -15558,7 +15581,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hpux10* | hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; @@ -15567,7 +15590,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; esac else - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) archive_cmds_F77='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' ;; @@ -15577,7 +15600,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi esac fi if test "$with_gnu_ld" = no; then - case "$host_cpu" in + case $host_cpu in hppa*64*) hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_flag_spec_ld_F77='+b $libdir' @@ -16036,7 +16059,8 @@ cygwin* | mingw* | pw32*) dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' @@ -16089,7 +16113,7 @@ darwin* | rhapsody*) soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` @@ -16127,7 +16151,14 @@ kfreebsd*-gnu) freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. - objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) @@ -16172,7 +16203,7 @@ hpux9* | hpux10* | hpux11*) version_type=sunos need_lib_prefix=no need_version=no - case "$host_cpu" in + case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes @@ -17030,14 +17061,14 @@ else # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:17036: $lt_compile\"" >&5) + (eval echo "\"\$as_me:17067: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:17040: \$? = $ac_status" >&5 + echo "$as_me:17071: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -17120,7 +17151,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) # +Z the default ;; @@ -17167,7 +17198,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 lt_prog_compiler_wl_GCJ='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) # +Z the default ;; @@ -17197,12 +17228,12 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-static' ;; - pgcc* | pgf77* | pgf90*) + pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-fpic' - lt_prog_compiler_static_GCJ='-static' + lt_prog_compiler_static_GCJ='-Bstatic' ;; ccc*) lt_prog_compiler_wl_GCJ='-Wl,' @@ -17292,14 +17323,14 @@ else # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:17298: $lt_compile\"" >&5) + (eval echo "\"\$as_me:17329: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:17302: \$? = $ac_status" >&5 + echo "$as_me:17333: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -17326,7 +17357,7 @@ else fi fi -case "$host_os" in +case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_GCJ= @@ -17354,14 +17385,14 @@ else # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:17360: $lt_compile\"" >&5) + (eval echo "\"\$as_me:17391: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:17364: \$? = $ac_status" >&5 + echo "$as_me:17395: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -17372,7 +17403,7 @@ else lt_cv_prog_compiler_c_o_GCJ=yes fi fi - chmod u+w . + chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation @@ -17572,11 +17603,11 @@ EOF tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler - whole_archive_flag_spec_GCJ='${wl}--whole-archive,`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; - pgf77* | pgf90* ) # Portland Group f77 and f90 compilers - whole_archive_flag_spec_GCJ='${wl}--whole-archive,`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; @@ -17884,7 +17915,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_GCJ=' ' archive_cmds_need_lc_GCJ=yes - # This is similar to how AIX traditionally builds it's shared libraries. + # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi @@ -17924,7 +17955,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; darwin* | rhapsody*) - case "$host_os" in + case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress' ;; @@ -17953,7 +17984,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi output_verbose_link_cmd='echo' archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else @@ -17962,7 +17993,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi output_verbose_link_cmd='echo' archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; @@ -18028,7 +18059,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hpux10* | hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; @@ -18037,7 +18068,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; esac else - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) archive_cmds_GCJ='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' ;; @@ -18047,7 +18078,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi esac fi if test "$with_gnu_ld" = no; then - case "$host_cpu" in + case $host_cpu in hppa*64*) hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_flag_spec_ld_GCJ='+b $libdir' @@ -18506,7 +18537,8 @@ cygwin* | mingw* | pw32*) dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' @@ -18559,7 +18591,7 @@ darwin* | rhapsody*) soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` @@ -18597,7 +18629,14 @@ kfreebsd*-gnu) freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. - objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) @@ -18642,7 +18681,7 @@ hpux9* | hpux10* | hpux11*) version_type=sunos need_lib_prefix=no need_version=no - case "$host_cpu" in + case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes @@ -19597,7 +19636,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) 2>/dev/null + (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; @@ -19695,7 +19734,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) 2>/dev/null + (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; @@ -20786,10 +20825,6 @@ case "${host_os}" in # do not use 64-bit compiler ac_cv_os_cflags="-n32 -mips3 -Wl,-woff,84" ;; - gcc ) # with gcc 3.4.3 on irix-6.5, we get pte_t - # undefined. So give it a dummy value. - ac_cv_os_cflags="-Dpte_t=u_int" - ;; esac ;; osf[1-3]* ) @@ -20941,7 +20976,10 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - value=`./conftest dummy 2>>config.log` + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 @@ -23548,6 +23586,8 @@ echo "$as_me: *** GENERIC LIBRARY FUNCTIONS ***" >&6;} + + @@ -23604,6 +23644,8 @@ for ac_func in \ signal \ sigsuspend \ socket \ + statfs \ + statvfs \ strcasecmp \ strchr \ strcspn \ @@ -24928,6 +24970,8 @@ echo "$as_me: *** GENERIC HEADER FILES ***" >&6;} + + @@ -25003,6 +25047,7 @@ for ac_header in \ sys/fsid.h \ sys/fstyp.h \ sys/ioctl.h \ + sys/immu.h \ sys/lock.h \ sys/machine.h \ sys/mbuf.h \ @@ -25023,6 +25068,7 @@ for ac_header in \ sys/sockio.h \ sys/stat.h \ sys/statfs.h \ + sys/statvfs.h \ sys/syscall.h \ sys/syslimits.h \ sys/syslog.h \ @@ -28481,6 +28527,81 @@ _ACEOF fi +case "${host_os}" in + irix6* ) +echo "$as_me:$LINENO: checking for pte_t" >&5 +echo $ECHO_N "checking for pte_t... $ECHO_C" >&6 +if test "${ac_cv_type_pte_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#ifdef HAVE_SYS_IMMU_H +# include +#endif /* HAVE_SYS_IMMU_H */ + + +int +main () +{ +if ((pte_t *) 0) + return 0; +if (sizeof (pte_t)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_pte_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_pte_t=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_pte_t" >&5 +echo "${ECHO_T}$ac_cv_type_pte_t" >&6 +if test $ac_cv_type_pte_t = yes; then + : +else + +cat >>confdefs.h <<_ACEOF +#define pte_t unsigned int +_ACEOF + +fi + + ;; +esac echo "$as_me:$LINENO: checking if plain fhandle type exists" >&5 echo $ECHO_N "checking if plain fhandle type exists... $ECHO_C" >&6 @@ -34468,6 +34589,136 @@ _ACEOF fi +echo "$as_me:$LINENO: checking if compiler can handle variable-length macros" >&5 +echo $ECHO_N "checking if compiler can handle variable-length macros... $ECHO_C" >&6 +if test "${ac_cv_varargs_macros+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + +# try C99 style +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#define foo(str,size,fmt,...) bar(__FILE__,__LINE__,(str),(size),(fmt),__VA_ARGS__) + +int +main () +{ + +char a[80]; +foo(a, sizeof(a), "%d,%d", 1, 2); + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_varargs_macros=c99 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +# else try gcc style +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#define foo(str,size,args...) bar(__FILE__,__LINE__,(str),(size),(fmt),args) + +int +main () +{ + +char a80; +foo(a, sizeof(a), "%d,%d", 1, 2); + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_varargs_macros=gcc +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_varargs_macros=none +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +echo "$as_me:$LINENO: result: $ac_cv_varargs_macros" >&5 +echo "${ECHO_T}$ac_cv_varargs_macros" >&6 +if test "$ac_cv_varargs_macros" = c99 +then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_C99_VARARGS_MACROS 1 +_ACEOF + +else + if test "$ac_cv_varargs_macros" = gcc + then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GCC_VARARGS_MACROS 1 +_ACEOF + + fi +fi + + echo "$as_me: *** SAVING CONFIGURE STATE ***" >&6 if test -f confdefs.h then @@ -50442,9 +50693,9 @@ fi if test -n "ufs" then ac_fs_name=ufs - ac_fs_as_name=" (from: ext2 ffs ufs 42 efs xfs jfs ultrix)" + ac_fs_as_name=" (from: ext3 ext2 ffs ufs 42 43 44 efs xfs jfs ultrix)" else - ac_fs_name=ext2 ffs ufs 42 efs xfs jfs ultrix + ac_fs_name=ext3 ext2 ffs ufs 42 43 44 efs xfs jfs ultrix ac_fs_as_name="" fi # store variable name of filesystem @@ -50461,7 +50712,7 @@ else # assume not found eval "ac_cv_fs_$ac_fs_name=no" -for ac_fs_tmp in ext2 ffs ufs 42 efs xfs jfs ultrix +for ac_fs_tmp in ext3 ext2 ffs ufs 42 43 44 efs xfs jfs ultrix do ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` @@ -54306,7 +54557,7 @@ if test -n "ufs" then ac_fs_name=ufs else - ac_fs_name=4.2 4.3 4.4 ext2 ufs efs xfs ffs jfs ultrix + ac_fs_name=ext3 ext2 ffs ufs 4.2 4.3 4.4 efs xfs jfs ultrix fi # prepare upper-case name of filesystem ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` @@ -54323,7 +54574,7 @@ else # undefine by default eval "ac_cv_mount_type_$ac_fs_name=notfound" # and look to see if it was found -for ac_fs_tmp in 4.2 4.3 4.4 ext2 ufs efs xfs ffs jfs ultrix +for ac_fs_tmp in ext3 ext2 ffs ufs 4.2 4.3 4.4 efs xfs jfs ultrix do ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' | tr -d '.'` @@ -59422,7 +59673,10 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - value=`./conftest dummy 2>>config.log` + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 @@ -59449,7 +59703,7 @@ fi break fi - # finally run a test program for bsdi3 + # then run a test program for bsdi3, tru64, and others if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 @@ -59501,6 +59755,84 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # finally try to run a program that derefences a static array (bsd44) + +value="notfound" +if test "$cross_compiling" = yes; then + value="notfound" +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +main(argc) +int argc; +{ + + if (argc > 1) + printf("\"%s\"", MOUNT_$ac_upcase_fs_symbol); + +exit(0); +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +value="notfound" +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +if test "$value" = notfound +then + : + +else + : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\"" + +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi done @@ -59688,7 +60020,10 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - value=`./conftest dummy 2>>config.log` + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 @@ -59715,7 +60050,7 @@ fi break fi - # finally run a test program for bsdi3 + # then run a test program for bsdi3, tru64, and others if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 @@ -59767,6 +60102,84 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # finally try to run a program that derefences a static array (bsd44) + +value="notfound" +if test "$cross_compiling" = yes; then + value="notfound" +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +main(argc) +int argc; +{ + + if (argc > 1) + printf("\"%s\"", MOUNT_$ac_upcase_fs_symbol); + +exit(0); +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +value="notfound" +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +if test "$value" = notfound +then + : + +else + : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\"" + +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi done @@ -59804,7 +60217,7 @@ if test -n "ufs" then ac_fs_name=ufs else - ac_fs_name=ext2 ufs jfs 4.2 4.3 4.4 efs xfs ffs + ac_fs_name=ext3 ext2 ffs ufs 4.2 4.3 4.4 efs xfs jfs ultrix fi # store variable name of fs ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` @@ -59821,7 +60234,7 @@ else # undefine by default eval "ac_cv_mnttab_type_$ac_fs_name=notfound" # and look to see if it was found -for ac_fs_tmp in ext2 ufs jfs 4.2 4.3 4.4 efs xfs ffs +for ac_fs_tmp in ext3 ext2 ffs ufs 4.2 4.3 4.4 efs xfs jfs ultrix do if test "$ac_fs_tmp" = "nfs3" -a "$ac_cv_fs_nfs3" = "yes" -a "$ac_cv_header_linux_nfs_h" = "yes" then @@ -59954,7 +60367,10 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - value=`./conftest dummy 2>>config.log` + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 @@ -59981,7 +60397,7 @@ fi break fi - # finally run a test program for bsdi3 + # then run a test program for bsdi3, tru64, and others if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 @@ -60033,6 +60449,84 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # finally try to run a program that derefences a static array (bsd44) + +value="notfound" +if test "$cross_compiling" = yes; then + value="notfound" +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +main(argc) +int argc; +{ + + if (argc > 1) + printf("\"%s\"", MOUNT_$ac_upcase_fs_symbol); + +exit(0); +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +value="notfound" +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +if test "$value" = notfound +then + : + +else + : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\"" + +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi done @@ -60220,7 +60714,10 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - value=`./conftest dummy 2>>config.log` + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 @@ -60247,7 +60744,7 @@ fi break fi - # finally run a test program for bsdi3 + # then run a test program for bsdi3, tru64, and others if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 @@ -60299,6 +60796,84 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # finally try to run a program that derefences a static array (bsd44) + +value="notfound" +if test "$cross_compiling" = yes; then + value="notfound" +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +main(argc) +int argc; +{ + + if (argc > 1) + printf("\"%s\"", MOUNT_$ac_upcase_fs_symbol); + +exit(0); +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +value="notfound" +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +if test "$value" = notfound +then + : + +else + : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\"" + +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi done @@ -60486,7 +61061,10 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - value=`./conftest dummy 2>>config.log` + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 @@ -60513,7 +61091,7 @@ fi break fi - # finally run a test program for bsdi3 + # then run a test program for bsdi3, tru64, and others if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 @@ -60565,6 +61143,84 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # finally try to run a program that derefences a static array (bsd44) + +value="notfound" +if test "$cross_compiling" = yes; then + value="notfound" +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +main(argc) +int argc; +{ + + if (argc > 1) + printf("\"%s\"", MOUNT_$ac_upcase_fs_symbol); + +exit(0); +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +value="notfound" +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +if test "$value" = notfound +then + : + +else + : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\"" + +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi done @@ -60752,7 +61408,10 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - value=`./conftest dummy 2>>config.log` + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 @@ -60779,7 +61438,7 @@ fi break fi - # finally run a test program for bsdi3 + # then run a test program for bsdi3, tru64, and others if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 @@ -60831,6 +61490,84 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # finally try to run a program that derefences a static array (bsd44) + +value="notfound" +if test "$cross_compiling" = yes; then + value="notfound" +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +main(argc) +int argc; +{ + + if (argc > 1) + printf("\"%s\"", MOUNT_$ac_upcase_fs_symbol); + +exit(0); +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +value="notfound" +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +if test "$value" = notfound +then + : + +else + : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\"" + +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi done @@ -61018,7 +61755,10 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - value=`./conftest dummy 2>>config.log` + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 @@ -61045,7 +61785,7 @@ fi break fi - # finally run a test program for bsdi3 + # then run a test program for bsdi3, tru64, and others if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 @@ -61097,6 +61837,84 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # finally try to run a program that derefences a static array (bsd44) + +value="notfound" +if test "$cross_compiling" = yes; then + value="notfound" +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +main(argc) +int argc; +{ + + if (argc > 1) + printf("\"%s\"", MOUNT_$ac_upcase_fs_symbol); + +exit(0); +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +value="notfound" +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +if test "$value" = notfound +then + : + +else + : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\"" + +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi done @@ -61284,7 +62102,10 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - value=`./conftest dummy 2>>config.log` + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 @@ -61311,7 +62132,7 @@ fi break fi - # finally run a test program for bsdi3 + # then run a test program for bsdi3, tru64, and others if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 @@ -61363,6 +62184,84 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # finally try to run a program that derefences a static array (bsd44) + +value="notfound" +if test "$cross_compiling" = yes; then + value="notfound" +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +main(argc) +int argc; +{ + + if (argc > 1) + printf("\"%s\"", MOUNT_$ac_upcase_fs_symbol); + +exit(0); +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +value="notfound" +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +if test "$value" = notfound +then + : + +else + : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\"" + +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi done @@ -61550,7 +62449,10 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - value=`./conftest dummy 2>>config.log` + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 @@ -61577,7 +62479,7 @@ fi break fi - # finally run a test program for bsdi3 + # then run a test program for bsdi3, tru64, and others if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 @@ -61629,6 +62531,84 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # finally try to run a program that derefences a static array (bsd44) + +value="notfound" +if test "$cross_compiling" = yes; then + value="notfound" +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +main(argc) +int argc; +{ + + if (argc > 1) + printf("\"%s\"", MOUNT_$ac_upcase_fs_symbol); + +exit(0); +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +value="notfound" +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +if test "$value" = notfound +then + : + +else + : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\"" + +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi done @@ -61816,7 +62796,10 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - value=`./conftest dummy 2>>config.log` + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 @@ -61843,7 +62826,7 @@ fi break fi - # finally run a test program for bsdi3 + # then run a test program for bsdi3, tru64, and others if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 @@ -61895,6 +62878,84 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # finally try to run a program that derefences a static array (bsd44) + +value="notfound" +if test "$cross_compiling" = yes; then + value="notfound" +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +main(argc) +int argc; +{ + + if (argc > 1) + printf("\"%s\"", MOUNT_$ac_upcase_fs_symbol); + +exit(0); +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +value="notfound" +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +if test "$value" = notfound +then + : + +else + : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\"" + +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi done @@ -62082,7 +63143,10 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - value=`./conftest dummy 2>>config.log` + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 @@ -62109,7 +63173,7 @@ fi break fi - # finally run a test program for bsdi3 + # then run a test program for bsdi3, tru64, and others if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 @@ -62161,6 +63225,84 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # finally try to run a program that derefences a static array (bsd44) + +value="notfound" +if test "$cross_compiling" = yes; then + value="notfound" +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +main(argc) +int argc; +{ + + if (argc > 1) + printf("\"%s\"", MOUNT_$ac_upcase_fs_symbol); + +exit(0); +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +value="notfound" +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +if test "$value" = notfound +then + : + +else + : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\"" + +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi done @@ -62348,7 +63490,10 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - value=`./conftest dummy 2>>config.log` + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 @@ -62375,7 +63520,7 @@ fi break fi - # finally run a test program for bsdi3 + # then run a test program for bsdi3, tru64, and others if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 @@ -62427,6 +63572,84 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # finally try to run a program that derefences a static array (bsd44) + +value="notfound" +if test "$cross_compiling" = yes; then + value="notfound" +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +main(argc) +int argc; +{ + + if (argc > 1) + printf("\"%s\"", MOUNT_$ac_upcase_fs_symbol); + +exit(0); +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +value="notfound" +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +if test "$value" = notfound +then + : + +else + : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\"" + +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi done @@ -62614,7 +63837,10 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - value=`./conftest dummy 2>>config.log` + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 @@ -62641,7 +63867,7 @@ fi break fi - # finally run a test program for bsdi3 + # then run a test program for bsdi3, tru64, and others if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 @@ -62693,6 +63919,84 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # finally try to run a program that derefences a static array (bsd44) + +value="notfound" +if test "$cross_compiling" = yes; then + value="notfound" +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +main(argc) +int argc; +{ + + if (argc > 1) + printf("\"%s\"", MOUNT_$ac_upcase_fs_symbol); + +exit(0); +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +value="notfound" +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +if test "$value" = notfound +then + : + +else + : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\"" + +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi done @@ -62880,7 +64184,10 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - value=`./conftest dummy 2>>config.log` + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 @@ -62907,7 +64214,7 @@ fi break fi - # finally run a test program for bsdi3 + # then run a test program for bsdi3, tru64, and others if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 @@ -62959,6 +64266,84 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # finally try to run a program that derefences a static array (bsd44) + +value="notfound" +if test "$cross_compiling" = yes; then + value="notfound" +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +main(argc) +int argc; +{ + + if (argc > 1) + printf("\"%s\"", MOUNT_$ac_upcase_fs_symbol); + +exit(0); +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +value="notfound" +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +if test "$value" = notfound +then + : + +else + : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\"" + +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi done @@ -63146,7 +64531,10 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - value=`./conftest dummy 2>>config.log` + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 @@ -63173,7 +64561,7 @@ fi break fi - # finally run a test program for bsdi3 + # then run a test program for bsdi3, tru64, and others if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 @@ -63225,6 +64613,84 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # finally try to run a program that derefences a static array (bsd44) + +value="notfound" +if test "$cross_compiling" = yes; then + value="notfound" +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +main(argc) +int argc; +{ + + if (argc > 1) + printf("\"%s\"", MOUNT_$ac_upcase_fs_symbol); + +exit(0); +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +value="notfound" +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +if test "$value" = notfound +then + : + +else + : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\"" + +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi done @@ -63412,7 +64878,10 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - value=`./conftest dummy 2>>config.log` + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 @@ -63439,7 +64908,7 @@ fi break fi - # finally run a test program for bsdi3 + # then run a test program for bsdi3, tru64, and others if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 @@ -63491,6 +64960,84 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # finally try to run a program that derefences a static array (bsd44) + +value="notfound" +if test "$cross_compiling" = yes; then + value="notfound" +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +main(argc) +int argc; +{ + + if (argc > 1) + printf("\"%s\"", MOUNT_$ac_upcase_fs_symbol); + +exit(0); +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +value="notfound" +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +if test "$value" = notfound +then + : + +else + : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\"" + +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi done @@ -63678,7 +65225,10 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - value=`./conftest dummy 2>>config.log` + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 @@ -63705,7 +65255,7 @@ fi break fi - # finally run a test program for bsdi3 + # then run a test program for bsdi3, tru64, and others if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 @@ -63757,6 +65307,84 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # finally try to run a program that derefences a static array (bsd44) + +value="notfound" +if test "$cross_compiling" = yes; then + value="notfound" +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +main(argc) +int argc; +{ + + if (argc > 1) + printf("\"%s\"", MOUNT_$ac_upcase_fs_symbol); + +exit(0); +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +value="notfound" +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +if test "$value" = notfound +then + : + +else + : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\"" + +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi done @@ -63944,7 +65572,10 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - value=`./conftest dummy 2>>config.log` + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 @@ -63971,7 +65602,7 @@ fi break fi - # finally run a test program for bsdi3 + # then run a test program for bsdi3, tru64, and others if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 @@ -64023,6 +65654,84 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # finally try to run a program that derefences a static array (bsd44) + +value="notfound" +if test "$cross_compiling" = yes; then + value="notfound" +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +#include "${srcdir}/include/mount_headers1.h" +#include AMU_NFS_PROTOCOL_HEADER +#include "${srcdir}/include/mount_headers2.h" + + + + + +main(argc) +int argc; +{ + + if (argc > 1) + printf("\"%s\"", MOUNT_$ac_upcase_fs_symbol); + +exit(0); +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" + +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +value="notfound" +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +if test "$value" = notfound +then + : + +else + : + eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\"" + +fi + + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi done @@ -66959,7 +68668,7 @@ LTLIBOBJS=`echo "$LIBOBJS" | AMU_LIB_OBJS="${LTLIBOBJS}" - ac_config_files="$ac_config_files aux_conf.h Makefile amd/Makefile amq/Makefile fixmount/Makefile fsinfo/Makefile hlfsd/Makefile libamu/Makefile mk-amd-map/Makefile wire-test/Makefile scripts/Makefile doc/Makefile scripts/am-eject scripts/amd2ldif scripts/amd2sun scripts/automount2amd scripts/ctl-amd scripts/ctl-hlfsd scripts/expn scripts/fixrmtab scripts/fix-amd-map scripts/lostaltmail scripts/redhat-ctl-amd scripts/wait4amd scripts/wait4amd2die" + ac_config_files="$ac_config_files aux_conf.h Makefile amd/Makefile amq/Makefile fixmount/Makefile fsinfo/Makefile hlfsd/Makefile libamu/Makefile mk-amd-map/Makefile wire-test/Makefile scripts/Makefile doc/Makefile scripts/am-eject scripts/amd2ldif scripts/amd2sun scripts/automount2amd scripts/ctl-amd scripts/ctl-hlfsd scripts/expn scripts/fix-amd-map scripts/fixrmtab scripts/lostaltmail scripts/redhat-ctl-amd scripts/test-attrcache scripts/wait4amd scripts/wait4amd2die" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -67351,7 +69060,7 @@ _ASBOX } >&5 cat >&5 <<_CSEOF -This file was extended by am-utils $as_me 6.1.2.1, which was +This file was extended by am-utils $as_me 6.1.3, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -67417,7 +69126,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -am-utils config.status 6.1.2.1 +am-utils config.status 6.1.3 configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" @@ -67546,10 +69255,11 @@ do "scripts/ctl-amd" ) CONFIG_FILES="$CONFIG_FILES scripts/ctl-amd" ;; "scripts/ctl-hlfsd" ) CONFIG_FILES="$CONFIG_FILES scripts/ctl-hlfsd" ;; "scripts/expn" ) CONFIG_FILES="$CONFIG_FILES scripts/expn" ;; - "scripts/fixrmtab" ) CONFIG_FILES="$CONFIG_FILES scripts/fixrmtab" ;; "scripts/fix-amd-map" ) CONFIG_FILES="$CONFIG_FILES scripts/fix-amd-map" ;; + "scripts/fixrmtab" ) CONFIG_FILES="$CONFIG_FILES scripts/fixrmtab" ;; "scripts/lostaltmail" ) CONFIG_FILES="$CONFIG_FILES scripts/lostaltmail" ;; "scripts/redhat-ctl-amd" ) CONFIG_FILES="$CONFIG_FILES scripts/redhat-ctl-amd" ;; + "scripts/test-attrcache" ) CONFIG_FILES="$CONFIG_FILES scripts/test-attrcache" ;; "scripts/wait4amd" ) CONFIG_FILES="$CONFIG_FILES scripts/wait4amd" ;; "scripts/wait4amd2die" ) CONFIG_FILES="$CONFIG_FILES scripts/wait4amd2die" ;; "${am_utils_link_files}" ) CONFIG_LINKS="$CONFIG_LINKS ${am_utils_link_files}" ;; @@ -68589,6 +70299,8 @@ if test "$no_create" != yes; then $ac_cs_success || { (exit 1); exit 1; } fi +# chmod some scripts that are built but not installed +test -f scripts/test-attrcache && chmod +x scripts/test-attrcache { echo "$as_me:$LINENO: *** END OF CONFIGURATION ***" >&5 echo "$as_me: *** END OF CONFIGURATION ***" >&6;} diff --git a/dist/am-utils/configure.in b/dist/am-utils/configure.in index 52b89047e4d2..dd80e0efef1d 100644 --- a/dist/am-utils/configure.in +++ b/dist/am-utils/configure.in @@ -55,7 +55,7 @@ AH_BOTTOM([ dnl dnl AC_CONFIG_AUX_DIR(m4) AC_PREREQ(2.52) -AC_REVISION($Revision: 1.1.1.7 $) +AC_REVISION($Revision: 1.1.1.8 $) AC_COPYRIGHT([Copyright (c) 1997-2005 Erez Zadok]) dnl find out system type AC_MSG_NOTICE(*** SYSTEM TYPES ***) @@ -311,6 +311,8 @@ AC_CHECK_FUNCS( \ signal \ sigsuspend \ socket \ + statfs \ + statvfs \ strcasecmp \ strchr \ strcspn \ @@ -488,6 +490,7 @@ AC_CHECK_HEADERS( \ sys/fsid.h \ sys/fstyp.h \ sys/ioctl.h \ + sys/immu.h \ sys/lock.h \ sys/machine.h \ sys/mbuf.h \ @@ -508,6 +511,7 @@ AC_CHECK_HEADERS( \ sys/sockio.h \ sys/stat.h \ sys/statfs.h \ + sys/statvfs.h \ sys/syscall.h \ sys/syslimits.h \ sys/syslog.h \ @@ -729,6 +733,11 @@ dnl Generic Typedef Checks AC_MSG_NOTICE(*** GENERIC TYPEDEFS ***) AMU_TYPE_TIME_T AMU_TYPE_RPCVERS_T +case "${host_os}" in + irix6* ) +AMU_TYPE_PTE_T + ;; +esac AMU_CHECK_FHANDLE AMU_CHECK_MTYPE_TYPE AMU_CHECK_MTYPE_PRINTF_TYPE @@ -762,6 +771,7 @@ dnl ====================================================================== dnl Generic Compiler Characteristics AC_MSG_NOTICE(*** GENERIC COMPILER CHARACTERISTICS ***) AMU_C_VOID_P +AMU_VARARGS_MACROS dnl ====================================================================== dnl ********* @@ -930,7 +940,7 @@ dnl AMU_CHECK_FS_MNTENT(nfs3) AMU_CHECK_FS_MNTENT(vfat pcfs pc msdos msdosfs fat, pcfs) AMU_CHECK_FS_MNTENT(tfs) AMU_CHECK_FS_MNTENT(tmpfs) -AMU_CHECK_FS_MNTENT(ext2 ffs ufs 42 efs xfs jfs ultrix, ufs) +AMU_CHECK_FS_MNTENT(ext3 ext2 ffs ufs 42 43 44 efs xfs jfs ultrix, ufs) dnl openbsd 2.4 introduce a new file system called xfs, which is not dnl the same as irix-s xfs. Sigh, why did openbsd have to use such a name! case "${host_os_name}" in @@ -978,7 +988,7 @@ dnl check for mount(2) type/name for filesystem (MNTTYPE_*, MOUNT_*) AC_MSG_NOTICE(*** MOUNTING TYPES ***) AMU_CHECK_MOUNT_TYPE(nfs) AMU_CHECK_MOUNT_TYPE(nfs3) -AMU_CHECK_MOUNT_TYPE(4.2 4.3 4.4 ext2 ufs efs xfs ffs jfs ultrix, ufs) +AMU_CHECK_MOUNT_TYPE(ext3 ext2 ffs ufs 4.2 4.3 4.4 efs xfs jfs ultrix, ufs) AMU_CHECK_MOUNT_TYPE(xfs) AMU_CHECK_MOUNT_TYPE(efs) AMU_CHECK_MOUNT_TYPE(cdfs hsfs cd9660 iso9660 isofs cdrom, cdfs) @@ -1001,7 +1011,7 @@ dnl check for mnttab name for filesystem AC_MSG_NOTICE(*** MOUNTING TABLE NAMES ***) AMU_CHECK_MNTTAB_TYPE(nfs) AMU_CHECK_MNTTAB_TYPE(nfs3) -AMU_CHECK_MNTTAB_TYPE(ext2 ufs jfs 4.2 4.3 4.4 efs xfs ffs, ufs) +AMU_CHECK_MNTTAB_TYPE(ext3 ext2 ffs ufs 4.2 4.3 4.4 efs xfs jfs ultrix, ufs) AMU_CHECK_MNTTAB_TYPE(xfs) AMU_CHECK_MNTTAB_TYPE(efs) AMU_CHECK_MNTTAB_TYPE(cdfs hsfs cd9660 iso9660 isofs cdrom, cdfs) @@ -1290,14 +1300,17 @@ AC_CONFIG_FILES( \ scripts/ctl-amd \ scripts/ctl-hlfsd \ scripts/expn \ - scripts/fixrmtab \ scripts/fix-amd-map \ + scripts/fixrmtab \ scripts/lostaltmail \ scripts/redhat-ctl-amd \ + scripts/test-attrcache \ scripts/wait4amd \ scripts/wait4amd2die \ ) AC_OUTPUT +# chmod some scripts that are built but not installed +test -f scripts/test-attrcache && chmod +x scripts/test-attrcache dnl ====================================================================== dnl ###################################################################### diff --git a/dist/am-utils/hlfsd/stubs.c b/dist/am-utils/hlfsd/stubs.c index b315244213c9..bb567553c2c9 100644 --- a/dist/am-utils/hlfsd/stubs.c +++ b/dist/am-utils/hlfsd/stubs.c @@ -1,4 +1,4 @@ -/* $NetBSD: stubs.c,v 1.1.1.9 2005/09/20 17:16:03 rpaulo Exp $ */ +/* $NetBSD: stubs.c,v 1.1.1.10 2006/02/05 16:14:41 christos Exp $ */ /* * Copyright (c) 1997-2005 Erez Zadok @@ -136,7 +136,7 @@ nfsproc_getattr_2_svc(am_nfs_fh *argp, struct svc_req *rqstp) * Some NFS clients may need this code. */ if (uid != rootfattr.na_uid) { - rootfattr.na_mtime.nt_seconds++; + clocktime(&rootfattr.na_mtime); rootfattr.na_uid = uid; } #endif @@ -155,7 +155,7 @@ nfsproc_getattr_2_svc(am_nfs_fh *argp, struct svc_req *rqstp) * so we must update the nt_seconds field every time. */ if (uid != slinkfattr.na_uid) { - slinkfattr.na_mtime.nt_seconds++; + clocktime(&slinkfattr.na_mtime); slinkfattr.na_uid = uid; } #endif /* not MNT2_NFS_OPT_SYMTTL */ @@ -240,7 +240,7 @@ nfsproc_lookup_2_svc(nfsdiropargs *argp, struct svc_req *rqstp) * Some NFS clients may need this code. */ if (uid != rootfattr.na_uid) { - rootfattr.na_mtime.nt_seconds++; + clocktime(&rootfattr.na_mtime); rootfattr.na_uid = uid; } #endif @@ -262,7 +262,7 @@ nfsproc_lookup_2_svc(nfsdiropargs *argp, struct svc_req *rqstp) * so we must update the nt_seconds field every time. */ if (uid != slinkfattr.na_uid) { - slinkfattr.na_mtime.nt_seconds++; + clocktime(&slinkfattr.na_mtime); slinkfattr.na_uid = uid; } #endif /* not MNT2_NFS_OPT_SYMTTL */ @@ -319,7 +319,7 @@ nfsproc_readlink_2_svc(am_nfs_fh *argp, struct svc_req *rqstp) if (getcreds(rqstp, &userid, &groupid, nfsxprt) < 0) return (nfsreadlinkres *) NULL; - gettimeofday((struct timeval *) &slinkfattr.na_atime, (struct timezone *) 0); + clocktime(&slinkfattr.na_atime); res.rlr_status = NFS_OK; if (groupid == hlfs_gid) { @@ -491,7 +491,7 @@ nfsproc_readdir_2_svc(nfsreaddirargs *argp, struct svc_req *rqstp) if (eq_fh(&argp->rda_fhandle, &slink)) { res.rdr_status = NFSERR_NOTDIR; } else if (eq_fh(&argp->rda_fhandle, &root)) { - gettimeofday((struct timeval *) &rootfattr.na_atime, (struct timezone *) 0); + clocktime(&rootfattr.na_atime); res.rdr_status = NFS_OK; switch (argp->rda_cookie[0]) { diff --git a/dist/am-utils/ldap-id.ms b/dist/am-utils/ldap-id.ms index 54ba0af4f320..3c0d30856645 100644 --- a/dist/am-utils/ldap-id.ms +++ b/dist/am-utils/ldap-id.ms @@ -28,31 +28,31 @@ A directory (X.500 and LDAPv3) schema for Berkely automounter .fi .in 3 This memo describes a directory (LDAP or X.500) schema for storing -amd (Berkely-style automounter) mount info maps. The schema is currently -beeing supported by the (beta version of the) am-utils version 6 package -[AMUTILS]. +amd (Berkely-style automounter) mount info maps. The schema is currently +beeing supported by the (beta version of the) am-utils version 6 package +[AMUTILS]. .ti 0 2. Overview and Rationale Directory services such as X.500 [X500] or LDAP [RFC2251] are a natural -choice of repository for amd mount map databases. All Object Identifiers -in this document are prefixed by amdSchema-id to be assigned later. The -relation between this schema and the automount schema elements in [HOWARD] +choice of repository for amd mount map databases. All Object Identifiers +in this document are prefixed by amdSchema-id to be assigned later. The +relation between this schema and the automount schema elements in [HOWARD] are mostly superficial. The model for the elements in [HOWARD] was the SUN -automounter which has quite a different syntax for mount maps. Furthermore -the intended usage of this schema differs from that of [HOWARD] in many +automounter which has quite a different syntax for mount maps. Furthermore +the intended usage of this schema differs from that of [HOWARD] in many respects. .ti 0 3. DSA requirements -Directory servers implementing this schema SHOULD maintain the -modifyTimestamp operational attribute. If not the amdMapCacheTtl +Directory servers implementing this schema SHOULD maintain the +modifyTimestamp operational attribute. If not the amdMapCacheTtl attribute SHOULD be set to 0 indicating to clients that caching of -map entries SHOULD be turned off. Clients wishing to use the amdMap -schema MAY use the modifyTimestamp information to set the ttl for -internal caching schemes. A value of 0 for the amdMapCacheTtl must +map entries SHOULD be turned off. Clients wishing to use the amdMap +schema MAY use the modifyTimestamp information to set the ttl for +internal caching schemes. A value of 0 for the amdMapCacheTtl must result in clients turning off any local caching. .ti 0 @@ -70,11 +70,11 @@ in BNF using definitions from [RFC2252]: amdlocationselection = amdlocation | amdlocationselection whsp amdlocation - + amdlocation = amdlocationinfo | "-" amdlocationinfo | "-" - + amdlocationinfo = seloropt | amdlocationinfo ";" seloropt | ";" @@ -87,7 +87,7 @@ in BNF using definitions from [RFC2252]: optass = keystring \":=\" printablestring -X.500 servers or LDAPv3 servers (supporting the binary attribute +X.500 servers or LDAPv3 servers (supporting the binary attribute option) may use the following syntax definition: AmdLocationList ::= SEQUENCE OF { @@ -103,21 +103,21 @@ option) may use the following syntax definition: not [2] NULL } } - + AmdLocationInfo ::= SET OF { CHOICE { selection [0] AmdSelection option [1] AmdOption } } - + AmdSelection ::= CHOICE { eq [0] AttributeAndValue ne [1] AttributeAndValue } AmdOption ::= AttributeAndValue - + AttributeAndValue ::= SEQUENCE { attribute IA5String value IA5String @@ -127,7 +127,7 @@ option) may use the following syntax definition: 5. Attribute types The following attribute types are defined in this document: - + amdMapName amdMapCacheTtl amdMapEntry @@ -136,21 +136,21 @@ The following attribute types are defined in this document: amdSchema-a OBJECT IDENTIFIER ::= { amdSchema-id 1 } - amdMapName + amdMapName ATTRIBUTE ::= { WITH SYNTAX IA5String EQUALITY MATCHING RULE caseIgoreExactMatch --ID { amdSchema-a 1 } - DESCRIPTION + DESCRIPTION "This attribute is the symbolic and in the naming context unique name of an amd map. This corresponds in the case of a flat file database to the name of the file or the mount-point of the map." } - - amdMapCacheTtl - ATTRIBUTE ::= { + + amdMapCacheTtl + ATTRIBUTE ::= { WITH SYNTAX Integer EQUALITY MATCHING RULE integerExactMatch --ID { amdSchema-a 2 } @@ -213,7 +213,7 @@ The following attribute types are defined in this document: using the syntax described above." } -.ti 0 +.ti 0 6. Object classes The following object classes are defined in this document: @@ -251,13 +251,13 @@ defined as follows: .ti 0 7. Examples - + .ti 0 8. Security Considerations Due to the security problems posed by NFS care should be taken not to -advertise exported filesystems. Therefore it is often desirable to limit +advertise exported filesystems. Therefore it is often desirable to limit access to entries carrying amd mount map information to those systems to which the corresponding filesystems have been exported. @@ -282,13 +282,13 @@ to which the corresponding filesystems have been exported. Names", RFC 2253, December 1997. [HOWARD] - Luke Howard, "An Approach for Using LDAP as a Network + Luke Howard, "An Approach for Using LDAP as a Network Information Service", draft-howard-nis-schema-??.txt, Internet draft. - [X500] + [X500] ITU something or other. - + .in 3 diff --git a/dist/am-utils/libamu/Makefile.am b/dist/am-utils/libamu/Makefile.am index fc9f50811b58..76706c84184a 100644 --- a/dist/am-utils/libamu/Makefile.am +++ b/dist/am-utils/libamu/Makefile.am @@ -16,7 +16,7 @@ libamu_la_SOURCES = \ mount_fs.c \ mtab.c \ nfs_prot_xdr.c \ - util.c \ + strutil.c \ wire.c \ xdr_func.c \ xutil.c diff --git a/dist/am-utils/libamu/strutil.c b/dist/am-utils/libamu/strutil.c new file mode 100644 index 000000000000..2e729617f488 --- /dev/null +++ b/dist/am-utils/libamu/strutil.c @@ -0,0 +1,272 @@ +/* $NetBSD: strutil.c,v 1.1.1.1 2006/02/05 16:14:45 christos Exp $ */ + +/* + * Copyright (c) 1997-2005 Erez Zadok + * Copyright (c) 1990 Jan-Simon Pendry + * Copyright (c) 1990 Imperial College of Science, Technology & Medicine + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry at Imperial College, London. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgment: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * + * File: am-utils/libamu/strutil.c + * + */ + +/* + * String Utilities. + */ + +#ifdef HAVE_CONFIG_H +# include +#endif /* HAVE_CONFIG_H */ +#include +#include + + +char * +strnsave(const char *str, int len) +{ + char *sp = (char *) xmalloc(len + 1); + memmove(sp, str, len); + sp[len] = '\0'; + + return sp; +} + + +/* + * Concatenate three strings and store the result in the buffer pointed to + * by p, making p large enough to hold the strings + */ +char * +str3cat(char *p, char *s1, char *s2, char *s3) +{ + int l1 = strlen(s1); + int l2 = strlen(s2); + int l3 = strlen(s3); + + p = (char *) xrealloc(p, l1 + l2 + l3 + 1); + memmove(p, s1, l1); + memmove(p + l1, s2, l2); + memmove(p + l1 + l2, s3, l3 + 1); + return p; +} + + +/* + * Split s using ch as delimiter and qc as quote character + */ +char ** +strsplit(char *s, int ch, int qc) +{ + char **ivec; + int ic = 0; + int done = 0; + + ivec = (char **) xmalloc((ic + 1) * sizeof(char *)); + + while (!done) { + char *v; + + /* + * skip to split char + */ + while (*s && (ch == ' ' ? (isascii((unsigned char)*s) && isspace((unsigned char)*s)) : *s == ch)) + *s++ = '\0'; + + /* + * End of string? + */ + if (!*s) + break; + + /* + * remember start of string + */ + v = s; + + /* + * skip to split char + */ + while (*s && !(ch == ' ' ? (isascii((unsigned char)*s) && isspace((unsigned char)*s)) : *s == ch)) { + if (*s++ == qc) { + /* + * Skip past string. + */ + s++; + while (*s && *s != qc) + s++; + if (*s == qc) + s++; + } + } + + if (!*s) + done = 1; + *s++ = '\0'; + + /* + * save string in new ivec slot + */ + ivec[ic++] = v; + ivec = (char **) xrealloc((voidp) ivec, (ic + 1) * sizeof(char *)); + if (amuDebug(D_STR)) + plog(XLOG_DEBUG, "strsplit saved \"%s\"", v); + } + + if (amuDebug(D_STR)) + plog(XLOG_DEBUG, "strsplit saved a total of %d strings", ic); + + ivec[ic] = NULL; + + return ivec; +} + + +/* + * Use generic strlcpy to copy a string more carefully, null-terminating it + * as needed. However, if the copied string was truncated due to lack of + * space, then warn us. + * + * For now, xstrlcpy returns VOID because it doesn't look like anywhere in + * the Amd code do we actually use the return value of strncpy/strlcpy. + */ +void +#ifdef DEBUG +_xstrlcpy(const char *filename, int lineno, char *dst, const char *src, size_t len) +#else /* not DEBUG */ +xstrlcpy(char *dst, const char *src, size_t len) +#endif /* not DEBUG */ +{ + if (len == 0) + return; + if (strlcpy(dst, src, len) >= len) +#ifdef DEBUG + plog(XLOG_ERROR, "xstrlcpy(%s:%d): string \"%s\" truncated to \"%s\"", + filename, lineno, src, dst); +#else /* not DEBUG */ + plog(XLOG_ERROR, "xstrlcpy: string \"%s\" truncated to \"%s\"", src, dst); +#endif /* not DEBUG */ +} + + +/* + * Use generic strlcat to concatenate a string more carefully, + * null-terminating it as needed. However, if the copied string was + * truncated due to lack of space, then warn us. + * + * For now, xstrlcat returns VOID because it doesn't look like anywhere in + * the Amd code do we actually use the return value of strncat/strlcat. + */ +void +#ifdef DEBUG +_xstrlcat(const char *filename, int lineno, char *dst, const char *src, size_t len) +#else /* not DEBUG */ +xstrlcat(char *dst, const char *src, size_t len) +#endif /* not DEBUG */ +{ + if (len == 0) + return; + if (strlcat(dst, src, len) >= len) { + /* strlcat does not null terminate if the size of src is equal to len. */ + dst[strlen(dst) - 1] = '\0'; +#ifdef DEBUG + plog(XLOG_ERROR, "xstrlcat(%s:%d): string \"%s\" truncated to \"%s\"", + filename, lineno, src, dst); +#else /* not DEBUG */ + plog(XLOG_ERROR, "xstrlcat: string \"%s\" truncated to \"%s\"", src, dst); +#endif /* not DEBUG */ + } +} + + +/* our version of snprintf */ +int +#if defined(DEBUG) && (defined(HAVE_C99_VARARGS_MACROS) || defined(HAVE_GCC_VARARGS_MACROS)) +_xsnprintf(const char *filename, int lineno, char *str, size_t size, const char *format, ...) +#else /* not DEBUG or no C99/GCC-style vararg cpp macros supported */ +xsnprintf(char *str, size_t size, const char *format, ...) +#endif /* not DEBUG or no C99/GCC-style vararg cpp macros supported */ +{ + va_list ap; + int ret = 0; + + va_start(ap, format); +#if defined(DEBUG) && (defined(HAVE_C99_VARARGS_MACROS) || defined(HAVE_GCC_VARARGS_MACROS)) + ret = _xvsnprintf(filename, lineno, str, size, format, ap); +#else /* not DEBUG or no C99/GCC-style vararg cpp macros supported */ + ret = xvsnprintf(str, size, format, ap); +#endif /* not DEBUG or no C99/GCC-style vararg cpp macros supported */ + va_end(ap); + + return ret; +} + + +/* our version of vsnprintf */ +int +#if defined(DEBUG) && (defined(HAVE_C99_VARARGS_MACROS) || defined(HAVE_GCC_VARARGS_MACROS)) +_xvsnprintf(const char *filename, int lineno, char *str, size_t size, const char *format, va_list ap) +#else /* not DEBUG or no C99/GCC-style vararg cpp macros supported */ +xvsnprintf(char *str, size_t size, const char *format, va_list ap) +#endif /* not DEBUG or no C99/GCC-style vararg cpp macros supported */ +{ + int ret = 0; + +#ifdef HAVE_VSNPRINTF + ret = vsnprintf(str, size, format, ap); +#else /* not HAVE_VSNPRINTF */ + ret = vsprintf(str, format, ap); /* less secure version */ +#endif /* not HAVE_VSNPRINTF */ + /* + * If error or truncation, plog error. + * + * WARNING: we use the static 'maxtrunc' variable below to break out any + * possible infinite recursion between plog() and xvsnprintf(). If it + * ever happens, it'd indicate a bug in Amd. + */ + if (ret < 0 || (size_t) ret >= size) { /* error or truncation occured */ + static int maxtrunc; /* hack to avoid inifinite loop */ + if (++maxtrunc > 10) +#if defined(DEBUG) && (defined(HAVE_C99_VARARGS_MACROS) || defined(HAVE_GCC_VARARGS_MACROS)) + plog(XLOG_ERROR, "xvsnprintf(%s:%d): string %p truncated (ret=%d, format=\"%s\")", + filename, lineno, str, ret, format); +#else /* not DEBUG or no C99/GCC-style vararg cpp macros supported */ + plog(XLOG_ERROR, "xvsnprintf: string %p truncated (ret=%d, format=\"%s\")", + str, ret, format); +#endif /* not DEBUG or no C99/GCC-style vararg cpp macros supported */ + } + + return ret; +} diff --git a/dist/am-utils/ltmain.sh b/dist/am-utils/ltmain.sh index eecedf23e43e..9e71d27d86d4 100644 --- a/dist/am-utils/ltmain.sh +++ b/dist/am-utils/ltmain.sh @@ -43,8 +43,8 @@ EXIT_FAILURE=1 PROGRAM=ltmain.sh PACKAGE=libtool -VERSION=1.5.18 -TIMESTAMP=" (1.1220.2.245 2005/05/16 08:55:27)" +VERSION=1.5.20 +TIMESTAMP=" (1.1220.2.287 2005/08/31 18:54:15)" # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. @@ -88,14 +88,15 @@ rm="rm -f" Xsed="${SED}"' -e 1s/^X//' sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g' # test EBCDIC or ASCII -case `echo A|tr A '\301'` in - A) # EBCDIC based system - SP2NL="tr '\100' '\n'" - NL2SP="tr '\r\n' '\100\100'" +case `echo X|tr X '\101'` in + A) # ASCII based system + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr + SP2NL='tr \040 \012' + NL2SP='tr \015\012 \040\040' ;; - *) # Assume ASCII based system - SP2NL="tr '\040' '\012'" - NL2SP="tr '\015\012' '\040\040'" + *) # EBCDIC based system + SP2NL='tr \100 \n' + NL2SP='tr \r\n \100\100' ;; esac @@ -133,7 +134,6 @@ show_help= execute_dlfiles= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" -quote_scanset='[[~#^*{};<>?'"'"' ]' ##################################### # Shell function definitions: @@ -192,7 +192,7 @@ func_infer_tag () CC_quoted= for arg in $CC; do case $arg in - *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac @@ -213,7 +213,7 @@ func_infer_tag () for arg in $CC; do # Double-quote args containing other shell metacharacters. case $arg in - *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac @@ -337,7 +337,7 @@ func_extract_archives () func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches fi # $run - ;; + ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; @@ -576,7 +576,7 @@ if test -z "$show_help"; then for arg do - case "$arg_mode" in + case $arg_mode in arg ) # do not "continue". Instead, add this to base_compile lastarg="$arg" @@ -627,7 +627,7 @@ if test -z "$show_help"; then # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. case $arg in - *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac @@ -662,7 +662,7 @@ if test -z "$show_help"; then # in scan sets (worked around with variable expansion), # and furthermore cannot handle '|' '&' '(' ')' in scan sets # at all, so we specify them separately. - *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") lastarg="\"$lastarg\"" ;; esac @@ -737,13 +737,12 @@ if test -z "$show_help"; then qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"` case $qlibobj in - *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") qlibobj="\"$qlibobj\"" ;; esac - if test "X$libobj" != "X$qlibobj"; then - $echo "$modename: libobj name \`$libobj' may not contain shell special characters." - exit $EXIT_FAILURE - fi + test "X$libobj" != "X$qlibobj" \ + && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \ + && $echo "$modename: libobj name \`$libobj' may not contain shell special characters." objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$obj"; then @@ -824,7 +823,7 @@ compiler." fi qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"` case $qsrcfile in - *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") qsrcfile="\"$qsrcfile\"" ;; esac @@ -1111,7 +1110,7 @@ EOF arg="$1" shift case $arg in - *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test ;; *) qarg=$arg ;; @@ -1420,7 +1419,7 @@ EOF continue ;; - -framework) + -framework|-arch) prev=darwin_framework compiler_flags="$compiler_flags $arg" compile_command="$compile_command $arg" @@ -1543,7 +1542,7 @@ EOF # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in - *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac @@ -1659,7 +1658,7 @@ EOF for flag in $args; do IFS="$save_ifs" case $flag in - *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") flag="\"$flag\"" ;; esac @@ -1677,7 +1676,7 @@ EOF for flag in $args; do IFS="$save_ifs" case $flag in - *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") flag="\"$flag\"" ;; esac @@ -1710,7 +1709,7 @@ EOF # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in - *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac @@ -1844,7 +1843,7 @@ EOF # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in - *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac @@ -2409,7 +2408,7 @@ EOF case "$temp_rpath " in *" $dir "*) ;; *" $absdir "*) ;; - *) temp_rpath="$temp_rpath $dir" ;; + *) temp_rpath="$temp_rpath $absdir" ;; esac fi @@ -2595,7 +2594,7 @@ EOF add_dir="-L$dir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then - case "$libdir" in + case $libdir in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; @@ -2668,7 +2667,7 @@ EOF add_dir="-L$libdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then - case "$libdir" in + case $libdir in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; @@ -2729,8 +2728,6 @@ EOF fi fi else - convenience="$convenience $dir/$old_library" - old_convenience="$old_convenience $dir/$old_library" deplibs="$dir/$old_library $deplibs" link_static=yes fi @@ -3420,7 +3417,7 @@ EOF if test "$?" -eq 0 ; then ldd_output=`ldd conftest` for i in $deplibs; do - name="`expr $i : '-l\(.*\)'`" + name=`expr $i : '-l\(.*\)'` # If $name is empty we are operating on a -L argument. if test "$name" != "" && test "$name" -ne "0"; then if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then @@ -3457,7 +3454,7 @@ EOF # Error occurred in the first compile. Let's try to salvage # the situation: Compile a separate program for each library. for i in $deplibs; do - name="`expr $i : '-l\(.*\)'`" + name=`expr $i : '-l\(.*\)'` # If $name is empty we are operating on a -L argument. if test "$name" != "" && test "$name" != "0"; then $rm conftest @@ -3509,7 +3506,7 @@ EOF set dummy $deplibs_check_method file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` for a_deplib in $deplibs; do - name="`expr $a_deplib : '-l\(.*\)'`" + name=`expr $a_deplib : '-l\(.*\)'` # If $name is empty we are operating on a -L argument. if test "$name" != "" && test "$name" != "0"; then if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then @@ -3578,7 +3575,7 @@ EOF set dummy $deplibs_check_method match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` for a_deplib in $deplibs; do - name="`expr $a_deplib : '-l\(.*\)'`" + name=`expr $a_deplib : '-l\(.*\)'` # If $name is empty we are operating on a -L argument. if test -n "$name" && test "$name" != "0"; then if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then @@ -3819,6 +3816,9 @@ EOF # The command line is too long to execute in one step. $show "using reloadable object file for export list..." skipped_export=: + # Break out early, otherwise skipped_export may be + # set to false by a later but shorter cmd. + break fi done IFS="$save_ifs" @@ -3888,7 +3888,8 @@ EOF fi fi - if test "X$skipped_export" != "X:" && len=`expr "X$test_cmds" : ".*"` && + if test "X$skipped_export" != "X:" && + len=`expr "X$test_cmds" : ".*" 2>/dev/null` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else @@ -3923,7 +3924,7 @@ EOF do eval test_cmds=\"$reload_cmds $objlist $last_robj\" if test "X$objlist" = X || - { len=`expr "X$test_cmds" : ".*"` && + { len=`expr "X$test_cmds" : ".*" 2>/dev/null` && test "$len" -le "$max_cmd_len"; }; then objlist="$objlist $obj" else @@ -4013,13 +4014,30 @@ EOF IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" - $run eval "$cmd" || exit $? + $run eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$mode" = relink; then + $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' + fi + + exit $lt_exit + } done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? + + if test -n "$convenience"; then + if test -z "$whole_archive_flag_spec"; then + $show "${rm}r $gentop" + $run ${rm}r "$gentop" + fi + fi + exit $EXIT_SUCCESS fi @@ -4364,7 +4382,7 @@ extern \"C\" { if test -z "$export_symbols"; then export_symbols="$output_objdir/$outputname.exp" $run $rm $export_symbols - $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' + $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' else $run eval "${SED} -e 's/\([ ][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' @@ -4766,6 +4784,7 @@ EOF EOF cat >> $cwrappersource <<"EOF" + return 127; } void * @@ -5029,13 +5048,13 @@ else # Backslashes separate directories on plain windows *-*-mingw | *-*-os2*) $echo >> $output "\ - exec \$progdir\\\\\$program \${1+\"\$@\"} + exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $echo >> $output "\ - exec \$progdir/\$program \${1+\"\$@\"} + exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac @@ -5045,7 +5064,7 @@ else fi else # The program doesn't exist. - \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2 + \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 \$echo \"This script is just a wrapper for \$program.\" 1>&2 $echo \"See the $PACKAGE documentation for more information.\" 1>&2 exit $EXIT_FAILURE @@ -5168,7 +5187,7 @@ fi\ oldobjs="$objlist $obj" objlist="$objlist $obj" eval test_cmds=\"$old_archive_cmds\" - if len=`expr "X$test_cmds" : ".*"` && + if len=`expr "X$test_cmds" : ".*" 2>/dev/null` && test "$len" -le "$max_cmd_len"; then : else @@ -5365,11 +5384,11 @@ relink_command=\"$relink_command\"" # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. - $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then + $echo "X$nonopt" | grep shtool > /dev/null; then # Aesthetically quote it. arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` case $arg in - *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac @@ -5378,14 +5397,14 @@ relink_command=\"$relink_command\"" shift else install_prog= - arg="$nonopt" + arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in - *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac @@ -5403,28 +5422,31 @@ relink_command=\"$relink_command\"" do if test -n "$dest"; then files="$files $dest" - dest="$arg" + dest=$arg continue fi case $arg in -d) isdir=yes ;; - -f) prev="-f" ;; - -g) prev="-g" ;; - -m) prev="-m" ;; - -o) prev="-o" ;; + -f) + case " $install_prog " in + *[\\\ /]cp\ *) ;; + *) prev=$arg ;; + esac + ;; + -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; - -*) ;; - + -*) + ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then prev= else - dest="$arg" + dest=$arg continue fi ;; @@ -5433,7 +5455,7 @@ relink_command=\"$relink_command\"" # Aesthetically quote the argument. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in - *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac @@ -5602,11 +5624,14 @@ relink_command=\"$relink_command\"" if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. + # Try `ln -sf' first, because the `ln' binary might depend on + # the symlink we replace! Solaris /bin/ln does not understand -f, + # so we also need to try rm && ln -s. for linkname do if test "$linkname" != "$realname"; then - $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" - $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" + $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" + $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" fi done fi @@ -5619,7 +5644,16 @@ relink_command=\"$relink_command\"" IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" - $run eval "$cmd" || exit $? + $run eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$mode" = relink; then + $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' + fi + + exit $lt_exit + } done IFS="$save_ifs" fi @@ -5713,17 +5747,15 @@ relink_command=\"$relink_command\"" notinst_deplibs= relink_command= - # To insure that "foo" is sourced, and not "foo.exe", - # finese the cygwin/MSYS system by explicitly sourcing "foo." - # which disallows the automatic-append-.exe behavior. - case $build in - *cygwin* | *mingw*) wrapperdot=${wrapper}. ;; - *) wrapperdot=${wrapper} ;; - esac + # Note that it is not necessary on cygwin/mingw to append a dot to + # foo even if both foo and FILE.exe exist: automatic-append-.exe + # behavior happens only for exec(3), not for open(2)! Also, sourcing + # `FILE.' does not work on cygwin managed mounts. + # # If there is no directory component, then add one. - case $file in - */* | *\\*) . ${wrapperdot} ;; - *) . ./${wrapperdot} ;; + case $wrapper in + */* | *\\*) . ${wrapper} ;; + *) . ./${wrapper} ;; esac # Check the variables that should have been set. @@ -5751,17 +5783,15 @@ relink_command=\"$relink_command\"" done relink_command= - # To insure that "foo" is sourced, and not "foo.exe", - # finese the cygwin/MSYS system by explicitly sourcing "foo." - # which disallows the automatic-append-.exe behavior. - case $build in - *cygwin* | *mingw*) wrapperdot=${wrapper}. ;; - *) wrapperdot=${wrapper} ;; - esac + # Note that it is not necessary on cygwin/mingw to append a dot to + # foo even if both foo and FILE.exe exist: automatic-append-.exe + # behavior happens only for exec(3), not for open(2)! Also, sourcing + # `FILE.' does not work on cygwin managed mounts. + # # If there is no directory component, then add one. - case $file in - */* | *\\*) . ${wrapperdot} ;; - *) . ./${wrapperdot} ;; + case $wrapper in + */* | *\\*) . ${wrapper} ;; + *) . ./${wrapper} ;; esac outputname= @@ -5802,7 +5832,7 @@ relink_command=\"$relink_command\"" fi # remove .exe since cygwin /usr/bin/install will append another - # one anyways + # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in diff --git a/dist/am-utils/m4/macros/check_mnttab_type.m4 b/dist/am-utils/m4/macros/check_mnttab_type.m4 index f0f003a6614e..61e1c01b99a3 100644 --- a/dist/am-utils/m4/macros/check_mnttab_type.m4 +++ b/dist/am-utils/m4/macros/check_mnttab_type.m4 @@ -115,7 +115,7 @@ do break fi - # finally run a test program for bsdi3 + # then run a test program for bsdi3, tru64, and others AC_TRY_RUN( [ #include @@ -134,6 +134,27 @@ main() break ] ) + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # finally try to run a program that derefences a static array (bsd44) + AMU_EXPAND_RUN_STRING( + AMU_MOUNT_HEADERS( + [ + ]), + [ + if (argc > 1) + printf("\"%s\"", MOUNT_$ac_upcase_fs_symbol); + ], [ eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\"" + ]) + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi done diff --git a/dist/am-utils/m4/macros/check_varargs_macros.m4 b/dist/am-utils/m4/macros/check_varargs_macros.m4 new file mode 100644 index 000000000000..44bd3edf1989 --- /dev/null +++ b/dist/am-utils/m4/macros/check_varargs_macros.m4 @@ -0,0 +1,39 @@ +dnl ###################################################################### +dnl check if compiler can handle variable-length argument macros +AC_DEFUN([AMU_VARARGS_MACROS], +[ +AC_CACHE_CHECK(if compiler can handle variable-length macros, +ac_cv_varargs_macros, +[ +# try C99 style +AC_TRY_COMPILE( +[ +#define foo(str,size,fmt,...) bar(__FILE__,__LINE__,(str),(size),(fmt),__VA_ARGS__) +], +[ +char a[80]; +foo(a, sizeof(a), "%d,%d", 1, 2); +], ac_cv_varargs_macros=c99, +# else try gcc style +AC_TRY_COMPILE( +[ +#define foo(str,size,args...) bar(__FILE__,__LINE__,(str),(size),(fmt),args) +], +[ +char a[80]; +foo(a, sizeof(a), "%d,%d", 1, 2); +], ac_cv_varargs_macros=gcc, ac_cv_varargs_macros=none)) +]) +if test "$ac_cv_varargs_macros" = c99 +then + AC_DEFINE(HAVE_C99_VARARGS_MACROS, 1, + [System supports C99-style variable-length argument macros]) +else + if test "$ac_cv_varargs_macros" = gcc + then + AC_DEFINE(HAVE_GCC_VARARGS_MACROS, 1, + [System supports GCC-style variable-length argument macros]) + fi +fi +]) +dnl ====================================================================== diff --git a/dist/am-utils/m4/macros/expand_run_string.m4 b/dist/am-utils/m4/macros/expand_run_string.m4 index 70cecc703c70..2cb964e11f91 100644 --- a/dist/am-utils/m4/macros/expand_run_string.m4 +++ b/dist/am-utils/m4/macros/expand_run_string.m4 @@ -12,7 +12,11 @@ int argc; { $2 exit(0); -}], value=`./conftest dummy 2>>config.log`, value="notfound", value="notfound") +}], +[ +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" +], value="notfound", value="notfound") if test "$value" = notfound then : diff --git a/dist/am-utils/m4/macros/header_templates.m4 b/dist/am-utils/m4/macros/header_templates.m4 index f2f3df52e67f..3ace908f68f1 100644 --- a/dist/am-utils/m4/macros/header_templates.m4 +++ b/dist/am-utils/m4/macros/header_templates.m4 @@ -67,6 +67,9 @@ AH_TEMPLATE([HAVE_MAP_EXEC], AH_TEMPLATE([HAVE_FS_UFS], [Define if have UFS filesystem]) +AH_TEMPLATE([HAVE_FS_FFS], +[Define if have FFS filesystem]) + AH_TEMPLATE([HAVE_FS_XFS], [Define if have XFS filesystem (irix)]) @@ -121,6 +124,9 @@ AH_TEMPLATE([HAVE_FS_UMAPFS], AH_TEMPLATE([MOUNT_TYPE_UFS], [Mount(2) type/name for UFS filesystem]) +AH_TEMPLATE([MOUNT_TYPE_FFS], +[Mount(2) type/name for FFS filesystem]) + AH_TEMPLATE([MOUNT_TYPE_XFS], [Mount(2) type/name for XFS filesystem (irix)]) @@ -175,6 +181,9 @@ AH_TEMPLATE([MOUNT_TYPE_UMAPFS], AH_TEMPLATE([MNTTAB_TYPE_UFS], [Mount-table entry name for UFS filesystem]) +AH_TEMPLATE([MNTTAB_TYPE_FFS], +[Mount-table entry name for FFS filesystem]) + AH_TEMPLATE([MNTTAB_TYPE_XFS], [Mount-table entry name for XFS filesystem (irix)]) @@ -883,6 +892,9 @@ AH_TEMPLATE([HAVE_EXTERN_GETCCENT], AH_TEMPLATE([HAVE_EXTERN_GETDOMAINNAME], [does extern definition for getdomainname() exist?]) +AH_TEMPLATE([HAVE_EXTERN_GETDTABLESIZE], +[does extern definition for getdtablesize() exist?]) + AH_TEMPLATE([HAVE_EXTERN_GETHOSTNAME], [does extern definition for gethostname() exist?]) @@ -895,6 +907,9 @@ AH_TEMPLATE([HAVE_EXTERN_GETTABLESIZE], AH_TEMPLATE([HAVE_EXTERN_GETPAGESIZE], [does extern definition for getpagesize() exist?]) +AH_TEMPLATE([HAVE_EXTERN_GETWD], +[does extern definition for getwd() exist?]) + AH_TEMPLATE([HAVE_EXTERN_HOSTS_CTL], [does extern definition for hosts_ctl() exist?]) @@ -934,6 +949,9 @@ AH_TEMPLATE([HAVE_EXTERN_STRLCPY], AH_TEMPLATE([HAVE_EXTERN_STRSTR], [does extern definition for strstr() exist?]) +AH_TEMPLATE([HAVE_EXTERN_UALARM], +[does extern definition for ualarm() exist?]) + AH_TEMPLATE([HAVE_EXTERN_USLEEP], [does extern definition for usleep() exist?]) diff --git a/dist/am-utils/m4/macros/libtool.m4 b/dist/am-utils/m4/macros/libtool.m4 index 12a842a7991c..771b86f32dd9 100644 --- a/dist/am-utils/m4/macros/libtool.m4 +++ b/dist/am-utils/m4/macros/libtool.m4 @@ -26,7 +26,7 @@ AC_DEFUN([AC_PROG_LIBTOOL], [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. -AC_PROVIDE_IFELSE([AC_PROG_CXX], + AC_PROVIDE_IFELSE([AC_PROG_CXX], [AC_LIBTOOL_CXX], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX ])]) @@ -137,7 +137,7 @@ rm="rm -f" default_ofile=libtool can_build_shared=yes -# All known linkers require a `.a' archive for static linking (except M$VC, +# All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" @@ -353,8 +353,8 @@ if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if (echo_test_string="`eval $cmd`") 2>/dev/null && - echo_test_string="`eval $cmd`" && + if (echo_test_string=`eval $cmd`) 2>/dev/null && + echo_test_string=`eval $cmd` && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break @@ -523,7 +523,7 @@ x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then - case "`/usr/bin/file conftest.o`" in + case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*linux*) @@ -605,7 +605,7 @@ AC_CACHE_CHECK([$1], [$2], # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) @@ -644,7 +644,7 @@ AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], LDFLAGS="$LDFLAGS $3" printf "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The compiler can only warn and ignore the option if not recognized + # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. @@ -719,7 +719,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else - lt_cv_sys_max_cmd_len=65536 # usable default for *BSD + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` @@ -731,7 +731,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 - # + # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; @@ -848,7 +848,7 @@ int main () }] EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) 2>/dev/null + (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; @@ -997,7 +997,7 @@ AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) @@ -1015,7 +1015,7 @@ AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi - chmod u+w . + chmod u+w . 2>&AS_MESSAGE_LOG_FD $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation @@ -1275,7 +1275,8 @@ cygwin* | mingw* | pw32*) dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' @@ -1328,7 +1329,7 @@ darwin* | rhapsody*) soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` @@ -1366,7 +1367,14 @@ kfreebsd*-gnu) freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. - objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[[123]]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) @@ -1411,7 +1419,7 @@ hpux9* | hpux10* | hpux11*) version_type=sunos need_lib_prefix=no need_version=no - case "$host_cpu" in + case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes @@ -1807,7 +1815,7 @@ AC_DEFUN([AC_LIBTOOL_DLOPEN], # AC_LIBTOOL_WIN32_DLL # -------------------- -# declare package support for building win32 dll's +# declare package support for building win32 DLLs AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) ])# AC_LIBTOOL_WIN32_DLL @@ -1981,7 +1989,7 @@ dnl not every word. This closes a longstanding sh security hole. if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) - file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then @@ -2091,7 +2099,7 @@ AC_CACHE_VAL(lt_cv_path_LD, if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some GNU ld's only accept -v. + # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 ) +dnl Note: some gcc's on Irix 6.5 are broken and don't recognize pte_t, +dnl so I'm defining it here to unsigned int, which is not necessarily correct, +dnl but at least it gets am-utils to compile. +AC_DEFUN([AMU_TYPE_PTE_T], +[AC_CHECK_TYPE(pte_t, , +[AC_DEFINE_UNQUOTED(pte_t, unsigned int, + [Check if pte_t is defined in ])], +[ +#ifdef HAVE_SYS_IMMU_H +# include +#endif /* HAVE_SYS_IMMU_H */ +])]) +dnl ====================================================================== diff --git a/dist/am-utils/mk-amd-map/Makefile.am b/dist/am-utils/mk-amd-map/Makefile.am index 06d67e85f9c8..527b6d5e1db9 100644 --- a/dist/am-utils/mk-amd-map/Makefile.am +++ b/dist/am-utils/mk-amd-map/Makefile.am @@ -14,7 +14,7 @@ man_MANS = mk-amd-map.8 mk_amd_map_SOURCES = mk-amd-map.c -#LDADD = ../libamu/libamu.la +LDADD = ../libamu/libamu.la INCLUDES = -I$(top_srcdir)/include diff --git a/dist/am-utils/scripts/Makefile.am b/dist/am-utils/scripts/Makefile.am index 4bfe69daa83e..2fcfabc85e04 100644 --- a/dist/am-utils/scripts/Makefile.am +++ b/dist/am-utils/scripts/Makefile.am @@ -18,7 +18,8 @@ sbin_SCRIPTS = \ wait4amd2die noinst_SCRIPTS = \ - redhat-ctl-amd + redhat-ctl-amd \ + test-attrcache bin_SCRIPTS = expn diff --git a/dist/am-utils/scripts/test-attrcache.in b/dist/am-utils/scripts/test-attrcache.in new file mode 100755 index 000000000000..061308b42dbe --- /dev/null +++ b/dist/am-utils/scripts/test-attrcache.in @@ -0,0 +1,135 @@ +#!/bin/sh +# Script to test the attribute cache behavior of the local OS client. +# If this script fails, it means that Amd cannot turn off the attrcache +# reliably on this host, and Amd therefore may not run reliably. See +# the README.attrcache file distributed with this am-utils. +# -Erez Zadok, September 29, 2005 + +# set PATH (must install am-utils first) +prefix=@prefix@ +exec_prefix=@exec_prefix@ +PATH=@sbindir@:@bindir@:/usr/ucb:/usr/bin:/bin:${PATH} +export PATH + +# test if amd is running +amq -p > /dev/null 2>&1 +if test $? = 0 +then + echo "### Amd already running... please shutdown Amd first" + exit 1 +fi + +mapfile="/tmp/amd.testmap.$$" +logfile="/var/log/amd" +delay=1 +a=/a + +CreateMap1 () { + echo "### Creating correct map" + cat - >$mapfile <$mapfile <