Use an include file in configure.ac's AH_BOTTOM
[bpt/emacs.git] / src / conf_post.h
CommitLineData
b429a4ee
GM
1/* conf_post.h --- configure.ac includes this via AH_BOTTOM
2
3Copyright (C) 1988, 1993-1994, 1999-2002, 2004-2012
4 Free Software Foundation, Inc.
5
6This file is part of GNU Emacs.
7
8GNU Emacs is free software: you can redistribute it and/or modify
9it under the terms of the GNU General Public License as published by
10the Free Software Foundation, either version 3 of the License, or
11(at your option) any later version.
12
13GNU Emacs is distributed in the hope that it will be useful,
14but WITHOUT ANY WARRANTY; without even the implied warranty of
15MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16GNU General Public License for more details.
17
18You should have received a copy of the GNU General Public License
19along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
20
21/* Commentary:
22
23 Rather than writing this code directly in AH_BOTTOM, we include it
24 via this file. This is so that it does not get processed by
25 autoheader. Eg, any undefs here would otherwise be commented out.
26*/
27
28/* Code: */
29
30/* On AIX 3 this must be included before any other include file. */
31#include <alloca.h>
32#if ! HAVE_ALLOCA
33# error "alloca not available on this machine"
34#endif
35
36#ifdef SIGNAL_H_AHB
37#undef SIGNAL_H_AHB
38#include <signal.h>
39#endif
40
41/* This silences a few compilation warnings on FreeBSD. */
42#ifdef BSD_SYSTEM_AHB
43#undef BSD_SYSTEM_AHB
44#undef BSD_SYSTEM
45#if __FreeBSD__ == 1
46#define BSD_SYSTEM 199103
47#elif __FreeBSD__ == 2
48#define BSD_SYSTEM 199306
49#elif __FreeBSD__ >= 3
50#define BSD_SYSTEM 199506
51#endif
52#endif
53
54/* Define AMPERSAND_FULL_NAME if you use the convention
55 that & in the full name stands for the login id. */
56/* Turned on June 1996 supposing nobody will mind it. */
57#define AMPERSAND_FULL_NAME
58
59/* `subprocesses' should be defined if you want to
60 have code for asynchronous subprocesses
61 (as used in M-x compile and M-x shell).
62 Only MSDOS does not support this (it overrides
63 this in its config_opsysfile below). */
64
65#define subprocesses
66
67/* Include the os dependent file. */
68#ifdef config_opsysfile
69# include config_opsysfile
70#endif
71
72/* Mac OS X / GNUstep need a bit more pure memory. Of the existing knobs,
73 SYSTEM_PURESIZE_EXTRA seems like the least likely to cause problems. */
74#ifdef HAVE_NS
75#if defined NS_IMPL_GNUSTEP
76# define SYSTEM_PURESIZE_EXTRA 30000
77#elif defined DARWIN_OS
78# define SYSTEM_PURESIZE_EXTRA 200000
79#endif
80#endif
81
82#ifdef emacs /* Don't do this for lib-src. */
83/* Tell regex.c to use a type compatible with Emacs. */
84#define RE_TRANSLATE_TYPE Lisp_Object
85#define RE_TRANSLATE(TBL, C) CHAR_TABLE_TRANSLATE (TBL, C)
86#ifdef make_number
87/* If make_number is a macro, use it. */
88#define RE_TRANSLATE_P(TBL) (!EQ (TBL, make_number (0)))
89#else
90/* If make_number is a function, avoid it. */
91#define RE_TRANSLATE_P(TBL) (!(INTEGERP (TBL) && XINT (TBL) == 0))
92#endif
93#endif
94
95#include <string.h>
96#include <stdlib.h>
97
98#if __GNUC__ >= 3 /* On GCC 3.0 we might get a warning. */
99#define NO_INLINE __attribute__((noinline))
100#else
101#define NO_INLINE
102#endif
103
104#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1))
105#define EXTERNALLY_VISIBLE __attribute__((externally_visible))
106#else
107#define EXTERNALLY_VISIBLE
108#endif
109
110#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
111# define ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec))
112#else
113# define ATTRIBUTE_FORMAT(spec) /* empty */
114#endif
115
116#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)
117# define ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \
118 ATTRIBUTE_FORMAT ((__gnu_printf__, formatstring_parameter, first_argument))
119#else
120# define ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \
121 ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument))
122#endif
123
124#define ATTRIBUTE_CONST _GL_ATTRIBUTE_CONST
125
126/* Some versions of GNU/Linux define noinline in their headers. */
127#ifdef noinline
128#undef noinline
129#endif
130
131/* conf_post.h ends here */