-
Notifications
You must be signed in to change notification settings - Fork 55
/
Copy pathRESERVED_MACRO_NAMES
84 lines (84 loc) · 3.62 KB
/
RESERVED_MACRO_NAMES
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#-----------------------------------------------------------------------------#
# Copyright (C) 2014 The Mercury team
# This file may only be copied under the terms of the GNU General
# Public License - see the file COPYING in the Mercury distribution.
#-----------------------------------------------------------------------------#
#
# RESERVED_MACRO_NAMES
#
# We want all macros defined by the Mercury header files to start with a prefix
# that indicates their origin, leaving the rest of the namespace available
# to users to use as they wish. However, we do have to define some macros
# that do not conform to this naming scheme. This file, and the other files
# of the same name in the lower directories that contain C header files
# list all these exceptions. The purpose of this is to enable the
# Mmakefile target `check_headers' in each of those directories
# to check whether we have accidentally defined any other macros that
# encroach on users' namespace.
#
# This file, and the other files with the same name, are used as arguments
# to `fgrep -f'. Lines starting with `#' will not match anything in the input,
# and can thus be used as comments. Other lines are treated as strings
# to match against.
#
# This file contains the namespace-unclean macros that are defined
# in all of the directories that have hand-written .h files.
#
# Any macros that are *not* defined in all those directories should be listed
# in the RESERVED_MACRO_NAMES file in the relevant directory or directories.
#
#-----------------------------------------------------------------------------#
# This is documented in the Mercury language reference manual
# and defined by mercury_types.h.
SUCCESS_INDICATOR
#-----------------------------------------------------------------------------#
# pid_t is only defined in mercury_conf.h if it is not present
# in the system headers. I don't think there is a nice way to
# prefix this without requiring a later version of autoconf (e.g. 2.52).
pid_t
#-----------------------------------------------------------------------------#
# These are defined by boehm_gc/gc.h.
__GC
_GC_H
HIDE_POINTER
REVEAL_POINTER
#-----------------------------------------------------------------------------#
# These are defined by boehm_gc/include/gc_pthread_redirects.h
dlopen
pthread_create
pthread_detach
pthread_join
pthread_sigmask
#-----------------------------------------------------------------------------#
# This is defined by the mgnuc script in some grades.
# It is used for configuring the Boehm collector.
# XXX it should have a GC_ prefix.
NO_SIGNALS
#-----------------------------------------------------------------------------#
# These are defined automatically by GCC -- gcc optionally passes them
# on the command line when calling cc1, depending on the exact options
# that gcc was invoked with. These are not namespace pollution, since they are
# in the _[A-Z]* namespace which is reserved for the C implementation,
# and they *are* being defined by the C implementation.
_GNU_SOURCE
_FORTIFY_SOURCE
__EXTENSIONS__
__OPTIMIZE__
__STRICT_ANSI__
__GCC_HAVE_DWARF2_CFI_ASM
__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1
__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2
__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4
__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8
__i686
__i686__
__pentiumpro
__pentiumpro__
#-----------------------------------------------------------------------------#
# These are defined in when threads are enabled.
_REENTRANT
_THREAD_SAFE
#-----------------------------------------------------------------------------#
# This is defined on MinGW64 to workaround limitations in the Windows libc.
__USE_MINGW_ANSI_STDIO
#-----------------------------------------------------------------------------#