summaryrefslogtreecommitdiff
path: root/source3/lib/replace/system
diff options
context:
space:
mode:
authormetze <metze@0c0555d6-39d7-0310-84fc-f1cc0bd64818>2007-11-06 09:15:11 +0000
committerStefan Metzmacher <metze@samba.org>2007-11-09 09:52:59 +0100
commit05206ce0c29e1272f4ad9c30af66a62e12316d0c (patch)
tree4ec5945a4e0cc9672daad78d02b19dbddaad8910 /source3/lib/replace/system
parent90d034f7cfbe8fc0e18ff054ceabf2435c9f0fd2 (diff)
downloadsamba-05206ce0c29e1272f4ad9c30af66a62e12316d0c.tar.gz
samba-05206ce0c29e1272f4ad9c30af66a62e12316d0c.tar.bz2
samba-05206ce0c29e1272f4ad9c30af66a62e12316d0c.zip
libreplace: solaris has different prototypes for getpwent_r and getgrent_r
metze git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25867 0c0555d6-39d7-0310-84fc-f1cc0bd64818 (This used to be commit 77900d2ba03455412ad645e757ba468ca90453fb)
Diffstat (limited to 'source3/lib/replace/system')
-rw-r--r--source3/lib/replace/system/config.m432
1 files changed, 32 insertions, 0 deletions
diff --git a/source3/lib/replace/system/config.m4 b/source3/lib/replace/system/config.m4
index 2b2f76a8e6..6500535982 100644
--- a/source3/lib/replace/system/config.m4
+++ b/source3/lib/replace/system/config.m4
@@ -19,7 +19,39 @@ AC_CHECK_HEADERS(sys/capability.h)
# passwd
AC_CHECK_HEADERS(grp.h sys/id.h compat.h shadow.h sys/priv.h pwd.h sys/security.h)
AC_CHECK_FUNCS(getpwnam_r getpwuid_r getpwent_r)
+AC_HAVE_DECL(getpwent_r, [
+ #include <unistd.h>
+ #include <pwd.h>
+ ])
+AC_VERIFY_C_PROTOTYPE([struct passwd *getpwent_r(struct passwd *src, char *buf, int buflen)],
+ [
+ #ifndef HAVE_GETPWENT_R_DECL
+ #error missing getpwent_r prototype
+ #endif
+ return NULL;
+ ],[
+ AC_DEFINE(SOLARIS_GETPWENT_R, 1, [getpwent_r solaris function prototype])
+ ],[],[
+ #include <unistd.h>
+ #include <pwd.h>
+ ])
AC_CHECK_FUNCS(getgrnam_r getgrgid_r getgrent_r)
+AC_HAVE_DECL(getgrent_r, [
+ #include <unistd.h>
+ #include <grp.h>
+ ])
+AC_VERIFY_C_PROTOTYPE([struct group *getgrent_r(struct group *src, char *buf, int buflen)],
+ [
+ #ifndef HAVE_GETGRENT_R_DECL
+ #error missing getgrent_r prototype
+ #endif
+ return NULL;
+ ],[
+ AC_DEFINE(SOLARIS_GETGRENT_R, 1, [getgrent_r solaris function prototype])
+ ],[],[
+ #include <unistd.h>
+ #include <grp.h>
+ ])
# locale
AC_CHECK_HEADERS(ctype.h locale.h)