CPP-DEFINES 6.42 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
__CYGWIN__	Ditto
MSDOS		Compiling the MS-DOS port.
__MSDOS__	Ditto.
10
__DJGPP_MINOR__ Minor version number of the DJGPP library; used only in msdos.c and dosfns.c.
Eli Zaretskii's avatar
Eli Zaretskii committed
11 12 13 14
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.
15
DARWIN_OS	Compiling on Mac OS X or pure Darwin (and using s/darwin.h).
Stefan Monnier's avatar
Stefan Monnier committed
16 17 18

** Distinguishing GUIs **

Eli Zaretskii's avatar
Eli Zaretskii committed
19
HAVE_NTGUI	Use the native W32 GUI for windows, frames, menus&scrollbars.
20
HAVE_NS		Use the NeXT/OpenStep/Cocoa UI under Mac OS X or GNUstep.
Glenn Morris's avatar
Glenn Morris committed
21
NS_IMPL_GNUSTEP	Compile support for GNUstep implementation of NS GUI API.
22
NS_IMPL_COCOA	Compile support for Cocoa (Apple) implementation of NS GUI API.
Stefan Monnier's avatar
Stefan Monnier committed
23
HAVE_X11	Compile support for the X11 GUI.
Eli Zaretskii's avatar
Eli Zaretskii committed
24
HAVE_X_WINDOWS	Compile support for X Window system
25 26 27
  (It looks like, nowadays, if HAVE_X11 is set, HAVE_X_WINDOWS must
   be, and vice versa.  At least, this is true for configure, and
   msdos; not sure about nt.)
Stefan Monnier's avatar
Stefan Monnier committed
28 29 30 31
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
** System specific macros, decribed in detail in src/s/template.h
CLASH_DETECTION
COFF
FIRST_PTY_LETTER
HAVE_PTYS
HAVE_TERMIO
HAVE_TERMIOS
INTERRUPT_INPUT
NARROWPROTO
SEPCHAR
SIGTYPE
SYSTEM_TYPE

** Machine specific macros, decribed in detail in src/m/template.h
LOAD_AVE_CVT
LOAD_AVE_TYPE
VIRT_ADDR_VARIES

Eli Zaretskii's avatar
Eli Zaretskii committed
69 70 71
** 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.

72
** Replace, the definition is trivial: SWITCH_ENUM_CAST
73

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

76

