Commit | Line | Data |
---|---|---|
4b158629 | 1 | /* System description header file for Cygwin. |
e05aebe9 | 2 | |
73b0cd50 | 3 | Copyright (C) 1985-1986, 1992, 1999, 2002-2011 Free Software Foundation, Inc. |
2454c12d JB |
4 | |
5 | This file is part of GNU Emacs. | |
6 | ||
4b158629 | 7 | GNU Emacs is free software: you can redistribute it and/or modify |
2454c12d | 8 | it under the terms of the GNU General Public License as published by |
4b158629 GM |
9 | the Free Software Foundation, either version 3 of the License, or |
10 | (at your option) any later version. | |
2454c12d JB |
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 | |
4b158629 | 18 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ |
2454c12d JB |
19 | |
20 | /* SYSTEM_TYPE should indicate the kind of system you are using. | |
c1d0dcfd | 21 | It sets the Lisp variable system-type. */ |
2454c12d JB |
22 | #define SYSTEM_TYPE "cygwin" |
23 | ||
24 | /* Emacs can read input using SIGIO and buffering characters itself, | |
25 | or using CBREAK mode and making C-g cause SIGINT. | |
26 | The choice is controlled by the variable interrupt_input. | |
27 | ||
28 | Define INTERRUPT_INPUT to make interrupt_input = 1 the default (use SIGIO) | |
29 | ||
30 | Emacs uses the presence or absence of the SIGIO and BROKEN_SIGIO macros | |
31 | to indicate whether or not signal-driven I/O is possible. It uses | |
32 | INTERRUPT_INPUT to decide whether to use it by default. | |
33 | ||
34 | SIGIO can be used only on systems that implement it (4.2 and 4.3). | |
35 | CBREAK mode has two disadvantages | |
36 | 1) At least in 4.2, it is impossible to handle the Meta key properly. | |
37 | I hear that in system V this problem does not exist. | |
38 | 2) Control-G causes output to be discarded. | |
39 | I do not know whether this can be fixed in system V. | |
40 | ||
41 | Another method of doing input is planned but not implemented. | |
42 | It would have Emacs fork off a separate process | |
43 | to read the input and send it to the true Emacs process | |
44 | through a pipe. */ | |
2454c12d JB |
45 | #undef INTERRUPT_INPUT |
46 | ||
e05aebe9 | 47 | /* Define HAVE_PTYS if the system supports pty devices. */ |
2454c12d JB |
48 | #define HAVE_PTYS |
49 | #define PTY_ITERATION for (i = 0; i < 1; i++) /* ick */ | |
50 | #define PTY_NAME_SPRINTF /* none */ | |
51 | #define PTY_TTY_NAME_SPRINTF /* none */ | |
52 | #define PTY_OPEN \ | |
53 | do \ | |
54 | { \ | |
55 | int dummy; \ | |
56 | SIGMASKTYPE mask; \ | |
57 | mask = sigblock (sigmask (SIGCHLD)); \ | |
58 | if (-1 == openpty (&fd, &dummy, pty_name, 0, 0)) \ | |
59 | fd = -1; \ | |
60 | sigsetmask (mask); \ | |
61 | emacs_close (dummy); \ | |
62 | } \ | |
63 | while (0) | |
64 | ||
2454c12d JB |
65 | /* Define CLASH_DETECTION if you want lock files to be written |
66 | so that Emacs can tell instantly when you try to modify | |
67 | a file that someone else has modified in his Emacs. */ | |
2454c12d JB |
68 | #define CLASH_DETECTION |
69 | ||
70 | /* If the system's imake configuration file defines `NeedWidePrototypes' | |
71 | as `NO', we must define NARROWPROTO manually. Such a define is | |
177c0ea7 | 72 | generated in the Makefile generated by `xmkmf'. If we don't |
2454c12d JB |
73 | define NARROWPROTO, we will see the wrong function prototypes |
74 | for X functions taking float or double parameters. */ | |
2454c12d JB |
75 | #define NARROWPROTO 1 |
76 | ||
e05aebe9 | 77 | /* Used in various places to enable cygwin-specific code changes. */ |
2454c12d JB |
78 | #define CYGWIN 1 |
79 | ||
80 | #define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base) | |
dd5a6279 | 81 | |
2454c12d | 82 | #define HAVE_SOCKETS |
2454c12d JB |
83 | |
84 | /* vfork() interacts badly with setsid(), causing ptys to fail to | |
85 | change their controlling terminal */ | |
86 | #define vfork fork | |
87 | ||
179cef48 SM |
88 | /* This should work (at least when compiling with gcc). But I have no way |
89 | or intention to verify or even test it. If you encounter a problem with | |
90 | it, feel free to change this setting, but please add a comment here about | |
91 | why it needed to be changed. */ | |
92 | #define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS | |
93 | ||
9b1a1e62 JR |
94 | /* Virtual addresses of pure and impure space can vary, as on Windows. */ |
95 | #define VIRT_ADDR_VARIES | |
96 | ||
a4ef73c8 CY |
97 | /* Emacs supplies its own malloc, but glib (part of Gtk+) calls |
98 | memalign and on Cygwin, that becomes the Cygwin-supplied memalign. | |
99 | As malloc is not the Cygwin malloc, the Cygwin memalign always | |
100 | returns ENOSYS. A workaround is to set G_SLICE=always-malloc. */ | |
101 | #define G_SLICE_ALWAYS_MALLOC | |
102 | ||
5419963b KB |
103 | /* Send signals to subprocesses by "typing" special chars at them. */ |
104 | #define SIGNALS_VIA_CHARACTERS | |
105 |