diff options
author | grant <grant> | 2003-06-10 05:59:16 +0000 |
---|---|---|
committer | grant <grant> | 2003-06-10 05:59:16 +0000 |
commit | b1e9c4b47152095d8f223c7ad4295545898a2590 (patch) | |
tree | d65a3113654d952c67f8f3b31303d8cc2267c724 /pkgtools | |
parent | 1fb487656bb399791a352460aea2b1df28daf0a6 (diff) | |
download | pkgsrc-b1e9c4b47152095d8f223c7ad4295545898a2590.tar.gz |
test for both getmode() and setmode().
Diffstat (limited to 'pkgtools')
-rw-r--r-- | pkgtools/libnbcompat/files/Makefile.in | 4 | ||||
-rw-r--r-- | pkgtools/libnbcompat/files/config.h.in | 5 | ||||
-rwxr-xr-x | pkgtools/libnbcompat/files/configure | 88 | ||||
-rw-r--r-- | pkgtools/libnbcompat/files/configure.ac | 3 |
4 files changed, 94 insertions, 6 deletions
diff --git a/pkgtools/libnbcompat/files/Makefile.in b/pkgtools/libnbcompat/files/Makefile.in index 945c9c2d7a9..f879bc39466 100644 --- a/pkgtools/libnbcompat/files/Makefile.in +++ b/pkgtools/libnbcompat/files/Makefile.in @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.in,v 1.3 2003/03/31 08:41:06 grant Exp $ +# $NetBSD: Makefile.in,v 1.4 2003/06/10 05:59:16 grant Exp $ # srcdir = @srcdir@ @@ -21,7 +21,7 @@ LIB = libnbcompat.a OBJS = @LIBOBJS@ \ md5c.o md5hl.o rmd160.o rmd160hl.o sha1.o sha1hl.o \ sha2.o sha2hl.o unvis.o vis.o setmode.o __fts13.o \ - getid.o misc.o pack_dev.o spec.o stat_flags.o \ + getid.o misc.o pack_dev.o spec.o setmode.o stat_flags.o \ pwcache.o LINK= = $(CCLD) $(CFLAGS) $(LDFLAGS) -o $@ diff --git a/pkgtools/libnbcompat/files/config.h.in b/pkgtools/libnbcompat/files/config.h.in index 9b0bc8b431b..f623bedef1d 100644 --- a/pkgtools/libnbcompat/files/config.h.in +++ b/pkgtools/libnbcompat/files/config.h.in @@ -1,5 +1,5 @@ /* config.h.in. Generated from configure.ac by autoheader. */ -/* $Id: config.h.in,v 1.4 2003/06/09 17:19:49 grant Exp $ */ +/* $Id: config.h.in,v 1.5 2003/06/10 05:59:16 grant Exp $ */ /* Define if *printf() uses %qd to print `long long' (otherwise uses %lld) */ #undef HAVE_PRINTF_QD @@ -63,6 +63,9 @@ /* Define to 1 if you have the `getenv' function. */ #undef HAVE_GETENV +/* Define to 1 if you have the `getmode' function. */ +#undef HAVE_GETMODE + /* Define to 1 if you have the `getpassphrase' function. */ #undef HAVE_GETPASSPHRASE diff --git a/pkgtools/libnbcompat/files/configure b/pkgtools/libnbcompat/files/configure index 25c34ac2ba5..5cacc9cd755 100755 --- a/pkgtools/libnbcompat/files/configure +++ b/pkgtools/libnbcompat/files/configure @@ -5733,10 +5733,9 @@ done - for ac_func in err fgetln fseeko getenv glob inet_ntop \ inet_pton isblank lchflags lchmod lchown lutimes mkstemp \ - setenv setmode setprogname sl_init snprintf strdup strerror \ + setenv setprogname sl_init snprintf strdup strerror \ strlcat strlcpy strmode strptime strsep strtoll timegm \ usleep do @@ -6088,6 +6087,91 @@ done +for ac_func in getmode setmode +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + + for ac_func in statfs statvfs do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` diff --git a/pkgtools/libnbcompat/files/configure.ac b/pkgtools/libnbcompat/files/configure.ac index df27d27123f..cb357861c5d 100644 --- a/pkgtools/libnbcompat/files/configure.ac +++ b/pkgtools/libnbcompat/files/configure.ac @@ -69,13 +69,14 @@ AC_FUNC_VPRINTF AC_REPLACE_FUNCS([err fgetln fseeko getenv glob inet_ntop \ inet_pton isblank lchflags lchmod lchown lutimes mkstemp \ - setenv setmode setprogname sl_init snprintf strdup strerror \ + setenv setprogname sl_init snprintf strdup strerror \ strlcat strlcpy strmode strptime strsep strtoll timegm \ usleep]) AC_CHECK_FUNCS([MD5File RMD160File SHA1File]) AC_CHECK_FUNCS([setgroupent setgrent setpassent setpwent]) AC_CHECK_FUNCS([bcopy bzero memset memcpy setlocale]) +AC_CHECK_FUNCS([getmode setmode]) AC_CHECK_FUNCS([statfs statvfs]) AC_CHECK_FUNCS([gid_from_group group_from_gid pwcache_groupdb pwcache_userdb \ uid_from_user user_from_uid]) |