diff options
author | Harshavardhana <fharshav@redhat.com> | 2011-11-29 15:20:48 -0800 |
---|---|---|
committer | Anand Avati <avati@gluster.com> | 2011-11-30 23:13:55 -0800 |
commit | 5d194403e96d97f82681b5e7d96ddf8e48858cb7 (patch) | |
tree | af719d6ddfeb488b44bb8019f7482ea107fe58ca /contrib/uuid/uuid_types.h.in | |
parent | fbf6ce560dd6e72fc9d404e32d313732077a250f (diff) |
contrib/uuid: Make sure that uuid_types.h are generated per system specific.
Just the same way e2fsprogs maintains. This avoids unnecessary problems
for different architectures.
Change-Id: I3911998373756707996afb7b926ec0780ea18b81
BUG: 3833
Signed-off-by: Harshavardhana <fharshav@redhat.com>
Reviewed-on: http://review.gluster.com/764
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Amar Tumballi <amar@gluster.com>
Diffstat (limited to 'contrib/uuid/uuid_types.h.in')
-rw-r--r-- | contrib/uuid/uuid_types.h.in | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/contrib/uuid/uuid_types.h.in b/contrib/uuid/uuid_types.h.in new file mode 100644 index 000000000..f21ff4ee1 --- /dev/null +++ b/contrib/uuid/uuid_types.h.in @@ -0,0 +1,50 @@ +/* + * If linux/types.h is already been included, assume it has defined + * everything we need. (cross fingers) Other header files may have + * also defined the types that we need. + */ +#if (!defined(_STDINT_H) && !defined(_UUID_STDINT_H)) +#define _UUID_STDINT_H + +typedef unsigned char uint8_t; +typedef signed char int8_t; + +#if (@SIZEOF_INT@ == 8) +typedef int int64_t; +typedef unsigned int uint64_t; +#elif (@SIZEOF_LONG@ == 8) +typedef long int64_t; +typedef unsigned long uint64_t; +#elif (@SIZEOF_LONG_LONG@ == 8) +#if defined(__GNUC__) +typedef __signed__ long long int64_t; +#else +typedef signed long long int64_t; +#endif +typedef unsigned long long uint64_t; +#endif + +#if (@SIZEOF_INT@ == 2) +typedef int int16_t; +typedef unsigned int uint16_t; +#elif (@SIZEOF_SHORT@ == 2) +typedef short int16_t; +typedef unsigned short uint16_t; +#else + ?==error: undefined 16 bit type +#endif + +#if (@SIZEOF_INT@ == 4) +typedef int int32_t; +typedef unsigned int uint32_t; +#elif (@SIZEOF_LONG@ == 4) +typedef long int32_t; +typedef unsigned long uint32_t; +#elif (@SIZEOF_SHORT@ == 4) +typedef short int32_t; +typedef unsigned short uint32_t; +#else + ?== error: undefined 32 bit type +#endif + +#endif |