1 /* $Id: defines.h 6124 2003-01-14 06:03:29Z rra $
3 ** Portable defines used by other INN header files.
5 ** In order to make the libraries built by INN usable by other software,
6 ** INN needs to install several header files. Installing autoconf-
7 ** generated header files, however, is a bad idea, since the defines will
8 ** conflict with other software that uses autoconf.
10 ** This header contains common definitions, such as internal typedefs and
11 ** macros, common to INN's header files but not based on autoconf probes.
12 ** As such, it's limited in what it can do; if compiling software against
13 ** INN's header files on a system not supporting basic ANSI C features
14 ** (such as const) or standard types (like size_t), the software may need
15 ** to duplicate the tests that INN itself performs, generate a config.h,
16 ** and make sure that config.h is included before any INN header files.
20 #define INN_DEFINES_H 1
22 #include <inn/system.h>
24 /* BEGIN_DECLS is used at the beginning of declarations so that C++
25 compilers don't mangle their names. END_DECLS is used at the end. */
29 # define BEGIN_DECLS extern "C" {
32 # define BEGIN_DECLS /* empty */
33 # define END_DECLS /* empty */
36 /* __attribute__ is available in gcc 2.5 and later, but only with gcc 2.7
37 could you use the __format__ form of the attributes, which is what we use
38 (to avoid confusion with other macros). */
40 # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
41 # define __attribute__(spec) /* empty */
45 /* Used for unused parameters to silence gcc warnings. */
46 #define UNUSED __attribute__((__unused__))
48 /* Make available the bool type. */
49 #if INN_HAVE_STDBOOL_H
59 #endif /* INN_HAVE_STDBOOL_H */
61 /* Tell Perl that we have a bool type. */
66 #endif /* !INN_DEFINES_H */