[SCM] CTDB repository - branch master updated - ctdb-1.12-47-g66af665

Michael Adam obnox at samba.org
Fri Nov 25 16:46:46 MST 2011


The branch, master has been updated
       via  66af6659eaffaeafbfa58779162aabe915d1c50f (commit)
       via  7d4809ba343114e435830c7c1ab047dc4ce5ff0e (commit)
       via  8d65d7f399ba2e6a4162eed5e84a58c7cb024187 (commit)
       via  99ce8a9de648babdfb1b1ea0219ee184c9718048 (commit)
       via  8dd377b6a4d188af086f9a5b41a1b48e44eda6f3 (commit)
       via  5e45a176031e973e97450296c28ddfb0a779e00b (commit)
       via  17bcffab19fdbb435b4745ff90c327342bbbf0f8 (commit)
       via  11bebd5367102fcd02b17c44ac87bf50d4c68785 (commit)
       via  cc60df5a3edebfdf50fcd22ebfaad35736f90379 (commit)
       via  7420d9991e30575219c919ce2a8edce20ad3eb63 (commit)
       via  b283be8658d6229314b9265ed8659d2cac573073 (commit)
       via  add2506caf3340118be05a21b05dd71b822b1516 (commit)
      from  8959d15804bb5901356d7beec1ecddb1cabbca52 (commit)

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


- Log -----------------------------------------------------------------
commit 66af6659eaffaeafbfa58779162aabe915d1c50f
Author: Michael Adam <obnox at samba.org>
Date:   Sat Sep 3 01:30:08 2011 +0200

    build: add target libctdb.so.0 and symlink libctdb.so

commit 7d4809ba343114e435830c7c1ab047dc4ce5ff0e
Author: Michael Adam <obnox at samba.org>
Date:   Fri Nov 25 17:07:24 2011 +0100

    build: add socket_wrapper objects to test binaries

commit 8d65d7f399ba2e6a4162eed5e84a58c7cb024187
Author: Michael Adam <obnox at samba.org>
Date:   Thu Oct 20 14:17:45 2011 +0200

    build: add option --enable-socket-wrapper to build binaries with socket wrapper support

commit 99ce8a9de648babdfb1b1ea0219ee184c9718048
Author: Michael Adam <obnox at samba.org>
Date:   Thu Oct 20 14:17:25 2011 +0200

    add socket_wrapper from samba

commit 8dd377b6a4d188af086f9a5b41a1b48e44eda6f3
Author: Andreas Schneider <asn at redhat.com>
Date:   Fri Feb 19 12:44:07 2010 +0100

    libutil: Remove obsolete signal type cast.

commit 5e45a176031e973e97450296c28ddfb0a779e00b
Author: Michael Adam <obnox at samba.org>
Date:   Fri Nov 25 16:29:44 2011 +0100

    build: add libreplace network checks to configure

commit 17bcffab19fdbb435b4745ff90c327342bbbf0f8
Author: Michael Adam <obnox at samba.org>
Date:   Fri Nov 25 16:36:40 2011 +0100

    update lib/replace to current upstream version (samba master)

commit 11bebd5367102fcd02b17c44ac87bf50d4c68785
Author: Michael Adam <obnox at samba.org>
Date:   Fri Nov 25 17:01:58 2011 +0100

    system_linux: correctly cast sockaddr_in6 to sockaddr for sendto() in ctdb_sys_send_tcp()

commit cc60df5a3edebfdf50fcd22ebfaad35736f90379
Author: Michael Adam <obnox at samba.org>
Date:   Fri Nov 25 16:59:51 2011 +0100

    system_linux: correctly cast sockaddr_in to sockaddr in ctdb_sys_send_tcp()

commit 7420d9991e30575219c919ce2a8edce20ad3eb63
Author: Michael Adam <obnox at samba.org>
Date:   Fri Nov 25 16:42:53 2011 +0100

    logging: properly cast sockaddr_in to sockaddr for sendto() in ctdb_syslog_log()

commit b283be8658d6229314b9265ed8659d2cac573073
Author: Michael Adam <obnox at samba.org>
Date:   Fri Nov 25 16:41:59 2011 +0100

    logging: some whitespace cleanup in ctdb_syslog_log()

