r873: converted samba4 to use real 64 bit integers instead of
[kamenim/samba.git] / source4 / include / includes.h
index b611974e29da11179fefd81e570eb59fa507efa5..b6be02155e79748c71887a473e860d24c3f32666 100644 (file)
@@ -23,6 +23,7 @@
 
 #ifndef NO_CONFIG_H /* for some tests */
 #include "config.h"
+#include "smb_build.h"
 #endif
 
 #include "local.h"
@@ -498,6 +499,14 @@ typedef int socklen_t;
 #endif
 #endif
 
+#if !defined(uint64)
+#define uint64 uint64_t
+#endif
+
+#if !defined(int64)
+#define int64 int64_t
+#endif
+
 /*
  * Types for devices, inodes and offsets.
  */
@@ -542,11 +551,6 @@ typedef int socklen_t;
 #  endif
 #endif
 
-/* this should really be a 64 bit type if possible */
-#define br_off SMB_BIG_UINT
-
-#define SMB_OFF_T_BITS (sizeof(SMB_OFF_T)*8)
-
 /*
  * Set the define that tells us if we can do 64 bit
  * NT SMB calls.
@@ -558,20 +562,6 @@ typedef int socklen_t;
 #  endif
 #endif
 
-#ifdef LARGE_SMB_OFF_T
-#define SOFF_T(p, ofs, v) (SIVAL(p,ofs,(v)&0xFFFFFFFF), SIVAL(p,(ofs)+4,(v)>>32))
-#define SOFF_T_R(p, ofs, v) (SIVAL(p,(ofs)+4,(v)&0xFFFFFFFF), SIVAL(p,ofs,(v)>>32))
-#define IVAL_TO_SMB_OFF_T(buf,off) ((SMB_OFF_T)(( ((SMB_BIG_UINT)(IVAL((buf),(off)))) & ((SMB_BIG_UINT)0xFFFFFFFF) )))
-#define IVAL2_TO_SMB_BIG_UINT(buf,off) ( (((SMB_BIG_UINT)(IVAL((buf),(off)))) & ((SMB_BIG_UINT)0xFFFFFFFF)) | \
-               (( ((SMB_BIG_UINT)(IVAL((buf),(off+4)))) & ((SMB_BIG_UINT)0xFFFFFFFF) ) << 32 ) )
-#else 
-#define SOFF_T(p, ofs, v) (SIVAL(p,ofs,v),SIVAL(p,(ofs)+4,0))
-#define SOFF_T_R(p, ofs, v) (SIVAL(p,(ofs)+4,v),SIVAL(p,ofs,0))
-#define IVAL_TO_SMB_OFF_T(buf,off) ((SMB_OFF_T)(( ((uint32)(IVAL((buf),(off)))) & 0xFFFFFFFF )))
-#define IVAL2_TO_SMB_BIG_UINT(buf,off) ( (((SMB_BIG_UINT)(IVAL((buf),(off)))) & ((SMB_BIG_UINT)0xFFFFFFFF)) | \
-                               (( ((SMB_BIG_UINT)(IVAL((buf),(off+4)))) & ((SMB_BIG_UINT)0xFFFFFFFF) ) << 32 ) )
-#endif
-
 /*
  * Type for stat structure.
  */
@@ -632,20 +622,6 @@ typedef int socklen_t;
 #  endif
 #endif
 
-#if defined(HAVE_LONGLONG)
-#define SMB_BIG_UINT unsigned long long
-#define SMB_BIG_INT long long
-#define SBVAL(p, ofs, v) (SIVAL(p,ofs,(v)&0xFFFFFFFF), SIVAL(p,(ofs)+4,(v)>>32))
-#define BVAL(p, ofs) (IVAL(p,ofs) | (((SMB_BIG_UINT)IVAL(p,(ofs)+4)) << 32))
-#else
-#define SMB_BIG_UINT unsigned long
-#define SMB_BIG_INT long
-#define SBVAL(p, ofs, v) (SIVAL(p,ofs,v),SIVAL(p,(ofs)+4,0))
-#define BVAL(p, ofs) IVAL(p,ofs)
-#endif
-
-#define SMB_BIG_UINT_BITS (sizeof(SMB_BIG_UINT)*8)
-
 #ifndef MIN
 #define MIN(a,b) ((a)<(b)?(a):(b))
 #endif
@@ -680,10 +656,9 @@ extern int errno;
 #include "xfile.h"
 #include "dlinklist.h"
 #include "lib/ldb/include/ldb.h"
-#include "lib/ldb/include/ldb_parse.h"
-#include "lib/tdb/tdb.h"
-#include "lib/tdb/spinlock.h"
-#include "lib/tdb/tdbutil.h"
+#include "lib/tdb/include/tdb.h"
+#include "lib/tdb/include/spinlock.h"
+#include "lib/tdb/include/tdbutil.h"
 #include "talloc.h"
 #include "nt_status.h"
 #include "interfaces.h"
@@ -694,8 +669,6 @@ extern int errno;
 #include "charset.h"
 #include "dynconfig.h"
 
-#include "util_getent.h"
-
 #include "version.h"
 #include "smb.h"
 #include "ads.h"
@@ -704,16 +677,14 @@ extern int errno;
 
 #include "byteorder.h"
 
-#include "msdfs.h"
-
 #include "md5.h"
 #include "hmacmd5.h"
 
 #include "libcli/auth/ntlmssp.h"
+#include "libcli/auth/credentials.h"
 #include "libcli/auth/schannel.h"
 
 #include "auth/auth.h"
-#include "passdb/passdb.h"
 
 #include "module.h"
 
@@ -721,10 +692,6 @@ extern int errno;
 
 #include "popt.h"
 
-#include "mangle.h"
-
-#include "nsswitch/winbind_client.h"
-
 #include "mutex.h"
 
 #include "librpc/rpc/dcerpc.h"
@@ -735,13 +702,6 @@ extern int errno;
 #include "cli_context.h"
 #include "registry.h"
 
-
-/* used in net.c */
-struct functable {
-       const char *funcname;
-       int (*fn)(int argc, const char **argv);
-};
-
 #define malloc_p(type) (type *)malloc(sizeof(type))
 #define malloc_array_p(type, count) (type *)realloc_array(NULL, sizeof(type), count)
 #define realloc_p(p, type, count) (type *)realloc_array(p, sizeof(type), count)
@@ -750,8 +710,6 @@ struct functable {
 typedef int (*comparison_fn_t)(const void *, const void *);
 #endif
 
-#include "nsswitch/nss.h"
-
 /***** automatically generated prototypes *****/
 #include "proto.h"