File: aug_sysdep.h

package info (click to toggle)
openser 1.1.0-9etch1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 9,828 kB
  • ctags: 11,809
  • sloc: ansic: 120,528; sh: 5,249; yacc: 1,716; makefile: 1,261; php: 656; perl: 205; sql: 190
file content (318 lines) | stat: -rw-r--r-- 9,224 bytes parent folder | download
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
/*
 * $Id: aug_sysdep.h,v 1.5 2006/07/05 10:55:08 miconda Exp $
 *
 * POSTGRES module, portions of this code were templated using
 * the mysql module, thus it's similarity.
 *
 * Copyright (C) 2003 August.Net Services, LLC
 *
 * This file is part of openser, a free SIP server.
 *
 * openser is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version
 *
 * openser is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License 
 * along with this program; if not, write to the Free Software 
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 * ---
 *
 * History
 * -------
 * 2003-04-06 initial code written (Greg Fausak/Andy Fullford)
 *
 */
/*
** ________________________________________________________________________
**
**
**                      $RCSfile: aug_sysdep.h,v $
**                     $Revision: 1.5 $
**
**             Last change $Date: 2006/07/05 10:55:08 $
**           Last change $Author: miconda $
**                        $State: Exp $
**                       $Locker:  $
**
**               Original author: Andrew Fullford
**
**           Copyright (C) August Associates  1995
**
** ________________________________________________________________________
*/

/*  AM_TYPE: (INSTALL_INC)  */

#ifndef AUG_SYSDEP_H
#define AUG_SYSDEP_H

/*
**  As necessary, detect operating system, CPU, and compiler
**  combinations, and establish defines that describe the
**  characteristics and requirements for the combination.
**
**  As each special case is encountered elsewhere in the code,
**  a new define should be added here for each affected system.
**
**  Defines take names like:
**
**	AUG_HAS_xxxx	System has capability xxxx
**	AUG_NO_xxxx	System doesn't have capability xxxx
**	AUG_BAD_xxxx	System has xxxx, but it's broken
**
**  Every system gets AUG_CONFIGURATION so we can reject misconfigured
**  compiles.  This should be set to an os/cpu/compiler description.
*/
#undef AUG_CONFIGURATION

/*
**  This list should be maintained as the definitive list of capabilities.
**  Add each new define here with a description and then in each system
**  dependent section as appropriate.
**
**  Please stick to the "#undef" format -- the aug_sysdep.sh script
**  uses these to report configurations.
*/
#undef AUG_HAS_SELECT_H		/* Select macros in <sys/select.h> instead of
				   <sys/time.h> or <sys/time.h> */
#undef AUG_BAD_FD_SET		/* FD_SET et al are broken (HP-UX) */

#undef AUG_HAS_LP		/* SysV style "lp" and "lpstat" commands */
#undef AUG_HAS_LP_REQUEST	/* Has the /usr/spool/lp/request directory.
				   Probably only ever in HP-UX */
#undef AUG_HAS_LPR		/* BSD style "lpr" and "/etc/printcap" */
#undef AUG_NO_PUTENV		/* Use setenv() instead of putenv() */
#undef AUG_HAS_PREAD		/* Has pread() (combined seek/read) */

/* If neither AUG_HAS_RAND48 nor AUG_HAS_RANDOM, rand() will be used */
#undef AUG_HAS_RAND48		/* Has lrand48/srand48 calls */
#undef AUG_HAS_RANDOM		/* Has random/srandom calls */

#undef AUG_HAS_SINCOS		/* -libm has a fast sincos() implementation */
#undef AUG_NO_IOVEC		/* Some system may not have readv/writev */
#undef AUG_NO_TIMES		/* Some system may not have times(2) */

#undef AUG_HAS_PSAX		/* ps takes "-ax" arg to show all procs */
#undef AUG_NO_TZARG		/* get/settimeofday takes no timezone arg */

#undef AUG_NO_CRYPT_H		/* crypt(3) declared in unistd.h instead of
				   crypt.h. */

#undef AUG_NO_TERMIOS		/* System does not have the termios interface */

#undef AUG_NO_TERMIO_H		/* No termio.h, only termios.h used */

#undef AUG_NO_DB		/* System doesn't support UCB's db(3) */

#undef AUG_NO_GETPAGESIZE	/* System does not have getpagesize() */
#undef AUG_NO_PTHREADS		/* System does not have Posix Threads support */

/*
----------------------------------------------------------------------------
----- SGI Irix with sgi C --------------------------------------------------
----------------------------------------------------------------------------
*/

#if defined(sgi) || defined(__sgi) || defined(__sgi__)

#define AUG_HAS_LP
#define AUG_CONFIGURATION	"SGI Irix with sgi C"
#define AUG_HAS_RAND48

typedef unsigned int augUInt32;

#endif /* sgi */

/*
----------------------------------------------------------------------------
----- Sun Solaris 2.x on SPARC or x86, with SUNpro C or GCC ----------------
----------------------------------------------------------------------------
*/
#if defined(sun) || defined(__sun) || defined(__sun__)

#define AUG_HAS_LP
#define AUG_HAS_PREAD
#define AUG_HAS_RAND48

