]> sjero.net Git - wget/blob - src/config-post.h
[svn] Restructure generation of HTTP requests. Allow headers specified with
[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 char *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 # ifdef __GNUC__
43 /* Prevent stdio.h from declaring va_list and thus tripping gcc's
44    stdarg.h. */
45 #  define _VA_LIST
46 # endif
47 #endif
48
49 #ifdef __linux__
50 # define NAMESPACE_TWEAKS
51 #endif
52
53 #ifdef NAMESPACE_TWEAKS
54
55 /* Request the "Unix 98 compilation environment". */
56 #define _XOPEN_SOURCE 500
57
58 /* For Solaris: request everything else that is available and doesn't
59    conflict with the above.  */
60 #define __EXTENSIONS__
61
62 /* For Linux: request features of 4.3BSD and SVID (System V Interface
63    Definition). */
64 #define _SVID_SOURCE
65 #define _BSD_SOURCE
66
67 #endif /* NAMESPACE_TWEAKS */
68
69 /* Determine whether to use stdarg.  Use it only if the compiler
70    supports ANSI C and stdarg.h is present.  We check for both because
71    there are configurations where stdarg.h exists, but doesn't work.
72    This check cannot be in sysdep.h because we use it to choose which
73    system headers to include.  */
74 #ifndef WGET_USE_STDARG
75 # ifdef __STDC__
76 #  ifdef HAVE_STDARG_H
77 #   define WGET_USE_STDARG
78 #  endif
79 # endif
80 #endif /* not WGET_USE_STDARG */