[SCM] Samba Shared Repository - branch v3-2-stable updated - release-3-2-0pre3-146-g227fb2a

Karolin Seeger kseeger at samba.org
Thu May 22 17:56:41 GMT 2008


The branch, v3-2-stable has been updated
       via  227fb2af135ba3a86efc99e8a7dd400c45eb0e78 (commit)
       via  e8bebc82ec4a6d179df0a45c9df33786d1dc6123 (commit)
       via  470ed008bc1e2c42ef8857e78a57cabf6e8323fc (commit)
       via  de837b6dd24b97738c9cca060a8d2b6882dc79cd (commit)
       via  77faf99b3834ae443ceed487a4012a3676d6453f (commit)
       via  4f2cb7b8b63d30c354fbd6086a9b818cbb45968e (commit)
       via  cb9de681a46ab9a6591a62300343fb41018f5ecc (commit)
       via  bedde942efcb3445ac1e92fcb0b9045ec21a1557 (commit)
       via  913d2234d3846ea9d659f62d34aa31768e389dc7 (commit)
       via  761b0104eab1076d862b95b6a222532b89ebcd90 (commit)
       via  c1a1f8555f71868167f4c39b73273adceace3c0e (commit)
       via  c750cf230e443a605e1dc33b10fd7d2c1747daaa (commit)
       via  4487c38506b44af93b1092227e5d503c6baf7f9b (commit)
       via  d9bceb791d40450f4593c3834a50573e2dd3994d (commit)
       via  dc613fd3d8bb6e777e61ea1edb5cd1f487369cc0 (commit)
       via  1502ca60d612dbe2edb0ca8ab36ad69df1c0ac45 (commit)
       via  24cd04e59bfcbc331c4462984f0ddd0b3978796c (commit)
       via  9fb313620d063db8234a8242e7932b3ff78a3ca1 (commit)
       via  f4ef532f08f32b241ab2048ce2e4f6ac0a8d0159 (commit)
       via  45970df063af242b961292529be001e104050728 (commit)
       via  41b9c309d7c2cc987109b31f3656c08edf6a66a8 (commit)
       via  305081e3c5c824d2ccfdbbf68c0df13199133cc7 (commit)
       via  c5b67f447e03b7f55bd5a5df0af9418d2b3950b1 (commit)
       via  2325ac47ac6329bbfd1745a47801d58396e27453 (commit)
       via  d5522d97b053ad27f0b75154507a50a72d7e014d (commit)
       via  644a448733976caccb13e1710dbfa3402a089bb5 (commit)
       via  8efad126811be0f89d3a3b3d603e872ad4adfd7f (commit)
       via  ef492fd61e7be522aa033f1ef3f2a815603465bb (commit)
       via  d30cc40b1a615f34c4d5bee6e63e89b5b18267af (commit)
       via  7fdff10410947b54d92aabd4c3d16d55d4598eb0 (commit)
      from  c1a54982146e347c5b92482ff6a11933e7cde19a (commit)

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


- Log -----------------------------------------------------------------
commit 227fb2af135ba3a86efc99e8a7dd400c45eb0e78
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu May 22 15:00:19 2008 +0200

    libreplace: we need to use AC_TRY_LINK() to make sure HAVE_IPV6 is correctly detected
    
    metze
    (cherry picked from commit 84b5652d3e5766521436e4c7d59615b08b2bb198)
    (cherry picked from commit f7e0bff88a23be0e7cbbd7eab60ed49bcdda04fa)

commit e8bebc82ec4a6d179df0a45c9df33786d1dc6123
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed May 21 22:32:21 2008 +0200

    configure: samba_cv_unixsocket was renamed into libreplace_cv_HAVE_UNIXSOCKET
    
    metze
    (cherry picked from commit 5967d2a5d6e9547d868bd85e3f3d3936bbd07fa9)

commit 470ed008bc1e2c42ef8857e78a57cabf6e8323fc
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed May 21 22:31:08 2008 +0200

    configure: remove HAVE_IPV6 test as LIBREPLACE_NETWORK_CHECKS already have this
    
    metze
    (cherry picked from commit c03fa242403fe28bc2b6ea84834457ce2410d3ca)

commit de837b6dd24b97738c9cca060a8d2b6882dc79cd
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed May 21 21:27:45 2008 +0200

    libreplace: add test for HAVE_IPV6
    
    Samba can later just check libreplace_cv_HAVE_IPV6 = yes.
    
    metze
    (cherry picked from commit e835e7eebcc064ce0813814796828f15ad112fbd)
    (cherry picked from commit 757071e59e4c1be0971b68d33833c621ed6bf361)

commit 77faf99b3834ae443ceed487a4012a3676d6453f
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri May 16 12:50:16 2008 +0200

    configure: make use of LIBREPLACE_NETWORK_LIBS instead of redoing the tests
    
    metze
    (cherry picked from commit 4b484426f52d5ed37af117f5ade63816f1c9b0ea)

commit 4f2cb7b8b63d30c354fbd6086a9b818cbb45968e
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri May 16 12:48:57 2008 +0200

    configure: remove some header checks which are already done by AC_LIBREPLACE_NETWORK_CHECKS
    
    metze
    (cherry picked from commit d4bf447361bd52546c6944fbf6ee96637aa725ed)

