svn commit: samba r18593 - in branches/SAMBA_4_0/source/lib:
replace replace/system socket_wrapper util
metze at samba.org
metze at samba.org
Sun Sep 17 05:11:58 GMT 2006
Author: metze
Date: 2006-09-17 05:11:57 +0000 (Sun, 17 Sep 2006)
New Revision: 18593
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18593
Log:
try to get the same socket_wrapper file building in samba3 and samba4
this is preparation of adding libreplace to samba3 later.
metze
Removed:
branches/SAMBA_4_0/source/lib/replace/win32/
Modified:
branches/SAMBA_4_0/source/lib/replace/system/network.h
branches/SAMBA_4_0/source/lib/socket_wrapper/socket_wrapper.c
branches/SAMBA_4_0/source/lib/util/dlinklist.h
Changeset:
Modified: branches/SAMBA_4_0/source/lib/replace/system/network.h
===================================================================
--- branches/SAMBA_4_0/source/lib/replace/system/network.h 2006-09-17 05:10:00 UTC (rev 18592)
+++ branches/SAMBA_4_0/source/lib/replace/system/network.h 2006-09-17 05:11:57 UTC (rev 18593)
@@ -67,7 +67,9 @@
#endif
#ifdef SOCKET_WRAPPER
+#ifndef SOCKET_WRAPPER_NOT_REPLACE
#define SOCKET_WRAPPER_REPLACE
+#endif
#include "lib/socket_wrapper/socket_wrapper.h"
#endif
Modified: branches/SAMBA_4_0/source/lib/socket_wrapper/socket_wrapper.c
===================================================================
--- branches/SAMBA_4_0/source/lib/socket_wrapper/socket_wrapper.c 2006-09-17 05:10:00 UTC (rev 18592)
+++ branches/SAMBA_4_0/source/lib/socket_wrapper/socket_wrapper.c 2006-09-17 05:11:57 UTC (rev 18593)
@@ -21,11 +21,28 @@
*/
#ifdef _SAMBA_BUILD_
+
+#define SOCKET_WRAPPER_NOT_REPLACE
#include "includes.h"
-#undef SOCKET_WRAPPER
#include "system/network.h"
#include "system/filesys.h"
-#else
+
+#ifndef _DLINKLIST_H
+#include "lib/util/dlinklist.h"
+#endif
+
+#ifdef malloc
+#undef malloc
+#endif
+#ifdef calloc
+#undef calloc
+#endif
+#ifdef strdup
+#undef strdup
+#endif
+
+#else /* _SAMBA_BUILD_ */
+
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/socket.h>
@@ -37,8 +54,10 @@
#include <unistd.h>
#include <string.h>
#include <stdio.h>
+
+#error "dlinklist.h missing"
+
#endif
-#include "lib/util/dlinklist.h"
/* LD_PRELOAD doesn't work yet, so REWRITE_CALLS is all we support
* for now */
Modified: branches/SAMBA_4_0/source/lib/util/dlinklist.h
===================================================================
--- branches/SAMBA_4_0/source/lib/util/dlinklist.h 2006-09-17 05:10:00 UTC (rev 18592)
+++ branches/SAMBA_4_0/source/lib/util/dlinklist.h 2006-09-17 05:11:57 UTC (rev 18593)
@@ -21,7 +21,10 @@
/* To use these macros you must have a structure containing a next and
prev pointer */
+#ifndef _DLINKLIST_H
+#define _DLINKLIST_H
+
/* hook into the front of the list */
#define DLIST_ADD(list, p) \
do { \
@@ -107,3 +110,5 @@
} \
} \
} while (0)
+
+#endif /* _DLINKLIST_H */
More information about the samba-cvs
mailing list