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