commit cb9de681a46ab9a6591a62300343fb41018f5ecc
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri May 16 12:46:10 2008 +0200

    lib/replace: move sys/sockio.h and sys/un.h checks into AC_LIBREPLACE_NETWORK_CHECKS
    
    metze
    (cherry picked from commit 7f26a5425e706a97cc07c5139b3fea4fde9e4020)
    (cherry picked from commit 4bb7873cf0ddc8832fa94baeb6a817e4783e30f4)

commit bedde942efcb3445ac1e92fcb0b9045ec21a1557
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri May 16 12:33:11 2008 +0200

    configure: remove unused configure checks for HAVE_SOCK_SIN_LEN and HAVE_UNIXSOCKET and rely on libreplace
    
    metze
    (cherry picked from commit ff5cecdec74cd58ef64e166b5d7a55584afa23f6)

commit 913d2234d3846ea9d659f62d34aa31768e389dc7
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri May 16 12:29:21 2008 +0200

    lib/replace: add checks for HAVE_SOCK_SIN_LEN and HAVE_UNIXSOCKET
    
    Moved from the samba specific locations
    
    metze
    (cherry picked from commit e674128ee2f11596f358ed46104c9d25eb2f754f)
    (cherry picked from commit c403965f5723177b42f393df20a29b07dceae1cb)

commit 761b0104eab1076d862b95b6a222532b89ebcd90
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri May 16 12:16:05 2008 +0200

    configure: remove unused configure check for HAVE_WORKING_AF_LOCAL
    
    metze
    (cherry picked from commit 0aef5ed43b81e0cb9b19f21125f270016a311f58)

commit c1a1f8555f71868167f4c39b73273adceace3c0e
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu May 8 11:01:09 2008 +0200

    libreplace: try to fix the build on HP-UX which has if_nametoindex() in -lipv6
    
    metze
    (cherry picked from commit da2179ee5d5b6094ab63a9d9d6a8d59893937087)
    (cherry picked from commit 9f931829aaeda8004e7ee3b8b2ac9ddaab8bffb7)

commit c750cf230e443a605e1dc33b10fd7d2c1747daaa
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu May 8 10:39:41 2008 +0200

    libreplace: make sure system/network.h is only used when AC_LIBREPLACE_NETWORK_CHECKS was used
    
    metze
    (cherry picked from commit 3fddd36e119f73a5021370450f9687ef9d252bab)
    (cherry picked from commit 0b26742234467ac1dcfda059e81a35a1cd5e96ed)

commit 4487c38506b44af93b1092227e5d503c6baf7f9b
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu May 8 10:32:19 2008 +0200

    libreplace: export LIBREPLACE_NETWORK_OBJS and LIBREPLACE_NETWORK_LIBS vars
    
    metze
    (cherry picked from commit aa7ef1af746319a3d771decd0ec03dabe8b8ad28)
    (cherry picked from commit 84daf26558f675fd07e3ac9a699e06801814e393)

commit d9bceb791d40450f4593c3834a50573e2dd3994d
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu May 8 10:27:23 2008 +0200

    libreplace: include inet_ntoa.o when the system one is broken
    
    metze
    (cherry picked from commit 67845d3471711d24069636d0d4032f9d53748334)
    (cherry picked from commit c44c0636ade08751edc7dce4ea0e2a2279aa0eac)

commit dc613fd3d8bb6e777e61ea1edb5cd1f487369cc0
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu May 8 10:08:42 2008 +0200

    libreplace: merge getifaddrs.m4 into libreplace_network.m4
    
    metze
    (cherry picked from commit 0234d397fefee8e1d0dcd3402f748c2251021c90)
    (cherry picked from commit 3ed6f285eca540d6c58aac84c6f50f949519b742)

commit 1502ca60d612dbe2edb0ca8ab36ad69df1c0ac45
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu May 8 10:06:39 2008 +0200

    libreplace: merge getaddrinfo.m4 into libreplace_network.m4
    
    metze
    (cherry picked from commit 64591d064dc3da6074f0f7539911a6e433d9cc43)
    (cherry picked from commit c5df0a4faffdd16c3fb3ecdc5720842d6fe49e55)

commit 24cd04e59bfcbc331c4462984f0ddd0b3978796c
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu May 8 10:04:51 2008 +0200

    libreplace: merge socketpair.m4 into libreplace_network.m4
    
    metze
    (cherry picked from commit f9f8f93adcc7161ebb18f5a0bf28c73d951a15ad)
    (cherry picked from commit 3adda27f3eecb5ea027c35e974e3b6bb5fe3b83e)

commit 9fb313620d063db8234a8242e7932b3ff78a3ca1
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu May 8 10:02:21 2008 +0200

    libreplace: merge inet_pton.m4 into libreplace_network.m4
    
    metze
    (cherry picked from commit 3a70274c908e31453942b442351eab8423c1a53d)
    (cherry picked from commit 784b37987c51806b225371ea1f1bdc416de3dfd1)

commit f4ef532f08f32b241ab2048ce2e4f6ac0a8d0159
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu May 8 10:00:58 2008 +0200

    libreplace: merge inet_ntop.m4 into libreplace_network.m4
    
    metze
    (cherry picked from commit 223ef6c08efb52251d0a772bb0c481b2803cf0ce)
    (cherry picked from commit 97483e2830971d34ef0775159bfd07402e3d284e)