commit add2506caf3340118be05a21b05dd71b822b1516
Author: Michael Adam <obnox at samba.org>
Date:   Fri Nov 25 16:40:52 2011 +0100

    logging: properly cast sockaddr_in to sockaddr for bind in start_syslog_daemon()

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

Summary of changes:
 Makefile.in                                        |   24 +-
 common/system_linux.c                              |    8 +-
 configure.ac                                       |    2 +
 lib/replace/Makefile                               |   63 +
 lib/replace/Makefile.in                            |   19 +-
 lib/replace/README                                 |   17 +-
 lib/replace/autoconf-2.60.m4                       |   50 +-
 lib/replace/{autogen.sh => autogen-autotools.sh}   |    0
 lib/{tdb => replace}/build_macros.m4               |    0
 lib/replace/config.guess                           |   58 +-
 lib/replace/config.sub                             |   15 +-
 lib/replace/configure                              |   21 +
 lib/replace/configure.ac                           |    9 +
 lib/replace/crypt.c                                |  770 ++++++
 lib/replace/crypt.m4                               |    6 +
 lib/replace/dlfcn.c                                |    3 +
 lib/replace/dlfcn.m4                               |    2 +-
 lib/replace/getaddrinfo.h                          |    2 +
 lib/replace/getifaddrs.c                           |  110 +-
 lib/replace/getpass.c                              |   19 +-
 lib/replace/getpass.m4                             |   18 +-
 lib/replace/hdr_replace.h                          |    2 +
 lib/replace/inet_aton.c                            |   33 +
 lib/replace/inet_ntoa.c                            |   39 +
 lib/replace/libreplace.m4                          |  268 ++-
 lib/replace/libreplace_cc.m4                       |   28 +-
 lib/replace/libreplace_ld.m4                       |   50 +-
 lib/replace/libreplace_macros.m4                   |    6 +-
 lib/replace/libreplace_network.m4                  |  479 ++++
 lib/replace/poll.c                                 |  133 +
 lib/replace/repdir.m4                              |    7 +-
 lib/replace/replace-test.h                         |   13 +
 lib/replace/replace.c                              |  275 ++-
 lib/replace/replace.h                              |  289 ++-
 lib/replace/samba.m4                               |   15 +-
 lib/replace/snprintf.c                             |    5 +-
 lib/replace/socket.c                               |   35 +
 lib/replace/socketpair.c                           |   46 +
 lib/replace/strptime.m4                            |    2 +-
 lib/replace/system/config.m4                       |   61 +-
 lib/replace/system/filesys.h                       |   37 +-
 lib/replace/system/kerberos.h                      |  123 +-
 lib/replace/system/locale.h                        |    4 +
 lib/replace/system/network.h                       |  117 +-
 lib/replace/system/passwd.h                        |   31 +-
 lib/replace/system/readline.h                      |    8 +-
 lib/replace/system/select.h                        |   36 +
 lib/replace/system/time.h                          |   37 +
 lib/replace/system/wait.h                          |   12 +-
 lib/replace/system/wscript_configure               |   26 +
 lib/replace/test/getifaddrs.c                      |  101 +
 .../testsuite_main.c => replace/test/main.c}       |   14 +-
 lib/replace/test/os2_delete.c                      |   26 +-
 lib/replace/test/shared_mremap.c                   |   48 +
 lib/replace/test/snprintf.c                        |   29 +
 lib/replace/test/testsuite.c                       |  698 +++++-
 lib/replace/timegm.m4                              |    2 +-
 lib/replace/win32.m4                               |    8 +-
 lib/replace/wscript                                |  466 ++++
 lib/socket_wrapper/config.m4                       |   21 +
 lib/socket_wrapper/socket_wrapper.c                | 2654 ++++++++++++++++++++
 lib/socket_wrapper/socket_wrapper.h                |  177 ++
 lib/socket_wrapper/testsuite.c                     |  105 +
 lib/socket_wrapper/wscript                         |   15 +
 lib/socket_wrapper/wscript_build                   |    9 +
 lib/util/fault.c                                   |   10 +-
 server/ctdb_logging.c                              |   11 +-
 67 files changed, 7265 insertions(+), 562 deletions(-)
 create mode 100644 lib/replace/Makefile
 copy lib/replace/{autogen.sh => autogen-autotools.sh} (100%)
 copy lib/{tdb => replace}/build_macros.m4 (100%)
 create mode 100755 lib/replace/configure
 create mode 100644 lib/replace/crypt.c
 create mode 100644 lib/replace/crypt.m4
 create mode 100644 lib/replace/hdr_replace.h
 create mode 100644 lib/replace/inet_aton.c
 create mode 100644 lib/replace/inet_ntoa.c
 create mode 100644 lib/replace/libreplace_network.m4
 create mode 100644 lib/replace/poll.c
 create mode 100644 lib/replace/replace-test.h
 create mode 100644 lib/replace/socket.c
 create mode 100644 lib/replace/socketpair.c
 create mode 100644 lib/replace/system/wscript_configure
 create mode 100644 lib/replace/test/getifaddrs.c
 copy lib/{talloc/testsuite_main.c => replace/test/main.c} (81%)
 create mode 100644 lib/replace/test/shared_mremap.c
 create mode 100644 lib/replace/test/snprintf.c
 create mode 100644 lib/replace/wscript
 create mode 100644 lib/socket_wrapper/config.m4
 create mode 100644 lib/socket_wrapper/socket_wrapper.c
 create mode 100644 lib/socket_wrapper/socket_wrapper.h
 create mode 100644 lib/socket_wrapper/testsuite.c
 create mode 100644 lib/socket_wrapper/wscript
 create mode 100644 lib/socket_wrapper/wscript_build


