Bump custom version of some user options of which the default values changed.
[emacs.git] / src / s / gnu-linux.h
blobcf3b307972650fb272a43368828b18d460a31b52
1 /* This file is the configuration file for Linux-based GNU systems
3 Copyright (C) 1985, 1986, 1992, 1994, 1996, 1999, 2001, 2002, 2003, 2004,
4 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
6 This file was put together by Michael K. Johnson and Rik Faith.
8 This file is part of GNU Emacs.
10 GNU Emacs is free software: you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation, either version 3 of the License, or
13 (at your option) any later version.
15 GNU Emacs is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
23 /* Define symbols to identify the version of Unix this is.
24 Define all the symbols that apply correctly. */
25 #define USG
26 #define GNU_LINUX
28 /* SYSTEM_TYPE should indicate the kind of system you are using.
29 It sets the Lisp variable system-type. */
30 #define SYSTEM_TYPE "gnu/linux" /* All the best software is free. */
32 #ifdef emacs
33 #ifdef HAVE_LINUX_VERSION_H
34 #include <linux/version.h>
36 #if LINUX_VERSION_CODE >= 0x20400
37 /* 21 Jun 06: Eric Hanchrow <offby1@blarg.net> says this works. */
38 #define SIGNALS_VIA_CHARACTERS
39 #endif /* LINUX_VERSION_CODE >= 0x20400 */
40 #endif /* HAVE_LINUX_VERSION_H */
41 #endif /* emacs */
43 #if defined HAVE_GRANTPT
44 #define UNIX98_PTYS
46 /* Run only once. We need a `for'-loop because the code uses `continue'. */
47 #define PTY_ITERATION for (i = 0; i < 1; i++)
49 #ifdef HAVE_GETPT
50 #define PTY_NAME_SPRINTF
51 #define PTY_OPEN fd = getpt ()
52 #else /* not HAVE_GETPT */
53 #define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptmx");
54 #endif /* not HAVE_GETPT */
56 /* Note that grantpt and unlockpt may fork. We must block SIGCHLD to
57 prevent sigchld_handler from intercepting the child's death. */
58 #define PTY_TTY_NAME_SPRINTF \
59 { \
60 char *ptyname; \
62 sigblock (sigmask (SIGCHLD)); \
63 if (grantpt (fd) == -1 || unlockpt (fd) == -1 \
64 || !(ptyname = ptsname(fd))) \
65 { \
66 sigunblock (sigmask (SIGCHLD)); \
67 close (fd); \
68 return -1; \
69 } \
70 strncpy (pty_name, ptyname, sizeof (pty_name)); \
71 pty_name[sizeof (pty_name) - 1] = 0; \
72 sigunblock (sigmask (SIGCHLD)); \
75 #else /* not HAVE_GRANTPT */
77 /* Letter to use in finding device name of first pty,
78 if system supports pty's. 'p' means it is /dev/ptyp0 */
79 #define FIRST_PTY_LETTER 'p'
81 #endif /* not HAVE_GRANTPT */
83 /* Define HAVE_TERMIOS if the system provides POSIX-style
84 functions and macros for terminal control. */
85 #define HAVE_TERMIOS
87 /* Define HAVE_PTYS if the system supports pty devices. */
88 #define HAVE_PTYS
90 #define HAVE_SOCKETS
92 /* This is used in list_system_processes. */
93 #define HAVE_PROCFS 1
95 /* Define CLASH_DETECTION if you want lock files to be written
96 so that Emacs can tell instantly when you try to modify
97 a file that someone else has modified in his Emacs. */
98 #define CLASH_DETECTION
100 /* Here, on a separate page, add any special hacks needed
101 to make Emacs work on this system. For example,
102 you might define certain system call names that don't
103 exist on your system, or that do different things on
104 your system and must be used only through an encapsulation
105 (Which you should place, by convention, in sysdep.c). */
107 /* This is needed for dispnew.c:update_frame. */
108 #ifdef emacs
109 #include <stdio.h> /* Get the definition of _IO_STDIO_H. */
110 #if defined(_IO_STDIO_H) || defined(_STDIO_USES_IOSTREAM)
111 /* New C libio names. */
112 #define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) \
113 ((FILE)->_IO_write_ptr - (FILE)->_IO_write_base)
114 #elif defined (__UCLIBC__)
115 /* Using the uClibc library. */
116 #define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) \
117 ((FILE)->__bufpos - (FILE)->__bufstart)
118 #else /* !_IO_STDIO_H && ! __UCLIBC__ */
119 /* Old C++ iostream names. */
120 #define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) \
121 ((FILE)->_pptr - (FILE)->_pbase)
122 #endif /* !_IO_STDIO_H && ! __UCLIBC__ */
124 #define INTERRUPT_INPUT
125 #endif /* emacs */
127 #define POSIX /* affects getpagesize.h and systty.h */
129 /* This is to work around mysterious gcc failures in some system versions.
130 It is unlikely that Emacs changes will work around this problem;
131 therefore, this should remain permanently. */
132 #ifndef HAVE_XRMSETDATABASE
133 #define HAVE_XRMSETDATABASE
134 #endif
136 #define NARROWPROTO 1
138 /* Tell that garbage collector that setjmp is known to save all
139 registers relevant for conservative garbage collection in the jmp_buf. */
140 /* Not all the architectures are tested, but there are Debian packages
141 for SCM and/or Guile on them, so the technique must work. See also
142 comments in alloc.c concerning setjmp and gcc. Fixme: it's
143 probably safe to make this conditional just on GCC, except for ia64
144 register window-flushing. */
145 /* Don't use #cpu here since in newest development versions of GCC,
146 we must call cpp with -traditional, and that disables #cpu. */
147 #if defined __i386__ || defined __sparc__ || defined __mc68000__ \
148 || defined __alpha__ || defined __mips__ || defined __s390__ \
149 || defined __arm__ || defined __powerpc__ || defined __amd64__ \
150 || defined __ia64__ || defined __sh__
151 #define GC_SETJMP_WORKS 1
152 #define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS
153 #ifdef __mc68000__
154 #define GC_LISP_OBJECT_ALIGNMENT 2
155 #endif
156 #ifdef __ia64__
157 #define GC_MARK_SECONDARY_STACK() \
158 do { \
159 extern void *__libc_ia64_register_backing_store_base; \
160 __builtin_ia64_flushrs (); \
161 mark_memory (__libc_ia64_register_backing_store_base, \
162 __builtin_ia64_bsp (), 0); \
163 } while (0)
164 #endif
165 #endif
167 /* arch-tag: 6244ea2a-abd0-44ec-abec-ff3dcc9afea9
168 (do not change this comment) */