commit 45970df063af242b961292529be001e104050728
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu May 8 09:59:16 2008 +0200

    libreplace: merge inet_aton.m4 into libreplace_network.m4
    
    metze
    (cherry picked from commit fba00736c870f449c0eee32fe0d7b0d539dca51f)
    (cherry picked from commit b90a6c5cbf2912c9cc2961de4efc880502a3441e)

commit 41b9c309d7c2cc987109b31f3656c08edf6a66a8
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu May 8 09:58:07 2008 +0200

    libreplace: merge inet_ntoa.m4 into libreplace_network.m4
    
    metze
    (cherry picked from commit 82e826253b6d18832931dbb5c1dda009889bf9e0)
    (cherry picked from commit 66126edaf425ccdfc5bed90252493235878d4fc1)

commit 305081e3c5c824d2ccfdbbf68c0df13199133cc7
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu May 8 09:56:10 2008 +0200

    libreplace: merge socket.m4 into libreplace_network.m4
    
    metze
    (cherry picked from commit c70eba87dbbac6c2c1e68c343cdd410577c1686f)
    (cherry picked from commit 236ce0ac6f949c2dd42f5df06e39af69b779d61e)

commit c5b67f447e03b7f55bd5a5df0af9418d2b3950b1
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Thu May 8 13:43:45 2008 +0200

    Fix typo.
    (cherry picked from commit bd089818a3182698dfe85039c1b2e22d8c2835bb)
    (cherry picked from commit 7a3cb33c6d9d14907777f55abd6421bab89b34b2)

commit 2325ac47ac6329bbfd1745a47801d58396e27453
Author: William Jojo <jojowil at hvcc.edu>
Date:   Thu May 8 12:41:57 2008 +0200

    Add undefined symbol flag for AIX.
    (cherry picked from commit dabdf24e86f038e3afc67532fa5bf60a37992161)
    (cherry picked from commit fdf2a94583949150fd426f44cd33265fc6fd9d6e)

commit d5522d97b053ad27f0b75154507a50a72d7e014d
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed May 7 17:38:41 2008 +0200

    libreplace: also use AC_LIBREPLACE_NETWORK_CHECKS for the standalone build
    
    metze
    (cherry picked from commit 04f4523ed032946b8f0e74ac6f7458010159e3bb)
    (cherry picked from commit f7d298760d9822d7a437507a49f2140352212411)

commit 644a448733976caccb13e1710dbfa3402a089bb5
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed May 7 17:20:38 2008 +0200

    libreplace: use AC_LIBREPLACE_NETWORK_CHECKS only for samba
    
    metze
    (cherry picked from commit 7adf41795027dba9648912373220fa0dcf9bb42a)

commit 8efad126811be0f89d3a3b3d603e872ad4adfd7f
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed May 7 17:15:36 2008 +0200

    libreplace: use AC_LIBREPLACE_NETWORK_CHECKS only for samba
    
    metze
    (cherry picked from commit 3451b54bf7f5e37a589ec261d28c2a8b6f9788ed)
    (cherry picked from commit a004b38a953d64e77b58bdb99d0af946e2cae2cf)

commit ef492fd61e7be522aa033f1ef3f2a815603465bb
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed May 7 16:50:19 2008 +0200

    libreplace: split out network checks into a AC_LIBREPLACE_NETWORK_CHECKS macro
    
    Note: moving it out of AC_LIBREPLACE_BROKEN_CHECKS will be the next step
    
    metze
    (cherry picked from commit 55a904b1d7aeca849d450e371b18afca5b0c6218)
    (cherry picked from commit a7969f94f854594dbe6ef3ff630e242d27ad618e)

commit d30cc40b1a615f34c4d5bee6e63e89b5b18267af
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed May 7 13:10:31 2008 +0200

    libreplace: always provide utime() and utimes()
    
    I'd like to also provide futimes(), but it seems
    that some systems doesn't support a it at kernel level.
    
    If someone knows how to write a portable replacement
    for futimes() please tell me...
    
    metze
    (cherry picked from commit a9604fe4a323dccb537cf02ea7594437b4995803)
    (cherry picked from commit cde0db60402a69a05dea51b5b8f01789e93406e7)

commit 7fdff10410947b54d92aabd4c3d16d55d4598eb0
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue May 6 12:38:55 2008 +0200

    libreplace: check how portable utimes() and futimes() are
    
    metze
    (cherry picked from commit 8798ce3c744025b94973784dcb44d099427ef190)
    (cherry picked from commit 1c01674624db5a2dae3afe9ba213a69c2ee2efda)

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

