annotate src/s/cygwin32.h @ 717:87c43a431742

[xemacs-hg @ 2001-12-27 22:52:25 by adrian] [PATCH VETO SUPERSEDE] Re: generic-print-region sends wrong arguments to lpr-region <g05y3mh9.fsf@engine.ecf.teradyne.com>
author adrian
date Thu, 27 Dec 2001 22:52:26 +0000
parents 023b83f4e54b
children 943eaba38521
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1 /* system description file for cygwin32.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2 Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc.
558
ed498ef2108b [xemacs-hg @ 2001-05-23 09:59:33 by ben]
ben
parents: 535
diff changeset
3 Copyright (C) 2001 Ben Wing.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
4
613
023b83f4e54b [xemacs-hg @ 2001-06-10 10:42:16 by ben]
ben
parents: 593
diff changeset
5 This file is part of XEmacs.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
6
613
023b83f4e54b [xemacs-hg @ 2001-06-10 10:42:16 by ben]
ben
parents: 593
diff changeset
7 XEmacs is free software; you can redistribute it and/or modify
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
8 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
9 the Free Software Foundation; either version 2, or (at your option)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
10 any later version.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
11
613
023b83f4e54b [xemacs-hg @ 2001-06-10 10:42:16 by ben]
ben
parents: 593
diff changeset
12 XEmacs is distributed in the hope that it will be useful,
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
15 GNU General Public License for more details.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
16
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
17 You should have received a copy of the GNU General Public License
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
18 along with XEmacs; see the file COPYING. If not, write to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
19 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
20 Boston, MA 02111-1307, USA. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
21
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
22 /* Building under cygwin
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
23 *
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
24 * The approach I have taken with this port is to use primarily the
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
25 * UNIX code base adding stuff that is MS-Windows specific. This works
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
26 * quite well, and is in keeping with my perception of the cygwin
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
27 * philosophy. Note that if you make changes to this file you do NOT
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
28 * want to define WIN32_NATIVE (formerly "WINDOWSNT"), I repeat - do
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
29 * not define this, it will break everything horribly. What does get
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
30 * defined is HAVE_MS_WINDOWS, but this is done by configure and only
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
31 * applies to the window system.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
32 *
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
33 * When building make sure your HOME path is unix style - i.e. without
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
34 * a drive letter.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
35 *
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
36 * once you have done this, configure and make.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
37 *
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
38 * windows '95 - I haven't tested this under '95, it will probably
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
39 * build but I konw there are some limitations with cygwin under 95 so
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
40 * YMMV. I build with NT4 SP3.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
41 *
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
42 * Andy Piper <andy@xemacs.org> 8/1/98
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
43 * http://www.xemacs.freeserve.co.uk/ */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
44
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
45 /* Identify ourselves */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
46 #define CYGWIN
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
47
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
48 /* cheesy way to determine cygwin version */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
49 #ifndef NOT_C_CODE
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
50 # include <signal.h>
558
ed498ef2108b [xemacs-hg @ 2001-05-23 09:59:33 by ben]
ben
parents: 535
diff changeset
51 # include <cygwin/version.h>
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
52
558
ed498ef2108b [xemacs-hg @ 2001-05-23 09:59:33 by ben]
ben
parents: 535
diff changeset
53 void cygwin_win32_to_posix_path_list (const char *, char *);
ed498ef2108b [xemacs-hg @ 2001-05-23 09:59:33 by ben]
ben
parents: 535
diff changeset
54 int cygwin_win32_to_posix_path_list_buf_size (const char *);
ed498ef2108b [xemacs-hg @ 2001-05-23 09:59:33 by ben]
ben
parents: 535
diff changeset
55 void cygwin_posix_to_win32_path_list (const char *, char *);
ed498ef2108b [xemacs-hg @ 2001-05-23 09:59:33 by ben]
ben
parents: 535
diff changeset
56 int cygwin_posix_to_win32_path_list_buf_size (const char *);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
57
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
58 /* Still left out of 1.1! */
464
5aa1854ad537 Import from CVS: tag r21-2-47
cvs
parents: 446
diff changeset
59 double logb (double);
5aa1854ad537 Import from CVS: tag r21-2-47
cvs
parents: 446
diff changeset
60 int killpg (int pgrp, int sig);
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
61
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
62 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
63
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
64 #ifndef ORDINARY_LINK
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
65 #define ORDINARY_LINK
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
66 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
67
558
ed498ef2108b [xemacs-hg @ 2001-05-23 09:59:33 by ben]
ben
parents: 535
diff changeset
68 #define C_SWITCH_SYSTEM -fno-caller-saves
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
69 #define LIBS_SYSTEM -lwinmm
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
70 #define WIN32_LEAN_AND_MEAN
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
71
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
72 #define TEXT_START -1
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
73 #define TEXT_END -1
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
74 #define DATA_END -1
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
75 #define HEAP_IN_DATA
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
76 #define NO_LIM_DATA
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
77 #define UNEXEC "unexcw.o"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
78
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
79 #define BROKEN_SIGIO
558
ed498ef2108b [xemacs-hg @ 2001-05-23 09:59:33 by ben]
ben
parents: 535
diff changeset
80
613
023b83f4e54b [xemacs-hg @ 2001-06-10 10:42:16 by ben]
ben
parents: 593
diff changeset
81 #define CYGWIN_BROKEN_SIGNALS
023b83f4e54b [xemacs-hg @ 2001-06-10 10:42:16 by ben]
ben
parents: 593
diff changeset
82
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
83 #define strnicmp strncasecmp
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
84 #ifndef HAVE_SOCKETS
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
85 #define HAVE_SOCKETS
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
86 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
87
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
88 #undef MAIL_USE_SYSTEM_LOCK
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
89
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
90 /* Do not define LOAD_AVE_TYPE or LOAD_AVE_CVT
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
91 since there is no load average available. */
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
92
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
93 /* Define VIRT_ADDR_VARIES if the virtual addresses of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
94 pure and impure space as loaded can vary, and even their
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
95 relative order cannot be relied on.
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 Otherwise Emacs assumes that text space precedes data space,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
98 numerically. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
99
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
100 /* Text does precede data space, but this is never a safe assumption. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
101 #define VIRT_ADDR_VARIES
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 "cygwin32"
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 MAIL_USE_FLOCK if the mailer uses flock
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
120 to interlock access to /usr/spool/mail/$USER.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
121 The alternative is that a lock file named
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
122 /usr/spool/mail/$USER.lock. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
123
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
124 /* If the character used to separate elements of the executable path
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
125 is not ':', #define this to be the appropriate character constant. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
126 #define SEPCHAR ':'
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
127
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
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
130 /* Here, add any special hacks needed
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
131 to make Emacs work on this system. For example,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
132 you might define certain system call names that don't
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
133 exist on your system, or that do different things on
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
134 your system and must be used only through an encapsulation
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
135 (Which you should place, by convention, in sysdep.c). */
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 this to be the separator between path elements */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
138 /* #define DIRECTORY_SEP XINT (Vdirectory_sep_char) */
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 /* Define this to be the separator between devices and paths */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
141 #define DEVICE_SEP ':'
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 /* We'll support either convention on NT. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
144 #define IS_DIRECTORY_SEP(_c_) ((_c_) == '/' || (_c_) == '\\')
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
145 #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
146 #define EXEC_SUFFIXES ".exe:.com:.bat:.cmd:"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
147
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
148 /* We need a little extra space, see ../../lisp/loadup.el */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
149 #define SYSTEM_PURESIZE_EXTRA 15000
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
150
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
151 #define CYGWIN_CONV_PATH(src, dst) \
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
152 dst = alloca (cygwin_win32_to_posix_path_list_buf_size(src)); \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
153 cygwin_win32_to_posix_path_list(src, dst)
593
5fd7ba8b56e7 [xemacs-hg @ 2001-05-31 12:45:27 by ben]
ben
parents: 558
diff changeset
154 /* !!#### more mule bogosity */
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
155 #define CYGWIN_WIN32_PATH(src, dst) \
593
5fd7ba8b56e7 [xemacs-hg @ 2001-05-31 12:45:27 by ben]
ben
parents: 558
diff changeset
156 dst = (Extbyte *) alloca (cygwin_posix_to_win32_path_list_buf_size(src)); \
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
157 cygwin_posix_to_win32_path_list(src, dst)