diff options
| author | Geoff Voelker | 1996-05-03 18:50:05 +0000 |
|---|---|---|
| committer | Geoff Voelker | 1996-05-03 18:50:05 +0000 |
| commit | 4e36126c56d2b5d111ca9f8a9195096525f377db (patch) | |
| tree | 8ee15dd8e709373dd9d04d9e1e14cd9cb65d51fe /src | |
| parent | 97aab3a23baa2f8605bf006164173679e69d5802 (diff) | |
| download | emacs-4e36126c56d2b5d111ca9f8a9195096525f377db.tar.gz emacs-4e36126c56d2b5d111ca9f8a9195096525f377db.zip | |
Include string.h.
(HAVE_FREXP, HAVE_FMOD): Macros removed.
(struct timeval, struct timezone, gettimeofday): Declarations removed.
(HAVE_SOCKETS, MAIL_USE_POP, MAIL_USE_SYSTEM_LOCK): Macros defined.
(DIRECTORY_SEP): Use Vdirectory_sep_char.
(EXEC_SUFFIXES): Add .cmd to list of suffixes.
(EXEC_SUFFIXES): Add .cmd to list of suffixes.
> (HAVE_SYS_TIMEB_H, HAVE_SYS_TIME_H, HAVE_UNISTD_H, STDC_HEADERS,
TIME_WITH_SYS_TIME, HAVE_GETTIMEOFDAY, HAVE_CLOSEDIR,
HAVE_LONG_FILE_NAMES, HAVE_BCOPY, HAVE_BCMP, HAVE_LOGB, HAVE_FREXP,
HAVE_FMOD, HAVE_FTIME, HAVE_MKTIME, HAVE_H_ERRNO): New macros.
(access, chdir, chmod, close, creat, ctime, dup, dup2, fopen,
link, mkdir, mktemp, open, pipe, read, rename, rmdir, select,
sleep, unlink, write, spawnve, wait, kill, signal):
Macros redefined from win32_* to sys_*.
[__STDC__]: Define when including direct.h, io.h, stdio.h.
(struct nt_stat): Definition removed.
(stat, st_dev, st_ino, st_mode, st_nlink, st_uid, st_gid,
st_rdev, st_size, st_atime, st_mtime, st_ctime): Macros undefined.
Diffstat (limited to 'src')
| -rw-r--r-- | src/s/ms-w32.h | 195 |
1 files changed, 108 insertions, 87 deletions
diff --git a/src/s/ms-w32.h b/src/s/ms-w32.h index 10122c54780..6162745a28d 100644 --- a/src/s/ms-w32.h +++ b/src/s/ms-w32.h | |||
| @@ -56,8 +56,6 @@ Boston, MA 02111-1307, USA. */ | |||
| 56 | #define SYMS_SYSTEM syms_of_ntterm () | 56 | #define SYMS_SYSTEM syms_of_ntterm () |
| 57 | 57 | ||
| 58 | #define NO_MATHERR | 58 | #define NO_MATHERR |
| 59 | #define HAVE_FREXP | ||
| 60 | #define HAVE_FMOD | ||
| 61 | 59 | ||
| 62 | /* NOMULTIPLEJOBS should be defined if your system's shell | 60 | /* NOMULTIPLEJOBS should be defined if your system's shell |
| 63 | does not have "job control" (the ability to stop a program, | 61 | does not have "job control" (the ability to stop a program, |
| @@ -114,19 +112,6 @@ Boston, MA 02111-1307, USA. */ | |||
| 114 | */ | 112 | */ |
| 115 | 113 | ||
| 116 | #define HAVE_TIMEVAL | 114 | #define HAVE_TIMEVAL |
| 117 | struct timeval | ||
| 118 | { | ||
| 119 | long tv_sec; /* seconds */ | ||
| 120 | long tv_usec; /* microseconds */ | ||
| 121 | }; | ||
| 122 | struct timezone | ||
| 123 | { | ||
| 124 | int tz_minuteswest; /* minutes west of Greenwich */ | ||
| 125 | int tz_dsttime; /* type of dst correction */ | ||
| 126 | }; | ||
| 127 | |||
| 128 | void gettimeofday (struct timeval *, struct timezone *); | ||
| 129 | |||
| 130 | 115 | ||
| 131 | /* | 116 | /* |
| 132 | * Define HAVE_SELECT if the system supports the `select' system call. | 117 | * Define HAVE_SELECT if the system supports the `select' system call. |
| @@ -147,6 +132,10 @@ void gettimeofday (struct timeval *, struct timezone *); | |||
| 147 | 132 | ||
| 148 | /* #define NONSYSTEM_DIR_LIBRARY */ | 133 | /* #define NONSYSTEM_DIR_LIBRARY */ |
| 149 | 134 | ||
| 135 | /* NT supports Winsock which is close enough (with some hacks) */ | ||
| 136 | |||
| 137 | #define HAVE_SOCKETS | ||
| 138 | |||
| 150 | /* Define this symbol if your system has the functions bcopy, etc. */ | 139 | /* Define this symbol if your system has the functions bcopy, etc. */ |
| 151 | 140 | ||
| 152 | #define BSTRING | 141 | #define BSTRING |
| @@ -173,6 +162,8 @@ void gettimeofday (struct timeval *, struct timezone *); | |||
| 173 | /usr/spool/mail/$USER.lock. */ | 162 | /usr/spool/mail/$USER.lock. */ |
| 174 | 163 | ||
| 175 | /* #define MAIL_USE_FLOCK */ | 164 | /* #define MAIL_USE_FLOCK */ |
| 165 | #define MAIL_USE_POP | ||
| 166 | #define MAIL_USE_SYSTEM_LOCK | ||
| 176 | 167 | ||
| 177 | /* Define CLASH_DETECTION if you want lock files to be written | 168 | /* Define CLASH_DETECTION if you want lock files to be written |
| 178 | so that Emacs can tell instantly when you try to modify | 169 | so that Emacs can tell instantly when you try to modify |
| @@ -203,7 +194,7 @@ void gettimeofday (struct timeval *, struct timezone *); | |||
| 203 | (Which you should place, by convention, in sysdep.c). */ | 194 | (Which you should place, by convention, in sysdep.c). */ |
| 204 | 195 | ||
| 205 | /* Define this to be the separator between path elements */ | 196 | /* Define this to be the separator between path elements */ |
| 206 | #define DIRECTORY_SEP '\\' | 197 | #define DIRECTORY_SEP XINT (Vdirectory_sep_char) |
| 207 | 198 | ||
| 208 | /* Define this to be the separator between devices and paths */ | 199 | /* Define this to be the separator between devices and paths */ |
| 209 | #define DEVICE_SEP ':' | 200 | #define DEVICE_SEP ':' |
| @@ -214,7 +205,7 @@ void gettimeofday (struct timeval *, struct timezone *); | |||
| 214 | 205 | ||
| 215 | /* The null device on Windows NT. */ | 206 | /* The null device on Windows NT. */ |
| 216 | #define NULL_DEVICE "NUL:" | 207 | #define NULL_DEVICE "NUL:" |
| 217 | #define EXEC_SUFFIXES ".exe:.com:.bat:" | 208 | #define EXEC_SUFFIXES ".exe:.com:.bat:.cmd:" |
| 218 | 209 | ||
| 219 | #ifndef MAXPATHLEN | 210 | #ifndef MAXPATHLEN |
| 220 | #define MAXPATHLEN _MAX_PATH | 211 | #define MAXPATHLEN _MAX_PATH |
| @@ -222,15 +213,35 @@ void gettimeofday (struct timeval *, struct timezone *); | |||
| 222 | 213 | ||
| 223 | #define LISP_FLOAT_TYPE | 214 | #define LISP_FLOAT_TYPE |
| 224 | 215 | ||
| 225 | #define HAVE_DUP2 1 | 216 | #define HAVE_SYS_TIMEB_H |
| 226 | #define HAVE_RENAME 1 | 217 | #define HAVE_SYS_TIME_H |
| 227 | #define HAVE_RMDIR 1 | 218 | #define HAVE_UNISTD_H |
| 228 | #define HAVE_MKDIR 1 | 219 | #define STDC_HEADERS |
| 229 | #define HAVE_GETHOSTNAME 1 | 220 | #define TIME_WITH_SYS_TIME |
| 230 | #define HAVE_RANDOM 1 | 221 | |
| 231 | #define USE_UTIME 1 | 222 | #define HAVE_GETTIMEOFDAY |
| 232 | #define HAVE_MOUSE 1 | 223 | #define HAVE_GETHOSTNAME |
| 233 | #define HAVE_TZNAME 1 | 224 | #define HAVE_DUP2 |
| 225 | #define HAVE_RENAME | ||
| 226 | #define HAVE_CLOSEDIR | ||
| 227 | |||
| 228 | #define HAVE_TZNAME | ||
| 229 | |||
| 230 | #define HAVE_LONG_FILE_NAMES | ||
| 231 | |||
| 232 | #define HAVE_MKDIR | ||
| 233 | #define HAVE_RMDIR | ||
| 234 | #define HAVE_RANDOM | ||
| 235 | #define HAVE_BCOPY | ||
| 236 | #define HAVE_BCMP | ||
| 237 | #define HAVE_LOGB | ||
| 238 | #define HAVE_FREXP | ||
| 239 | #define HAVE_FMOD | ||
| 240 | #define HAVE_FTIME | ||
| 241 | #define HAVE_MKTIME | ||
| 242 | |||
| 243 | #define HAVE_MOUSE | ||
| 244 | #define HAVE_H_ERRNO | ||
| 234 | 245 | ||
| 235 | #ifdef HAVE_NTGUI | 246 | #ifdef HAVE_NTGUI |
| 236 | #define HAVE_WINDOW_SYSTEM | 247 | #define HAVE_WINDOW_SYSTEM |
| @@ -239,40 +250,73 @@ void gettimeofday (struct timeval *, struct timezone *); | |||
| 239 | 250 | ||
| 240 | #define MODE_LINE_BINARY_TEXT(_b_) (NILP ((_b_)->buffer_file_type) ? "T" : "B") | 251 | #define MODE_LINE_BINARY_TEXT(_b_) (NILP ((_b_)->buffer_file_type) ? "T" : "B") |
| 241 | 252 | ||
| 242 | /* These have to be defined because our compilers treat __STDC__ as being | 253 | /* get some redefinitions in place */ |
| 243 | defined (most of them anyway). */ | 254 | |
| 244 | 255 | /* IO calls that are emulated or shadowed */ | |
| 245 | #define access _access | 256 | #define access sys_access |
| 246 | #define chdir _chdir | 257 | #define chdir sys_chdir |
| 247 | #define chmod _chmod | 258 | #define chmod sys_chmod |
| 248 | #define close _close | 259 | #define close sys_close |
| 249 | #define creat _creat | 260 | #define creat sys_creat |
| 250 | #define dup _dup | 261 | #define ctime sys_ctime |
| 251 | #define dup2 _dup2 | 262 | #define dup sys_dup |
| 252 | #define execlp _execlp | 263 | #define dup2 sys_dup2 |
| 253 | #define execvp _execvp | 264 | #define fopen sys_fopen |
| 254 | #define getpid _getpid | 265 | #define link sys_link |
| 255 | #define index strchr | 266 | #define mkdir sys_mkdir |
| 256 | #define isatty _isatty | 267 | #define mktemp sys_mktemp |
| 257 | #define link _link | 268 | #define open sys_open |
| 258 | #define lseek _lseek | 269 | #define pipe sys_pipe |
| 259 | #define mkdir _mkdir | 270 | #define read sys_read |
| 260 | #define mktemp _mktemp | 271 | #define rename sys_rename |
| 261 | #define open _open | 272 | #define rmdir sys_rmdir |
| 262 | #define pipe _pipe | 273 | #define select sys_select |
| 263 | #define read _read | 274 | #define sleep sys_sleep |
| 264 | #define rmdir _rmdir | 275 | #define unlink sys_unlink |
| 265 | #define sleep nt_sleep | 276 | #define write sys_write |
| 266 | #define unlink _unlink | 277 | |
| 267 | #define umask _umask | 278 | /* this is hacky, but is necessary to avoid warnings about macro |
| 268 | #define utime _utime | 279 | redefinitions using the SDK compilers */ |
| 269 | #define write _write | 280 | #ifndef __STDC__ |
| 270 | #define _longjmp longjmp | 281 | #define __STDC__ 1 |
| 271 | #define spawnve win32_spawnve | 282 | #define MUST_UNDEF__STDC__ |
| 272 | #define wait win32_wait | 283 | #endif |
| 273 | #define signal win32_signal | 284 | #include <direct.h> |
| 274 | #define rindex strrchr | 285 | #include <io.h> |
| 275 | #define ctime nt_ctime /* Place a wrapper around ctime (see nt.c). */ | 286 | #include <stdio.h> |
| 287 | #ifdef MUST_UNDEF__STDC__ | ||
| 288 | #undef __STDC__ | ||
| 289 | #undef MUST_UNDEF__STDC__ | ||
| 290 | #endif | ||
| 291 | |||
| 292 | /* subprocess calls that are emulated */ | ||
| 293 | #define spawnve sys_spawnve | ||
| 294 | #define wait sys_wait | ||
| 295 | #define kill sys_kill | ||
| 296 | #define signal sys_signal | ||
| 297 | |||
| 298 | /* map to MSVC names */ | ||
| 299 | #define execlp _execlp | ||
| 300 | #define execvp _execvp | ||
| 301 | #define fcloseall _fcloseall | ||
| 302 | #define fdopen _fdopen | ||
| 303 | #define fgetchar _fgetchar | ||
| 304 | #define fileno _fileno | ||
| 305 | #define flushall _flushall | ||
| 306 | #define fputchar _fputchar | ||
| 307 | #define getw _getw | ||
| 308 | #define getpid _getpid | ||
| 309 | #define isatty _isatty | ||
| 310 | #define logb _logb | ||
| 311 | #define _longjmp longjmp | ||
| 312 | #define lseek _lseek | ||
| 313 | #define popen _popen | ||
| 314 | #define pclose _pclose | ||
| 315 | #define putw _putw | ||
| 316 | #define umask _umask | ||
| 317 | #define utime _utime | ||
| 318 | #define index strchr | ||
| 319 | #define rindex strrchr | ||
| 276 | 320 | ||
| 277 | #ifdef HAVE_NTGUI | 321 | #ifdef HAVE_NTGUI |
| 278 | #define abort win32_abort | 322 | #define abort win32_abort |
| @@ -294,39 +338,15 @@ void gettimeofday (struct timeval *, struct timezone *); | |||
| 294 | #define EMACS_CONFIGURATION get_emacs_configuration () | 338 | #define EMACS_CONFIGURATION get_emacs_configuration () |
| 295 | #define EMACS_CONFIG_OPTIONS "NT" /* Not very meaningful yet. */ | 339 | #define EMACS_CONFIG_OPTIONS "NT" /* Not very meaningful yet. */ |
| 296 | 340 | ||
| 297 | /* Define this so that winsock.h definitions don't get included when windows.h | 341 | /* Define this so that winsock.h definitions don't get included with |
| 298 | is... I don't know if they do the right thing for emacs. For this to | 342 | windows.h. For this to have proper effect, config.h must always be |
| 299 | have proper effect, config.h must always be included before windows.h. */ | 343 | included before windows.h. */ |
| 300 | #define _WINSOCKAPI_ 1 | 344 | #define _WINSOCKAPI_ 1 |
| 301 | 345 | ||
| 302 | /* Defines size_t and alloca (). */ | 346 | /* Defines size_t and alloca (). */ |
| 303 | #include <malloc.h> | 347 | #include <malloc.h> |
| 304 | 348 | ||
| 305 | /* We have to handle stat specially. However, #defining stat to | ||
| 306 | something else not only redefines uses of the function, but also | ||
| 307 | redefines uses of the type struct stat. What unfortunate parallel | ||
| 308 | naming. */ | ||
| 309 | #include <sys/stat.h> | 349 | #include <sys/stat.h> |
| 310 | struct nt_stat | ||
| 311 | { | ||
| 312 | struct _stat statbuf; | ||
| 313 | }; | ||
| 314 | |||
| 315 | #ifdef stat | ||
| 316 | #undef stat | ||
| 317 | #endif | ||
| 318 | #define stat nt_stat | ||
| 319 | #define st_dev statbuf.st_dev | ||
| 320 | #define st_ino statbuf.st_ino | ||
| 321 | #define st_mode statbuf.st_mode | ||
| 322 | #define st_nlink statbuf.st_nlink | ||
| 323 | #define st_uid statbuf.st_uid | ||
| 324 | #define st_gid statbuf.st_gid | ||
| 325 | #define st_rdev statbuf.st_rdev | ||
| 326 | #define st_size statbuf.st_size | ||
| 327 | #define st_atime statbuf.st_atime | ||
| 328 | #define st_mtime statbuf.st_mtime | ||
| 329 | #define st_ctime statbuf.st_ctime | ||
| 330 | 350 | ||
| 331 | /* Define for those source files that do not include enough NT | 351 | /* Define for those source files that do not include enough NT |
| 332 | system files. */ | 352 | system files. */ |
| @@ -340,6 +360,7 @@ struct nt_stat | |||
| 340 | 360 | ||
| 341 | /* For proper declaration of environ. */ | 361 | /* For proper declaration of environ. */ |
| 342 | #include <stdlib.h> | 362 | #include <stdlib.h> |
| 363 | #include <string.h> | ||
| 343 | 364 | ||
| 344 | /* Emacs takes care of ensuring that these are defined. */ | 365 | /* Emacs takes care of ensuring that these are defined. */ |
| 345 | #ifdef max | 366 | #ifdef max |