[SCM] Samba Shared Repository - branch master updated
Kai Blin
kai at samba.org
Sun Jun 20 02:01:54 MDT 2010
The branch, master has been updated
via a453b87... s3-waf: Change the (set|get|end)netgrent checks to match the configure.in checks
via ff32f69... s3 configure: Check for (set|get|end)netgrent prototypes
via fa3e50f... build: Allow for a custom message in CHECK_C_PROTOTYPE
from 1f07f53... ldb: Remove last import of dsdb.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit a453b87d68f89c48e0d0545fe240801e4eac1686
Author: Kai Blin <kai at samba.org>
Date: Sun Jun 20 09:49:34 2010 +0200
s3-waf: Change the (set|get|end)netgrent checks to match the configure.in checks
commit ff32f691bba41afab45efe7e21a2c91bb2c157bb
Author: Kai Blin <kai at samba.org>
Date: Sun Jun 20 09:36:19 2010 +0200
s3 configure: Check for (set|get|end)netgrent prototypes
commit fa3e50fee421a7fe407510627e0fdbcd5f4013c0
Author: Kai Blin <kai at samba.org>
Date: Thu Jun 17 22:41:57 2010 +0200
build: Allow for a custom message in CHECK_C_PROTOTYPE
-----------------------------------------------------------------------
Summary of changes:
buildtools/wafsamba/samba_conftests.py | 6 ++++--
source3/configure.in | 25 ++++++++++++++++++++++++-
source3/wscript | 21 ++++++++++++---------
3 files changed, 40 insertions(+), 12 deletions(-)
Changeset truncated at 500 lines:
diff --git a/buildtools/wafsamba/samba_conftests.py b/buildtools/wafsamba/samba_conftests.py
index a5c1b38..c95a887 100644
--- a/buildtools/wafsamba/samba_conftests.py
+++ b/buildtools/wafsamba/samba_conftests.py
@@ -34,17 +34,19 @@ def CHECK_LARGEFILE(conf, define='HAVE_LARGEFILE'):
@conf
-def CHECK_C_PROTOTYPE(conf, function, prototype, define, headers=None):
+def CHECK_C_PROTOTYPE(conf, function, prototype, define, headers=None, msg=None):
'''verify that a C prototype matches the one on the current system'''
if not conf.CHECK_DECLS(function, headers=headers):
return False
+ if not msg:
+ msg = 'Checking C prototype for %s' % function
return conf.CHECK_CODE('%s; void *_x = (void *)%s' % (prototype, function),
define=define,
local_include=False,
headers=headers,
link=False,
execute=False,
- msg='Checking C prototype for %s' % function)
+ msg=msg)
@conf
diff --git a/source3/configure.in b/source3/configure.in
index cda14f5..04ddc03 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -6418,7 +6418,30 @@ AC_SUBST(BUILD_INIPARSER)
AC_SUBST(INIPARSERLIBS)
AC_SUBST(FLAGS1)
-
+###################################################
+# Check for different/missing (set|get|end)netgrent prototypes
+CFLAGS_SAVE=$CFLAGS
+CFLAGS="$CFLAGS -Werror-implicit-function-declaration"
+AC_CACHE_CHECK([for setnetgrent prototype],samba_cv_setnetgrent_prototype, [
+ AC_TRY_COMPILE([#include<netdb.h>],[setnetgrent("foo")],
+ samba_cv_setnetgrent_prototype=yes, samba_cv_setnetgrent_prototype=no)])
+if test x"$samba_cv_setnetgrent_prototype" = x"yes"; then
+ AC_DEFINE(HAVE_SETNETGRENT_PROTOTYPE, 1, [If setnetgrent prototype is defined])
+fi
+AC_CACHE_CHECK([for getnetgrent prototype],samba_cv_getnetgrent_prototype, [
+ AC_TRY_COMPILE([#include<netdb.h>],[char *dom, *user,*host; getnetgrent(&dom,&user,&host)],
+ samba_cv_getnetgrent_prototype=yes, samba_cv_getnetgrent_prototype=no)])
+if test x"$samba_cv_getnetgrent_prototype" = x"yes"; then
+ AC_DEFINE(HAVE_GETNETGRENT_PROTOTYPE, 1, [If getnetgrent prototype is defined])
+fi
+AC_CACHE_CHECK([for endnetgrent prototype],samba_cv_endnetgrent_prototype, [
+ AC_TRY_COMPILE([#include<netdb.h>],[endnetgrent()],
+ samba_cv_endnetgrent_prototype=yes, samba_cv_endnetgrent_prototype=no)])
+if test x"$samba_cv_endnetgrent_prototype" = x"yes"; then
+ AC_DEFINE(HAVE_ENDNETGRENT_PROTOTYPE, 1, [If endnetgrent prototype is defined])
+fi
+
+CFLAGS=$CFLAGS_SAVE
# Checks for the vfs_fileid module
# Start
diff --git a/source3/wscript b/source3/wscript
index 9bbedea..aec71af 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -362,15 +362,18 @@ utimensat vsyslog _write __write __xstat
define='HAVE_DIRENT_D_OFF')
conf.CHECK_FUNCS('setnetgrent getnetgrent endnetgrent')
- conf.CHECK_C_PROTOTYPE('setnetgrent',
- 'extern int setnetgrent(const char* netgroup)',
- define='HAVE_SETNETGRENT_PROTOTYPE', headers='netdb.h')
- conf.CHECK_C_PROTOTYPE('getnetgrent',
- 'extern int getnetgrent(char **host, char **user, char **domain)',
- define='HAVE_GETNETGRENT_PROTOTYPE', headers='netdb.h')
- conf.CHECK_C_PROTOTYPE('endnetgrent',
- 'extern void endnetgrent(void)',
- define='HAVE_ENDNETGRENT_PROTOTYPE', headers='netdb.h')
+ conf.CHECK_CODE('setnetgrent("foo")', 'HAVE_SETNETGRENT_PROTOTYPE',
+ msg="Checking for setnetgrent prototype",
+ headers='netdb.h',
+ cflags="-Werror-implicit-function-declaration")
+ conf.CHECK_CODE('getnetgrent', 'HAVE_GETNETGRENT_PROTOTYPE',
+ msg="Checking for getnetgrent prototype",
+ headers='netdb.h',
+ cflags="-Werror-implicit-function-declaration")
+ conf.CHECK_CODE('endnetgrent', 'HAVE_ENDNETGRENT_PROTOTYPE',
+ msg="Checking for endnetgrent prototype",
+ headers='netdb.h',
+ cflags="-Werror-implicit-function-declaration")
#FIXME: Should just be set when krb5 and ldap requirements are fulfilled
if Options.options.with_ads:
--
Samba Shared Repository
More information about the samba-cvs
mailing list