[SCM] Samba Shared Repository - branch master updated - 842ea427bc012a6f26f2d968e8174d8c7ee26aef

Jelmer Vernooij jelmer at samba.org
Sat Oct 18 12:15:38 GMT 2008


The branch, master has been updated
       via  842ea427bc012a6f26f2d968e8174d8c7ee26aef (commit)
       via  4083247a480e721bd041703e25cd2966a76d1196 (commit)
       via  dea4db9611ff0216d55ec497b8d9139f563932f1 (commit)
       via  fb1a93e666f864269eb62d73fd2cbd2b23f26dab (commit)
       via  9d9f5b44ed5271e85d1ea9b9e675d20914e621b3 (commit)
      from  fcce58cc61e4ed66de7d81064f40ff5a4e5b6346 (commit)

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


- Log -----------------------------------------------------------------
commit 842ea427bc012a6f26f2d968e8174d8c7ee26aef
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Fri Oct 17 12:08:15 2008 +0200

    Use standard va_copy.

commit 4083247a480e721bd041703e25cd2966a76d1196
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Fri Oct 17 12:03:03 2008 +0200

    Remove empty file.

commit dea4db9611ff0216d55ec497b8d9139f563932f1
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Fri Oct 17 12:02:39 2008 +0200

    Remove obsolete comment about bool.

commit fb1a93e666f864269eb62d73fd2cbd2b23f26dab
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Fri Oct 17 12:01:31 2008 +0200

    Remove defines already provided by the system or libreplace.

commit 9d9f5b44ed5271e85d1ea9b9e675d20914e621b3
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Fri Oct 17 11:52:55 2008 +0200

    Use common detection function for zlib.

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

Summary of changes:
 {source4/lib => lib/zlib}/zlib.m4 |    7 ++-
 source3/configure.in              |   28 +-------
 source3/include/includes.h        |  131 -------------------------------------
 source3/lib/dprintf.c             |    2 +-
 source3/lib/util.c                |    2 +-
 source3/samba4.m4                 |    8 ++-
 source4/configure.ac              |    7 ++-
 7 files changed, 23 insertions(+), 162 deletions(-)
 rename {source4/lib => lib/zlib}/zlib.m4 (87%)
 delete mode 100644 source3/include/dcerpc.h


Changeset truncated at 500 lines:

