annotate src/s/windowsnt.h @ 613:023b83f4e54b

[xemacs-hg @ 2001-06-10 10:42:16 by ben] ------ signal-code changes ------ data.c, device-tty.c, emacs.c, floatfns.c, linuxplay.c, nas.c, process-unix.c, signal.c, sunplay.c, sysdep.c, syssignal.h: use EMACS_SIGNAL everywhere instead of playing preprocessing games with signal(). s\windowsnt.h, s\mingw32.h, syssignal.h: Remove mswindows signal code from s+m headers and move to syssignal.h as one of the five ways of signal handling, instead of playing preprocessing games. fileio.c, sysdep.c: Rename sys_do_signal to qxe_reliable_signal. signal.c, process-unix.c, profile.c: Create set_timeout_signal(); use instead of just EMACS_SIGNAL to establish a signal handler on a timeout signal; this does special things under Cygwin. nt.c: Eliminate term_ntproc(), which is blank; used as a SIGABRT handler, which was wrong anyway. nt.c, win32.c: Move signal code from nt.c to win32.c, since Cygwin needs it too when dealing with timeout signals. s\cygwin32.h: Define CYGWIN_BROKEN_SIGNALS. ------ other changes ------ s\mingw32.h: Fix problems with NOT_C_CODE being in the wrong place and excluding defines needed when building Makefile.in.in. filelock.c, mule-canna.c, mule-ccl.c, mule-ccl.h, ralloc.c, unexalpha.c, unexapollo.c, unexcw.c, unexelfsgi.c, unexnt.c, unexsni.c, s\aix3-1.h, s\bsd4-1.h, s\bsd4-2.h, s\bsd4-3.h, s\cxux.h, s\cygwin32.h, s\dgux.h, s\dgux5-4r2.h, s\dgux5-4r3.h, s\dgux5-4r4.h, s\ewsux5r4.h, s\gnu.h, s\hpux.h, s\iris3-5.h, s\iris3-6.h, s\irix3-3.h, s\linux.h, s\mingw32.h, s\newsos5.h, s\nextstep.h, s\ptx.h, s\riscix1-1.h, s\riscix1-2.h, s\rtu.h, s\sco4.h, s\sco5.h, s\template.h, s\ultrix.h, s\umax.h, s\umips.h, s\unipl5-0.h, s\unipl5-2.h, s\usg5-0.h, s\usg5-2-2.h, s\usg5-2.h, s\usg5-3.h, s\usg5-4.h, s\windowsnt.h, s\xenix.h: Rename 'GNU Emacs' to XEmacs in the copyright and comments. nas.c: Stylistic cleanup. Avoid preprocessing games with names such as play_sound_file. ------ signal-code changes ------ data.c, device-tty.c, emacs.c, floatfns.c, linuxplay.c, nas.c, process-unix.c, signal.c, sunplay.c, sysdep.c, syssignal.h: use EMACS_SIGNAL everywhere instead of playing preprocessing games with signal(). s\windowsnt.h, s\mingw32.h, syssignal.h: Remove mswindows signal code from s+m headers and move to syssignal.h as one of the five ways of signal handling, instead of playing preprocessing games. fileio.c, sysdep.c: Rename sys_do_signal to qxe_reliable_signal. signal.c, process-unix.c, profile.c: Create set_timeout_signal(); use instead of just EMACS_SIGNAL to establish a signal handler on a timeout signal; this does special things under Cygwin. nt.c: Eliminate term_ntproc(), which is blank; used as a SIGABRT handler, which was wrong anyway. nt.c, win32.c: Move signal code from nt.c to win32.c, since Cygwin needs it too when dealing with timeout signals. s\cygwin32.h: Define CYGWIN_BROKEN_SIGNALS. ------ other changes ------ s\mingw32.h: Fix problems with NOT_C_CODE being in the wrong place and excluding defines needed when building Makefile.in.in. filelock.c, mule-canna.c, mule-ccl.c, mule-ccl.h, ralloc.c, unexalpha.c, unexapollo.c, unexcw.c, unexelfsgi.c, unexnt.c, unexsni.c, s\aix3-1.h, s\bsd4-1.h, s\bsd4-2.h, s\bsd4-3.h, s\cxux.h, s\cygwin32.h, s\dgux.h, s\dgux5-4r2.h, s\dgux5-4r3.h, s\dgux5-4r4.h, s\ewsux5r4.h, s\gnu.h, s\hpux.h, s\iris3-5.h, s\iris3-6.h, s\irix3-3.h, s\linux.h, s\mingw32.h, s\newsos5.h, s\nextstep.h, s\ptx.h, s\riscix1-1.h, s\riscix1-2.h, s\rtu.h, s\sco4.h, s\sco5.h, s\template.h, s\ultrix.h, s\umax.h, s\umips.h, s\unipl5-0.h, s\unipl5-2.h, s\usg5-0.h, s\usg5-2-2.h, s\usg5-2.h, s\usg5-3.h, s\usg5-4.h, s\windowsnt.h, s\xenix.h: Rename 'GNU Emacs' to XEmacs in the copyright and comments. nas.c: Stylistic cleanup. Avoid preprocessing games with names such as play_sound_file. xemacs-faq.texi: Update sections on Windows and MacOS availability. alist.el, apropos.el, autoload.el, bytecomp.el, cl-compat.el, cl-extra.el, cl-macs.el, cl-seq.el, cl.el, cmdloop.el, cus-edit.el, derived.el, gpm.el, itimer.el, lisp-mode.el, shadow.el, version.el, wid-browse.el: Rename 'GNU Emacs' to XEmacs in the copyright. Fix other references to GNU Emacs that should be XEmacs or just Emacs. files.el: Fix warning. simple.el: transpose-line-up/down will now move the region up or down by a line if active. cvtmail.c, fakemail.c, gnuserv.c, gnuserv.h, gnuslib.c, make-msgfile.c, make-path.c, pop.c, pop.h, profile.c, tcp.c: Rename 'GNU Emacs' to XEmacs in the copyright. Fix comments in similar ways. digest-doc.c, sorted-doc.c: Fix program and author name to reflect XEmacs.
author ben
date Sun, 10 Jun 2001 10:42:39 +0000
parents c69610198c35
children 943eaba38521
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1 /* System description file for Windows 9x and NT.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2 Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
3
613
023b83f4e54b [xemacs-hg @ 2001-06-10 10:42:16 by ben]
ben
parents: 535
diff changeset
4 This file is part of XEmacs.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
5
613
023b83f4e54b [xemacs-hg @ 2001-06-10 10:42:16 by ben]
ben
parents: 535
diff changeset
6 XEmacs is free software; you can redistribute it and/or modify
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
7 it under the terms of the GNU General Public License as published by
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
8 the Free Software Foundation; either version 2, or (at your option)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
9 any later version.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
10
613
023b83f4e54b [xemacs-hg @ 2001-06-10 10:42:16 by ben]
ben
parents: 535
diff changeset
11 XEmacs is distributed in the hope that it will be useful,
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
14 GNU General Public License for more details.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
15
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
16 You should have received a copy of the GNU General Public License
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
17 along with XEmacs; see the file COPYING. If not, write to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
19 Boston, MA 02111-1307, USA. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
20
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
21 /* Synched up with: FSF 19.31. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
22
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
23 /* Capsule summary of different preprocessor flags:
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
24
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
25 1. Keep in mind that there are two possible OS environments we are dealing
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
26 with -- Cygwin and Native Windows. Cygwin provides a POSIX emulation
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
27 layer on top of MS Windows -- in particular, providing the file-system,
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
28 process, tty, and signal semantics that are part of a modern, standard
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
29 Unix operating system. MS Windows also provides these services, but
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
30 through their own API, called Win32. When compiling in a Cygwin
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
31 environment, the Win32 API's are also available, and in fact are used
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
32 to do native GUI programming.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
33
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
34 2. There are two windowing environments we can target XEmacs for when
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
35 running under MS Windows -- Windows native, and X. (It may seem strange
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
36 to write an X application under Windows, but there are in fact many X
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
37 servers out there running on Windows, and as far as I know there is no
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
38 real (or at least, that works well) networking Window-system extension
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
39 under MS Windows. Furthermore, if you're porting a Unix application to
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
40 Windows and use Cygwin to assist you, it might seem natural to use an
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
41 X server to avoid having to port all the code to Windows.) For XEmacs,
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
42 there are various reasons people could come up with for why we would
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
43 want to keep maintaining X Windows under MS Windows support.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
44
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
45 That gives us four possible build environments. I (Ben) build
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
46 regularly on fully-native-everything, Andy builds on Cygwin + MS
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
47 Windows + X Windows for windowing.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
48
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
49 The build flags used for these divisions are:
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
50
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
51 CYGWIN -- for Cygwin-only stuff.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
52 WIN32_NATIVE -- Win32 native OS-level stuff (files, process, etc.).
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
53 HAVE_X_WINDOWS -- for X Windows (regardless of whether under MS Win)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
54 HAVE_MS_WINDOWS -- MS Windows native windowing system (anything related to
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
55 the appearance of the graphical screen).
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
56
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
57 Finally, there's also the MINGW build environment, which uses GCC
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
58 \(similar to Cygwin), but native MS Windows libraries rather than a
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
59 POSIX emulation layer (the Cygwin approach). This environment defines
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
60 WIN32_NATIVE, but also defines MINGW, which is used mostly because
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
61 uses its own include files (related to Cygwin), which have a few
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
62 things messed up.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
63
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
64
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
65 Formerly, we had a whole host of flags. Here's the conversion, for porting
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
66 code from GNU Emacs and such:
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
67
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
68
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
69 WINDOWSNT -> WIN32_NATIVE
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
70 WIN32 -> WIN32_NATIVE
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
71 _WIN32 -> WIN32_NATIVE
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
72 HAVE_WIN32 -> WIN32_NATIVE
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
73 DOS_NT -> WIN32_NATIVE
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
74 HAVE_NTGUI -> WIN32_NATIVE, unless it ends up already bracketed by this
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
75 HAVE_FACES -> always true
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
76 MSDOS -> determine whether this code is really specific to MS-DOS (and not
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
77 Windows -- e.g. DJGPP code); if so, delete the code; otherwise,
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
78 convert to WIN32_NATIVE (we do not support MS-DOS w/DOS Extender
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
79 under XEmacs)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
80
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
81 __CYGWIN__ -> CYGWIN
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
82 __CYGWIN32__ -> CYGWIN
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
83 __MINGW32__ -> MINGW
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
84
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
85 */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
86
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
87 /* Identify ourselves */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
88 #ifndef WIN32_NATIVE
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
89 #define WIN32_NATIVE
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
90 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
91
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
92 /* In case non-Microsoft compiler is used, we fake _MSC_VER */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
93 #ifndef _MSC_VER
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
94 #define _MSC_VER 1
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
95 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
96
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
97 typedef unsigned short mode_t;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
98 /* typedef long ptrdiff_t; -kkm */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
99 typedef int pid_t;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
100
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
101 #include <stddef.h>
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
102
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
103 /* If you are compiling with a non-C calling convention but need to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
104 declare vararg routines differently, put it here */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
105 #define _VARARGS_ __cdecl
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
106
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
107 /* If you are providing a function to something that will call the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
108 function back (like a signal handler and signal, or main) its calling
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
109 convention must be whatever standard the libraries expect */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
110 #define _CALLBACK_ __cdecl
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
111
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
112 /* SYSTEM_TYPE should indicate the kind of system you are using.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
113 It sets the Lisp variable system-type. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
114
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
115 #define SYSTEM_TYPE "windows-nt"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
116
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
117 #define NO_MATHERR
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
118
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
119 #define SIZEOF_SHORT 2
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
120 #define SIZEOF_INT 4
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
121 #define SIZEOF_LONG 4
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
122 #define SIZEOF_LONG_LONG 0
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
123 #define SIZEOF_VOID_P 4
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
124
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
125 /* NOMULTIPLEJOBS should be defined if your system's shell
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
126 does not have "job control" (the ability to stop a program,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
127 run some other program, then continue the first one). */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
128
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
129 /* #define NOMULTIPLEJOBS */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
130
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
131 /* Letter to use in finding device name of first pty,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
132 if system supports pty's. 'a' means it is /dev/ptya0 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
133
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
134 #define FIRST_PTY_LETTER 'a'
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
135
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
136 /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
137 * Define HAVE_TIMEVAL if the system supports the BSD style clock values.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
138 * Look in <sys/time.h> for a timeval structure.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
139 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
140
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
141 #define HAVE_TIMEVAL
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
142
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
143 /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
144 * Define HAVE_SELECT if the system supports the `select' system call.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
145 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
146
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
147 /* #define HAVE_SELECT */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
148
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
149 /* If your system uses COFF (Common Object File Format) then define the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
150 preprocessor symbol "COFF". */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
151
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
152 #define COFF
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
153
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
154 /* NT supports Winsock which is close enough (with some hacks) */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
155
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
156 #define HAVE_SOCKETS
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
157
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
158 /* define MAIL_USE_FLOCK if the mailer uses flock
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
159 to interlock access to /usr/spool/mail/$USER.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
160 The alternative is that a lock file named
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
161 /usr/spool/mail/$USER.lock. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
162
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
163 #define MAIL_USE_POP
438
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
164 #define HAVE_LOCKING
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
165 #define MAIL_USE_LOCKING
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
166
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
167 /* If the character used to separate elements of the executable path
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
168 is not ':', #define this to be the appropriate character constant. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
169 #define SEPCHAR ';'
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
170
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
171 /* ============================================================ */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
172
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
173 /* Here, add any special hacks needed
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
174 to make Emacs work on this system. For example,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
175 you might define certain system call names that don't
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
176 exist on your system, or that do different things on
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
177 your system and must be used only through an encapsulation
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
178 (Which you should place, by convention, in sysdep.c). */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
179
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
180 /* XEmacs file I/O for DOS text files requires FILE_CODING */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
181 #define FILE_CODING
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
182
434
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 432
diff changeset
183 #define DIRECTORY_SEP ((char)XCHAR(Vdirectory_sep_char))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
184
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
185 /* Define this to be the separator between devices and paths */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
186 #define DEVICE_SEP ':'
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
187
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
188 /* We'll support either convention on NT. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
189 #define IS_DIRECTORY_SEP(_c_) ((_c_) == '/' || (_c_) == '\\')
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
190 #define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_) || IS_DEVICE_SEP (_c_))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
191
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
192 /* The null device on Windows NT. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
193 #define NULL_DEVICE "NUL:"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
194 #define EXEC_SUFFIXES ".exe:.com:.bat:.cmd:"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
195
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
196 #ifndef MAXPATHLEN
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
197 #define MAXPATHLEN _MAX_PATH
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
198 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
199
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
200 #define LISP_FLOAT_TYPE
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
201
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
202 #define HAVE_GETTIMEOFDAY
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
203 #define HAVE_GETHOSTNAME
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
204 #define HAVE_DUP2
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
205 #define HAVE_RENAME
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
206 #define HAVE_CLOSEDIR
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
207
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
208 #define HAVE_TZNAME
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
209
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
210 #define HAVE_LONG_FILE_NAMES
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
211
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
212 #define HAVE_MKDIR
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
213 #define HAVE_RMDIR
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
214 #define HAVE_RANDOM
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
215 #define HAVE_LOGB
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
216 #define HAVE_FREXP
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
217 #define HAVE_FMOD
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
218 #define HAVE_FTIME
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
219 #define HAVE_MKTIME
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
220
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
221 #define HAVE_MOUSE
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
222 #define HAVE_H_ERRNO
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
223
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
224 /* Compatibility macros. Some used to be routines in nt.c */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
225 #define strcasecmp(x,y) _stricmp(x,y)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
226 #define random() (rand() << 15 | rand())
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
227 #define srandom(seed) (srand(seed))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
228 #define setpgrp(pid,gid)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
229
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
230 #define MODE_LINE_BINARY_TEXT(_b_) (NILP ((_b_)->buffer_file_type) ? "T" : "B")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
231
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
232
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
233 #include <stdio.h>
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
234
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
235 /* subprocess calls that are emulated */
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
236 #ifndef DONT_ENCAPSULATE
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
237 #define spawnve sys_spawnve
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
238 int spawnve (int mode, const char *cmdname,
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
239 const char * const *argv, const char *const *envp);
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
240 #endif
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
241
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
242 /* IO calls that are emulated or shadowed */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
243 #define pipe sys_pipe
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
244 int sys_pipe (int * phandles);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
245
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
246 #ifndef HAVE_X_WINDOWS
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
247 #define sleep sys_sleep
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
248 void sleep (int seconds);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
249 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
250
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
251 #define wait sys_wait
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
252 int wait (int *status);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
253
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
254 #define kill sys_kill
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
255 int kill (int pid, int sig);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
256
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
257 /* map to MSVC names */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
258 #define popen _popen
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
259 #define pclose _pclose
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
260
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
261 typedef int uid_t;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
262 typedef int gid_t;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
263 typedef int pid_t;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
264 typedef int ssize_t;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
265
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
266 /* Encapsulation of system calls */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
267 #ifndef DONT_ENCAPSULATE
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
268 #define getpid sys_getpid
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
269 pid_t getpid (void);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
270 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
271
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
272 /* Random global functions called everywhere. Implemented in nt.c */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
273 /* #### Most of these are FSFisms and must be avoided */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
274 /* #### All of these are FSFisms and must be avoided */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
275 void dostounix_filename (char *p);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
276 void unixtodos_filename (char *p);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
277 int crlf_to_lf (int n, unsigned char *buf, unsigned int *lf_count);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
278
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
279 char *getwd (char *dir);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
280
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
281 void *sbrk (unsigned long increment);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
282
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
283 struct passwd;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
284 struct passwd *getpwuid (uid_t uid);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
285 struct passwd *getpwnam (const char *name);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
286 uid_t getuid (void);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
287 uid_t geteuid (void);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
288 gid_t getgid (void);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
289 gid_t getegid (void);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
290
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
291 /* Setitimer is emulated */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
292 #define HAVE_SETITIMER
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
293
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
294 /* Defines size_t and alloca (). */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
295 #include <malloc.h>
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
296
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
297 #include <sys/stat.h>
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
298
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
299 /* Define for those source files that do not include enough NT
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
300 system files. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
301 #ifndef NULL
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
302 #ifdef __cplusplus
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
303 #define NULL 0
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
304 #else
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
305 #define NULL ((void *)0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
306 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
307 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
308
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
309 /* For proper declaration of environ. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
310 #include <stdlib.h>
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
311 #include <string.h>
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
312
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
313 /* Define process implementation */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
314 #define HAVE_WIN32_PROCESSES
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
315
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
316 /* We need a little extra space, see ../../lisp/loadup.el */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
317 #define SYSTEM_PURESIZE_EXTRA 15000
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
318
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
319 /* ============================================================ */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
320
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
321 /* See unexnt.c */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
322 #if (_MSC_VER >= 1100)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
323 #define DUMP_SEPARATE_SECTION
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
324 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
325 #ifdef DUMP_SEPARATE_SECTION
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
326 #pragma data_seg("xdata")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
327 #pragma bss_seg("xdata")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
328 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
329
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
330 #ifdef HAVE_SCROLLBARS
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
331 /* Ensure the NT 4 mouse definitions in winuser.h are available */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
332 #ifndef _WIN32_WINNT
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
333 #define _WIN32_WINNT 0x0400
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
334 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
335 #endif
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
336
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
337 /* Force the various NT 4 structures and constants to be included; we're
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
338 careful not to call (or even link with) functions not in NT 3.51 when
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
339 running on 3.51, but when running on NT 4 or Win9x, we use the later
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
340 functions, and need their headers. */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
341 /* The VC++ (5.0, at least) headers treat WINVER non-existent as 0x0400 */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
342 #if defined (WINVER) && WINVER < 0x0400
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
343 # undef WINVER
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
344 # define WINVER 0x0400
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
345 #endif
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
346
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
347 /* MSVC 6.0 has a mechanism to declare functions which never return */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
348 #if (_MSC_VER >= 1200)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
349 #define DOESNT_RETURN __declspec(noreturn) void
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
350 #define DECLARE_DOESNT_RETURN(decl) __declspec(noreturn) extern void decl
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
351 #define DECLARE_DOESNT_RETURN_GCC_ATTRIBUTE_SYNTAX_SUCKS(decl,str,idx) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
352 __declspec(noreturn) extern void decl PRINTF_ARGS(str,idx)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
353 #endif /* MSVC 6.0 */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
354
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
355 #define CORRECT_DIR_SEPS(s) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
356 do { if ('/' == DIRECTORY_SEP) dostounix_filename (s); \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
357 else unixtodos_filename (s); \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
358 } while (0)