CPP-DEFINES 7.53 KB
Newer Older
Stefan Monnier's avatar
Stefan Monnier committed
1 2 3 4 5 6
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 **

CYGWIN		Compiling the Cygwin port.
Eli Zaretskii's avatar
Eli Zaretskii committed
7 8 9 10 11 12 13 14 15 16
__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.
17
DARWIN_OS	Compiling on Mac OS X or pure Darwin (and using s/darwin.h).
Stefan Monnier's avatar
Stefan Monnier committed
18 19 20

** Distinguishing GUIs **

Eli Zaretskii's avatar
Eli Zaretskii committed
21
HAVE_NTGUI	Use the native W32 GUI for windows, frames, menus&scrollbars.
22
HAVE_NS		Use the NeXT/OpenStep/Cocoa UI under Mac OS X or GNUstep.
Glenn Morris's avatar
Glenn Morris committed
23
NS_IMPL_GNUSTEP	Compile support for GNUstep implementation of NS GUI API.
24
NS_IMPL_COCOA	Compile support for Cocoa (Apple) implementation of NS GUI API.
Stefan Monnier's avatar
Stefan Monnier committed
25
HAVE_X11	Compile support for the X11 GUI.
Eli Zaretskii's avatar
Eli Zaretskii committed
26
HAVE_X_WINDOWS	Compile support for X Window system
Stefan Monnier's avatar
Stefan Monnier committed
27 28 29 30 31
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
32 33 34 35 36 37 38 39
** 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_W32_P	A frame using native MS-Windows GUI.
FRAME_WINDOW_P	A GUI frame (like X, w32, etc.)

40 41 42 43
** Support for accessing other processes on the system **

HAVE_PROCFS     The /proc filesystem is supported.

Eli Zaretskii's avatar
Eli Zaretskii committed
44
** Compile-time options **
45

Eli Zaretskii's avatar
Eli Zaretskii committed
46 47
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.
49
USE_LISP_UNION_TYPE Define it in lisp.h to make Lisp_Object be a union type instead of the default int.
Eli Zaretskii's avatar
Eli Zaretskii committed
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
** System specific macros, decribed in detail in src/s/template.h
BSTRING
CLASH_DETECTION
COFF
FIRST_PTY_LETTER
HAVE_PTYS
HAVE_TERMIO
HAVE_TERMIOS
INTERRUPT_INPUT
MAIL_USE_FLOCK
NARROWPROTO
NOMULTIPLEJOBS
SEPCHAR
SIGTYPE
SYSTEM_TYPE
USE_MMAP_FOR_BUFFERS

** Machine specific macros, decribed in detail in src/m/template.h
CANNOT_DUMP
EXPLICIT_SIGN_EXTEND
LOAD_AVE_CVT
LOAD_AVE_TYPE
NO_ARG_ARRAY
NO_REMAP
NO_SOCK_SIGIO
VIRT_ADDR_VARIES
WORDS_BIG_ENDIAN

Eli Zaretskii's avatar
Eli Zaretskii committed
79 80 81
** Misc macros
USER_FULL_NAME   If defined, overrides the default pw->pw_gecos for getting at the full user name.  Only MSDOS overrides the default.

82
** Replace, the definition is trivial: SWITCH_ENUM_CAST
83

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

86