diff --git a/source4/lib/zlib.m4 b/lib/zlib/zlib.m4
similarity index 87%
rename from source4/lib/zlib.m4
rename to lib/zlib/zlib.m4
index ac220eb..32d747c 100644
--- a/source4/lib/zlib.m4
+++ b/lib/zlib/zlib.m4
@@ -1,3 +1,4 @@
+AC_DEFUN([AC_ZLIB],[
 AC_CHECK_HEADERS(zlib.h)
 
 AC_CHECK_LIB_EXT(z, ZLIB_LIBS, zlibVersion)
@@ -20,7 +21,9 @@ AC_CACHE_CHECK([for zlib >= 1.2.3], samba_cv_zlib_1_2_3, [
 if test x"$ac_cv_header_zlib_h" = x"yes" -a \
 	x"$ac_cv_lib_ext_z_zlibVersion" = x"yes" -a \
 	x"$samba_cv_zlib_1_2_3" = x"yes"; then
-	SMB_EXT_LIB(ZLIB, [${ZLIB_LIBS}])
+	$1
 else
-	SMB_INCLUDE_MK(lib/zlib.mk)
+	$2
 fi
+])
+
diff --git a/source3/configure.in b/source3/configure.in
index d65d28d..9388eba 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -6248,32 +6248,10 @@ if test x$enable_merged_build = xyes; then
 	m4_include(samba4.m4)
 fi
 
-AC_CHECK_HEADERS(zlib.h)
-
-AC_CHECK_LIB_EXT(z, ZLIB_LIBS, zlibVersion)
-
-AC_CACHE_CHECK([for zlib >= 1.2.3], samba_cv_zlib_1_2_3, [
-	AC_TRY_COMPILE([
-		#include <zlib.h>
-		],[
-		#if (ZLIB_VERNUM >= 0x1230)
-		#else
-		#error "ZLIB_VERNUM < 0x1230"
-		#endif
-		],[
-		samba_cv_zlib_1_2_3=yes
-		],[
-		samba_cv_zlib_1_2_3=no
-		])
-])
-
+m4_include(../lib/zlib/zlib.m4)
 AC_SUBST(ZLIB_LIBS)
 AC_SUBST(ZLIB_OBJS)
-if test x"$ac_cv_header_zlib_h" = x"yes" -a \
-	x"$ac_cv_lib_ext_z_zlibVersion" = x"yes" -a \
-	x"$samba_cv_zlib_1_2_3" = x"yes"; then
-	ZLIB_OBJS=""
-else
+AC_ZLIB([ZLIB_OBJS=""], [
 	ZLIB_LIBS=""
 	for o in adler32.o compress.o crc32.o gzio.o uncompr.o \
 		     deflate.o trees.o zutil.o inflate.o infback.o \
@@ -6282,7 +6260,7 @@ else
 		ZLIB_OBJS="$ZLIB_OBJS ../lib/zlib/$o"
 	done
 	CFLAGS="$CFLAGS -I../lib/zlib"
-fi
+])
 
 dnl Remove -L/usr/lib/? from LDFLAGS and LIBS
 LIB_REMOVE_USR_LIB(LDFLAGS)
diff --git a/source3/include/dcerpc.h b/source3/include/dcerpc.h
deleted file mode 100644
index e69de29..0000000
diff --git a/source3/include/includes.h b/source3/include/includes.h
index 4926f3a..9594393 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -839,26 +839,10 @@ enum flush_reason_enum {
 #define SYNC_DNS 1
 #endif
 
-#ifndef SEEK_SET
-#define SEEK_SET 0
-#endif
-
-#ifndef INADDR_LOOPBACK
-#define INADDR_LOOPBACK 0x7f000001
-#endif
-
-#ifndef INADDR_NONE
-#define INADDR_NONE 0xffffffff
-#endif
-
 #ifndef HAVE_CRYPT
 #define crypt ufc_crypt
 #endif
 
-#ifndef O_ACCMODE
-#define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR)
-#endif
-
 #if defined(HAVE_CRYPT16) && defined(HAVE_GETAUTHUID)
 #define ULTRIX_AUTH 1
 #endif
@@ -874,15 +858,6 @@ int setresgid(gid_t rgid, gid_t egid, gid_t sgid);
 /* yuck, I'd like a better way of doing this */
 #define DIRP_SIZE (256 + 32)
 
-/*
- * glibc on linux doesn't seem to have MSG_WAITALL
- * defined. I think the kernel has it though..
- */
-
-#ifndef MSG_WAITALL
-#define MSG_WAITALL 0
-#endif
-
 /* default socket options. Dave Miller thinks we should default to TCP_NODELAY
    given the socket IO pattern that Samba uses */
 #ifdef TCP_NODELAY
@@ -898,84 +873,6 @@ int setresgid(gid_t rgid, gid_t egid, gid_t sgid);
 #endif
 
 
-/* Some POSIX definitions for those without */
- 
-#ifndef S_IFDIR
-#define S_IFDIR         0x4000
-#endif
-#ifndef S_ISDIR
-#define S_ISDIR(mode)   ((mode & 0xF000) == S_IFDIR)
-#endif
-#ifndef S_IRWXU
-#define S_IRWXU 00700           /* read, write, execute: owner */
-#endif
-#ifndef S_IRUSR
-#define S_IRUSR 00400           /* read permission: owner */
-#endif
-#ifndef S_IWUSR
-#define S_IWUSR 00200           /* write permission: owner */
-#endif
-#ifndef S_IXUSR
-#define S_IXUSR 00100           /* execute permission: owner */
-#endif
-#ifndef S_IRWXG
-#define S_IRWXG 00070           /* read, write, execute: group */
-#endif
-#ifndef S_IRGRP
-#define S_IRGRP 00040           /* read permission: group */
-#endif
-#ifndef S_IWGRP
-#define S_IWGRP 00020           /* write permission: group */
-#endif
-#ifndef S_IXGRP
-#define S_IXGRP 00010           /* execute permission: group */
-#endif
-#ifndef S_IRWXO
-#define S_IRWXO 00007           /* read, write, execute: other */
-#endif
-#ifndef S_IROTH
-#define S_IROTH 00004           /* read permission: other */
-#endif
-#ifndef S_IWOTH
-#define S_IWOTH 00002           /* write permission: other */
-#endif
-#ifndef S_IXOTH
-#define S_IXOTH 00001           /* execute permission: other */
-#endif
-
-/* For sys_adminlog(). */
-#ifndef LOG_EMERG
-#define LOG_EMERG       0       /* system is unusable */
-#endif
-
-#ifndef LOG_ALERT
-#define LOG_ALERT       1       /* action must be taken immediately */
-#endif
-
-#ifndef LOG_CRIT
-#define LOG_CRIT        2       /* critical conditions */
-#endif
-
-#ifndef LOG_ERR
-#define LOG_ERR         3       /* error conditions */
-#endif
-
-#ifndef LOG_WARNING
-#define LOG_WARNING     4       /* warning conditions */
-#endif
-
-#ifndef LOG_NOTICE
-#define LOG_NOTICE      5       /* normal but significant condition */
-#endif
-
-#ifndef LOG_INFO
-#define LOG_INFO        6       /* informational */
-#endif
-
-#ifndef LOG_DEBUG
-#define LOG_DEBUG       7       /* debug-level messages */
-#endif
-
 #if HAVE_KERNEL_SHARE_MODES
 #ifndef LOCK_MAND 
 #define LOCK_MAND	32	/* This is a mandatory flock */
@@ -1003,19 +900,6 @@ extern int DEBUGLEVEL;
 #endif
 
 
-/* Needed for sys_dlopen/sys_dlsym/sys_dlclose */
-#ifndef RTLD_GLOBAL
-#define RTLD_GLOBAL 0
-#endif
-
-#ifndef RTLD_LAZY
-#define RTLD_LAZY 0
-#endif
-
-#ifndef RTLD_NOW
-#define RTLD_NOW 0
-#endif
-
 /* needed for some systems without iconv. Doesn't really matter
    what error code we use */
 #ifndef EILSEQ
@@ -1048,17 +932,6 @@ char *talloc_asprintf_strupper_m(TALLOC_CTX *t, const char *fmt, ...) PRINTF_ATT
 #define slprintf snprintf
 #define vslprintf vsnprintf
 
-/* we need to use __va_copy() on some platforms */
-#ifdef HAVE_VA_COPY
-#define VA_COPY(dest, src) va_copy(dest, src)
-#else
-#ifdef HAVE___VA_COPY
-#define VA_COPY(dest, src) __va_copy(dest, src)
-#else
-#define VA_COPY(dest, src) (dest) = (src)
-#endif
-#endif
-
 /*
  * Veritas File System.  Often in addition to native.
  * Quotas different.
@@ -1214,10 +1087,6 @@ LDAP *ldap_open_with_timeout(const char *server, int port, unsigned int to);
 ssize_t readahead(int fd, off64_t offset, size_t count);
 #endif
 
-/* TRUE and FALSE are part of the C99 standard and gcc, but
-   unfortunately many vendor compilers don't support them.  Use True
-   and False instead. */
-
 #ifdef TRUE
 #undef TRUE
 #endif
diff --git a/source3/lib/dprintf.c b/source3/lib/dprintf.c
index a3bb5be..b3c830d 100644
--- a/source3/lib/dprintf.c
+++ b/source3/lib/dprintf.c
@@ -41,7 +41,7 @@
 	msgstr = lang_msg(format);
 	if (!msgstr) return -1;
 
-	VA_COPY(ap2, ap);
+	va_copy(ap2, ap);
 
 	ret = vasprintf(&p, msgstr, ap2);
 
diff --git a/source3/lib/util.c b/source3/lib/util.c
index 418ae41..8c2b3fe 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -2565,7 +2565,7 @@ char *smb_xstrndup(const char *s, size_t n)
 	int n;
 	va_list ap2;
 
-	VA_COPY(ap2, ap);
+	va_copy(ap2, ap);
 
 	n = vasprintf(ptr, format, ap2);
 	if (n == -1 || ! *ptr) {
diff --git a/source3/samba4.m4 b/source3/samba4.m4
index a5b7da7..05d6552 100644
--- a/source3/samba4.m4
+++ b/source3/samba4.m4
@@ -37,7 +37,13 @@ m4_include(lib/charset/config.m4)
 m4_include(lib/socket/config.m4)
 m4_include(nsswitch/nsstest.m4)
 m4_include(../pidl/config.m4)
-m4_include(lib/zlib.m4)
+m4_include(../lib/zlib/zlib.m4)
+AC_ZLIB([
+SMB_EXT_LIB(ZLIB, [${ZLIB_LIBS}])
+],[
+SMB_INCLUDE_MK(lib/zlib.mk)
+])
+
 
 AC_CONFIG_FILES(../source4/lib/registry/registry.pc)
 AC_CONFIG_FILES(../source4/librpc/dcerpc.pc)
diff --git a/source4/configure.ac b/source4/configure.ac
index 7c95f2a..9d387fc 100644
--- a/source4/configure.ac
+++ b/source4/configure.ac
@@ -24,7 +24,12 @@ m4_include(../lib/util/time.m4)
 m4_include(../lib/popt/samba.m4)
 m4_include(lib/charset/config.m4)
 m4_include(lib/socket/config.m4)
-m4_include(lib/zlib.m4)
+m4_include(../lib/zlib/zlib.m4)
+AC_ZLIB([
+SMB_EXT_LIB(ZLIB, [${ZLIB_LIBS}])
+],[
+SMB_INCLUDE_MK(lib/zlib.mk)
+])
 m4_include(nsswitch/nsstest.m4)
 m4_include(../pidl/config.m4)
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list