CPP-DEFINES 7.69 KB
Newer Older
Stefan Monnier's avatar
Stefan Monnier committed
1 2 3 4 5
Here are some of the cpp macros used, together with some short explanation
of their use.  Feel free to add more macros and more categories.

** Distinguishing OSes **

Stefan Monnier's avatar
Stefan Monnier committed
6
MAC_OS		Compiling for the `mac' window-system.
Dan Nicolaescu's avatar
Dan Nicolaescu committed
7
MAC_OS8		Compiling for Mac OS Classic (v8 or v9). No longer supported, all code using it can be removed.
Stefan Monnier's avatar
Stefan Monnier committed
8
MAC_OSX		Compiling for Mac OS X.  Not bare Darwin.
Stefan Monnier's avatar
Stefan Monnier committed
9
CYGWIN		Compiling the Cygwin port.
Eli Zaretskii's avatar
Eli Zaretskii committed
10 11 12 13 14 15 16 17 18 19
__CYGWIN__	Ditto
MSDOS		Compiling the MS-DOS port.
__MSDOS__	Ditto.
__DJGPP__	Major version number of the DJGPP library for the DOS port.
__DJGPP_MINOR__ Minor version number of the DJGPP library.
__GO32__	Compiling the DOS port with DJGPP v1.x (obsolete).
DOS_NT		Compiling for either the MS-DOS or native MS-Windows port.
WINDOWSNT	Compiling the native MS-Windows (W32) port.
__MINGW32__	Compiling the W32 port with the MinGW port of GCC.
_MSC_VER	Compiling the W32 port with the Microsoft C compiler.
Dan Nicolaescu's avatar
Dan Nicolaescu committed
20
IRIX6_5         Compiling on Irix-6.5
Dan Nicolaescu's avatar
Dan Nicolaescu committed
21
USE_LISP_UNION_TYPE Define it in lisp.h to make Lisp_Object be a union type instead of the default int.
Stefan Monnier's avatar
Stefan Monnier committed
22 23 24

** Distinguishing GUIs **

Eli Zaretskii's avatar
Eli Zaretskii committed
25
HAVE_NTGUI	Use the native W32 GUI for windows, frames, menus&scrollbars.
Stefan Monnier's avatar
Stefan Monnier committed
26 27
HAVE_CARBON	Compile support for the Carbon GUI.  Requires MAC_OS?
HAVE_X11	Compile support for the X11 GUI.
Eli Zaretskii's avatar
Eli Zaretskii committed
28
HAVE_X_WINDOWS	Compile support for X Window system
Stefan Monnier's avatar
Stefan Monnier committed
29 30 31 32 33
X11		??  Makefile.in suggests it's equivalent to HAVE_X11
USE_LUCID	Use the Lucid toolkit for menus&scrollbars.  Requires HAVE_X11.
USE_MOTIF	Use the Motif toolkit for menus&scrollbars.  Requires HAVE_X11.
USE_GTK		Use the Gtk   toolkit for menus&scrollbars.  Requires HAVE_X11.

Eli Zaretskii's avatar
Eli Zaretskii committed
34 35 36 37 38 39 40 41 42 43 44 45 46
** Frame types **

FRAME_TERMCAP_P	A tty (character terminal) frame.
FRAME_X_P	A frame on X Window system.
FRAME_MSDOS_P	An MS-DOS frame (used only by the DOS port).
FRAME_MAC_P	A Mac frame.
FRAME_W32_P	A frame using native MS-Windows GUI.
FRAME_WINDOW_P	A GUI frame (like X, w32, etc.)

** Compile-time options **
REL_ALLOC	Compile in the relocatable memory allocator ralloc.c.
SYSTEM_MALLOC	Use the system library's malloc.

47
** Replace, the definition is trivial: SWITCH_ENUM_CAST
48

Dan Nicolaescu's avatar
Dan Nicolaescu committed
49 50
** Defines from src/m/*.h and src/s/*.h.  Some of these might not be used in the code anymore, so they can be removed.  The HAVE_* definitions are probably handled by autoconf, so it might be possible to just remove them from src/[sm]/*.h.

51

52
ADDR_CORRECT
Dan Nicolaescu's avatar
Dan Nicolaescu committed
53 54 55
ADJUST_EXEC_HEADER
AIX
AMPERSAND_FULL_NAME
56 57 58
A_TEXT_OFFSET
A_TEXT_SEEK
BAUD_CONVERT
Dan Nicolaescu's avatar
Dan Nicolaescu committed
59 60 61 62 63
BCOPY_DOWNWARD_SAFE
BCOPY_UPWARD_SAFE
BITS_PER_EMACS_INT
BITS_PER_LONG
BROKEN_DATAGRAM_SOCKETS
64
BROKEN_FIONREAD
Dan Nicolaescu's avatar
Dan Nicolaescu committed
65 66 67 68 69
BROKEN_GET_CURRENT_DIR_NAME
BROKEN_NON_BLOCKING_CONNECT
BROKEN_PTY_READ_AFTER_EAGAIN
BROKEN_SA_RESTART
BROKEN_SIGAIO
70
BROKEN_SIGIO
Dan Nicolaescu's avatar
Dan Nicolaescu committed
71 72 73
BROKEN_SIGPOLL
BROKEN_SIGPTY
BSD4_2
74
BSD4_3
75 76 77 78 79 80
BSD_PGRPS
BSD_SYSTEM
BSTRING
CANNOT_DUMP
CLASH_DETECTION
COFF
81
COFF_BSD_SYMBOLS
82
CRT0_DUMMIES
83 84 85
C_DEBUG_SWITCH
C_SWITCH_MACHINE
C_SWITCH_SYSTEM
Dan Nicolaescu's avatar
Dan Nicolaescu committed
86 87
C_SWITCH_SYSTEM_TEMACS
C_SWITCH_X_SYSTEM
88 89 90
DATA_END
DATA_SEG_BITS
DATA_START
Dan Nicolaescu's avatar
Dan Nicolaescu committed
91
DBL_MIN_REPLACEMENT
92 93
DECLARE_GETPWUID_WITH_UID_T
DEFAULT_ENTRY_ADDRESS
Dan Nicolaescu's avatar
Dan Nicolaescu committed
94 95 96 97
DEFAULT_SOUND_DEVICE
DEVICE_SEP
DIRECTORY_SEP
DONT_REOPEN_PTY
98
DOT_GLOBAL_START
Dan Nicolaescu's avatar
Dan Nicolaescu committed
99 100 101 102 103 104 105 106
DOUG_LEA_MALLOC
DebPrint
EMACSDEBUG
EMACS_CONFIGURATION
EMACS_CONFIG_OPTIONS
EMACS_INT
EMACS_UINT
END_FILES_1
107
EXPLICIT_SIGN_EXTEND
Dan Nicolaescu's avatar
Dan Nicolaescu committed
108
FILE_SYSTEM_CASE
109
FIRST_PTY_LETTER
Dan Nicolaescu's avatar
Dan Nicolaescu committed
110
FLOAT_CHECK_DOMAIN
111
FSCALE
Dan Nicolaescu's avatar
Dan Nicolaescu committed
112 113 114 115
Fread
GAP_USE_BCOPY
GC_LISP_OBJECT_ALIGNMENT
GC_MARK_SECONDARY_STACK
116 117 118
GC_MARK_STACK
GC_SETJMP_WORKS
GETPGRP_NO_ARG
Dan Nicolaescu's avatar
Dan Nicolaescu committed
119 120 121
GMALLOC_INHIBIT_VALLOC
GNU_LIBRARY_PENDING_OUTPUT_COUNT
GNU_LINUX
122
GNU_MALLOC
Dan Nicolaescu's avatar
Dan Nicolaescu committed
123
HAVE_AIX_SMT_EXP
124
HAVE_ALLOCA
Dan Nicolaescu's avatar
Dan Nicolaescu committed
125 126 127 128
HAVE_AVAILABILITYMACROS_H
HAVE_BCMP
HAVE_BCOPY
HAVE_CBRT
129
HAVE_CLOSEDIR
Dan Nicolaescu's avatar
Dan Nicolaescu committed
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144
HAVE_CRTIN
HAVE_DUP2
HAVE_EUIDACCESS
HAVE_FACES
HAVE_FMOD
HAVE_FPATHCONF
HAVE_FREXP
HAVE_FSYNC
HAVE_FTIME
HAVE_GETCWD
HAVE_GETDOMAINNAME
HAVE_GETHOSTNAME
HAVE_GETLOADAVG
HAVE_GETPAGESIZE
HAVE_GETPT
145
HAVE_GETTIMEOFDAY
Dan Nicolaescu's avatar
Dan Nicolaescu committed
146 147 148
HAVE_GETWD
HAVE_H_ERRNO
HAVE_INDEX
149
HAVE_INET_SOCKETS
Dan Nicolaescu's avatar
Dan Nicolaescu committed
150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166
HAVE_INVERSE_HYPERBOLIC
HAVE_LIB64_DIR
HAVE_LIBKSTAT
HAVE_LIBNCURSES
HAVE_LIBPTHREADS
HAVE_LIBXMU
HAVE_LIMITS_H
HAVE_LINUX_VERSION_H
HAVE_LOGB
HAVE_LONG_FILE_NAMES
HAVE_LRAND48
HAVE_MENUS
HAVE_MKDIR
HAVE_MKTIME
HAVE_MOUSE
HAVE_PERROR
HAVE_PSTAT_GETDYNAMIC
167
HAVE_PTYS
Dan Nicolaescu's avatar
Dan Nicolaescu committed
168 169 170 171 172 173 174
HAVE_PWD_H
HAVE_RANDOM
HAVE_RENAME
HAVE_RES_INIT
HAVE_RINDEX
HAVE_RINT
HAVE_RMDIR
175
HAVE_SELECT
Dan Nicolaescu's avatar
Dan Nicolaescu committed
176 177 178 179 180
HAVE_SETLOCALE
HAVE_SETPGID
HAVE_SETRLIMIT
HAVE_SETSID
HAVE_SHUTDOWN
181
HAVE_SOCKETS
Dan Nicolaescu's avatar
Dan Nicolaescu committed
182 183 184 185
HAVE_SOUND
HAVE_STDLIB_H
HAVE_STRERROR
HAVE_STRFTIME
Dan Nicolaescu's avatar
Dan Nicolaescu committed
186
HAVE_STRING_H
Dan Nicolaescu's avatar
Dan Nicolaescu committed
187 188
HAVE_STRUCT_UTIMBUF
HAVE_SYSINFO
189
HAVE_SYSVIPC
190
HAVE_SYSV_SIGPAUSE
Dan Nicolaescu's avatar
Dan Nicolaescu committed
191 192 193 194
HAVE_SYS_SELECT_H
HAVE_SYS_SYSTEMINFO_H
HAVE_SYS_TIMEB_H
HAVE_SYS_TIME_H
195
HAVE_TCATTR
196
HAVE_TERMIO
197
HAVE_TERMIOS
Dan Nicolaescu's avatar
Dan Nicolaescu committed
198
HAVE_TERMIOS_H
199
HAVE_TEXT_START
Dan Nicolaescu's avatar
Dan Nicolaescu committed
200 201 202
HAVE_TIMEVAL
HAVE_TM_ZONE
HAVE_TZSET
203
HAVE_UNION_WAIT
204 205
HAVE_UNISTD_H
HAVE_UTIMES
Dan Nicolaescu's avatar
Dan Nicolaescu committed
206 207
HAVE_UTIME_H
HAVE_VOLATILE
208
HAVE_WAIT_HEADER
Dan Nicolaescu's avatar
Dan Nicolaescu committed
209 210 211 212 213
HAVE_WINDOW_SYSTEM
HAVE_WORKING_VFORK
HAVE_XRMSETDATABASE
HPUX
IBMR2AIX
214
INHIBIT_X11R6_XIM
Dan Nicolaescu's avatar
Dan Nicolaescu committed
215
INTERNAL_TERMINAL
216
INTERRUPT_INPUT
217 218
IRIS
IRIS_4D
Dan Nicolaescu's avatar
Dan Nicolaescu committed
219 220
IS_ANY_SEP
IS_DIRECTORY_SEP
221 222
KERNEL_FILE
LDAV_SYMBOL
223
LD_SWITCH_MACHINE
Dan Nicolaescu's avatar
Dan Nicolaescu committed
224 225
LD_SWITCH_MACHINE_TEMACS
LD_SWITCH_SITE
226
LD_SWITCH_SYSTEM
Dan Nicolaescu's avatar
Dan Nicolaescu committed
227
LD_SWITCH_SYSTEM_1
228
LD_SWITCH_SYSTEM_TEMACS
Dan Nicolaescu's avatar
Dan Nicolaescu committed
229 230 231
LD_SWITCH_SYSTEM_tmp
LD_SWITCH_X_DEFAULT
LIBS_CARBON
232
LIBS_DEBUG
Dan Nicolaescu's avatar
Dan Nicolaescu committed
233
LIBS_IMAGE
234 235 236 237 238 239
LIBS_MACHINE
LIBS_SYSTEM
LIBS_TERMCAP
LIBX11_SYSTEM
LIBXMU
LIB_GCC
Dan Nicolaescu's avatar
Dan Nicolaescu committed
240
LIB_MATH
241 242
LIB_MOTIF
LIB_STANDARD
Dan Nicolaescu's avatar
Dan Nicolaescu committed
243
LIB_STANDARD_LIBSRC
244
LINKER
Dan Nicolaescu's avatar
Dan Nicolaescu committed
245 246 247 248 249
LINK_CRTL_SHARE
LINUX
LINUX_SBRK_BUG
LISP_FLOAT_TYPE
LNOFLSH
250 251
LOAD_AVE_CVT
LOAD_AVE_TYPE
Dan Nicolaescu's avatar
Dan Nicolaescu committed
252
LOCALTIME_CACHE
253
MAIL_USE_FLOCK
Dan Nicolaescu's avatar
Dan Nicolaescu committed
254 255 256 257 258
MAIL_USE_LOCKF
MAIL_USE_POP
MAIL_USE_SYSTEM_LOCK
MAXPATHLEN
MAX_PRINT_CHARS
Dan Nicolaescu's avatar
Dan Nicolaescu committed
259
MIN_PTY_KERNEL_VERSION -- only used on Mac
Dan Nicolaescu's avatar
Dan Nicolaescu committed
260 261 262
MODE_LINE_BINARY_TEXT
MULTI_KBOARD
MUST_UNDEF__STDC__
263
NARROWPROTO
Dan Nicolaescu's avatar
Dan Nicolaescu committed
264
NEED_BSDTTY
265
NEED_ERRNO
Dan Nicolaescu's avatar
Dan Nicolaescu committed
266
NEED_LIBW
267 268
NEED_PTEM_H
NEED_SIOCTL
Dan Nicolaescu's avatar
Dan Nicolaescu committed
269
NEED_UNISTD_H
270
NLIST_STRUCT
271 272
NOMULTIPLEJOBS
NONSYSTEM_DIR_LIBRARY
273
NOT_C_CODE
Dan Nicolaescu's avatar
Dan Nicolaescu committed
274
NOT_USING_MOTIF
Dan Nicolaescu's avatar
Dan Nicolaescu committed
275
NO_ABORT
276
NO_ARG_ARRAY
Dan Nicolaescu's avatar
Dan Nicolaescu committed
277 278 279
NO_EDITRES
NO_HYPHENS_IN_FILENAMES
NO_MATHERR
280
NO_REMAP
Dan Nicolaescu's avatar
Dan Nicolaescu committed
281
NO_SHARED_LIBS
282
NO_SIOCTL_H
283
NO_SOCK_SIGIO
284 285 286
NO_TERMIO
NSIG
NSIG_MINIMUM
Dan Nicolaescu's avatar
Dan Nicolaescu committed
287 288 289 290 291 292 293
NULL
NULL_DEVICE
N_BADMAG
N_PAGSIZ
N_SYMOFF
N_TRELOFF
N_TXTOFF
294
ORDINARY_LINK
Dan Nicolaescu's avatar
Dan Nicolaescu committed
295 296 297 298 299 300 301 302 303 304 305
OTHER_FILES
O_APPEND
O_BINARY
O_CREAT
O_EXCL
O_RDONLY
O_RDWR
O_TEXT
O_TRUNC
O_WRONLY
PAGESIZE
306 307
PENDING_OUTPUT_COUNT
PNTR_COMPARISON_TYPE
Dan Nicolaescu's avatar
Dan Nicolaescu committed
308
POSIX
309 310 311
POSIX_SIGNALS
PREFER_VSUSP
PTY_ITERATION
312
PTY_NAME_SPRINTF
313
PTY_OPEN
314
PTY_TTY_NAME_SPRINTF
315
PURESIZE
Dan Nicolaescu's avatar
Dan Nicolaescu committed
316
PURE_SEG_BITS
317
RUN_TIME_REMAP
Dan Nicolaescu's avatar
Dan Nicolaescu committed
318
SA_RESTART
319 320
SECTION_ALIGNMENT
SEGMENT_MASK
Dan Nicolaescu's avatar
Dan Nicolaescu committed
321 322
SEPCHAR
SETPGRP_RELEASES_CTTY
323
SETUP_SLAVE_PTY
Dan Nicolaescu's avatar
Dan Nicolaescu committed
324 325 326 327 328
SHARABLE_LIB_BUG
SIGALRM
SIGCHLD
SIGHUP
SIGKILL
329 330
SIGNALS_VIA_CHARACTERS
SIGN_EXTEND_CHAR
Dan Nicolaescu's avatar
Dan Nicolaescu committed
331 332 333
SIGPIPE
SIGQUIT
SIGTRAP
334
SIGTYPE
Dan Nicolaescu's avatar
Dan Nicolaescu committed
335 336
SOLARIS2
SPECIAL_EMACS_INT
337
START_FILES
Dan Nicolaescu's avatar
Dan Nicolaescu committed
338 339 340 341
START_FILES_1
STDC_HEADERS
SYMS_SYSTEM
SYSTEM_PURESIZE_EXTRA
342
SYSTEM_TYPE
343 344
SYSV_SYSTEM_DIR
S_IFLNK
Dan Nicolaescu's avatar
Dan Nicolaescu committed
345
Srandom
Dan Nicolaescu's avatar
Dan Nicolaescu committed
346 347
TAB3
TABDLY
Dan Nicolaescu's avatar
Dan Nicolaescu committed
348
TERM
349 350 351
TERMINFO
TEXT_END
TEXT_START
Dan Nicolaescu's avatar
Dan Nicolaescu committed
352
THIS_IS_CONFIGURE
353
THIS_IS_MAKEFILE
Dan Nicolaescu's avatar
Dan Nicolaescu committed
354 355 356
TIME_WITH_SYS_TIME
TIOCSIGSEND
TM_IN_SYS_TIME
357 358
ULIMIT_BREAK_VALUE
UNEXEC
Dan Nicolaescu's avatar
Dan Nicolaescu committed
359 360 361
UNIX98_PTYS
USE_CRT_DLL
USE_MAC_IMAGE_IO
362
USE_MMAP_FOR_BUFFERS
Dan Nicolaescu's avatar
Dan Nicolaescu committed
363
USE_TOOLKIT_SCROLL_BARS
364 365 366 367
USG
USG5
USG5_4
USG_SHARED_LIBRARIES
Dan Nicolaescu's avatar
Dan Nicolaescu committed
368 369
USG_SUBTTY_WORKS
VALBITS
370
VIRT_ADDR_VARIES
Dan Nicolaescu's avatar
Dan Nicolaescu committed
371 372 373
VMS
WAITTYPE
WAIT_USE_INT
374
WORDS_BIG_ENDIAN
Dan Nicolaescu's avatar
Dan Nicolaescu committed
375
WRETCODE
Dan Nicolaescu's avatar
Dan Nicolaescu committed
376
X11R5_INHIBIT_I18N
Dan Nicolaescu's avatar
Dan Nicolaescu committed
377
XINT
Dan Nicolaescu's avatar
Dan Nicolaescu committed
378
XOS_NEEDS_TIME_H
Dan Nicolaescu's avatar
Dan Nicolaescu committed
379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406
XPNTR
XSET
XUINT
_AIX
_ARCH_PPC64
_CALLBACK_
_FILE_OFFSET_BITS
_GNUC_
_LP64
_MALLOC_INTERNAL
_NAIVE_DOS_REGS
_VARARGS_
_WINSOCKAPI_
_WINSOCK_H
__ELF__
__FreeBSD__
__FreeBSD_version
__GNUC__
__NetBSD__
__OpenBSD__
__STDC__
__arch64__
__cplusplus
__hpux
__ia64__
__linux__
__mc68000__
__mips__
407 408
_longjmp
_setjmp
Dan Nicolaescu's avatar
Dan Nicolaescu committed
409 410 411
_start
abort
access
412
alloca
Dan Nicolaescu's avatar
Dan Nicolaescu committed
413 414 415 416 417 418 419 420 421 422 423 424 425 426 427
bcmp
bcopy
brk
bzero
calloc
chdir
chmod
chown
close
const
creat
ctime
dup
dup2
edata
428 429
emacs
etext
Dan Nicolaescu's avatar
Dan Nicolaescu committed
430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450
execlp
execvp
fcloseall
fdopen
fgetchar
fileno
flushall
fopen
fputchar
free
fsync
ftruncate
fwrite
getdefdir
getdisk
getenv
getpid
getuid
getw
gmtime
i386
451
index
Dan Nicolaescu's avatar
Dan Nicolaescu committed
452 453 454 455 456 457 458 459
init_process
isatty
kill
link
linux
localtime
logb
lseek
460
m68k
Dan Nicolaescu's avatar
Dan Nicolaescu committed
461
malloc
462
mips
Dan Nicolaescu's avatar
Dan Nicolaescu committed
463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489
mkdir
mktemp
open
pclose
pipe
popen
putw
random
read
realloc
rename
rindex
rmdir
sbrk
select
sigmask
signal
sigsetmask
sleep
spawnve
srandom
static
strdup
strerror
stricmp
strnicmp
strupr
490
subprocesses
491
sun
Dan Nicolaescu's avatar
Dan Nicolaescu committed
492 493 494 495 496 497 498 499 500 501 502 503 504 505
sys_nerr
system
temacs
tzname
tzset
umask
unix
unlink
utimbuf
utime
vfork
wait
write
xfree
506

Stefan Monnier's avatar
Stefan Monnier committed
507
# arch-tag: bc80061a-1168-4911-9766-46aaf2640250