Sync smb_iconv_t type, convert_string return type with Samba 3 equivalents.
[amitay/samba.git] / source3 / include / includes.h
index fc77534402aa11393618cead360b183b46e44494..7f8c408265823021d14324e621c82ad84a8c91ab 100644 (file)
@@ -190,12 +190,12 @@ typedef int ber_int_t;
 #undef HAVE_LDAP
 #endif
 
-#if HAVE_GSSAPI_H
-#include <gssapi.h>
-#elif HAVE_GSSAPI_GSSAPI_H
+#if HAVE_GSSAPI_GSSAPI_H
 #include <gssapi/gssapi.h>
 #elif HAVE_GSSAPI_GSSAPI_GENERIC_H
 #include <gssapi/gssapi_generic.h>
+#elif HAVE_GSSAPI_H
+#include <gssapi.h>
 #endif
 
 #if HAVE_COM_ERR_H
@@ -241,6 +241,10 @@ typedef int ber_int_t;
 #include <aio.h>
 #endif
 
+#ifdef WITH_MADVISE_PROTECTED
+#include <sys/mman.h>
+#endif
+
 /* Special macros that are no-ops except when run under Valgrind on
  * x86.  They've moved a little bit from valgrind 1.0.4 to 1.9.4 */
 #if HAVE_VALGRIND_MEMCHECK_H
@@ -396,6 +400,7 @@ typedef sig_atomic_t volatile SIG_ATOMIC_T;
 #endif
 
 #define SBIG_UINT(p, ofs, v) (SIVAL(p,ofs,(v)&0xFFFFFFFF), SIVAL(p,(ofs)+4,(v)>>32))
+#define BIG_UINT(p, ofs) ((((uint64_t) IVAL(p,(ofs)+4))<<32)|IVAL(p,ofs))
 #define IVAL2_TO_SMB_BIG_UINT(buf,off) ( (((uint64_t)(IVAL((buf),(off)))) & ((uint64_t)0xFFFFFFFF)) | \
                (( ((uint64_t)(IVAL((buf),(off+4)))) & ((uint64_t)0xFFFFFFFF) ) << 32 ) )
 
@@ -572,6 +577,8 @@ struct smb_iconv_convenience *lp_iconv_convenience(void *lp_ctx);
 #include "../talloc/talloc.h"
 
 #include "event.h"
+#include "../lib/util/tevent_unix.h"
+#include "../lib/util/tevent_ntstatus.h"
 
 #include "../lib/util/data_blob.h"
 #include "../lib/util/time.h"
@@ -587,7 +594,7 @@ struct smb_iconv_convenience *lp_iconv_convenience(void *lp_ctx);
 #include "trans2.h"
 #include "../libcli/util/error.h"
 #include "ntioctl.h"
-#include "charset.h"
+#include "../lib/util/charset/charset.h"
 #include "dynconfig.h"
 #include "util_getent.h"
 #include "debugparse.h"
@@ -672,8 +679,6 @@ struct printjob;
 
 #include "smbldap.h"
 
-#include "smb_ldap.h"
-
 /*
  * Reasons for cache flush.
  */
@@ -1048,7 +1053,9 @@ ssize_t readahead(int fd, off64_t offset, size_t count);
 #undef HAVE_MMAP
 #endif
 
+#ifndef CONST_DISCARD
 #define CONST_DISCARD(type, ptr)      ((type) ((void *) (ptr)))
+#endif
 
 void smb_panic( const char *why ) _NORETURN_;
 void dump_core(void) _NORETURN_;