mirror of
https://github.com/samba-team/samba.git
synced 2025-12-09 00:23:50 +03:00
r18593: try to get the same socket_wrapper file building in samba3 and samba4
this is preparation of adding libreplace to samba3 later. metze
This commit is contained in:
committed by
Gerald (Jerry) Carter
parent
e9fe725cf4
commit
26228e4b2e
@@ -67,7 +67,9 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef SOCKET_WRAPPER
|
#ifdef SOCKET_WRAPPER
|
||||||
|
#ifndef SOCKET_WRAPPER_NOT_REPLACE
|
||||||
#define SOCKET_WRAPPER_REPLACE
|
#define SOCKET_WRAPPER_REPLACE
|
||||||
|
#endif
|
||||||
#include "lib/socket_wrapper/socket_wrapper.h"
|
#include "lib/socket_wrapper/socket_wrapper.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -21,11 +21,28 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef _SAMBA_BUILD_
|
#ifdef _SAMBA_BUILD_
|
||||||
|
|
||||||
|
#define SOCKET_WRAPPER_NOT_REPLACE
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
#undef SOCKET_WRAPPER
|
|
||||||
#include "system/network.h"
|
#include "system/network.h"
|
||||||
#include "system/filesys.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/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
@@ -37,8 +54,10 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#error "dlinklist.h missing"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#include "lib/util/dlinklist.h"
|
|
||||||
|
|
||||||
/* LD_PRELOAD doesn't work yet, so REWRITE_CALLS is all we support
|
/* LD_PRELOAD doesn't work yet, so REWRITE_CALLS is all we support
|
||||||
* for now */
|
* for now */
|
||||||
|
|||||||
@@ -21,6 +21,9 @@
|
|||||||
/* To use these macros you must have a structure containing a next and
|
/* To use these macros you must have a structure containing a next and
|
||||||
prev pointer */
|
prev pointer */
|
||||||
|
|
||||||
|
#ifndef _DLINKLIST_H
|
||||||
|
#define _DLINKLIST_H
|
||||||
|
|
||||||
|
|
||||||
/* hook into the front of the list */
|
/* hook into the front of the list */
|
||||||
#define DLIST_ADD(list, p) \
|
#define DLIST_ADD(list, p) \
|
||||||
@@ -107,3 +110,5 @@ do { \
|
|||||||
} \
|
} \
|
||||||
} \
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
#endif /* _DLINKLIST_H */
|
||||||
|
|||||||
Reference in New Issue
Block a user