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