X-Git-Url: http://git.samba.org/?p=samba.git;a=blobdiff_plain;f=source%2Finclude%2Fincludes.h;h=058d54773616da831afbe49754e8d96a084681c4;hp=b611974e29da11179fefd81e570eb59fa507efa5;hb=bea47671aa791f3c4d22263f9444aea1a73f47f1;hpb=af34710d4da1841653624fe304b1c8d812c0fdd9 diff --git a/source/include/includes.h b/source/include/includes.h index b611974e29d..058d5477361 100644 --- a/source/include/includes.h +++ b/source/include/includes.h @@ -23,6 +23,7 @@ #ifndef NO_CONFIG_H /* for some tests */ #include "config.h" +#include "smb_build.h" #endif #include "local.h" @@ -431,71 +432,47 @@ typedef int socklen_t; #endif -#ifndef uchar -#define uchar unsigned char -#endif - -#ifdef HAVE_UNSIGNED_CHAR -#define schar signed char -#else -#define schar char -#endif - /* - Samba needs type definitions for int16, int32, uint16 and uint32. + Samba needs type definitions for + int8_t, int16_t, int32_t, int64_t + uint8_t, uint16_t, uint32_t and uint64_t. - Normally these are signed and unsigned 16 and 32 bit integers, but - they actually only need to be at least 16 and 32 bits + Normally these are signed and unsigned 8, 16, 32 and 64 bit integers, but + they actually only need to be at least 8, 16, 32 and 64 bits respectively. Thus if your word size is 8 bytes just defining them as signed and unsigned int will work. */ -#ifndef uint8 -#define uint8 unsigned char +#if !defined(int8) +#define int8 int8_t #endif -#if !defined(int16) -#if (SIZEOF_SHORT == 4) -#define int16 __ERROR___CANNOT_DETERMINE_TYPE_FOR_INT16; -#else /* SIZEOF_SHORT != 4 */ -#define int16 short -#endif /* SIZEOF_SHORT != 4 */ +#if !defined(uint8) +#define uint8 uint8_t #endif +#if !defined(int16) +#define int16 int16_t +#endif #if !defined(uint16) -#if (SIZEOF_SHORT == 4) -#define uint16 __ERROR___CANNOT_DETERMINE_TYPE_FOR_INT16; -#else /* SIZEOF_SHORT != 4 */ -#define uint16 unsigned short -#endif /* SIZEOF_SHORT != 4 */ +#define uint16 uint16_t #endif #if !defined(int32) -#if (SIZEOF_INT == 4) -#define int32 int -#elif (SIZEOF_LONG == 4) -#define int32 long -#elif (SIZEOF_SHORT == 4) -#define int32 short -#else -/* uggh - no 32 bit type?? probably a CRAY. just hope this works ... */ -#define int32 int +#define int32 int32_t #endif -#endif - #if !defined(uint32) -#if (SIZEOF_INT == 4) -#define uint32 unsigned int -#elif (SIZEOF_LONG == 4) -#define uint32 unsigned long -#elif (SIZEOF_SHORT == 4) -#define uint32 unsigned short -#else -/* uggh - no 32 bit type?? probably a CRAY. just hope this works ... */ -#define uint32 unsigned +#define uint32 uint32_t +#endif + +#if !defined(int64) +#define int64 int64_t #endif + +#if !defined(uint64) +#define uint64 uint64_t #endif /* @@ -542,11 +519,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 +530,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 +590,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 +624,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,9 +637,8 @@ extern int errno; #include "charset.h" #include "dynconfig.h" -#include "util_getent.h" - #include "version.h" +#include "rewrite.h" #include "smb.h" #include "ads.h" #include "nameserv.h" @@ -704,16 +646,17 @@ 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 "libcli/auth/kerberos.h" +#include "libcli/auth/gensec.h" +#include "libcli/auth/spnego.h" #include "auth/auth.h" -#include "passdb/passdb.h" #include "module.h" @@ -721,26 +664,18 @@ extern int errno; #include "popt.h" -#include "mangle.h" - -#include "nsswitch/winbind_client.h" - #include "mutex.h" #include "librpc/rpc/dcerpc.h" #include "rpc_server/dcerpc_server.h" -#include "context.h" +#include "smb_server/smb_server.h" #include "ntvfs/ntvfs.h" #include "cli_context.h" #include "registry.h" - - -/* used in net.c */ -struct functable { - const char *funcname; - int (*fn)(int argc, const char **argv); -}; +#include "rap.h" +#include "gtk/common/gtk-smb.h" +#include "gtk/common/select.h" #define malloc_p(type) (type *)malloc(sizeof(type)) #define malloc_array_p(type, count) (type *)realloc_array(NULL, sizeof(type), count) @@ -750,10 +685,11 @@ struct functable { typedef int (*comparison_fn_t)(const void *, const void *); #endif -#include "nsswitch/nss.h" - /***** automatically generated prototypes *****/ +#define _PRINTF_ATTRIBUTE(a1, a2) PRINTF_ATTRIBUTE(a1, a2) #include "proto.h" +#undef _PRINTF_ATTRIBUTE +#define _PRINTF_ATTRIBUTE(a1, a2) /* String routines */ @@ -775,10 +711,6 @@ typedef int (*comparison_fn_t)(const void *, const void *); #define MAP_FILE 0 #endif -#if (!defined(WITH_LDAP) && !defined(WITH_TDB_SAM)) -#define USE_SMBPASS_DB 1 -#endif - #if defined(HAVE_PUTPRPWNAM) && defined(AUTH_CLEARTEXT_SEG_CHARS) #define OSF1_ENH_SEC 1 #endif