]> sjero.net Git - wget/blob - src/config-post.h
[svn] Remove K&R support.
[wget] / src / config-post.h
1 /* Some autoconf-unrelated preprocessor magic that needs to be done
2    before including the system includes and therefore cannot belong in
3    sysdep.h.  This file is included at the bottom of config.h.  */
4
5 /* Alloca-related defines, straight out of the Autoconf manual. */
6
7 /* AIX requires this to be the first thing in the file.  */
8 #ifndef __GNUC__
9 # if HAVE_ALLOCA_H
10 #  include <alloca.h>
11 # else
12 #  ifdef _AIX
13  #pragma alloca
14 #  else
15 #   ifndef alloca /* predefined by HP cc +Olibcalls */
16 void *alloca ();
17 #   endif
18 #  endif
19 # endif
20 #endif
21
22 #ifdef __sun
23 # ifdef __SVR4
24 #  define solaris
25 # endif
26 #endif
27
28 /* The "namespace tweaks" below attempt to set a friendly "compilation
29    environment" under popular operating systems.  Default compilation
30    environment often means that some functions that are "extensions"
31    are not declared -- `strptime' is one example.
32
33    But non-default environments can expose bugs in the system header
34    files, crippling compilation in _very_ non-obvious ways.  Because
35    of that, we define them only on well-tested architectures where we
36    know they will work.  */
37
38 #undef NAMESPACE_TWEAKS
39
40 #ifdef solaris
41 # define NAMESPACE_TWEAKS
42 #endif
43
44 #ifdef __linux__
45 # define NAMESPACE_TWEAKS
46 #endif
47
48 #ifdef NAMESPACE_TWEAKS
49
50 /* Request the "Unix 98 compilation environment". */
51 #define _XOPEN_SOURCE 500
52
53 /* For Solaris: request everything else that is available and doesn't
54    conflict with the above.  */
55 #define __EXTENSIONS__
56
57 /* For Linux: request features of 4.3BSD and SVID (System V Interface
58    Definition). */
59 #define _SVID_SOURCE
60 #define _BSD_SOURCE
61
62 #endif /* NAMESPACE_TWEAKS */