/[debian]/mimetic/trunk/mimetic/libconfig.h
ViewVC logotype

Contents of /mimetic/trunk/mimetic/libconfig.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1731 - (show annotations)
Fri May 15 15:35:42 2009 UTC (12 years, 1 month ago) by gregoa
File MIME type: text/plain
File size: 2282 byte(s)
New upstream release.
1 /***************************************************************************
2 copyright : (C) by 2002-2004 Stefano Barbato
3 email : stefano@codesink.org
4
5 $Id: libconfig.h,v 1.10 2009-02-16 18:08:59 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 #ifdef HAVE_MIMETIC_CONFIG
20 #include "config.h"
21 #endif
22 #define CONFIG_UNIX
23 #endif
24
25 /* Mac OS X */
26 #if defined(__APPLE__) && defined(__MACH__)
27 typedef unsigned int uint;
28 #ifdef HAVE_MIMETIC_CONFIG
29 #include "config.h"
30 #endif
31 #define CONFIG_UNIX
32 #endif
33
34 /* Windows */
35 #if defined(WIN32) || defined(_WIN32) || defined(__WIN32__)
36 #include <mimetic/config_win32.h>
37 #include <process.h>
38 #include <io.h>
39 #include <ctime>
40 #include <cstdio>
41 typedef unsigned int uint;
42 #define CONFIG_WIN32
43 #endif
44
45 #if !defined(CONFIG_WIN32) && !defined(CONFIG_UNIX)
46 #error "I'm unable to guess platform type. please define CONFIG_WIN32 or CONFIG_UNIX"
47 #endif
48 #if defined(CONFIG_WIN32) && defined(CONFIG_UNIX)
49 #error "I'm unable to guess platform type. please define CONFIG_UNIX or CONFIG_WIN32"
50 #endif
51
52 #ifdef CONFIG_UNIX
53 #include <cstdlib>
54 #define PATH_SEPARATOR '/'
55 typedef unsigned int uint32;
56 struct newline_traits
57 {
58 enum { lf = 0xA, cr = 0xD };
59 enum { size = 1 };
60 enum { ch0 = lf, ch1 = 0 };
61 };
62 #endif
63
64 #ifdef CONFIG_WIN32
65 #define PATH_SEPARATOR '\\'
66 typedef unsigned int uint32;
67 struct newline_traits
68 {
69 enum { lf = 0xA, cr = 0xD };
70 enum { size = 2 };
71 enum { ch0 = cr, ch1 = lf };
72 };
73 #endif
74
75 #endif

  ViewVC Help
Powered by ViewVC 1.1.26