Summary of changes:
 source/configure.in                      |  111 +--------
 source/lib/replace/README                |    2 +
 source/lib/replace/configure.ac          |    1 +
 source/lib/replace/getaddrinfo.m4        |   32 ---
 source/lib/replace/getifaddrs.m4         |  128 ----------
 source/lib/replace/inet_aton.m4          |    1 -
 source/lib/replace/inet_ntoa.m4          |   19 --
 source/lib/replace/inet_ntop.m4          |    1 -
 source/lib/replace/inet_pton.m4          |    1 -
 source/lib/replace/libreplace.m4         |   65 +-----
 source/lib/replace/libreplace_ld.m4      |    3 +
 source/lib/replace/libreplace_network.m4 |  377 ++++++++++++++++++++++++++++++
 source/lib/replace/replace.c             |   27 +++
 source/lib/replace/replace.h             |   10 +
 source/lib/replace/samba.m4              |    1 +
 source/lib/replace/socket.m4             |   39 ---
 source/lib/replace/socketpair.m4         |    1 -
 source/lib/replace/system/config.m4      |    1 +
 source/lib/replace/system/network.h      |    4 +
 source/lib/replace/system/time.h         |   15 ++
 source/lib/replace/test/testsuite.c      |  145 ++++++++++++
 source/tests/unixsock.c                  |   93 --------
 22 files changed, 595 insertions(+), 482 deletions(-)
 delete mode 100644 source/lib/replace/getaddrinfo.m4
 delete mode 100644 source/lib/replace/getifaddrs.m4
 delete mode 100644 source/lib/replace/inet_aton.m4
 delete mode 100644 source/lib/replace/inet_ntoa.m4
 delete mode 100644 source/lib/replace/inet_ntop.m4
 delete mode 100644 source/lib/replace/inet_pton.m4
 create mode 100644 source/lib/replace/libreplace_network.m4
 delete mode 100644 source/lib/replace/socket.m4
 delete mode 100644 source/lib/replace/socketpair.m4
 delete mode 100644 source/tests/unixsock.c


Changeset truncated at 500 lines:

diff --git a/source/configure.in b/source/configure.in
index 9e17fd1..8a6b2d6 100644
--- a/source/configure.in
+++ b/source/configure.in
@@ -650,6 +650,7 @@ SAVE_CPPFLAGS="${CPPFLAGS}"
 CPPFLAGS="${CPPFLAGS} ${SAMBA_CONFIGURE_CPPFLAGS}"
 
 AC_LIBREPLACE_BROKEN_CHECKS
+AC_LIBREPLACE_NETWORK_CHECKS
 
 CPPFLAGS="${SAVE_CPPFLAGS}"
 
@@ -662,17 +663,16 @@ done
 AC_SUBST(LIBREPLACE_OBJS)
 
 # add -ldl to the global LIBS
-LIBS="${LIBS} ${LIBDL}"
+LIBS="${LIBS} ${LIBDL} ${LIBREPLACE_NETWORK_LIBS}"
 
-AC_CHECK_HEADERS(aio.h arpa/inet.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h rpc/nettype.h)
+AC_CHECK_HEADERS(aio.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h rpc/nettype.h)
 AC_CHECK_HEADERS(unistd.h utime.h grp.h sys/id.h memory.h alloca.h)
 AC_CHECK_HEADERS(limits.h float.h pthread.h)
 AC_CHECK_HEADERS(rpc/rpc.h rpcsvc/nis.h rpcsvc/ypclnt.h)
 AC_CHECK_HEADERS(sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/prctl.h)
-AC_CHECK_HEADERS(sys/mman.h sys/filio.h sys/priv.h sys/shm.h string.h strings.h stdlib.h sys/socket.h)
-AC_CHECK_HEADERS(sys/un.h ifaddrs.h)
+AC_CHECK_HEADERS(sys/mman.h sys/filio.h sys/priv.h sys/shm.h string.h strings.h stdlib.h)
 AC_CHECK_HEADERS(sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h)
-AC_CHECK_HEADERS(sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h)
+AC_CHECK_HEADERS(sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h)
 AC_CHECK_HEADERS(sys/sysmacros.h)
 AC_CHECK_HEADERS(sys/syslog.h syslog.h)
 AC_CHECK_HEADERS(langinfo.h locale.h)
@@ -804,24 +804,6 @@ if test x"$samba_cv_optimize_out_funcation_calls" = x"yes"; then
    AC_DEFINE(HAVE_COMPILER_WILL_OPTIMIZE_OUT_FNS,1,[Whether the compiler will optimize out function calls])
 fi
 
