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