CPP-DEFINES 5.4 KB
Newer Older
Stefan Monnier's avatar
Stefan Monnier committed
1 2
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.
Glenn Morris's avatar
Glenn Morris committed
3 4 5 6
Most of these are from config.in, so it's probably better to put the
explanations in that file.  Ideally, everything would be defined and
documented in config.in, and this file would not be necessary.

Stefan Monnier's avatar
Stefan Monnier committed
7 8 9

** Distinguishing OSes **

Glenn Morris's avatar
Glenn Morris committed
10 11 12 13
AIX
_AIX
BSD4_2
BSD_SYSTEM
Stefan Monnier's avatar
Stefan Monnier committed
14
CYGWIN		Compiling the Cygwin port.
Eli Zaretskii's avatar
Eli Zaretskii committed
15
__CYGWIN__	Ditto
Glenn Morris's avatar
Glenn Morris committed
16 17 18
GNU_LINUX
HPUX
IRIX6_5
Eli Zaretskii's avatar
Eli Zaretskii committed
19 20
MSDOS		Compiling the MS-DOS port.
__MSDOS__	Ditto.
21
__DJGPP_MINOR__ Minor version number of the DJGPP library; used only in msdos.c and dosfns.c.
Eli Zaretskii's avatar
Eli Zaretskii committed
22 23 24 25
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.
26
DARWIN_OS	Compiling on Mac OS X or pure Darwin (and using s/darwin.h).
Glenn Morris's avatar
Glenn Morris committed
27 28 29 30
SOLARIS2
USG
USG5
USG5_4
Stefan Monnier's avatar
Stefan Monnier committed
31 32 33

** Distinguishing GUIs **

Eli Zaretskii's avatar
Eli Zaretskii committed
34
HAVE_NTGUI	Use the native W32 GUI for windows, frames, menus&scrollbars.
35
HAVE_NS		Use the NeXT/OpenStep/Cocoa UI under Mac OS X or GNUstep.
Glenn Morris's avatar
Glenn Morris committed
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.
Stefan Monnier's avatar
Stefan Monnier committed
38
HAVE_X11	Compile support for the X11 GUI.
Eli Zaretskii's avatar
Eli Zaretskii committed
39
HAVE_X_WINDOWS	Compile support for X Window system
40 41 42
  (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
43 44 45 46
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
47 48 49 50 51 52 53 54
** 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.)

55 56 57 58
** Support for accessing other processes on the system **

HAVE_PROCFS     The /proc filesystem is supported.

Eli Zaretskii's avatar
Eli Zaretskii committed
59
** Compile-time options **
60

Eli Zaretskii's avatar
Eli Zaretskii committed
61 62
REL_ALLOC	Compile in the relocatable memory allocator ralloc.c.
SYSTEM_MALLOC	Use the system library's malloc.
Glenn Morris's avatar
Glenn Morris committed
63 64 65 66
subprocesses    System can use subprocesses (for M-x shell for example).
                Defined by default, only MSDOS undefines it.
DEBUG_LISP_OBJECT_TYPE Define it in lisp.h enable compile time checks
                       on Lisp_Object use.
Eli Zaretskii's avatar
Eli Zaretskii committed
67

Glenn Morris's avatar
Glenn Morris committed
68
** System specific macros
69 70 71 72 73 74 75
FIRST_PTY_LETTER
HAVE_PTYS
INTERRUPT_INPUT
NARROWPROTO
SEPCHAR
SYSTEM_TYPE

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

Glenn Morris's avatar
Glenn Morris committed
80 81
** Miscellaneous defines.  Some of these might not be used in the code
anymore, so they can be removed.
Dan Nicolaescu's avatar
Dan Nicolaescu committed
82 83 84

AMPERSAND_FULL_NAME
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
BROKEN_SIGPOLL
BROKEN_SIGPTY
94
CLASH_DETECTION
95 96
DATA_SEG_BITS
DATA_START
Dan Nicolaescu's avatar
Dan Nicolaescu committed
97 98 99 100 101 102 103 104 105 106 107 108 109
DEFAULT_SOUND_DEVICE
DEVICE_SEP
DIRECTORY_SEP
DONT_REOPEN_PTY
DOUG_LEA_MALLOC
DebPrint
EMACSDEBUG
EMACS_CONFIGURATION
EMACS_CONFIG_OPTIONS
EMACS_INT
EMACS_UINT
FLOAT_CHECK_DOMAIN
GC_MARK_SECONDARY_STACK
110 111 112
GC_MARK_STACK
GC_SETJMP_WORKS
GNU_MALLOC
Dan Nicolaescu's avatar
Dan Nicolaescu committed
113 114
HAVE_AIX_SMT_EXP
HAVE_CBRT
115
HAVE_CLOSEDIR
Dan Nicolaescu's avatar
Dan Nicolaescu committed
116 117 118 119 120 121 122 123 124 125 126
HAVE_DUP2
HAVE_EUIDACCESS
HAVE_FMOD
HAVE_FPATHCONF
HAVE_FREXP
HAVE_FSYNC
HAVE_GETCWD
HAVE_GETHOSTNAME
HAVE_GETLOADAVG
HAVE_GETPAGESIZE
HAVE_GETPT
127
HAVE_GETTIMEOFDAY
Dan Nicolaescu's avatar
Dan Nicolaescu committed
128 129
HAVE_GETWD
HAVE_H_ERRNO
130
HAVE_INET_SOCKETS
Dan Nicolaescu's avatar
Dan Nicolaescu committed
131 132 133 134 135 136 137 138 139 140 141 142 143
HAVE_INVERSE_HYPERBOLIC
HAVE_LIBKSTAT
HAVE_LINUX_VERSION_H
HAVE_LOGB
HAVE_LONG_FILE_NAMES
HAVE_LRAND48
HAVE_MENUS
HAVE_MOUSE
HAVE_PSTAT_GETDYNAMIC
HAVE_PWD_H
HAVE_RANDOM
HAVE_RES_INIT
HAVE_RINT
144
HAVE_SELECT
Dan Nicolaescu's avatar
Dan Nicolaescu committed
145 146 147 148 149
HAVE_SETLOCALE
HAVE_SETPGID
HAVE_SETRLIMIT
HAVE_SETSID
HAVE_SHUTDOWN
150
HAVE_SOCKETS
Dan Nicolaescu's avatar
Dan Nicolaescu committed
151 152
HAVE_SOUND
HAVE_STDLIB_H
Dan Nicolaescu's avatar
Dan Nicolaescu committed
153
HAVE_STRING_H
Dan Nicolaescu's avatar
Dan Nicolaescu committed
154 155 156 157 158
HAVE_STRUCT_UTIMBUF
HAVE_SYS_SELECT_H
HAVE_SYS_SYSTEMINFO_H
HAVE_SYS_TIMEB_H
HAVE_SYS_TIME_H
159
HAVE_TCATTR
Dan Nicolaescu's avatar
Dan Nicolaescu committed
160 161
HAVE_TM_ZONE
HAVE_TZSET
162
HAVE_UNISTD_H
Dan Nicolaescu's avatar
Dan Nicolaescu committed
163 164 165 166 167 168 169 170
HAVE_UTIME_H
HAVE_WINDOW_SYSTEM
HAVE_WORKING_VFORK
HAVE_XRMSETDATABASE
INTERNAL_TERMINAL
IS_ANY_SEP
IS_DIRECTORY_SEP
LOCALTIME_CACHE
171
MAIL_USE_FLOCK
Dan Nicolaescu's avatar
Dan Nicolaescu committed
172 173 174 175 176
MAIL_USE_LOCKF
MAIL_USE_POP
MAIL_USE_SYSTEM_LOCK
MAXPATHLEN
MUST_UNDEF__STDC__
177
NLIST_STRUCT
Dan Nicolaescu's avatar
Dan Nicolaescu committed
178
NO_ABORT
Dan Nicolaescu's avatar
Dan Nicolaescu committed
179 180
NO_EDITRES
NO_MATHERR
181 182 183
NO_TERMIO
NSIG
NSIG_MINIMUM
Dan Nicolaescu's avatar
Dan Nicolaescu committed
184
NULL_DEVICE
185
ORDINARY_LINK
Dan Nicolaescu's avatar
Dan Nicolaescu committed
186 187 188
O_RDONLY
O_RDWR
PAGESIZE
189 190 191
PENDING_OUTPUT_COUNT
PREFER_VSUSP
PTY_ITERATION
192
PTY_NAME_SPRINTF
193
PTY_OPEN
194
PTY_TTY_NAME_SPRINTF
195 196
PURESIZE
RUN_TIME_REMAP
Dan Nicolaescu's avatar
Dan Nicolaescu committed
197 198
SA_RESTART
SETPGRP_RELEASES_CTTY
199
SETUP_SLAVE_PTY
Dan Nicolaescu's avatar
Dan Nicolaescu committed
200 201 202 203
SIGALRM
SIGCHLD
SIGHUP
SIGKILL
204
SIGNALS_VIA_CHARACTERS
Dan Nicolaescu's avatar
Dan Nicolaescu committed
205 206 207 208 209
SIGPIPE
SIGQUIT
SIGTRAP
STDC_HEADERS
SYSTEM_PURESIZE_EXTRA
Dan Nicolaescu's avatar
Dan Nicolaescu committed
210
SYSTEM_MALLOC
Dan Nicolaescu's avatar
Dan Nicolaescu committed
211 212
TAB3
TABDLY
Dan Nicolaescu's avatar
Dan Nicolaescu committed
213 214 215 216
TERM
TIME_WITH_SYS_TIME
TIOCSIGSEND
TM_IN_SYS_TIME
217
ULIMIT_BREAK_VALUE
Dan Nicolaescu's avatar
Dan Nicolaescu committed
218 219 220 221 222
UNIX98_PTYS
USE_CRT_DLL
USE_TOOLKIT_SCROLL_BARS
USG_SUBTTY_WORKS
VALBITS
Dan Nicolaescu's avatar
Dan Nicolaescu committed
223
XOS_NEEDS_TIME_H
Dan Nicolaescu's avatar
Dan Nicolaescu committed
224 225 226 227 228 229
_FILE_OFFSET_BITS
_LP64
_NAIVE_DOS_REGS
_VARARGS_
_WINSOCKAPI_
_WINSOCK_H
230 231
_longjmp
_setjmp
Dan Nicolaescu's avatar
Dan Nicolaescu committed
232 233 234
_start
abort
access
235
alloca
Dan Nicolaescu's avatar
Dan Nicolaescu committed
236 237 238 239 240 241 242 243 244 245 246
brk
calloc
chdir
chmod
chown
close
creat
ctime
dup
dup2
edata
247 248
emacs
etext
Dan Nicolaescu's avatar
Dan Nicolaescu committed
249 250 251 252 253 254 255 256 257 258 259 260 261 262 263
execlp
execvp
fdopen
fileno
fopen
free
fsync
ftruncate
fwrite
getdefdir
getdisk
getenv
getpid
getuid
gmtime
264
index
Dan Nicolaescu's avatar
Dan Nicolaescu committed
265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310
isatty
kill
link
linux
localtime
logb
lseek
malloc
mkdir
mktemp
open
pclose
pipe
popen
random
read
realloc
rename
rindex
rmdir
sbrk
select
sigmask
signal
sigsetmask
sleep
spawnve
srandom
strdup
stricmp
strnicmp
strupr
sys_nerr
system
temacs
tzname
tzset
umask
unix
unlink
utimbuf
utime
vfork
wait
write
xfree