diff options
Diffstat (limited to 'src/s')
| -rw-r--r-- | src/s/aix4-2.h | 67 | ||||
| -rw-r--r-- | src/s/bsd-common.h | 69 | ||||
| -rw-r--r-- | src/s/cygwin.h | 88 | ||||
| -rw-r--r-- | src/s/darwin.h | 107 | ||||
| -rw-r--r-- | src/s/freebsd.h | 38 | ||||
| -rw-r--r-- | src/s/gnu-linux.h | 136 | ||||
| -rw-r--r-- | src/s/gnu.h | 40 | ||||
| -rw-r--r-- | src/s/hpux10-20.h | 72 | ||||
| -rw-r--r-- | src/s/irix6-5.h | 65 | ||||
| -rw-r--r-- | src/s/ms-w32.h | 192 | ||||
| -rw-r--r-- | src/s/msdos.h | 35 | ||||
| -rw-r--r-- | src/s/netbsd.h | 16 | ||||
| -rw-r--r-- | src/s/sol2-6.h | 40 | ||||
| -rw-r--r-- | src/s/template.h | 58 | ||||
| -rw-r--r-- | src/s/unixware.h | 34 | ||||
| -rw-r--r-- | src/s/usg5-4-common.h | 36 |
16 files changed, 119 insertions, 974 deletions
diff --git a/src/s/aix4-2.h b/src/s/aix4-2.h index 51ac9748f27..6c881a7fb8c 100644 --- a/src/s/aix4-2.h +++ b/src/s/aix4-2.h | |||
| @@ -16,73 +16,6 @@ GNU General Public License for more details. | |||
| 16 | You should have received a copy of the GNU General Public License | 16 | You should have received a copy of the GNU General Public License |
| 17 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | 17 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ |
| 18 | 18 | ||
| 19 | /* Define symbols to identify the version of Unix this is. | ||
| 20 | Define all the symbols that apply correctly. */ | ||
| 21 | #define USG /* System III, System V, etc */ | ||
| 22 | #define USG5 | ||
| 23 | |||
| 24 | /* This symbol should be defined on AIX Version 3 ??????? */ | ||
| 25 | #ifndef _AIX | ||
| 26 | #define _AIX | ||
| 27 | #endif | ||
| 28 | |||
| 29 | /* In AIX, you allocate a pty by opening /dev/ptc to get the master side. | ||
| 30 | To get the name of the slave side, you just ttyname() the master side. */ | ||
| 31 | #define PTY_ITERATION int c; for (c = 0; !c ; c++) | ||
| 32 | #define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptc"); | ||
| 33 | #define PTY_TTY_NAME_SPRINTF strcpy (pty_name, ttyname (fd)); | ||
| 34 | |||
| 35 | /* Define HAVE_PTYS if the system supports pty devices. */ | ||
| 36 | #define HAVE_PTYS | ||
| 37 | |||
| 38 | /* Define HAVE_SOCKETS if system supports 4.2-compatible sockets. */ | ||
| 39 | #define HAVE_SOCKETS | ||
| 40 | |||
| 41 | /* Special items needed to make Emacs run on this system. */ | ||
| 42 | |||
| 43 | /* AIX doesn't define this. */ | ||
| 44 | #define unix 1 | ||
| 45 | |||
| 46 | /* Perry Smith <pedz@ddivt1.austin.ibm.com> says these are correct. */ | ||
| 47 | #define SIGNALS_VIA_CHARACTERS | ||
| 48 | #define CLASH_DETECTION | ||
| 49 | |||
| 50 | /* Perry Smith <pedz@ddivt1.austin.ibm.com> says these are correct. */ | 19 | /* Perry Smith <pedz@ddivt1.austin.ibm.com> says these are correct. */ |
| 51 | #undef sigmask | 20 | #undef sigmask |
| 52 | 21 | ||
| 53 | #ifndef HAVE_LIBXMU | ||
| 54 | /* Unfortunately without libXmu we cannot support EditRes. */ | ||
| 55 | #define NO_EDITRES | ||
| 56 | #endif | ||
| 57 | |||
| 58 | /* On AIX Emacs uses the gmalloc.c malloc implementation. But given | ||
| 59 | the way this system works, libc functions that return malloced | ||
| 60 | memory use the libc malloc implementation. Calling xfree or | ||
| 61 | xrealloc on the results of such functions results in a crash. | ||
| 62 | |||
| 63 | One solution for this could be to define SYSTEM_MALLOC in configure, | ||
| 64 | but that does not currently work on this system. | ||
| 65 | |||
| 66 | It is possible to completely override the malloc implementation on | ||
| 67 | AIX, but that involves putting the malloc functions in a shared | ||
| 68 | library and setting the MALLOCTYPE environment variable to point to | ||
| 69 | that shared library. | ||
| 70 | |||
| 71 | Emacs currently calls xrealloc on the results of get_current_dir name, | ||
| 72 | to avoid a crash just use the Emacs implementation for that function. */ | ||
| 73 | #define BROKEN_GET_CURRENT_DIR_NAME 1 | ||
| 74 | |||
| 75 | /*** BUILD 9008 - FIONREAD problem still exists in X-Windows. ***/ | ||
| 76 | #define BROKEN_FIONREAD | ||
| 77 | /* As we define BROKEN_FIONREAD, SIGIO will be undefined in systty.h. | ||
| 78 | But, on AIX, SIGAIO, SIGPTY, and SIGPOLL are defined as SIGIO, | ||
| 79 | which causes compilation error at init_signals in sysdep.c. So, we | ||
| 80 | define these macros so that syssignal.h detects them and undefine | ||
| 81 | SIGAIO, SIGPTY and SIGPOLL. */ | ||
| 82 | #define BROKEN_SIGAIO | ||
| 83 | #define BROKEN_SIGPTY | ||
| 84 | #define BROKEN_SIGPOLL | ||
| 85 | |||
| 86 | /* Conservative garbage collection has not been tested, so for now | ||
| 87 | play it safe and stick with the old-fashioned way of marking. */ | ||
| 88 | #define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE | ||
diff --git a/src/s/bsd-common.h b/src/s/bsd-common.h deleted file mode 100644 index 98391740653..00000000000 --- a/src/s/bsd-common.h +++ /dev/null | |||
| @@ -1,69 +0,0 @@ | |||
| 1 | /* Definitions file for GNU Emacs running on bsd 4.3 | ||
| 2 | |||
| 3 | Copyright (C) 1985-1986, 2001-2012 Free Software Foundation, Inc. | ||
| 4 | |||
| 5 | This file is part of GNU Emacs. | ||
| 6 | |||
| 7 | GNU Emacs is free software: you can redistribute it and/or modify | ||
| 8 | it under the terms of the GNU General Public License as published by | ||
| 9 | the Free Software Foundation, either version 3 of the License, or | ||
| 10 | (at your option) any later version. | ||
| 11 | |||
| 12 | GNU Emacs is distributed in the hope that it will be useful, | ||
| 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | GNU General Public License for more details. | ||
| 16 | |||
| 17 | You should have received a copy of the GNU General Public License | ||
| 18 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | ||
| 19 | |||
| 20 | |||
| 21 | /* Define symbols to identify the version of Unix this is. | ||
| 22 | Define all the symbols that apply correctly. */ | ||
| 23 | |||
| 24 | /* We give these symbols the numeric values found in <sys/param.h> to | ||
| 25 | avoid warnings about redefined macros. */ | ||
| 26 | |||
| 27 | /* Nothing in Emacs uses this any more. | ||
| 28 | ifndef BSD4_3 | ||
| 29 | define BSD4_3 1 | ||
| 30 | endif | ||
| 31 | */ | ||
| 32 | |||
| 33 | #ifndef BSD_SYSTEM | ||
| 34 | #define BSD_SYSTEM 43 | ||
| 35 | #endif /* BSD_SYSTEM */ | ||
| 36 | |||
| 37 | /* For mem-limits.h. */ | ||
| 38 | #define BSD4_2 | ||
| 39 | |||
| 40 | #define TABDLY OXTABS | ||
| 41 | #define TAB3 OXTABS | ||
| 42 | |||
| 43 | /* If the system's imake configuration file defines `NeedWidePrototypes' | ||
| 44 | as `NO', we must define NARROWPROTO manually. Such a define is | ||
| 45 | generated in the Makefile generated by `xmkmf'. If we don't | ||
| 46 | define NARROWPROTO, we will see the wrong function prototypes | ||
| 47 | for X functions taking float or double parameters. */ | ||
| 48 | #define NARROWPROTO 1 | ||
| 49 | |||
| 50 | /* Do not use interrupt_input = 1 by default, because in 4.3 | ||
| 51 | we can make noninterrupt input work properly. */ | ||
| 52 | #undef INTERRUPT_INPUT | ||
| 53 | |||
| 54 | /* First pty name is /dev/ptyp0. */ | ||
| 55 | #define FIRST_PTY_LETTER 'p' | ||
| 56 | |||
| 57 | /* Define HAVE_PTYS if the system supports pty devices. */ | ||
| 58 | #define HAVE_PTYS | ||
| 59 | |||
| 60 | /* Define HAVE_SOCKETS if system supports 4.2-compatible sockets. */ | ||
| 61 | #define HAVE_SOCKETS | ||
| 62 | |||
| 63 | /* Define CLASH_DETECTION if you want lock files to be written | ||
| 64 | so that Emacs can tell instantly when you try to modify | ||
| 65 | a file that someone else has modified in his Emacs. */ | ||
| 66 | #define CLASH_DETECTION | ||
| 67 | |||
| 68 | /* Send signals to subprocesses by "typing" special chars at them. */ | ||
| 69 | #define SIGNALS_VIA_CHARACTERS | ||
diff --git a/src/s/cygwin.h b/src/s/cygwin.h deleted file mode 100644 index 9b437341324..00000000000 --- a/src/s/cygwin.h +++ /dev/null | |||
| @@ -1,88 +0,0 @@ | |||
| 1 | /* System description header file for Cygwin. | ||
| 2 | |||
| 3 | Copyright (C) 1985-1986, 1992, 1999, 2002-2012 Free Software Foundation, Inc. | ||
| 4 | |||
| 5 | This file is part of GNU Emacs. | ||
| 6 | |||
| 7 | GNU Emacs is free software: you can redistribute it and/or modify | ||
| 8 | it under the terms of the GNU General Public License as published by | ||
| 9 | the Free Software Foundation, either version 3 of the License, or | ||
| 10 | (at your option) any later version. | ||
| 11 | |||
| 12 | GNU Emacs is distributed in the hope that it will be useful, | ||
| 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | GNU General Public License for more details. | ||
| 16 | |||
| 17 | You should have received a copy of the GNU General Public License | ||
| 18 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | ||
| 19 | |||
| 20 | /* Emacs can read input using SIGIO and buffering characters itself, | ||
| 21 | or using CBREAK mode and making C-g cause SIGINT. | ||
| 22 | The choice is controlled by the variable interrupt_input. | ||
| 23 | |||
| 24 | Define INTERRUPT_INPUT to make interrupt_input = 1 the default (use SIGIO) | ||
| 25 | |||
| 26 | Emacs uses the presence or absence of the SIGIO and BROKEN_SIGIO macros | ||
| 27 | to indicate whether or not signal-driven I/O is possible. It uses | ||
| 28 | INTERRUPT_INPUT to decide whether to use it by default. | ||
| 29 | |||
| 30 | SIGIO can be used only on systems that implement it (4.2 and 4.3). | ||
| 31 | CBREAK mode has two disadvantages | ||
| 32 | 1) At least in 4.2, it is impossible to handle the Meta key properly. | ||
| 33 | I hear that in system V this problem does not exist. | ||
| 34 | 2) Control-G causes output to be discarded. | ||
| 35 | I do not know whether this can be fixed in system V. | ||
| 36 | |||
| 37 | Another method of doing input is planned but not implemented. | ||
| 38 | It would have Emacs fork off a separate process | ||
| 39 | to read the input and send it to the true Emacs process | ||
| 40 | through a pipe. */ | ||
| 41 | #undef INTERRUPT_INPUT | ||
| 42 | |||
| 43 | /* Define HAVE_PTYS if the system supports pty devices. */ | ||
| 44 | #define HAVE_PTYS | ||
| 45 | #define PTY_ITERATION int i; for (i = 0; i < 1; i++) /* ick */ | ||
| 46 | #define PTY_NAME_SPRINTF /* none */ | ||
| 47 | #define PTY_TTY_NAME_SPRINTF /* none */ | ||
| 48 | #define PTY_OPEN \ | ||
| 49 | do \ | ||
| 50 | { \ | ||
| 51 | int dummy; \ | ||
| 52 | SIGMASKTYPE mask; \ | ||
| 53 | mask = sigblock (sigmask (SIGCHLD)); \ | ||
| 54 | if (-1 == openpty (&fd, &dummy, pty_name, 0, 0)) \ | ||
| 55 | fd = -1; \ | ||
| 56 | sigsetmask (mask); \ | ||
| 57 | if (fd >= 0) \ | ||
| 58 | emacs_close (dummy); \ | ||
| 59 | } \ | ||
| 60 | while (0) | ||
| 61 | |||
| 62 | /* Define CLASH_DETECTION if you want lock files to be written | ||
| 63 | so that Emacs can tell instantly when you try to modify | ||
| 64 | a file that someone else has modified in his Emacs. */ | ||
| 65 | #define CLASH_DETECTION | ||
| 66 | |||
| 67 | /* If the system's imake configuration file defines `NeedWidePrototypes' | ||
| 68 | as `NO', we must define NARROWPROTO manually. Such a define is | ||
| 69 | generated in the Makefile generated by `xmkmf'. If we don't | ||
| 70 | define NARROWPROTO, we will see the wrong function prototypes | ||
| 71 | for X functions taking float or double parameters. */ | ||
| 72 | #define NARROWPROTO 1 | ||
| 73 | |||
| 74 | /* Used in various places to enable cygwin-specific code changes. */ | ||
| 75 | #define CYGWIN 1 | ||
| 76 | |||
| 77 | #define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base) | ||
| 78 | |||
| 79 | #define HAVE_SOCKETS | ||
| 80 | |||
| 81 | /* Emacs supplies its own malloc, but glib (part of Gtk+) calls | ||
| 82 | memalign and on Cygwin, that becomes the Cygwin-supplied memalign. | ||
| 83 | As malloc is not the Cygwin malloc, the Cygwin memalign always | ||
| 84 | returns ENOSYS. A workaround is to set G_SLICE=always-malloc. */ | ||
| 85 | #define G_SLICE_ALWAYS_MALLOC | ||
| 86 | |||
| 87 | /* Send signals to subprocesses by "typing" special chars at them. */ | ||
| 88 | #define SIGNALS_VIA_CHARACTERS | ||
diff --git a/src/s/darwin.h b/src/s/darwin.h index ce86bc5f578..20d576e4986 100644 --- a/src/s/darwin.h +++ b/src/s/darwin.h | |||
| @@ -17,100 +17,7 @@ GNU General Public License for more details. | |||
| 17 | You should have received a copy of the GNU General Public License | 17 | You should have received a copy of the GNU General Public License |
| 18 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | 18 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ |
| 19 | 19 | ||
| 20 | |||
| 21 | /* Define symbols to identify the version of Unix this is. | ||
| 22 | Define all the symbols that apply correctly. */ | ||
| 23 | #define BSD4_2 | ||
| 24 | /* BSD4_3 and BSD4_4 are already defined in sys/param.h */ | ||
| 25 | #define BSD_SYSTEM | ||
| 26 | |||
| 27 | /* More specific than the above two. We cannot use __APPLE__ as this | ||
| 28 | may not be defined on non-OSX Darwin, and we cannot define DARWIN | ||
| 29 | here because Panther and lower CoreFoundation.h uses DARWIN to | ||
| 30 | distinguish OS X from pure Darwin. */ | ||
| 31 | #define DARWIN_OS | ||
| 32 | |||
| 33 | |||
| 34 | /* Emacs can read input using SIGIO and buffering characters itself, | ||
| 35 | or using CBREAK mode and making C-g cause SIGINT. | ||
| 36 | The choice is controlled by the variable interrupt_input. | ||
| 37 | |||
| 38 | Define INTERRUPT_INPUT to make interrupt_input = 1 the default (use SIGIO) | ||
| 39 | |||
| 40 | Emacs uses the presence or absence of the SIGIO and BROKEN_SIGIO macros | ||
| 41 | to indicate whether or not signal-driven I/O is possible. It uses | ||
| 42 | INTERRUPT_INPUT to decide whether to use it by default. | ||
| 43 | |||
| 44 | SIGIO can be used only on systems that implement it (4.2 and 4.3). | ||
| 45 | CBREAK mode has two disadvantages | ||
| 46 | 1) At least in 4.2, it is impossible to handle the Meta key properly. | ||
| 47 | I hear that in system V this problem does not exist. | ||
| 48 | 2) Control-G causes output to be discarded. | ||
| 49 | I do not know whether this can be fixed in system V. | ||
| 50 | |||
| 51 | Another method of doing input is planned but not implemented. | ||
| 52 | It would have Emacs fork off a separate process | ||
| 53 | to read the input and send it to the true Emacs process | ||
| 54 | through a pipe. */ | ||
| 55 | #define INTERRUPT_INPUT | ||
| 56 | |||
| 57 | /* Letter to use in finding device name of first pty, | ||
| 58 | if system supports pty's. 'a' means it is /dev/ptya0 */ | ||
| 59 | #define FIRST_PTY_LETTER 'p' | ||
| 60 | |||
| 61 | /* Define HAVE_PTYS if the system supports pty devices. | ||
| 62 | Note: PTYs are broken on darwin <6. Use at your own risk. */ | ||
| 63 | #define HAVE_PTYS | ||
| 64 | /* Run only once. We need a `for'-loop because the code uses `continue'. */ | ||
| 65 | #define PTY_ITERATION int i; for (i = 0; i < 1; i++) | ||
| 66 | #define PTY_NAME_SPRINTF /* none */ | ||
| 67 | #define PTY_TTY_NAME_SPRINTF /* none */ | ||
| 68 | /* Note that openpty may fork via grantpt on Mac OS X 10.4/Darwin 8. | ||
| 69 | But we don't have to block SIGCHLD because it is blocked in the | ||
| 70 | implementation of grantpt. */ | ||
| 71 | #define PTY_OPEN \ | ||
| 72 | do \ | ||
| 73 | { \ | ||
| 74 | int slave; \ | ||
| 75 | if (openpty (&fd, &slave, pty_name, NULL, NULL) == -1) \ | ||
| 76 | fd = -1; \ | ||
| 77 | else \ | ||
| 78 | emacs_close (slave); \ | ||
| 79 | } \ | ||
| 80 | while (0) | ||
| 81 | |||
| 82 | /* PTYs only work correctly on Darwin 7 or higher. So make the default | ||
| 83 | for process-connection-type dependent on the kernel version. */ | ||
| 84 | #define MIN_PTY_KERNEL_VERSION '7' | ||
| 85 | |||
| 86 | /* Define CLASH_DETECTION if you want lock files to be written | ||
| 87 | so that Emacs can tell instantly when you try to modify | ||
| 88 | a file that someone else has modified in his Emacs. */ | ||
| 89 | #define CLASH_DETECTION | ||
| 90 | |||
| 91 | /* Avoid the use of the name init_process (process.c) because it is | ||
| 92 | also the name of a Mach system call. */ | ||
| 93 | #define init_process emacs_init_process | ||
| 94 | |||
| 95 | /* Used in dispnew.c. Copied from freebsd.h. */ | ||
| 96 | #define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base) | ||
| 97 | |||
| 98 | /* System uses OXTABS instead of the expected TAB3. (Copied from bsd386.h.) */ | ||
| 99 | #define TAB3 OXTABS | ||
| 100 | |||
| 101 | /* Define HAVE_SOCKETS if system supports 4.2-compatible sockets. */ | ||
| 102 | #define HAVE_SOCKETS | ||
| 103 | |||
| 104 | /* Definitions for how to compile & link. */ | 20 | /* Definitions for how to compile & link. */ |
| 105 | #ifdef HAVE_NS | ||
| 106 | #define SYSTEM_PURESIZE_EXTRA 200000 | ||
| 107 | #endif | ||
| 108 | |||
| 109 | /* On Darwin, res_init appears not to be useful: see bug#562 and | ||
| 110 | http://lists.gnu.org/archive/html/emacs-devel/2007-11/msg01467.html */ | ||
| 111 | #undef HAVE_RES_INIT | ||
| 112 | #undef HAVE_LIBRESOLV | ||
| 113 | |||
| 114 | #ifdef emacs | 21 | #ifdef emacs |
| 115 | #define malloc unexec_malloc | 22 | #define malloc unexec_malloc |
| 116 | #define realloc unexec_realloc | 23 | #define realloc unexec_realloc |
| @@ -119,23 +26,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 119 | #undef HAVE_POSIX_MEMALIGN | 26 | #undef HAVE_POSIX_MEMALIGN |
| 120 | #endif | 27 | #endif |
| 121 | 28 | ||
| 122 | /* Define the following so emacs symbols will not conflict with those | ||
| 123 | in the System framework. Otherwise -prebind will not work. */ | ||
| 124 | |||
| 125 | /* Do not define abort in emacs.c. */ | ||
| 126 | #define NO_ABORT | ||
| 127 | |||
| 128 | /* Do not define matherr in floatfns.c. */ | ||
| 129 | #define NO_MATHERR | ||
| 130 | |||
| 131 | /* The following solves the problem that Emacs hangs when evaluating | 29 | /* The following solves the problem that Emacs hangs when evaluating |
| 132 | (make-comint "test0" "/nodir/nofile" nil "") when /nodir/nofile | 30 | (make-comint "test0" "/nodir/nofile" nil "") when /nodir/nofile |
| 133 | does not exist. Also, setsid is not allowed in the vfork child's | 31 | does not exist. Also, setsid is not allowed in the vfork child's |
| 134 | context as of Darwin 9/Mac OS X 10.5. */ | 32 | context as of Darwin 9/Mac OS X 10.5. */ |
| 135 | #undef HAVE_WORKING_VFORK | 33 | #undef HAVE_WORKING_VFORK |
| 136 | #define vfork fork | 34 | #define vfork fork |
| 137 | |||
| 138 | /* Don't close pty in process.c to make it as controlling terminal. | ||
| 139 | It is already a controlling terminal of subprocess, because we did | ||
| 140 | ioctl TIOCSCTTY. */ | ||
| 141 | #define DONT_REOPEN_PTY | ||
diff --git a/src/s/freebsd.h b/src/s/freebsd.h index 05be07695cb..9177403f426 100644 --- a/src/s/freebsd.h +++ b/src/s/freebsd.h | |||
| @@ -20,41 +20,3 @@ GNU General Public License for more details. | |||
| 20 | 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 |
| 21 | 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/>. */ |
| 22 | 22 | ||
| 23 | /* Get most of the stuff from bsd-common */ | ||
| 24 | #include "bsd-common.h" | ||
| 25 | |||
| 26 | #define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base) | ||
| 27 | |||
| 28 | /* This silences a few compilation warnings. */ | ||
| 29 | #undef BSD_SYSTEM | ||
| 30 | #if __FreeBSD__ == 1 | ||
| 31 | #define BSD_SYSTEM 199103 | ||
| 32 | #elif __FreeBSD__ == 2 | ||
| 33 | #define BSD_SYSTEM 199306 | ||
| 34 | #elif __FreeBSD__ >= 3 | ||
| 35 | #define BSD_SYSTEM 199506 | ||
| 36 | #endif | ||
| 37 | |||
| 38 | /* Don't close pty in process.c to make it as controlling terminal. | ||
| 39 | It is already a controlling terminal of subprocess, because we did | ||
| 40 | ioctl TIOCSCTTY. */ | ||
| 41 | #define DONT_REOPEN_PTY | ||
| 42 | |||
| 43 | /* Circumvent a bug in FreeBSD. In the following sequence of | ||
| 44 | writes/reads on a PTY, read(2) returns bogus data: | ||
| 45 | |||
| 46 | write(2) 1022 bytes | ||
| 47 | write(2) 954 bytes, get EAGAIN | ||
| 48 | read(2) 1024 bytes in process_read_output | ||
| 49 | read(2) 11 bytes in process_read_output | ||
| 50 | |||
| 51 | That is, read(2) returns more bytes than have ever been written | ||
| 52 | successfully. The 1033 bytes read are the 1022 bytes written | ||
| 53 | successfully after processing (for example with CRs added if the | ||
| 54 | terminal is set up that way which it is here). The same bytes will | ||
| 55 | be seen again in a later read(2), without the CRs. */ | ||
| 56 | #define BROKEN_PTY_READ_AFTER_EAGAIN 1 | ||
| 57 | |||
| 58 | /* Tell that garbage collector that setjmp is known to save all | ||
| 59 | registers relevant for conservative garbage collection in the jmp_buf. */ | ||
| 60 | #define GC_SETJMP_WORKS 1 | ||
diff --git a/src/s/gnu-linux.h b/src/s/gnu-linux.h index e3d43249d81..2847fd6d19c 100644 --- a/src/s/gnu-linux.h +++ b/src/s/gnu-linux.h | |||
| @@ -20,139 +20,3 @@ GNU General Public License for more details. | |||
| 20 | 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 |
| 21 | 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/>. */ |
| 22 | 22 | ||
| 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 | ||
| 27 | |||
| 28 | #ifdef emacs | ||
| 29 | #ifdef HAVE_LINUX_VERSION_H | ||
| 30 | #include <linux/version.h> | ||
| 31 | |||
| 32 | #if LINUX_VERSION_CODE >= 0x20400 | ||
| 33 | /* 21 Jun 06: Eric Hanchrow <offby1@blarg.net> says this works. */ | ||
| 34 | #define SIGNALS_VIA_CHARACTERS | ||
| 35 | #endif /* LINUX_VERSION_CODE >= 0x20400 */ | ||
| 36 | #endif /* HAVE_LINUX_VERSION_H */ | ||
| 37 | #endif /* emacs */ | ||
| 38 | |||
| 39 | #if defined HAVE_GRANTPT | ||
| 40 | #define UNIX98_PTYS | ||
| 41 | |||
| 42 | /* Run only once. We need a `for'-loop because the code uses `continue'. */ | ||
| 43 | #define PTY_ITERATION int i; for (i = 0; i < 1; i++) | ||
| 44 | |||
| 45 | #ifdef HAVE_GETPT | ||
| 46 | #define PTY_NAME_SPRINTF | ||
| 47 | #define PTY_OPEN fd = getpt () | ||
| 48 | #else /* not HAVE_GETPT */ | ||
| 49 | #define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptmx"); | ||
| 50 | #endif /* not HAVE_GETPT */ | ||
| 51 | |||
| 52 | /* Note that grantpt and unlockpt may fork. We must block SIGCHLD to | ||
| 53 | prevent sigchld_handler from intercepting the child's death. */ | ||
| 54 | #define PTY_TTY_NAME_SPRINTF \ | ||
| 55 | { \ | ||
| 56 | char *ptyname; \ | ||
| 57 | \ | ||
| 58 | sigblock (sigmask (SIGCHLD)); \ | ||
| 59 | if (grantpt (fd) == -1 || unlockpt (fd) == -1 \ | ||
| 60 | || !(ptyname = ptsname(fd))) \ | ||
| 61 | { \ | ||
| 62 | sigunblock (sigmask (SIGCHLD)); \ | ||
| 63 | close (fd); \ | ||
| 64 | return -1; \ | ||
| 65 | } \ | ||
| 66 | strncpy (pty_name, ptyname, sizeof (pty_name)); \ | ||
| 67 | pty_name[sizeof (pty_name) - 1] = 0; \ | ||
| 68 | sigunblock (sigmask (SIGCHLD)); \ | ||
| 69 | } | ||
| 70 | |||
| 71 | #else /* not HAVE_GRANTPT */ | ||
| 72 | |||
| 73 | /* Letter to use in finding device name of first pty, | ||
| 74 | if system supports pty's. 'p' means it is /dev/ptyp0 */ | ||
| 75 | #define FIRST_PTY_LETTER 'p' | ||
| 76 | |||
| 77 | #endif /* not HAVE_GRANTPT */ | ||
| 78 | |||
| 79 | /* Define HAVE_PTYS if the system supports pty devices. */ | ||
| 80 | #define HAVE_PTYS | ||
| 81 | |||
| 82 | #define HAVE_SOCKETS | ||
| 83 | |||
| 84 | /* Define CLASH_DETECTION if you want lock files to be written | ||
| 85 | so that Emacs can tell instantly when you try to modify | ||
| 86 | a file that someone else has modified in his Emacs. */ | ||
| 87 | #define CLASH_DETECTION | ||
| 88 | |||
| 89 | /* Here, on a separate page, add any special hacks needed | ||
| 90 | to make Emacs work on this system. For example, | ||
| 91 | you might define certain system call names that don't | ||
| 92 | exist on your system, or that do different things on | ||
| 93 | your system and must be used only through an encapsulation | ||
| 94 | (Which you should place, by convention, in sysdep.c). */ | ||
| 95 | |||
| 96 | /* This is needed for dispnew.c:update_frame. */ | ||
| 97 | #ifdef emacs | ||
| 98 | #include <stdio.h> /* Get the definition of _IO_STDIO_H. */ | ||
| 99 | #if defined (_IO_STDIO_H) || defined (_STDIO_USES_IOSTREAM) | ||
| 100 | /* New C libio names. */ | ||
| 101 | #define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) \ | ||
| 102 | ((FILE)->_IO_write_ptr - (FILE)->_IO_write_base) | ||
| 103 | #elif defined (__UCLIBC__) | ||
| 104 | /* Using the uClibc library. */ | ||
| 105 | #define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) \ | ||
| 106 | ((FILE)->__bufpos - (FILE)->__bufstart) | ||
| 107 | #else /* !_IO_STDIO_H && ! __UCLIBC__ */ | ||
| 108 | /* Old C++ iostream names. */ | ||
| 109 | #define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) \ | ||
| 110 | ((FILE)->_pptr - (FILE)->_pbase) | ||
| 111 | #endif /* !_IO_STDIO_H && ! __UCLIBC__ */ | ||
| 112 | |||
| 113 | #define INTERRUPT_INPUT | ||
| 114 | #endif /* emacs */ | ||
| 115 | |||
| 116 | #define POSIX /* affects getpagesize.h and systty.h */ | ||
| 117 | |||
| 118 | /* This is to work around mysterious gcc failures in some system versions. | ||
| 119 | It is unlikely that Emacs changes will work around this problem; | ||
| 120 | therefore, this should remain permanently. */ | ||
| 121 | #ifndef HAVE_XRMSETDATABASE | ||
| 122 | #define HAVE_XRMSETDATABASE | ||
| 123 | #endif | ||
| 124 | |||
| 125 | #define NARROWPROTO 1 | ||
| 126 | |||
| 127 | /* Tell that garbage collector that setjmp is known to save all | ||
| 128 | registers relevant for conservative garbage collection in the jmp_buf. */ | ||
| 129 | /* Not all the architectures are tested, but there are Debian packages | ||
| 130 | for SCM and/or Guile on them, so the technique must work. See also | ||
| 131 | comments in alloc.c concerning setjmp and gcc. Fixme: it's | ||
| 132 | probably safe to make this conditional just on GCC, except for ia64 | ||
| 133 | register window-flushing. */ | ||
| 134 | /* Don't use #cpu here since in newest development versions of GCC, | ||
| 135 | we must call cpp with -traditional, and that disables #cpu. */ | ||
| 136 | #if defined __i386__ || defined __sparc__ || defined __mc68000__ \ | ||
| 137 | || defined __alpha__ || defined __mips__ || defined __s390__ \ | ||
| 138 | || defined __arm__ || defined __powerpc__ || defined __amd64__ \ | ||
| 139 | || defined __ia64__ || defined __sh__ | ||
| 140 | #define GC_SETJMP_WORKS 1 | ||
| 141 | #ifdef __ia64__ | ||
| 142 | #define GC_MARK_SECONDARY_STACK() \ | ||
| 143 | do { \ | ||
| 144 | extern void *__libc_ia64_register_backing_store_base; \ | ||
| 145 | __builtin_ia64_flushrs (); \ | ||
| 146 | mark_memory (__libc_ia64_register_backing_store_base, \ | ||
| 147 | __builtin_ia64_bsp ()); \ | ||
| 148 | } while (0) | ||
| 149 | #endif | ||
| 150 | #else | ||
| 151 | #define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE | ||
| 152 | #endif | ||
| 153 | |||
| 154 | #ifdef __i386__ | ||
| 155 | /* libc-linux/sysdeps/linux/i386/ulimit.c says that due to shared library, */ | ||
| 156 | /* we cannot get the maximum address for brk */ | ||
| 157 | # define ULIMIT_BREAK_VALUE (32*1024*1024) | ||
| 158 | #endif | ||
diff --git a/src/s/gnu.h b/src/s/gnu.h deleted file mode 100644 index c2bcf7fd9ab..00000000000 --- a/src/s/gnu.h +++ /dev/null | |||
| @@ -1,40 +0,0 @@ | |||
| 1 | /* Definitions file for GNU Emacs running on the GNU Hurd. | ||
| 2 | |||
| 3 | Copyright (C) 1994-1996, 2001-2012 Free Software Foundation, Inc. | ||
| 4 | |||
| 5 | This file is part of GNU Emacs. | ||
| 6 | |||
| 7 | GNU Emacs is free software: you can redistribute it and/or modify | ||
| 8 | it under the terms of the GNU General Public License as published by | ||
| 9 | the Free Software Foundation, either version 3 of the License, or | ||
| 10 | (at your option) any later version. | ||
| 11 | |||
| 12 | GNU Emacs is distributed in the hope that it will be useful, | ||
| 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | GNU General Public License for more details. | ||
| 16 | |||
| 17 | You should have received a copy of the GNU General Public License | ||
| 18 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | ||
| 19 | |||
| 20 | |||
| 21 | /* Get most of the stuff from bsd-common */ | ||
| 22 | #include "bsd-common.h" | ||
| 23 | |||
| 24 | #define SIGNALS_VIA_CHARACTERS | ||
| 25 | |||
| 26 | /* libc defines data_start. */ | ||
| 27 | #define DATA_START ({ extern int data_start; (char *) &data_start; }) | ||
| 28 | |||
| 29 | /* Some losing code fails to include this and then assumes | ||
| 30 | that because it is braindead that O_RDONLY==0. */ | ||
| 31 | #include <fcntl.h> | ||
| 32 | |||
| 33 | #ifdef emacs | ||
| 34 | #include <stdio.h> /* Get the definition of _IO_STDIO_H. */ | ||
| 35 | #if defined (_IO_STDIO_H) || defined (_STDIO_USES_IOSTREAM) | ||
| 36 | /* new C libio names */ | ||
| 37 | #define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) \ | ||
| 38 | ((FILE)->_IO_write_ptr - (FILE)->_IO_write_base) | ||
| 39 | #endif /* !_IO_STDIO_H */ | ||
| 40 | #endif /* emacs */ | ||
diff --git a/src/s/hpux10-20.h b/src/s/hpux10-20.h index 683837891f4..94b46a715ea 100644 --- a/src/s/hpux10-20.h +++ b/src/s/hpux10-20.h | |||
| @@ -17,79 +17,11 @@ GNU General Public License for more details. | |||
| 17 | You should have received a copy of the GNU General Public License | 17 | You should have received a copy of the GNU General Public License |
| 18 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | 18 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ |
| 19 | 19 | ||
| 20 | |||
| 21 | #define RUN_TIME_REMAP | ||
| 22 | |||
| 23 | /* Define symbols to identify the version of Unix this is. | ||
| 24 | Define all the symbols that apply correctly. */ | ||
| 25 | #define USG /* System III, System V, etc */ | ||
| 26 | #define USG5 | ||
| 27 | #define HPUX | ||
| 28 | |||
| 29 | /* Letter to use in finding device name of first pty, | ||
| 30 | if system supports pty's. 'p' means it is /dev/ptym/ptyp0 */ | ||
| 31 | #define FIRST_PTY_LETTER 'p' | ||
| 32 | |||
| 33 | /* Define HAVE_PTYS if the system supports pty devices. */ | ||
| 34 | #define HAVE_PTYS | ||
| 35 | |||
| 36 | /* Define HAVE_SOCKETS if system supports 4.2-compatible sockets. */ | ||
| 37 | #define HAVE_SOCKETS | ||
| 38 | |||
| 39 | /* Define CLASH_DETECTION if you want lock files to be written | ||
| 40 | so that Emacs can tell instantly when you try to modify | ||
| 41 | a file that someone else has modified in his Emacs. */ | ||
| 42 | #define CLASH_DETECTION | ||
| 43 | |||
| 44 | /* Special hacks needed to make Emacs run on this system. */ | ||
| 45 | |||
| 46 | /* Some additional system facilities exist. */ | ||
| 47 | #define HAVE_PERROR /* Delete this line for version 6. */ | ||
| 48 | |||
| 49 | /* This is how to get the device name of the tty end of a pty. */ | ||
| 50 | #define PTY_TTY_NAME_SPRINTF \ | ||
| 51 | sprintf (pty_name, "/dev/pty/tty%c%x", c, i); | ||
| 52 | |||
| 53 | /* This is how to get the device name of the control end of a pty. */ | ||
| 54 | #define PTY_NAME_SPRINTF \ | ||
| 55 | sprintf (pty_name, "/dev/ptym/pty%c%x", c, i); | ||
| 56 | |||
| 57 | /* This triggers a conditional in xfaces.c. */ | ||
| 58 | #define XOS_NEEDS_TIME_H | ||
| 59 | |||
| 60 | /* Assar Westerlund <assar@sics.se> says this is necessary for | ||
| 61 | HP-UX 10.20, and that it works for HP-UX 0 as well. */ | ||
| 62 | #define NO_EDITRES | ||
| 63 | |||
| 64 | /* Eric Backus <ericb@lsid.hp.com> says, HP-UX 9.x on HP 700 machines | ||
| 65 | has a broken `rint' in some library versions including math library | ||
| 66 | version number A.09.05. | ||
| 67 | |||
| 68 | You can fix the math library by installing patch number PHSS_4630. | ||
| 69 | But we can fix it more reliably for Emacs like this. */ | ||
| 70 | #undef HAVE_RINT | ||
| 71 | |||
| 72 | /* We have to go this route, rather than hpux9's approach of renaming the | 20 | /* We have to go this route, rather than hpux9's approach of renaming the |
| 73 | functions via macros. The system's stdlib.h has fully prototyped | 21 | functions via macros. The system's stdlib.h has fully prototyped |
| 74 | declarations, which yields a conflicting definition of srand48; it | 22 | declarations, which yields a conflicting definition of srand48; it |
| 75 | tries to redeclare what was once srandom to be srand48. So we go | 23 | tries to redeclare what was once srandom to be srand48. So we go |
| 76 | with HAVE_LRAND48 being defined. */ | 24 | with HAVE_LRAND48 being defined. |
| 25 | Note we also undef HAVE_RANDOM via configure. */ | ||
| 77 | #undef srandom | 26 | #undef srandom |
| 78 | #undef random | 27 | #undef random |
| 79 | #undef HAVE_RANDOM | ||
| 80 | |||
| 81 | |||
| 82 | /* Rainer Malzbender <rainer@displaytech.com> says defining | ||
| 83 | HAVE_XRMSETDATABASE allows Emacs to compile on HP-UX 10.20 using GCC. */ | ||
| 84 | #ifndef HAVE_XRMSETDATABASE | ||
| 85 | #define HAVE_XRMSETDATABASE | ||
| 86 | #endif | ||
| 87 | |||
| 88 | /* Conservative garbage collection has not been tested, so for now | ||
| 89 | play it safe and stick with the old-fashioned way of marking. */ | ||
| 90 | #define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE | ||
| 91 | |||
| 92 | /* The data segment on this machine always starts at address 0x40000000. */ | ||
| 93 | #define DATA_SEG_BITS 0x40000000 | ||
| 94 | |||
| 95 | #define DATA_START 0x40000000 | ||
diff --git a/src/s/irix6-5.h b/src/s/irix6-5.h index 7e5a5505ee2..9b215845461 100644 --- a/src/s/irix6-5.h +++ b/src/s/irix6-5.h | |||
| @@ -17,79 +17,16 @@ GNU General Public License for more details. | |||
| 17 | You should have received a copy of the GNU General Public License | 17 | You should have received a copy of the GNU General Public License |
| 18 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | 18 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ |
| 19 | 19 | ||
| 20 | |||
| 21 | #define IRIX6_5 /* used in m/iris4d */ | ||
| 22 | #include "usg5-4-common.h" | 20 | #include "usg5-4-common.h" |
| 23 | 21 | ||
| 24 | #undef _longjmp /* use system versions, not conservative aliases */ | 22 | #undef _longjmp /* use system versions, not conservative aliases */ |
| 25 | #undef _setjmp | 23 | #undef _setjmp |
| 26 | 24 | ||
| 27 | #define SETPGRP_RELEASES_CTTY | ||
| 28 | |||
| 29 | #ifdef SETUP_SLAVE_PTY | ||
| 30 | #undef SETUP_SLAVE_PTY | ||
| 31 | #endif | ||
| 32 | |||
| 33 | /* thomas@mathematik.uni-bremen.de says this is needed. */ | ||
| 34 | /* Make process_send_signal work by "typing" a signal character on the pty. */ | ||
| 35 | #define SIGNALS_VIA_CHARACTERS | ||
| 36 | |||
| 37 | /* Letter to use in finding device name of first pty, | ||
| 38 | if system supports pty's. 'a' means it is /dev/ptya0 */ | ||
| 39 | #undef FIRST_PTY_LETTER | ||
| 40 | #define FIRST_PTY_LETTER 'q' | ||
| 41 | |||
| 42 | /* No need to use sprintf to get the tty name--we get that from _getpty. */ | ||
| 43 | #define PTY_TTY_NAME_SPRINTF | ||
| 44 | /* No need to get the pty name at all. */ | ||
| 45 | #ifdef PTY_NAME_SPRINTF | ||
| 46 | #undef PTY_NAME_SPRINTF | ||
| 47 | #endif | ||
| 48 | #define PTY_NAME_SPRINTF | ||
| 49 | #ifdef emacs | 25 | #ifdef emacs |
| 50 | char *_getpty(); | 26 | char *_getpty(); |
| 51 | #endif | 27 | #endif |
| 52 | /* We need only try once to open a pty. */ | ||
| 53 | #define PTY_ITERATION | ||
| 54 | /* Here is how to do it. */ | ||
| 55 | #define PTY_OPEN \ | ||
| 56 | { \ | ||
| 57 | struct sigaction ocstat, cstat; \ | ||
| 58 | struct stat stb; \ | ||
| 59 | char * name; \ | ||
| 60 | sigemptyset(&cstat.sa_mask); \ | ||
| 61 | cstat.sa_handler = SIG_DFL; \ | ||
| 62 | cstat.sa_flags = 0; \ | ||
| 63 | sigaction(SIGCLD, &cstat, &ocstat); \ | ||
| 64 | name = _getpty (&fd, O_RDWR | O_NDELAY, 0600, 0); \ | ||
| 65 | sigaction(SIGCLD, &ocstat, (struct sigaction *)0); \ | ||
| 66 | if (name == 0) \ | ||
| 67 | return -1; \ | ||
| 68 | if (fd < 0) \ | ||
| 69 | return -1; \ | ||
| 70 | if (fstat (fd, &stb) < 0) \ | ||
| 71 | return -1; \ | ||
| 72 | strcpy (pty_name, name); \ | ||
| 73 | } | ||
| 74 | |||
| 75 | /* Ulimit(UL_GMEMLIM) is busted... */ | ||
| 76 | #define ULIMIT_BREAK_VALUE 0x14000000 | ||
| 77 | |||
| 78 | /* Tell process_send_signal to use VSUSP instead of VSWTCH. */ | ||
| 79 | #define PREFER_VSUSP | ||
| 80 | 28 | ||
| 81 | #define NARROWPROTO 1 | 29 | #undef SA_RESTART /* not the same as defining BROKEN_SA_RESTART */ |
| 82 | |||
| 83 | #undef SA_RESTART | ||
| 84 | 30 | ||
| 85 | #undef TIOCSIGSEND /* defined in usg5-4-common.h */ | 31 | #undef TIOCSIGSEND /* defined in usg5-4-common.h */ |
| 86 | 32 | ||
| 87 | /* Tested on Irix 6.5. SCM worked on earlier versions. */ | ||
| 88 | #define GC_SETJMP_WORKS 1 | ||
| 89 | |||
| 90 | |||
| 91 | /* DATA_SEG_BITS forces extra bits to be or'd in with any pointers which | ||
| 92 | were stored in a Lisp_Object (as Emacs uses fewer than 32 bits for | ||
| 93 | the value field of a LISP_OBJECT). */ | ||
| 94 | #define DATA_START 0x10000000 | ||
| 95 | #define DATA_SEG_BITS 0x10000000 | ||
diff --git a/src/s/ms-w32.h b/src/s/ms-w32.h index 5bf71d5f321..bcc4c4235ee 100644 --- a/src/s/ms-w32.h +++ b/src/s/ms-w32.h | |||
| @@ -27,6 +27,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 27 | #define DOS_NT /* MSDOS or WINDOWSNT */ | 27 | #define DOS_NT /* MSDOS or WINDOWSNT */ |
| 28 | #endif | 28 | #endif |
| 29 | 29 | ||
| 30 | /* #undef const */ | ||
| 31 | |||
| 30 | /* If you are compiling with a non-C calling convention but need to | 32 | /* If you are compiling with a non-C calling convention but need to |
| 31 | declare vararg routines differently, put it here. */ | 33 | declare vararg routines differently, put it here. */ |
| 32 | #define _VARARGS_ __cdecl | 34 | #define _VARARGS_ __cdecl |
| @@ -36,19 +38,10 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 36 | convention must be whatever standard the libraries expect. */ | 38 | convention must be whatever standard the libraries expect. */ |
| 37 | #define _CALLBACK_ __cdecl | 39 | #define _CALLBACK_ __cdecl |
| 38 | 40 | ||
| 39 | #define NO_MATHERR 1 | ||
| 40 | |||
| 41 | /* Letter to use in finding device name of first pty, | ||
| 42 | if system supports pty's. 'a' means it is /dev/ptya0 */ | ||
| 43 | #define FIRST_PTY_LETTER 'a' | ||
| 44 | |||
| 45 | /* Define HAVE_TIMEVAL if the system supports the BSD style clock values. | 41 | /* Define HAVE_TIMEVAL if the system supports the BSD style clock values. |
| 46 | Look in <sys/time.h> for a timeval structure. */ | 42 | Look in <sys/time.h> for a timeval structure. */ |
| 47 | #define HAVE_TIMEVAL 1 | 43 | #define HAVE_TIMEVAL 1 |
| 48 | 44 | ||
| 49 | /* NT supports Winsock which is close enough (with some hacks). */ | ||
| 50 | #define HAVE_SOCKETS 1 | ||
| 51 | |||
| 52 | /* But our select implementation doesn't allow us to make non-blocking | 45 | /* But our select implementation doesn't allow us to make non-blocking |
| 53 | connects. So until that is fixed, this is necessary: */ | 46 | connects. So until that is fixed, this is necessary: */ |
| 54 | #define BROKEN_NON_BLOCKING_CONNECT 1 | 47 | #define BROKEN_NON_BLOCKING_CONNECT 1 |
| @@ -57,14 +50,25 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 57 | for received packets, so datagrams are broken too. */ | 50 | for received packets, so datagrams are broken too. */ |
| 58 | #define BROKEN_DATAGRAM_SOCKETS 1 | 51 | #define BROKEN_DATAGRAM_SOCKETS 1 |
| 59 | 52 | ||
| 60 | #define MAIL_USE_POP 1 | ||
| 61 | #define MAIL_USE_SYSTEM_LOCK 1 | 53 | #define MAIL_USE_SYSTEM_LOCK 1 |
| 62 | 54 | ||
| 63 | /* If the character used to separate elements of the executable path | 55 | /* If the character used to separate elements of the executable path |
| 64 | is not ':', #define this to be the appropriate character constant. */ | 56 | is not ':', #define this to be the appropriate character constant. */ |
| 65 | #define SEPCHAR ';' | 57 | #define SEPCHAR ';' |
| 66 | 58 | ||
| 67 | #define ORDINARY_LINK 1 | 59 | /* Define to 1 if GCC-style __attribute__ ((__aligned__ (expr))) works. */ |
| 60 | #ifdef __GNUC__ | ||
| 61 | #define HAVE_ATTRIBUTE_ALIGNED 1 | ||
| 62 | #endif | ||
| 63 | |||
| 64 | /* Define to 1 if strtold conforms to C99. */ | ||
| 65 | #ifdef __GNUC__ | ||
| 66 | #define HAVE_C99_STRTOLD 1 | ||
| 67 | #endif | ||
| 68 | |||
| 69 | #if (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8)) | ||
| 70 | #define HAVE___BUILTIN_UNWIND_INIT 1 | ||
| 71 | #endif | ||
| 68 | 72 | ||
| 69 | /* ============================================================ */ | 73 | /* ============================================================ */ |
| 70 | 74 | ||
| @@ -81,6 +85,46 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 81 | #define IS_DIRECTORY_SEP(_c_) ((_c_) == '/' || (_c_) == '\\') | 85 | #define IS_DIRECTORY_SEP(_c_) ((_c_) == '/' || (_c_) == '\\') |
| 82 | #define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_) || IS_DEVICE_SEP (_c_)) | 86 | #define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_) || IS_DEVICE_SEP (_c_)) |
| 83 | 87 | ||
| 88 | #ifdef __GNUC__ | ||
| 89 | #ifndef __cplusplus | ||
| 90 | #undef inline | ||
| 91 | #endif | ||
| 92 | #else /* MSVC */ | ||
| 93 | #define inline __inline | ||
| 94 | #endif | ||
| 95 | |||
| 96 | #ifdef __GNUC__ | ||
| 97 | # define restrict __restrict__ | ||
| 98 | #else | ||
| 99 | # define restrict | ||
| 100 | #endif | ||
| 101 | |||
| 102 | /* `mode_t' is not defined for MSVC. Define. */ | ||
| 103 | #ifdef _MSC_VER | ||
| 104 | typedef unsigned short mode_t; | ||
| 105 | #endif | ||
| 106 | |||
| 107 | /* A va_copy replacement for MSVC. */ | ||
| 108 | #ifdef _MSC_VER | ||
| 109 | # ifdef _WIN64 | ||
| 110 | # ifndef va_copy /* Need to be checked (?) */ | ||
| 111 | # define va_copy(d,s) ((d) = (s)) | ||
| 112 | # endif | ||
| 113 | # else /* not _WIN64 */ | ||
| 114 | # define va_copy(d,s) ((d) = (s)) | ||
| 115 | # endif /* not _WIN64 */ | ||
| 116 | #endif /* _MSC_VER */ | ||
| 117 | |||
| 118 | #ifndef WINDOWSNT | ||
| 119 | /* Some of the files of Emacs which are intended for use with other | ||
| 120 | programs assume that if you have a config.h file, you must declare | ||
| 121 | the type of getenv. */ | ||
| 122 | extern char *getenv (); | ||
| 123 | #endif | ||
| 124 | |||
| 125 | #ifdef HAVE_STRINGS_H | ||
| 126 | #include "strings.h" | ||
| 127 | #endif | ||
| 84 | #include <sys/types.h> | 128 | #include <sys/types.h> |
| 85 | 129 | ||
| 86 | #ifdef _MSC_VER | 130 | #ifdef _MSC_VER |
| @@ -104,77 +148,6 @@ struct sigaction { | |||
| 104 | #define MAXPATHLEN _MAX_PATH | 148 | #define MAXPATHLEN _MAX_PATH |
| 105 | #endif | 149 | #endif |
| 106 | 150 | ||
| 107 | #define HAVE_SOUND 1 | ||
| 108 | #define LISP_FLOAT_TYPE 1 | ||
| 109 | |||
| 110 | #define HAVE_SYS_TIMEB_H 1 | ||
| 111 | #define HAVE_SYS_TIME_H 1 | ||
| 112 | #define HAVE_UNISTD_H 1 | ||
| 113 | #undef HAVE_UTIME_H | ||
| 114 | #undef HAVE_LINUX_VERSION_H | ||
| 115 | #undef HAVE_SYS_SYSTEMINFO_H | ||
| 116 | #define HAVE_PWD_H 1 | ||
| 117 | #define TIME_WITH_SYS_TIME 1 | ||
| 118 | |||
| 119 | #define HAVE_GETTIMEOFDAY 1 | ||
| 120 | #define HAVE_GETHOSTNAME 1 | ||
| 121 | #define HAVE_DUP2 1 | ||
| 122 | #define HAVE_RENAME 1 | ||
| 123 | #define HAVE_CLOSEDIR 1 | ||
| 124 | #define HAVE_FSYNC 1 /* fsync is called _commit in MSVC. */ | ||
| 125 | |||
| 126 | #undef TM_IN_SYS_TIME | ||
| 127 | #undef HAVE_TM_ZONE | ||
| 128 | |||
| 129 | #define HAVE_LONG_FILE_NAMES 1 | ||
| 130 | |||
| 131 | #define HAVE_MKDIR 1 | ||
| 132 | #define HAVE_RMDIR 1 | ||
| 133 | #define HAVE_RANDOM 1 | ||
| 134 | #undef HAVE_SYSINFO | ||
| 135 | #undef HAVE_LRAND48 | ||
| 136 | #define HAVE_MEMCMP 1 | ||
| 137 | #define HAVE_MEMCPY 1 | ||
| 138 | #define HAVE_MEMMOVE 1 | ||
| 139 | #define HAVE_MEMSET 1 | ||
| 140 | #define HAVE_LOGB 1 | ||
| 141 | #define HAVE_FREXP 1 | ||
| 142 | #define HAVE_FMOD 1 | ||
| 143 | #undef HAVE_RINT | ||
| 144 | #undef HAVE_CBRT | ||
| 145 | #undef HAVE_RES_INIT /* For -lresolv on Suns. */ | ||
| 146 | #undef HAVE_SETSID | ||
| 147 | #undef HAVE_FPATHCONF | ||
| 148 | #define HAVE_SELECT 1 | ||
| 149 | #undef HAVE_EUIDACCESS | ||
| 150 | #define HAVE_GETPAGESIZE 1 | ||
| 151 | #define HAVE_TZSET 1 | ||
| 152 | #define HAVE_SETLOCALE 1 | ||
| 153 | #undef HAVE_UTIMES | ||
| 154 | #undef HAVE_SETRLIMIT | ||
| 155 | #undef HAVE_SETPGID | ||
| 156 | /* If you think about defining HAVE_GETCWD, don't: the alternative | ||
| 157 | getwd is redefined on w32.c, and does not really return the current | ||
| 158 | directory, to get the desired results elsewhere in Emacs */ | ||
| 159 | #undef HAVE_GETCWD | ||
| 160 | #define HAVE_SHUTDOWN 1 | ||
| 161 | |||
| 162 | #define LOCALTIME_CACHE | ||
| 163 | #define HAVE_INET_SOCKETS 1 | ||
| 164 | |||
| 165 | #undef HAVE_AIX_SMT_EXP | ||
| 166 | #define USE_TOOLKIT_SCROLL_BARS 1 | ||
| 167 | |||
| 168 | /* Define if you have the ANSI `strerror' function. | ||
| 169 | Otherwise you must have the variable `char *sys_errlist[]'. */ | ||
| 170 | #define HAVE_STRERROR 1 | ||
| 171 | |||
| 172 | /* Define if `struct utimbuf' is declared by <utime.h>. */ | ||
| 173 | #undef HAVE_STRUCT_UTIMBUF | ||
| 174 | |||
| 175 | #define HAVE_MOUSE 1 | ||
| 176 | #define HAVE_H_ERRNO 1 | ||
| 177 | |||
| 178 | #ifdef HAVE_NTGUI | 151 | #ifdef HAVE_NTGUI |
| 179 | #define HAVE_WINDOW_SYSTEM 1 | 152 | #define HAVE_WINDOW_SYSTEM 1 |
| 180 | #define HAVE_MENUS 1 | 153 | #define HAVE_MENUS 1 |
| @@ -226,6 +199,7 @@ struct sigaction { | |||
| 226 | #define rename sys_rename | 199 | #define rename sys_rename |
| 227 | #define rmdir sys_rmdir | 200 | #define rmdir sys_rmdir |
| 228 | #define select sys_select | 201 | #define select sys_select |
| 202 | #define pselect sys_select | ||
| 229 | #define sleep sys_sleep | 203 | #define sleep sys_sleep |
| 230 | #define strerror sys_strerror | 204 | #define strerror sys_strerror |
| 231 | #undef unlink | 205 | #undef unlink |
| @@ -295,6 +269,15 @@ typedef int pid_t; | |||
| 295 | #define utime _utime | 269 | #define utime _utime |
| 296 | #endif | 270 | #endif |
| 297 | 271 | ||
| 272 | /* 'struct timespec' is used by time-related functions in lib/ and | ||
| 273 | elsewhere, but we don't use lib/time.h where the structure is | ||
| 274 | defined. */ | ||
| 275 | struct timespec | ||
| 276 | { | ||
| 277 | time_t tv_sec; /* seconds */ | ||
| 278 | long int tv_nsec; /* nanoseconds */ | ||
| 279 | }; | ||
| 280 | |||
| 298 | /* This is hacky, but is necessary to avoid warnings about macro | 281 | /* This is hacky, but is necessary to avoid warnings about macro |
| 299 | redefinitions using the SDK compilers. */ | 282 | redefinitions using the SDK compilers. */ |
| 300 | #ifndef __STDC__ | 283 | #ifndef __STDC__ |
| @@ -341,6 +324,13 @@ extern char *get_emacs_configuration_options (void); | |||
| 341 | #define _WINSOCKAPI_ 1 | 324 | #define _WINSOCKAPI_ 1 |
| 342 | #define _WINSOCK_H | 325 | #define _WINSOCK_H |
| 343 | 326 | ||
| 327 | /* Prevent accidental use of features unavailable in | ||
| 328 | older Windows versions we still support. */ | ||
| 329 | #define _WIN32_WINNT 0x0400 | ||
| 330 | |||
| 331 | /* Make a leaner executable. */ | ||
| 332 | #define WIN32_LEAN_AND_MEAN 1 | ||
| 333 | |||
| 344 | /* Defines size_t and alloca (). */ | 334 | /* Defines size_t and alloca (). */ |
| 345 | #ifdef emacs | 335 | #ifdef emacs |
| 346 | #define malloc e_malloc | 336 | #define malloc e_malloc |
| @@ -354,6 +344,16 @@ extern char *get_emacs_configuration_options (void); | |||
| 354 | #include <malloc.h> | 344 | #include <malloc.h> |
| 355 | #endif | 345 | #endif |
| 356 | 346 | ||
| 347 | /* stdlib.h must be included after redefining malloc & friends, but | ||
| 348 | before redefining abort. Isn't library redefinition funny? */ | ||
| 349 | #include <stdlib.h> | ||
| 350 | |||
| 351 | /* Redefine abort. */ | ||
| 352 | #ifdef HAVE_NTGUI | ||
| 353 | #define abort w32_abort | ||
| 354 | extern _Noreturn void w32_abort (void); | ||
| 355 | #endif | ||
| 356 | |||
| 357 | #include <sys/stat.h> | 357 | #include <sys/stat.h> |
| 358 | 358 | ||
| 359 | /* Define for those source files that do not include enough NT system files. */ | 359 | /* Define for those source files that do not include enough NT system files. */ |
| @@ -366,14 +366,37 @@ extern char *get_emacs_configuration_options (void); | |||
| 366 | #endif | 366 | #endif |
| 367 | 367 | ||
| 368 | /* For proper declaration of environ. */ | 368 | /* For proper declaration of environ. */ |
| 369 | #include <stdlib.h> | ||
| 370 | #ifndef sys_nerr | 369 | #ifndef sys_nerr |
| 371 | #define sys_nerr _sys_nerr | 370 | #define sys_nerr _sys_nerr |
| 372 | #endif | 371 | #endif |
| 373 | #include <string.h> | ||
| 374 | 372 | ||
| 375 | extern int getloadavg (double *, int); | 373 | extern int getloadavg (double *, int); |
| 376 | 374 | ||
| 375 | #if defined (__MINGW32__) || _MSC_VER >= 1400 | ||
| 376 | |||
| 377 | /* Define to 1 if the system has the type `long long int'. */ | ||
| 378 | # define HAVE_LONG_LONG_INT 1 | ||
| 379 | |||
| 380 | /* Define to 1 if the system has the type `unsigned long long int'. */ | ||
| 381 | # define HAVE_UNSIGNED_LONG_LONG_INT 1 | ||
| 382 | |||
| 383 | #elif _MSC_VER >= 1200 | ||
| 384 | |||
| 385 | /* Temporarily disable wider-than-pointer integers until they're tested more. | ||
| 386 | Build with CFLAGS='-DWIDE_EMACS_INT' to try them out. */ | ||
| 387 | |||
| 388 | # ifdef WIDE_EMACS_INT | ||
| 389 | |||
| 390 | /* Use pre-C99-style 64-bit integers. */ | ||
| 391 | typedef __int64 EMACS_INT; | ||
| 392 | typedef unsigned __int64 EMACS_UINT; | ||
| 393 | # define EMACS_INT_MAX _I64_MAX | ||
| 394 | # define pI "I64" | ||
| 395 | |||
| 396 | # endif | ||
| 397 | |||
| 398 | #endif | ||
| 399 | |||
| 377 | /* We need a little extra space, see ../../lisp/loadup.el. */ | 400 | /* We need a little extra space, see ../../lisp/loadup.el. */ |
| 378 | #define SYSTEM_PURESIZE_EXTRA 50000 | 401 | #define SYSTEM_PURESIZE_EXTRA 50000 |
| 379 | 402 | ||
| @@ -411,5 +434,4 @@ extern void _DebPrint (const char *fmt, ...); | |||
| 411 | #define DebPrint(stuff) | 434 | #define DebPrint(stuff) |
| 412 | #endif | 435 | #endif |
| 413 | 436 | ||
| 414 | |||
| 415 | /* ============================================================ */ | 437 | /* ============================================================ */ |
diff --git a/src/s/msdos.h b/src/s/msdos.h index fc1a8c7506a..15112dad7a7 100644 --- a/src/s/msdos.h +++ b/src/s/msdos.h | |||
| @@ -31,7 +31,6 @@ You lose; /* Emacs for DOS must be compiled with DJGPP */ | |||
| 31 | #endif | 31 | #endif |
| 32 | 32 | ||
| 33 | #define DOS_NT /* MSDOS or WINDOWSNT */ | 33 | #define DOS_NT /* MSDOS or WINDOWSNT */ |
| 34 | #undef BSD_SYSTEM | ||
| 35 | 34 | ||
| 36 | /* subprocesses should be defined if you want to have code for | 35 | /* subprocesses should be defined if you want to have code for |
| 37 | asynchronous subprocesses (as used in M-x compile and M-x shell). | 36 | asynchronous subprocesses (as used in M-x compile and M-x shell). |
| @@ -44,10 +43,6 @@ You lose; /* Emacs for DOS must be compiled with DJGPP */ | |||
| 44 | different things on your system and must be used only through an | 43 | different things on your system and must be used only through an |
| 45 | encapsulation (which you should place, by convention, in sysdep.c). */ | 44 | encapsulation (which you should place, by convention, in sysdep.c). */ |
| 46 | 45 | ||
| 47 | /* Avoid incompatibilities between gmalloc.c and system header files | ||
| 48 | in how to declare valloc. */ | ||
| 49 | #define GMALLOC_INHIBIT_VALLOC | ||
| 50 | |||
| 51 | /* This overrides the default value on editfns.c, since DJGPP | 46 | /* This overrides the default value on editfns.c, since DJGPP |
| 52 | does not have pw->pw_gecos. */ | 47 | does not have pw->pw_gecos. */ |
| 53 | #define USER_FULL_NAME (getenv ("NAME")) | 48 | #define USER_FULL_NAME (getenv ("NAME")) |
| @@ -57,15 +52,16 @@ You lose; /* Emacs for DOS must be compiled with DJGPP */ | |||
| 57 | #define _setjmp setjmp | 52 | #define _setjmp setjmp |
| 58 | #define _longjmp longjmp | 53 | #define _longjmp longjmp |
| 59 | 54 | ||
| 60 | #define DATA_START (&etext + 1) | ||
| 61 | |||
| 62 | #define _NAIVE_DOS_REGS | 55 | #define _NAIVE_DOS_REGS |
| 63 | 56 | ||
| 64 | /* command.com does not understand `...` so we define this. */ | 57 | /* Used by emacs.c:decode_env_path. */ |
| 65 | #define SEPCHAR ';' | 58 | #define SEPCHAR ';' |
| 66 | 59 | ||
| 60 | /* Used by callproc.c (and process.c, but in the part not compiled on | ||
| 61 | MSDOS). The default is defined on process.h. */ | ||
| 67 | #define NULL_DEVICE "nul" | 62 | #define NULL_DEVICE "nul" |
| 68 | 63 | ||
| 64 | /* Used by floatfns.c. */ | ||
| 69 | #define HAVE_INVERSE_HYPERBOLIC | 65 | #define HAVE_INVERSE_HYPERBOLIC |
| 70 | #define FLOAT_CHECK_DOMAIN | 66 | #define FLOAT_CHECK_DOMAIN |
| 71 | 67 | ||
| @@ -90,27 +86,14 @@ You lose; /* Emacs for DOS must be compiled with DJGPP */ | |||
| 90 | :se=</SO>:so=<SO>:us=<UL>:ue=</UL>:md=<BD>:mh=<DIM>:mb=<BL>:mr=<RV>:me=<NV>:\ | 86 | :se=</SO>:so=<SO>:us=<UL>:ue=</UL>:md=<BD>:mh=<DIM>:mb=<BL>:mr=<RV>:me=<NV>:\ |
| 91 | :AB=<BG %d>:AF=<FG %d>:op=<DefC>:" | 87 | :AB=<BG %d>:AF=<FG %d>:op=<DefC>:" |
| 92 | 88 | ||
| 93 | /* Define this to a function (Fdowncase, Fupcase) if your file system | 89 | /* Define this to be the separator between devices and paths. Used by |
| 94 | likes that. */ | 90 | lisp.h to define IS_DEVICE_SEP. */ |
| 95 | #define FILE_SYSTEM_CASE Fmsdos_downcase_filename | ||
| 96 | |||
| 97 | /* Define this to be the separator between devices and paths. */ | ||
| 98 | #define DEVICE_SEP ':' | 91 | #define DEVICE_SEP ':' |
| 99 | 92 | ||
| 100 | /* We'll support either convention on MSDOG. */ | 93 | /* We'll support either convention of slashes on MSDOS. */ |
| 101 | #define IS_DIRECTORY_SEP(_c_) ((_c_) == '/' || (_c_) == '\\') | 94 | #define IS_DIRECTORY_SEP(_c_) ((_c_) == '/' || (_c_) == '\\') |
| 102 | #define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_) || IS_DEVICE_SEP (_c_)) | 95 | #define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_) || IS_DEVICE_SEP (_c_)) |
| 103 | 96 | ||
| 104 | |||
| 105 | /* Mode line description of a buffer's type. */ | ||
| 106 | #define MODE_LINE_BINARY_TEXT(buf) (NILP(B_(buf,buffer_file_type)) ? "T" : "B") | ||
| 107 | |||
| 108 | /* We have (the code to control) a mouse. */ | ||
| 109 | #define HAVE_MOUSE | ||
| 110 | |||
| 111 | /* We can use mouse menus. */ | ||
| 112 | #define HAVE_MENUS | ||
| 113 | |||
| 114 | /* Define one of these for easier conditionals. */ | 97 | /* Define one of these for easier conditionals. */ |
| 115 | #ifdef HAVE_X_WINDOWS | 98 | #ifdef HAVE_X_WINDOWS |
| 116 | /* We need a little extra space, see ../../lisp/loadup.el and the | 99 | /* We need a little extra space, see ../../lisp/loadup.el and the |
| @@ -129,7 +112,3 @@ You lose; /* Emacs for DOS must be compiled with DJGPP */ | |||
| 129 | enlarging Emacs footprint by another 100+ KBytes. */ | 112 | enlarging Emacs footprint by another 100+ KBytes. */ |
| 130 | #define SYSTEM_PURESIZE_EXTRA (-170000+65000) | 113 | #define SYSTEM_PURESIZE_EXTRA (-170000+65000) |
| 131 | #endif | 114 | #endif |
| 132 | |||
| 133 | /* Tell the garbage collector that setjmp is known to save all | ||
| 134 | registers relevant for conservative garbage collection in the jmp_buf. */ | ||
| 135 | #define GC_SETJMP_WORKS 1 | ||
diff --git a/src/s/netbsd.h b/src/s/netbsd.h index ce3b2afa1bb..7a571ee8116 100644 --- a/src/s/netbsd.h +++ b/src/s/netbsd.h | |||
| @@ -17,24 +17,8 @@ GNU General Public License for more details. | |||
| 17 | You should have received a copy of the GNU General Public License | 17 | You should have received a copy of the GNU General Public License |
| 18 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | 18 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ |
| 19 | 19 | ||
| 20 | |||
| 21 | /* Get most of the stuff from bsd-common. */ | ||
| 22 | #include "bsd-common.h" | ||
| 23 | |||
| 24 | #define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base) | ||
| 25 | |||
| 26 | #define DEFAULT_SOUND_DEVICE "/dev/audio" | ||
| 27 | |||
| 28 | /* Greg A. Woods <woods@weird.com> says we must include signal.h | 20 | /* Greg A. Woods <woods@weird.com> says we must include signal.h |
| 29 | before syssignal.h is included, to work around interface conflicts | 21 | before syssignal.h is included, to work around interface conflicts |
| 30 | that are handled with CPP __RENAME() macro in signal.h. */ | 22 | that are handled with CPP __RENAME() macro in signal.h. */ |
| 31 | #include <signal.h> | 23 | #include <signal.h> |
| 32 | 24 | ||
| 33 | /* Don't close pty in process.c to make it as controlling terminal. | ||
| 34 | It is already a controlling terminal of subprocess, because we did | ||
| 35 | ioctl TIOCSCTTY. */ | ||
| 36 | #define DONT_REOPEN_PTY | ||
| 37 | |||
| 38 | /* Tell that garbage collector that setjmp is known to save all | ||
| 39 | registers relevant for conservative garbage collection in the jmp_buf. */ | ||
| 40 | #define GC_SETJMP_WORKS 1 | ||
diff --git a/src/s/sol2-6.h b/src/s/sol2-6.h index bb7a9859b7d..3bed55598b7 100644 --- a/src/s/sol2-6.h +++ b/src/s/sol2-6.h | |||
| @@ -19,43 +19,3 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 19 | 19 | ||
| 20 | #include "usg5-4-common.h" | 20 | #include "usg5-4-common.h" |
| 21 | 21 | ||
| 22 | #define SOLARIS2 | ||
| 23 | |||
| 24 | /* This triggers a conditional in xfaces.c. */ | ||
| 25 | #define XOS_NEEDS_TIME_H | ||
| 26 | |||
| 27 | #define POSIX | ||
| 28 | |||
| 29 | /* Prefer kstat over kvm in getloadavg.c, kstat doesn't require root. | ||
| 30 | ghazi@caip.rutgers.edu, 7/21/97. Don't redefine if already defined | ||
| 31 | (e.g., by config.h). */ | ||
| 32 | #ifndef HAVE_LIBKSTAT | ||
| 33 | #define HAVE_LIBKSTAT | ||
| 34 | #endif | ||
| 35 | |||
| 36 | /* This is the same definition as in usg5-4-common.h, but with sigblock/sigunblock | ||
| 37 | rather than sighold/sigrelse, which appear to be BSD4.1 specific. | ||
| 38 | It may also be appropriate for SVR4.x | ||
| 39 | (x<2) but I'm not sure. fnf@cygnus.com */ | ||
| 40 | /* This sets the name of the slave side of the PTY. On SysVr4, | ||
| 41 | grantpt(3) forks a subprocess, so keep sigchld_handler() from | ||
| 42 | intercepting that death. If any child but grantpt's should die | ||
| 43 | within, it should be caught after sigrelse(2). */ | ||
| 44 | |||
| 45 | #define PTY_TTY_NAME_SPRINTF \ | ||
| 46 | { \ | ||
| 47 | char *ptsname (int), *ptyname; \ | ||
| 48 | \ | ||
| 49 | sigblock (sigmask (SIGCLD)); \ | ||
| 50 | if (grantpt (fd) == -1) \ | ||
| 51 | { emacs_close (fd); return -1; } \ | ||
| 52 | sigunblock (sigmask (SIGCLD)); \ | ||
| 53 | if (unlockpt (fd) == -1) \ | ||
| 54 | { emacs_close (fd); return -1; } \ | ||
| 55 | if (!(ptyname = ptsname (fd))) \ | ||
| 56 | { emacs_close (fd); return -1; } \ | ||
| 57 | strncpy (pty_name, ptyname, sizeof (pty_name)); \ | ||
| 58 | pty_name[sizeof (pty_name) - 1] = 0; \ | ||
| 59 | } | ||
| 60 | |||
| 61 | #define GC_SETJMP_WORKS 1 | ||
diff --git a/src/s/template.h b/src/s/template.h index e3557aa191b..e6f43896aac 100644 --- a/src/s/template.h +++ b/src/s/template.h | |||
| @@ -19,46 +19,6 @@ GNU General Public License for more details. | |||
| 19 | You should have received a copy of the GNU General Public License | 19 | You should have received a copy of the GNU General Public License |
| 20 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | 20 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ |
| 21 | 21 | ||
| 22 | |||
| 23 | /* Define symbols to identify the version of Unix this is. | ||
| 24 | Define all the symbols that apply correctly. */ | ||
| 25 | |||
| 26 | /* #define USG5 */ | ||
| 27 | /* #define USG */ | ||
| 28 | /* #define HPUX */ | ||
| 29 | /* #define BSD4_2 */ | ||
| 30 | /* #define BSD_SYSTEM */ | ||
| 31 | |||
| 32 | /* Emacs can read input using SIGIO and buffering characters itself, | ||
| 33 | or using CBREAK mode and making C-g cause SIGINT. | ||
| 34 | The choice is controlled by the variable interrupt_input. | ||
| 35 | |||
| 36 | Define INTERRUPT_INPUT to make interrupt_input = 1 the default (use SIGIO) | ||
| 37 | |||
| 38 | Emacs uses the presence or absence of the SIGIO and BROKEN_SIGIO macros | ||
| 39 | to indicate whether or not signal-driven I/O is possible. It uses | ||
| 40 | INTERRUPT_INPUT to decide whether to use it by default. | ||
| 41 | |||
| 42 | SIGIO can be used only on systems that implement it (4.2 and 4.3). | ||
| 43 | CBREAK mode has two disadvantages | ||
| 44 | 1) At least in 4.2, it is impossible to handle the Meta key properly. | ||
| 45 | I hear that in system V this problem does not exist. | ||
| 46 | 2) Control-G causes output to be discarded. | ||
| 47 | I do not know whether this can be fixed in system V. | ||
| 48 | |||
| 49 | Another method of doing input is planned but not implemented. | ||
| 50 | It would have Emacs fork off a separate process | ||
| 51 | to read the input and send it to the true Emacs process | ||
| 52 | through a pipe. */ | ||
| 53 | #define INTERRUPT_INPUT | ||
| 54 | |||
| 55 | /* Letter to use in finding device name of first pty, | ||
| 56 | if system supports pty's. 'a' means it is /dev/ptya0. */ | ||
| 57 | #define FIRST_PTY_LETTER 'a' | ||
| 58 | |||
| 59 | /* Define HAVE_PTYS if the system supports pty devices. */ | ||
| 60 | #define HAVE_PTYS | ||
| 61 | |||
| 62 | /* subprocesses should be undefined if you do NOT want to | 22 | /* subprocesses should be undefined if you do NOT want to |
| 63 | have code for asynchronous subprocesses | 23 | have code for asynchronous subprocesses |
| 64 | (as used in M-x compile and M-x shell). | 24 | (as used in M-x compile and M-x shell). |
| @@ -66,11 +26,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 66 | 26 | ||
| 67 | /* #undef subprocesses */ | 27 | /* #undef subprocesses */ |
| 68 | 28 | ||
| 69 | /* Define CLASH_DETECTION if you want lock files to be written | ||
| 70 | so that Emacs can tell instantly when you try to modify | ||
| 71 | a file that someone else has modified in his Emacs. */ | ||
| 72 | #define CLASH_DETECTION | ||
| 73 | |||
| 74 | /* If the character used to separate elements of the executable path | 29 | /* If the character used to separate elements of the executable path |
| 75 | is not ':', #define this to be the appropriate character constant. */ | 30 | is not ':', #define this to be the appropriate character constant. */ |
| 76 | /* #define SEPCHAR ':' */ | 31 | /* #define SEPCHAR ':' */ |
| @@ -83,25 +38,16 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 83 | your system and must be used only through an encapsulation (which | 38 | your system and must be used only through an encapsulation (which |
| 84 | you should place, by convention, in sysdep.c). */ | 39 | you should place, by convention, in sysdep.c). */ |
| 85 | 40 | ||
| 86 | /* If the system's imake configuration file defines `NeedWidePrototypes' | ||
| 87 | as `NO', we must define NARROWPROTO manually. Such a define is | ||
| 88 | generated in the Makefile generated by `xmkmf'. If we don't | ||
| 89 | define NARROWPROTO, we will see the wrong function prototypes | ||
| 90 | for X functions taking float or double parameters. */ | ||
| 91 | |||
| 92 | /* #define NARROWPROTO 1 */ | ||
| 93 | |||
| 94 | /* ============================================================ */ | 41 | /* ============================================================ */ |
| 95 | 42 | ||
| 96 | /* After adding support for a new system, modify the large case | 43 | /* After adding support for a new system, modify the large case |
| 97 | statement in configure.in to recognize reasonable | 44 | statement in configure.ac to recognize reasonable |
| 98 | configuration names, and add a description of the system to | 45 | configuration names, and add a description of the system to |
| 99 | `etc/MACHINES'. | 46 | `etc/MACHINES'. |
| 100 | 47 | ||
| 101 | Check for any tests of $opsys in configure.in, and add an entry | 48 | Check for any tests of $opsys in configure.ac, and add an entry |
| 102 | for the new system if needed. | 49 | for the new system if needed. |
| 103 | 50 | ||
| 104 | If you've just fixed a problem in an existing configuration file, | 51 | If you've just fixed a problem in an existing configuration file, |
| 105 | you should also check `etc/MACHINES' to make sure its descriptions | 52 | you should also check `etc/MACHINES' to make sure its descriptions |
| 106 | of known problems in that configuration should be updated. */ | 53 | of known problems in that configuration should be updated. */ |
| 107 | |||
diff --git a/src/s/unixware.h b/src/s/unixware.h index 18d24b28507..59c74a56f4e 100644 --- a/src/s/unixware.h +++ b/src/s/unixware.h | |||
| @@ -17,38 +17,4 @@ GNU General Public License for more details. | |||
| 17 | You should have received a copy of the GNU General Public License | 17 | You should have received a copy of the GNU General Public License |
| 18 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | 18 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ |
| 19 | 19 | ||
| 20 | |||
| 21 | #include "usg5-4-common.h" | 20 | #include "usg5-4-common.h" |
| 22 | |||
| 23 | /* #define HAVE_GETWD (appears to be buggy on SVR4.2) */ | ||
| 24 | #undef HAVE_GETWD | ||
| 25 | |||
| 26 | /* This is the same definition as in usg5-4-common.h, but with sigblock/sigunblock | ||
| 27 | rather than sighold/sigrelse, which appear to be BSD4.1 specific. | ||
| 28 | It may also be appropriate for SVR4.x | ||
| 29 | (x<2) but I'm not sure. fnf@cygnus.com */ | ||
| 30 | /* This sets the name of the slave side of the PTY. On SysVr4, | ||
| 31 | grantpt(3) forks a subprocess, so keep sigchld_handler() from | ||
| 32 | intercepting that death. If any child but grantpt's should die | ||
| 33 | within, it should be caught after sigrelse(2). */ | ||
| 34 | #define PTY_TTY_NAME_SPRINTF \ | ||
| 35 | { \ | ||
| 36 | char *ptsname (int), *ptyname; \ | ||
| 37 | \ | ||
| 38 | sigblock(sigmask(SIGCLD)); \ | ||
| 39 | if (grantpt(fd) == -1) \ | ||
| 40 | fatal("could not grant slave pty"); \ | ||
| 41 | sigunblock(sigmask(SIGCLD)); \ | ||
| 42 | if (unlockpt(fd) == -1) \ | ||
| 43 | fatal("could not unlock slave pty"); \ | ||
| 44 | if (!(ptyname = ptsname(fd))) \ | ||
| 45 | fatal ("could not enable slave pty"); \ | ||
| 46 | strncpy(pty_name, ptyname, sizeof(pty_name)); \ | ||
| 47 | pty_name[sizeof(pty_name) - 1] = 0; \ | ||
| 48 | } | ||
| 49 | |||
| 50 | #define PENDING_OUTPUT_COUNT(FILE) ((FILE)->__ptr - (FILE)->__base) | ||
| 51 | |||
| 52 | /* Conservative garbage collection has not been tested, so for now | ||
| 53 | play it safe and stick with the old-fashioned way of marking. */ | ||
| 54 | #define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE | ||
diff --git a/src/s/usg5-4-common.h b/src/s/usg5-4-common.h index 2676e9e5943..6ead01d3712 100644 --- a/src/s/usg5-4-common.h +++ b/src/s/usg5-4-common.h | |||
| @@ -20,13 +20,6 @@ GNU General Public License for more details. | |||
| 20 | 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 |
| 21 | 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/>. */ |
| 22 | 22 | ||
| 23 | /* Use the SysVr3 file for at least base configuration. */ | ||
| 24 | #define USG /* System III, System V, etc */ | ||
| 25 | |||
| 26 | #define USG5 | ||
| 27 | /* Nothing in Emacs use this any more. */ | ||
| 28 | /* #define USG5_4 */ | ||
| 29 | |||
| 30 | /* setjmp and longjmp can safely replace _setjmp and _longjmp, | 23 | /* setjmp and longjmp can safely replace _setjmp and _longjmp, |
| 31 | but they will run slower. */ | 24 | but they will run slower. */ |
| 32 | #define _setjmp setjmp | 25 | #define _setjmp setjmp |
| @@ -46,17 +39,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 46 | #include <sys/termios.h> | 39 | #include <sys/termios.h> |
| 47 | #endif | 40 | #endif |
| 48 | 41 | ||
| 49 | /* Some SVr4s don't define NSIG in sys/signal.h for ANSI environments; | ||
| 50 | instead, there's a system variable _sys_nsig. Unfortunately, we need the | ||
| 51 | constant to dimension an array. So wire in the appropriate value here. */ | ||
| 52 | #define NSIG_MINIMUM 32 | ||
| 53 | |||
| 54 | /* We can support this. */ | ||
| 55 | #define CLASH_DETECTION | ||
| 56 | |||
| 57 | /* Define HAVE_PTYS if the system supports pty devices. */ | ||
| 58 | #define HAVE_PTYS | ||
| 59 | |||
| 60 | /* It is possible to receive SIGCHLD when there are no children | 42 | /* It is possible to receive SIGCHLD when there are no children |
| 61 | waiting, because a previous waitsys(2) cleaned up the carcass of child | 43 | waiting, because a previous waitsys(2) cleaned up the carcass of child |
| 62 | without clearing the SIGCHLD pending info. So, use a non-blocking | 44 | without clearing the SIGCHLD pending info. So, use a non-blocking |
| @@ -70,21 +52,3 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 70 | this is all we need. */ | 52 | this is all we need. */ |
| 71 | #define TIOCSIGSEND TIOCSIGNAL | 53 | #define TIOCSIGSEND TIOCSIGNAL |
| 72 | 54 | ||
| 73 | /* This change means that we don't loop through allocate_pty too many | ||
| 74 | times in the (rare) event of a failure. */ | ||
| 75 | #define FIRST_PTY_LETTER 'z' | ||
| 76 | |||
| 77 | /* This sets the name of the master side of the PTY. */ | ||
| 78 | #define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptmx"); | ||
| 79 | |||
| 80 | /* Push various streams modules onto a PTY channel. */ | ||
| 81 | #define SETUP_SLAVE_PTY \ | ||
| 82 | if (ioctl (xforkin, I_PUSH, "ptem") == -1) \ | ||
| 83 | fatal ("ioctl I_PUSH ptem"); \ | ||
| 84 | if (ioctl (xforkin, I_PUSH, "ldterm") == -1) \ | ||
| 85 | fatal ("ioctl I_PUSH ldterm"); \ | ||
| 86 | if (ioctl (xforkin, I_PUSH, "ttcompat") == -1) \ | ||
| 87 | fatal ("ioctl I_PUSH ttcompat"); | ||
| 88 | |||
| 89 | /* This definition was suggested for next release. So give it a try. */ | ||
| 90 | #define HAVE_SOCKETS | ||