diff options
| author | Geoff Voelker | 1997-09-03 01:14:40 +0000 |
|---|---|---|
| committer | Geoff Voelker | 1997-09-03 01:14:40 +0000 |
| commit | 7f470effe987559a417d979c01f75f2fc80fd165 (patch) | |
| tree | bf5594fc587fbd467b5b4f254a0547eb838feae8 /src | |
| parent | 4a83117466df6a26a25e5db6a27e857464f2d3d1 (diff) | |
| download | emacs-7f470effe987559a417d979c01f75f2fc80fd165.tar.gz emacs-7f470effe987559a417d979c01f75f2fc80fd165.zip | |
(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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/s/ms-w32.h | 81 |
1 files changed, 65 insertions, 16 deletions
diff --git a/src/s/ms-w32.h b/src/s/ms-w32.h index faa19d8e104..8d02140b13c 100644 --- a/src/s/ms-w32.h +++ b/src/s/ms-w32.h | |||
| @@ -85,7 +85,7 @@ Boston, MA 02111-1307, USA. */ | |||
| 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 */ |
| @@ -140,9 +140,14 @@ Boston, MA 02111-1307, USA. */ | |||
| 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 | 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 | ||
| 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). |
| @@ -293,42 +298,40 @@ Boston, MA 02111-1307, USA. */ | |||
| 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 | 334 | ||
| 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 | |||
| 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 |
| @@ -344,6 +347,7 @@ Boston, MA 02111-1307, USA. */ | |||
| 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 |
| @@ -362,6 +366,20 @@ Boston, MA 02111-1307, USA. */ | |||
| 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 */ |
| @@ -411,4 +429,35 @@ Boston, MA 02111-1307, USA. */ | |||
| 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 | /* ============================================================ */ |