Move SYSTEM_TYPE from src/s to configure
[bpt/emacs.git] / src / s / cygwin.h
CommitLineData
4b158629 1/* System description header file for Cygwin.
e05aebe9 2
acaf905b 3Copyright (C) 1985-1986, 1992, 1999, 2002-2012 Free Software Foundation, Inc.
2454c12d
JB
4
5This file is part of GNU Emacs.
6
4b158629 7GNU Emacs is free software: you can redistribute it and/or modify
2454c12d 8it under the terms of the GNU General Public License as published by
4b158629
GM
9the Free Software Foundation, either version 3 of the License, or
10(at your option) any later version.
2454c12d
JB
11
12GNU Emacs is distributed in the hope that it will be useful,
13but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15GNU General Public License for more details.
16
17You should have received a copy of the GNU General Public License
4b158629 18along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
2454c12d 19
2454c12d
JB
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. */
2454c12d
JB
41#undef INTERRUPT_INPUT
42
e05aebe9 43/* Define HAVE_PTYS if the system supports pty devices. */
2454c12d 44#define HAVE_PTYS
be02381c 45#define PTY_ITERATION int i; for (i = 0; i < 1; i++) /* ick */
2454c12d
JB
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); \
bcd86815
KB
57 if (fd >= 0) \
58 emacs_close (dummy); \
2454c12d
JB
59 } \
60 while (0)
61
2454c12d
JB
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. */
2454c12d
JB
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
177c0ea7 69 generated in the Makefile generated by `xmkmf'. If we don't
2454c12d
JB
70 define NARROWPROTO, we will see the wrong function prototypes
71 for X functions taking float or double parameters. */
2454c12d
JB
72#define NARROWPROTO 1
73
e05aebe9 74/* Used in various places to enable cygwin-specific code changes. */
2454c12d
JB
75#define CYGWIN 1
76
77#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base)
dd5a6279 78
2454c12d 79#define HAVE_SOCKETS
2454c12d 80
a4ef73c8
CY
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
5419963b
KB
87/* Send signals to subprocesses by "typing" special chars at them. */
88#define SIGNALS_VIA_CHARACTERS