Mercurial > hg > xemacs-beta
comparison src/s/cygwin32.h @ 251:677f6a0ee643 r20-5b24
Import from CVS: tag r20-5b24
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:19:59 +0200 |
parents | 51092a27c943 |
children | 11cf20601dec |
comparison
equal
deleted
inserted
replaced
250:f385a461c9aa | 251:677f6a0ee643 |
---|---|
35 * patched dll (which can be found at http://www.lexa.ru/sos or on my | 35 * patched dll (which can be found at http://www.lexa.ru/sos or on my |
36 * home page. Alternatively when b19 comes out the patched dll will be | 36 * home page. Alternatively when b19 comes out the patched dll will be |
37 * unnecessary. Also make sure your HOME path is unix style - | 37 * unnecessary. Also make sure your HOME path is unix style - |
38 * i.e. without a drive letter. | 38 * i.e. without a drive letter. |
39 * | 39 * |
40 * once you have done this, configure and make. The | 40 * once you have done this, configure and make. If you want unexec |
41 * undump phase will fail but that is to be expected. To run you need | 41 * support you need to download coff.h from my web page or use cygwin |
42 * to set EMACSLOADPATH, EMACSDOC, EMACSDATA etc appropriately and then do: | 42 * b19. You probably want to build with mule support since this |
43 * temacs -batch -l loadup.el run-temacs | 43 * addresses crlf issues in a sensible way. |
44 * | 44 * |
45 * What I want to do | 45 * What I want to do: |
46 * | 46 * |
47 * the fileio stuff merely uses the unix system calls this means that | 47 * the fileio stuff merely uses the unix system calls this means that |
48 * the mount type of your fs will determine how files are edited. This | 48 * the mount type of your fs will determine how files are edited. This |
49 * is fine except in the instance that you want to convert one to the | 49 * is fine except in the instance that you want to convert one to the |
50 * other. In this instance I would like to bring the buffer_file_type | 50 * other. In this instance I would like to bring the buffer_file_type |
51 * code into the picture without all the other windows-nt cruft. | 51 * code into the picture without all the other windows-nt |
52 * | 52 * cruft. Apparently the best way to do this is use the mule coding |
53 * Also the undumped version should be able to do path guessing, I | 53 * stuff. |
54 * don't know why it doesn't currently. | 54 * |
55 * | 55 * process support needs fixing although basic support works (a la |
56 * Ideally a dumped version would be done but I'm not sure I am up to | 56 * make-docfile) |
57 * the task. | |
58 * | 57 * |
59 * Andy Piper <andyp@parallax.co.uk> 8/1/98 | 58 * Andy Piper <andyp@parallax.co.uk> 8/1/98 |
60 * http://parallax.co.uk/~andyp | 59 * http://www.parallax.co.uk/~andyp */ |
61 */ | 60 |
62 | 61 /* cheesy way to determine cygwin version */ |
63 | |
64 /* Need the win32 api */ | |
65 #ifndef NOT_C_CODE | 62 #ifndef NOT_C_CODE |
66 #ifdef CONST | 63 #include <signal.h> |
67 #undef CONST | 64 #ifdef SIGIO |
68 #endif | 65 #define CYGWIN_B19 |
69 | 66 #else |
70 #include <windows.h> | 67 #define BROKEN_CYGWIN |
68 #endif | |
71 #endif | 69 #endif |
72 | 70 |
73 #ifdef HAVE_MS_WINDOWS | 71 #ifdef HAVE_MS_WINDOWS |
74 #define HAVE_NTGUI | 72 #define HAVE_NTGUI |
75 #define HAVE_FACES | 73 #define HAVE_FACES |
86 | 84 |
87 #define SIF_TRACKPOS 0x0010 | 85 #define SIF_TRACKPOS 0x0010 |
88 #define FW_BLACK FW_HEAVY | 86 #define FW_BLACK FW_HEAVY |
89 #define FW_ULTRABOLD FW_EXTRABOLD | 87 #define FW_ULTRABOLD FW_EXTRABOLD |
90 #define FW_ULTRALIGHT FW_EXTRALIGHT | 88 #define FW_ULTRALIGHT FW_EXTRALIGHT |
91 #define TMPF_FIXED_PITCH 0x01 | |
92 #define VK_APPS 0x5D | 89 #define VK_APPS 0x5D |
93 #define SIGPROF 0 | 90 #define APPCMD_FILTERINITS 0x20L |
94 #define NO_LIM_DATA | 91 #define CBF_FAIL_SELFCONNECTIONS 0x1000 |
92 #define CBF_SKIP_ALLNOTIFICATIONS 0x3C0000 | |
93 #define CBF_FAIL_ADVISES 0x4000 | |
94 #define CBF_FAIL_POKES 0x10000 | |
95 #define CBF_FAIL_REQUESTS 0x20000 | |
96 #define SZDDESYS_TOPIC "System" | |
95 | 97 |
96 #define TEXT_START -1 | 98 #define TEXT_START -1 |
97 #define TEXT_END -1 | 99 #define TEXT_END -1 |
98 #define DATA_END -1 | 100 #define DATA_END -1 |
99 #define RUN_TIME_REMAP | 101 #define HEAP_IN_DATA |
100 #define UNEXEC "unexcw.o" | 102 #define UNEXEC "unexcw.o" |
103 #define BROKEN_SIGIO | |
104 #define PROCESS_IO_BLOCKING | |
105 #define strnicmp strncasecmp | |
106 #ifndef HAVE_SOCKETS | |
107 #define HAVE_SOCKETS | |
108 #endif | |
109 | |
110 #ifndef CYGWIN_B19 | |
111 #define TMPF_FIXED_PITCH 0x01 | |
112 #define SIGPROF 0 | |
113 #define SIGWINCH 0 | |
114 #endif | |
101 | 115 |
102 #undef MAIL_USE_SYSTEM_LOCK | 116 #undef MAIL_USE_SYSTEM_LOCK |
103 | 117 |
104 /* Define NO_ARG_ARRAY if you cannot take the address of the first of a | 118 /* Define NO_ARG_ARRAY if you cannot take the address of the first of a |
105 * group of arguments and treat it as an array of the arguments. */ | 119 * group of arguments and treat it as an array of the arguments. */ |
156 /* NOMULTIPLEJOBS should be defined if your system's shell | 170 /* NOMULTIPLEJOBS should be defined if your system's shell |
157 does not have "job control" (the ability to stop a program, | 171 does not have "job control" (the ability to stop a program, |
158 run some other program, then continue the first one). */ | 172 run some other program, then continue the first one). */ |
159 | 173 |
160 #define NOMULTIPLEJOBS | 174 #define NOMULTIPLEJOBS |
161 | |
162 /* Letter to use in finding device name of first pty, | |
163 if system supports pty's. 'a' means it is /dev/ptya0 */ | |
164 | |
165 #define FIRST_PTY_LETTER 'a' | |
166 | |
167 /* | |
168 * Define HAVE_PTYS if the system supports pty devices. | |
169 */ | |
170 | |
171 /* #define HAVE_PTYS */ | |
172 | |
173 /* If your system uses COFF (Common Object File Format) then define the | |
174 preprocessor symbol "COFF". */ | |
175 | |
176 #define COFF 1 | |
177 | 175 |
178 /* define MAIL_USE_FLOCK if the mailer uses flock | 176 /* define MAIL_USE_FLOCK if the mailer uses flock |
179 to interlock access to /usr/spool/mail/$USER. | 177 to interlock access to /usr/spool/mail/$USER. |
180 The alternative is that a lock file named | 178 The alternative is that a lock file named |
181 /usr/spool/mail/$USER.lock. */ | 179 /usr/spool/mail/$USER.lock. */ |
197 /* #define DIRECTORY_SEP XINT (Vdirectory_sep_char) */ | 195 /* #define DIRECTORY_SEP XINT (Vdirectory_sep_char) */ |
198 | 196 |
199 /* Define this to be the separator between devices and paths */ | 197 /* Define this to be the separator between devices and paths */ |
200 #define DEVICE_SEP ':' | 198 #define DEVICE_SEP ':' |
201 | 199 |
202 #define SIGWINCH NSIG | |
203 | |
204 /* We'll support either convention on NT. */ | 200 /* We'll support either convention on NT. */ |
205 #define IS_DIRECTORY_SEP(_c_) ((_c_) == '/' || (_c_) == '\\') | 201 #define IS_DIRECTORY_SEP(_c_) ((_c_) == '/' || (_c_) == '\\') |
206 #define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_) || IS_DEVICE_SEP (_c_)) | 202 #define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_) || IS_DEVICE_SEP (_c_)) |
207 | 203 |
208 /* The null device on Windows NT. */ | 204 /* The null device on Windows NT. */ |
209 #define NULL_DEVICE "NUL:" | |
210 #define EXEC_SUFFIXES ".exe:.com:.bat:.cmd:" | 205 #define EXEC_SUFFIXES ".exe:.com:.bat:.cmd:" |
211 | 206 |
212 #define MODE_LINE_BINARY_TEXT(_b_) (NILP ((_b_)->buffer_file_type) ? "T" : "B") | 207 #define MODE_LINE_BINARY_TEXT(_b_) (NILP ((_b_)->buffer_file_type) ? "T" : "B") |
213 | |
214 /* For integration with MSDOS support. | |
215 #define getdisk() (_getdrive () - 1) | |
216 #define getdefdir(_drv, _buf) _getdcwd (_drv, _buf, MAXPATHLEN) | |
217 */ | |
218 | |
219 /* Defines size_t and alloca (). */ | |
220 | 208 |
221 /* We need a little extra space, see ../../lisp/loadup.el */ | 209 /* We need a little extra space, see ../../lisp/loadup.el */ |
222 #define SYSTEM_PURESIZE_EXTRA 15000 | 210 #define SYSTEM_PURESIZE_EXTRA 15000 |
223 | 211 |
212 /* | |
213 * stolen from usg. | |
214 */ | |
215 #define HAVE_PTYS | |
216 #define FIRST_PTY_LETTER 'z' | |
217 | |
218 /* Pseudo-terminal support under SVR4 only loops to deal with errors. */ | |
219 | |
220 #define PTY_ITERATION for (i = 0; i < 1; i++) | |
221 | |
222 /* This sets the name of the master side of the PTY. */ | |
223 | |
224 #define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptmx"); | |
225 | |
226 /* This sets the name of the slave side of the PTY. On SysVr4, | |
227 grantpt(3) forks a subprocess, so keep sigchld_handler() from | |
228 intercepting that death. If any child but grantpt's should die | |
229 within, it should be caught after EMACS_UNBLOCK_SIGNAL. */ | |
230 | |
231 #define PTY_OPEN \ | |
232 fd = open (pty_name, O_RDWR | O_NONBLOCK | OPEN_BINARY, 0) | |
233 | |
234 #define PTY_TTY_NAME_SPRINTF \ | |
235 { \ | |
236 char *ptyname; \ | |
237 \ | |
238 if (!(ptyname = ptsname (fd))) \ | |
239 { close (fd); return -1; } \ | |
240 strncpy (pty_name, ptyname, sizeof (pty_name)); \ | |
241 pty_name[sizeof (pty_name) - 1] = 0; \ | |
242 } | |
243 | |
224 /* ============================================================ */ | 244 /* ============================================================ */ |
245 |