summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/SConscript2
-rw-r--r--source4/lib/cmdline/popt_common.c1
-rw-r--r--source4/lib/cmdline/readline.c26
-rw-r--r--source4/lib/credentials.c1
-rw-r--r--source4/lib/replace/SConscript1
-rw-r--r--source4/lib/replace/config.m41
-rw-r--r--source4/lib/replace/win32/replace.h12
-rw-r--r--source4/lib/samba3/secrets.c1
8 files changed, 19 insertions, 26 deletions
diff --git a/source4/lib/SConscript b/source4/lib/SConscript
index c41b6ea067..a184eecd10 100644
--- a/source4/lib/SConscript
+++ b/source4/lib/SConscript
@@ -13,7 +13,7 @@ basic_files = ['version.c', 'xfile.c', 'debug.c', 'fault.c',
proto_files = basic_files
-basic = hostenv.StaticLibrary('basic', [dynconfig,charset,talloc,basic_files])
+basic = hostenv.StaticLibrary('basic', [dynconfig,charset,talloc,basic_files,charset])
Export('basic')
hostenv.StaticLibrary('tdr', ['tdr/tdr.c'])
diff --git a/source4/lib/cmdline/popt_common.c b/source4/lib/cmdline/popt_common.c
index 43ea203b78..76c8a537e3 100644
--- a/source4/lib/cmdline/popt_common.c
+++ b/source4/lib/cmdline/popt_common.c
@@ -25,6 +25,7 @@
#include "system/filesys.h"
#include "system/passwd.h"
#include "lib/cmdline/popt_common.h"
+#include "credentials.h"
/* Handle command line options:
* -d,--debuglevel
diff --git a/source4/lib/cmdline/readline.c b/source4/lib/cmdline/readline.c
index 7928b8db2e..52f45eb759 100644
--- a/source4/lib/cmdline/readline.c
+++ b/source4/lib/cmdline/readline.c
@@ -23,31 +23,7 @@
#include "pstring.h"
#include <unistd.h>
-
-#ifdef HAVE_LIBREADLINE
-# ifdef HAVE_READLINE_READLINE_H
-# include <readline/readline.h>
-# ifdef HAVE_READLINE_HISTORY_H
-# include <readline/history.h>
-# endif
-# else
-# ifdef HAVE_READLINE_H
-# include <readline.h>
-# ifdef HAVE_HISTORY_H
-# include <history.h>
-# endif
-# else
-# undef HAVE_LIBREADLINE
-# endif
-# endif
-#endif
-
-#ifdef HAVE_NEW_LIBREADLINE
-# define RL_COMPLETION_CAST (rl_completion_func_t *)
-#else
-/* This type is missing from libreadline<4.0 (approximately) */
-# define RL_COMPLETION_CAST
-#endif /* HAVE_NEW_LIBREADLINE */
+#include "system/readline.h"
/****************************************************************************
Display the prompt and wait for input. Call callback() regularly
diff --git a/source4/lib/credentials.c b/source4/lib/credentials.c
index 045047d358..166d60b00d 100644
--- a/source4/lib/credentials.c
+++ b/source4/lib/credentials.c
@@ -27,6 +27,7 @@
#include "librpc/gen_ndr/ndr_samr.h" /* for struct samrPassword */
#include "system/kerberos.h"
#include "auth/kerberos/kerberos.h"
+#include "include/credentials.h"
/**
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
diff --git a/source4/lib/samba3/secrets.c b/source4/lib/samba3/secrets.c
index 0f3cc0c581..0981a7a6ec 100644
--- a/source4/lib/samba3/secrets.c
+++ b/source4/lib/samba3/secrets.c
@@ -30,6 +30,7 @@
#include "system/filesys.h"
#include "librpc/gen_ndr/ndr_security.h"
#include "lib/tdb/include/tdbutil.h"
+#include "credentials.h"
/**
* Unpack SID into a pointer