summaryrefslogtreecommitdiff
path: root/PACE/pace/config/platform.h
blob: 4dde03ea27a416c44984edddc079b1b1e90724e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
/* $Id$

 * ============================================================================
 *
 * = LIBRARY
 *    pace
 *
 * = FILENAME
 *    pace/config/platform.h
 *
 * = AUTHOR
 *    Luther Baker
 *
 * ============================================================================ */

#ifndef PACE_CONFIG_PLATFORM_H
#define PACE_CONFIG_PLATFORM_H

/* Be careful not to define these macros 2x. */
/* IE: makefile or other config file. */
/* This could create compiler warnings. */

/* These platforms are POSIX compliant. */

#if defined (PACE_LINUX)
# define PACE_HAS_POSIX PACE_LINUX
# define PACE_LYNXOS 0
# define PACE_SUNOS 0
# define PACE_VXWORKS 0
# define PACE_WIN32 0
#elif defined (PACE_LYNXOS)
# define PACE_HAS_POSIX PACE_LYNXOS
# define PACE_LINUX 0
# define PACE_SUNOS 0
# define PACE_VXWORKS 0
# define PACE_WIN32 0
#elif defined (PACE_OSF1)
# define PACE_HAS_POSIX DIGITAL_UNIX
# define PACE_LINUX 0
# define PACE_LYNXOS 0
# define PACE_VXWORKS 0
# define PACE_WIN32 0
#elif defined (PACE_SUNOS)
# define PACE_HAS_POSIX PACE_SUNOS
# define PACE_LINUX 0
# define PACE_LYNXOS 0
# define PACE_VXWORKS 0
# define PACE_WIN32 0
#elif defined (PACE_QNX)
# define PACE_HAS_POSIX PACE_QNX
# define PACE_LINUX 0
# define PACE_SUNOS 0
# define PACE_LYNXOS 0
# define PACE_VXWORKS 0
# define PACE_WIN32 0

/* These platforms are NOT POSIX compliant. */

/* This is really kludgy but not sure what else to do at this point.
   It appears that if PACE_HAS_POSIX is not defined (i.e., no #define
   at all of any kind) and the same goes for PACE_VXWORKS then in
   pace/config/config.h #if PACE_HAS_POSIX == PACE_LYNXOS will evaluate
   to true. I am assuming both get default values of 0.

   PACE_WIN32 should be defined as 0 though because pace/config/utility.h
   checks it.
   */

#elif defined (PACE_VXWORKS)
# define PACE_LACKS_POSIX PACE_VXWORKS
# define PACE_LINUX -1
# define PACE_LYNXOS -1
# define PACE_SUNOS -1
# define PACE_WIN32 0
/* Doesn't use the makefile! */
#elif defined (WIN32)
# undef PACE_WIN32
# define PACE_WIN32 2000
# define PACE_LACKS_POSIX PACE_WIN32
# define PACE_LINUX 0
# define PACE_LYNXOS 0
# define PACE_SUNOS 0
# define PACE_VXWORKS 0
#endif

#endif /* PACE_CONFIG_PLATFORM_H */