summaryrefslogtreecommitdiff
path: root/source4/include
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/include
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/include')
-rw-r--r--source4/include/credentials.h2
-rw-r--r--source4/include/includes.h20
-rw-r--r--source4/include/local.h3
-rw-r--r--source4/include/smb_macros.h3
-rw-r--r--source4/include/structs.h4
-rw-r--r--source4/include/system/readline.h44
6 files changed, 50 insertions, 26 deletions
diff --git a/source4/include/credentials.h b/source4/include/credentials.h
index 5dadbbd1c5..4b9c1363f9 100644
--- a/source4/include/credentials.h
+++ b/source4/include/credentials.h
@@ -21,6 +21,8 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+struct ccache_container;
+
/* In order of priority */
enum credentials_obtained {
CRED_UNINITIALISED = 0, /* We don't even have a guess yet */
diff --git a/source4/include/includes.h b/source4/include/includes.h
index 3636dec58d..882c8e6277 100644
--- a/source4/include/includes.h
+++ b/source4/include/includes.h
@@ -64,18 +64,6 @@
#include <varargs.h>
#endif
-#ifdef HAVE_WINSOCK2_H
-#include <winsock2.h>
-#endif
-
-#ifdef HAVE_WS2TCPIP_H
-#include <ws2tcpip.h>
-#endif
-
-#ifdef HAVE_WINDOWS_H
-#include <windows.h>
-#endif
-
/* we support ADS if we want it and have krb5 and ldap libs */
#if defined(WITH_ADS) && defined(HAVE_KRB5) && defined(HAVE_LDAP)
#define HAVE_ADS
@@ -131,9 +119,6 @@ struct ipv4_addr {
#include "ntvfs/ntvfs.h"
#include "cli_context.h"
#include "lib/com/com.h"
-#include "credentials.h"
-
-
#define malloc_p(type) (type *)malloc(sizeof(type))
#define malloc_array_p(type, count) (type *)realloc_array(NULL, sizeof(type), count)
@@ -189,10 +174,6 @@ extern int DEBUGLEVEL;
#endif
#define discard_const_p(type, ptr) ((type *)discard_const(ptr))
-#ifndef HAVE_SSIZE_T
-#define ssize_t int
-#endif
-
#ifndef UINT16_MAX
#define UINT16_MAX 65535
#endif
@@ -203,4 +184,3 @@ extern int DEBUGLEVEL;
#define smb_xmalloc_p(type) (type *)smb_xmalloc(sizeof(type))
#endif /* _INCLUDES_H */
-
diff --git a/source4/include/local.h b/source4/include/local.h
index ae17f576bd..9c42b9b9ff 100644
--- a/source4/include/local.h
+++ b/source4/include/local.h
@@ -109,9 +109,6 @@
/* the default netbios keepalive timeout */
#define DEFAULT_KEEPALIVE 300
-/* the directory to sit in when idle */
-/* #define IDLE_DIR "/" */
-
/* Timout (in seconds) to wait for an oplock break
message to return from the client. */
diff --git a/source4/include/smb_macros.h b/source4/include/smb_macros.h
index aee2adf38f..f5ac3ac96d 100644
--- a/source4/include/smb_macros.h
+++ b/source4/include/smb_macros.h
@@ -44,9 +44,6 @@
DEBUG(0,("PANIC: assert failed at %s(%d)\n", __FILE__, __LINE__)); \
smb_panic("assert failed"); }} while (0)
-/* REWRITE TODO: remove these smb_xxx macros */
-#define smb_buf(buf) (((char *)(buf)) + MIN_SMB_SIZE + CVAL(buf,HDR_WCT+4)*2)
-
#define smb_len(buf) (PVAL(buf,3)|(PVAL(buf,2)<<8)|(PVAL(buf,1)<<16))
#define _smb_setlen(buf,len) do {(buf)[0] = 0; (buf)[1] = ((len)&0x10000)>>16; \
(buf)[2] = ((len)&0xFF00)>>8; (buf)[3] = (len)&0xFF;} while (0)
diff --git a/source4/include/structs.h b/source4/include/structs.h
index ca28c1fc7a..e09d9bb242 100644
--- a/source4/include/structs.h
+++ b/source4/include/structs.h
@@ -297,3 +297,7 @@ struct ldb_map_objectclass;
struct param_context;
struct param_section;
struct param;
+
+enum credentials_obtained;
+struct cli_credentials;
+struct ccache_container;
diff --git a/source4/include/system/readline.h b/source4/include/system/readline.h
new file mode 100644
index 0000000000..c3e565399d
--- /dev/null
+++ b/source4/include/system/readline.h
@@ -0,0 +1,44 @@
+/*
+ Unix SMB/CIFS implementation.
+
+ readline wrappers
+
+ 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 2 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, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#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 */