-############################################
-# check for unix domain sockets
-AC_CACHE_CHECK([for unix domain sockets],samba_cv_unixsocket, [
-    AC_TRY_COMPILE([
-#include <sys/types.h>
-#include <stdlib.h>
-#include <stddef.h>
-#include <sys/socket.h>
-#include <sys/un.h>],
-[
-  struct sockaddr_un sunaddr;
-  sunaddr.sun_family = AF_UNIX;
-],
-	samba_cv_unixsocket=yes,samba_cv_unixsocket=no)])
-if test x"$samba_cv_unixsocket" = x"yes"; then
-   AC_DEFINE(HAVE_UNIXSOCKET,1,[If we need to build with unixsocket support])
-fi
-
 #############################################
 # check for fd passing struct via msg_control
 AC_CACHE_CHECK([for fd passing via msg_control],samba_cv_msghdr_msg_control, [
@@ -1015,40 +997,6 @@ AC_CHECK_LIB(readline, history_list,
 	     [],
 	     [$TERMLIBS])
 
-# The following test taken from the cvs sources
-# If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
-# The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
-# libsocket.so which has a bad implementation of gethostbyname (it
-# only looks in /etc/hosts), so we only look for -lsocket if we need
-# it.
-AC_CHECK_FUNCS(connect)
-if test x"$ac_cv_func_connect" = x"no"; then
-    case "$LIBS" in
-    *-lnsl*) ;;
-    *) AC_CHECK_LIB(nsl_s, connect) ;;
-    esac
-    case "$LIBS" in
-    *-lnsl*) ;;
-    *) AC_CHECK_LIB(nsl, connect) ;;
-    esac
-    case "$LIBS" in
-    *-lsocket*) ;;
-    *) AC_CHECK_LIB(socket, connect) ;;
-    esac
-    case "$LIBS" in
-    *-linet*) ;;
-    *) AC_CHECK_LIB(inet, connect) ;;
-    esac
-    dnl We can't just call AC_CHECK_FUNCS(connect) here, because the value
-    dnl has been cached.
-    if test x"$ac_cv_lib_socket_connect" = x"yes" ||
-       test x"$ac_cv_lib_inet_connect" = x"yes"; then
-        # ac_cv_func_connect=yes
-        # don't!  it would cause AC_CHECK_FUNC to succeed next time configure is run
-        AC_DEFINE(HAVE_CONNECT,1,[Whether the system has connect()])
-    fi
-fi
-
 ###############################################
 # test for where we get yp_get_default_domain() from
 AC_SEARCH_LIBS(yp_get_default_domain, [nsl])
@@ -2006,16 +1954,6 @@ if test x"$samba_cv_HAVE_UNSIGNED_CHAR" = x"yes"; then
     AC_DEFINE(HAVE_UNSIGNED_CHAR,1,[Whether the 'unsigned char' type is available])
 fi
 
