Mercurial > emacs
comparison src/s/ms-w32.h @ 19716:524abb12cbf5
(INTERRUPT_INPUT): Don't define.
(bcopy): Use memmove instead of memcpy.
(GAP_USE_BCOPY, BCOPY_UPWARD_SAFE, BCOPY_DOWNWARD_SAFE): Define.
Undef system calls before redefining. Emulated calls redefined
to sys_*, real calls redefined to _*.
(DebPrint): Macro defined.
Use pragmas to place Emacs initialized data in
EMDATA segment, and Emacs uninitialized data in EMBSS segment.
author | Geoff Voelker <voelker@cs.washington.edu> |
---|---|
date | Wed, 03 Sep 1997 01:14:40 +0000 |
parents | 745be19af9d9 |
children | 058bff729a94 |
comparison
equal
deleted
inserted
replaced
19715:639881f2750d | 19716:524abb12cbf5 |
---|---|
83 Another method of doing input is planned but not implemented. | 83 Another method of doing input is planned but not implemented. |
84 It would have Emacs fork off a separate process | 84 It would have Emacs fork off a separate process |
85 to read the input and send it to the true Emacs process | 85 to read the input and send it to the true Emacs process |
86 through a pipe. */ | 86 through a pipe. */ |
87 | 87 |
88 #define INTERRUPT_INPUT | 88 /* #define INTERRUPT_INPUT */ |
89 | 89 |
90 /* Letter to use in finding device name of first pty, | 90 /* Letter to use in finding device name of first pty, |
91 if system supports pty's. 'a' means it is /dev/ptya0 */ | 91 if system supports pty's. 'a' means it is /dev/ptya0 */ |
92 | 92 |
93 #define FIRST_PTY_LETTER 'a' | 93 #define FIRST_PTY_LETTER 'a' |
138 | 138 |
139 /* Define this symbol if your system has the functions bcopy, etc. */ | 139 /* Define this symbol if your system has the functions bcopy, etc. */ |
140 | 140 |
141 #define BSTRING | 141 #define BSTRING |
142 #define bzero(b, l) memset(b, 0, l) | 142 #define bzero(b, l) memset(b, 0, l) |
143 #define bcopy(s, d, l) memcpy(d, s, l) | 143 #define bcopy(s, d, l) memmove(d, s, l) |
144 #define bcmp(a, b, l) memcmp(a, b, l) | 144 #define bcmp(a, b, l) memcmp(a, b, l) |
145 | |
146 /* bcopy (aka memmove aka memcpy at least on x86) under MSVC is quite safe */ | |
147 #define GAP_USE_BCOPY | |
148 #define BCOPY_UPWARD_SAFE 1 | |
149 #define BCOPY_DOWNWARD_SAFE 1 | |
145 | 150 |
146 /* subprocesses should be defined if you want to | 151 /* subprocesses should be defined if you want to |
147 have code for asynchronous subprocesses | 152 have code for asynchronous subprocesses |
148 (as used in M-x compile and M-x shell). | 153 (as used in M-x compile and M-x shell). |
149 This is generally OS dependent, and not supported | 154 This is generally OS dependent, and not supported |
291 #define MODE_LINE_BINARY_TEXT(_b_) (NILP ((_b_)->buffer_file_type) ? "T" : "B") | 296 #define MODE_LINE_BINARY_TEXT(_b_) (NILP ((_b_)->buffer_file_type) ? "T" : "B") |
292 | 297 |
293 /* get some redefinitions in place */ | 298 /* get some redefinitions in place */ |
294 | 299 |
295 /* IO calls that are emulated or shadowed */ | 300 /* IO calls that are emulated or shadowed */ |
301 #undef access | |
296 #define access sys_access | 302 #define access sys_access |
303 #undef chdir | |
297 #define chdir sys_chdir | 304 #define chdir sys_chdir |
305 #undef chmod | |
298 #define chmod sys_chmod | 306 #define chmod sys_chmod |
307 #undef close | |
299 #define close sys_close | 308 #define close sys_close |
309 #undef creat | |
300 #define creat sys_creat | 310 #define creat sys_creat |
301 #define ctime sys_ctime | 311 #define ctime sys_ctime |
312 #undef dup | |
302 #define dup sys_dup | 313 #define dup sys_dup |
314 #undef dup2 | |
303 #define dup2 sys_dup2 | 315 #define dup2 sys_dup2 |
304 #define fopen sys_fopen | 316 #define fopen sys_fopen |
305 #define link sys_link | 317 #define link sys_link |
306 #define mkdir sys_mkdir | 318 #define mkdir sys_mkdir |
319 #undef mktemp | |
307 #define mktemp sys_mktemp | 320 #define mktemp sys_mktemp |
321 #undef open | |
308 #define open sys_open | 322 #define open sys_open |
309 #define pipe sys_pipe | 323 #define pipe sys_pipe |
324 #undef read | |
310 #define read sys_read | 325 #define read sys_read |
311 #define rename sys_rename | 326 #define rename sys_rename |
312 #define rmdir sys_rmdir | 327 #define rmdir sys_rmdir |
313 #define select sys_select | 328 #define select sys_select |
314 #define sleep sys_sleep | 329 #define sleep sys_sleep |
330 #undef unlink | |
315 #define unlink sys_unlink | 331 #define unlink sys_unlink |
332 #undef write | |
316 #define write sys_write | 333 #define write sys_write |
317 | |
318 /* this is hacky, but is necessary to avoid warnings about macro | |
319 redefinitions using the SDK compilers */ | |
320 #ifndef __STDC__ | |
321 #define __STDC__ 1 | |
322 #define MUST_UNDEF__STDC__ | |
323 #endif | |
324 #include <direct.h> | |
325 #include <io.h> | |
326 #include <stdio.h> | |
327 #ifdef MUST_UNDEF__STDC__ | |
328 #undef __STDC__ | |
329 #undef MUST_UNDEF__STDC__ | |
330 #endif | |
331 | 334 |
332 /* subprocess calls that are emulated */ | 335 /* subprocess calls that are emulated */ |
333 #define spawnve sys_spawnve | 336 #define spawnve sys_spawnve |
334 #define wait sys_wait | 337 #define wait sys_wait |
335 #define kill sys_kill | 338 #define kill sys_kill |
342 #define fdopen _fdopen | 345 #define fdopen _fdopen |
343 #define fgetchar _fgetchar | 346 #define fgetchar _fgetchar |
344 #define fileno _fileno | 347 #define fileno _fileno |
345 #define flushall _flushall | 348 #define flushall _flushall |
346 #define fputchar _fputchar | 349 #define fputchar _fputchar |
350 #define getcwd _getcwd | |
347 #define getw _getw | 351 #define getw _getw |
348 #define getpid _getpid | 352 #define getpid _getpid |
349 #define isatty _isatty | 353 #define isatty _isatty |
350 #define logb _logb | 354 #define logb _logb |
351 #define _longjmp longjmp | 355 #define _longjmp longjmp |
360 | 364 |
361 #ifdef HAVE_NTGUI | 365 #ifdef HAVE_NTGUI |
362 #define abort w32_abort | 366 #define abort w32_abort |
363 #endif | 367 #endif |
364 | 368 |
369 /* this is hacky, but is necessary to avoid warnings about macro | |
370 redefinitions using the SDK compilers */ | |
371 #ifndef __STDC__ | |
372 #define __STDC__ 1 | |
373 #define MUST_UNDEF__STDC__ | |
374 #endif | |
375 #include <direct.h> | |
376 #include <io.h> | |
377 #include <stdio.h> | |
378 #ifdef MUST_UNDEF__STDC__ | |
379 #undef __STDC__ | |
380 #undef MUST_UNDEF__STDC__ | |
381 #endif | |
382 | |
365 /* Defines that we need that aren't in the standard signal.h */ | 383 /* Defines that we need that aren't in the standard signal.h */ |
366 #define SIGHUP 1 /* Hang up */ | 384 #define SIGHUP 1 /* Hang up */ |
367 #define SIGQUIT 3 /* Quit process */ | 385 #define SIGQUIT 3 /* Quit process */ |
368 #define SIGTRAP 5 /* Trace trap */ | 386 #define SIGTRAP 5 /* Trace trap */ |
369 #define SIGKILL 9 /* Die, die die */ | 387 #define SIGKILL 9 /* Die, die die */ |
409 #endif | 427 #endif |
410 | 428 |
411 /* We need a little extra space, see ../../lisp/loadup.el */ | 429 /* We need a little extra space, see ../../lisp/loadup.el */ |
412 #define SYSTEM_PURESIZE_EXTRA 25000 | 430 #define SYSTEM_PURESIZE_EXTRA 25000 |
413 | 431 |
432 /* For unexec to work on Alpha systems, we need to put Emacs' | |
433 initialized data into a separate section from the CRT initialized | |
434 data (because the Alpha linker freely reorders data variables, even | |
435 across libraries, so our data and the CRT data get intermingled). | |
436 | |
437 Starting with MSVC 5.0, we must also place the uninitialized data | |
438 into its own section. VC5 intermingles uninitialized data from the CRT | |
439 between Emacs' static uninitialized data and its public uninitialized | |
440 data. A separate .bss section for Emacs groups both static and | |
441 public uninitalized together. | |
442 | |
443 Note that unexnt.c relies on this fact, and must be modified | |
444 accordingly if this section name is changed, or if this pragma is | |
445 removed. Also, obviously, all files that define initialized data | |
446 must include config.h to pick up this pragma. */ | |
447 | |
448 /* Names must be < 8 bytes */ | |
449 #pragma data_seg("EMDATA") | |
450 #pragma bss_seg("EMBSS") | |
451 | |
452 /* #define FULL_DEBUG */ | |
453 /* #define EMACSDEBUG */ | |
454 | |
455 #ifdef EMACSDEBUG | |
456 extern void _DebPrint (const char *fmt, ...); | |
457 #define DebPrint(stuff) _DebPrint stuff | |
458 #else | |
459 #define DebPrint(stuff) | |
460 #endif | |
461 | |
462 | |
414 /* ============================================================ */ | 463 /* ============================================================ */ |