Dan Nicolaescu's avatar
Dan Nicolaescu committed
77 78 79 80
AIX
AMPERSAND_FULL_NAME
BITS_PER_EMACS_INT
BITS_PER_LONG
Glenn Morris's avatar
Glenn Morris committed
81 82 83
BITS_PER_CHAR
BITS_PER_SHORT
BITS_PER_INT
Dan Nicolaescu's avatar
Dan Nicolaescu committed
84
BROKEN_DATAGRAM_SOCKETS
85
BROKEN_FIONREAD
Dan Nicolaescu's avatar
Dan Nicolaescu committed
86 87 88 89 90
BROKEN_GET_CURRENT_DIR_NAME
BROKEN_NON_BLOCKING_CONNECT
BROKEN_PTY_READ_AFTER_EAGAIN
BROKEN_SA_RESTART
BROKEN_SIGAIO
91
BROKEN_SIGIO
Dan Nicolaescu's avatar
Dan Nicolaescu committed
92 93 94
BROKEN_SIGPOLL
BROKEN_SIGPTY
BSD4_2
95
BSD4_3
96 97
BSD_SYSTEM
CLASH_DETECTION
98 99
DATA_SEG_BITS
DATA_START
Dan Nicolaescu's avatar
Dan Nicolaescu committed
100 101 102 103 104 105 106 107 108 109 110 111 112 113
DBL_MIN_REPLACEMENT
DEFAULT_SOUND_DEVICE
DEVICE_SEP
DIRECTORY_SEP
DONT_REOPEN_PTY
DOUG_LEA_MALLOC
DebPrint
EMACSDEBUG
EMACS_CONFIGURATION
EMACS_CONFIG_OPTIONS
EMACS_INT
EMACS_UINT
FILE_SYSTEM_CASE
FLOAT_CHECK_DOMAIN
114
FSCALE
Dan Nicolaescu's avatar
Dan Nicolaescu committed
115 116
GC_LISP_OBJECT_ALIGNMENT
GC_MARK_SECONDARY_STACK
117 118
GC_MARK_STACK
GC_SETJMP_WORKS
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 124
HAVE_AIX_SMT_EXP
HAVE_CBRT
125
HAVE_CLOSEDIR
Dan Nicolaescu's avatar
Dan Nicolaescu committed
126 127 128 129 130 131 132 133 134 135 136 137 138
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
139
HAVE_GETTIMEOFDAY
Dan Nicolaescu's avatar
Dan Nicolaescu committed
140 141
HAVE_GETWD
HAVE_H_ERRNO
142
HAVE_INET_SOCKETS
Dan Nicolaescu's avatar
Dan Nicolaescu committed
143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161
HAVE_INVERSE_HYPERBOLIC
HAVE_LIBKSTAT
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_RINT
HAVE_RMDIR
162
HAVE_SELECT
Dan Nicolaescu's avatar
Dan Nicolaescu committed
163 164 165 166 167
HAVE_SETLOCALE
HAVE_SETPGID
HAVE_SETRLIMIT
HAVE_SETSID
HAVE_SHUTDOWN
168
HAVE_SOCKETS
Dan Nicolaescu's avatar
Dan Nicolaescu committed
169 170 171 172
HAVE_SOUND
HAVE_STDLIB_H
HAVE_STRERROR
HAVE_STRFTIME
Dan Nicolaescu's avatar
Dan Nicolaescu committed
173
HAVE_STRING_H
Dan Nicolaescu's avatar
Dan Nicolaescu committed
174 175
HAVE_STRUCT_UTIMBUF
HAVE_SYSINFO
176
HAVE_SYSV_SIGPAUSE
Dan Nicolaescu's avatar
Dan Nicolaescu committed
177 178 179 180
HAVE_SYS_SELECT_H
HAVE_SYS_SYSTEMINFO_H
HAVE_SYS_TIMEB_H
HAVE_SYS_TIME_H
181
HAVE_TCATTR
Dan Nicolaescu's avatar
Dan Nicolaescu committed
182 183 184 185
HAVE_TERMIOS_H
HAVE_TIMEVAL
HAVE_TM_ZONE
HAVE_TZSET
186 187
HAVE_UNISTD_H
HAVE_UTIMES
Dan Nicolaescu's avatar
Dan Nicolaescu committed
188 189 190 191 192 193 194 195
HAVE_UTIME_H
HAVE_WINDOW_SYSTEM
HAVE_WORKING_VFORK
HAVE_XRMSETDATABASE
HPUX
INTERNAL_TERMINAL
IS_ANY_SEP
IS_DIRECTORY_SEP
196 197
KERNEL_FILE
LDAV_SYMBOL
198
LINKER
Dan Nicolaescu's avatar
Update.  
Dan Nicolaescu committed
199
LINUX_VERSION_CODE
Dan Nicolaescu's avatar
Dan Nicolaescu committed
200 201 202
LISP_FLOAT_TYPE
LNOFLSH
LOCALTIME_CACHE
203
MAIL_USE_FLOCK
Dan Nicolaescu's avatar
Dan Nicolaescu committed
204 205 206 207
MAIL_USE_LOCKF
MAIL_USE_POP
MAIL_USE_SYSTEM_LOCK
MAXPATHLEN
Dan Nicolaescu's avatar
Dan Nicolaescu committed
208
MIN_PTY_KERNEL_VERSION -- only used on Mac
Dan Nicolaescu's avatar
Dan Nicolaescu committed
209 210
MODE_LINE_BINARY_TEXT
MUST_UNDEF__STDC__
211
NLIST_STRUCT
Dan Nicolaescu's avatar
Dan Nicolaescu committed
212
NO_ABORT
Dan Nicolaescu's avatar
Dan Nicolaescu committed
213 214
NO_EDITRES
NO_MATHERR
215 216 217
NO_TERMIO
NSIG
NSIG_MINIMUM
Dan Nicolaescu's avatar
Dan Nicolaescu committed
218 219
NULL
NULL_DEVICE
220
ORDINARY_LINK
Dan Nicolaescu's avatar
Dan Nicolaescu committed
221 222 223 224
O_APPEND
O_RDONLY
O_RDWR
PAGESIZE
225
PENDING_OUTPUT_COUNT
Dan Nicolaescu's avatar
Dan Nicolaescu committed
226
POSIX
227 228
PREFER_VSUSP
PTY_ITERATION
229
PTY_NAME_SPRINTF
230
PTY_OPEN
231
PTY_TTY_NAME_SPRINTF
232 233
PURESIZE
RUN_TIME_REMAP
Dan Nicolaescu's avatar
Dan Nicolaescu committed
234
SA_RESTART
235
SEGMENT_MASK
Dan Nicolaescu's avatar
Dan Nicolaescu committed
236
SETPGRP_RELEASES_CTTY
237
SETUP_SLAVE_PTY
Dan Nicolaescu's avatar
Dan Nicolaescu committed
238 239 240 241
SIGALRM
SIGCHLD
SIGHUP
SIGKILL
242
SIGNALS_VIA_CHARACTERS
Dan Nicolaescu's avatar
Dan Nicolaescu committed
243 244 245
SIGPIPE
SIGQUIT
SIGTRAP
246
SIGTYPE
Dan Nicolaescu's avatar
Dan Nicolaescu committed
247 248 249
SOLARIS2
STDC_HEADERS
SYSTEM_PURESIZE_EXTRA
Dan Nicolaescu's avatar
Dan Nicolaescu committed
250
SYSTEM_MALLOC
251
SYSV_SYSTEM_DIR
Dan Nicolaescu's avatar
Dan Nicolaescu committed
252 253
TAB3
TABDLY
Dan Nicolaescu's avatar
Dan Nicolaescu committed
254 255 256 257
TERM
TIME_WITH_SYS_TIME
TIOCSIGSEND
TM_IN_SYS_TIME
258
ULIMIT_BREAK_VALUE
Dan Nicolaescu's avatar
Dan Nicolaescu committed
259 260 261
UNIX98_PTYS
USE_CRT_DLL
USE_TOOLKIT_SCROLL_BARS
262 263 264
USG
USG5
USG5_4
Dan Nicolaescu's avatar
Dan Nicolaescu committed
265 266 267 268
USG_SUBTTY_WORKS
VALBITS
WRETCODE
XINT
Dan Nicolaescu's avatar
Dan Nicolaescu committed
269
XOS_NEEDS_TIME_H
Dan Nicolaescu's avatar
Dan Nicolaescu committed
270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285
XPNTR
XSET
XUINT
_AIX
_ARCH_PPC64
_CALLBACK_
_FILE_OFFSET_BITS
_LP64
_MALLOC_INTERNAL
_NAIVE_DOS_REGS
_VARARGS_
_WINSOCKAPI_
_WINSOCK_H
__ELF__
__FreeBSD__
__GNUC__
Dan Nicolaescu's avatar
Dan Nicolaescu committed
286
__GNU_LIBRARY__
Dan Nicolaescu's avatar
Update.  
Dan Nicolaescu committed
287
__GNUC_MINOR__
Dan Nicolaescu's avatar
Dan Nicolaescu committed
288 289 290 291 292 293 294 295 296 297
__NetBSD__
__OpenBSD__
__STDC__
__arch64__
__cplusplus
__hpux
__ia64__
__linux__
__mc68000__
__mips__
298 299
_longjmp
_setjmp
Dan Nicolaescu's avatar
Dan Nicolaescu committed
300 301 302
_start
abort
access
303
alloca
Dan Nicolaescu's avatar
Dan Nicolaescu committed
304 305 306 307 308 309 310 311 312 313 314 315
brk
calloc
chdir
chmod
chown
close
const
creat
ctime
dup
dup2
edata
316 317
emacs
etext
Dan Nicolaescu's avatar
Dan Nicolaescu committed
318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333
execlp
execvp
fdopen
fileno
fopen
free
fsync
ftruncate
fwrite
getdefdir
getdisk
getenv
getpid
getuid
gmtime
i386
334
index
Dan Nicolaescu's avatar
Dan Nicolaescu committed
335 336 337 338 339 340 341 342
init_process
isatty
kill
link
linux
localtime
logb
lseek
343
m68k
Dan Nicolaescu's avatar
Dan Nicolaescu committed
344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383
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
384