Annotation of parser3/src/include/pa_config_includes.h, revision 1.23.2.5.2.1
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.3 paf 29: #ifdef HAVE_CTYPE_H
30: # include <ctype.h>
31: #endif
32:
33: #ifdef HAVE_ERRNO_H
34: # include <errno.h>
35: #endif
36:
37: #ifdef HAVE_FCNTL_H
38: # include <fcntl.h>
39: #endif
40:
41: #ifdef HAVE_IO_H
42: # include <io.h>
43: #endif
44:
45: #ifdef HAVE_PROCESS_H
46: # include <process.h>
47: #endif
48:
1.1 paf 49: #ifdef HAVE_STDARG_H
50: # include <stdarg.h>
51: #endif
52:
1.8 parser 53: #ifdef HAVE_STDDEF_H
54: # include <stddef.h>
55: #endif
56:
1.3 paf 57: #ifdef HAVE_STDIO_H
58: # include <stdio.h>
59: #endif
60:
61: #ifdef HAVE_SYS_STAT_H
62: # include <sys/stat.h>
63: #endif
64:
65: #if defined(HAVE_UNISTD_H) && !defined(NO_UNISTD_H)
1.1 paf 66: # include <unistd.h>
67: #endif
1.3 paf 68:
69: #ifdef HAVE_MATH_H
70: # include <math.h>
71: #endif
72:
1.23.2.5.2.1! paf 73: #include <stdlib.h>
1.3 paf 74:
75: #ifdef HAVE_STRING_H
76: # include <string.h>
77: #endif
78:
1.4 paf 79: #ifdef HAVE_DIRECT_H
80: # include <direct.h>
1.8 parser 81: #endif
82:
83: #ifdef HAVE_SETJMP_H
84: # include <setjmp.h>
1.9 parser 85: #endif
86:
87: #ifdef HAVE_MEMORY_H
88: # include <memory.h>
1.13 paf 89: #endif
90:
91: #ifdef HAVE_NEW
92: #include <new>
1.14 paf 93: #endif
94:
95: #ifdef HAVE_SYS_FILE_H
96: #include <sys/file.h>
97: #endif
98:
99: #ifdef HAVE_SYS_LOCKING_H
100: #include <sys/locking.h>
101: #endif
102:
103: #ifdef HAVE_SYS_TYPES_H
104: #include <sys/types.h>
1.15 paf 105: #endif
106:
107: #ifdef HAVE_SYS_SELECT_H
108: #include <sys/select.h>
1.4 paf 109: #endif
1.21 paf 110:
111: #ifdef HAVE_SIGNAL_H
112: #include <signal.h>
113: #endif
114:
1.22 paf 115: #ifdef HAVE_SYS_SOCKET_H
1.23.2.2 paf 116: # include <sys/socket.h>
117: #else
1.23.2.5 paf 118: # if defined(HAVE_WINSOCK_H) && !defined(_MSC_VER) && !defined(CYGWIN)
1.23.2.2 paf 119: # include <winsock.h>
120: # endif
1.22 paf 121: #endif
122:
1.23.2.2 paf 123: // must go anywhere after winsock [cygwin time.h checks for already inclusion of winsock.h]
124: #if TIME_WITH_SYS_TIME
125: # include <sys/time.h>
126: # include <time.h>
127: #else
128: # ifdef HAVE_SYS_TIME_H
129: # include <sys/time.h>
130: # else
131: # include <time.h>
132: # endif
133: #endif
134:
135:
1.22 paf 136: #ifdef HAVE_NETINET_IN_H
137: #include <netinet/in.h>
138: #endif
139:
140: #ifdef HAVE_ARPA_INET_H
141: #include <arpa/inet.h>
142: #endif
143:
144: #ifdef HAVE_NETDB_H
145: #include <netdb.h>
146: #endif
1.23.2.2 paf 147:
148:
1.23.2.5.2.1! paf 149: // math function replacements
! 150:
! 151: #ifndef HAVE_TRUNC
! 152: inline double trunc(double param) { return param > 0? floor(param) : ceil(param); }
! 153: #endif
! 154:
! 155: #ifndef HAVE_ROUND
! 156: inline double round(double param) { return floor(param+0.5); }
! 157: #endif
! 158:
! 159: #ifndef HAVE_SIGN
! 160: inline double sign(double param) { return param > 0 ? 1 : ( param < 0 ? -1 : 0 ); }
! 161: #endif
! 162:
! 163: #endif
E-mail: