/[debian]/mimetic/branches/upstream/current/mimetic/libconfig.h
ViewVC logotype

Contents of /mimetic/branches/upstream/current/mimetic/libconfig.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 128 - (show annotations)
Sat Feb 25 16:49:20 2006 UTC (15 years, 5 months ago) by gregoa
File MIME type: text/plain
File size: 2167 byte(s)
[svn-inject] Installing original source of mimetic
1 /***************************************************************************
2 copyright : (C) by 2002-2004 Stefano Barbato
3 email : stefano@codesink.org
4
5 $Id: libconfig.h,v 1.7 2005/02/23 10:26:14 tat Exp $
6 ***************************************************************************/
7
8 /***************************************************************************
9 * *
10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation; either version 2 of the License, or *
13 * (at your option) any later version. *
14 * *
15 ***************************************************************************/
16 #ifndef _MIMETIC_LIB_CONFIG_H_
17 #define _MIMETIC_LIB_CONFIG_H_
18 #if defined(__unix__) || defined(__linux__) || defined(__unix) || defined(_AIX)
19 #include "config.h"
20 #define CONFIG_UNIX
21 #endif
22
23 /* Mac OS X */
24 #if defined(__APPLE__) && defined(__MACH__)
25 #include "config.h"
26 #define CONFIG_UNIX
27 #endif
28
29 /* Windows */
30 #if defined(WIN32) || defined(_WIN32) || defined(__WIN32__)
31 #include <mimetic/config_win32.h>
32 #include <process.h>
33 #include <io.h>
34 #include <ctime>
35 #include <cstdio>
36 typedef unsigned int uint;
37 #define CONFIG_WIN32
38 #endif
39
40 #if !defined(CONFIG_WIN32) && !defined(CONFIG_UNIX)
41 #error "I'm unable to guess platform type. please define CONFIG_WIN32 or CONFIG_UNIX"
42 #endif
43 #if defined(CONFIG_WIN32) && defined(CONFIG_UNIX)
44 #error "I'm unable to guess platform type. please define CONFIG_UNIX or CONFIG_WIN32"
45 #endif
46
47 #ifdef CONFIG_UNIX
48 #define PATH_SEPARATOR '/'
49 typedef unsigned int uint32;
50 struct newline_traits
51 {
52 enum { lf = 0xA, cr = 0xD };
53 enum { size = 1 };
54 enum { ch0 = lf, ch1 = 0 };
55 };
56 #endif
57
58 #ifdef CONFIG_WIN32
59 #define PATH_SEPARATOR '\\'
60 typedef unsigned int uint32;
61 struct newline_traits
62 {
63 enum { lf = 0xA, cr = 0xD };
64 enum { size = 2 };
65 enum { ch0 = cr, ch1 = lf };
66 };
67 #endif
68
69 #endif

  ViewVC Help
Powered by ViewVC 1.1.26