[SCM] Samba Shared Repository - branch master updated

Günther Deschner gd at samba.org
Thu Mar 3 17:14:02 MST 2011


The branch, master has been updated
       via  6b3d68f s3-waf: add check for SEEKDIR_RETURNS_VOID.
       via  0fb246b s3-waf: add check for HAVE_FUNCTION_ATTRIBUTE_DESTRUCTOR.
       via  9167d70 libreplace: move "struct timespec" checks into libreplace (where timespec is already used).
      from  a5d5457 socket_wrapper: use swrap_sendmsg_before()/after() in swrap_writev()

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 6b3d68fffd8c16c14b16e802d1a074ef12b3b0dc
Author: Günther Deschner <gd at samba.org>
Date:   Thu Mar 3 22:55:09 2011 +0100

    s3-waf: add check for SEEKDIR_RETURNS_VOID.
    
    Guenther
    
    Autobuild-User: Günther Deschner <gd at samba.org>
    Autobuild-Date: Fri Mar  4 01:13:54 CET 2011 on sn-devel-104

commit 0fb246ba7340c58fdb419ed434f8b17a21f24953
Author: Günther Deschner <gd at samba.org>
Date:   Thu Mar 3 22:10:40 2011 +0100

    s3-waf: add check for HAVE_FUNCTION_ATTRIBUTE_DESTRUCTOR.
    
    Guenther

commit 9167d70e77c2f4c8e6de64fbf06bd3bee23542d2
Author: Günther Deschner <gd at samba.org>
Date:   Thu Mar 3 16:26:48 2011 +0100

    libreplace: move "struct timespec" checks into libreplace (where timespec is already used).
    
    Bjoern, Metze, please check.
    
    Guenther

-----------------------------------------------------------------------

Summary of changes:
 lib/replace/libreplace.m4  |   23 +++++++++++++++++++++++
 lib/replace/system/time.h  |    7 +++++++
 lib/replace/wscript        |    1 +
 source3/configure.in       |   23 -----------------------
 source3/include/includes.h |    8 --------
 source3/wscript            |   13 +++++++++++--
 6 files changed, 42 insertions(+), 33 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/replace/libreplace.m4 b/lib/replace/libreplace.m4
index 24fc5cd..808d5d1 100644
--- a/lib/replace/libreplace.m4
+++ b/lib/replace/libreplace.m4
@@ -303,6 +303,29 @@ if test x$libreplace_cv_have_clock_gettime = xyes ; then
 	SMB_CHECK_CLOCK_ID(CLOCK_REALTIME)
 fi
 
+AC_CACHE_CHECK([for struct timespec type],libreplace_cv_struct_timespec, [
+    AC_TRY_COMPILE([
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+#if TIME_WITH_SYS_TIME
+# include <sys/time.h>
+# include <time.h>
+#else
+# if HAVE_SYS_TIME_H
+#  include <sys/time.h>
+# else
+#  include <time.h>
+# endif
+#endif
+],[struct timespec ts;],
+	libreplace_cv_struct_timespec=yes,libreplace_cv_struct_timespec=no)])
+if test x"$libreplace_cv_struct_timespec" = x"yes"; then
+   AC_DEFINE(HAVE_STRUCT_TIMESPEC,1,[Whether we have struct timespec])
+fi
+
 AC_CHECK_FUNCS([printf memset memcpy],,[AC_MSG_ERROR([Required function not found])])
 
 echo "LIBREPLACE_BROKEN_CHECKS: END"
diff --git a/lib/replace/system/time.h b/lib/replace/system/time.h
index 5fce4db..b6d2609 100644
--- a/lib/replace/system/time.h
+++ b/lib/replace/system/time.h
@@ -46,6 +46,13 @@ struct utimbuf {
 };
 #endif
 
+#ifndef HAVE_STRUCT_TIMESPEC
+struct timespec {
+	time_t tv_sec;            /* Seconds.  */
+	long tv_nsec;           /* Nanoseconds.  */
+};
+#endif
+
 #ifndef HAVE_MKTIME
 /* define is in "replace.h" */
 time_t rep_mktime(struct tm *t);
