00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef __ALICEML_CONFIG_H__
00028 #define __ALICEML_CONFIG_H__
00029
00030 #if HAVE_CONFIG_H
00031 #include "config.h"
00032 #elif defined(_WIN32) || defined(WIN32)
00033 #include "config-win32.h"
00034 #else
00035 #error Create and include a config file !
00036 #endif
00037
00038 #if HAVE_STDBOOL_H
00039 #include <stdbool.h>
00040 #endif
00041
00042 #if HAVE_STDINT_H
00043 #include <stdint.h>
00044 #endif
00045
00046 #if HAVE_STDTYPES_H
00047 #include <stdtypes.h>
00048 #endif
00049
00050 #if HAVE_STDDEF_H
00051 #include <stddef.h>
00052 #endif
00053
00054 #if HAVE_WCHAR_H
00055 #include <wchar.h>
00056 #endif
00057
00058 #ifdef __cplusplus
00059 extern "C" {
00060 #endif
00061
00062
00063 #ifndef ALICEMLAPI
00064 #ifdef __BEOS__
00065 #if defined(__GNUC__)
00066 #define ALICEMLAPI extern __declspec(dllexport)
00067 #else
00068 #define ALICEMLAPI extern __declspec(export)
00069 #endif
00070 #elif WIN32
00071 #ifdef __BORLANDC__
00072 #ifdef BUILD_ALICEML
00073 #define ALICEMLAPI extern
00074 #else
00075 #define ALICEMLAPI extern __declspec(dllimport)
00076 #endif
00077 #else
00078 #define ALICEMLAPI extern __declspec(dllexport)
00079 #endif
00080 #else
00081 #define ALICEMLAPI extern
00082 #endif
00083 #endif
00084
00085
00086 #ifndef ALICEMLCALL
00087 #if defined(WIN32) || defined(_WIN32)
00088 #define ALICEMLCALL __cdecl
00089 #else
00090 #define ALICEMLCALL
00091 #endif
00092 #endif
00093
00094
00095 #ifdef __GNUC__
00096 #define ALICEMLINLINE static __inline__
00097 #else
00098
00099 #if defined(_MSC_VER) || defined(__BORLANDC__) || \
00100 defined(__DMC__) || defined(__SC__) || \
00101 defined(__WATCOMC__) || defined(__LCC__) || \
00102 defined(__DECC)
00103 #ifndef ALICEMLINLINE
00104 #define ALICEMLINLINE __inline
00105 #endif
00106 #else
00107 #if !defined(__MRC__) && !defined(_SGI_SOURCE)
00108 #define ALICEMLINLINE inline
00109 #else
00110 #ifndef ALICEMLINLINE
00111 #define ALICEMLINLINE static
00112 #endif
00113 #endif
00114 #endif
00115 #endif
00116
00117
00118 #if WIN32
00119
00120 #define ML_USE_WIN32_TIMER 1
00121 #else
00122
00123 #define ML_USE_POSIX_TIMER 1
00124 #endif
00125
00126
00127 #if WIN32
00128
00129 #define ML_USE_WIN32_FONT 1
00130 #else
00131
00132 #define ML_USE_POSIX_FONT 1
00133 #endif
00134
00135
00136
00137
00138
00139 #if 0 && defined(__cplusplus)
00140 typedef bool ML_bool;
00141 #define ML_TRUE true
00142 #define ML_FALSE false
00143 #endif
00144
00146 typedef enum ML_bool {
00147 ML_FALSE = 0,
00148 ML_TRUE = 1,
00149 } ML_bool;
00150
00156 #ifndef ML_CHECKUP_ASSERT
00157 #ifndef NDEBUG
00158 #define ML_CHECKUP_ASSERT 1
00159 #endif
00160 #endif
00161
00162
00163 #if HAVE_STDINT_H || HAVE_INTTYPES_H
00164 typedef int8_t ML_int8;
00165 typedef int16_t ML_int16;
00166 typedef int32_t ML_int32;
00167 typedef int64_t ML_int64;
00168 typedef uint8_t ML_uint8;
00169 typedef uint16_t ML_uint16;
00170 typedef uint32_t ML_uint32;
00171 typedef uint64_t ML_uint64;
00172 typedef intptr_t ML_intptr;
00173 #endif
00174
00175 #if defined(WCHAR_MAX)
00176 #if WCHAR_MAX > 0xffff
00177 #define ML_WCHAR_SIZE 4
00178 #else
00179 #define ML_WCHAR_SIZE 2
00180 #endif
00181 #else
00182
00183 #define ML_WCHAR_SIZE 2
00184 #endif
00185
00186 typedef char ML_char;
00187 typedef char ML_char8;
00188 typedef wchar_t ML_wchar;
00190 #if ML_WCHAR_SIZE == 4
00191 typedef ML_char16 ML_char16;
00192 typedef wchar_t ML_char32;
00193 #else
00194 typedef wchar_t ML_char16;
00195 typedef ML_uint32 ML_char32;
00196 #endif
00197
00199 typedef size_t ML_size;
00200
00201 #ifdef __cplusplus
00202 }
00203 #endif
00204
00205 #endif