Annotation of parser3/src/include/pa_config_includes.h, revision 1.23.2.5.2.2
1.5 paf 1: /** @file
2: Parser: includes all Configure-d headers
3:
1.23.2.1 paf 4: Copyright (c) 2001-2003 ArtLebedev Group (http://www.artlebedev.com)
1.17 paf 5: Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru)
1.5 paf 6:
7: when used Configure [HAVE_CONFIG_H] it uses defines from Configure,
8: fixed otherwise.
9: */
1.10 parser 10:
1.23.2.5.2.1 paf 11: #ifndef PA_CONFIG_INCLUDES_H
12: #define PA_CONFIG_INCLUDES_H
13:
1.10 parser 14: #if _MSC_VER
15: # pragma warning(disable:4291) // disable warning
16: // "no matching operator delete found; memory will not be freed if initialization throws an exception
17: #endif
1.5 paf 18:
1.1 paf 19: #if HAVE_CONFIG_H
20: # include "pa_config_auto.h"
21: #else
22: # include "pa_config_fixed.h"
1.6 paf 23: #endif
24:
1.7 paf 25: #ifdef __cplusplus
26: # undef inline
1.1 paf 27: #endif
28:
1.23.2.5.2.2! paf 29: #ifdef HAVE_ASSERT_H
! 30: # include <assert.h>
! 31: #endif
! 32:
1.3 paf 33: #ifdef HAVE_CTYPE_H
34: # include <ctype.h>
35: #endif
36:
37: #ifdef HAVE_ERRNO_H
38: # include <errno.h>
39: #endif
40:
41: #ifdef HAVE_FCNTL_H
42: # include <fcntl.h>
43: #endif
44:
45: #ifdef HAVE_IO_H
46: # include <io.h>
47: #endif
48:
49: #ifdef HAVE_PROCESS_H
50: # include <process.h>
51: #endif
52:
1.1 paf 53: #ifdef HAVE_STDARG_H
54: # include <stdarg.h>
55: #endif
56:
1.8 parser 57: #ifdef HAVE_STDDEF_H
58: # include <stddef.h>
59: #endif
60:
1.3 paf 61: #ifdef HAVE_STDIO_H
62: # include <stdio.h>
63: #endif
64:
65: #ifdef HAVE_SYS_STAT_H
66: # include <sys/stat.h>
67: #endif
68:
69: #if defined(HAVE_UNISTD_H) && !defined(NO_UNISTD_H)
1.1 paf 70: # include <unistd.h>
71: #endif
1.3 paf 72:
73: #ifdef HAVE_MATH_H
74: # include <math.h>
75: #endif
76:
1.23.2.5.2.1 paf 77: #include <stdlib.h>
1.3 paf 78:
79: #ifdef HAVE_STRING_H
80: # include <string.h>
81: #endif
82:
1.4 paf 83: #ifdef HAVE_DIRECT_H
84: # include <direct.h>
1.8 parser 85: #endif
86:
87: #ifdef HAVE_SETJMP_H
88: # include <setjmp.h>
1.9 parser 89: #endif
90:
91: #ifdef HAVE_MEMORY_H
92: # include <memory.h>
1.13 paf 93: #endif
94:
95: #ifdef HAVE_NEW
96: #include <new>
1.14 paf 97: #endif
98:
99: #ifdef HAVE_SYS_FILE_H
100: #include <sys/file.h>
101: #endif
102:
103: #ifdef HAVE_SYS_LOCKING_H
104: #include <sys/locking.h>
105: #endif
106:
107: #ifdef HAVE_SYS_TYPES_H
108: #include <sys/types.h>
1.15 paf 109: #endif
110:
111: #ifdef HAVE_SYS_SELECT_H
112: #include <sys/select.h>
1.4 paf 113: #endif
1.21 paf 114:
115: #ifdef HAVE_SIGNAL_H
116: #include <signal.h>
117: #endif
118:
1.22 paf 119: #ifdef HAVE_SYS_SOCKET_H
1.23.2.2 paf 120: # include <sys/socket.h>
121: #else
1.23.2.5 paf 122: # if defined(HAVE_WINSOCK_H) && !defined(_MSC_VER) && !defined(CYGWIN)
1.23.2.2 paf 123: # include <winsock.h>
124: # endif
1.22 paf 125: #endif
126:
1.23.2.2 paf 127: // must go anywhere after winsock [cygwin time.h checks for already inclusion of winsock.h]
128: #if TIME_WITH_SYS_TIME
129: # include <sys/time.h>
130: # include <time.h>
131: #else
132: # ifdef HAVE_SYS_TIME_H
133: # include <sys/time.h>
134: # else
135: # include <time.h>
136: # endif
137: #endif
138:
139:
1.22 paf 140: #ifdef HAVE_NETINET_IN_H
141: #include <netinet/in.h>
142: #endif
143:
144: #ifdef HAVE_ARPA_INET_H
145: #include <arpa/inet.h>
146: #endif
147:
148: #ifdef HAVE_NETDB_H
149: #include <netdb.h>
150: #endif
1.23.2.2 paf 151:
152:
1.23.2.5.2.1 paf 153: // math function replacements
154:
155: #ifndef HAVE_TRUNC
156: inline double trunc(double param) { return param > 0? floor(param) : ceil(param); }
157: #endif
158:
159: #ifndef HAVE_ROUND
160: inline double round(double param) { return floor(param+0.5); }
161: #endif
162:
163: #ifndef HAVE_SIGN
164: inline double sign(double param) { return param > 0 ? 1 : ( param < 0 ? -1 : 0 ); }
165: #endif
166:
167: #endif
E-mail: