File: compiler.h

package info (click to toggle)
moc 1%3A2.6.0~svn-r3005-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 2,656 kB
  • sloc: ansic: 31,749; sh: 929; cpp: 487; makefile: 240
file content (44 lines) | stat: -rw-r--r-- 1,350 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*
 * The purpose of this header is to configure the compiler and system
 * headers the way we want them to be.  It should be included in every
 * source code file *before* any system headers are included, and thus
 * an include for it is automatically appended to the 'config.h' header
 * by 'configure'.
 *
 * It is also included by 'configure' tests to ensure that any system
 * headers *they* include will be configured consistantly and symbols
 * they declare will not be exposed differently in the tests and the
 * code thus causing the configuration macros defined in 'config.h'
 * to be mismatched with the included system headers.
 *
 * Because it is used in both places, it should not include any code
 * which is relevant only to MOC code.
 */

#ifndef COMPILER_H
#define COMPILER_H

/* _XOPEN_SOURCE is known to break compilation on OpenBSD. */
#ifndef OPENBSD
# if defined(_XOPEN_SOURCE) && _XOPEN_SOURCE < 600
#  undef _XOPEN_SOURCE
# endif
# ifndef _XOPEN_SOURCE
#  define _XOPEN_SOURCE 600
# endif
#endif

/* _XOPEN_SOURCE_EXTENDED is known to break compilation on FreeBSD. */
#ifndef FREEBSD
# define _XOPEN_SOURCE_EXTENDED 1
#endif

/* Require POSIX.1-2001 or better. */
#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE < 200112L
# undef _POSIX_C_SOURCE
#endif
#ifndef _POSIX_C_SOURCE
# define _POSIX_C_SOURCE 200112L
#endif

#endif