00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef AXUTIL_UTILS_DEFINES_H
00020 #define AXUTIL_UTILS_DEFINES_H
00021
00022 #include <stddef.h>
00023
00024 #if !defined(WIN32)
00025 #include <stdint.h>
00026 #endif
00027
00028 #ifdef __cplusplus
00029 extern "C"
00030 {
00031 #endif
00032
00033 #if defined(WIN32) && !defined(AXIS2_SKIP_INT_TYPEDEFS)
00034
00037 typedef unsigned __int8 uint8_t;
00038 typedef __int8 int8_t;
00039 typedef unsigned __int16 uint16_t;
00040 typedef __int16 int16_t;
00041 typedef unsigned __int32 uint32_t;
00042 typedef __int32 int32_t;
00043 typedef unsigned __int64 uint64_t;
00044 typedef __int64 int64_t;
00045 #endif
00046
00052 #if defined(WIN32)
00053 #define AXIS2_PRINTF_INT64_FORMAT_SPECIFIER "%I64d"
00054 #define AXIS2_PRINTF_UINT64_FORMAT_SPECIFIER "%I64u"
00055 #define AXIS2_PRINTF_INT32_FORMAT_SPECIFIER "%I32d"
00056 #define AXIS2_PRINTF_UINT32_FORMAT_SPECIFIER "%I32u"
00057 #else
00058 #if __WORDSIZE == 64
00059 #define AXIS2_PRINTF_INT64_FORMAT_SPECIFIER "%ld"
00060 #define AXIS2_PRINTF_UINT64_FORMAT_SPECIFIER "%lu"
00061 #else
00062 #define AXIS2_PRINTF_INT64_FORMAT_SPECIFIER "%lld"
00063 #define AXIS2_PRINTF_UINT64_FORMAT_SPECIFIER "%llu"
00064 #endif
00065 #define AXIS2_PRINTF_INT32_FORMAT_SPECIFIER "%d"
00066 #define AXIS2_PRINTF_UINT32_FORMAT_SPECIFIER "%u"
00067 #endif
00068
00072 typedef char axis2_char_t;
00073 typedef int axis2_bool_t;
00074 typedef int axis2_status_t;
00075 typedef int axis2_scope_t;
00076 typedef unsigned int axis2_ssize_t;
00077 typedef char axis2_byte_t;
00078
00079 #define AXIS2_STRING(s) s
00080
00081 #define AXIS2_CHAR(c) c
00082
00083 #define AXIS2_CRLF_LENGTH 2
00084
00085 #define AXIS2_CRLF "\r\n"
00086
00087
00088
00089
00090
00091 #define AXIS2_EOLN '\0'
00092
00096 #define AXIS2_TRUE 1
00097 #define AXIS2_FALSE 0
00098
00102 #if defined(WIN32)
00103 #define AXIS2_EXPORT __declspec(dllexport)
00104 #else
00105 #define AXIS2_EXPORT
00106 #endif
00107
00111 #if defined(WIN32)
00112 #define AXIS2_IMPORT __declspec(dllimport)
00113 #else
00114 #define AXIS2_IMPORT
00115 #endif
00116
00120 #if defined(__GNUC__)
00121 #if defined(__i386)
00122 #define AXIS2_CALL __attribute__((cdecl))
00123 #define AXIS2_WUR __attribute__((warn_unused_result))
00124 #else
00125 #define AXIS2_CALL
00126 #define AXIS2_WUR
00127
00128
00129 #endif
00130 #else
00131 #if defined(__unix)
00132 #define AXIS2_CALL
00133 #define AXIS2_WUR
00134
00135
00136 #else
00137 #define AXIS2_CALL __stdcall
00138 #define AXIS2_WUR
00139 #endif
00140 #endif
00141 #define AXIS2_THREAD_FUNC AXIS2_CALL
00142
00143
00144 #ifdef DOXYGEN
00145
00146
00147
00159 # define AXIS2_DECLARE_STATIC
00160
00167 # define AXIS2_DECLARE_EXPORT
00168
00169 #endif
00170
00171 #if !defined(WIN32)
00172
00185 #define AXIS2_EXTERN
00186
00195 #define AXIS2_DECLARE_NONSTD(type) type
00196
00205 #define AXIS2_DECLARE_DATA
00206
00207 #elif defined(AXIS2_DECLARE_STATIC)
00208 #define AXIS2_EXTERN
00209 #define AXIS2_EXTERN_NONSTD
00210 #define AXIS2_DECLARE_DATA
00211 #elif defined(AXIS2_DECLARE_EXPORT)
00212 #define AXIS2_EXTERN AXIS2_EXPORT
00213 #define AXIS2_EXTERN_NONSTD AXIS2_EXPORT
00214 #define AXIS2_DECLARE_DATA
00215 #else
00216 #define AXIS2_EXTERN AXIS2_IMPORT
00217 #define AXIS2_EXTERN_NONSTD AXIS2_IMPORT
00218 #define AXIS2_DECLARE_DATA
00219 #endif
00220
00221 #ifdef __cplusplus
00222 }
00223 #endif
00224
00225 #endif