[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-2219-gb152afe

Günther Deschner gd at samba.org
Wed Jun 10 19:26:44 GMT 2009


The branch, master has been updated
       via  b152afeadee32c7421db49305a1851cd19cf3c10 (commit)
       via  27bb7ac5d1ae1b22954024d74c02d9ffdb283def (commit)
      from  dc5c7b7f98345621f4cf1b9992ebbe9144e14ebb (commit)

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


- Log -----------------------------------------------------------------
commit b152afeadee32c7421db49305a1851cd19cf3c10
Author: Günther Deschner <gd at samba.org>
Date:   Wed Jun 10 21:23:12 2009 +0200

    s3-libwbclient: fix unresolved symbols in libwbclient.
    
    Kai, please check.
    
    Guenther

commit 27bb7ac5d1ae1b22954024d74c02d9ffdb283def
Author: Günther Deschner <gd at samba.org>
Date:   Wed Jun 10 21:22:33 2009 +0200

    lib-util: move set_blocking() call into own file.
    
    Guenther

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

Summary of changes:
 lib/util/blocking.c |   62 +++++++++++++++++++++++++++++++++++++++++++++++++++
 lib/util/config.mk  |    1 +
 lib/util/util.c     |   31 -------------------------
 source3/Makefile.in |    9 +++++-
 4 files changed, 70 insertions(+), 33 deletions(-)
 create mode 100644 lib/util/blocking.c


Changeset truncated at 500 lines:

diff --git a/lib/util/blocking.c b/lib/util/blocking.c
new file mode 100644
index 0000000..f5933cc
--- /dev/null
+++ b/lib/util/blocking.c
@@ -0,0 +1,62 @@
+/*
+   Unix SMB/CIFS implementation.
+   Samba utility functions
+   Copyright (C) Andrew Tridgell 1992-1998
+   Copyright (C) Jeremy Allison 2001-2002
+   Copyright (C) Simo Sorce 2001
+   Copyright (C) Jim McDonough (jmcd at us.ibm.com)  2003.
+   Copyright (C) James J Myers 2003
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program 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 General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "includes.h"
+#include "system/network.h"
+#include "system/filesys.h"
+#include "system/locale.h"
+#undef malloc
+#undef strcasecmp
+#undef strncasecmp
+#undef strdup
+#undef realloc
+
+/**
+ Set a fd into blocking/nonblocking mode. Uses POSIX O_NONBLOCK if available,
+ else
+  if SYSV use O_NDELAY
+  if BSD use FNDELAY
+**/
+
+_PUBLIC_ int set_blocking(int fd, bool set)
+{
+	int val;
+#ifdef O_NONBLOCK
+#define FLAG_TO_SET O_NONBLOCK
+#else
+#ifdef SYSV
+#define FLAG_TO_SET O_NDELAY
+#else /* BSD */
+#define FLAG_TO_SET FNDELAY
+#endif
+#endif
+
+	if((val = fcntl(fd, F_GETFL, 0)) == -1)
+		return -1;
+	if(set) /* Turn blocking on - ie. clear nonblock flag */
+		val &= ~FLAG_TO_SET;
+	else
+		val |= FLAG_TO_SET;
+	return fcntl( fd, F_SETFL, val);
+#undef FLAG_TO_SET
+}
diff --git a/lib/util/config.mk b/lib/util/config.mk
index 3bda8ec..ad39096 100644
--- a/lib/util/config.mk
+++ b/lib/util/config.mk
@@ -22,6 +22,7 @@ LIBSAMBA-UTIL_OBJ_FILES = $(addprefix $(libutilsrcdir)/, \
 		util_file.o \
 		data_blob.o \
 		util.o \
+		blocking.o \
 		util_net.o \
 		fsusage.o \
 		ms_fnmatch.o \
diff --git a/lib/util/util.c b/lib/util/util.c
index 0148bdb..29b47f5 100644
--- a/lib/util/util.c
+++ b/lib/util/util.c
@@ -146,37 +146,6 @@ _PUBLIC_ bool directory_create_or_exist(const char *dname, uid_t uid,
 
 
 /**
- Set a fd into blocking/nonblocking mode. Uses POSIX O_NONBLOCK if available,
- else
-  if SYSV use O_NDELAY
-  if BSD use FNDELAY
-**/
-
-_PUBLIC_ int set_blocking(int fd, bool set)
-{
-	int val;
-#ifdef O_NONBLOCK
-#define FLAG_TO_SET O_NONBLOCK
-#else
-#ifdef SYSV
-#define FLAG_TO_SET O_NDELAY
-#else /* BSD */
-#define FLAG_TO_SET FNDELAY
-#endif
-#endif
-
-	if((val = fcntl(fd, F_GETFL, 0)) == -1)
-		return -1;
-	if(set) /* Turn blocking on - ie. clear nonblock flag */
-		val &= ~FLAG_TO_SET;
-	else
-		val |= FLAG_TO_SET;
-	return fcntl( fd, F_SETFL, val);
-#undef FLAG_TO_SET
-}
-
-
-/**
  Sleep for a specified number of milliseconds.
 **/
 
diff --git a/source3/Makefile.in b/source3/Makefile.in
index d93c7a7..32fe908 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -356,7 +356,8 @@ UTIL_OBJ = ../lib/util/rbtree.o ../lib/util/signal.o ../lib/util/time.o \
 		   ../lib/util/genrand.o ../lib/util/util_net.o \
 		   ../lib/util/become_daemon.o ../lib/util/system.o \
 		   ../lib/util/tevent_unix.o ../lib/util/tevent_ntstatus.o \
-		   ../lib/util/smb_threads.o ../lib/util/util_id.o
+		   ../lib/util/smb_threads.o ../lib/util/util_id.o \
+		   ../lib/util/blocking.o
 
 CRYPTO_OBJ = ../lib/crypto/crc32.o ../lib/crypto/md5.o \
 			 ../lib/crypto/hmacmd5.o ../lib/crypto/arcfour.o \
@@ -1896,7 +1897,11 @@ LIBWBCLIENT_OBJ0 = ../nsswitch/libwbclient/wbclient.o \
 
 LIBWBCLIENT_OBJ = $(LIBWBCLIENT_OBJ0) \
 		  $(WBCOMMON_OBJ) \
-		  $(LIBREPLACE_OBJ)
+		  $(LIBREPLACE_OBJ) \
+		  ../lib/async_req/async_sock.o \
+		  ../lib/util/tevent_unix.o \
+		  ../lib/util/blocking.o \
+		  $(SOCKET_WRAPPER_OBJ) @LIBTEVENT_OBJ0@
 
 LIBWBCLIENT_SHARED_TARGET=@LIBWBCLIENT_SHARED_TARGET@
 LIBWBCLIENT_SOVER=@LIBWBCLIENT_SOVER@


-- 
Samba Shared Repository


More information about the samba-cvs mailing list