* xterm.c: Fix problems found by static analysis with other toolkits.
[bpt/emacs.git] / admin / CPP-DEFINES
CommitLineData
aa5fea59
SM
1Here are some of the cpp macros used, together with some short explanation
2of their use. Feel free to add more macros and more categories.
3
4** Distinguishing OSes **
5
aa5fea59 6CYGWIN Compiling the Cygwin port.
077e3aa8
EZ
7__CYGWIN__ Ditto
8MSDOS Compiling the MS-DOS port.
9__MSDOS__ Ditto.
796bb936 10__DJGPP_MINOR__ Minor version number of the DJGPP library; used only in msdos.c and dosfns.c.
077e3aa8
EZ
11DOS_NT Compiling for either the MS-DOS or native MS-Windows port.
12WINDOWSNT Compiling the native MS-Windows (W32) port.
13__MINGW32__ Compiling the W32 port with the MinGW port of GCC.
14_MSC_VER Compiling the W32 port with the Microsoft C compiler.
14145fa3 15DARWIN_OS Compiling on Mac OS X or pure Darwin (and using s/darwin.h).
aa5fea59
SM
16
17** Distinguishing GUIs **
18
077e3aa8 19HAVE_NTGUI Use the native W32 GUI for windows, frames, menus&scrollbars.
14145fa3 20HAVE_NS Use the NeXT/OpenStep/Cocoa UI under Mac OS X or GNUstep.
d1a5744d 21NS_IMPL_GNUSTEP Compile support for GNUstep implementation of NS GUI API.
edfda783 22NS_IMPL_COCOA Compile support for Cocoa (Apple) implementation of NS GUI API.
aa5fea59 23HAVE_X11 Compile support for the X11 GUI.
077e3aa8 24HAVE_X_WINDOWS Compile support for X Window system
3df7b338
GM
25 (It looks like, nowadays, if HAVE_X11 is set, HAVE_X_WINDOWS must
26 be, and vice versa. At least, this is true for configure, and
27 msdos; not sure about nt.)
aa5fea59
SM
28USE_LUCID Use the Lucid toolkit for menus&scrollbars. Requires HAVE_X11.
29USE_MOTIF Use the Motif toolkit for menus&scrollbars. Requires HAVE_X11.
30USE_GTK Use the Gtk toolkit for menus&scrollbars. Requires HAVE_X11.
31
077e3aa8
EZ
32** Frame types **
33
34FRAME_TERMCAP_P A tty (character terminal) frame.
35FRAME_X_P A frame on X Window system.
36FRAME_MSDOS_P An MS-DOS frame (used only by the DOS port).
077e3aa8
EZ
37FRAME_W32_P A frame using native MS-Windows GUI.
38FRAME_WINDOW_P A GUI frame (like X, w32, etc.)
39
c3179b06
EZ
40** Support for accessing other processes on the system **
41
42HAVE_PROCFS The /proc filesystem is supported.
c3179b06 43
077e3aa8 44** Compile-time options **
c3179b06 45
077e3aa8
EZ
46REL_ALLOC Compile in the relocatable memory allocator ralloc.c.
47SYSTEM_MALLOC Use the system library's malloc.
bbbac910 48subprocesses System can use subprocesses (for M-x shell for example). Defined by default, only MSDOS undefines it.
14145fa3 49USE_LISP_UNION_TYPE Define it in lisp.h to make Lisp_Object be a union type instead of the default int.
077e3aa8 50
0f21c005 51** System specific macros, decribed in detail in src/s/template.h
0f21c005
DN
52CLASH_DETECTION
53COFF
54FIRST_PTY_LETTER
55HAVE_PTYS
56HAVE_TERMIO
57HAVE_TERMIOS
58INTERRUPT_INPUT
0f21c005 59NARROWPROTO
0f21c005 60SEPCHAR
0f21c005 61SYSTEM_TYPE
0f21c005
DN
62
63** Machine specific macros, decribed in detail in src/m/template.h
0f21c005 64VIRT_ADDR_VARIES
0f21c005 65
2b5b9582
EZ
66** Misc macros
67USER_FULL_NAME If defined, overrides the default pw->pw_gecos for getting at the full user name. Only MSDOS overrides the default.
68
4624371d 69** Replace, the definition is trivial: SWITCH_ENUM_CAST
d35e1cd7 70
a0ce9ab7
DN
71** 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.
72
d35e1cd7 73
a0ce9ab7
DN
74AIX
75AMPERSAND_FULL_NAME
a0ce9ab7
DN
76BITS_PER_EMACS_INT
77BITS_PER_LONG
97560d35
GM
78BITS_PER_CHAR
79BITS_PER_SHORT
80BITS_PER_INT
a0ce9ab7 81BROKEN_DATAGRAM_SOCKETS
f3041af1 82BROKEN_FIONREAD
a0ce9ab7
DN
83BROKEN_GET_CURRENT_DIR_NAME
84BROKEN_NON_BLOCKING_CONNECT
85BROKEN_PTY_READ_AFTER_EAGAIN
86BROKEN_SA_RESTART
87BROKEN_SIGAIO
f3041af1 88BROKEN_SIGIO
a0ce9ab7
DN
89BROKEN_SIGPOLL
90BROKEN_SIGPTY
a0ce9ab7 91BSD4_2
f3041af1 92BSD4_3
d35e1cd7 93BSD_SYSTEM
d35e1cd7 94CLASH_DETECTION
f3041af1
DN
95DATA_SEG_BITS
96DATA_START
a0ce9ab7 97DBL_MIN_REPLACEMENT
a0ce9ab7
DN
98DEFAULT_SOUND_DEVICE
99DEVICE_SEP
100DIRECTORY_SEP
101DONT_REOPEN_PTY
a0ce9ab7
DN
102DOUG_LEA_MALLOC
103DebPrint
104EMACSDEBUG
105EMACS_CONFIGURATION
106EMACS_CONFIG_OPTIONS
107EMACS_INT
108EMACS_UINT
a0ce9ab7 109FILE_SYSTEM_CASE
a0ce9ab7 110FLOAT_CHECK_DOMAIN
a0ce9ab7
DN
111GC_LISP_OBJECT_ALIGNMENT
112GC_MARK_SECONDARY_STACK
f3041af1
DN
113GC_MARK_STACK
114GC_SETJMP_WORKS
a0ce9ab7
DN
115GMALLOC_INHIBIT_VALLOC
116GNU_LIBRARY_PENDING_OUTPUT_COUNT
117GNU_LINUX
f3041af1 118GNU_MALLOC
a0ce9ab7 119HAVE_AIX_SMT_EXP
a0ce9ab7 120HAVE_CBRT
f3041af1 121HAVE_CLOSEDIR
a0ce9ab7
DN
122HAVE_DUP2
123HAVE_EUIDACCESS
a0ce9ab7
DN
124HAVE_FMOD
125HAVE_FPATHCONF
126HAVE_FREXP
127HAVE_FSYNC
128HAVE_FTIME
129HAVE_GETCWD
130HAVE_GETDOMAINNAME
131HAVE_GETHOSTNAME
132HAVE_GETLOADAVG
133HAVE_GETPAGESIZE
134HAVE_GETPT
f3041af1 135HAVE_GETTIMEOFDAY
a0ce9ab7
DN
136HAVE_GETWD
137HAVE_H_ERRNO
f3041af1 138HAVE_INET_SOCKETS
a0ce9ab7 139HAVE_INVERSE_HYPERBOLIC
a0ce9ab7 140HAVE_LIBKSTAT
a0ce9ab7
DN
141HAVE_LIMITS_H
142HAVE_LINUX_VERSION_H
143HAVE_LOGB
144HAVE_LONG_FILE_NAMES
145HAVE_LRAND48
146HAVE_MENUS
147HAVE_MKDIR
148HAVE_MKTIME
149HAVE_MOUSE
150HAVE_PERROR
151HAVE_PSTAT_GETDYNAMIC
a0ce9ab7
DN
152HAVE_PWD_H
153HAVE_RANDOM
154HAVE_RENAME
155HAVE_RES_INIT
a0ce9ab7
DN
156HAVE_RINT
157HAVE_RMDIR
f3041af1 158HAVE_SELECT
a0ce9ab7
DN
159HAVE_SETLOCALE
160HAVE_SETPGID
161HAVE_SETRLIMIT
162HAVE_SETSID
163HAVE_SHUTDOWN
d35e1cd7 164HAVE_SOCKETS
a0ce9ab7
DN
165HAVE_SOUND
166HAVE_STDLIB_H
167HAVE_STRERROR
168HAVE_STRFTIME
f2a77c3a 169HAVE_STRING_H
a0ce9ab7
DN
170HAVE_STRUCT_UTIMBUF
171HAVE_SYSINFO
f3041af1 172HAVE_SYSV_SIGPAUSE
a0ce9ab7
DN
173HAVE_SYS_SELECT_H
174HAVE_SYS_SYSTEMINFO_H
175HAVE_SYS_TIMEB_H
176HAVE_SYS_TIME_H
f3041af1 177HAVE_TCATTR
a0ce9ab7 178HAVE_TERMIOS_H
a0ce9ab7
DN
179HAVE_TIMEVAL
180HAVE_TM_ZONE
181HAVE_TZSET
f3041af1 182HAVE_UNISTD_H
f3041af1 183HAVE_UTIMES
a0ce9ab7 184HAVE_UTIME_H
a0ce9ab7
DN
185HAVE_WINDOW_SYSTEM
186HAVE_WORKING_VFORK
187HAVE_XRMSETDATABASE
188HPUX
a0ce9ab7 189INTERNAL_TERMINAL
a0ce9ab7
DN
190IS_ANY_SEP
191IS_DIRECTORY_SEP
f3041af1 192LINKER
0176a259 193LINUX_VERSION_CODE
a0ce9ab7
DN
194LISP_FLOAT_TYPE
195LNOFLSH
a0ce9ab7 196LOCALTIME_CACHE
1495e2fc 197MAIL_USE_FLOCK
a0ce9ab7
DN
198MAIL_USE_LOCKF
199MAIL_USE_POP
200MAIL_USE_SYSTEM_LOCK
201MAXPATHLEN
c5e7567d 202MIN_PTY_KERNEL_VERSION -- only used on Mac
a0ce9ab7 203MODE_LINE_BINARY_TEXT
a0ce9ab7 204MUST_UNDEF__STDC__
f3041af1 205NLIST_STRUCT
f2a77c3a 206NO_ABORT
a0ce9ab7 207NO_EDITRES
a0ce9ab7 208NO_MATHERR
f3041af1 209NO_TERMIO
f3041af1
DN
210NSIG
211NSIG_MINIMUM
a0ce9ab7
DN
212NULL
213NULL_DEVICE
f3041af1 214ORDINARY_LINK
a0ce9ab7 215O_APPEND
a0ce9ab7
DN
216O_RDONLY
217O_RDWR
a0ce9ab7 218PAGESIZE
f3041af1 219PENDING_OUTPUT_COUNT
a0ce9ab7 220POSIX
f3041af1
DN
221PREFER_VSUSP
222PTY_ITERATION
d35e1cd7 223PTY_NAME_SPRINTF
f3041af1 224PTY_OPEN
d35e1cd7 225PTY_TTY_NAME_SPRINTF
f3041af1 226PURESIZE
f3041af1 227RUN_TIME_REMAP
a0ce9ab7 228SA_RESTART
f3041af1 229SEGMENT_MASK
a0ce9ab7 230SETPGRP_RELEASES_CTTY
f3041af1 231SETUP_SLAVE_PTY
a0ce9ab7
DN
232SIGALRM
233SIGCHLD
234SIGHUP
235SIGKILL
f3041af1 236SIGNALS_VIA_CHARACTERS
a0ce9ab7
DN
237SIGPIPE
238SIGQUIT
239SIGTRAP
a0ce9ab7 240SOLARIS2
a0ce9ab7 241STDC_HEADERS
a0ce9ab7 242SYSTEM_PURESIZE_EXTRA
bbbac910 243SYSTEM_MALLOC
f3041af1 244SYSV_SYSTEM_DIR
f2a77c3a
DN
245TAB3
246TABDLY
a0ce9ab7 247TERM
a0ce9ab7
DN
248TIME_WITH_SYS_TIME
249TIOCSIGSEND
250TM_IN_SYS_TIME
f3041af1 251ULIMIT_BREAK_VALUE
a0ce9ab7
DN
252UNIX98_PTYS
253USE_CRT_DLL
a0ce9ab7 254USE_TOOLKIT_SCROLL_BARS
f3041af1
DN
255USG
256USG5
f3041af1 257USG5_4
a0ce9ab7
DN
258USG_SUBTTY_WORKS
259VALBITS
a0ce9ab7 260WRETCODE
a0ce9ab7 261XINT
f2a77c3a 262XOS_NEEDS_TIME_H
a0ce9ab7
DN
263XPNTR
264XSET
265XUINT
a0ce9ab7
DN
266_AIX
267_ARCH_PPC64
268_CALLBACK_
269_FILE_OFFSET_BITS
a0ce9ab7
DN
270_LP64
271_MALLOC_INTERNAL
272_NAIVE_DOS_REGS
273_VARARGS_
274_WINSOCKAPI_
275_WINSOCK_H
276__ELF__
277__FreeBSD__
a0ce9ab7 278__GNUC__
bbbac910 279__GNU_LIBRARY__
0176a259 280__GNUC_MINOR__
a0ce9ab7
DN
281__NetBSD__
282__OpenBSD__
283__STDC__
284__arch64__
285__cplusplus
286__hpux
287__ia64__
288__linux__
289__mc68000__
290__mips__
f3041af1
DN
291_longjmp
292_setjmp
a0ce9ab7
DN
293_start
294abort
295access
f3041af1 296alloca
a0ce9ab7 297brk
a0ce9ab7
DN
298calloc
299chdir
300chmod
301chown
302close
303const
304creat
305ctime
a0ce9ab7
DN
306dup
307dup2
308edata
f3041af1 309emacs
f3041af1 310etext
a0ce9ab7
DN
311execlp
312execvp
a0ce9ab7 313fdopen
a0ce9ab7 314fileno
a0ce9ab7 315fopen
a0ce9ab7
DN
316free
317fsync
318ftruncate
319fwrite
320getdefdir
321getdisk
322getenv
323getpid
324getuid
a0ce9ab7
DN
325gmtime
326i386
f3041af1 327index
a0ce9ab7
DN
328init_process
329isatty
330kill
331link
332linux
333localtime
334logb
335lseek
f3041af1 336m68k
a0ce9ab7 337malloc
a0ce9ab7
DN
338mkdir
339mktemp
340open
341pclose
342pipe
343popen
a0ce9ab7
DN
344random
345read
346realloc
347rename
348rindex
349rmdir
350sbrk
351select
352sigmask
353signal
354sigsetmask
355sleep
356spawnve
357srandom
a0ce9ab7
DN
358strdup
359strerror
360stricmp
361strnicmp
362strupr
a0ce9ab7
DN
363sys_nerr
364system
365temacs
366tzname
367tzset
368umask
369unix
370unlink
371utimbuf
372utime
373vfork
374wait
375write
376xfree