diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-10-14 03:38:34 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-10-14 03:38:34 +0200 |
commit | 606c398fb834c3e057423dfce641b8a6b2d3f925 (patch) | |
tree | c1b501bcf90fd3f66d427d37d97bd027cc65cc50 | |
parent | d4f647c859139a56b403e864ebb4ed08f40e35be (diff) | |
download | samba-606c398fb834c3e057423dfce641b8a6b2d3f925.tar.gz samba-606c398fb834c3e057423dfce641b8a6b2d3f925.tar.bz2 samba-606c398fb834c3e057423dfce641b8a6b2d3f925.zip |
Rely on standard {u,}int{8,16,32,64}_t types provided by system or
libreplace for {u,}int{8,16,32,64} defines.
-rw-r--r-- | source3/include/includes.h | 49 | ||||
-rw-r--r-- | source3/lib/select.c | 2 |
2 files changed, 9 insertions, 42 deletions
diff --git a/source3/include/includes.h b/source3/include/includes.h index a13372665c..0df4ef9ec7 100644 --- a/source3/include/includes.h +++ b/source3/include/includes.h @@ -310,15 +310,11 @@ typedef int volatile SIG_ATOMIC_T; */ #ifndef uint8 -#define uint8 unsigned char +#define uint8 uint8_t #endif #if !defined(int16) && !defined(HAVE_INT16_FROM_RPC_RPC_H) -# if (SIZEOF_SHORT == 4) -# define int16 __ERROR___CANNOT_DETERMINE_TYPE_FOR_INT16; -# else /* SIZEOF_SHORT != 4 */ -# define int16 short -# endif /* SIZEOF_SHORT != 4 */ +# define int16 int16_t /* needed to work around compile issue on HP-UX 11.x */ # define _INT16 1 #endif @@ -328,25 +324,13 @@ typedef int volatile SIG_ATOMIC_T; * case as int16 may be a typedef from rpc/rpc.h */ + #if !defined(uint16) && !defined(HAVE_UINT16_FROM_RPC_RPC_H) -#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) && !defined(HAVE_INT32_FROM_RPC_RPC_H) -# 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 -# endif +# define int32 int32_t /* needed to work around compile issue on HP-UX 11.x */ # define _INT32 1 #endif @@ -357,16 +341,7 @@ typedef int volatile SIG_ATOMIC_T; */ #if !defined(uint32) && !defined(HAVE_UINT32_FROM_RPC_RPC_H) -#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 -#endif +# define uint32 uint32_t #endif /* @@ -374,19 +349,11 @@ typedef int volatile SIG_ATOMIC_T; */ #if !defined(uint64) -#if (SIZEOF_LONG == 8) -#define uint64 unsigned long -#elif (SIZEOF_LONG_LONG == 8) -#define uint64 unsigned long long -#endif /* don't lie. If we don't have it, then don't use it */ +# define uint64 uint64_t #endif #if !defined(int64) -#if (SIZEOF_LONG == 8) -#define int64 long -#elif (SIZEOF_LONG_LONG == 8) -#define int64 long long -#endif /* don't lie. If we don't have it, then don't use it */ +# define int64 int64_t #endif diff --git a/source3/lib/select.c b/source3/lib/select.c index 1bb1a75909..14e59257ba 100644 --- a/source3/lib/select.c +++ b/source3/lib/select.c @@ -30,7 +30,7 @@ static pid_t initialised; static int select_pipe[2]; -static VOLATILE unsigned pipe_written, pipe_read; +static volatile unsigned pipe_written, pipe_read; /******************************************************************* Call this from all Samba signal handlers if you want to avoid a |