summaryrefslogtreecommitdiff
path: root/source4/lib/replace/system
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2008-01-22 12:21:55 +0100
committerStefan Metzmacher <metze@samba.org>2008-01-22 12:24:05 +0100
commitadbbc8dcc65997d4c2a555f188a980e6622a309d (patch)
treedf37a2766278db31866c37dabb20d7b559422c0e /source4/lib/replace/system
parent24efc9fc36194d379838eb9911b65e93535da19b (diff)
downloadsamba-adbbc8dcc65997d4c2a555f188a980e6622a309d.tar.gz
samba-adbbc8dcc65997d4c2a555f188a980e6622a309d.tar.bz2
samba-adbbc8dcc65997d4c2a555f188a980e6622a309d.zip
libreplace: getpwent_r/getgrent_r on IRIX are similar to solaris but use size_t
metze (cherry picked from commit 2f460915111066d79f5dc9b4ae4d003918d06852) (This used to be commit d2ac8be28d3aff59eddbdc6189a255a34c10d502)
Diffstat (limited to 'source4/lib/replace/system')
-rw-r--r--source4/lib/replace/system/config.m425
1 files changed, 25 insertions, 0 deletions
diff --git a/source4/lib/replace/system/config.m4 b/source4/lib/replace/system/config.m4
index 799187af7d..1c05733126 100644
--- a/source4/lib/replace/system/config.m4
+++ b/source4/lib/replace/system/config.m4
@@ -73,6 +73,18 @@ AC_VERIFY_C_PROTOTYPE([struct passwd *getpwent_r(struct passwd *src, char *buf,
#include <unistd.h>
#include <pwd.h>
])
+AC_VERIFY_C_PROTOTYPE([struct passwd *getpwent_r(struct passwd *src, char *buf, size_t buflen)],
+ [
+ #ifndef HAVE_GETPWENT_R_DECL
+ #error missing getpwent_r prototype
+ #endif
+ return NULL;
+ ],[
+ AC_DEFINE(SOLARIS_GETPWENT_R, 1, [getpwent_r irix (similar to 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>
@@ -91,6 +103,19 @@ AC_VERIFY_C_PROTOTYPE([struct group *getgrent_r(struct group *src, char *buf, in
#include <grp.h>
])
+AC_VERIFY_C_PROTOTYPE([struct group *getgrent_r(struct group *src, char *buf, size_t buflen)],
+ [
+ #ifndef HAVE_GETGRENT_R_DECL
+ #error missing getgrent_r prototype
+ #endif
+ return NULL;
+ ],[
+ AC_DEFINE(SOLARIS_GETGRENT_R, 1, [getgrent_r irix (similar to solaris) function prototype])
+ ],[],[
+ #include <unistd.h>
+ #include <grp.h>
+ ])
+
# locale
AC_CHECK_HEADERS(ctype.h locale.h)