Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 71 lines (61 sloc) 1.462 kB
b8a95da @andigutmans - Centralize some configuration stuff
andigutmans authored
1 #ifndef TSRM_CONFIG_COMMON_H
2 #define TSRM_CONFIG_COMMON_H
3
13149b0 @tony2001 fix Cygwin build
tony2001 authored
4 #ifndef __CYGWIN__
5 # if WINNT|WIN32
6 # define TSRM_WIN32
7 # endif
b8a95da @andigutmans - Centralize some configuration stuff
andigutmans authored
8 #endif
9
c61598f Changes to build TSRM on NetWare
Venkat Raghavan S authored
10 #ifdef TSRM_WIN32
11 # include "tsrm_config.w32.h"
12 #else
2d521a7 Revert bad fix
foobar authored
13 # include <tsrm_config.h>
fe434a0 @andigutmans - Fix crash bug on NetBSD and OpenBSD. MAXPATHLEN didn't get defined
andigutmans authored
14 # include <sys/param.h>
b8a95da @andigutmans - Centralize some configuration stuff
andigutmans authored
15 #endif
16
b03d1d6 Fix missing header warnings (alloca.h) on Sun Os & Tru64.
Ilia Alshanetsky authored
17 #if HAVE_ALLOCA_H && !defined(_ALLOCA_H)
18 # include <alloca.h>
19 #endif
20
9b81440 This was needed afterall. Without this Apache segfaulted when accessi…
foobar authored
21 /* AIX requires this to be the first thing in the file. */
22 #ifndef __GNUC__
b03d1d6 Fix missing header warnings (alloca.h) on Sun Os & Tru64.
Ilia Alshanetsky authored
23 # ifndef HAVE_ALLOCA_H
9b81440 This was needed afterall. Without this Apache segfaulted when accessi…
foobar authored
24 # ifdef _AIX
28447d6 - Fixed bug #25240 (spaces before pre-processor directives)
foobar authored
25 #pragma alloca
9b81440 This was needed afterall. Without this Apache segfaulted when accessi…
foobar authored
26 # else
27 # ifndef alloca /* predefined by HP cc +Olibcalls */
60ffd0e Restore HEAD of TSRM to what it was two days ago.
Sebastian Bergmann authored
28 # ifndef NETWARE
9b81440 This was needed afterall. Without this Apache segfaulted when accessi…
foobar authored
29 char *alloca ();
60ffd0e Restore HEAD of TSRM to what it was two days ago.
Sebastian Bergmann authored
30 # endif
9b81440 This was needed afterall. Without this Apache segfaulted when accessi…
foobar authored
31 # endif
32 # endif
33 # endif
fe434a0 @andigutmans - Fix crash bug on NetBSD and OpenBSD. MAXPATHLEN didn't get defined
andigutmans authored
34 #endif
35
36 #if HAVE_UNISTD_H
37 #include <unistd.h>
38 #endif
39
40 #if HAVE_LIMITS_H
41 #include <limits.h>
42 #endif
43
44 #ifndef MAXPATHLEN
45 # ifdef PATH_MAX
46 # define MAXPATHLEN PATH_MAX
ec58b74 MFB51: Fixed bug #31347 (is_dir and is_file (incorrectly) return true…
Ilia Alshanetsky authored
47 # elif defined(MAX_PATH)
48 # define MAXPATHLEN MAX_PATH
fe434a0 @andigutmans - Fix crash bug on NetBSD and OpenBSD. MAXPATHLEN didn't get defined
andigutmans authored
49 # else
50 # define MAXPATHLEN 256
51 # endif
52 #endif
53
b8a95da @andigutmans - Centralize some configuration stuff
andigutmans authored
54 #if (HAVE_ALLOCA || (defined (__GNUC__) && __GNUC__ >= 2))
47dc82e Fixed bug #43128 (Very long class name causes segfault)
Dmitry Stogov authored
55 # define TSRM_ALLOCA_MAX_SIZE 4096
56 # define TSRM_ALLOCA_FLAG(name) \
57 int name;
58 # define tsrm_do_alloca_ex(size, limit, use_heap) \
59 ((use_heap = ((size) > (limit))) ? malloc(size) : alloca(size))
60 # define tsrm_do_alloca(size, use_heap) \
61 tsrm_do_alloca_ex(size, TSRM_ALLOCA_MAX_SIZE, use_heap)
62 # define tsrm_free_alloca(p, use_heap) \
63 do { if (use_heap) free(p); } while (0)
b8a95da @andigutmans - Centralize some configuration stuff
andigutmans authored
64 #else
47dc82e Fixed bug #43128 (Very long class name causes segfault)
Dmitry Stogov authored
65 # define TSRM_ALLOCA_FLAG(name)
cfd4989 Fixed definitions
Dmitry Stogov authored
66 # define tsrm_do_alloca(p, use_heap) malloc(p)
67 # define tsrm_free_alloca(p, use_heap) free(p)
b8a95da @andigutmans - Centralize some configuration stuff
andigutmans authored
68 #endif
69
70 #endif /* TSRM_CONFIG_COMMON_H */
Something went wrong with that request. Please try again.