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 #include "aliceml_platform.h"
00031
00032 #if HAVE_CONFIG_H
00033 #include "config.h"
00034 #elif defined(__WIN32__)
00035 #include "config-win32.h"
00036 #else
00037 #error "Create and include a config file !"
00038 #endif
00039
00040 #if HAVE_STDBOOL_H
00041 #include <stdbool.h>
00042 #endif
00043
00044 #if HAVE_STDINT_H
00045 #include <stdint.h>
00046 #endif
00047
00048 #if HAVE_STDTYPES_H
00049 #include <stdtypes.h>
00050 #endif
00051
00052 #if HAVE_STDDEF_H
00053 #include <stddef.h>
00054 #endif
00055
00056 #if HAVE_STDIO_H
00057 #include <stdio.h>
00058 #endif
00059
00060 #if HAVE_WCHAR_H
00061 #include <wchar.h>
00062 #endif
00063
00064 #ifdef __cplusplus
00065 extern "C" {
00066 #endif
00067
00068
00069 #ifndef ALICEMLAPI
00070 #if !defined(ALICEML_DLL)
00071 # define ALICEMLAPI extern
00072 #elif defined(__BEOS__)
00073 # if defined(__GNUC__)
00074 # define ALICEMLAPI extern__declspec(dllexport)
00075 # else
00076 # define ALICEMLAPI extern__declspec(export)
00077 # endif
00078 #elif defined(__WIN32__)
00079 # ifdef ALICEML_BUILD
00080 # define ALICEMLAPI extern __declspec(dllexport)
00081 # else
00082 # define ALICEMLAPI extern
00083 # endif
00084 #elif defined(__OS2__)
00085 # ifdef __WATCOMC__
00086 # ifdef ALICEML_BUILD
00087 # define ALICEMLAPI extern __declspec(dllexport)
00088 # else
00089 # define ALICEMLAPI extern
00090 # endif
00091 # else
00092 # define ALICEMLAPI extern
00093 # endif
00094 #else
00095 # if defined(__GNUC__) && (__GNUC__ >= 4)
00096 # define ALICEMLAPI extern __attribute__ ((visibility("default")))
00097 # else
00098 # define ALICEMLAPI extern
00099 # endif
00100 #endif
00101 #endif
00102
00103
00104 #ifndef ALICEMLCALL
00105 #if defined(__WIN32__)
00106 # define ALICEMLCALL __cdecl
00107 #else
00108 # define ALICEMLCALL
00109 #endif
00110 #endif
00111
00112
00113 #ifndef ALICEMLINLINE
00114 #ifdef __GNUC__
00115 # define ALICEMLINLINE __inline__
00116 #elif defined(_MSC_VER) || defined(__BORLANDC__) || ¥
00117 defined(__DMC__) || defined(__SC__) || ¥
00118 defined(__WATCOMC__) || defined(__LCC__) || ¥
00119 defined(__DECC)
00120 # define ALICEMLINLINE __inline
00121 #elif !defined(__MRC__) && !defined(_SGI_SOURCE)
00122 # define ALICEMLINLINE inline
00123 #else
00124 # define ALICEMLINLINE static
00125 #endif
00126 #endif
00127
00128
00129 #if defined(__WIN32__)
00130 # define ML_USE_WIN32_TIMER 1
00131 #else
00132 # define ML_USE_POSIX_TIMER 1
00133 #endif
00134
00135
00136 #if defined(__WIN32__)
00137 # define ML_USE_WIN32_FONT 1
00138 #else
00139 # define ML_USE_POSIX_FONT 1
00140 #endif
00141
00142
00143
00144
00145
00146 #if 0 && defined(__cplusplus)
00147 typedef bool ML_bool;
00148 #define ML_TRUE true
00149 #define ML_FALSE false
00150 #endif
00151
00153 typedef enum ML_bool {
00154 ML_FALSE = 0,
00155 ML_TRUE = 1,
00156 } ML_bool;
00157
00163 #ifndef ML_CHECKUP_ASSERT
00164 #ifndef NDEBUG
00165 # define ML_CHECKUP_ASSERT 1
00166 #endif
00167 #endif
00168
00169
00170 #if HAVE_STDINT_H || HAVE_INTTYPES_H
00171 typedef int8_t ML_int8;
00172 typedef int16_t ML_int16;
00173 typedef int32_t ML_int32;
00174 typedef int64_t ML_int64;
00175 typedef uint8_t ML_uint8;
00176 typedef uint16_t ML_uint16;
00177 typedef uint32_t ML_uint32;
00178 typedef uint64_t ML_uint64;
00179 typedef intptr_t ML_intptr;
00180 #endif
00181
00182
00183
00184
00185 #if defined(WCHAR_MAX)
00186 # if WCHAR_MAX > 0xffff
00187 # define ML_WCHAR_SIZE 4
00188 # else
00189 # define ML_WCHAR_SIZE 2
00190 # endif
00191 #else
00192 # define ML_WCHAR_SIZE 2
00193 #endif
00194
00195 typedef char ML_char;
00196 typedef char ML_char8;
00197 typedef wchar_t ML_wchar;
00199 #if ML_WCHAR_SIZE == 4
00200 typedef ML_uint16 ML_char16;
00201 typedef wchar_t ML_char32;
00202 #else
00203 typedef wchar_t ML_char16;
00204 typedef ML_uint32 ML_char32;
00205 #endif
00206
00208 typedef size_t ML_size;
00209
00210 #ifdef __cplusplus
00211 }
00212 #endif
00213
00214 #endif