summaryrefslogtreecommitdiff
path: root/source4/lib/replace
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-09-26 15:59:43 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:38:58 -0500
commitf801ad359290c51d3216c755fb2a8344babb484f (patch)
tree7762b44cb1a13ac969e25d63ec0d9e4c118635b4 /source4/lib/replace
parente337caeed1459f876449611ae1684616d0ea8f55 (diff)
downloadsamba-f801ad359290c51d3216c755fb2a8344babb484f.tar.gz
samba-f801ad359290c51d3216c755fb2a8344babb484f.tar.bz2
samba-f801ad359290c51d3216c755fb2a8344babb484f.zip
r10510: Decrease the amount of data included by includes.h a bit
(This used to be commit 03647e1321cf6c9bd6ced3945265f635e9468973)
Diffstat (limited to 'source4/lib/replace')
-rw-r--r--source4/lib/replace/SConscript1
-rw-r--r--source4/lib/replace/config.m41
-rw-r--r--source4/lib/replace/win32/replace.h12
3 files changed, 14 insertions, 0 deletions
diff --git a/source4/lib/replace/SConscript b/source4/lib/replace/SConscript
index 47bfa481f2..f45d0e7d5a 100644
--- a/source4/lib/replace/SConscript
+++ b/source4/lib/replace/SConscript
@@ -51,6 +51,7 @@ int main() {
'u_int32_t': 'unsigned long',
'int64_t': 'long long',
'uint64_t': 'unsigned long long',
+ 'ssize_t': 'int'
}
type_headers = """
diff --git a/source4/lib/replace/config.m4 b/source4/lib/replace/config.m4
index 2b8d4ca3d1..0b95079b24 100644
--- a/source4/lib/replace/config.m4
+++ b/source4/lib/replace/config.m4
@@ -10,6 +10,7 @@ AC_CHECK_TYPE(uint64_t, unsigned long long)
AC_CHECK_TYPE(u_int32_t, unsigned long)
AC_CHECK_TYPE(u_int16_t, unsigned short)
AC_CHECK_TYPE(u_int8_t, unsigned char)
+AC_CHECK_TYPE(ssize_t, int)
AC_CACHE_CHECK([for broken inet_ntoa],samba_cv_REPLACE_INET_NTOA,[
AC_TRY_RUN([
diff --git a/source4/lib/replace/win32/replace.h b/source4/lib/replace/win32/replace.h
index 94fa140681..185d448d95 100644
--- a/source4/lib/replace/win32/replace.h
+++ b/source4/lib/replace/win32/replace.h
@@ -1,6 +1,18 @@
#ifndef _WIN32_REPLACE_H
#define _WIN32_REPLACE_H
+#ifdef HAVE_WINSOCK2_H
+#include <winsock2.h>
+#endif
+
+#ifdef HAVE_WS2TCPIP_H
+#include <ws2tcpip.h>
+#endif
+
+#ifdef HAVE_WINDOWS_H
+#include <windows.h>
+#endif
+
/* Map BSD Socket errorcodes to the WSA errorcodes (if possible) */
#define EAFNOSUPPORT WSAEAFNOSUPPORT