From a620882e15c1b33c1eb5a0d4d1a8d8c890cc23df Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Thu, 15 May 2008 18:09:56 +0200 Subject: Fix an uninitialized variable warning (This used to be commit b3d024676426000380ad86a2a4b83e7b21478978) --- source4/lib/ldb_wrap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/lib') diff --git a/source4/lib/ldb_wrap.c b/source4/lib/ldb_wrap.c index b564976524..f47d0d5d39 100644 --- a/source4/lib/ldb_wrap.c +++ b/source4/lib/ldb_wrap.c @@ -44,7 +44,7 @@ static void ldb_wrap_debug(void *context, enum ldb_debug_level level, static void ldb_wrap_debug(void *context, enum ldb_debug_level level, const char *fmt, va_list ap) { - int samba_level; + int samba_level = -1; char *s = NULL; switch (level) { case LDB_DEBUG_FATAL: -- cgit From 335813c735153dd3f1bbeb102a876d51c22943c8 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 16 May 2008 12:13:11 +0200 Subject: lib/socket: remove unused configure check for HAVE_WORKING_AF_LOCAL metze (This used to be commit 1c7905cfb4c77edeb24ac612a544e777cf49e184) --- source4/lib/socket/config.m4 | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'source4/lib') diff --git a/source4/lib/socket/config.m4 b/source4/lib/socket/config.m4 index b40002b321..e5ae9ecc77 100644 --- a/source4/lib/socket/config.m4 +++ b/source4/lib/socket/config.m4 @@ -31,16 +31,6 @@ if test x"$samba_cv_unixsocket" = x"yes"; then AC_DEFINE(HAVE_UNIXSOCKET,1,[If we need to build with unixscoket support]) fi -AC_CACHE_CHECK([for AF_LOCAL socket support], samba_cv_HAVE_WORKING_AF_LOCAL, [ -AC_TRY_RUN([#include "${srcdir-.}/build/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 - dnl test for ipv6 using the gethostbyname2() function. That should be sufficient dnl for now AC_CHECK_FUNCS(gethostbyname2, have_ipv6=true, have_ipv6=false) -- cgit From a65e5994ad9ecc2a70f24a5080a1c311d22ed2be Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 16 May 2008 12:29:21 +0200 Subject: lib/replace: add checks for HAVE_SOCK_SIN_LEN and HAVE_UNIXSOCKET Moved from the samba specific locations metze (This used to be commit e674128ee2f11596f358ed46104c9d25eb2f754f) --- source4/lib/replace/libreplace_network.m4 | 40 +++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'source4/lib') diff --git a/source4/lib/replace/libreplace_network.m4 b/source4/lib/replace/libreplace_network.m4 index 5ab71f160a..d29c13196d 100644 --- a/source4/lib/replace/libreplace_network.m4 +++ b/source4/lib/replace/libreplace_network.m4 @@ -62,6 +62,46 @@ AC_CHECK_MEMBER(struct sockaddr_storage.__ss_family, fi fi +AC_CACHE_CHECK([for sin_len in sock],libreplace_cv_HAVE_SOCK_SIN_LEN,[ + AC_TRY_COMPILE( + [ +#include +#include +#include + ],[ +struct sockaddr_in sock; sock.sin_len = sizeof(sock); + ],[ + libreplace_cv_HAVE_SOCK_SIN_LEN=yes + ],[ + libreplace_cv_HAVE_SOCK_SIN_LEN=no + ]) +]) +if test x"$libreplace_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 + +############################################ +# check for unix domain sockets +AC_CACHE_CHECK([for unix domain sockets],libreplace_cv_HAVE_UNIXSOCKET,[ + AC_TRY_COMPILE([ +#include +#include +#include +#include +#include + ],[ +struct sockaddr_un sunaddr; +sunaddr.sun_family = AF_UNIX; + ],[ + libreplace_cv_HAVE_UNIXSOCKET=yes + ],[ + libreplace_cv_HAVE_UNIXSOCKET=no + ]) +]) +if test x"$libreplace_cv_HAVE_UNIXSOCKET" = x"yes"; then + AC_DEFINE(HAVE_UNIXSOCKET,1,[If we need to build with unixscoket support]) +fi + dnl The following test is roughl taken from the cvs sources. dnl dnl If we can't find connect, try looking in -lsocket, -lnsl, and -linet. -- cgit From c7c9aa7e7a2d941486fb21fd15e57653cc8b14e0 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 16 May 2008 12:30:49 +0200 Subject: lib/socket: remove unused configure checks for HAVE_SOCK_SIN_LEN and HAVE_UNIXSOCKET and rely on libreplace metze (This used to be commit 5de605bb2ef88a1f3e61c64e557c7f069d0f6dad) --- source4/lib/socket/config.m4 | 28 +++------------------------- 1 file changed, 3 insertions(+), 25 deletions(-) (limited to 'source4/lib') diff --git a/source4/lib/socket/config.m4 b/source4/lib/socket/config.m4 index e5ae9ecc77..871c57f97c 100644 --- a/source4/lib/socket/config.m4 +++ b/source4/lib/socket/config.m4 @@ -1,34 +1,12 @@ AC_CHECK_FUNCS(writev) AC_CHECK_FUNCS(readv) -AC_CACHE_CHECK([for sin_len in sock],samba_cv_HAVE_SOCK_SIN_LEN,[ -AC_TRY_COMPILE([#include -#include -#include ], -[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 - ############################################ # check for unix domain sockets -AC_CACHE_CHECK([for unix domain sockets],samba_cv_unixsocket, [ - AC_TRY_COMPILE([ -#include -#include -#include -#include -#include ], -[ - struct sockaddr_un sunaddr; - sunaddr.sun_family = AF_UNIX; -], - samba_cv_unixsocket=yes,samba_cv_unixsocket=no)]) +# done by AC_LIBREPLACE_NETWORK_CHECKS SMB_ENABLE(socket_unix, NO) -if test x"$samba_cv_unixsocket" = x"yes"; then - SMB_ENABLE(socket_unix, YES) - AC_DEFINE(HAVE_UNIXSOCKET,1,[If we need to build with unixscoket support]) +if test x"$libreplace_cv_HAVE_UNIXSOCKET" = x"yes"; then + SMB_ENABLE(socket_unix, YES) fi dnl test for ipv6 using the gethostbyname2() function. That should be sufficient -- cgit From 097b5ae7633d2f89abe9f89202a8af1438b590cd Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 16 May 2008 12:46:10 +0200 Subject: lib/replace: move sys/sockio.h and sys/un.h checks into AC_LIBREPLACE_NETWORK_CHECKS metze (This used to be commit 7f26a5425e706a97cc07c5139b3fea4fde9e4020) --- source4/lib/replace/libreplace.m4 | 1 - source4/lib/replace/libreplace_network.m4 | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/lib') diff --git a/source4/lib/replace/libreplace.m4 b/source4/lib/replace/libreplace.m4 index 2b33d97989..6a85ff5a82 100644 --- a/source4/lib/replace/libreplace.m4 +++ b/source4/lib/replace/libreplace.m4 @@ -96,7 +96,6 @@ 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/sockio.h sys/un.h) AC_CHECK_HEADERS(sys/mount.h mntent.h) AC_CHECK_HEADERS(stropts.h) diff --git a/source4/lib/replace/libreplace_network.m4 b/source4/lib/replace/libreplace_network.m4 index d29c13196d..f2d177b165 100644 --- a/source4/lib/replace/libreplace_network.m4 +++ b/source4/lib/replace/libreplace_network.m4 @@ -8,6 +8,7 @@ LIBREPLACE_NETWORK_LIBS="" 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) dnl we need to check that net/if.h really can be used, to cope with hpux dnl where including it always fails -- cgit