CPP-DEFINES 7.52 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 **

Dan Nicolaescu's avatar
Dan Nicolaescu committed
6
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
7
MAC_OSX		Compiling for Mac OS X.  Not bare Darwin.
Stefan Monnier's avatar
Stefan Monnier committed
8
CYGWIN		Compiling the Cygwin port.
Eli Zaretskii's avatar
Eli Zaretskii committed
9 10 11 12 13 14 15 16 17 18
__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
19
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
20 21 22

** Distinguishing GUIs **

Eli Zaretskii's avatar
Eli Zaretskii committed
23
HAVE_NTGUI	Use the native W32 GUI for windows, frames, menus&scrollbars.
24
MAC_OS		Compiling for the `mac' window-system.
Stefan Monnier's avatar
Stefan Monnier committed
25
HAVE_CARBON	Compile support for the Carbon GUI.  Requires MAC_OS?
26 27 28
HAVE_NS	Use the NeXT/OpenStep/Cocoa UI under Mac OS X or GNUstep.
NS_IMPL_GNUSTEP	Compile support for GNUSTEP implementation of NS GUI API.
NS_IMPL_COCOA	Compile support for Cocoa (Apple) implementation of NS GUI API.
Stefan Monnier's avatar
Stefan Monnier committed
29
HAVE_X11	Compile support for the X11 GUI.
Eli Zaretskii's avatar
Eli Zaretskii committed
30
HAVE_X_WINDOWS	Compile support for X Window system
Stefan Monnier's avatar
Stefan Monnier committed
31 32 33 34 35
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
36 37 38 39 40 41 42 43 44 45 46 47
** 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.
Dan Nicolaescu's avatar
Dan Nicolaescu committed
48
subprocesses    System can use subprocesses (for M-x shell for example).  Defined by default, only MSDOS undefines it.
Eli Zaretskii's avatar
Eli Zaretskii committed
49

50
** Replace, the definition is trivial: SWITCH_ENUM_CAST
51

Dan Nicolaescu's avatar
Dan Nicolaescu committed
52 53
** 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.

54

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

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