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 #include "config.h"
00020 #define CONFIG_UNIX
00021 #endif
00022
00023
00024 #if defined(__APPLE__) && defined(__MACH__)
00025 #include "config.h"
00026 #define CONFIG_UNIX
00027 #endif
00028
00029
00030 #if defined(WIN32) || defined(_WIN32) || defined(__WIN32__)
00031 #include <mimetic/config_win32.h>
00032 #include <process.h>
00033 #include <io.h>
00034 #include <ctime>
00035 #include <cstdio>
00036 typedef unsigned int uint;
00037 #define CONFIG_WIN32
00038 #endif
00039
00040 #if !defined(CONFIG_WIN32) && !defined(CONFIG_UNIX)
00041 #error "I'm unable to guess platform type. please define CONFIG_WIN32 or CONFIG_UNIX"
00042 #endif
00043 #if defined(CONFIG_WIN32) && defined(CONFIG_UNIX)
00044 #error "I'm unable to guess platform type. please define CONFIG_UNIX or CONFIG_WIN32"
00045 #endif
00046
00047 #ifdef CONFIG_UNIX
00048 #define PATH_SEPARATOR '/'
00049 typedef unsigned int uint32;
00050 struct newline_traits
00051 {
00052 enum { lf = 0xA, cr = 0xD };
00053 enum { size = 1 };
00054 enum { ch0 = lf, ch1 = 0 };
00055 };
00056 #endif
00057
00058 #ifdef CONFIG_WIN32
00059 #define PATH_SEPARATOR '\\'
00060 typedef unsigned int uint32;
00061 struct newline_traits
00062 {
00063 enum { lf = 0xA, cr = 0xD };
00064 enum { size = 2 };
00065 enum { ch0 = cr, ch1 = lf };
00066 };
00067 #endif
00068
00069 #endif