diff options
author | Stefan Metzmacher <metze@samba.org> | 2004-05-25 16:24:13 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:56:15 -0500 |
commit | f9d8f8843dc0ab8c9d59abde7222e0f118b86b5d (patch) | |
tree | 8c6360be102dee63e893526ac7128e9cd52d362c /source4/include/byteorder.h | |
parent | 59e739a2f9f4b10f5f6184ef397f034d09959f26 (diff) | |
download | samba-f9d8f8843dc0ab8c9d59abde7222e0f118b86b5d.tar.gz samba-f9d8f8843dc0ab8c9d59abde7222e0f118b86b5d.tar.bz2 samba-f9d8f8843dc0ab8c9d59abde7222e0f118b86b5d.zip |
r884: convert samba4 to use [u]int32_t instead of [u]int32
metze
(This used to be commit 0e5517d937a2eb7cf707991d1c7498c1ab456095)
Diffstat (limited to 'source4/include/byteorder.h')
-rw-r--r-- | source4/include/byteorder.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/source4/include/byteorder.h b/source4/include/byteorder.h index 48b4cb8127..a1e161ba6c 100644 --- a/source4/include/byteorder.h +++ b/source4/include/byteorder.h @@ -118,36 +118,36 @@ it also defines lots of intermediate macros, just ignore those :-) #define SSVALX(buf,pos,val) (CVAL_NC(buf,pos)=(unsigned char)((val)&0xFF),CVAL_NC(buf,pos+1)=(unsigned char)((val)>>8)) #define SIVALX(buf,pos,val) (SSVALX(buf,pos,val&0xFFFF),SSVALX(buf,pos+2,val>>16)) #define SVALS(buf,pos) ((int16)SVAL(buf,pos)) -#define IVALS(buf,pos) ((int32)IVAL(buf,pos)) +#define IVALS(buf,pos) ((int32_t)IVAL(buf,pos)) #define SSVAL(buf,pos,val) SSVALX((buf),(pos),((uint16)(val))) -#define SIVAL(buf,pos,val) SIVALX((buf),(pos),((uint32)(val))) +#define SIVAL(buf,pos,val) SIVALX((buf),(pos),((uint32_t)(val))) #define SSVALS(buf,pos,val) SSVALX((buf),(pos),((int16)(val))) -#define SIVALS(buf,pos,val) SIVALX((buf),(pos),((int32)(val))) +#define SIVALS(buf,pos,val) SIVALX((buf),(pos),((int32_t)(val))) #else /* CAREFUL_ALIGNMENT */ /* this handles things for architectures like the 386 that can handle alignment errors */ /* - WARNING: This section is dependent on the length of int16 and int32 + WARNING: This section is dependent on the length of int16 and int32_t being correct */ /* get single value from an SMB buffer */ #define SVAL(buf,pos) (*(const uint16 *)((const char *)(buf) + (pos))) #define SVAL_NC(buf,pos) (*(uint16 *)((char *)(buf) + (pos))) /* Non const version of above. */ -#define IVAL(buf,pos) (*(const uint32 *)((const char *)(buf) + (pos))) -#define IVAL_NC(buf,pos) (*(uint32 *)((char *)(buf) + (pos))) /* Non const version of above. */ +#define IVAL(buf,pos) (*(const uint32_t *)((const char *)(buf) + (pos))) +#define IVAL_NC(buf,pos) (*(uint32_t *)((char *)(buf) + (pos))) /* Non const version of above. */ #define SVALS(buf,pos) (*(const int16 *)((const char *)(buf) + (pos))) #define SVALS_NC(buf,pos) (*(int16 *)((char *)(buf) + (pos))) /* Non const version of above. */ -#define IVALS(buf,pos) (*(const int32 *)((const char *)(buf) + (pos))) -#define IVALS_NC(buf,pos) (*(int32 *)((char *)(buf) + (pos))) /* Non const version of above. */ +#define IVALS(buf,pos) (*(const int32_t *)((const char *)(buf) + (pos))) +#define IVALS_NC(buf,pos) (*(int32_t *)((char *)(buf) + (pos))) /* Non const version of above. */ /* store single value in an SMB buffer */ #define SSVAL(buf,pos,val) SVAL_NC(buf,pos)=((uint16)(val)) -#define SIVAL(buf,pos,val) IVAL_NC(buf,pos)=((uint32)(val)) +#define SIVAL(buf,pos,val) IVAL_NC(buf,pos)=((uint32_t)(val)) #define SSVALS(buf,pos,val) SVALS_NC(buf,pos)=((int16)(val)) -#define SIVALS(buf,pos,val) IVALS_NC(buf,pos)=((int32)(val)) +#define SIVALS(buf,pos,val) IVALS_NC(buf,pos)=((int32_t)(val)) #endif /* CAREFUL_ALIGNMENT */ |