[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-test-1513-gb8a57a2

Stefan Metzmacher metze at samba.org
Fri Jan 18 16:05:18 GMT 2008


The branch, v3-2-test has been updated
       via  b8a57a24c390355c4950ca499c1d96aff80abad7 (commit)
       via  174a45ec18fff064d89f6a12b044973ab3c10c54 (commit)
       via  a0e663ff2c6548e48c9710e3fb314f3bbabb59d0 (commit)
       via  c11122afda52ce787dd1d3357bd85b6ce36b8ca4 (commit)
       via  ff8a001f0d3f2655efafed41f2f0b14552a5c7e7 (commit)
       via  dbff70b2ebe7cc09f7fbe5a0319f978dfcfa1da9 (commit)
       via  af3772e22f5e6e0158783086e9791ffc95ee5368 (commit)
       via  58932ca791024bd9a543ff5e21bc26970ceed477 (commit)
       via  3db37038b3e5a59a9baa85f6bcd32ac6e5ec2da1 (commit)
      from  f3901f179b770ffadb3e5a82ac5a2da00d83f40a (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test


- Log -----------------------------------------------------------------
commit b8a57a24c390355c4950ca499c1d96aff80abad7
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Jan 15 16:34:06 2008 +0100

    Revert "Host SerNet-AIX has __ss_family instead of ss_family in sockaddr_storage"
    
    This reverts commit e33286f4a68352e55df081d06307f64f190773b3.
    
    393bab185e0e9f02aac5740becc2aba2762133c8 is the v4-0-test fix
    for the same problem.
    
    metze

commit 174a45ec18fff064d89f6a12b044973ab3c10c54
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Mon Jan 14 22:24:07 2008 +0100

    libreplace: Escape asterisk.
    (cherry picked from commit df36c78549b40ee5e47d5cc79de2eb79f58c567a)

commit a0e663ff2c6548e48c9710e3fb314f3bbabb59d0
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Sun Jan 13 04:46:11 2008 +0100

    Try to fix the build on Tru64; avoid single quotes because they get expanded by perl in the build system.
    (cherry picked from commit bba8914af56cb161c275fbbdea2479d6f8bd703c)

commit c11122afda52ce787dd1d3357bd85b6ce36b8ca4
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Dec 20 15:59:39 2007 +0100

    r26550: libreplace: fallback to __ss_family of struct sockaddr_storage
    
    metze
    (cherry picked from commit 11bdc9bed80b9842ac1ab8f22509a5d191cddc91)

commit ff8a001f0d3f2655efafed41f2f0b14552a5c7e7
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Nov 22 14:42:14 2007 +0100

    r26102: libreplace: remove system/printing.h as it only contains samba3 stuff
    
    metze
    (cherry picked from commit 1ecb4ec01b0506c95a5f90a62040329e7a39ee93)

commit dbff70b2ebe7cc09f7fbe5a0319f978dfcfa1da9
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Nov 15 16:40:32 2007 +0100

    r25976: libreplace: not all platforms like _XOPEN_SOURCE=600
    
    - Only use _XOPEN_SOURCE=600 on Tru64
    - _OSF_SOURCE is also Tru64 specific
    
    metze
    (cherry picked from commit d19ab62081ce4ee4273ff752ad0443782a994826)

commit af3772e22f5e6e0158783086e9791ffc95ee5368
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Nov 15 15:43:14 2007 +0100

    r25974: libreplace: see what the build-farm says if we use _XOPEN_SOURCE=600
    
    On Tru64 this brings in socklen_t and some other socket stuff
    
    metze
    (cherry picked from commit d42f2e5759332f1f0c6c1269bd29ac62ddb11016)

commit 58932ca791024bd9a543ff5e21bc26970ceed477
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Nov 15 14:55:48 2007 +0100

    r25971: libreplace: remove AC_EXTENSION_FLAG as it's the same as AC_N_DEFINE
    
    metze
    (cherry picked from commit 05b4619c5beff474488d1abe5e647acd94a3e20c)

commit 3db37038b3e5a59a9baa85f6bcd32ac6e5ec2da1
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Nov 15 14:46:47 2007 +0100

    r25970: libreplace: fix AC_N_DEFINE() so that some appears in config.h
    
    metze
    (cherry picked from commit a07c983fde52607806745914bb41039afb5618cc)

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

Summary of changes:
 source/configure.in                     |    9 -----
 source/lib/replace/libreplace.m4        |   20 ++++++++++++
 source/lib/replace/libreplace_cc.m4     |    8 ++++-
 source/lib/replace/libreplace_ld.m4     |    2 +-
 source/lib/replace/libreplace_macros.m4 |   30 +++++++-----------
 source/lib/replace/system/network.h     |    7 ++++-
 source/lib/replace/system/printing.h    |   50 -------------------------------
 source/lib/replace/test/testsuite.c     |    1 -
 8 files changed, 45 insertions(+), 82 deletions(-)
 delete mode 100644 source/lib/replace/system/printing.h


Changeset truncated at 500 lines:

diff --git a/source/configure.in b/source/configure.in
index f65eb3c..a34d42c 100644
--- a/source/configure.in
+++ b/source/configure.in
@@ -3051,15 +3051,6 @@ if test x"$samba_cv_HAVE_IFACE_IFREQ" = x"yes"; then
 fi
 fi
 
-dnl AIX 5.3.0.0
-AC_TRY_COMPILE([#include <sys/socket.h>],[
-struct sockaddr_storage s; s.__ss_family = 0],
-samba_cv_have_aix_sockaddr_storage=yes,samba_cv_have_aix_sockaddr_storage=no)
-
-if test x"$samba_cv_have_aix_sockaddr_storage" = x"yes"; then
-   AC_DEFINE(HAVE_AIX_SOCKADDR_STORAGE, 1, [Whether struct sockaddr_storage has __sa_family])
-fi
-
 if test $iface = no; then
 AC_CACHE_CHECK([for iface AIX],samba_cv_HAVE_IFACE_AIX,[
 SAVE_CPPFLAGS="$CPPFLAGS"
diff --git a/source/lib/replace/libreplace.m4 b/source/lib/replace/libreplace.m4
index 7a5283a..f866b36 100644
--- a/source/lib/replace/libreplace.m4
+++ b/source/lib/replace/libreplace.m4
@@ -153,6 +153,26 @@ AC_HAVE_TYPE([struct sockaddr_in6], [
 #include <netinet/in.h>
 ])
 
+if test x"$ac_cv_type_struct_sockaddr_storage" = x"yes"; then
+AC_CHECK_MEMBER(struct sockaddr_storage.ss_family,
+                AC_DEFINE(HAVE_SS_FAMILY, 1, [Defined if struct sockaddr_storage has ss_family field]),,
+                [
+#include <sys/socket.h>
+#include <sys/types.h>
+#include <netinet/in.h>
+		])
+
+if test x"$ac_cv_member_struct_sockaddr_storage_ss_family" != x"yes"; then
+AC_CHECK_MEMBER(struct sockaddr_storage.__ss_family,
+                AC_DEFINE(HAVE___SS_FAMILY, 1, [Defined if struct sockaddr_storage has __ss_family field]),,
+                [
+#include <sys/socket.h>
+#include <sys/types.h>
+#include <netinet/in.h>
+		])
+fi
+fi
+
 AC_CHECK_FUNCS(seteuid setresuid setegid setresgid chroot bzero strerror)
 AC_CHECK_FUNCS(vsyslog setlinebuf mktime ftruncate chsize rename)
 AC_CHECK_FUNCS(waitpid strlcpy strlcat initgroups memmove strdup)
diff --git a/source/lib/replace/libreplace_cc.m4 b/source/lib/replace/libreplace_cc.m4
index a01bf1b..bf50568 100644
--- a/source/lib/replace/libreplace_cc.m4
+++ b/source/lib/replace/libreplace_cc.m4
@@ -48,8 +48,7 @@ LIBREPLACE_C99_STRUCT_INIT([],[AC_MSG_WARN([c99 structure initializer are not su
 AC_PROG_INSTALL
 
 AC_ISC_POSIX
-AC_EXTENSION_FLAG(_XOPEN_SOURCE_EXTENDED)
-AC_EXTENSION_FLAG(_OSF_SOURCE)
+AC_N_DEFINE(_XOPEN_SOURCE_EXTENDED)
 
 AC_SYS_LARGEFILE
 
@@ -77,6 +76,11 @@ case "$host_os" in
 			CFLAGS="$CFLAGS -D_LINUX_SOURCE_COMPAT -qmaxmem=32000"
 		fi
 		;;
+	*osf*)
+		# this brings in socklen_t
+		AC_N_DEFINE(_XOPEN_SOURCE,600)
+		AC_N_DEFINE(_OSF_SOURCE)
+		;;
 	#
 	# VOS may need to have POSIX support and System V compatibility enabled.
 	#
diff --git a/source/lib/replace/libreplace_ld.m4 b/source/lib/replace/libreplace_ld.m4
index cb8e214..2aec698 100644
--- a/source/lib/replace/libreplace_ld.m4
+++ b/source/lib/replace/libreplace_ld.m4
@@ -265,7 +265,7 @@ AC_DEFUN([AC_LIBREPLACE_LD_SHLIB_ALLOW_UNDEF_FLAG],
 			LD_SHLIB_ALLOW_UNDEF_FLAG="-Wl,--allow-shlib-undefined"
 			;;
 		*osf*)
-			LD_SHLIB_ALLOW_UNDEF_FLAG="-expect_unresolved '*'"
+			LD_SHLIB_ALLOW_UNDEF_FLAG="-Wl,-expect_unresolved,\"*\""
 			;;
 		*darwin*)
 			LD_SHLIB_ALLOW_UNDEF_FLAG="-undefined dynamic_lookup"
diff --git a/source/lib/replace/libreplace_macros.m4 b/source/lib/replace/libreplace_macros.m4
index 92fecd3..1856eac 100644
--- a/source/lib/replace/libreplace_macros.m4
+++ b/source/lib/replace/libreplace_macros.m4
@@ -87,19 +87,6 @@ fi
 rm -f conftest*
 ])])
 
-AC_DEFUN([AC_EXTENSION_FLAG],
-[
-  cat >>confdefs.h <<\EOF
-#ifndef $1
-# define $1 1
-#endif
-EOF
-AH_VERBATIM([$1], [#ifndef $1
-# define $1 1
-#endif])
-])
-
-
 dnl see if a declaration exists for a function or variable
 dnl defines HAVE_function_DECL if it exists
 dnl AC_HAVE_DECL(var, includes)
@@ -248,11 +235,18 @@ m4_define([AH_CHECK_FUNC_EXT],
 
 dnl Define an AC_DEFINE with ifndef guard.
 dnl AC_N_DEFINE(VARIABLE [, VALUE])
-define(AC_N_DEFINE,
-[cat >> confdefs.h <<\EOF
-[#ifndef] $1
-[#define] $1 ifelse($#, 2, [$2], $#, 3, [$2], 1)
-[#endif]
+AC_DEFUN([AC_N_DEFINE],
+[
+AH_VERBATIM([$1], [
+#ifndef $1
+# undef $1
+#endif
+])
+
+ cat >>confdefs.h <<\EOF
+#ifndef $1
+[#define] $1 m4_if($#, 1, 1, [$2])
+#endif
 EOF
 ])
 
diff --git a/source/lib/replace/system/network.h b/source/lib/replace/system/network.h
index b6ae3c7..fe6e468 100644
--- a/source/lib/replace/system/network.h
+++ b/source/lib/replace/system/network.h
@@ -227,14 +227,19 @@ typedef unsigned short int sa_family_t;
 #ifdef HAVE_STRUCT_SOCKADDR_IN6
 #define sockaddr_storage sockaddr_in6
 #define ss_family sin6_family
+#define HAVE_SS_FAMILY 1
 #else
 #define sockaddr_storage sockaddr_in
 #define ss_family sin_family
+#define HAVE_SS_FAMILY 1
 #endif
 #endif
 
-#ifdef HAVE_AIX_SOCKADDR_STORAGE
+#ifndef HAVE_SS_FAMILY
+#ifdef HAVE___SS_FAMILY
 #define ss_family __ss_family
+#define HAVE_SS_FAMILY 1
+#endif
 #endif
 
 #ifndef HAVE_STRUCT_ADDRINFO
diff --git a/source/lib/replace/system/printing.h b/source/lib/replace/system/printing.h
deleted file mode 100644
index 7eb02d0..0000000
--- a/source/lib/replace/system/printing.h
+++ /dev/null
@@ -1,50 +0,0 @@
-#ifndef _system_printing_h
-#define _system_printing_h
-
-/* 
-   Unix SMB/CIFS implementation.
-
-   printing system include wrappers
-
-   Copyright (C) Andrew Tridgell 2004
-   
-     ** NOTE! The following LGPL license applies to the replace
-     ** library. This does NOT imply that all of Samba is released
-     ** under the LGPL
-   
-   This library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 3 of the License, or (at your option) any later version.
-
-   This library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with this library; if not, see <http://www.gnu.org/licenses/>.
-
-*/
-
-#ifdef AIX
-#define DEFAULT_PRINTING PRINT_AIX
-#define PRINTCAP_NAME "/etc/qconfig"
-#endif
-
-#ifdef HPUX
-#define DEFAULT_PRINTING PRINT_HPUX
-#endif
-
-#ifdef QNX
-#define DEFAULT_PRINTING PRINT_QNX
-#endif
-
-#ifndef DEFAULT_PRINTING
-#define DEFAULT_PRINTING PRINT_BSD
-#endif
-#ifndef PRINTCAP_NAME
-#define PRINTCAP_NAME "/etc/printcap"
-#endif
-
-#endif
diff --git a/source/lib/replace/test/testsuite.c b/source/lib/replace/test/testsuite.c
index 269a2ff..5b95ae3 100644
--- a/source/lib/replace/test/testsuite.c
+++ b/source/lib/replace/test/testsuite.c
@@ -37,7 +37,6 @@
 #include "system/locale.h"
 #include "system/network.h"
 #include "system/passwd.h"
-#include "system/printing.h"
 #include "system/readline.h"
 #include "system/select.h"
 #include "system/shmem.h"


-- 
Samba Shared Repository


More information about the samba-cvs mailing list