diff options
author | obache <obache@pkgsrc.org> | 2013-02-10 12:38:52 +0000 |
---|---|---|
committer | obache <obache@pkgsrc.org> | 2013-02-10 12:38:52 +0000 |
commit | c96e577cea0943d4a36c985e1ef8f4ad17adf788 (patch) | |
tree | ba951cd1e8b5e28d28a813faaf987ad670394fbf /pkgtools | |
parent | eca278535f052b3a85886eb73276aa55503ce593 (diff) | |
download | pkgsrc-c96e577cea0943d4a36c985e1ef8f4ad17adf788.tar.gz |
check missing declaration of setpassent(3) for Cygwin.
Diffstat (limited to 'pkgtools')
-rwxr-xr-x | pkgtools/libnbcompat/files/configure | 10 | ||||
-rw-r--r-- | pkgtools/libnbcompat/files/configure.ac | 4 | ||||
-rw-r--r-- | pkgtools/libnbcompat/files/nbcompat/config.h.in | 4 | ||||
-rw-r--r-- | pkgtools/libnbcompat/files/nbcompat/pwd.h | 4 |
4 files changed, 18 insertions, 4 deletions
diff --git a/pkgtools/libnbcompat/files/configure b/pkgtools/libnbcompat/files/configure index dcb871d9038..eb5d92c0704 100755 --- a/pkgtools/libnbcompat/files/configure +++ b/pkgtools/libnbcompat/files/configure @@ -6641,6 +6641,16 @@ fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_ENDPWENT $ac_have_decl _ACEOF +ac_fn_c_check_decl "$LINENO" "setpassent" "ac_cv_have_decl_setpassent" "$ac_includes_default" +if test "x$ac_cv_have_decl_setpassent" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_SETPASSENT $ac_have_decl +_ACEOF need_pwcache=no diff --git a/pkgtools/libnbcompat/files/configure.ac b/pkgtools/libnbcompat/files/configure.ac index 2ed63eac4c1..5cbb0997af3 100644 --- a/pkgtools/libnbcompat/files/configure.ac +++ b/pkgtools/libnbcompat/files/configure.ac @@ -1,4 +1,4 @@ -dnl $NetBSD: configure.ac,v 1.79 2012/07/02 16:02:53 joerg Exp $ +dnl $NetBSD: configure.ac,v 1.80 2013/02/10 12:38:52 obache Exp $ dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.52) @@ -347,7 +347,7 @@ if test $need_setmode = yes; then AC_LIBOBJ(setmode) fi -AC_CHECK_DECLS([endgrent, endpwent]) +AC_CHECK_DECLS([endgrent, endpwent, setpassent]) need_pwcache=no AC_CHECK_FUNCS([gid_from_group group_from_gid pwcache_groupdb \ diff --git a/pkgtools/libnbcompat/files/nbcompat/config.h.in b/pkgtools/libnbcompat/files/nbcompat/config.h.in index ca86087d2ed..19b0ffdfc77 100644 --- a/pkgtools/libnbcompat/files/nbcompat/config.h.in +++ b/pkgtools/libnbcompat/files/nbcompat/config.h.in @@ -50,6 +50,10 @@ don't. */ #undef HAVE_DECL_OPTRESET +/* Define to 1 if you have the declaration of `setpassent', and to 0 if you + don't. */ +#undef HAVE_DECL_SETPASSENT + /* Define to 1 if you have the declaration of `snprintf', and to 0 if you don't. */ #undef HAVE_DECL_SNPRINTF diff --git a/pkgtools/libnbcompat/files/nbcompat/pwd.h b/pkgtools/libnbcompat/files/nbcompat/pwd.h index 58c476279cf..b4028d3a817 100644 --- a/pkgtools/libnbcompat/files/nbcompat/pwd.h +++ b/pkgtools/libnbcompat/files/nbcompat/pwd.h @@ -1,4 +1,4 @@ -/* $NetBSD: pwd.h,v 1.3 2008/09/08 20:20:23 joerg Exp $ */ +/* $NetBSD: pwd.h,v 1.4 2013/02/10 12:38:52 obache Exp $ */ /*- * Copyright (c) 2004 The NetBSD Foundation, Inc. @@ -40,7 +40,7 @@ * Declare functions that may be missing in <pwd.h>. */ -#if !HAVE_SETPASSENT +#if !HAVE_SETPASSENT || !HAVE_DECL_SETPASSENT int setpassent(int); #endif |