diff --git a/lib/replace/wscript b/lib/replace/wscript
index d0bbe96..c24d6e7 100644
--- a/lib/replace/wscript
+++ b/lib/replace/wscript
@@ -219,6 +219,7 @@ def configure(conf):
 			    'HAVE_%s' % c,
 			    msg='Checking whether the clock_gettime clock ID %s is available' % c)
 
+    conf.CHECK_TYPE('struct timespec', headers='sys/time.h time.h')
 
     # these headers need to be tested as a group on freebsd
     conf.CHECK_HEADERS(headers='sys/socket.h net/if.h', together=True)
diff --git a/source3/configure.in b/source3/configure.in
index b4794f2..8d32a1b 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -951,29 +951,6 @@ if test x"$samba_cv_struct_sigevent" = x"yes"; then
 	[#include <signal.h>])
 fi
 
-AC_CACHE_CHECK([for struct timespec type],samba_cv_struct_timespec, [
-    AC_TRY_COMPILE([
-#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-#if TIME_WITH_SYS_TIME
-# include <sys/time.h>
-# include <time.h>
-#else
-# if HAVE_SYS_TIME_H
-#  include <sys/time.h>
-# else
-#  include <time.h>
-# endif
-#endif
-],[struct timespec ts;],
-	samba_cv_struct_timespec=yes,samba_cv_struct_timespec=no)])
-if test x"$samba_cv_struct_timespec" = x"yes"; then
-   AC_DEFINE(HAVE_STRUCT_TIMESPEC,1,[Whether we have struct timespec])
-fi
-
 # and glibc has setresuid under linux but the function does
 # nothing until kernel 2.1.44! very dumb.
 AC_CACHE_CHECK([for real setresuid],samba_cv_have_setresuid,[
diff --git a/source3/include/includes.h b/source3/include/includes.h
index 9d55c4a..d715db6 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -425,14 +425,6 @@ typedef long blksize_t;
 typedef long blkcnt_t;
 #endif
 
-#ifndef HAVE_STRUCT_TIMESPEC
-struct timespec {
-	time_t tv_sec;            /* Seconds.  */
-	long tv_nsec;           /* Nanoseconds.  */
-};
-#endif
-
-
 /*
  * Type for stat structure.
  */
diff --git a/source3/wscript b/source3/wscript
index 90a541b..c1c9801 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -290,8 +290,6 @@ __sys_llseek syslog _telldir __telldir telldir64 textdomain timegm
 utimensat vsyslog _write __write __xstat
 ''')
 
-    conf.CHECK_TYPE('struct timespec', headers='sys/time.h time.h')
-
     conf.CHECK_SAMBA3_CHARSET() # see build/charset.py
 
     # FIXME: these should be tests for features, but the old build system just
@@ -1495,6 +1493,17 @@ main() {
         # For sys/quota.h and linux/quota.h
         conf.CHECK_HEADERS('sys/quota.h')
 
+    conf.CHECK_CODE('__attribute__((destructor)) static void cleanup(void) { }',
+		    'HAVE_FUNCTION_ATTRIBUTE_DESTRUCTOR',
+		    addmain=False,
+		    link=False,
+		    msg='Checking whether we can compile with __attribute__((destructor))')
+
+    conf.CHECK_CODE('void seekdir(DIR *d, long loc) { return; }',
+		    'SEEKDIR_RETURNS_VOID',
+		    headers='sys/types.h dirent.h',
+		    msg='Checking whether seekdir returns void')
+
     default_static_modules=TO_LIST('''pdb_smbpasswd pdb_tdbsam pdb_wbc_sam
                                       auth_sam auth_unix auth_winbind auth_wbc auth_server
                                       auth_domain auth_builtin vfs_default


-- 
Samba Shared Repository


More information about the samba-cvs mailing list