| 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. |
| 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 | |
| 7 | |
| 8 | ** Distinguishing OSes ** |
| 9 | |
| 10 | AIX |
| 11 | _AIX |
| 12 | BSD4_2 |
| 13 | BSD_SYSTEM |
| 14 | CYGWIN Compiling the Cygwin port. |
| 15 | __CYGWIN__ Ditto |
| 16 | GNU_LINUX |
| 17 | HPUX |
| 18 | IRIX6_5 |
| 19 | MSDOS Compiling the MS-DOS port. |
| 20 | __MSDOS__ Ditto. |
| 21 | __DJGPP_MINOR__ Minor version number of the DJGPP library; used only in msdos.c and dosfns.c. |
| 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. |
| 26 | DARWIN_OS Compiling on Mac OS X or pure Darwin (and using s/darwin.h). |
| 27 | SOLARIS2 |
| 28 | USG |
| 29 | USG5 |
| 30 | USG5_4 |
| 31 | |
| 32 | ** Distinguishing GUIs ** |
| 33 | |
| 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. |
| 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. |
| 38 | HAVE_X11 Compile support for the X11 GUI. |
| 39 | HAVE_X_WINDOWS Compile support for X Window system |
| 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.) |
| 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 | |
| 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). |
| 52 | FRAME_W32_P A frame using native MS-Windows GUI. |
| 53 | FRAME_WINDOW_P A GUI frame (like X, w32, etc.) |
| 54 | |
| 55 | ** Support for accessing other processes on the system ** |
| 56 | |
| 57 | HAVE_PROCFS The /proc filesystem is supported. |
| 58 | |
| 59 | ** Compile-time options ** |
| 60 | |
| 61 | REL_ALLOC Compile in the relocatable memory allocator ralloc.c. |
| 62 | SYSTEM_MALLOC Use the system library's malloc. |
| 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. |
| 67 | |
| 68 | ** System specific macros |
| 69 | FIRST_PTY_LETTER |
| 70 | HAVE_PTYS |
| 71 | INTERRUPT_INPUT |
| 72 | NARROWPROTO |
| 73 | SEPCHAR |
| 74 | SYSTEM_TYPE |
| 75 | |
| 76 | ** Misc macros |
| 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. |
| 79 | |
| 80 | ** Miscellaneous defines. Some of these might not be used in the code |
| 81 | anymore, so they can be removed. |
| 82 | |
| 83 | AMPERSAND_FULL_NAME |
| 84 | BROKEN_DATAGRAM_SOCKETS |
| 85 | BROKEN_FIONREAD |
| 86 | BROKEN_GET_CURRENT_DIR_NAME |
| 87 | BROKEN_NON_BLOCKING_CONNECT |
| 88 | BROKEN_PTY_READ_AFTER_EAGAIN |
| 89 | BROKEN_SA_RESTART |
| 90 | BROKEN_SIGAIO |
| 91 | BROKEN_SIGIO |
| 92 | BROKEN_SIGPOLL |
| 93 | BROKEN_SIGPTY |
| 94 | CLASH_DETECTION |
| 95 | DATA_SEG_BITS |
| 96 | DATA_START |
| 97 | DEFAULT_SOUND_DEVICE |
| 98 | DEVICE_SEP |
| 99 | DIRECTORY_SEP |
| 100 | DONT_REOPEN_PTY |
| 101 | DOUG_LEA_MALLOC |
| 102 | DebPrint |
| 103 | EMACSDEBUG |
| 104 | EMACS_CONFIGURATION |
| 105 | EMACS_CONFIG_OPTIONS |
| 106 | EMACS_INT |
| 107 | EMACS_UINT |
| 108 | FLOAT_CHECK_DOMAIN |
| 109 | GC_MARK_SECONDARY_STACK |
| 110 | GC_MARK_STACK |
| 111 | GC_SETJMP_WORKS |
| 112 | GNU_MALLOC |
| 113 | HAVE_AIX_SMT_EXP |
| 114 | HAVE_CBRT |
| 115 | HAVE_CLOSEDIR |
| 116 | HAVE_DUP2 |
| 117 | HAVE_EUIDACCESS |
| 118 | HAVE_FMOD |
| 119 | HAVE_FPATHCONF |
| 120 | HAVE_FREXP |
| 121 | HAVE_FSYNC |
| 122 | HAVE_GETCWD |
| 123 | HAVE_GETHOSTNAME |
| 124 | HAVE_GETLOADAVG |
| 125 | HAVE_GETPAGESIZE |
| 126 | HAVE_GETPT |
| 127 | HAVE_GETTIMEOFDAY |
| 128 | HAVE_GETWD |
| 129 | HAVE_H_ERRNO |
| 130 | HAVE_INET_SOCKETS |
| 131 | HAVE_INVERSE_HYPERBOLIC |
| 132 | HAVE_LIBKSTAT |
| 133 | HAVE_LINUX_VERSION_H |
| 134 | HAVE_LOGB |
| 135 | HAVE_LONG_FILE_NAMES |
| 136 | HAVE_LRAND48 |
| 137 | HAVE_MENUS |
| 138 | HAVE_MOUSE |
| 139 | HAVE_PSTAT_GETDYNAMIC |
| 140 | HAVE_PWD_H |
| 141 | HAVE_RANDOM |
| 142 | HAVE_RES_INIT |
| 143 | HAVE_RINT |
| 144 | HAVE_SELECT |
| 145 | HAVE_SETLOCALE |
| 146 | HAVE_SETPGID |
| 147 | HAVE_SETRLIMIT |
| 148 | HAVE_SETSID |
| 149 | HAVE_SHUTDOWN |
| 150 | HAVE_SOCKETS |
| 151 | HAVE_SOUND |
| 152 | HAVE_STDLIB_H |
| 153 | HAVE_STRING_H |
| 154 | HAVE_STRUCT_UTIMBUF |
| 155 | HAVE_SYS_SELECT_H |
| 156 | HAVE_SYS_SYSTEMINFO_H |
| 157 | HAVE_SYS_TIMEB_H |
| 158 | HAVE_SYS_TIME_H |
| 159 | HAVE_TCATTR |
| 160 | HAVE_TM_ZONE |
| 161 | HAVE_TZSET |
| 162 | HAVE_UNISTD_H |
| 163 | HAVE_UTIME_H |
| 164 | HAVE_WINDOW_SYSTEM |
| 165 | HAVE_WORKING_VFORK |
| 166 | HAVE_XRMSETDATABASE |
| 167 | INTERNAL_TERMINAL |
| 168 | IS_ANY_SEP |
| 169 | IS_DIRECTORY_SEP |
| 170 | LOCALTIME_CACHE |
| 171 | MAIL_USE_FLOCK |
| 172 | MAIL_USE_LOCKF |
| 173 | MAIL_USE_POP |
| 174 | MAIL_USE_SYSTEM_LOCK |
| 175 | MAXPATHLEN |
| 176 | MUST_UNDEF__STDC__ |
| 177 | NLIST_STRUCT |
| 178 | NO_ABORT |
| 179 | NO_EDITRES |
| 180 | NO_MATHERR |
| 181 | NO_TERMIO |
| 182 | NSIG |
| 183 | NSIG_MINIMUM |
| 184 | NULL_DEVICE |
| 185 | ORDINARY_LINK |
| 186 | O_RDONLY |
| 187 | O_RDWR |
| 188 | PAGESIZE |
| 189 | PENDING_OUTPUT_COUNT |
| 190 | PREFER_VSUSP |
| 191 | PTY_ITERATION |
| 192 | PTY_NAME_SPRINTF |
| 193 | PTY_OPEN |
| 194 | PTY_TTY_NAME_SPRINTF |
| 195 | PURESIZE |
| 196 | RUN_TIME_REMAP |
| 197 | SA_RESTART |
| 198 | SETPGRP_RELEASES_CTTY |
| 199 | SETUP_SLAVE_PTY |
| 200 | SIGALRM |
| 201 | SIGCHLD |
| 202 | SIGHUP |
| 203 | SIGKILL |
| 204 | SIGNALS_VIA_CHARACTERS |
| 205 | SIGPIPE |
| 206 | SIGQUIT |
| 207 | SIGTRAP |
| 208 | STDC_HEADERS |
| 209 | SYSTEM_PURESIZE_EXTRA |
| 210 | SYSTEM_MALLOC |
| 211 | TAB3 |
| 212 | TABDLY |
| 213 | TERM |
| 214 | TIME_WITH_SYS_TIME |
| 215 | TIOCSIGSEND |
| 216 | TM_IN_SYS_TIME |
| 217 | ULIMIT_BREAK_VALUE |
| 218 | UNIX98_PTYS |
| 219 | USE_CRT_DLL |
| 220 | USE_TOOLKIT_SCROLL_BARS |
| 221 | USG_SUBTTY_WORKS |
| 222 | VALBITS |
| 223 | XOS_NEEDS_TIME_H |
| 224 | _FILE_OFFSET_BITS |
| 225 | _LP64 |
| 226 | _NAIVE_DOS_REGS |
| 227 | _VARARGS_ |
| 228 | _WINSOCKAPI_ |
| 229 | _WINSOCK_H |
| 230 | _longjmp |
| 231 | _setjmp |
| 232 | _start |
| 233 | abort |
| 234 | alloca |
| 235 | close |
| 236 | emacs |
| 237 | free |
| 238 | gmtime |
| 239 | localtime |
| 240 | malloc |
| 241 | random |
| 242 | read |
| 243 | realloc |
| 244 | select |
| 245 | umask |
| 246 | vfork |
| 247 | |
| 248 | |
| 249 | src/sysdep.c: |
| 250 | write |
| 251 | |
| 252 | src/syssignal.h: |
| 253 | signal |
| 254 | sigmask |
| 255 | sigsetmask |
| 256 | |
| 257 | |
| 258 | lib/dup2.c: |
| 259 | dup2 |
| 260 | |
| 261 | lib/signal.h: |
| 262 | signal |
| 263 | |
| 264 | lib/sigprocmask.c: |
| 265 | signal |
| 266 | |
| 267 | lib/stdio.h: |
| 268 | fdopen |
| 269 | fopen |
| 270 | fwrite |
| 271 | popen |
| 272 | rename |
| 273 | |
| 274 | lib/stdlib.h: |
| 275 | calloc |
| 276 | srandom (conf_post.h may undo) |
| 277 | |
| 278 | lib/strftime.c: |
| 279 | tzname |
| 280 | tzset |
| 281 | |
| 282 | lib/sys/stat.h: |
| 283 | mkdir |
| 284 | |
| 285 | lib/unistd.h: |
| 286 | chown |
| 287 | dup |
| 288 | dup2 |
| 289 | ftruncate |
| 290 | isatty |
| 291 | link |
| 292 | lseek |
| 293 | pipe |
| 294 | rmdir |
| 295 | sleep |
| 296 | unlink |
| 297 | |
| 298 | |
| 299 | MS compat stuff: |
| 300 | |
| 301 | ms-w32.h: |
| 302 | access |
| 303 | calloc |
| 304 | chdir |
| 305 | chmod |
| 306 | chown |
| 307 | creat |
| 308 | ctime |
| 309 | dup |
| 310 | dup2 |
| 311 | execlp |
| 312 | execvp (also emacsclient.c [WINDOWSNT]) |
| 313 | fdopen |
| 314 | fileno |
| 315 | fopen |
| 316 | fsync |
| 317 | ftruncate |
| 318 | getdefdir |
| 319 | getdisk |
| 320 | getpid |
| 321 | isatty |
| 322 | kill |
| 323 | link |
| 324 | logb |
| 325 | lseek |
| 326 | mkdir |
| 327 | mktemp |
| 328 | open |
| 329 | pclose |
| 330 | pipe |
| 331 | popen |
| 332 | rename |
| 333 | rmdir |
| 334 | signal |
| 335 | sleep |
| 336 | spawnve |
| 337 | strdup |
| 338 | stricmp |
| 339 | strnicmp |
| 340 | strupr |
| 341 | sys_nerr |
| 342 | tzname |
| 343 | tzset |
| 344 | umask |
| 345 | unlink |
| 346 | utimbuf |
| 347 | utime |
| 348 | wait (also movemail.c [WINDOWSNT]) |
| 349 | write |
| 350 | |
| 351 | lib-src/ntlib: |
| 352 | access |
| 353 | chdir |
| 354 | chmod |
| 355 | creat |
| 356 | dup |
| 357 | dup2 |
| 358 | execlp |
| 359 | execvp |
| 360 | fdopen |
| 361 | fileno |
| 362 | fopen |
| 363 | getpid |
| 364 | index |
| 365 | isatty |
| 366 | logb |
| 367 | lseek |
| 368 | mkdir |
| 369 | mktemp |
| 370 | open |
| 371 | pclose |
| 372 | pipe |
| 373 | popen |
| 374 | rmdir |
| 375 | rindex |
| 376 | sleep |
| 377 | umask |
| 378 | unlink |
| 379 | utime |