C Standard Library Extensions  1.1
cxconfig.h
00001 /*
00002  * cxconfig.h: This is a generated file! Do not edit this file!
00003  *             All changes will be lost!
00004  */
00005 
00006 #ifndef CXCONFIG_H_
00007 #define CXCONFIG_H_
00008 
00009 #include <limits.h>
00010 #include <float.h>
00011 #include <stdint.h>
00012 #include <inttypes.h>
00013 
00014 #include <cxmacros.h>
00015 
00016 
00017 CX_BEGIN_DECLS
00018 
00019 /*
00020  * Limits for numerical data types
00021  */
00022 
00023 #define CX_MINSHORT  SHRT_MIN
00024 #define CX_MAXSHORT  SHRT_MAX
00025 #define CX_MAXUSHORT USHRT_MAX
00026 
00027 #define CX_MININT    INT_MIN
00028 #define CX_MAXINT    INT_MAX
00029 #define CX_MAXUINT   UINT_MAX
00030 
00031 #define CX_MINLONG   LONG_MIN
00032 #define CX_MAXLONG   LONG_MAX
00033 #define CX_MAXULONG  ULONG_MAX
00034 
00035 #define CX_MINFLOAT  FLT_MIN
00036 #define CX_MAXFLOAT  FLT_MAX
00037 
00038 #define CX_MINDOUBLE DBL_MIN
00039 #define CX_MAXDOUBLE DBL_MAX
00040 
00041 
00042 /*
00043  * Number of bits per char
00044  */
00045 
00046 #define CX_CHAR_BIT 8
00047 
00048 /*
00049  * Fixed size integer types
00050  */
00051 
00052 /* Macros for formatted output */
00053 
00054 #define CX_PRINTF_FORMAT_INT8    PRIi8
00055 #define CX_PRINTF_FORMAT_UINT8   PRIu8
00056 
00057 #define CX_PRINTF_FORMAT_INT16    PRIi16
00058 #define CX_PRINTF_FORMAT_UINT16   PRIu16
00059 
00060 #define CX_PRINTF_FORMAT_INT32    PRIi32
00061 #define CX_PRINTF_FORMAT_UINT32   PRIu32
00062 
00063 #define CX_PRINTF_FORMAT_INT64    PRIi64
00064 #define CX_PRINTF_FORMAT_UINT64   PRIu64
00065 
00066 /* Macros for formatted output */
00067 
00068 #define CX_SCANF_FORMAT_INT8    SCNi8
00069 #define CX_SCANF_FORMAT_UINT8   SCNu8
00070 
00071 #define CX_SCANF_FORMAT_INT16    SCNi16
00072 #define CX_SCANF_FORMAT_UINT16   SCNu16
00073 
00074 #define CX_SCANF_FORMAT_INT32    SCNi32
00075 #define CX_SCANF_FORMAT_UINT32   SCNu32
00076 
00077 #define CX_SCANF_FORMAT_INT64    SCNi64
00078 #define CX_SCANF_FORMAT_UINT64   SCNu64
00079 
00080 /* Type definitions */
00081 
00082 typedef int8_t cxint8;
00083 typedef uint8_t cxuint8;
00084 
00085 typedef int16_t cxint16;
00086 typedef uint16_t cxuint16;
00087 
00088 typedef int32_t cxint32;
00089 typedef uint32_t cxuint32;
00090 
00091 CX_GNUC_EXTENSION  typedef int64_t cxint64;
00092 CX_GNUC_EXTENSION  typedef uint64_t cxuint64;
00093 
00094 #define CX_INT64_CONSTANT(val)   (CX_GNUC_EXTENSION (val##LL))
00095 #define CX_UINT64_CONSTANT(val)  (CX_GNUC_EXTENSION (val##ULL))
00096 
00097 #define CX_SIZEOF_VOID_P  4
00098 #define CX_SIZEOF_SIZE_T  4
00099 
00100 /*
00101  * Size type
00102  */
00103 
00104 #define CX_PRINTF_FORMAT_SIZE_TYPE    "u"
00105 #define CX_PRINTF_FORMAT_SSIZE_TYPE   "i"
00106 
00107 #define CX_SCANF_FORMAT_SIZE_TYPE    "u"
00108 #define CX_SCANF_FORMAT_SSIZE_TYPE   "i"
00109 
00110 typedef signed int cxssize;
00111 typedef unsigned int cxsize;
00112 
00113 #define CX_MINSSIZE  CXMININT
00114 #define CX_MAXSSIZE  CXMAXINT
00115 #define CX_MAXSIZE   CXMAXUINT
00116 
00117 
00118 typedef cxint64 cxoffset;
00119 
00120 #define CX_MINOFFSET CX_MININT64
00121 #define CX_MAXOFFSET CX_MAXINT64
00122 
00123 /*
00124  * Pointer to integer conversion
00125  */
00126 
00127 #define CX_POINTER_TO_INT(ptr)   ((cxint)  (ptr))
00128 #define CX_POINTER_TO_UINT(ptr)  ((cxint)  (ptr))
00129 
00130 #define CX_INT_TO_POINTER(val)   ((cxptr)  (val))
00131 #define CX_UINT_TO_POINTER(val)   ((cxptr)  (val))
00132 
00133 #ifdef __cplusplus
00134 #  define CX_HAVE_INLINE  1
00135 #else
00136 
00137 #endif
00138 
00139 #ifdef __cplusplus
00140 #  define CX_CAN_INLINE  1
00141 #endif
00142 
00143 #if defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)
00144 #  define CX_GNUC_INTERNAL __attribute__((visibility("hidden")))
00145 #elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
00146 #  define CX_GNUC_INTERNAL __hidden
00147 #elif defined (__GNUC__) && defined (CX_HAVE_GNUC_VISIBILITY)
00148 #  define CX_GNUC_INTERNAL __attribute__((visibility("hidden")))
00149 #else
00150 #  define CX_GNUC_INTERNAL  /* empty */
00151 #endif
00152 
00153 CX_END_DECLS
00154 
00155 #endif /* CXCONFIG_H_ */