1 Here are some of the cpp macros used, together with some short explanation
2 of their use. Feel free to add more macros and more categories.
3 Most of these are from config.in, so it's probably better to put the
4 explanations in that file. Ideally, everything would be defined and
5 documented in config.in, and this file would not be necessary.
8 ** Distinguishing OSes **
12 CYGWIN Compiling the Cygwin port.
16 MSDOS Compiling the MS-DOS port.
18 __DJGPP_MINOR__ Minor version number of the DJGPP library; used only in msdos.c and dosfns.c.
19 DOS_NT Compiling for either the MS-DOS or native MS-Windows port.
20 WINDOWSNT Compiling the native MS-Windows (W32) port.
21 __MINGW32__ Compiling the W32 port with the MinGW or MinGW-w64 ports of GCC.
22 MINGW_W64 Compiling the W32 port with the MinGW-w64 port of GCC.
23 DARWIN_OS Compiling on macOS or pure Darwin (and using s/darwin.h).
27 HAIKU Compiling on Haiku.
28 __ANDROID__ Compiling for the Android operating system.
29 __ANDROID_API__ A numerical "API level" indicating the version of
30 Android being compiled for; see http://apilevels.com.
32 ** Distinguishing GUIs **
34 HAVE_NTGUI Use the native W32 GUI for windows, frames, menus&scrollbars.
35 HAVE_NS Use the NeXT/OpenStep/Cocoa UI under macOS or GNUstep.
36 NS_IMPL_GNUSTEP Compile support for GNUstep implementation of NS GUI API.
37 NS_IMPL_COCOA Compile support for Cocoa (Apple) implementation of NS GUI API.
38 HAVE_X11 Compile support for the X11 GUI.
39 HAVE_PGTK Compile support for using GTK itself without directly using X Windows APIs.
40 HAVE_HAIKU Compile support for the Haiku window system.
41 HAVE_X_WINDOWS Compile support for X Window system. Equivalent to HAVE_X11.
42 HAVE_ANDROID Compiling the Android GUI interface. Enough of this
43 code is compiled for the build machine cross-compiling
44 the Android port to produce an Emacs binary that can
45 run Lisp code in batch mode, for the purpose of running
47 ANDROID_STUBIFY The Android GUI interface is being compiled for the build
50 ** X Windows features **
51 HAVE_X11R6 Whether or not the system has X11R6. (Always defined.)
52 HAVE_X11R6_XIM Whether or not the system supports XIM features introduced in R6.
53 HAVE_X11XTR6 Whether or not the Xt is from X11R6 or newer.
55 USE_LUCID Use the Lucid toolkit for menus&scrollbars. Requires HAVE_X11.
56 USE_MOTIF Use the Motif toolkit for menus&scrollbars. Requires HAVE_X11.
57 USE_GTK Use the Gtk toolkit for menus&scrollbars. Requires HAVE_X11 or HAVE_PGTK.
58 HAVE_GTK3 Use GTK version 3 or later. Requires HAVE_X11.
60 HAVE_XCB_SHAPE Whether or not XCB supports the Nonrectangular Window Shape extension.
61 HAVE_XCOMPOSITE Whether or not the XCOMPOSITE extension library is present.
62 HAVE_XDBE Whether or not to use the Xdbe extension for double buffering.
63 HAVE_XFIXES Whether or not the Xfixes extension library is present.
64 HAVE_XINERAMA Whether or not the Xinerama extension library is present.
65 HAVE_XINPUT2 Whether or not to use version 2 of the X Input Extension for input.
66 HAVE_XINPUT2_1 Whether or not version 2.1 of the X Input Extension is supported.
67 HAVE_XINPUT2_2 Whether or not version 2.2 of the X Input Extension is supported.
68 HAVE_XINPUT2_3 Whether or not version 2.3 of the X Input Extension is supported.
69 HAVE_XINPUT2_4 Whether or not version 2.4 of the X Input Extension is supported.
70 HAVE_XKB Whether or not the XKB extension library is present.
71 HAVE_XRANDR Whether or not the RandR extension library is present.
72 HAVE_XSHAPE Whether or not the Nonrectangular Window Shape extension library is present.
73 HAVE_XSYNC Whether or not the X Synchronization Extension library is present.
74 USE_XCB Whether or not the XCB library is used to optimize some X requests.
78 FRAME_TERMCAP_P A tty (character terminal) frame.
79 FRAME_X_P A frame on X Window system.
80 FRAME_MSDOS_P An MS-DOS frame (used only by the DOS port).
81 FRAME_W32_P A frame using native MS-Windows GUI.
82 FRAME_WINDOW_P A GUI frame (like X, w32, etc.)
84 ** Support for accessing other processes on the system **
86 HAVE_PROCFS The /proc filesystem is supported.
88 ** Compile-time options **
90 REL_ALLOC Compile in the relocatable memory allocator ralloc.c.
91 SYSTEM_MALLOC Use the system library's malloc.
92 subprocesses System can use subprocesses (for M-x shell for example).
93 Defined by default, only MSDOS undefines it.
94 DEBUG_LISP_OBJECT_TYPE Define it in lisp.h enable compile time checks
97 ** System specific macros
106 USER_FULL_NAME If defined, overrides the default pw->pw_gecos for
107 getting at the full user name. Only MSDOS overrides the default.
109 ** Miscellaneous defines. Some of these might not be used in the code
110 anymore, so they can be removed.
113 BROKEN_DATAGRAM_SOCKETS
114 BROKEN_GET_CURRENT_DIR_NAME
115 BROKEN_PTY_READ_AFTER_EAGAIN
125 GC_MARK_SECONDARY_STACK
139 HAVE_DBUS_TYPE_IS_VALID
140 HAVE_DBUS_VALIDATE_BUS_NAME
141 HAVE_DBUS_VALIDATE_INTERFACE
142 HAVE_DBUS_VALIDATE_MEMBER
143 HAVE_DBUS_VALIDATE_PATH
144 HAVE_DBUS_WATCH_GET_UNIX_FD
145 HAVE_DECL_LOCALTIME_R
171 HAVE_GETOPT_LONG_ONLY
179 HAVE_GET_CURRENT_DIR_NAME
187 HAVE_GTK_FILE_SELECTION_NEW
188 HAVE_GTK_WINDOW_SET_HAS_RESIZE_GRIP
193 HAVE_KERBEROSIV_KRB_H
195 HAVE_KRB5_ERROR_E_TEXT
199 HAVE_LANGINFO_CODESET
214 HAVE_MACHINE_SOUNDCARD_H
216 HAVE_MAGICKEXPORTIMAGEPIXELS
217 HAVE_MAGICKMERGEIMAGELAYERS
225 HAVE_MULTILINGUAL_MENU
229 HAVE_OTF_GET_VARIATION_GLYPHS
230 HAVE_PERSONALITY_ADDR_NO_RANDOMIZE
235 HAVE_PSTAT_GETDYNAMIC
256 HAVE_SIGNED_${GLTYPE}
257 HAVE_SIGNED_SIG_ATOMIC_T
274 HAVE_STRUCT_ERA_ENTRY
275 HAVE_STRUCT_IFREQ_IFR_ADDR
276 HAVE_STRUCT_IFREQ_IFR_ADDR_SA_LEN
277 HAVE_STRUCT_IFREQ_IFR_BROADADDR
278 HAVE_STRUCT_IFREQ_IFR_FLAGS
279 HAVE_STRUCT_IFREQ_IFR_HWADDR
280 HAVE_STRUCT_IFREQ_IFR_NETMASK
281 HAVE_STRUCT_NLIST_N_UN_N_NAME
282 HAVE_STRUCT_STAT_ST_ATIMENSEC
283 HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC
284 HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC
285 HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC
286 HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC
287 HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC
288 HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC
289 HAVE_STRUCT_TM_TM_ZONE
302 HAVE_SYS_SYSTEMINFO_H
335 HAVE_XSCREENNUMBEROFSCREEN
336 HAVE_XSCREENRESOURCESTRING
340 HAVE___BUILTIN_UNWIND_INIT
341 HAVE___EXECUTABLE_START
362 SIGNALS_VIA_CHARACTERS
364 SYSTEM_PURESIZE_EXTRA
372 USE_TOOLKIT_SCROLL_BARS
420 srandom (conf_post.h may undo)
471 execvp (also emacsclient.c [WINDOWSNT])
506 wait (also movemail.c [WINDOWSNT])