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. */
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. */
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 */
43 #if defined HAVE_GRANTPT
46 /* Run only once. We need a `for'-loop because the code uses `continue'. */
47 #define PTY_ITERATION for (i = 0; i < 1; i++)
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 \
62 sigblock (sigmask (SIGCHLD)); \
63 if (grantpt (fd) == -1 || unlockpt (fd) == -1 \
64 || !(ptyname = ptsname(fd))) \
66 sigunblock (sigmask (SIGCHLD)); \
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_PTYS if the system supports pty devices. */
88 /* This is used in list_system_processes. */
91 /* Define CLASH_DETECTION if you want lock files to be written
92 so that Emacs can tell instantly when you try to modify
93 a file that someone else has modified in his Emacs. */
94 #define CLASH_DETECTION
96 /* Here, on a separate page, add any special hacks needed
97 to make Emacs work on this system. For example,
98 you might define certain system call names that don't
99 exist on your system, or that do different things on
100 your system and must be used only through an encapsulation
101 (Which you should place, by convention, in sysdep.c). */
103 /* This is needed for dispnew.c:update_frame. */
105 #include <stdio.h> /* Get the definition of _IO_STDIO_H. */
106 #if defined(_IO_STDIO_H) || defined(_STDIO_USES_IOSTREAM)
107 /* New C libio names. */
108 #define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) \
109 ((FILE)->_IO_write_ptr - (FILE)->_IO_write_base)
110 #elif defined (__UCLIBC__)
111 /* Using the uClibc library. */
112 #define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) \
113 ((FILE)->__bufpos - (FILE)->__bufstart)
114 #else /* !_IO_STDIO_H && ! __UCLIBC__ */
115 /* Old C++ iostream names. */
116 #define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) \
117 ((FILE)->_pptr - (FILE)->_pbase)
118 #endif /* !_IO_STDIO_H && ! __UCLIBC__ */
120 #define INTERRUPT_INPUT
123 #define POSIX /* affects getpagesize.h and systty.h */
125 /* This is to work around mysterious gcc failures in some system versions.
126 It is unlikely that Emacs changes will work around this problem;
127 therefore, this should remain permanently. */
128 #ifndef HAVE_XRMSETDATABASE
129 #define HAVE_XRMSETDATABASE
132 #define NARROWPROTO 1
134 /* Tell that garbage collector that setjmp is known to save all
135 registers relevant for conservative garbage collection in the jmp_buf. */
136 /* Not all the architectures are tested, but there are Debian packages
137 for SCM and/or Guile on them, so the technique must work. See also
138 comments in alloc.c concerning setjmp and gcc. Fixme: it's
139 probably safe to make this conditional just on GCC, except for ia64
140 register window-flushing. */
141 /* Don't use #cpu here since in newest development versions of GCC,
142 we must call cpp with -traditional, and that disables #cpu. */
143 #if defined __i386__ || defined __sparc__ || defined __mc68000__ \
144 || defined __alpha__ || defined __mips__ || defined __s390__ \
145 || defined __arm__ || defined __powerpc__ || defined __amd64__ \
146 || defined __ia64__ || defined __sh__
147 #define GC_SETJMP_WORKS 1
148 #define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS
150 #define GC_LISP_OBJECT_ALIGNMENT 2
153 #define GC_MARK_SECONDARY_STACK() \
155 extern void *__libc_ia64_register_backing_store_base; \
156 __builtin_ia64_flushrs (); \
157 mark_memory (__libc_ia64_register_backing_store_base, \
158 __builtin_ia64_bsp (), 0); \
163 /* arch-tag: 6244ea2a-abd0-44ec-abec-ff3dcc9afea9
164 (do not change this comment) */