Commit | Line | Data |
---|---|---|
3a707ba5 | 1 | /* This file is the configuration file for Linux-based GNU systems |
2f86b22b | 2 | |
acaf905b | 3 | Copyright (C) 1985-1986, 1992, 1994, 1996, 1999, 2001-2012 |
e9bffc61 | 4 | Free Software Foundation, Inc. |
566e3587 | 5 | |
e05aebe9 GM |
6 | This file was put together by Michael K. Johnson and Rik Faith. |
7 | ||
566e3587 JB |
8 | This file is part of GNU Emacs. |
9 | ||
4b158629 | 10 | GNU Emacs is free software: you can redistribute it and/or modify |
566e3587 | 11 | it under the terms of the GNU General Public License as published by |
4b158629 GM |
12 | the Free Software Foundation, either version 3 of the License, or |
13 | (at your option) any later version. | |
566e3587 JB |
14 | |
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. | |
19 | ||
20 | You should have received a copy of the GNU General Public License | |
4b158629 | 21 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ |
566e3587 | 22 | |
e05aebe9 GM |
23 | /* Define symbols to identify the version of Unix this is. |
24 | Define all the symbols that apply correctly. */ | |
566e3587 | 25 | #define USG |
8db5530a | 26 | #define GNU_LINUX |
566e3587 | 27 | |
71125fb8 GM |
28 | #if defined HAVE_GRANTPT |
29 | #define UNIX98_PTYS | |
566e3587 | 30 | |
71125fb8 GM |
31 | #ifdef HAVE_GETPT |
32 | #define PTY_NAME_SPRINTF | |
33 | #define PTY_OPEN fd = getpt () | |
34 | #else /* not HAVE_GETPT */ | |
35 | #define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptmx"); | |
36 | #endif /* not HAVE_GETPT */ | |
37 | ||
38 | /* Note that grantpt and unlockpt may fork. We must block SIGCHLD to | |
39 | prevent sigchld_handler from intercepting the child's death. */ | |
71125fb8 GM |
40 | #define PTY_TTY_NAME_SPRINTF \ |
41 | { \ | |
42 | char *ptyname; \ | |
43 | \ | |
44 | sigblock (sigmask (SIGCHLD)); \ | |
45 | if (grantpt (fd) == -1 || unlockpt (fd) == -1 \ | |
46 | || !(ptyname = ptsname(fd))) \ | |
47 | { \ | |
48 | sigunblock (sigmask (SIGCHLD)); \ | |
49 | close (fd); \ | |
50 | return -1; \ | |
51 | } \ | |
e99a530f | 52 | snprintf (pty_name, sizeof pty_name, "%s", ptyname); \ |
71125fb8 GM |
53 | sigunblock (sigmask (SIGCHLD)); \ |
54 | } | |
fdc5e0fc | 55 | |
6e777848 | 56 | #endif /* HAVE_GRANTPT */ |
fdc5e0fc | 57 | |
566e3587 JB |
58 | /* Here, on a separate page, add any special hacks needed |
59 | to make Emacs work on this system. For example, | |
60 | you might define certain system call names that don't | |
61 | exist on your system, or that do different things on | |
62 | your system and must be used only through an encapsulation | |
63 | (Which you should place, by convention, in sysdep.c). */ | |
64 | \f | |
566e3587 | 65 | |
639f52d8 RS |
66 | /* This is to work around mysterious gcc failures in some system versions. |
67 | It is unlikely that Emacs changes will work around this problem; | |
68 | therefore, this should remain permanently. */ | |
e3b89505 RS |
69 | #ifndef HAVE_XRMSETDATABASE |
70 | #define HAVE_XRMSETDATABASE | |
71 | #endif | |
e2000885 | 72 | |
e3177e43 AS |
73 | #ifdef __ia64__ |
74 | #define GC_MARK_SECONDARY_STACK() \ | |
75 | do { \ | |
76 | extern void *__libc_ia64_register_backing_store_base; \ | |
77 | __builtin_ia64_flushrs (); \ | |
78 | mark_memory (__libc_ia64_register_backing_store_base, \ | |
2adb6e85 | 79 | __builtin_ia64_bsp ()); \ |
e3177e43 AS |
80 | } while (0) |
81 | #endif | |
e091e1bd GM |
82 | |
83 | /* Tell that garbage collector that setjmp is known to save all | |
84 | registers relevant for conservative garbage collection in the jmp_buf. | |
85 | Not all the architectures are tested, but there are Debian packages | |
86 | for SCM and/or Guile on them, so the technique must work. See also | |
87 | comments in alloc.c concerning setjmp and gcc. Fixme: it's | |
88 | probably safe to just let the GCC conditional in AH_BOTTOM handle this. | |
89 | */ | |
90 | #if defined __i386__ || defined __sparc__ || defined __mc68000__ \ | |
91 | || defined __alpha__ || defined __mips__ || defined __s390__ \ | |
92 | || defined __arm__ || defined __powerpc__ || defined __amd64__ \ | |
93 | || defined __ia64__ || defined __sh__ | |
94 | #define GC_SETJMP_WORKS 1 | |
b948ce8b PE |
95 | #else |
96 | #define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE | |
bb15bd9a | 97 | #endif |
34374650 PE |
98 | |
99 | #ifdef __i386__ | |
100 | /* libc-linux/sysdeps/linux/i386/ulimit.c says that due to shared library, */ | |
101 | /* we cannot get the maximum address for brk */ | |
102 | # define ULIMIT_BREAK_VALUE (32*1024*1024) | |
103 | #endif |