00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef _MIMETIC_LIB_CONFIG_H_
00017 #define _MIMETIC_LIB_CONFIG_H_
00018 #if defined(__unix__) || defined(__linux__) || defined(__unix) || defined(_AIX)
00019 #ifdef HAVE_MIMETIC_CONFIG
00020 #include "config.h"
00021 #endif
00022 #define CONFIG_UNIX
00023 #endif
00024
00025
00026 #if defined(__APPLE__) && defined(__MACH__)
00027 typedef unsigned int uint;
00028 #ifdef HAVE_MIMETIC_CONFIG
00029 #include "config.h"
00030 #endif
00031 #define CONFIG_UNIX
00032 #endif
00033
00034
00035 #if defined(WIN32) || defined(_WIN32) || defined(__WIN32__)
00036 #include <mimetic/config_win32.h>
00037 #include <process.h>
00038 #include <io.h>
00039 #include <ctime>
00040 #include <cstdio>
00041 typedef unsigned int uint;
00042 #define CONFIG_WIN32
00043 #endif
00044
00045 #if !defined(CONFIG_WIN32) && !defined(CONFIG_UNIX)
00046 #error "I'm unable to guess platform type. please define CONFIG_WIN32 or CONFIG_UNIX"
00047 #endif
00048 #if defined(CONFIG_WIN32) && defined(CONFIG_UNIX)
00049 #error "I'm unable to guess platform type. please define CONFIG_UNIX or CONFIG_WIN32"
00050 #endif
00051
00052 #ifdef CONFIG_UNIX
00053 #define PATH_SEPARATOR '/'
00054 typedef unsigned int uint32;
00055 struct newline_traits
00056 {
00057 enum { lf = 0xA, cr = 0xD };
00058 enum { size = 1 };
00059 enum { ch0 = lf, ch1 = 0 };
00060 };
00061 #endif
00062
00063 #ifdef CONFIG_WIN32
00064 #define PATH_SEPARATOR '\\'
00065 typedef unsigned int uint32;
00066 struct newline_traits
00067 {
00068 enum { lf = 0xA, cr = 0xD };
00069 enum { size = 2 };
00070 enum { ch0 = cr, ch1 = lf };
00071 };
00072 #endif
00073
00074 #endif