#if defined(i386) || defined(__i386)

#if defined(__GNUC__)
#define AUG_CONFIGURATION	"Sun Solaris x86 with GCC"
#else
#define AUG_CONFIGURATION	"Sun Solaris x86 with SUNpro C"
#endif

typedef unsigned int augUInt32;

#endif

#if defined(sparc) || defined(__sparc)
#if defined(__svr4__) || defined(__SVR4)

#if defined(__GNUC__)
#define AUG_CONFIGURATION	"Sun Solaris 2.x SPARC with GCC"
#else
#define AUG_CONFIGURATION	"Sun Solaris 2.x SPARC with SUNpro C"
#endif
#endif /* svr4 */

typedef unsigned int augUInt32;

#endif /* sparc */

#endif /* sun */

/*
----------------------------------------------------------------------------
----- Linux x86 with GCC ---------------------------------------------------
----------------------------------------------------------------------------
*/
#ifdef __linux

#define AUG_HAS_LPR
#define AUG_HAS_RANDOM		/* Actually has AUG_HAS_RAND48 too */
#define AUG_HAS_PSAX

/* AUG_DEBIAN supplied on cc command line where appropriate */
#ifndef AUG_DEBIAN
#define AUG_NO_CRYPT_H
#endif

#if __GNUC__ <= 2 && __GNUC_MINOR__ <= 7
/* Basically, assume this is a really of version of Linux -- ie "gomer" */
#define AUG_NO_PTHREADS
#endif

#if defined(__GNUC__)
#define AUG_CONFIGURATION	"Linux with GCC"
#endif

typedef unsigned int augUInt32;

#endif /* linux */

/*
----------------------------------------------------------------------------
----- FreeBSD x86 with GCC -------------------------------------------------
----------------------------------------------------------------------------
*/
#ifdef __FreeBSD__

#define AUG_HAS_LPR
#define AUG_HAS_RANDOM
#define AUG_HAS_PSAX
#define AUG_HAS_PREAD
#define AUG_NO_CRYPT_H
#define AUG_NO_TERMIO_H
#define AUG_NO_DB

/*  FreeBSD lacks these error codes.  */
#define ENODATA	ENOBUFS
#define EUNATCH	ENOPROTOOPT
#ifndef EPROTO
#define EPROTO	EPROTOTYPE
#endif

/*  FreeBSD lacks these termios codes.  */
#define TCGETS	TIOCGETA
#define TCSETS	TIOCSETA
#define TCGETA	TIOCGETA
#define TCSETA	TIOCSETA
#define TCSETSW	TIOCSETAW
#define TCFLSH	TIOCFLUSH
#define termio termios

#define AUG_CONFIGURATION      "FreeBSD"

typedef unsigned int augUInt32;

#endif /* freebsd */

/*
----------------------------------------------------------------------------
----- HP-UX pa-risc with HP C ----------------------------------------------
----------------------------------------------------------------------------
*/

#ifdef __hpux

#define AUG_BAD_FD_SET			/* Not even fixed in HP-UX 10.x */
#define AUG_HAS_LP
#define AUG_HAS_LP_REQUEST
#define AUG_HAS_RAND48
#define AUG_HAS_SINCOS

#if !defined(__GNUC__)
#define AUG_CONFIGURATION	"HP-UX pa-risc with HP C"
#endif

typedef unsigned int augUInt32;

#endif /* hpux */

/*
----------------------------------------------------------------------------
----- AIX Configuration with xlC -------------------------------------------
----------------------------------------------------------------------------
*/

#ifdef _AIX

#define AUG_HAS_LP
#define AUG_HAS_LP_REQUEST
#define AUG_HAS_SELECT_H
#define AUG_HAS_RAND48
#define AUG_NO_CRYPT_H

#if !defined(__GNUC__)
#define AUG_CONFIGURATION       "AIX Configuration with xlC"
#endif

typedef unsigned int augUInt32;

#endif /* _AIX */

/*
----------------------------------------------------------------------------
----- Sun IUS with GCC (formerly Interactive Unix) -----------------------
----------------------------------------------------------------------------
*/

/*
**  This is only sufficient to build a basic libaug.a so selected
**  utilities can be ported with relative ease.
**
**  None of the folio stuff builds (no unix domain sockets), so when
**  collecting a fresh copy of $AUG/libaug, run "rm -f *fol*".
*/
#ifndef _AIX /* xlC can't handle these expressions */
#if #system(svr3) && #cpu(i386)

#define AUG_HAS_LP
#define AUG_HAS_RAND48
#define AUG_NO_CRYPT_H
#define AUG_CONFIGURATION	"Sun IUS x86 with GCC"

typedef unsigned int augUInt32;

#include <sys/bsdtypes.h>

#endif /* IUS */
#endif /* ! _AIX */

/*
----------------------------------------------------------------------------
*/

#ifndef AUG_CONFIGURATION
#error "os/cpu/compiler combination not configured in $Source: /cvsroot/openser/sip-server/modules/postgres/aug_sysdep.h,v $ $Revision: 1.5 $"
#endif

#endif /* AUG_SYSDEP_H */