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