2007-12-10 17:02:42 +00:00
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.
** Distinguishing OSes **
CYGWIN Compiling the Cygwin port.
2007-12-14 12:41:12 +00:00
__CYGWIN__ Ditto
MSDOS Compiling the MS-DOS port.
__MSDOS__ Ditto.
2010-04-01 15:29:04 +00:00
__DJGPP_MINOR__ Minor version number of the DJGPP library; used only in msdos.c and dosfns.c.
2007-12-14 12:41:12 +00:00
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.
2008-08-04 14:39:27 +00:00
DARWIN_OS Compiling on Mac OS X or pure Darwin (and using s/darwin.h).
2007-12-10 17:02:42 +00:00
** Distinguishing GUIs **
2007-12-14 12:41:12 +00:00
HAVE_NTGUI Use the native W32 GUI for windows, frames, menus&scrollbars.
2008-08-04 14:39:27 +00:00
HAVE_NS Use the NeXT/OpenStep/Cocoa UI under Mac OS X or GNUstep.
2008-10-04 18:54:20 +00:00
NS_IMPL_GNUSTEP Compile support for GNUstep implementation of NS GUI API.
2008-07-15 18:15:18 +00:00
NS_IMPL_COCOA Compile support for Cocoa (Apple) implementation of NS GUI API.
2007-12-10 17:02:42 +00:00
HAVE_X11 Compile support for the X11 GUI.
2007-12-14 12:41:12 +00:00
HAVE_X_WINDOWS Compile support for X Window system
2010-05-15 00:54:24 +00:00
(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.)
2007-12-10 17:02:42 +00:00
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.
2007-12-14 12:41:12 +00:00
** 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.)
2008-08-02 18:56:20 +00:00
** Support for accessing other processes on the system **
HAVE_PROCFS The /proc filesystem is supported.
2007-12-14 12:41:12 +00:00
** Compile-time options **
2008-08-02 18:56:20 +00:00
2007-12-14 12:41:12 +00:00
REL_ALLOC Compile in the relocatable memory allocator ralloc.c.
SYSTEM_MALLOC Use the system library's malloc.
2008-07-23 07:03:32 +00:00
subprocesses System can use subprocesses (for M-x shell for example). Defined by default, only MSDOS undefines it.
2008-08-04 14:39:27 +00:00
USE_LISP_UNION_TYPE Define it in lisp.h to make Lisp_Object be a union type instead of the default int.
2007-12-14 12:41:12 +00:00
2011-11-20 03:48:53 +00:00
** System specific macros, described in detail in src/s/template.h
2008-10-18 07:56:05 +00:00
CLASH_DETECTION
COFF
FIRST_PTY_LETTER
HAVE_PTYS
INTERRUPT_INPUT
NARROWPROTO
SEPCHAR
SYSTEM_TYPE
2008-08-23 16:40:30 +00:00
** 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.
2008-02-09 18:03:10 +00:00
** Replace, the definition is trivial: SWITCH_ENUM_CAST
2008-01-05 11:14:48 +00:00
2008-07-10 06:54:56 +00:00
** 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.
2008-01-05 11:14:48 +00:00
2008-07-10 06:54:56 +00:00
AIX
AMPERSAND_FULL_NAME
BITS_PER_EMACS_INT
BITS_PER_LONG
2010-05-14 03:19:52 +00:00
BITS_PER_CHAR
BITS_PER_SHORT
BITS_PER_INT
2008-07-10 06:54:56 +00:00
BROKEN_DATAGRAM_SOCKETS
2008-01-06 00:56:56 +00:00
BROKEN_FIONREAD
2008-07-10 06:54:56 +00:00
BROKEN_GET_CURRENT_DIR_NAME
BROKEN_NON_BLOCKING_CONNECT
BROKEN_PTY_READ_AFTER_EAGAIN
BROKEN_SA_RESTART
BROKEN_SIGAIO
2008-01-06 00:56:56 +00:00
BROKEN_SIGIO
2008-07-10 06:54:56 +00:00
BROKEN_SIGPOLL
BROKEN_SIGPTY
BSD4_2
2008-01-06 00:56:56 +00:00
BSD4_3
2008-01-05 11:14:48 +00:00
BSD_SYSTEM
CLASH_DETECTION
2008-01-06 00:56:56 +00:00
DATA_SEG_BITS
DATA_START
2008-07-10 06:54:56 +00:00
DBL_MIN_REPLACEMENT
DEFAULT_SOUND_DEVICE
DEVICE_SEP
DIRECTORY_SEP
DONT_REOPEN_PTY
DOUG_LEA_MALLOC
DebPrint
EMACSDEBUG
EMACS_CONFIGURATION
EMACS_CONFIG_OPTIONS
EMACS_INT
EMACS_UINT
FILE_SYSTEM_CASE
FLOAT_CHECK_DOMAIN
GC_LISP_OBJECT_ALIGNMENT
GC_MARK_SECONDARY_STACK
2008-01-06 00:56:56 +00:00
GC_MARK_STACK
GC_SETJMP_WORKS
2008-07-10 06:54:56 +00:00
GMALLOC_INHIBIT_VALLOC
GNU_LIBRARY_PENDING_OUTPUT_COUNT
GNU_LINUX
2008-01-06 00:56:56 +00:00
GNU_MALLOC
2008-07-10 06:54:56 +00:00
HAVE_AIX_SMT_EXP
HAVE_CBRT
2008-01-06 00:56:56 +00:00
HAVE_CLOSEDIR
2008-07-10 06:54:56 +00:00
HAVE_DUP2
HAVE_EUIDACCESS
HAVE_FMOD
HAVE_FPATHCONF
HAVE_FREXP
HAVE_FSYNC
HAVE_GETCWD
HAVE_GETDOMAINNAME
HAVE_GETHOSTNAME
HAVE_GETLOADAVG
HAVE_GETPAGESIZE
HAVE_GETPT
2008-01-06 00:56:56 +00:00
HAVE_GETTIMEOFDAY
2008-07-10 06:54:56 +00:00
HAVE_GETWD
HAVE_H_ERRNO
2008-01-06 00:56:56 +00:00
HAVE_INET_SOCKETS
2008-07-10 06:54:56 +00:00
HAVE_INVERSE_HYPERBOLIC
HAVE_LIBKSTAT
HAVE_LIMITS_H
HAVE_LINUX_VERSION_H
HAVE_LOGB
HAVE_LONG_FILE_NAMES
HAVE_LRAND48
HAVE_MENUS
HAVE_MKDIR
HAVE_MKTIME
HAVE_MOUSE
HAVE_PERROR
HAVE_PSTAT_GETDYNAMIC
HAVE_PWD_H
HAVE_RANDOM
HAVE_RENAME
HAVE_RES_INIT
HAVE_RINT
HAVE_RMDIR
2008-01-06 00:56:56 +00:00
HAVE_SELECT
2008-07-10 06:54:56 +00:00
HAVE_SETLOCALE
HAVE_SETPGID
HAVE_SETRLIMIT
HAVE_SETSID
HAVE_SHUTDOWN
2008-01-05 11:14:48 +00:00
HAVE_SOCKETS
2008-07-10 06:54:56 +00:00
HAVE_SOUND
HAVE_STDLIB_H
HAVE_STRERROR
HAVE_STRFTIME
* unexnext.c:
* m/ews4800.h:
* m/hp9000s300.h:
* m/ibm370aix.h:
* m/mips-siemens.h:
* m/ncr386.h:
* m/next.h:
* m/pmax.h:
* m/powerpcle.h:
* m/tandem-s2.h:
* s/386bsd.h:
* s/bsd386.h:
* s/bsd4-1.h:
* s/bsd4-2.h:
* s/bsdos2-1.h:
* s/bsdos2.h:
* s/bsdos3.h:
* s/bsdos4.h:
* s/nextstep.h:
* s/ultrix4-3.h:
* s/usg5-0.h:
* s/usg5-2-2.h:
* s/usg5-2.h:
* s/usg5-4-3.h:
* s/ux4800.h:
* s/uxpds.h:
* s/uxpv.h: Remove support for obsolete systems.
* s/hpux.h, s/hpux10.h, s/hpux8.h, s/hpux9.h, s/hpux9shr.h:
Remove, insert contents in s/hpux-10.20.h
* s/aix3-1.h, s/aix3-2-5.h, s/aix3-2.h, s/aix4-1.h, s/aix4.h:
Remove, insert contents in s/aix-4.2.h
* s/usg5-3.h: Remove, insert contents in s/usg5-4.h.
* s/bsd4-3.h: Rename to ..
* s/bsd-common.h: ... this.
* src/data.c:
* src/doc.c:
* src/ecrt0.c:
* src/emacs.c:
* src/fileio.c:
* src/floatfns.c:
* src/keyboard.c:
* src/mem-limits.h:
* src/print.c:
* src/process.c:
* src/sysdep.c:
* src/syssignal.h:
* src/systty.h:
* src/syswait.h:
* src/term.c:
* src/unexec.c:
* src/unexelf.c:
* src/unexhp9k800.c:
* src/m/hp800.h:
* src/m/ibmrs6000.h:
* src/m/mips.h:
* src/m/vax.h:
* src/s/darwin.h:
* src/s/freebsd.h:
* src/s/gnu.h:
* src/s/ms-w32.h:
* src/s/msdos.h:
* src/s/netbsd.h:
* src/s/template.h: Remove references to obsolete variables.
* Makefile.in: Add dependencies for all unexec files.
(admindir): Remove unused variable.
(UNEXEC_SRC): Remove references.
* config.nt: Remove reference to UNEXEC_SRC.
* lwlib.c: Remove references to obsolete variables.
* fakemail.c: Remove references to obsolete variables.
* os.texi: Remove references to obsolete systems.
* configure.in:
* configure: Remove references to obsolete systems.
2008-06-26 04:24:54 +00:00
HAVE_STRING_H
2008-07-10 06:54:56 +00:00
HAVE_STRUCT_UTIMBUF
HAVE_SYSINFO
2008-01-06 00:56:56 +00:00
HAVE_SYSV_SIGPAUSE
2008-07-10 06:54:56 +00:00
HAVE_SYS_SELECT_H
HAVE_SYS_SYSTEMINFO_H
HAVE_SYS_TIMEB_H
HAVE_SYS_TIME_H
2008-01-06 00:56:56 +00:00
HAVE_TCATTR
2008-07-10 06:54:56 +00:00
HAVE_TIMEVAL
HAVE_TM_ZONE
HAVE_TZSET
2008-01-06 00:56:56 +00:00
HAVE_UNISTD_H
HAVE_UTIMES
2008-07-10 06:54:56 +00:00
HAVE_UTIME_H
HAVE_WINDOW_SYSTEM
HAVE_WORKING_VFORK
HAVE_XRMSETDATABASE
HPUX
INTERNAL_TERMINAL
IS_ANY_SEP
IS_DIRECTORY_SEP
2008-01-06 00:56:56 +00:00
LINKER
2008-07-16 07:37:22 +00:00
LINUX_VERSION_CODE
2008-07-10 06:54:56 +00:00
LISP_FLOAT_TYPE
LNOFLSH
LOCALTIME_CACHE
2010-05-11 03:07:52 +00:00
MAIL_USE_FLOCK
2008-07-10 06:54:56 +00:00
MAIL_USE_LOCKF
MAIL_USE_POP
MAIL_USE_SYSTEM_LOCK
MAXPATHLEN
2008-07-10 15:26:15 +00:00
MIN_PTY_KERNEL_VERSION -- only used on Mac
2008-07-10 06:54:56 +00:00
MODE_LINE_BINARY_TEXT
MUST_UNDEF__STDC__
2008-01-06 00:56:56 +00:00
NLIST_STRUCT
* unexnext.c:
* m/ews4800.h:
* m/hp9000s300.h:
* m/ibm370aix.h:
* m/mips-siemens.h:
* m/ncr386.h:
* m/next.h:
* m/pmax.h:
* m/powerpcle.h:
* m/tandem-s2.h:
* s/386bsd.h:
* s/bsd386.h:
* s/bsd4-1.h:
* s/bsd4-2.h:
* s/bsdos2-1.h:
* s/bsdos2.h:
* s/bsdos3.h:
* s/bsdos4.h:
* s/nextstep.h:
* s/ultrix4-3.h:
* s/usg5-0.h:
* s/usg5-2-2.h:
* s/usg5-2.h:
* s/usg5-4-3.h:
* s/ux4800.h:
* s/uxpds.h:
* s/uxpv.h: Remove support for obsolete systems.
* s/hpux.h, s/hpux10.h, s/hpux8.h, s/hpux9.h, s/hpux9shr.h:
Remove, insert contents in s/hpux-10.20.h
* s/aix3-1.h, s/aix3-2-5.h, s/aix3-2.h, s/aix4-1.h, s/aix4.h:
Remove, insert contents in s/aix-4.2.h
* s/usg5-3.h: Remove, insert contents in s/usg5-4.h.
* s/bsd4-3.h: Rename to ..
* s/bsd-common.h: ... this.
* src/data.c:
* src/doc.c:
* src/ecrt0.c:
* src/emacs.c:
* src/fileio.c:
* src/floatfns.c:
* src/keyboard.c:
* src/mem-limits.h:
* src/print.c:
* src/process.c:
* src/sysdep.c:
* src/syssignal.h:
* src/systty.h:
* src/syswait.h:
* src/term.c:
* src/unexec.c:
* src/unexelf.c:
* src/unexhp9k800.c:
* src/m/hp800.h:
* src/m/ibmrs6000.h:
* src/m/mips.h:
* src/m/vax.h:
* src/s/darwin.h:
* src/s/freebsd.h:
* src/s/gnu.h:
* src/s/ms-w32.h:
* src/s/msdos.h:
* src/s/netbsd.h:
* src/s/template.h: Remove references to obsolete variables.
* Makefile.in: Add dependencies for all unexec files.
(admindir): Remove unused variable.
(UNEXEC_SRC): Remove references.
* config.nt: Remove reference to UNEXEC_SRC.
* lwlib.c: Remove references to obsolete variables.
* fakemail.c: Remove references to obsolete variables.
* os.texi: Remove references to obsolete systems.
* configure.in:
* configure: Remove references to obsolete systems.
2008-06-26 04:24:54 +00:00
NO_ABORT
2008-07-10 06:54:56 +00:00
NO_EDITRES
NO_MATHERR
2008-01-06 00:56:56 +00:00
NO_TERMIO
NSIG
NSIG_MINIMUM
2008-07-10 06:54:56 +00:00
NULL
NULL_DEVICE
2008-01-06 00:56:56 +00:00
ORDINARY_LINK
2008-07-10 06:54:56 +00:00
O_APPEND
O_RDONLY
O_RDWR
PAGESIZE
2008-01-06 00:56:56 +00:00
PENDING_OUTPUT_COUNT
2008-07-10 06:54:56 +00:00
POSIX
2008-01-06 00:56:56 +00:00
PREFER_VSUSP
PTY_ITERATION
2008-01-05 11:14:48 +00:00
PTY_NAME_SPRINTF
2008-01-06 00:56:56 +00:00
PTY_OPEN
2008-01-05 11:14:48 +00:00
PTY_TTY_NAME_SPRINTF
2008-01-06 00:56:56 +00:00
PURESIZE
RUN_TIME_REMAP
2008-07-10 06:54:56 +00:00
SA_RESTART
2008-01-06 00:56:56 +00:00
SEGMENT_MASK
2008-07-10 06:54:56 +00:00
SETPGRP_RELEASES_CTTY
2008-01-06 00:56:56 +00:00
SETUP_SLAVE_PTY
2008-07-10 06:54:56 +00:00
SIGALRM
SIGCHLD
SIGHUP
SIGKILL
2008-01-06 00:56:56 +00:00
SIGNALS_VIA_CHARACTERS
2008-07-10 06:54:56 +00:00
SIGPIPE
SIGQUIT
SIGTRAP
SOLARIS2
STDC_HEADERS
SYSTEM_PURESIZE_EXTRA
2008-07-23 07:03:32 +00:00
SYSTEM_MALLOC
2008-01-06 00:56:56 +00:00
SYSV_SYSTEM_DIR
* unexnext.c:
* m/ews4800.h:
* m/hp9000s300.h:
* m/ibm370aix.h:
* m/mips-siemens.h:
* m/ncr386.h:
* m/next.h:
* m/pmax.h:
* m/powerpcle.h:
* m/tandem-s2.h:
* s/386bsd.h:
* s/bsd386.h:
* s/bsd4-1.h:
* s/bsd4-2.h:
* s/bsdos2-1.h:
* s/bsdos2.h:
* s/bsdos3.h:
* s/bsdos4.h:
* s/nextstep.h:
* s/ultrix4-3.h:
* s/usg5-0.h:
* s/usg5-2-2.h:
* s/usg5-2.h:
* s/usg5-4-3.h:
* s/ux4800.h:
* s/uxpds.h:
* s/uxpv.h: Remove support for obsolete systems.
* s/hpux.h, s/hpux10.h, s/hpux8.h, s/hpux9.h, s/hpux9shr.h:
Remove, insert contents in s/hpux-10.20.h
* s/aix3-1.h, s/aix3-2-5.h, s/aix3-2.h, s/aix4-1.h, s/aix4.h:
Remove, insert contents in s/aix-4.2.h
* s/usg5-3.h: Remove, insert contents in s/usg5-4.h.
* s/bsd4-3.h: Rename to ..
* s/bsd-common.h: ... this.
* src/data.c:
* src/doc.c:
* src/ecrt0.c:
* src/emacs.c:
* src/fileio.c:
* src/floatfns.c:
* src/keyboard.c:
* src/mem-limits.h:
* src/print.c:
* src/process.c:
* src/sysdep.c:
* src/syssignal.h:
* src/systty.h:
* src/syswait.h:
* src/term.c:
* src/unexec.c:
* src/unexelf.c:
* src/unexhp9k800.c:
* src/m/hp800.h:
* src/m/ibmrs6000.h:
* src/m/mips.h:
* src/m/vax.h:
* src/s/darwin.h:
* src/s/freebsd.h:
* src/s/gnu.h:
* src/s/ms-w32.h:
* src/s/msdos.h:
* src/s/netbsd.h:
* src/s/template.h: Remove references to obsolete variables.
* Makefile.in: Add dependencies for all unexec files.
(admindir): Remove unused variable.
(UNEXEC_SRC): Remove references.
* config.nt: Remove reference to UNEXEC_SRC.
* lwlib.c: Remove references to obsolete variables.
* fakemail.c: Remove references to obsolete variables.
* os.texi: Remove references to obsolete systems.
* configure.in:
* configure: Remove references to obsolete systems.
2008-06-26 04:24:54 +00:00
TAB3
TABDLY
2008-07-10 06:54:56 +00:00
TERM
TIME_WITH_SYS_TIME
TIOCSIGSEND
TM_IN_SYS_TIME
2008-01-06 00:56:56 +00:00
ULIMIT_BREAK_VALUE
2008-07-10 06:54:56 +00:00
UNIX98_PTYS
USE_CRT_DLL
USE_TOOLKIT_SCROLL_BARS
2008-01-06 00:56:56 +00:00
USG
USG5
USG5_4
2008-07-10 06:54:56 +00:00
USG_SUBTTY_WORKS
VALBITS
WRETCODE
* unexnext.c:
* m/ews4800.h:
* m/hp9000s300.h:
* m/ibm370aix.h:
* m/mips-siemens.h:
* m/ncr386.h:
* m/next.h:
* m/pmax.h:
* m/powerpcle.h:
* m/tandem-s2.h:
* s/386bsd.h:
* s/bsd386.h:
* s/bsd4-1.h:
* s/bsd4-2.h:
* s/bsdos2-1.h:
* s/bsdos2.h:
* s/bsdos3.h:
* s/bsdos4.h:
* s/nextstep.h:
* s/ultrix4-3.h:
* s/usg5-0.h:
* s/usg5-2-2.h:
* s/usg5-2.h:
* s/usg5-4-3.h:
* s/ux4800.h:
* s/uxpds.h:
* s/uxpv.h: Remove support for obsolete systems.
* s/hpux.h, s/hpux10.h, s/hpux8.h, s/hpux9.h, s/hpux9shr.h:
Remove, insert contents in s/hpux-10.20.h
* s/aix3-1.h, s/aix3-2-5.h, s/aix3-2.h, s/aix4-1.h, s/aix4.h:
Remove, insert contents in s/aix-4.2.h
* s/usg5-3.h: Remove, insert contents in s/usg5-4.h.
* s/bsd4-3.h: Rename to ..
* s/bsd-common.h: ... this.
* src/data.c:
* src/doc.c:
* src/ecrt0.c:
* src/emacs.c:
* src/fileio.c:
* src/floatfns.c:
* src/keyboard.c:
* src/mem-limits.h:
* src/print.c:
* src/process.c:
* src/sysdep.c:
* src/syssignal.h:
* src/systty.h:
* src/syswait.h:
* src/term.c:
* src/unexec.c:
* src/unexelf.c:
* src/unexhp9k800.c:
* src/m/hp800.h:
* src/m/ibmrs6000.h:
* src/m/mips.h:
* src/m/vax.h:
* src/s/darwin.h:
* src/s/freebsd.h:
* src/s/gnu.h:
* src/s/ms-w32.h:
* src/s/msdos.h:
* src/s/netbsd.h:
* src/s/template.h: Remove references to obsolete variables.
* Makefile.in: Add dependencies for all unexec files.
(admindir): Remove unused variable.
(UNEXEC_SRC): Remove references.
* config.nt: Remove reference to UNEXEC_SRC.
* lwlib.c: Remove references to obsolete variables.
* fakemail.c: Remove references to obsolete variables.
* os.texi: Remove references to obsolete systems.
* configure.in:
* configure: Remove references to obsolete systems.
2008-06-26 04:24:54 +00:00
XOS_NEEDS_TIME_H
2008-07-10 06:54:56 +00:00
_AIX
_ARCH_PPC64
_FILE_OFFSET_BITS
_LP64
_MALLOC_INTERNAL
_NAIVE_DOS_REGS
_VARARGS_
_WINSOCKAPI_
_WINSOCK_H
2008-01-06 00:56:56 +00:00
_longjmp
_setjmp
2008-07-10 06:54:56 +00:00
_start
abort
access
2008-01-06 00:56:56 +00:00
alloca
2008-07-10 06:54:56 +00:00
brk
calloc
chdir
chmod
chown
close
const
creat
ctime
dup
dup2
edata
2008-01-06 00:56:56 +00:00
emacs
etext
2008-07-10 06:54:56 +00:00
execlp
execvp
fdopen
fileno
fopen
free
fsync
ftruncate
fwrite
getdefdir
getdisk
getenv
getpid
getuid
gmtime
2008-01-06 00:56:56 +00:00
index
2008-07-10 06:54:56 +00:00
isatty
kill
link
linux
localtime
logb
lseek
malloc
mkdir
mktemp
open
pclose
pipe
popen
random
read
realloc
rename
rindex
rmdir
sbrk
select
sigmask
signal
sigsetmask
sleep
spawnve
srandom
strdup
strerror
stricmp
strnicmp
strupr
sys_nerr
system
temacs
tzname
tzset
umask
unix
unlink
utimbuf
utime
vfork
wait
write
xfree