Merge from origin/emacs-29
[emacs.git] / admin / CPP-DEFINES
blobc07fdc487ee40d6869dda42a32bd0b5c630b6283
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 **
10 AIX
11 _AIX
12 CYGWIN          Compiling the Cygwin port.
13 __CYGWIN__      Ditto
14 GNU_LINUX
15 HPUX
16 MSDOS           Compiling the MS-DOS port.
17 __MSDOS__       Ditto.
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).
24 SOLARIS2
25 USG
26 USG5_4
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
46                 the byte-compiler.
47 ANDROID_STUBIFY The Android GUI interface is being compiled for the build
48                 machine, as above.
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.
76 ** Frame types **
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
95                        on Lisp_Object use.
97 ** System specific macros
98 FIRST_PTY_LETTER
99 HAVE_PTYS
100 INTERRUPT_INPUT
101 NARROWPROTO
102 SEPCHAR
103 SYSTEM_TYPE
105 ** Misc 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.
112 AMPERSAND_FULL_NAME
113 BROKEN_DATAGRAM_SOCKETS
114 BROKEN_GET_CURRENT_DIR_NAME
115 BROKEN_PTY_READ_AFTER_EAGAIN
116 DEFAULT_SOUND_DEVICE
117 DEVICE_SEP
118 DIRECTORY_SEP
119 DONT_REOPEN_PTY
120 DOUG_LEA_MALLOC
121 EMACS_CONFIGURATION
122 EMACS_CONFIG_OPTIONS
123 EMACS_INT
124 EMACS_UINT
125 GC_MARK_SECONDARY_STACK
126 GC_SETJMP_WORKS
127 GNU_MALLOC
128 HAVE_ALLOCA
129 HAVE_ALLOCA_H
130 HAVE_ALSA
131 HAVE_BDFFONT
132 HAVE_CFMAKERAW
133 HAVE_CFSETSPEED
134 HAVE_CLOCK_GETTIME
135 HAVE_CLOCK_SETTIME
136 HAVE_COFF_H
137 HAVE_COM_ERR_H
138 HAVE_DBUS
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
146 HAVE_DECL_STRMODE
147 HAVE_DECL_STRTOIMAX
148 HAVE_DECL_STRTOLL
149 HAVE_DECL_STRTOULL
150 HAVE_DECL_STRTOUMAX
151 HAVE_DECL_TZNAME
152 HAVE_DIALOGS
153 HAVE_ENDGRENT
154 HAVE_ENDPWENT
155 HAVE_ENVIRON_DECL
156 HAVE_EUIDACCESS
157 HAVE_FORK
158 HAVE_FREEIFADDRS
159 HAVE_FREETYPE
160 HAVE_FSEEKO
161 HAVE_FUTIMENS
162 HAVE_FUTIMES
163 HAVE_FUTIMESAT
164 HAVE_GAI_STRERROR
165 HAVE_GCONF
166 HAVE_GETGRENT
167 HAVE_GETHOSTNAME
168 HAVE_GETIFADDRS
169 HAVE_GETLOADAVG
170 HAVE_GETOPT_H
171 HAVE_GETOPT_LONG_ONLY
172 HAVE_GETPAGESIZE
173 HAVE_GETPT
174 HAVE_GETPWENT
175 HAVE_GETRLIMIT
176 HAVE_GETRUSAGE
177 HAVE_GETSOCKNAME
178 HAVE_GETTIMEOFDAY
179 HAVE_GET_CURRENT_DIR_NAME
180 HAVE_GHOSTSCRIPT
181 HAVE_GIF
182 HAVE_GNUTLS
183 HAVE_GPM
184 HAVE_GRANTPT
185 HAVE_GSETTINGS
186 HAVE_GTK3
187 HAVE_GTK_FILE_SELECTION_NEW
188 HAVE_GTK_WINDOW_SET_HAS_RESIZE_GRIP
189 HAVE_IFADDRS_H
190 HAVE_IMAGEMAGICK
191 HAVE_INTTYPES_H
192 HAVE_JPEG
193 HAVE_KERBEROSIV_KRB_H
194 HAVE_KERBEROS_KRB_H
195 HAVE_KRB5_ERROR_E_TEXT
196 HAVE_KRB5_ERROR_TEXT
197 HAVE_KRB5_H
198 HAVE_KRB_H
199 HAVE_LANGINFO_CODESET
200 HAVE_LIBDGC
201 HAVE_LIBKSTAT
202 HAVE_LIBLOCKFILE
203 HAVE_LIBMAIL
204 HAVE_LIBOTF
205 HAVE_LIBPERFSTAT
206 HAVE_LIBSELINUX
207 HAVE_LIBXML2
208 HAVE_LOCALTIME_R
209 HAVE_LOCAL_SOCKETS
210 HAVE_LRAND48
211 HAVE_LSTAT
212 HAVE_LUTIMES
213 HAVE_M17N_FLT
214 HAVE_MACHINE_SOUNDCARD_H
215 HAVE_MACH_MACH_H
216 HAVE_MAGICKEXPORTIMAGEPIXELS
217 HAVE_MAGICKMERGEIMAGELAYERS
218 HAVE_MAILLOCK_H
219 HAVE_MALLOC_MALLOC_H
220 HAVE_MBSTATE_T
221 HAVE_MEMORY_H
222 HAVE_MEMSET
223 HAVE_MKSTEMP
224 HAVE_MMAP
225 HAVE_MULTILINGUAL_MENU
226 HAVE_NET_IF_DL_H
227 HAVE_NET_IF_H
228 HAVE_NLIST_H
229 HAVE_OTF_GET_VARIATION_GLYPHS
230 HAVE_PERSONALITY_ADDR_NO_RANDOMIZE
231 HAVE_PNG
232 HAVE_POSIX_MEMALIGN
233 HAVE_PROCFS
234 HAVE_PSELECT
235 HAVE_PSTAT_GETDYNAMIC
236 HAVE_PTHREAD
237 HAVE_PTHREAD_H
238 HAVE_PTHREAD_SIGMASK
239 HAVE_PTYS
240 HAVE_PTY_H
241 HAVE_PWD_H
242 HAVE_RANDOM
243 HAVE_READLINK
244 HAVE_READLINKAT
245 HAVE_RECVFROM
246 HAVE_RINT
247 HAVE_RSVG
248 HAVE_SELECT
249 HAVE_SENDTO
250 HAVE_SEQPACKET
251 HAVE_SETITIMER
252 HAVE_SETLOCALE
253 HAVE_SETRLIMIT
254 HAVE_SHARED_GAME_DIR
255 HAVE_SHUTDOWN
256 HAVE_SIGNED_${GLTYPE}
257 HAVE_SIGNED_SIG_ATOMIC_T
258 HAVE_SIGNED_WCHAR_T
259 HAVE_SIGNED_WINT_T
260 HAVE_SIGSET_T
261 HAVE_SNPRINTF
262 HAVE_SOCKETS
263 HAVE_SOUND
264 HAVE_SOUNDCARD_H
265 HAVE_STDINT_H
266 HAVE_STDIO_EXT_H
267 HAVE_STDLIB_H
268 HAVE_STRINGS_H
269 HAVE_STRING_H
270 HAVE_STRSIGNAL
271 HAVE_STRTOIMAX
272 HAVE_STRTOLL
273 HAVE_STRTOULL
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
290 HAVE_ST_DM_MODE
291 HAVE_SYMLINK
292 HAVE_SYNC
293 HAVE_SYS_BITYPES_H
294 HAVE_SYS_INTTYPES_H
295 HAVE_SYS_LOADAVG_H
296 HAVE_SYS_PARAM_H
297 HAVE_SYS_RESOURCE_H
298 HAVE_SYS_SELECT_H
299 HAVE_SYS_SOCKET_H
300 HAVE_SYS_SOUNDCARD_H
301 HAVE_SYS_STAT_H
302 HAVE_SYS_SYSTEMINFO_H
303 HAVE_SYS_TIME_H
304 HAVE_SYS_TYPES_H
305 HAVE_SYS_UN_H
306 HAVE_SYS_UTSNAME_H
307 HAVE_SYS_VLIMIT_H
308 HAVE_SYS_WAIT_H
309 HAVE_TERM_H
310 HAVE_TIFF
311 HAVE_TM_GMTOFF
312 HAVE_TM_ZONE
313 HAVE_TOUCHLOCK
314 HAVE_TZNAME
315 HAVE_UTIL_H
316 HAVE_UTIMENSAT
317 HAVE_UTMP_H
318 HAVE_VFORK
319 HAVE_VFORK_H
320 HAVE_WEBP
321 HAVE_SQLITE3
322 HAVE_WCHAR_H
323 HAVE_WCHAR_T
324 HAVE_WINDOW_SYSTEM
325 HAVE_WINSOCK2_H
326 HAVE_WORKING_FORK
327 HAVE_WORKING_UTIMES
328 HAVE_WORKING_VFORK
329 HAVE_WS2TCPIP_H
330 HAVE_XAW3D
331 HAVE_XFT
332 HAVE_XIM
333 HAVE_XPM
334 HAVE_XRMSETDATABASE
335 HAVE_XSCREENNUMBEROFSCREEN
336 HAVE_XSCREENRESOURCESTRING
337 HAVE_X_I18N
338 HAVE_X_SM
339 HAVE_X_WINDOWS
340 HAVE___BUILTIN_UNWIND_INIT
341 HAVE___EXECUTABLE_START
342 INTERNAL_TERMINAL
343 IS_ANY_SEP
344 IS_DIRECTORY_SEP
345 MAIL_USE_FLOCK
346 MAIL_USE_LOCKF
347 MAIL_USE_POP
348 MAIL_USE_SYSTEM_LOCK
349 MAXPATHLEN
350 NLIST_STRUCT
351 NSIG
352 NSIG_MINIMUM
353 NULL_DEVICE
354 PAGESIZE
355 PTY_ITERATION
356 PTY_NAME_SPRINTF
357 PTY_OPEN
358 PTY_TTY_NAME_SPRINTF
359 PURESIZE
360 RUN_TIME_REMAP
361 SETUP_SLAVE_PTY
362 SIGNALS_VIA_CHARACTERS
363 STDC_HEADERS
364 SYSTEM_PURESIZE_EXTRA
365 SYSTEM_MALLOC
366 TAB3
367 TABDLY
368 TERM
369 TIOCSIGSEND
370 TM_IN_SYS_TIME
371 UNIX98_PTYS
372 USE_TOOLKIT_SCROLL_BARS
373 USG_SUBTTY_WORKS
374 VALBITS
375 XOS_NEEDS_TIME_H
376 _FILE_OFFSET_BITS
377 _LP64
378 _longjmp
379 _setjmp
380 abort
381 alloca
382 close
383 emacs
384 free
385 gmtime
386 localtime
387 malloc
388 random
389 read
390 realloc
391 select
392 umask
393 vfork
396 src/sysdep.c:
397 write
399 src/syssignal.h:
400 signal
401 sigmask
402 sigsetmask
405 lib/dup2.c:
406 dup2
408 lib/signal.h:
409 signal
411 lib/stdio.h:
412 fdopen
413 fopen
414 fwrite
415 popen
416 rename
418 lib/stdlib.h:
419 calloc
420 srandom     (conf_post.h may undo)
422 lib/strftime.c:
423 tzname
424 tzset
426 lib/sys/stat.h:
427 mkdir
429 lib/unistd.h:
430 chown
432 dup2
433 ftruncate
434 isatty
435 link
436 lseek
437 pipe
438 rmdir
439 sleep
440 unlink
443 MS DOS stuff:
445 _NAIVE_DOS_REGS
448 MS stuff:
450 USE_CRT_DLL
452 ms-w32.h:
453 DebPrint
454 EMACSDEBUG
455 MUST_UNDEF__STDC__
457 _VARARGS_
458 _WINSOCKAPI_
459 _WINSOCK_H
461 access
462 calloc
463 chdir
464 chmod
465 chown
466 creat
467 ctime
469 dup2
470 execlp
471 execvp  (also emacsclient.c [WINDOWSNT])
472 fdopen
473 fileno
474 fopen
475 fsync
476 ftruncate
477 getdefdir
478 getdisk
479 getpid
480 isatty
481 kill
482 link
483 lseek
484 mkdir
485 mktemp
486 open
487 pclose
488 pipe
489 popen
490 rename
491 rmdir
492 signal
493 sleep
494 spawnve
495 strdup
496 stricmp
497 strnicmp
498 strupr
499 sys_nerr
500 tzname
501 tzset
502 umask
503 unlink
504 utimbuf
505 utime
506 wait  (also movemail.c [WINDOWSNT])
507 write
509 lib-src/ntlib:
510 access
511 chdir
512 chmod
513 creat
515 dup2
516 execlp
517 execvp
518 fdopen
519 fileno
520 fopen
521 getpid
522 index
523 isatty
524 lseek
525 mkdir
526 mktemp
527 open
528 pclose
529 pipe
530 popen
531 rmdir
532 rindex
533 sleep
534 umask
535 unlink
536 utime