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.
This commit is contained in:
parent
9f3be9d257
commit
25010febb3
|
@ -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 <rage@ucl.ac.uk>
|
||||
January 17, 2005: prevent Amd from logging 'Read-only filesystem' errors
|
||||
|
@ -423,3 +424,6 @@ expects.
|
|||
* Graeme Wilford <G.Wilford@surrey.ac.uk>
|
||||
July 4, 2005: buffer overflow in pawd.
|
||||
|
||||
* Steve Plite <splite-amutils@sigint.cs.purdue.edu>
|
||||
September 22, 2005: repair reversed meaning of D_AMQ, so amq will unregister
|
||||
on exit.
|
||||
|
|
|
@ -1,3 +1,267 @@
|
|||
2005-10-10 Erez Zadok <ezk@cs.sunysb.edu>
|
||||
|
||||
*******************************************************************
|
||||
*** Released am-utils-6.1.3 ***
|
||||
*******************************************************************
|
||||
|
||||
2005-10-07 Erez Zadok <ezk@cs.sunysb.edu>
|
||||
|
||||
* 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 <sys/immu.h> 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 <ezk@cs.sunysb.edu>
|
||||
|
||||
* 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 <ro@TechFak.Uni-Bielefeld.DE>
|
||||
|
||||
* 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 <ezk@cs.sunysb.edu>
|
||||
|
||||
* 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 <ezk@cs.sunysb.edu>
|
||||
|
||||
* 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 <ezk@cs.sunysb.edu>
|
||||
|
||||
* 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 <ezk@cs.sunysb.edu>
|
||||
|
||||
* 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 <sys/statvfs.h> 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
|
||||
<sys/statvfs.h>.
|
||||
|
||||
* 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 <christos@zoulas.com>
|
||||
|
||||
* 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 <ezk@cs.sunysb.edu>
|
||||
|
||||
* 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
|
||||
<jon+amd@spock.org>.
|
||||
|
||||
* 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 <ezk@cs.sunysb.edu>
|
||||
|
||||
* libamu/xutil.c (unregister_amq): repair broken meaning of D_AMQ,
|
||||
which was reversed in am-utils-6.2. Bug fix from Steve Plite
|
||||
<splite-amutils at sigint.cs.purdue.edu>.
|
||||
|
||||
* 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 <ezk@cs.sunysb.edu>
|
||||
|
||||
*******************************************************************
|
||||
|
|
|
@ -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 -
|
||||
|
|
|
@ -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 \
|
||||
|
|
|
@ -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 \
|
||||
|
|
|
@ -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
|
||||
* 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:
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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 <sys/param.h>
|
||||
|
@ -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?])
|
||||
|
||||
|
@ -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`
|
||||
|
@ -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 </dev/null` in
|
||||
*GNU* | *'with BFD'*)
|
||||
|
@ -5897,7 +5989,7 @@ AC_PROG_LD_GNU
|
|||
AC_DEFUN([AC_PROG_LD_GNU],
|
||||
[AC_REQUIRE([AC_PROG_EGREP])dnl
|
||||
AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
|
||||
[# 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 </dev/null` in
|
||||
*GNU* | *'with BFD'*)
|
||||
lt_cv_prog_gnu_ld=yes
|
||||
|
@ -6011,7 +6103,7 @@ gnu*)
|
|||
|
||||
hpux10.20* | hpux11*)
|
||||
lt_cv_file_magic_cmd=/usr/bin/file
|
||||
case "$host_cpu" in
|
||||
case $host_cpu in
|
||||
ia64*)
|
||||
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
|
||||
lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
|
||||
|
@ -6185,13 +6277,13 @@ esac
|
|||
# -----------------------------------
|
||||
# sets LIBLTDL to the link flags for the libltdl convenience library and
|
||||
# LTDLINCL to the include flags for the libltdl header and adds
|
||||
# --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL
|
||||
# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
|
||||
# DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will
|
||||
# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
|
||||
# '${top_srcdir}/' (note the single quotes!). If your package is not
|
||||
# flat and you're not using automake, define top_builddir and
|
||||
# top_srcdir appropriately in the Makefiles.
|
||||
# --enable-ltdl-convenience to the configure arguments. Note that
|
||||
# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
|
||||
# it is assumed to be `libltdl'. LIBLTDL will be prefixed with
|
||||
# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
|
||||
# (note the single quotes!). If your package is not flat and you're not
|
||||
# using automake, define top_builddir and top_srcdir appropriately in
|
||||
# the Makefiles.
|
||||
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
|
||||
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||
case $enable_ltdl_convenience in
|
||||
|
@ -6210,13 +6302,13 @@ AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
|
|||
# -----------------------------------
|
||||
# sets LIBLTDL to the link flags for the libltdl installable library and
|
||||
# LTDLINCL to the include flags for the libltdl header and adds
|
||||
# --enable-ltdl-install to the configure arguments. Note that LIBLTDL
|
||||
# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
|
||||
# DIRECTORY is not provided and an installed libltdl is not found, it is
|
||||
# assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/'
|
||||
# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
|
||||
# quotes!). If your package is not flat and you're not using automake,
|
||||
# define top_builddir and top_srcdir appropriately in the Makefiles.
|
||||
# --enable-ltdl-install to the configure arguments. Note that
|
||||
# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
|
||||
# and an installed libltdl is not found, it is assumed to be `libltdl'.
|
||||
# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
|
||||
# '${top_srcdir}/' (note the single quotes!). If your package is not
|
||||
# flat and you're not using automake, define top_builddir and top_srcdir
|
||||
# appropriately in the Makefiles.
|
||||
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
|
||||
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
|
||||
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||
|
@ -6399,7 +6491,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
|
||||
|
@ -6466,7 +6558,7 @@ _LT_AC_TAGVAR(postdeps, $1)=
|
|||
_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
|
||||
|
||||
# Source file extension for C++ test sources.
|
||||
ac_ext=cc
|
||||
ac_ext=cpp
|
||||
|
||||
# Object file extension for compiled C++ test sources.
|
||||
objext=o
|
||||
|
@ -6682,7 +6774,7 @@ case $host_os in
|
|||
# Exported symbols can be pulled into shared objects from archives
|
||||
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
|
||||
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
|
||||
# This is similar to how AIX traditionally builds it's shared libraries.
|
||||
# This is similar to how AIX traditionally builds its shared libraries.
|
||||
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$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
|
||||
|
@ -6721,7 +6813,7 @@ case $host_os in
|
|||
fi
|
||||
;;
|
||||
darwin* | rhapsody*)
|
||||
case "$host_os" in
|
||||
case $host_os in
|
||||
rhapsody* | darwin1.[[012]])
|
||||
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
|
||||
;;
|
||||
|
@ -6759,7 +6851,7 @@ case $host_os in
|
|||
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
|
||||
fi
|
||||
_LT_AC_TAGVAR(module_cmds, $1)='$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
|
||||
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
|
||||
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
|
||||
else
|
||||
|
@ -6772,7 +6864,7 @@ case $host_os in
|
|||
output_verbose_link_cmd='echo'
|
||||
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
|
||||
_LT_AC_TAGVAR(module_cmds, $1)='$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
|
||||
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
|
||||
_LT_AC_TAGVAR(module_expsym_cmds, $1)='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}'
|
||||
;;
|
||||
|
@ -6852,7 +6944,7 @@ case $host_os in
|
|||
;;
|
||||
hpux10*|hpux11*)
|
||||
if test $with_gnu_ld = no; then
|
||||
case "$host_cpu" in
|
||||
case $host_cpu in
|
||||
hppa*64*)
|
||||
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
|
||||
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
|
||||
|
@ -6868,7 +6960,7 @@ case $host_os in
|
|||
;;
|
||||
esac
|
||||
fi
|
||||
case "$host_cpu" in
|
||||
case $host_cpu in
|
||||
hppa*64*)
|
||||
_LT_AC_TAGVAR(hardcode_direct, $1)=no
|
||||
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
|
||||
|
@ -6894,7 +6986,7 @@ case $host_os in
|
|||
_LT_AC_TAGVAR(ld_shlibs, $1)=no
|
||||
;;
|
||||
aCC*)
|
||||
case "$host_cpu" in
|
||||
case $host_cpu in
|
||||
hppa*64*|ia64*)
|
||||
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
|
||||
;;
|
||||
|
@ -6915,7 +7007,7 @@ case $host_os in
|
|||
*)
|
||||
if test "$GXX" = yes; then
|
||||
if test $with_gnu_ld = no; then
|
||||
case "$host_cpu" in
|
||||
case $host_cpu in
|
||||
ia64*|hppa*64*)
|
||||
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
|
||||
;;
|
||||
|
@ -7016,7 +7108,7 @@ case $host_os in
|
|||
|
||||
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
|
||||
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
|
||||
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive,`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
|
||||
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
|
||||
;;
|
||||
cxx*)
|
||||
# Compaq C++
|
||||
|
@ -7248,10 +7340,11 @@ case $host_os in
|
|||
case $cc_basename in
|
||||
CC*)
|
||||
# Sun C++ 4.2, 5.x and Centerline C++
|
||||
_LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
|
||||
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
|
||||
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
|
||||
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
|
||||
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
|
||||
$CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
|
||||
$CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
|
||||
|
||||
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
|
||||
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
|
||||
|
@ -7271,15 +7364,7 @@ case $host_os in
|
|||
esac
|
||||
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
|
||||
|
||||
# Commands to make compiler produce verbose output that lists
|
||||
# what "hidden" libraries, object files and flags are used when
|
||||
# linking a shared library.
|
||||
#
|
||||
# There doesn't appear to be a way to prevent this compiler from
|
||||
# explicitly linking system object files so we need to strip them
|
||||
# from the output so that they don't get included in the library
|
||||
# dependencies.
|
||||
output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
|
||||
output_verbose_link_cmd='echo'
|
||||
|
||||
# Archives containing C++ object files must be created using
|
||||
# "CC -xar", where "CC" is the Sun C++ compiler. This is
|
||||
|
@ -7440,7 +7525,7 @@ if AC_TRY_EVAL(ac_compile); then
|
|||
# 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
|
||||
|
@ -7516,6 +7601,21 @@ fi
|
|||
|
||||
$rm -f confest.$objext
|
||||
|
||||
# PORTME: override above test on systems where it is broken
|
||||
ifelse([$1],[CXX],
|
||||
[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.
|
||||
_LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
|
||||
;;
|
||||
esac
|
||||
esac
|
||||
])
|
||||
|
||||
case " $_LT_AC_TAGVAR(postdeps, $1) " in
|
||||
*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
|
||||
esac
|
||||
|
@ -7585,7 +7685,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
|
||||
|
@ -8488,7 +8588,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
|
|||
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*)
|
||||
;;
|
||||
*)
|
||||
|
@ -8557,7 +8657,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
|
|||
aCC*)
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${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
|
||||
;;
|
||||
|
@ -8598,7 +8698,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
|
|||
# Portland Group C++ compiler.
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
|
||||
;;
|
||||
cxx*)
|
||||
# Compaq C++
|
||||
|
@ -8762,7 +8862,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
|
|||
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
|
||||
;;
|
||||
|
@ -8809,7 +8909,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
|
|||
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-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
|
||||
;;
|
||||
|
@ -8839,12 +8939,12 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
|
|||
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
|
||||
;;
|
||||
pgcc* | pgf77* | pgf90*)
|
||||
pgcc* | pgf77* | pgf90* | pgf95*)
|
||||
# Portland Group compilers (*not* the Pentium gcc compiler,
|
||||
# which looks to be a dead project)
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
|
||||
;;
|
||||
ccc*)
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
|
||||
|
@ -8927,7 +9027,7 @@ if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
|
|||
[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
|
||||
fi
|
||||
case "$host_os" in
|
||||
case $host_os in
|
||||
# For platforms which do not support PIC, -DPIC is meaningless:
|
||||
*djgpp*)
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
|
||||
|
@ -9118,11 +9218,11 @@ EOF
|
|||
tmp_addflag=
|
||||
case $cc_basename,$host_cpu in
|
||||
pgcc*) # Portland Group C compiler
|
||||
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive,`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
|
||||
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${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
|
||||
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${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
|
||||
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${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' ;;
|
||||
|
@ -9328,7 +9428,7 @@ EOF
|
|||
# Exported symbols can be pulled into shared objects from archives
|
||||
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
|
||||
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
|
||||
# This is similar to how AIX traditionally builds it's shared libraries.
|
||||
# This is similar to how AIX traditionally builds its shared libraries.
|
||||
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$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
|
||||
|
@ -9368,7 +9468,7 @@ EOF
|
|||
;;
|
||||
|
||||
darwin* | rhapsody*)
|
||||
case "$host_os" in
|
||||
case $host_os in
|
||||
rhapsody* | darwin1.[[012]])
|
||||
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
|
||||
;;
|
||||
|
@ -9397,7 +9497,7 @@ EOF
|
|||
output_verbose_link_cmd='echo'
|
||||
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
|
||||
_LT_AC_TAGVAR(module_cmds, $1)='$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
|
||||
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='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}'
|
||||
_LT_AC_TAGVAR(module_expsym_cmds, $1)='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
|
||||
|
@ -9406,7 +9506,7 @@ EOF
|
|||
output_verbose_link_cmd='echo'
|
||||
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
|
||||
_LT_AC_TAGVAR(module_cmds, $1)='$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
|
||||
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='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}'
|
||||
_LT_AC_TAGVAR(module_expsym_cmds, $1)='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}'
|
||||
;;
|
||||
|
@ -9472,7 +9572,7 @@ EOF
|
|||
|
||||
hpux10* | hpux11*)
|
||||
if test "$GCC" = yes -a "$with_gnu_ld" = no; then
|
||||
case "$host_cpu" in
|
||||
case $host_cpu in
|
||||
hppa*64*|ia64*)
|
||||
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
|
||||
;;
|
||||
|
@ -9481,7 +9581,7 @@ EOF
|
|||
;;
|
||||
esac
|
||||
else
|
||||
case "$host_cpu" in
|
||||
case $host_cpu in
|
||||
hppa*64*|ia64*)
|
||||
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
|
||||
;;
|
||||
|
@ -9491,7 +9591,7 @@ EOF
|
|||
esac
|
||||
fi
|
||||
if test "$with_gnu_ld" = no; then
|
||||
case "$host_cpu" in
|
||||
case $host_cpu in
|
||||
hppa*64*)
|
||||
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
|
||||
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
|
||||
|
@ -10159,10 +10259,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]]* )
|
||||
|
@ -11058,6 +11154,23 @@ fi
|
|||
dnl ======================================================================
|
||||
|
||||
|
||||
dnl ######################################################################
|
||||
dnl check for type of pte_t (for Irix, usually in <sys/immu.h>)
|
||||
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 <sys/immu.h>])],
|
||||
[
|
||||
#ifdef HAVE_SYS_IMMU_H
|
||||
# include <sys/immu.h>
|
||||
#endif /* HAVE_SYS_IMMU_H */
|
||||
])])
|
||||
dnl ======================================================================
|
||||
|
||||
|
||||
dnl ######################################################################
|
||||
dnl check the correct type for the 6th argument to recvfrom()
|
||||
AC_DEFUN([AMU_TYPE_RECVFROM_FROMLEN],
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 */
|
||||
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)
|
||||
);
|
||||
+ 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));
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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
|
||||
|
@ -207,3 +207,19 @@ amqproc_getpid_1(voidp argp, CLIENT *clnt)
|
|||
}
|
||||
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);
|
||||
}
|
||||
return (&res);
|
||||
}
|
||||
|
|
|
@ -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,9 +783,9 @@ 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",
|
||||
xsnprintf(opts, l, "fd=%d,minproto=%d,maxproto=%d",
|
||||
fh->kernelfd, AUTOFS_MIN_VERSION, AUTOFS_MAX_VERSION);
|
||||
}
|
||||
|
||||
|
|
|
@ -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,9 +702,9 @@ 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",
|
||||
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 */
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
#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)
|
||||
|
|
|
@ -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,9 +1276,9 @@ 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",
|
||||
xsnprintf(opts, l, "%sdirect",
|
||||
fh->direct ? "" : "in");
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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() */
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -63,7 +63,11 @@ case "${GCONFIG}" in
|
|||
echo ${GCONFIG}
|
||||
fi
|
||||
;;
|
||||
* ) echo ${GCONFIG}
|
||||
*netbsdelf3* ) # remove trailing '.' from beta
|
||||
echo ${GCONFIG} | sed 's/\.$//g'
|
||||
;;
|
||||
* )
|
||||
echo ${GCONFIG}
|
||||
;;
|
||||
esac
|
||||
exit 0
|
||||
|
|
|
@ -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 <gdbm/ndbm.h> header file. */
|
||||
#undef HAVE_GDBM_NDBM_H
|
||||
|
||||
|
@ -857,6 +875,12 @@
|
|||
/* Define to 1 if you have the <statbuf.h> 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 <stdarg.h> header file. */
|
||||
#undef HAVE_STDARG_H
|
||||
|
||||
|
@ -1007,6 +1031,9 @@
|
|||
/* Define to 1 if you have the <sys/fs/xfs_clnt.h> header file. */
|
||||
#undef HAVE_SYS_FS_XFS_CLNT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/immu.h> header file. */
|
||||
#undef HAVE_SYS_IMMU_H
|
||||
|
||||
/* Define to 1 if you have the <sys/ioctl.h> header file. */
|
||||
#undef HAVE_SYS_IOCTL_H
|
||||
|
||||
|
@ -1067,6 +1094,9 @@
|
|||
/* Define to 1 if you have the <sys/statfs.h> header file. */
|
||||
#undef HAVE_SYS_STATFS_H
|
||||
|
||||
/* Define to 1 if you have the <sys/statvfs.h> header file. */
|
||||
#undef HAVE_SYS_STATVFS_H
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> 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 <sys/types.h> does not define. */
|
||||
#undef pid_t
|
||||
|
||||
/* Check if pte_t is defined in <sys/immu.h> */
|
||||
#undef pte_t
|
||||
|
||||
/* Define a type for the rfs_args structure */
|
||||
#undef rfs_args_t
|
||||
|
||||
|
|
|
@ -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 <config-patches@gnu.org>. 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)
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -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 ######################################################################
|
||||
|
|
|
@ -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]) {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 <config.h>
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
#include <am_defs.h>
|
||||
#include <amu.h>
|
||||
|
||||
|
||||
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;
|
||||
}
|
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
|
|
@ -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 <sys/param.h>
|
||||
|
@ -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
|
||||
|
||||
|
|
|
@ -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 ======================================================================
|
|
@ -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
|
||||
:
|
||||
|
|
|
@ -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?])
|
||||
|
||||
|
|
|
@ -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`
|
||||
|
@ -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 </dev/null` in
|
||||
*GNU* | *'with BFD'*)
|
||||
|
@ -2123,7 +2131,7 @@ AC_PROG_LD_GNU
|
|||
AC_DEFUN([AC_PROG_LD_GNU],
|
||||
[AC_REQUIRE([AC_PROG_EGREP])dnl
|
||||
AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
|
||||
[# 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 </dev/null` in
|
||||
*GNU* | *'with BFD'*)
|
||||
lt_cv_prog_gnu_ld=yes
|
||||
|
@ -2237,7 +2245,7 @@ gnu*)
|
|||
|
||||
hpux10.20* | hpux11*)
|
||||
lt_cv_file_magic_cmd=/usr/bin/file
|
||||
case "$host_cpu" in
|
||||
case $host_cpu in
|
||||
ia64*)
|
||||
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
|
||||
lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
|
||||
|
@ -2411,13 +2419,13 @@ esac
|
|||
# -----------------------------------
|
||||
# sets LIBLTDL to the link flags for the libltdl convenience library and
|
||||
# LTDLINCL to the include flags for the libltdl header and adds
|
||||
# --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL
|
||||
# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
|
||||
# DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will
|
||||
# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
|
||||
# '${top_srcdir}/' (note the single quotes!). If your package is not
|
||||
# flat and you're not using automake, define top_builddir and
|
||||
# top_srcdir appropriately in the Makefiles.
|
||||
# --enable-ltdl-convenience to the configure arguments. Note that
|
||||
# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
|
||||
# it is assumed to be `libltdl'. LIBLTDL will be prefixed with
|
||||
# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
|
||||
# (note the single quotes!). If your package is not flat and you're not
|
||||
# using automake, define top_builddir and top_srcdir appropriately in
|
||||
# the Makefiles.
|
||||
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
|
||||
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||
case $enable_ltdl_convenience in
|
||||
|
@ -2436,13 +2444,13 @@ AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
|
|||
# -----------------------------------
|
||||
# sets LIBLTDL to the link flags for the libltdl installable library and
|
||||
# LTDLINCL to the include flags for the libltdl header and adds
|
||||
# --enable-ltdl-install to the configure arguments. Note that LIBLTDL
|
||||
# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
|
||||
# DIRECTORY is not provided and an installed libltdl is not found, it is
|
||||
# assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/'
|
||||
# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
|
||||
# quotes!). If your package is not flat and you're not using automake,
|
||||
# define top_builddir and top_srcdir appropriately in the Makefiles.
|
||||
# --enable-ltdl-install to the configure arguments. Note that
|
||||
# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
|
||||
# and an installed libltdl is not found, it is assumed to be `libltdl'.
|
||||
# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
|
||||
# '${top_srcdir}/' (note the single quotes!). If your package is not
|
||||
# flat and you're not using automake, define top_builddir and top_srcdir
|
||||
# appropriately in the Makefiles.
|
||||
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
|
||||
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
|
||||
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||
|
@ -2625,7 +2633,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
|
||||
|
@ -2692,7 +2700,7 @@ _LT_AC_TAGVAR(postdeps, $1)=
|
|||
_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
|
||||
|
||||
# Source file extension for C++ test sources.
|
||||
ac_ext=cc
|
||||
ac_ext=cpp
|
||||
|
||||
# Object file extension for compiled C++ test sources.
|
||||
objext=o
|
||||
|
@ -2908,7 +2916,7 @@ case $host_os in
|
|||
# Exported symbols can be pulled into shared objects from archives
|
||||
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
|
||||
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
|
||||
# This is similar to how AIX traditionally builds it's shared libraries.
|
||||
# This is similar to how AIX traditionally builds its shared libraries.
|
||||
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$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
|
||||
|
@ -2947,7 +2955,7 @@ case $host_os in
|
|||
fi
|
||||
;;
|
||||
darwin* | rhapsody*)
|
||||
case "$host_os" in
|
||||
case $host_os in
|
||||
rhapsody* | darwin1.[[012]])
|
||||
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
|
||||
;;
|
||||
|
@ -2985,7 +2993,7 @@ case $host_os in
|
|||
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
|
||||
fi
|
||||
_LT_AC_TAGVAR(module_cmds, $1)='$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
|
||||
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
|
||||
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
|
||||
else
|
||||
|
@ -2998,7 +3006,7 @@ case $host_os in
|
|||
output_verbose_link_cmd='echo'
|
||||
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
|
||||
_LT_AC_TAGVAR(module_cmds, $1)='$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
|
||||
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
|
||||
_LT_AC_TAGVAR(module_expsym_cmds, $1)='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}'
|
||||
;;
|
||||
|
@ -3078,7 +3086,7 @@ case $host_os in
|
|||
;;
|
||||
hpux10*|hpux11*)
|
||||
if test $with_gnu_ld = no; then
|
||||
case "$host_cpu" in
|
||||
case $host_cpu in
|
||||
hppa*64*)
|
||||
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
|
||||
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
|
||||
|
@ -3094,7 +3102,7 @@ case $host_os in
|
|||
;;
|
||||
esac
|
||||
fi
|
||||
case "$host_cpu" in
|
||||
case $host_cpu in
|
||||
hppa*64*)
|
||||
_LT_AC_TAGVAR(hardcode_direct, $1)=no
|
||||
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
|
||||
|
@ -3120,7 +3128,7 @@ case $host_os in
|
|||
_LT_AC_TAGVAR(ld_shlibs, $1)=no
|
||||
;;
|
||||
aCC*)
|
||||
case "$host_cpu" in
|
||||
case $host_cpu in
|
||||
hppa*64*|ia64*)
|
||||
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
|
||||
;;
|
||||
|
@ -3141,7 +3149,7 @@ case $host_os in
|
|||
*)
|
||||
if test "$GXX" = yes; then
|
||||
if test $with_gnu_ld = no; then
|
||||
case "$host_cpu" in
|
||||
case $host_cpu in
|
||||
ia64*|hppa*64*)
|
||||
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
|
||||
;;
|
||||
|
@ -3242,7 +3250,7 @@ case $host_os in
|
|||
|
||||
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
|
||||
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
|
||||
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive,`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
|
||||
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
|
||||
;;
|
||||
cxx*)
|
||||
# Compaq C++
|
||||
|
@ -3474,10 +3482,11 @@ case $host_os in
|
|||
case $cc_basename in
|
||||
CC*)
|
||||
# Sun C++ 4.2, 5.x and Centerline C++
|
||||
_LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
|
||||
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
|
||||
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
|
||||
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
|
||||
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
|
||||
$CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
|
||||
$CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
|
||||
|
||||
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
|
||||
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
|
||||
|
@ -3497,15 +3506,7 @@ case $host_os in
|
|||
esac
|
||||
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
|
||||
|
||||
# Commands to make compiler produce verbose output that lists
|
||||
# what "hidden" libraries, object files and flags are used when
|
||||
# linking a shared library.
|
||||
#
|
||||
# There doesn't appear to be a way to prevent this compiler from
|
||||
# explicitly linking system object files so we need to strip them
|
||||
# from the output so that they don't get included in the library
|
||||
# dependencies.
|
||||
output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
|
||||
output_verbose_link_cmd='echo'
|
||||
|
||||
# Archives containing C++ object files must be created using
|
||||
# "CC -xar", where "CC" is the Sun C++ compiler. This is
|
||||
|
@ -3666,7 +3667,7 @@ if AC_TRY_EVAL(ac_compile); then
|
|||
# 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
|
||||
|
@ -3742,6 +3743,21 @@ fi
|
|||
|
||||
$rm -f confest.$objext
|
||||
|
||||
# PORTME: override above test on systems where it is broken
|
||||
ifelse([$1],[CXX],
|
||||
[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.
|
||||
_LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
|
||||
;;
|
||||
esac
|
||||
esac
|
||||
])
|
||||
|
||||
case " $_LT_AC_TAGVAR(postdeps, $1) " in
|
||||
*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
|
||||
esac
|
||||
|
@ -3811,7 +3827,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
|
||||
|
@ -4714,7 +4730,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
|
|||
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*)
|
||||
;;
|
||||
*)
|
||||
|
@ -4783,7 +4799,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
|
|||
aCC*)
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${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
|
||||
;;
|
||||
|
@ -4824,7 +4840,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
|
|||
# Portland Group C++ compiler.
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
|
||||
;;
|
||||
cxx*)
|
||||
# Compaq C++
|
||||
|
@ -4988,7 +5004,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
|
|||
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
|
||||
;;
|
||||
|
@ -5035,7 +5051,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
|
|||
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-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
|
||||
;;
|
||||
|
@ -5065,12 +5081,12 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
|
|||
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
|
||||
;;
|
||||
pgcc* | pgf77* | pgf90*)
|
||||
pgcc* | pgf77* | pgf90* | pgf95*)
|
||||
# Portland Group compilers (*not* the Pentium gcc compiler,
|
||||
# which looks to be a dead project)
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
|
||||
;;
|
||||
ccc*)
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
|
||||
|
@ -5153,7 +5169,7 @@ if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
|
|||
[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
|
||||
fi
|
||||
case "$host_os" in
|
||||
case $host_os in
|
||||
# For platforms which do not support PIC, -DPIC is meaningless:
|
||||
*djgpp*)
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
|
||||
|
@ -5344,11 +5360,11 @@ EOF
|
|||
tmp_addflag=
|
||||
case $cc_basename,$host_cpu in
|
||||
pgcc*) # Portland Group C compiler
|
||||
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive,`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
|
||||
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${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
|
||||
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${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
|
||||
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${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' ;;
|
||||
|
@ -5554,7 +5570,7 @@ EOF
|
|||
# Exported symbols can be pulled into shared objects from archives
|
||||
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
|
||||
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
|
||||
# This is similar to how AIX traditionally builds it's shared libraries.
|
||||
# This is similar to how AIX traditionally builds its shared libraries.
|
||||
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$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
|
||||
|
@ -5594,7 +5610,7 @@ EOF
|
|||
;;
|
||||
|
||||
darwin* | rhapsody*)
|
||||
case "$host_os" in
|
||||
case $host_os in
|
||||
rhapsody* | darwin1.[[012]])
|
||||
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
|
||||
;;
|
||||
|
@ -5623,7 +5639,7 @@ EOF
|
|||
output_verbose_link_cmd='echo'
|
||||
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
|
||||
_LT_AC_TAGVAR(module_cmds, $1)='$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
|
||||
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='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}'
|
||||
_LT_AC_TAGVAR(module_expsym_cmds, $1)='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
|
||||
|
@ -5632,7 +5648,7 @@ EOF
|
|||
output_verbose_link_cmd='echo'
|
||||
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
|
||||
_LT_AC_TAGVAR(module_cmds, $1)='$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
|
||||
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='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}'
|
||||
_LT_AC_TAGVAR(module_expsym_cmds, $1)='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}'
|
||||
;;
|
||||
|
@ -5698,7 +5714,7 @@ EOF
|
|||
|
||||
hpux10* | hpux11*)
|
||||
if test "$GCC" = yes -a "$with_gnu_ld" = no; then
|
||||
case "$host_cpu" in
|
||||
case $host_cpu in
|
||||
hppa*64*|ia64*)
|
||||
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
|
||||
;;
|
||||
|
@ -5707,7 +5723,7 @@ EOF
|
|||
;;
|
||||
esac
|
||||
else
|
||||
case "$host_cpu" in
|
||||
case $host_cpu in
|
||||
hppa*64*|ia64*)
|
||||
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
|
||||
;;
|
||||
|
@ -5717,7 +5733,7 @@ EOF
|
|||
esac
|
||||
fi
|
||||
if test "$with_gnu_ld" = no; then
|
||||
case "$host_cpu" in
|
||||
case $host_cpu in
|
||||
hppa*64*)
|
||||
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
|
||||
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
|
||||
|
|
|
@ -12,10 +12,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]]* )
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
dnl ######################################################################
|
||||
dnl check for type of pte_t (for Irix, usually in <sys/immu.h>)
|
||||
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 <sys/immu.h>])],
|
||||
[
|
||||
#ifdef HAVE_SYS_IMMU_H
|
||||
# include <sys/immu.h>
|
||||
#endif /* HAVE_SYS_IMMU_H */
|
||||
])])
|
||||
dnl ======================================================================
|
|
@ -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
|
||||
|
||||
|
|
|
@ -18,7 +18,8 @@ sbin_SCRIPTS = \
|
|||
wait4amd2die
|
||||
|
||||
noinst_SCRIPTS = \
|
||||
redhat-ctl-amd
|
||||
redhat-ctl-amd \
|
||||
test-attrcache
|
||||
|
||||
bin_SCRIPTS = expn
|
||||
|
||||
|
|
|
@ -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 <<EOF
|
||||
a type:=link;fs:=/tmp/a
|
||||
EOF
|
||||
}
|
||||
|
||||
CreateMap2 () {
|
||||
echo "### Creating weird map"
|
||||
cat - >$mapfile <<EOF
|
||||
a type:=link;fs:=/tmp/b
|
||||
EOF
|
||||
}
|
||||
|
||||
StopAMD () {
|
||||
ctl-amd stop
|
||||
# do not delete files we may need to use to debug Amd
|
||||
# rm -f /tmp/a /tmp/b $mapfile $logfile
|
||||
}
|
||||
|
||||
touch /tmp/a
|
||||
touch /tmp/b
|
||||
|
||||
CreateMap1
|
||||
echo amd -x all -D all -r -l $logfile $a $mapfile -cache:=mapdefault,sync
|
||||
amd -x all -D all -r -l $logfile $a $mapfile -cache:=mapdefault,sync
|
||||
sleep 3 # give amd chance to start properly
|
||||
amq
|
||||
inode_a=`ls -lLi /tmp/a | awk '{print $1}'`
|
||||
inode_b=`ls -lLi /tmp/b | awk '{print $1}'`
|
||||
ls -lLi $a/a
|
||||
ls -lLi $a/b
|
||||
ls -l $mapfile
|
||||
|
||||
# how many times to try until we call it a success...
|
||||
maxtry=10
|
||||
while test $maxtry -gt 0
|
||||
do
|
||||
echo "$maxtry tries left ..."
|
||||
let maxtry=maxtry-1
|
||||
amq
|
||||
CreateMap1
|
||||
sleep $delay
|
||||
|
||||
ls -l $mapfile
|
||||
echo "### looking at a... should get a"
|
||||
ino=`ls -lLi $a/a | awk '{print $1}'`
|
||||
if test -z "$ino"
|
||||
then
|
||||
ls -li $a/a
|
||||
amq
|
||||
amq -m
|
||||
stat $a
|
||||
echo "a link does not exist!"
|
||||
StopAMD
|
||||
exit 1
|
||||
fi
|
||||
if test $ino -ne $inode_a
|
||||
then
|
||||
ls -li $a/a
|
||||
amq
|
||||
amq -m
|
||||
stat $a
|
||||
echo "a link does not point to A!"
|
||||
StopAMD
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Here is the main trick we try: force amd to flush one entry, then
|
||||
# change the amd map on disk, and then see if the kernel will have
|
||||
# flushed the attribute cache; if it did, then Amd will see the
|
||||
# correctly changed map entry.
|
||||
|
||||
amq -u $a/a
|
||||
sleep $delay
|
||||
stat $a
|
||||
|
||||
CreateMap2
|
||||
sleep $delay
|
||||
|
||||
ls -l $mapfile
|
||||
echo "### looking at a... should get b"
|
||||
ino=`ls -lLi $a/a | awk '{print $1}'`
|
||||
if test -z "$ino"
|
||||
then
|
||||
ls -li $a/a
|
||||
amq
|
||||
amq -m
|
||||
stat $a
|
||||
echo "a link does not exist!"
|
||||
StopAMD
|
||||
exit 1
|
||||
fi
|
||||
if test $ino -ne $inode_b
|
||||
then
|
||||
ls -li $a/a
|
||||
amq
|
||||
amq -m
|
||||
stat $a
|
||||
echo "a link does not point to B!"
|
||||
StopAMD
|
||||
exit 1
|
||||
fi
|
||||
|
||||
amq -u $a/a
|
||||
sleep $delay
|
||||
stat $a
|
||||
done
|
||||
StopAMD
|
|
@ -1 +1 @@
|
|||
[6.1.2.1]dnl
|
||||
[6.1.3]dnl
|
||||
|
|
Loading…
Reference in New Issue