Add 2007 to copyright years.
[bpt/emacs.git] / src / s / cygwin.h
1 /* Template for system description header files.
2 This file describes the parameters that system description files
3 should define or not.
4 Copyright (C) 1985, 1986, 1992, 1999, 2002, 2003, 2004,
5 2005, 2006, 2007 Free Software Foundation, Inc.
6
7 This file is part of GNU Emacs.
8
9 GNU Emacs is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2, or (at your option)
12 any later version.
13
14 GNU Emacs is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with GNU Emacs; see the file COPYING. If not, write to
21 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22 Boston, MA 02110-1301, USA. */
23
24 /* SYSTEM_TYPE should indicate the kind of system you are using.
25 It sets the Lisp variable system-type. */
26
27 #define SYSTEM_TYPE "cygwin"
28
29 /* Emacs can read input using SIGIO and buffering characters itself,
30 or using CBREAK mode and making C-g cause SIGINT.
31 The choice is controlled by the variable interrupt_input.
32
33 Define INTERRUPT_INPUT to make interrupt_input = 1 the default (use SIGIO)
34
35 Emacs uses the presence or absence of the SIGIO and BROKEN_SIGIO macros
36 to indicate whether or not signal-driven I/O is possible. It uses
37 INTERRUPT_INPUT to decide whether to use it by default.
38
39 SIGIO can be used only on systems that implement it (4.2 and 4.3).
40 CBREAK mode has two disadvantages
41 1) At least in 4.2, it is impossible to handle the Meta key properly.
42 I hear that in system V this problem does not exist.
43 2) Control-G causes output to be discarded.
44 I do not know whether this can be fixed in system V.
45
46 Another method of doing input is planned but not implemented.
47 It would have Emacs fork off a separate process
48 to read the input and send it to the true Emacs process
49 through a pipe. */
50
51 #undef INTERRUPT_INPUT
52
53 /*
54 * Define HAVE_TERMIOS if the system provides POSIX-style
55 * functions and macros for terminal control.
56 *
57 * Define HAVE_TERMIO if the system provides sysV-style ioctls
58 * for terminal control.
59 *
60 * Do not define both. HAVE_TERMIOS is preferred, if it is
61 * supported on your system.
62 */
63
64 #define HAVE_TERMIOS
65
66 /*
67 * Define HAVE_PTYS if the system supports pty devices.
68 */
69
70 #define HAVE_PTYS
71 #define PTY_ITERATION for (i = 0; i < 1; i++) /* ick */
72 #define PTY_NAME_SPRINTF /* none */
73 #define PTY_TTY_NAME_SPRINTF /* none */
74 #define PTY_OPEN \
75 do \
76 { \
77 int dummy; \
78 SIGMASKTYPE mask; \
79 mask = sigblock (sigmask (SIGCHLD)); \
80 if (-1 == openpty (&fd, &dummy, pty_name, 0, 0)) \
81 fd = -1; \
82 sigsetmask (mask); \
83 emacs_close (dummy); \
84 } \
85 while (0)
86
87 /* Define this symbol if your system has the functions bcopy, etc. */
88
89 #define BSTRING
90
91 /* subprocesses should be defined if you want to
92 have code for asynchronous subprocesses
93 (as used in M-x compile and M-x shell).
94 This is generally OS dependent, and not supported
95 under most USG systems. */
96
97 #define subprocesses
98
99 /* Define CLASH_DETECTION if you want lock files to be written
100 so that Emacs can tell instantly when you try to modify
101 a file that someone else has modified in his Emacs. */
102
103 #define CLASH_DETECTION
104
105 /* If the system's imake configuration file defines `NeedWidePrototypes'
106 as `NO', we must define NARROWPROTO manually. Such a define is
107 generated in the Makefile generated by `xmkmf'. If we don't
108 define NARROWPROTO, we will see the wrong function prototypes
109 for X functions taking float or double parameters. */
110
111 #define NARROWPROTO 1
112
113 /* used in various places to enable cygwin-specific code changes */
114 #define CYGWIN 1
115
116 #define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base)
117 #define GETPGRP_NO_ARG 1
118 #define SYSV_SYSTEM_DIR 1
119 #define LIB_STANDARD_LIBSRC
120 #define UNEXEC unexcw.o
121 #define POSIX_SIGNALS 1
122 /* force the emacs image to start high in memory, so dll relocation
123 can put things in low memory without causing all sorts of grief for
124 emacs lisp pointers */
125 #define DATA_SEG_BITS 0x20000000
126 #define LINKER $(CC) -Wl,--image-base,DATA_SEG_BITS
127
128 /* Use terminfo instead of termcap. Fewer environment variables to
129 go wrong, more terminal types. */
130 #define TERMINFO
131
132 #define HAVE_SOCKETS
133 /* C-g aborts emacs without this */
134 /*#define HAVE_VFORK*/
135 /* Xaw3d causes problems -- might have been fixed by NARROWPROTO
136 above, but I haven't tried it */
137 /*#undef HAVE_XAW3D*/
138
139 /* vfork() interacts badly with setsid(), causing ptys to fail to
140 change their controlling terminal */
141 #define vfork fork
142
143 /* the end */
144
145 /* arch-tag: 5ae7ba00-83b0-4ab3-806a-3e845779191b
146 (do not change this comment) */