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. 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. ** Distinguishing OSes ** AIX _AIX BSD4_2 BSD_SYSTEM CYGWIN Compiling the Cygwin port. __CYGWIN__ Ditto GNU_LINUX HPUX IRIX6_5 MSDOS Compiling the MS-DOS port. __MSDOS__ Ditto. __DJGPP_MINOR__ Minor version number of the DJGPP library; used only in msdos.c and dosfns.c. 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. DARWIN_OS Compiling on Mac OS X or pure Darwin (and using s/darwin.h). SOLARIS2 USG USG5 USG5_4 ** Distinguishing GUIs ** HAVE_NTGUI Use the native W32 GUI for windows, frames, menus&scrollbars. HAVE_NS Use the NeXT/OpenStep/Cocoa UI under Mac OS X or GNUstep. NS_IMPL_GNUSTEP Compile support for GNUstep implementation of NS GUI API. NS_IMPL_COCOA Compile support for Cocoa (Apple) implementation of NS GUI API. HAVE_X11 Compile support for the X11 GUI. HAVE_X_WINDOWS Compile support for X Window system (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.) 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. ** 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.) ** Support for accessing other processes on the system ** HAVE_PROCFS The /proc filesystem is supported. ** Compile-time options ** REL_ALLOC Compile in the relocatable memory allocator ralloc.c. SYSTEM_MALLOC Use the system library's malloc. 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. ** System specific macros FIRST_PTY_LETTER HAVE_PTYS INTERRUPT_INPUT NARROWPROTO SEPCHAR SYSTEM_TYPE ** Misc macros USER_FULL_NAME If defined, overrides the default pw->pw_gecos for getting at the full user name. Only MSDOS overrides the default. ** Miscellaneous defines. Some of these might not be used in the code anymore, so they can be removed. AMPERSAND_FULL_NAME BROKEN_DATAGRAM_SOCKETS BROKEN_FIONREAD BROKEN_GET_CURRENT_DIR_NAME BROKEN_NON_BLOCKING_CONNECT BROKEN_PTY_READ_AFTER_EAGAIN BROKEN_SA_RESTART BROKEN_SIGAIO BROKEN_SIGIO BROKEN_SIGPOLL BROKEN_SIGPTY CLASH_DETECTION DATA_SEG_BITS DATA_START 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 GC_MARK_STACK GC_SETJMP_WORKS GNU_MALLOC HAVE_AIX_SMT_EXP HAVE_CBRT HAVE_CLOSEDIR HAVE_DUP2 HAVE_EUIDACCESS HAVE_FMOD HAVE_FPATHCONF HAVE_FREXP HAVE_FSYNC HAVE_GETCWD HAVE_GETHOSTNAME HAVE_GETLOADAVG HAVE_GETPAGESIZE HAVE_GETPT HAVE_GETTIMEOFDAY HAVE_GETWD HAVE_H_ERRNO HAVE_INET_SOCKETS 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 HAVE_SELECT HAVE_SETLOCALE HAVE_SETPGID HAVE_SETRLIMIT HAVE_SETSID HAVE_SHUTDOWN HAVE_SOCKETS HAVE_SOUND HAVE_STDLIB_H HAVE_STRING_H HAVE_STRUCT_UTIMBUF HAVE_SYS_SELECT_H HAVE_SYS_SYSTEMINFO_H HAVE_SYS_TIMEB_H HAVE_SYS_TIME_H HAVE_TCATTR HAVE_TM_ZONE HAVE_TZSET HAVE_UNISTD_H HAVE_UTIME_H HAVE_WINDOW_SYSTEM HAVE_WORKING_VFORK HAVE_XRMSETDATABASE INTERNAL_TERMINAL IS_ANY_SEP IS_DIRECTORY_SEP LOCALTIME_CACHE MAIL_USE_FLOCK MAIL_USE_LOCKF MAIL_USE_POP MAIL_USE_SYSTEM_LOCK MAXPATHLEN MUST_UNDEF__STDC__ NLIST_STRUCT NO_ABORT NO_EDITRES NO_MATHERR NO_TERMIO NSIG NSIG_MINIMUM NULL_DEVICE ORDINARY_LINK O_RDONLY O_RDWR PAGESIZE PENDING_OUTPUT_COUNT PREFER_VSUSP PTY_ITERATION PTY_NAME_SPRINTF PTY_OPEN PTY_TTY_NAME_SPRINTF PURESIZE RUN_TIME_REMAP SA_RESTART SETPGRP_RELEASES_CTTY SETUP_SLAVE_PTY SIGALRM SIGCHLD SIGHUP SIGKILL SIGNALS_VIA_CHARACTERS SIGPIPE SIGQUIT SIGTRAP STDC_HEADERS SYSTEM_PURESIZE_EXTRA SYSTEM_MALLOC TAB3 TABDLY TERM TIME_WITH_SYS_TIME TIOCSIGSEND TM_IN_SYS_TIME ULIMIT_BREAK_VALUE UNIX98_PTYS USE_CRT_DLL USE_TOOLKIT_SCROLL_BARS USG_SUBTTY_WORKS VALBITS XOS_NEEDS_TIME_H _FILE_OFFSET_BITS _LP64 _NAIVE_DOS_REGS _VARARGS_ _WINSOCKAPI_ _WINSOCK_H _longjmp _setjmp _start abort alloca close emacs free gmtime localtime malloc random read realloc select umask vfork src/sysdep.c: write src/syssignal.h: signal sigmask sigsetmask lib/dup2.c: dup2 lib/signal.h: signal lib/sigprocmask.c: signal lib/stdio.h: fdopen fopen fwrite popen rename lib/stdlib.h: calloc srandom (conf_post.h may undo) lib/strftime.c: tzname tzset lib/sys/stat.h: mkdir lib/unistd.h: chown dup dup2 ftruncate isatty link lseek pipe rmdir sleep unlink MS compat stuff: ms-w32.h: access calloc chdir chmod chown creat ctime dup dup2 execlp execvp (also emacsclient.c [WINDOWSNT]) fdopen fileno fopen fsync ftruncate getdefdir getdisk getpid isatty kill link logb lseek mkdir mktemp open pclose pipe popen rename rmdir signal sleep spawnve strdup stricmp strnicmp strupr sys_nerr tzname tzset umask unlink utimbuf utime wait (also movemail.c [WINDOWSNT]) write lib-src/ntlib: access chdir chmod creat dup dup2 execlp execvp fdopen fileno fopen getpid index isatty logb lseek mkdir mktemp open pclose pipe popen rmdir rindex sleep umask unlink utime