1 // This file is part of the ustl library, an STL implementation.
3 // Copyright (C) 2005 by Mike Sharov <msharov@users.sourceforge.net>
4 // This file is free software, distributed under the MIT License.
8 // Types used by this library.
11 #ifndef UTYPES_H_118BBB3B50B7DBF22F5460C52E515C83
12 #define UTYPES_H_118BBB3B50B7DBF22F5460C52E515C83
16 #error This library requires standard C and C++ headers to compile.
18 #ifndef STDUNIX_HEADERS
19 #error This library compiles only on UNIX systems.
21 #define __STDC_LIMIT_MACROS // For WCHAR_MIN and WCHAR_MAX in stdint.
22 #define __STDC_CONSTANT_MACROS // For UINT??_C macros to avoid using L and UL suffixes on constants.
28 #error Need standard integer types definitions, usually in stdint.h
30 #include <stddef.h> // For ptrdiff_t, size_t
33 #ifdef HAVE_SYS_TYPES_H
34 #include <sys/types.h>
37 #define SIZE_MAX UINT_MAX
39 #if sun || __sun // Solaris defines UINTPTR_MAX as empty.
41 #define UINTPTR_MAX ULONG_MAX
45 #define WCHAR_MAX __WCHAR_MAX__
47 #define WCHAR_MAX CHAR_MAX
52 #define ULLONG_MAX UINT64_C(0xFFFFFFFFFFFFFFFF)
53 #define LLONG_MAX INT64_C(0x7FFFFFFFFFFFFFFF)
54 #define LLONG_MIN ULLONG_MAX
58 #define LITTLE_ENDIAN USTL_LITTLE_ENDIAN
59 #define BIG_ENDIAN USTL_BIG_ENDIAN
60 #define BYTE_ORDER USTL_BYTE_ORDER
63 typedef size_t uoff_t
; ///< A type for storing offsets into blocks measured by size_t.
64 typedef uint32_t hashvalue_t
; ///< Value type returned by the hash functions.