Move NARROWPROTO from src/s to configure
[emacs.git] / src / s / cygwin.h
blob0c9bfe203b15448958e6c276ff8816ab81efda61
1 /* System description header file for Cygwin.
3 Copyright (C) 1985-1986, 1992, 1999, 2002-2012 Free Software Foundation, Inc.
5 This file is part of GNU Emacs.
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.
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.
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/>. */
20 #define PTY_ITERATION int i; for (i = 0; i < 1; i++) /* ick */
21 #define PTY_NAME_SPRINTF /* none */
22 #define PTY_TTY_NAME_SPRINTF /* none */
23 #define PTY_OPEN \
24 do \
25 { \
26 int dummy; \
27 SIGMASKTYPE mask; \
28 mask = sigblock (sigmask (SIGCHLD)); \
29 if (-1 == openpty (&fd, &dummy, pty_name, 0, 0)) \
30 fd = -1; \
31 sigsetmask (mask); \
32 if (fd >= 0) \
33 emacs_close (dummy); \
34 } \
35 while (0)
37 /* Used in various places to enable cygwin-specific code changes. */
38 #define CYGWIN 1
40 /* Emacs supplies its own malloc, but glib (part of Gtk+) calls
41 memalign and on Cygwin, that becomes the Cygwin-supplied memalign.
42 As malloc is not the Cygwin malloc, the Cygwin memalign always
43 returns ENOSYS. A workaround is to set G_SLICE=always-malloc. */
44 #define G_SLICE_ALWAYS_MALLOC