gfx/qcms/qcmstypes.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gfx/qcms/qcmstypes.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,51 @@
     1.4 +#ifndef QCMS_TYPES_H
     1.5 +#define QCMS_TYPES_H
     1.6 +
     1.7 +#if BYTE_ORDER == LITTLE_ENDIAN
     1.8 +#define IS_LITTLE_ENDIAN
     1.9 +#elif BYTE_ORDER == BIG_ENDIAN
    1.10 +#define IS_BIG_ENDIAN
    1.11 +#endif
    1.12 +
    1.13 +/* all of the platforms that we use _MSC_VER on are little endian
    1.14 + * so this is sufficient for now */
    1.15 +#ifdef _MSC_VER
    1.16 +#define IS_LITTLE_ENDIAN
    1.17 +#endif
    1.18 +
    1.19 +#ifdef __OS2__
    1.20 +#define IS_LITTLE_ENDIAN
    1.21 +#endif
    1.22 +
    1.23 +#if !defined(IS_LITTLE_ENDIAN) && !defined(IS_BIG_ENDIAN)
    1.24 +#error Unknown endianess
    1.25 +#endif
    1.26 +
    1.27 +#if defined (_SVR4) || defined (SVR4) || defined (__OpenBSD__) || defined (_sgi) || defined (__sun) || defined (sun) || defined (__digital__)
    1.28 +#  include <inttypes.h>
    1.29 +#elif defined (_MSC_VER) && _MSC_VER < 1600
    1.30 +typedef __int8 int8_t;
    1.31 +typedef unsigned __int8 uint8_t;
    1.32 +typedef __int16 int16_t;
    1.33 +typedef unsigned __int16 uint16_t;
    1.34 +typedef __int32 int32_t;
    1.35 +typedef unsigned __int32 uint32_t;
    1.36 +typedef __int64 int64_t;
    1.37 +typedef unsigned __int64 uint64_t;
    1.38 +#ifdef _WIN64
    1.39 +typedef unsigned __int64 uintptr_t;
    1.40 +#else
    1.41 +typedef unsigned long uintptr_t;
    1.42 +#endif
    1.43 +
    1.44 +#elif defined (_AIX)
    1.45 +#  include <sys/inttypes.h>
    1.46 +#else
    1.47 +#  include <stdint.h>
    1.48 +#endif
    1.49 +
    1.50 +typedef qcms_bool bool;
    1.51 +#define true 1
    1.52 +#define false 0
    1.53 +
    1.54 +#endif

mercurial