Changeset truncated at 500 lines:

diff --git a/Makefile.in b/Makefile.in
index f2c690c..3b9648d 100755
--- a/Makefile.in
+++ b/Makefile.in
@@ -29,6 +29,8 @@ POPT_LIBS = @POPT_LIBS@
 POPT_CFLAGS = @POPT_CFLAGS@
 POPT_OBJ = @POPT_OBJ@
 
+SOCKET_WRAPPER_OBJ = @SOCKET_WRAPPER_OBJS@
+
 PMDA_LIBS = -lpcp -lpcp_pmda
 PMDA_INSTALL = @CTDB_PMDA_INSTALL@
 PMDA_DEST_DIR = /var/lib/pcp/pmdas
@@ -37,7 +39,12 @@ CFLAGS=-g -I$(srcdir)/include -Iinclude -Ilib -Ilib/util -I$(srcdir) \
        -I at tallocdir@ -I at tdbdir@/include -I at libreplacedir@ \
 	-DVARDIR=\"$(localstatedir)\" -DETCDIR=\"$(etcdir)\" \
 	-DLOGDIR=\"$(logdir)\" \
-	-DUSE_MMAP=1 -DTEVENT_DEPRECATED_QUIET=1 @CFLAGS@ -Wno-format-zero-length $(POPT_CFLAGS)
+	-DUSE_MMAP=1 -DTEVENT_DEPRECATED_QUIET=1 @CFLAGS@ -Wno-format-zero-length $(POPT_CFLAGS) \
+	-fPIC
+
+LDSHFLAGS=-fPIC -shared
+#LDSHFLAGS=-fPIC -shared -Wl,-Bsymbolic -Wl,-z,relo -Wl,-Bsymbolic-funtions -Wl,--as-needed -Wl,-z,defs
+SHLD=${CC} ${CFLAGS} ${LDSHFLAGS} -o $@
 
 LIB_FLAGS=@LDFLAGS@ -Llib @LIBS@ $(POPT_LIBS) @INFINIBAND_LIBS@ @CTDB_PCAP_LDFLAGS@
 
@@ -52,13 +59,13 @@ CTDB_COMMON_OBJ =  common/ctdb_io.o common/ctdb_util.o \
 
 CTDB_LIB_OBJ = libctdb/ctdb.o libctdb/io_elem.o libctdb/local_tdb.o \
 	libctdb/messages.o libctdb/sync.o libctdb/control.o \
-	libctdb/logging.o
+	libctdb/logging.o $(SOCKET_WRAPPER_OBJ)
 
 CTDB_TCP_OBJ = tcp/tcp_connect.o tcp/tcp_io.o tcp/tcp_init.o
 
 CTDB_CLIENT_OBJ = client/ctdb_client.o \
 	$(CTDB_COMMON_OBJ) $(POPT_OBJ) $(UTIL_OBJ) @TALLOC_OBJ@ @TDB_OBJ@ \
