Mercurial > emacs
comparison src/s/gnu-linux.h @ 108561:23f4cd23ea89
merge trunk
author | Kenichi Handa <handa@etlken> |
---|---|
date | Fri, 14 May 2010 13:15:58 +0900 |
parents | f8e62c2bf3e9 |
children | e565448628b8 |
comparison
equal
deleted
inserted
replaced
108552:03ab6621f67d | 108561:23f4cd23ea89 |
---|---|
1 /* This file is the configuration file for Linux-based GNU systems | 1 /* This file is the configuration file for Linux-based GNU systems |
2 | 2 |
3 Copyright (C) 1985, 1986, 1992, 1994, 1996, 1999, 2001, 2002, 2003, 2004, | 3 Copyright (C) 1985, 1986, 1992, 1994, 1996, 1999, 2001, 2002, 2003, 2004, |
4 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. | 4 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. |
5 | |
6 This file was put together by Michael K. Johnson and Rik Faith. | |
5 | 7 |
6 This file is part of GNU Emacs. | 8 This file is part of GNU Emacs. |
7 | 9 |
8 GNU Emacs is free software: you can redistribute it and/or modify | 10 GNU Emacs is free software: you can redistribute it and/or modify |
9 it under the terms of the GNU General Public License as published by | 11 it under the terms of the GNU General Public License as published by |
16 GNU General Public License for more details. | 18 GNU General Public License for more details. |
17 | 19 |
18 You should have received a copy of the GNU General Public License | 20 You should have received a copy of the GNU General Public License |
19 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | 21 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ |
20 | 22 |
21 /* This file was put together by Michael K. Johnson and Rik Faith. */ | 23 /* Define symbols to identify the version of Unix this is. |
22 | 24 Define all the symbols that apply correctly. */ |
23 | |
24 /* | |
25 * Define symbols to identify the version of Unix this is. | |
26 * Define all the symbols that apply correctly. | |
27 */ | |
28 | |
29 #define USG | 25 #define USG |
30 #define GNU_LINUX | 26 #define GNU_LINUX |
31 | 27 |
32 /* SYSTEM_TYPE should indicate the kind of system you are using. | 28 /* SYSTEM_TYPE should indicate the kind of system you are using. |
33 It sets the Lisp variable system-type. */ | 29 It sets the Lisp variable system-type. */ |
34 | |
35 #define SYSTEM_TYPE "gnu/linux" /* All the best software is free. */ | 30 #define SYSTEM_TYPE "gnu/linux" /* All the best software is free. */ |
36 | 31 |
37 #ifndef NOT_C_CODE | 32 #ifndef NOT_C_CODE |
38 #ifdef emacs | 33 #ifdef emacs |
39 #ifdef HAVE_LINUX_VERSION_H | 34 #ifdef HAVE_LINUX_VERSION_H |
48 #endif /* NOT_C_CODE */ | 43 #endif /* NOT_C_CODE */ |
49 | 44 |
50 #if defined HAVE_GRANTPT | 45 #if defined HAVE_GRANTPT |
51 #define UNIX98_PTYS | 46 #define UNIX98_PTYS |
52 | 47 |
53 /* Run only once. We need a `for'-loop because the code uses | 48 /* Run only once. We need a `for'-loop because the code uses `continue'. */ |
54 `continue'. */ | |
55 | |
56 #define PTY_ITERATION for (i = 0; i < 1; i++) | 49 #define PTY_ITERATION for (i = 0; i < 1; i++) |
57 | 50 |
58 #ifdef HAVE_GETPT | 51 #ifdef HAVE_GETPT |
59 #define PTY_NAME_SPRINTF | 52 #define PTY_NAME_SPRINTF |
60 #define PTY_OPEN fd = getpt () | 53 #define PTY_OPEN fd = getpt () |
62 #define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptmx"); | 55 #define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptmx"); |
63 #endif /* not HAVE_GETPT */ | 56 #endif /* not HAVE_GETPT */ |
64 | 57 |
65 /* Note that grantpt and unlockpt may fork. We must block SIGCHLD to | 58 /* Note that grantpt and unlockpt may fork. We must block SIGCHLD to |
66 prevent sigchld_handler from intercepting the child's death. */ | 59 prevent sigchld_handler from intercepting the child's death. */ |
67 | |
68 #define PTY_TTY_NAME_SPRINTF \ | 60 #define PTY_TTY_NAME_SPRINTF \ |
69 { \ | 61 { \ |
70 char *ptyname; \ | 62 char *ptyname; \ |
71 \ | 63 \ |
72 sigblock (sigmask (SIGCHLD)); \ | 64 sigblock (sigmask (SIGCHLD)); \ |
84 | 76 |
85 #else /* not HAVE_GRANTPT */ | 77 #else /* not HAVE_GRANTPT */ |
86 | 78 |
87 /* Letter to use in finding device name of first pty, | 79 /* Letter to use in finding device name of first pty, |
88 if system supports pty's. 'p' means it is /dev/ptyp0 */ | 80 if system supports pty's. 'p' means it is /dev/ptyp0 */ |
89 | |
90 #define FIRST_PTY_LETTER 'p' | 81 #define FIRST_PTY_LETTER 'p' |
91 | 82 |
92 #endif /* not HAVE_GRANTPT */ | 83 #endif /* not HAVE_GRANTPT */ |
93 | 84 |
94 /* Define HAVE_TERMIOS if the system provides POSIX-style | 85 /* Define HAVE_TERMIOS if the system provides POSIX-style |
95 functions and macros for terminal control. */ | 86 functions and macros for terminal control. */ |
96 | |
97 #define HAVE_TERMIOS | 87 #define HAVE_TERMIOS |
98 | 88 |
99 /* Define HAVE_PTYS if the system supports pty devices. */ | 89 /* Define HAVE_PTYS if the system supports pty devices. */ |
100 | |
101 #define HAVE_PTYS | 90 #define HAVE_PTYS |
102 | 91 |
103 #define HAVE_SOCKETS | 92 #define HAVE_SOCKETS |
104 | 93 |
105 /* Define this symbol if your system has the functions bcopy, etc. */ | 94 /* Define this symbol if your system has the functions bcopy, etc. */ |
106 #define BSTRING | 95 #define BSTRING |
107 | 96 |
108 /* This is used in list_system_processes. */ | 97 /* This is used in list_system_processes. */ |
109 #define HAVE_PROCFS 1 | 98 #define HAVE_PROCFS 1 |
110 | 99 |
119 you might define certain system call names that don't | 108 you might define certain system call names that don't |
120 exist on your system, or that do different things on | 109 exist on your system, or that do different things on |
121 your system and must be used only through an encapsulation | 110 your system and must be used only through an encapsulation |
122 (Which you should place, by convention, in sysdep.c). */ | 111 (Which you should place, by convention, in sysdep.c). */ |
123 | 112 |
124 /* This is needed for dispnew.c:update_frame */ | 113 /* This is needed for dispnew.c:update_frame. */ |
125 | |
126 #ifdef emacs | 114 #ifdef emacs |
127 #include <stdio.h> /* Get the definition of _IO_STDIO_H. */ | 115 #include <stdio.h> /* Get the definition of _IO_STDIO_H. */ |
128 #if defined(_IO_STDIO_H) || defined(_STDIO_USES_IOSTREAM) | 116 #if defined(_IO_STDIO_H) || defined(_STDIO_USES_IOSTREAM) |
129 /* new C libio names */ | 117 /* New C libio names. */ |
130 #define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) \ | 118 #define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) \ |
131 ((FILE)->_IO_write_ptr - (FILE)->_IO_write_base) | 119 ((FILE)->_IO_write_ptr - (FILE)->_IO_write_base) |
132 #elif defined (__UCLIBC__) | 120 #elif defined (__UCLIBC__) |
133 /* using the uClibc library */ | 121 /* Using the uClibc library. */ |
134 #define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) \ | 122 #define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) \ |
135 ((FILE)->__bufpos - (FILE)->__bufstart) | 123 ((FILE)->__bufpos - (FILE)->__bufstart) |
136 #else /* !_IO_STDIO_H && ! __UCLIBC__ */ | 124 #else /* !_IO_STDIO_H && ! __UCLIBC__ */ |
137 /* old C++ iostream names */ | 125 /* Old C++ iostream names. */ |
138 #define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) \ | 126 #define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) \ |
139 ((FILE)->_pptr - (FILE)->_pbase) | 127 ((FILE)->_pptr - (FILE)->_pbase) |
140 #endif /* !_IO_STDIO_H && ! __UCLIBC__ */ | 128 #endif /* !_IO_STDIO_H && ! __UCLIBC__ */ |
141 #endif /* emacs */ | 129 #endif /* emacs */ |
142 | |
143 /* Ask GCC where to find libgcc.a. */ | |
144 #define LIB_GCC `$(CC) $(C_SWITCH_X_SITE) -print-libgcc-file-name` | |
145 | 130 |
146 #ifdef emacs | 131 #ifdef emacs |
147 #define INTERRUPT_INPUT | 132 #define INTERRUPT_INPUT |
148 #endif | 133 #endif |
149 | 134 |
150 #define SYSV_SYSTEM_DIR /* use dirent.h */ | 135 #define SYSV_SYSTEM_DIR /* use dirent.h */ |
151 | 136 |
152 #define POSIX /* affects getpagesize.h and systty.h */ | 137 #define POSIX /* affects getpagesize.h and systty.h */ |
153 | |
154 #undef LIB_GCC | |
155 #define LIB_GCC | |
156 | 138 |
157 #define UNEXEC unexelf.o | 139 #define UNEXEC unexelf.o |
158 | 140 |
159 /* This is to work around mysterious gcc failures in some system versions. | 141 /* This is to work around mysterious gcc failures in some system versions. |
160 It is unlikely that Emacs changes will work around this problem; | 142 It is unlikely that Emacs changes will work around this problem; |
169 #ifdef DOUG_LEA_MALLOC | 151 #ifdef DOUG_LEA_MALLOC |
170 #undef REL_ALLOC | 152 #undef REL_ALLOC |
171 #endif | 153 #endif |
172 | 154 |
173 /* Tell that garbage collector that setjmp is known to save all | 155 /* Tell that garbage collector that setjmp is known to save all |
174 registers relevant for conservative garbage collection in the | 156 registers relevant for conservative garbage collection in the jmp_buf. */ |
175 jmp_buf. */ | |
176 /* Not all the architectures are tested, but there are Debian packages | 157 /* Not all the architectures are tested, but there are Debian packages |
177 for SCM and/or Guile on them, so the technique must work. See also | 158 for SCM and/or Guile on them, so the technique must work. See also |
178 comments in alloc.c concerning setjmp and gcc. Fixme: it's | 159 comments in alloc.c concerning setjmp and gcc. Fixme: it's |
179 probably safe to make this conditional just on GCC, except for ia64 | 160 probably safe to make this conditional just on GCC, except for ia64 |
180 register window-flushing. */ | 161 register window-flushing. */ |
181 /* Don't use #cpu here since in newest development versions of GCC, | 162 /* Don't use #cpu here since in newest development versions of GCC, |
182 we must call cpp with -traditional, and that disables #cpu. */ | 163 we must call cpp with -traditional, and that disables #cpu. */ |
183 | |
184 #if defined __i386__ || defined __sparc__ || defined __mc68000__ \ | 164 #if defined __i386__ || defined __sparc__ || defined __mc68000__ \ |
185 || defined __alpha__ || defined __mips__ || defined __s390__ \ | 165 || defined __alpha__ || defined __mips__ || defined __s390__ \ |
186 || defined __arm__ || defined __powerpc__ || defined __amd64__ \ | 166 || defined __arm__ || defined __powerpc__ || defined __amd64__ \ |
187 || defined __ia64__ || defined __sh__ | 167 || defined __ia64__ || defined __sh__ |
188 #define GC_SETJMP_WORKS 1 | 168 #define GC_SETJMP_WORKS 1 |