summaryrefslogtreecommitdiff
path: root/brg_types.h
diff options
context:
space:
mode:
Diffstat (limited to 'brg_types.h')
-rw-r--r--brg_types.h85
1 files changed, 11 insertions, 74 deletions
diff --git a/brg_types.h b/brg_types.h
index 32aa9f7..4738359 100644
--- a/brg_types.h
+++ b/brg_types.h
@@ -45,85 +45,22 @@
#if defined(__cplusplus)
extern "C" {
#endif
-
-#include <limits.h>
-
-#ifndef BRG_UI8
-# define BRG_UI8
-# if UCHAR_MAX == 255u
- typedef unsigned char uint_8t;
-# else
-# error Please define uint_8t as an 8-bit unsigned integer type in brg_types.h
-# endif
-#endif
-
-#ifndef BRG_UI16
-# define BRG_UI16
-# if USHRT_MAX == 65535u
- typedef unsigned short uint_16t;
-# else
-# error Please define uint_16t as a 16-bit unsigned short type in brg_types.h
-# endif
-#endif
-
-#ifndef BRG_UI32
-# define BRG_UI32
-# if UINT_MAX == 4294967295u
-# define li_32(h) 0x##h##u
- typedef unsigned int uint_32t;
-# elif ULONG_MAX == 4294967295u
-# define li_32(h) 0x##h##ul
- typedef unsigned long uint_32t;
-# elif defined( _CRAY )
-# error This code needs 32-bit data types, which Cray machines do not provide
-# else
-# error Please define uint_32t as a 32-bit unsigned integer type in brg_types.h
-# endif
+#if 0
+}
#endif
-#ifndef BRG_UI64
-# if defined( __BORLANDC__ ) && !defined( __MSDOS__ )
-# define BRG_UI64
-# define li_64(h) 0x##h##ull
- typedef unsigned __int64 uint_64t;
-# elif defined( _MSC_VER ) && ( _MSC_VER < 1300 ) /* 1300 == VC++ 7.0 */
-# define BRG_UI64
-# define li_64(h) 0x##h##ui64
- typedef unsigned __int64 uint_64t;
-# elif defined( __sun ) && defined(ULONG_MAX) && ULONG_MAX == 0xfffffffful
-# define BRG_UI64
-# define li_64(h) 0x##h##ull
- typedef unsigned long long uint_64t;
-# elif defined( UINT_MAX ) && UINT_MAX > 4294967295u
-# if UINT_MAX == 18446744073709551615u
-# define BRG_UI64
-# define li_64(h) 0x##h##u
- typedef unsigned int uint_64t;
-# endif
-# elif defined( ULONG_MAX ) && ULONG_MAX > 4294967295u
-# if ULONG_MAX == 18446744073709551615ul
-# define BRG_UI64
-# define li_64(h) 0x##h##ul
- typedef unsigned long uint_64t;
-# endif
-# elif defined( ULLONG_MAX ) && ULLONG_MAX > 4294967295u
-# if ULLONG_MAX == 18446744073709551615ull
-# define BRG_UI64
-# define li_64(h) 0x##h##ull
- typedef unsigned long long uint_64t;
-# endif
-# elif defined( ULONG_LONG_MAX ) && ULONG_LONG_MAX > 4294967295u
-# if ULONG_LONG_MAX == 18446744073709551615ull
-# define BRG_UI64
-# define li_64(h) 0x##h##ull
- typedef unsigned long long uint_64t;
-# endif
-# endif
+#if defined(HAVE_CONFIG_H)
+# include "config.h"
#endif
-#if defined( NEED_UINT_64T ) && !defined( BRG_UI64 )
-# error Please define uint_64t as an unsigned 64 bit type in brg_types.h
+#if defined(HAVE_STDINT_H)
+# include <stdint.h>
#endif
+
+typedef uint8_t uint_8t;
+typedef uint16_t uint_16t;
+typedef uint32_t uint_32t;
+typedef uint64_t uint_64t;
#ifndef RETURN_VALUES
# define RETURN_VALUES