-	@LIBREPLACEOBJ@ $(EXTRA_OBJ) @TEVENT_OBJ@
+	@LIBREPLACEOBJ@ $(EXTRA_OBJ) @TEVENT_OBJ@ $(SOCKET_WRAPPER_OBJ)
 
 CTDB_SERVER_OBJ = server/ctdbd.o server/ctdb_daemon.o server/ctdb_lockwait.o \
 	server/ctdb_recoverd.o server/ctdb_recover.o server/ctdb_freeze.o \
@@ -123,6 +130,15 @@ libctdb/libctdb.a: $(CTDB_LIB_OBJ)
 	@$(AR) $(ARFLAGS) libctdb/libctdb.a $(CTDB_LIB_OBJ)
 	@$(RANLIB) libctdb/libctdb.a
 
+libctdb/libctdb.so.0: $(CTDB_LIB_OBJ)
+	@echo Linking $@
+	@$(SHLD) -Wl,-soname=libctdb.so.0 $(CTDB_LIB_OBJ)
+
+libctdb/libctdb.so: libctdb/libctdb.so.0
+	@echo Creating $@
+	- at rm -f libctdb/libctdb.so
+	@ln -s libctdb.so.0 libctdb/libctdb.so
+
 bin/scsi_io: $(CTDB_CLIENT_OBJ) utils/scsi_io/scsi_io.o 
 	@echo Linking $@
 	@$(CC) $(CFLAGS) -o $@ utils/scsi_io/scsi_io.o $(CTDB_CLIENT_OBJ) $(LIB_FLAGS)
@@ -220,7 +236,7 @@ tests/bin/ctdb_transaction: $(CTDB_CLIENT_OBJ) tests/src/ctdb_transaction.o
 CTDB_SERVER_MOST_OBJ = $(CTDB_SERVER_OBJ:server/ctdbd.o=)
 CTDB_TEST_C = $(CTDB_SERVER_MOST_OBJ:.o=.c) tests/src/ctdbd_test.c
 CTDB_TEST_OBJ =  @TALLOC_OBJ@ @TDB_OBJ@ \
-	@LIBREPLACEOBJ@ $(EXTRA_OBJ) @TEVENT_OBJ@
+	@LIBREPLACEOBJ@ $(EXTRA_OBJ) @TEVENT_OBJ@ $(SOCKET_WRAPPER_OBJ)
 
 CTDB_TEST_DEPENDS = $(CTDB_TEST_OBJ) $(CTDB_SERVER_MOST_C) \
 	tests/src/ctdbd_test.c
