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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 511 - (show annotations)
Sun Jan 21 20:13:31 2007 UTC (14 years, 5 months ago) by gregoa
File MIME type: text/plain
File size: 2235 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.8 2006/04/18 14:10:52 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 #ifdef HAVE_MIMETIC_CONFIG
28 #include "config.h"
29 #endif
30 #define CONFIG_UNIX
31 #endif
32
33 /* Windows */
34 #if defined(WIN32) || defined(_WIN32) || defined(__WIN32__)
35 #include <mimetic/config_win32.h>
36 #include <process.h>
37 #include <io.h>
38 #include <ctime>
39 #include <cstdio>
40 typedef unsigned int uint;
41 #define CONFIG_WIN32
42 #endif
43
44 #if !defined(CONFIG_WIN32) && !defined(CONFIG_UNIX)
45 #error "I'm unable to guess platform type. please define CONFIG_WIN32 or CONFIG_UNIX"
46 #endif
47 #if defined(CONFIG_WIN32) && defined(CONFIG_UNIX)
48 #error "I'm unable to guess platform type. please define CONFIG_UNIX or CONFIG_WIN32"
49 #endif
50
51 #ifdef CONFIG_UNIX
52 #define PATH_SEPARATOR '/'
53 typedef unsigned int uint32;
54 struct newline_traits
55 {
56 enum { lf = 0xA, cr = 0xD };
57 enum { size = 1 };
58 enum { ch0 = lf, ch1 = 0 };
59 };
60 #endif
61
62 #ifdef CONFIG_WIN32
63 #define PATH_SEPARATOR '\\'
64 typedef unsigned int uint32;
65 struct newline_traits
66 {
67 enum { lf = 0xA, cr = 0xD };
68 enum { size = 2 };
69 enum { ch0 = cr, ch1 = lf };
70 };
71 #endif
72
73 #endif

  ViewVC Help
Powered by ViewVC 1.1.26