Dan Nicolaescu's avatar
Dan Nicolaescu committed
87 88 89 90 91 92 93
AIX
AMPERSAND_FULL_NAME
BCOPY_DOWNWARD_SAFE
BCOPY_UPWARD_SAFE
BITS_PER_EMACS_INT
BITS_PER_LONG
BROKEN_DATAGRAM_SOCKETS
94
BROKEN_FIONREAD
Dan Nicolaescu's avatar
Dan Nicolaescu committed
95 96 97 98 99
BROKEN_GET_CURRENT_DIR_NAME
BROKEN_NON_BLOCKING_CONNECT
BROKEN_PTY_READ_AFTER_EAGAIN
BROKEN_SA_RESTART
BROKEN_SIGAIO
100
BROKEN_SIGIO
Dan Nicolaescu's avatar
Dan Nicolaescu committed
101 102 103
BROKEN_SIGPOLL
BROKEN_SIGPTY
BSD4_2
104
BSD4_3
105 106 107
BSD_PGRPS
BSD_SYSTEM
CLASH_DETECTION
108
COFF_BSD_SYMBOLS
109
CRT0_DUMMIES
110 111 112
C_DEBUG_SWITCH
C_SWITCH_MACHINE
C_SWITCH_SYSTEM
Dan Nicolaescu's avatar
Dan Nicolaescu committed
113 114
C_SWITCH_SYSTEM_TEMACS
C_SWITCH_X_SYSTEM
115 116
DATA_SEG_BITS
DATA_START
Dan Nicolaescu's avatar
Dan Nicolaescu committed
117
DBL_MIN_REPLACEMENT
118
DECLARE_GETPWUID_WITH_UID_T
Dan Nicolaescu's avatar
Dan Nicolaescu committed
119 120 121 122 123 124 125 126 127 128 129 130 131 132
DEFAULT_SOUND_DEVICE
DEVICE_SEP
DIRECTORY_SEP
DONT_REOPEN_PTY
DOUG_LEA_MALLOC
DebPrint
EMACSDEBUG
EMACS_CONFIGURATION
EMACS_CONFIG_OPTIONS
EMACS_INT
EMACS_UINT
END_FILES_1
FILE_SYSTEM_CASE
FLOAT_CHECK_DOMAIN
133
FSCALE
Dan Nicolaescu's avatar
Dan Nicolaescu committed
134 135 136
GAP_USE_BCOPY
GC_LISP_OBJECT_ALIGNMENT
GC_MARK_SECONDARY_STACK
137 138
GC_MARK_STACK
GC_SETJMP_WORKS
Dan Nicolaescu's avatar
Dan Nicolaescu committed
139 140 141
GMALLOC_INHIBIT_VALLOC
GNU_LIBRARY_PENDING_OUTPUT_COUNT
GNU_LINUX
142
GNU_MALLOC
Dan Nicolaescu's avatar
Dan Nicolaescu committed
143
HAVE_AIX_SMT_EXP
144
HAVE_ALLOCA
Dan Nicolaescu's avatar
Dan Nicolaescu committed
145 146 147
HAVE_BCMP
HAVE_BCOPY
HAVE_CBRT
148
HAVE_CLOSEDIR
Dan Nicolaescu's avatar
Dan Nicolaescu committed
149 150 151 152 153 154 155 156 157 158 159 160 161 162
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
163
HAVE_GETTIMEOFDAY
Dan Nicolaescu's avatar
Dan Nicolaescu committed
164 165 166
HAVE_GETWD
HAVE_H_ERRNO
HAVE_INDEX
167
HAVE_INET_SOCKETS
Dan Nicolaescu's avatar
Dan Nicolaescu committed
168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191
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
HAVE_PWD_H
HAVE_RANDOM
HAVE_RENAME
HAVE_RES_INIT
HAVE_RINDEX
HAVE_RINT
HAVE_RMDIR
192
HAVE_SELECT
Dan Nicolaescu's avatar
Dan Nicolaescu committed
193 194 195 196 197
HAVE_SETLOCALE
HAVE_SETPGID
HAVE_SETRLIMIT
HAVE_SETSID
HAVE_SHUTDOWN
198
HAVE_SOCKETS
Dan Nicolaescu's avatar
Dan Nicolaescu committed
199 200 201 202
HAVE_SOUND
HAVE_STDLIB_H
HAVE_STRERROR
HAVE_STRFTIME
Dan Nicolaescu's avatar
Dan Nicolaescu committed
203
HAVE_STRING_H
Dan Nicolaescu's avatar
Dan Nicolaescu committed
204 205
HAVE_STRUCT_UTIMBUF
HAVE_SYSINFO
206
HAVE_SYSV_SIGPAUSE
Dan Nicolaescu's avatar
Dan Nicolaescu committed
207 208 209 210
HAVE_SYS_SELECT_H
HAVE_SYS_SYSTEMINFO_H
HAVE_SYS_TIMEB_H
HAVE_SYS_TIME_H
211
HAVE_TCATTR
Dan Nicolaescu's avatar
Dan Nicolaescu committed
212
HAVE_TERMIOS_H
213
HAVE_TEXT_START
Dan Nicolaescu's avatar
Dan Nicolaescu committed
214 215 216
HAVE_TIMEVAL
HAVE_TM_ZONE
HAVE_TZSET
217 218
HAVE_UNISTD_H
HAVE_UTIMES
Dan Nicolaescu's avatar
Dan Nicolaescu committed
219 220 221 222 223 224 225
HAVE_UTIME_H
HAVE_VOLATILE
HAVE_WINDOW_SYSTEM
HAVE_WORKING_VFORK
HAVE_XRMSETDATABASE
HPUX
IBMR2AIX
226
INHIBIT_X11R6_XIM
Dan Nicolaescu's avatar
Dan Nicolaescu committed
227 228 229
INTERNAL_TERMINAL
IS_ANY_SEP
IS_DIRECTORY_SEP
230 231
KERNEL_FILE
LDAV_SYMBOL
232
LD_SWITCH_MACHINE
Dan Nicolaescu's avatar
Dan Nicolaescu committed
233
LD_SWITCH_MACHINE_TEMACS
234 235
LD_SWITCH_SYSTEM
LD_SWITCH_SYSTEM_TEMACS
Dan Nicolaescu's avatar
Dan Nicolaescu committed
236 237
LD_SWITCH_SYSTEM_tmp
LD_SWITCH_X_DEFAULT
238
LIBS_DEBUG
239 240 241 242 243 244
LIBS_MACHINE
LIBS_SYSTEM
LIBS_TERMCAP
LIBX11_SYSTEM
LIBXMU
LIB_GCC
Dan Nicolaescu's avatar
Dan Nicolaescu committed
245
LIB_MATH
246 247 248
LIB_MOTIF
LIB_STANDARD
LINKER
Dan Nicolaescu's avatar
Update.  
Dan Nicolaescu committed
249
LINUX_VERSION_CODE
Dan Nicolaescu's avatar
Dan Nicolaescu committed
250 251 252 253 254 255 256
LISP_FLOAT_TYPE
LNOFLSH
LOCALTIME_CACHE
MAIL_USE_LOCKF
MAIL_USE_POP
MAIL_USE_SYSTEM_LOCK
MAXPATHLEN
Dan Nicolaescu's avatar
Dan Nicolaescu committed
257
MIN_PTY_KERNEL_VERSION -- only used on Mac
Dan Nicolaescu's avatar
Dan Nicolaescu committed
258 259
MODE_LINE_BINARY_TEXT
MUST_UNDEF__STDC__
Dan Nicolaescu's avatar
Dan Nicolaescu committed
260
NEED_BSDTTY
261
NEED_ERRNO
Dan Nicolaescu's avatar
Dan Nicolaescu committed
262
NEED_LIBW
Dan Nicolaescu's avatar
Dan Nicolaescu committed
263
NEED_UNISTD_H
264 265
NLIST_STRUCT
NOT_C_CODE
Dan Nicolaescu's avatar
Dan Nicolaescu committed
266
NOT_USING_MOTIF
Dan Nicolaescu's avatar
Dan Nicolaescu committed
267
NO_ABORT
Dan Nicolaescu's avatar
Update.  
Dan Nicolaescu committed
268
NO_DIR_LIBRARY
Dan Nicolaescu's avatar
Dan Nicolaescu committed
269 270 271
NO_EDITRES
NO_MATHERR
NO_SHARED_LIBS
272 273 274
NO_TERMIO
NSIG
NSIG_MINIMUM
Dan Nicolaescu's avatar
Dan Nicolaescu committed
275 276
NULL
NULL_DEVICE
277
ORDINARY_LINK
Dan Nicolaescu's avatar
Dan Nicolaescu committed
278 279 280 281 282 283 284 285 286 287 288
OTHER_FILES
O_APPEND
O_BINARY
O_CREAT
O_EXCL
O_RDONLY
O_RDWR
O_TEXT
O_TRUNC
O_WRONLY
PAGESIZE
289
PENDING_OUTPUT_COUNT
Dan Nicolaescu's avatar
Dan Nicolaescu committed
290
POSIX
291 292 293
POSIX_SIGNALS
PREFER_VSUSP
PTY_ITERATION
294
PTY_NAME_SPRINTF
295
PTY_OPEN
296
PTY_TTY_NAME_SPRINTF
297 298
PURESIZE
RUN_TIME_REMAP
Dan Nicolaescu's avatar
Dan Nicolaescu committed
299
SA_RESTART
300 301
SECTION_ALIGNMENT
SEGMENT_MASK
Dan Nicolaescu's avatar
Dan Nicolaescu committed
302
SETPGRP_RELEASES_CTTY
303
SETUP_SLAVE_PTY
Dan Nicolaescu's avatar
Dan Nicolaescu committed
304 305 306 307
SIGALRM
SIGCHLD
SIGHUP
SIGKILL
308
SIGNALS_VIA_CHARACTERS
Dan Nicolaescu's avatar
Dan Nicolaescu committed
309 310 311
SIGPIPE
SIGQUIT
SIGTRAP
312
SIGTYPE
Dan Nicolaescu's avatar
Dan Nicolaescu committed
313
SOLARIS2
314
START_FILES
Dan Nicolaescu's avatar
Dan Nicolaescu committed
315 316 317 318
START_FILES_1
STDC_HEADERS
SYMS_SYSTEM
SYSTEM_PURESIZE_EXTRA
Dan Nicolaescu's avatar
Dan Nicolaescu committed
319
SYSTEM_MALLOC
320
SYSV_SYSTEM_DIR
Dan Nicolaescu's avatar
Dan Nicolaescu committed
321
Srandom
Dan Nicolaescu's avatar
Dan Nicolaescu committed
322 323
TAB3
TABDLY
Dan Nicolaescu's avatar
Dan Nicolaescu committed
324
TERM
325 326
TERMINFO
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 337
UNIX98_PTYS
USE_CRT_DLL
USE_MAC_IMAGE_IO
USE_TOOLKIT_SCROLL_BARS
338 339 340
USG
USG5
USG5_4
Dan Nicolaescu's avatar
Dan Nicolaescu committed
341 342
USG_SUBTTY_WORKS
VALBITS
343
WORDS_BIG_ENDIAN
Dan Nicolaescu's avatar
Dan Nicolaescu committed
344 345
WRETCODE
XINT
Dan Nicolaescu's avatar
Dan Nicolaescu committed
346
XOS_NEEDS_TIME_H
Dan Nicolaescu's avatar
Dan Nicolaescu committed
347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363
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
364
__GNU_LIBRARY__
Dan Nicolaescu's avatar
Update.  
Dan Nicolaescu committed
365
__GNUC_MINOR__
Dan Nicolaescu's avatar
Dan Nicolaescu committed
366 367 368 369 370 371 372 373 374 375
__NetBSD__
__OpenBSD__
__STDC__
__arch64__
__cplusplus
__hpux
__ia64__
__linux__
__mc68000__
__mips__
376 377
_longjmp
_setjmp
Dan Nicolaescu's avatar
Dan Nicolaescu committed
378 379 380
_start
abort
access
381
alloca
Dan Nicolaescu's avatar
Dan Nicolaescu committed
382 383 384 385 386 387 388 389 390 391 392 393 394 395 396
bcmp
bcopy
brk
bzero
calloc
chdir
chmod
chown
close
const
creat
ctime
dup
dup2
edata
397 398
emacs
etext
Dan Nicolaescu's avatar
Dan Nicolaescu committed
399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414
execlp
execvp
fdopen
fileno
fopen
free
fsync
ftruncate
fwrite
getdefdir
getdisk
getenv
getpid
getuid
gmtime
i386
415
index
Dan Nicolaescu's avatar
Dan Nicolaescu committed
416 417 418 419 420 421 422 423
init_process
isatty
kill
link
linux
localtime
logb
lseek
424
m68k
Dan Nicolaescu's avatar
Dan Nicolaescu committed
425 426 427 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
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
465

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