diff --git a/common/system_linux.c b/common/system_linux.c
index 2dcdffb..ca2d475 100644
--- a/common/system_linux.c
+++ b/common/system_linux.c
@@ -353,7 +353,9 @@ int ctdb_sys_send_tcp(const ctdb_sock_addr *dest,
 		set_nonblocking(s);
 		set_close_on_exec(s);
 
-		ret = sendto(s, &ip4pkt, sizeof(ip4pkt), 0, &dest->ip, sizeof(dest->ip));
+		ret = sendto(s, &ip4pkt, sizeof(ip4pkt), 0,
+			     (const struct sockaddr *)&dest->ip,
+			     sizeof(dest->ip));
 		close(s);
 		if (ret != sizeof(ip4pkt)) {
 			DEBUG(DEBUG_CRIT,(__location__ " failed sendto (%s)\n", strerror(errno)));
@@ -395,7 +397,9 @@ int ctdb_sys_send_tcp(const ctdb_sock_addr *dest,
 		tmpport = tmpdest->ip6.sin6_port;
 
 		tmpdest->ip6.sin6_port = 0;
-		ret = sendto(s, &ip6pkt, sizeof(ip6pkt), 0, &dest->ip6, sizeof(dest->ip6));
+		ret = sendto(s, &ip6pkt, sizeof(ip6pkt), 0,
+			     (const struct sockaddr *)&dest->ip6,
+			     sizeof(dest->ip6));
 		tmpdest->ip6.sin6_port = tmpport;
 		close(s);
 
diff --git a/configure.ac b/configure.ac
index adcc5da..13ca48a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -35,6 +35,7 @@ case `uname` in
 esac
 
 AC_LIBREPLACE_ALL_CHECKS
+AC_LIBREPLACE_NETWORK_CHECKS
 
 if test "$ac_cv_prog_gcc" = yes; then
    CFLAGS="$CFLAGS -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings"
@@ -62,6 +63,7 @@ m4_include(libtevent.m4)
 m4_include(ib/config.m4)
 m4_include(lib/util/signal.m4)
 m4_include(lib/util/fault.m4)
+m4_include(lib/socket_wrapper/config.m4)
 
 AC_CHECK_HEADERS(sched.h)
 AC_CHECK_HEADERS(pcp/pmapi.h pcp/impl.h pcp/pmda.h, [], [],
diff --git a/lib/replace/Makefile b/lib/replace/Makefile
new file mode 100644
index 0000000..3649901
--- /dev/null
+++ b/lib/replace/Makefile
@@ -0,0 +1,63 @@
+# simple makefile wrapper to run waf
+
+WAF=WAF_MAKE=1 PATH=buildtools/bin:../../buildtools/bin:$$PATH waf
+
+all:
+	$(WAF) build
+
+install:
+	$(WAF) install
+
+uninstall:
+	$(WAF) uninstall
+
+test:
+	$(WAF) test $(TEST_OPTIONS)
+
+testenv:
+	$(WAF) test --testenv $(TEST_OPTIONS)
+
+quicktest:
+	$(WAF) test --quick $(TEST_OPTIONS)
+
+dist:
+	touch .tmplock
+	WAFLOCK=.tmplock $(WAF) dist
+
+distcheck:
+	touch .tmplock
+	WAFLOCK=.tmplock $(WAF) distcheck
+
+clean:
+	$(WAF) clean
+
+distclean:
+	$(WAF) distclean
+
+reconfigure: configure
+	$(WAF) reconfigure
+
+show_waf_options:
+	$(WAF) --help
+
+# some compatibility make targets
+everything: all
+
+testsuite: all
+
+check: test
+
+torture: all
+
+# this should do an install as well, once install is finished
+installcheck: test
+
+etags:
+	$(WAF) etags
+
+ctags:
+	$(WAF) ctags
+
+bin/%:: FORCE
+	$(WAF) --targets=`basename $@`
+FORCE:
diff --git a/lib/replace/Makefile.in b/lib/replace/Makefile.in
index 30f39ac..65f8125 100644
--- a/lib/replace/Makefile.in
+++ b/lib/replace/Makefile.in
@@ -9,7 +9,9 @@ libdir = @libdir@
 VPATH = @libreplacedir@
 srcdir = @srcdir@
 builddir = @builddir@
-INSTALL = @INSTALL@
+sharedbuilddir = @sharedbuilddir@
+INSTALLCMD = @INSTALL@
+LIBS = @LIBS@
 
 .PHONY: test all showflags install installcheck clean distclean realdistclean
 
@@ -25,10 +27,17 @@ showflags:
 	@echo '  CC     = $(CC)'
 	@echo '  CFLAGS = $(CFLAGS)'
 	@echo '  LDFLAGS= $(LDFLAGS)'
+	@echo '  LIBS   = $(LIBS)'
 
 install: all
-	mkdir -p $(libdir)
-	$(INSTALL) libreplace.a $(libdir)
+	${INSTALLCMD} -d $(libdir)
+	${INSTALLCMD} -m 644 libreplace.a $(libdir)
+
+shared-build: all
+	${INSTALLCMD} -d $(sharedbuilddir)/include
+	${INSTALLCMD} -m 644 replace.h $(sharedbuilddir)/include
+	${INSTALLCMD} -d $(sharedbuilddir)/lib
+	${INSTALLCMD} -m 644 libreplace.a $(sharedbuilddir)/lib
 
 libreplace.a: $(OBJS)
 	ar -rcsv $@ $(OBJS)
@@ -38,10 +47,10 @@ test: all
 
 installcheck: install test
 
-TEST_OBJS = test/testsuite.o test/os2_delete.o test/strptime.o
+TEST_OBJS = test/main.o test/testsuite.o test/os2_delete.o test/strptime.o test/getifaddrs.o
 
 testsuite: libreplace.a $(TEST_OBJS)
-	$(CC) -o testsuite $(TEST_OBJS) -L. -lreplace $(LDFLAGS)
+	$(CC) -o testsuite $(TEST_OBJS) -L. -lreplace $(LDFLAGS) $(LIBS)
 
 .c.o:
 	@echo Compiling $*.c
diff --git a/lib/replace/README b/lib/replace/README
index 268a1b1..bf4e67f 100644
--- a/lib/replace/README
+++ b/lib/replace/README
@@ -15,7 +15,6 @@ rename
 initgroups
 memmove
 strdup
-inet_ntoa
 setlinebuf
 vsyslog
 timegm
@@ -34,6 +33,7 @@ opendir
 readdir
 telldir
 seekdir
+clock_gettime
 closedir
 dlopen
 dlclose
@@ -47,11 +47,14 @@ mkdtemp
 mkstemp (a secure one!)
 pread
 pwrite
+chown
+lchown
 getpass
 readline (the library)
 inet_ntoa
 inet_ntop
 inet_pton
+inet_aton
 strtoll
 strtoull
 socketpair
@@ -62,14 +65,21 @@ getnameinfo
 gai_strerror
 getifaddrs
 freeifaddrs
+utime
+utimes
+dup2
+link
+readlink
+symlink
+realpath
 
 Types:
 bool
 socklen_t
-uint_t
 uint{8,16,32,64}_t
 int{8,16,32,64}_t
 intptr_t
+sig_atomic_t
 
 Constants:
 PATH_NAME_MAX
@@ -105,6 +115,9 @@ Headers:
 stdint.h
 stdbool.h
 
+Optional C keywords:
+volatile
+
 Prerequisites:
 memset (for bzero)
 syslog (for vsyslog)
diff --git a/lib/replace/autoconf-2.60.m4 b/lib/replace/autoconf-2.60.m4
index 2d5dbc1..b2694fd 100644
--- a/lib/replace/autoconf-2.60.m4
+++ b/lib/replace/autoconf-2.60.m4
@@ -181,32 +181,56 @@ AC_DEFUN([AC_PROG_CC_C99],
 # typically due to standards-conformance issues.
 m4_ifndef([AC_USE_SYSTEM_EXTENSIONS],[
 AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
-[
-  AC_BEFORE([$0], [AC_COMPILE_IFELSE])
-  AC_BEFORE([$0], [AC_RUN_IFELSE])
+[AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl
+AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
 
-  AC_REQUIRE([AC_GNU_SOURCE])
-  AC_REQUIRE([AC_AIX])
-  AC_REQUIRE([AC_MINIX])
+  AC_CHECK_HEADER([minix/config.h], [MINIX=yes], [MINIX=])
+  if test "$MINIX" = yes; then
+    AC_DEFINE([_POSIX_SOURCE], [1],
+      [Define to 1 if you need to in order for `stat' and other
+       things to work.])
+    AC_DEFINE([_POSIX_1_SOURCE], [2],
+      [Define to 2 if the system does not provide POSIX.1 features
+       except with this defined.])
+    AC_DEFINE([_MINIX], [1],
+      [Define to 1 if on MINIX.])
+  fi
 
   AH_VERBATIM([__EXTENSIONS__],
-[/* Enable extensions on Solaris.  */
-#ifndef __EXTENSIONS__
-# undef __EXTENSIONS__
+[/* Enable extensions on AIX 3, Interix.  */
+#ifndef _ALL_SOURCE
+# undef _ALL_SOURCE
 #endif
+/* Enable GNU extensions on systems that have them.  */
+#ifndef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif
+/* Enable threading extensions on Solaris.  */
 #ifndef _POSIX_PTHREAD_SEMANTICS
 # undef _POSIX_PTHREAD_SEMANTICS
-#endif])
+#endif
+/* Enable extensions on HP NonStop.  */
+#ifndef _TANDEM_SOURCE
+# undef _TANDEM_SOURCE
+#endif
+/* Enable general extensions on Solaris.  */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
+])
   AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__],
     [ac_cv_safe_to_define___extensions__],
     [AC_COMPILE_IFELSE(
-       [AC_LANG_PROGRAM([
+       [AC_LANG_PROGRAM([[
 #	  define __EXTENSIONS__ 1
-	  AC_INCLUDES_DEFAULT])],
+	  ]AC_INCLUDES_DEFAULT])],
        [ac_cv_safe_to_define___extensions__=yes],
        [ac_cv_safe_to_define___extensions__=no])])
   test $ac_cv_safe_to_define___extensions__ = yes &&
     AC_DEFINE([__EXTENSIONS__])
+  AC_DEFINE([_ALL_SOURCE])
+  AC_DEFINE([_GNU_SOURCE])
   AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
-])
+  AC_DEFINE([_TANDEM_SOURCE])
+])# AC_USE_SYSTEM_EXTENSIONS
 ])
diff --git a/lib/replace/autogen.sh b/lib/replace/autogen-autotools.sh
similarity index 100%
copy from lib/replace/autogen.sh
copy to lib/replace/autogen-autotools.sh
diff --git a/lib/tdb/build_macros.m4 b/lib/replace/build_macros.m4
similarity index 100%
copy from lib/tdb/build_macros.m4
copy to lib/replace/build_macros.m4
diff --git a/lib/replace/config.guess b/lib/replace/config.guess
index e3a2116..da83314 100755
--- a/lib/replace/config.guess
+++ b/lib/replace/config.guess
@@ -1,10 +1,10 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
 #   Free Software Foundation, Inc.
 
-timestamp='2009-06-10'
+timestamp='2009-04-27'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -170,7 +170,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
 		eval $set_cc_for_build
 		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
-			| grep -q __ELF__
+			| grep __ELF__ >/dev/null
 		then
 		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
 		    # Return netbsd for either.  FIX?
@@ -656,7 +656,7 @@ EOF
 	    # => hppa64-hp-hpux11.23
 
 	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
-		grep -q __LP64__
+		grep __LP64__ >/dev/null
 	    then
 		HP_ARCH="hppa2.0w"
 	    else
@@ -822,9 +822,6 @@ EOF
     [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
 	echo i${UNAME_MACHINE}-pc-mks
 	exit ;;
-    8664:Windows_NT:*)
-	echo x86_64-pc-mks
-	exit ;;
     i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
 	# How do we know it's Interix rather than the generic POSIX subsystem?
 	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
@@ -885,17 +882,40 @@ EOF
     m68*:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit ;;
-    mips:Linux:*:* | mips64:Linux:*:*)
+    mips:Linux:*:*)
 	eval $set_cc_for_build
 	sed 's/^	//' << EOF >$dummy.c
 	#undef CPU
-	#undef ${UNAME_MACHINE}
-	#undef ${UNAME_MACHINE}el
+	#undef mips
+	#undef mipsel
 	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-	CPU=${UNAME_MACHINE}el
+	CPU=mipsel
 	#else
 	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-	CPU=${UNAME_MACHINE}
+	CPU=mips
+	#else
+	CPU=
+	#endif
+	#endif
+EOF
+	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+	    /^CPU/{
+		s: ::g
+		p
+	    }'`"
+	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+	;;
+    mips64:Linux:*:*)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#undef CPU
+	#undef mips64
+	#undef mips64el
+	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+	CPU=mips64el
+	#else
+	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+	CPU=mips64
 	#else
 	CPU=
 	#endif
@@ -927,7 +947,7 @@ EOF
 	  EV67)  UNAME_MACHINE=alphaev67 ;;
 	  EV68*) UNAME_MACHINE=alphaev68 ;;
         esac
-	objdump --private-headers /bin/sh | grep -q ld.so.1
+	objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
 	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
 	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
 	exit ;;
@@ -981,6 +1001,14 @@ EOF
 	  elf32-i386)
 		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
 		;;
+	  a.out-i386-linux)
+		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+		exit ;;
+	  "")
+		# Either a pre-BFD a.out linker (linux-gnuoldld) or
+		# one that does not give us useful --help.
+		echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
+		exit ;;
 	esac
 	# Determine whether the default compiler is a.out or elf
 	eval $set_cc_for_build
@@ -1046,7 +1074,7 @@ EOF
     i*86:syllable:*:*)
 	echo ${UNAME_MACHINE}-pc-syllable
 	exit ;;


-- 
CTDB repository


More information about the samba-cvs mailing list