svn commit: samba r25867 - in branches/SAMBA_4_0/source/lib/replace/system: .

metze at samba.org metze at samba.org
Tue Nov 6 09:15:12 GMT 2007


Author: metze
Date: 2007-11-06 09:15:11 +0000 (Tue, 06 Nov 2007)
New Revision: 25867

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=25867

Log:
libreplace: solaris has different prototypes for getpwent_r and getgrent_r

metze
Modified:
   branches/SAMBA_4_0/source/lib/replace/system/config.m4


Changeset:
Modified: branches/SAMBA_4_0/source/lib/replace/system/config.m4
===================================================================
--- branches/SAMBA_4_0/source/lib/replace/system/config.m4	2007-11-06 08:06:50 UTC (rev 25866)
+++ branches/SAMBA_4_0/source/lib/replace/system/config.m4	2007-11-06 09:15:11 UTC (rev 25867)
@@ -19,7 +19,39 @@
 # 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)



More information about the samba-cvs mailing list