-AC_CACHE_CHECK([for sin_len in sock],samba_cv_HAVE_SOCK_SIN_LEN,[
-AC_TRY_COMPILE([#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>],
-[struct sockaddr_in sock; sock.sin_len = sizeof(sock);],
-samba_cv_HAVE_SOCK_SIN_LEN=yes,samba_cv_HAVE_SOCK_SIN_LEN=no)])
-if test x"$samba_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then
-    AC_DEFINE(HAVE_SOCK_SIN_LEN,1,[Whether the sockaddr_in struct has a sin_len property])
-fi
-
 AC_CACHE_CHECK([whether seekdir returns void],samba_cv_SEEKDIR_RETURNS_VOID,[
 AC_TRY_COMPILE([#include <sys/types.h>
 #include <dirent.h>
@@ -2653,16 +2591,6 @@ if test x"$samba_cv_HAVE_FTRUNCATE_EXTEND" = x"yes"; then
     AC_DEFINE(HAVE_FTRUNCATE_EXTEND,1,[Truncate extend])
 fi
 
-AC_CACHE_CHECK([for AF_LOCAL socket support], samba_cv_HAVE_WORKING_AF_LOCAL, [
-AC_TRY_RUN([#include "${srcdir-.}/tests/unixsock.c"],
-	   samba_cv_HAVE_WORKING_AF_LOCAL=yes,
-	   samba_cv_HAVE_WORKING_AF_LOCAL=no,
-	   samba_cv_HAVE_WORKING_AF_LOCAL=cross)])
-if test x"$samba_cv_HAVE_WORKING_AF_LOCAL" != xno
-then
-    AC_DEFINE(HAVE_WORKING_AF_LOCAL, 1, [Define if you have working AF_LOCAL sockets])
-fi
-
 AC_CACHE_CHECK([for broken getgroups],samba_cv_HAVE_BROKEN_GETGROUPS,[
 AC_TRY_RUN([#include "${srcdir-.}/tests/getgroups.c"],
            samba_cv_HAVE_BROKEN_GETGROUPS=yes,samba_cv_HAVE_BROKEN_GETGROUPS=no,samba_cv_HAVE_BROKEN_GETGROUPS=cross)])
@@ -2676,29 +2604,6 @@ SMB_CHECK_SYSCONF(_SC_NPROCESSORS_ONLN)
 SMB_CHECK_SYSCONF(_SC_PAGESIZE)
 AC_CHECK_FUNCS(getpagesize)
 
-dnl test for ipv6
-AC_CACHE_CHECK([for ipv6 support],samba_cv_HAVE_IPV6,[
-AC_TRY_COMPILE([
-#include <stdlib.h> /* for NULL */
-#include <sys/socket.h>
-#include <sys/types.h>
-#include <netdb.h>],
-[
-struct sockaddr_storage sa_store;
-struct addrinfo *ai = NULL;
-struct in6_addr in6addr;
-int s = socket(AF_INET6, SOCK_STREAM, 0);
-int ret = getaddrinfo(NULL, NULL, NULL, &ai);
-if (ret != 0) {
-	const char *es = gai_strerror(ret);
-}
-freeaddrinfo(ai);
-],
-samba_cv_HAVE_IPV6=yes,samba_cv_HAVE_IPV6=no)])
-if test x"$samba_cv_HAVE_IPV6" = x"yes"; then
-    AC_DEFINE(HAVE_IPV6,1,[Whether the system has IPv6 support])
-fi
-
 ################################################
 # look for a method of setting the effective uid
 seteuid=no;
@@ -5727,8 +5632,8 @@ case "$host_os" in
 		NSSSONAMEVERSIONSUFFIX=".1"
 		WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris.o \
 		    nsswitch/winbind_nss_linux.o"
-		WINBIND_NSS_EXTRA_LIBS="-lsocket"
-		PAM_WINBIND_EXTRA_LIBS="-lsocket"
+		WINBIND_NSS_EXTRA_LIBS="${LIBREPLACE_NETWORK_LIBS}"
+		PAM_WINBIND_EXTRA_LIBS="${LIBREPLACE_NETWORK_LIBS}"
 		;;
 	*hpux11*)
 		WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_solaris.o"
@@ -5766,7 +5671,7 @@ AC_ARG_WITH(winbind,
 # We need unix domain sockets for winbind
 
 if test x"$HAVE_WINBIND" = x"yes"; then
-	if test x"$samba_cv_unixsocket" = x"no"; then
+	if test x"$libreplace_cv_HAVE_UNIXSOCKET" = x"no"; then
 		winbind_no_reason=", no unix domain socket support on $host_os"
 		HAVE_WINBIND=no
 	fi
diff --git a/source/lib/replace/README b/source/lib/replace/README
index 43f7b08..4d94317 100644
--- a/source/lib/replace/README
+++ b/source/lib/replace/README
@@ -62,6 +62,8 @@ getnameinfo
 gai_strerror
 getifaddrs
 freeifaddrs
+utime
+utimes
 
 Types:
 bool
diff --git a/source/lib/replace/configure.ac b/source/lib/replace/configure.ac
index 02dc08b..81997e0 100644
--- a/source/lib/replace/configure.ac
+++ b/source/lib/replace/configure.ac
@@ -6,6 +6,7 @@ AC_CONFIG_HEADER(config.h)
 CFLAGS="$CFLAGS -I$srcdir"
 
 AC_LIBREPLACE_ALL_CHECKS
+AC_LIBREPLACE_NETWORK_CHECKS
 
 if test "$ac_cv_prog_gcc" = yes; then
    CFLAGS="$CFLAGS -Wall"
diff --git a/source/lib/replace/getaddrinfo.m4 b/source/lib/replace/getaddrinfo.m4
deleted file mode 100644
index bc6e69e..0000000
--- a/source/lib/replace/getaddrinfo.m4
+++ /dev/null
@@ -1,32 +0,0 @@
-dnl test for getaddrinfo/getnameinfo
-AC_CACHE_CHECK([for getaddrinfo],libreplace_cv_HAVE_GETADDRINFO,[
-AC_TRY_LINK([
-#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-#include <sys/socket.h>
-#include <netdb.h>],
-[
-struct sockaddr sa;
-struct addrinfo *ai = NULL;
-int ret = getaddrinfo(NULL, NULL, NULL, &ai);
-if (ret != 0) {
-	const char *es = gai_strerror(ret);
-}
-freeaddrinfo(ai);
-ret = getnameinfo(&sa, sizeof(sa),
-		NULL, 0,
-		NULL, 0, 0);
-
-],
-libreplace_cv_HAVE_GETADDRINFO=yes,libreplace_cv_HAVE_GETADDRINFO=no)])
-if test x"$libreplace_cv_HAVE_GETADDRINFO" = x"yes"; then
-	AC_DEFINE(HAVE_GETADDRINFO,1,[Whether the system has getaddrinfo])
-	AC_DEFINE(HAVE_GETNAMEINFO,1,[Whether the system has getnameinfo])
-	AC_DEFINE(HAVE_FREEADDRINFO,1,[Whether the system has freeaddrinfo])
-	AC_DEFINE(HAVE_GAI_STRERROR,1,[Whether the system has gai_strerror])
-else
-	LIBREPLACEOBJ="${LIBREPLACEOBJ} getaddrinfo.o"
-fi
diff --git a/source/lib/replace/getifaddrs.m4 b/source/lib/replace/getifaddrs.m4
deleted file mode 100644
index 927bc67..0000000
--- a/source/lib/replace/getifaddrs.m4
+++ /dev/null
@@ -1,128 +0,0 @@
-AC_CHECK_HEADERS([ifaddrs.h])
-
-dnl Used when getifaddrs is not available
-AC_CHECK_MEMBERS([struct sockaddr.sa_len], 
-	 [AC_DEFINE(HAVE_SOCKADDR_SA_LEN, 1, [Whether struct sockaddr has a sa_len member])],
-	 [],
-	 [#include <sys/socket.h>])
-
-dnl test for getifaddrs and freeifaddrs
-AC_CACHE_CHECK([for getifaddrs and freeifaddrs],libreplace_cv_HAVE_GETIFADDRS,[
-AC_TRY_COMPILE([
-#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <ifaddrs.h>
-#include <netdb.h>],
-[
-struct ifaddrs *ifp = NULL;
-int ret = getifaddrs (&ifp);
-freeifaddrs(ifp);
-],
-libreplace_cv_HAVE_GETIFADDRS=yes,libreplace_cv_HAVE_GETIFADDRS=no)])
-if test x"$libreplace_cv_HAVE_GETIFADDRS" = x"yes"; then
-    AC_DEFINE(HAVE_GETIFADDRS,1,[Whether the system has getifaddrs])
-    AC_DEFINE(HAVE_FREEIFADDRS,1,[Whether the system has freeifaddrs])
-	AC_DEFINE(HAVE_STRUCT_IFADDRS,1,[Whether struct ifaddrs is available])
-fi
-
-##################
-# look for a method of finding the list of network interfaces
-#
-# This tests need LIBS="${LIBREPLACE_NETWORK_LIBS}"
-#
-old_LIBS=$LIBS
-LIBS="${LIBREPLACE_NETWORK_LIBS}"
-SAVE_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="$CPPFLAGS -I$libreplacedir"
-iface=no;
-##################
-# look for a method of finding the list of network interfaces
-iface=no;
-AC_CACHE_CHECK([for iface getifaddrs],libreplace_cv_HAVE_IFACE_GETIFADDRS,[
-AC_TRY_RUN([
-#define HAVE_IFACE_GETIFADDRS 1
-#define NO_CONFIG_H 1
-#define AUTOCONF_TEST 1
-#define SOCKET_WRAPPER_NOT_REPLACE
-#include "$libreplacedir/replace.c"
-#include "$libreplacedir/inet_ntop.c"
-#include "$libreplacedir/snprintf.c"
-#include "$libreplacedir/getifaddrs.c"
-#define getifaddrs_test main
-#include "$libreplacedir/test/getifaddrs.c"],
-           libreplace_cv_HAVE_IFACE_GETIFADDRS=yes,libreplace_cv_HAVE_IFACE_GETIFADDRS=no,libreplace_cv_HAVE_IFACE_GETIFADDRS=cross)])
-if test x"$libreplace_cv_HAVE_IFACE_GETIFADDRS" = x"yes"; then
-    iface=yes;AC_DEFINE(HAVE_IFACE_GETIFADDRS,1,[Whether iface getifaddrs is available])
-else
-	LIBREPLACEOBJ="${LIBREPLACEOBJ} getifaddrs.o"
-fi
-
-
-if test $iface = no; then
-AC_CACHE_CHECK([for iface AIX],libreplace_cv_HAVE_IFACE_AIX,[
-AC_TRY_RUN([
-#define HAVE_IFACE_AIX 1
-#define NO_CONFIG_H 1
-#define AUTOCONF_TEST 1
-#undef _XOPEN_SOURCE_EXTENDED
-#define SOCKET_WRAPPER_NOT_REPLACE
-#include "$libreplacedir/replace.c"
-#include "$libreplacedir/inet_ntop.c"
-#include "$libreplacedir/snprintf.c"
-#include "$libreplacedir/getifaddrs.c"
-#define getifaddrs_test main
-#include "$libreplacedir/test/getifaddrs.c"],
-           libreplace_cv_HAVE_IFACE_AIX=yes,libreplace_cv_HAVE_IFACE_AIX=no,libreplace_cv_HAVE_IFACE_AIX=cross)])
-if test x"$libreplace_cv_HAVE_IFACE_AIX" = x"yes"; then
-    iface=yes;AC_DEFINE(HAVE_IFACE_AIX,1,[Whether iface AIX is available])
-fi
-fi
-
-
-if test $iface = no; then
-AC_CACHE_CHECK([for iface ifconf],libreplace_cv_HAVE_IFACE_IFCONF,[
-AC_TRY_RUN([
-#define HAVE_IFACE_IFCONF 1
-#define NO_CONFIG_H 1
-#define AUTOCONF_TEST 1
-#define SOCKET_WRAPPER_NOT_REPLACE
-#include "$libreplacedir/replace.c"
-#include "$libreplacedir/inet_ntop.c"
-#include "$libreplacedir/snprintf.c"
-#include "$libreplacedir/getifaddrs.c"
-#define getifaddrs_test main
-#include "$libreplacedir/test/getifaddrs.c"],
-           libreplace_cv_HAVE_IFACE_IFCONF=yes,libreplace_cv_HAVE_IFACE_IFCONF=no,libreplace_cv_HAVE_IFACE_IFCONF=cross)])
-if test x"$libreplace_cv_HAVE_IFACE_IFCONF" = x"yes"; then
-    iface=yes;AC_DEFINE(HAVE_IFACE_IFCONF,1,[Whether iface ifconf is available])
-fi
-fi
-
-if test $iface = no; then
-AC_CACHE_CHECK([for iface ifreq],libreplace_cv_HAVE_IFACE_IFREQ,[
-AC_TRY_RUN([
-#define HAVE_IFACE_IFREQ 1
-#define NO_CONFIG_H 1
-#define AUTOCONF_TEST 1
-#define SOCKET_WRAPPER_NOT_REPLACE
-#include "$libreplacedir/replace.c"
-#include "$libreplacedir/inet_ntop.c"
-#include "$libreplacedir/snprintf.c"
-#include "$libreplacedir/getifaddrs.c"
-#define getifaddrs_test main
-#include "$libreplacedir/test/getifaddrs.c"],
-           libreplace_cv_HAVE_IFACE_IFREQ=yes,libreplace_cv_HAVE_IFACE_IFREQ=no,libreplace_cv_HAVE_IFACE_IFREQ=cross)])
-if test x"$libreplace_cv_HAVE_IFACE_IFREQ" = x"yes"; then
-    iface=yes;AC_DEFINE(HAVE_IFACE_IFREQ,1,[Whether iface ifreq is available])
-fi
-fi
-
-LIBS=$old_LIBS
-CPPFLAGS="$SAVE_CPPFLAGS"
-
diff --git a/source/lib/replace/inet_aton.m4 b/source/lib/replace/inet_aton.m4
deleted file mode 100644
index 853688e..0000000
--- a/source/lib/replace/inet_aton.m4
+++ /dev/null
@@ -1 +0,0 @@
-AC_CHECK_FUNCS(inet_aton,[],[LIBREPLACEOBJ="${LIBREPLACEOBJ} inet_aton.o"])
diff --git a/source/lib/replace/inet_ntoa.m4 b/source/lib/replace/inet_ntoa.m4
deleted file mode 100644
index 5aaa935..0000000
--- a/source/lib/replace/inet_ntoa.m4
+++ /dev/null
@@ -1,19 +0,0 @@
-AC_CHECK_FUNCS(inet_ntoa,[],[LIBREPLACEOBJ="${LIBREPLACEOBJ} inet_ntoa.o"])
-
-AC_CACHE_CHECK([for broken inet_ntoa],libreplace_cv_REPLACE_INET_NTOA,[
-AC_TRY_RUN([
-#include <stdio.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <netinet/in.h>
-#ifdef HAVE_ARPA_INET_H
-#include <arpa/inet.h>
-#endif
-main() { struct in_addr ip; ip.s_addr = 0x12345678;
-if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
-    strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); }
-exit(1);}],
-           libreplace_cv_REPLACE_INET_NTOA=yes,libreplace_cv_REPLACE_INET_NTOA=no,libreplace_cv_REPLACE_INET_NTOA=cross)])
-if test x"$libreplace_cv_REPLACE_INET_NTOA" = x"yes"; then
-    AC_DEFINE(REPLACE_INET_NTOA,1,[Whether inet_ntoa should be replaced])
-fi
diff --git a/source/lib/replace/inet_ntop.m4 b/source/lib/replace/inet_ntop.m4
deleted file mode 100644
index 6f39056..0000000
--- a/source/lib/replace/inet_ntop.m4
+++ /dev/null
@@ -1 +0,0 @@
-AC_CHECK_FUNCS(inet_ntop,[],[LIBREPLACEOBJ="${LIBREPLACEOBJ} inet_ntop.o"])
diff --git a/source/lib/replace/inet_pton.m4 b/source/lib/replace/inet_pton.m4
deleted file mode 100644
index 51de927..0000000
--- a/source/lib/replace/inet_pton.m4
+++ /dev/null
@@ -1 +0,0 @@
-AC_CHECK_FUNCS(inet_pton,[],[LIBREPLACEOBJ="${LIBREPLACEOBJ} inet_pton.o"])
diff --git a/source/lib/replace/libreplace.m4 b/source/lib/replace/libreplace.m4
index 8e17258..6a85ff5 100644
--- a/source/lib/replace/libreplace.m4
+++ b/source/lib/replace/libreplace.m4
@@ -96,65 +96,9 @@ fi
 AC_CHECK_HEADERS(sys/syslog.h syslog.h)
 AC_CHECK_HEADERS(sys/time.h time.h)
 AC_CHECK_HEADERS(stdarg.h vararg.h)
-AC_CHECK_HEADERS(sys/socket.h netinet/in.h netdb.h arpa/inet.h)
-AC_CHECK_HEADERS(netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ip.h)
-AC_CHECK_HEADERS(sys/sockio.h sys/un.h)
 AC_CHECK_HEADERS(sys/mount.h mntent.h)
 AC_CHECK_HEADERS(stropts.h)
 
-dnl we need to check that net/if.h really can be used, to cope with hpux
-dnl where including it always fails
-AC_CACHE_CHECK([for usable net/if.h],libreplace_cv_USABLE_NET_IF_H,[
-	AC_COMPILE_IFELSE([AC_LANG_SOURCE([
-		AC_INCLUDES_DEFAULT
-		#if HAVE_SYS_SOCKET_H
-		# include <sys/socket.h>
-		#endif
-		#include <net/if.h>
-		int main(void) {return 0;}])],
-		[libreplace_cv_USABLE_NET_IF_H=yes],
-		[libreplace_cv_USABLE_NET_IF_H=no]
-	)
-])
-if test x"$libreplace_cv_USABLE_NET_IF_H" = x"yes";then
-	AC_DEFINE(HAVE_NET_IF_H, 1, usability of net/if.h)
-fi
-
-AC_HAVE_TYPE([socklen_t],[#include <sys/socket.h>])
-AC_HAVE_TYPE([sa_family_t],[#include <sys/socket.h>])
-AC_HAVE_TYPE([struct addrinfo], [#include <netdb.h>])
-AC_HAVE_TYPE([struct sockaddr], [#include <sys/socket.h>])
-AC_HAVE_TYPE([struct sockaddr_storage], [
-#include <sys/socket.h>
-#include <sys/types.h>
-#include <netinet/in.h>
-])
-AC_HAVE_TYPE([struct sockaddr_in6], [
-#include <sys/socket.h>
-#include <sys/types.h>
-#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)
@@ -326,15 +270,7 @@ m4_include(getpass.m4)
 m4_include(strptime.m4)
 m4_include(win32.m4)


-- 
Samba Shared Repository


More information about the samba-cvs mailing list