diff options
| author | Eli Zaretskii | 2013-03-28 20:13:59 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2013-03-28 20:13:59 +0200 |
| commit | d76bf86f438d4f5f9fe493ab76f02ffc78f3ae2e (patch) | |
| tree | 04fa8bc7bd2058a316a7ee30f8741d25bfd0b060 /nt/inc | |
| parent | 2ef26ceb192c7683754cf0b4aa3087f501254332 (diff) | |
| parent | e74aeda863cd6896e06e92586f87b45d63d67d15 (diff) | |
| download | emacs-d76bf86f438d4f5f9fe493ab76f02ffc78f3ae2e.tar.gz emacs-d76bf86f438d4f5f9fe493ab76f02ffc78f3ae2e.zip | |
Merge from trunk and resolve conflicts.
Diffstat (limited to 'nt/inc')
| -rw-r--r-- | nt/inc/dirent.h | 2 | ||||
| -rw-r--r-- | nt/inc/grp.h | 2 | ||||
| -rw-r--r-- | nt/inc/inttypes.h | 2 | ||||
| -rw-r--r-- | nt/inc/langinfo.h | 2 | ||||
| -rw-r--r-- | nt/inc/ms-w32.h | 85 | ||||
| -rw-r--r-- | nt/inc/nl_types.h | 2 | ||||
| -rw-r--r-- | nt/inc/stdint.h | 4 | ||||
| -rw-r--r-- | nt/inc/sys/acl.h | 25 | ||||
| -rw-r--r-- | nt/inc/sys/socket.h | 2 | ||||
| -rw-r--r-- | nt/inc/sys/stat.h | 18 | ||||
| -rw-r--r-- | nt/inc/sys/time.h | 6 | ||||
| -rw-r--r-- | nt/inc/sys/wait.h | 2 | ||||
| -rw-r--r-- | nt/inc/unistd.h | 6 |
13 files changed, 133 insertions, 25 deletions
diff --git a/nt/inc/dirent.h b/nt/inc/dirent.h index 618f3beddf0..676b82d207b 100644 --- a/nt/inc/dirent.h +++ b/nt/inc/dirent.h | |||
| @@ -30,7 +30,7 @@ typedef struct | |||
| 30 | char dd_buf[DIRBLKSIZ]; /* directory block */ | 30 | char dd_buf[DIRBLKSIZ]; /* directory block */ |
| 31 | } DIR; /* stream data from opendir() */ | 31 | } DIR; /* stream data from opendir() */ |
| 32 | 32 | ||
| 33 | extern DIR *opendir (char *); | 33 | extern DIR *opendir (const char *); |
| 34 | extern struct dirent *readdir (DIR *); | 34 | extern struct dirent *readdir (DIR *); |
| 35 | extern void seekdir (DIR *, long); | 35 | extern void seekdir (DIR *, long); |
| 36 | extern void closedir (DIR *); | 36 | extern void closedir (DIR *); |
diff --git a/nt/inc/grp.h b/nt/inc/grp.h index 3d369044974..02c0ef7f3a0 100644 --- a/nt/inc/grp.h +++ b/nt/inc/grp.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Replacement grp.h file for building GNU Emacs on Windows. | 1 | /* Replacement grp.h file for building GNU Emacs on Windows. |
| 2 | 2 | ||
| 3 | Copyright (C) 2003-2012 Free Software Foundation, Inc. | 3 | Copyright (C) 2003-2013 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
diff --git a/nt/inc/inttypes.h b/nt/inc/inttypes.h index 688b9bc9223..4629ccb038c 100644 --- a/nt/inc/inttypes.h +++ b/nt/inc/inttypes.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Replacement inntypes.h file for building GNU Emacs on Windows with MSVC. | 1 | /* Replacement inntypes.h file for building GNU Emacs on Windows with MSVC. |
| 2 | 2 | ||
| 3 | Copyright (C) 2011-2012 Free Software Foundation, Inc. | 3 | Copyright (C) 2011-2013 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
diff --git a/nt/inc/langinfo.h b/nt/inc/langinfo.h index 7ab36f0a998..93a56e548c7 100644 --- a/nt/inc/langinfo.h +++ b/nt/inc/langinfo.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Replacement langinfo.h file for building GNU Emacs on Windows. | 1 | /* Replacement langinfo.h file for building GNU Emacs on Windows. |
| 2 | 2 | ||
| 3 | Copyright (C) 2006-2012 Free Software Foundation, Inc. | 3 | Copyright (C) 2006-2013 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
diff --git a/nt/inc/ms-w32.h b/nt/inc/ms-w32.h index 7b16ccab069..cd183c917c4 100644 --- a/nt/inc/ms-w32.h +++ b/nt/inc/ms-w32.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* System description file for Windows NT. | 1 | /* System description file for Windows NT. |
| 2 | 2 | ||
| 3 | Copyright (C) 1993-1995, 2001-2012 Free Software Foundation, Inc. | 3 | Copyright (C) 1993-1995, 2001-2013 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
| @@ -70,6 +70,18 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 70 | #define HAVE___BUILTIN_UNWIND_INIT 1 | 70 | #define HAVE___BUILTIN_UNWIND_INIT 1 |
| 71 | #endif | 71 | #endif |
| 72 | 72 | ||
| 73 | /* This isn't perfect, as some systems might have the page file in | ||
| 74 | another place. Also, I suspect that the time stamp of that file | ||
| 75 | might also change when Windows enlarges the file due to | ||
| 76 | insufficient VM. Still, this seems to be the most reliable way; | ||
| 77 | the alternative (of using GetSystemTimes) won't work on laptops | ||
| 78 | that hibernate, because the system clock is stopped then. Other | ||
| 79 | possibility would be to run "net statistics workstation" and parse | ||
| 80 | the output, but that's gross. So this should do; if the file is | ||
| 81 | not there, the boot time will be returned as zero, and filelock.c | ||
| 82 | already handles that. */ | ||
| 83 | #define BOOT_TIME_FILE "C:/pagefile.sys" | ||
| 84 | |||
| 73 | /* ============================================================ */ | 85 | /* ============================================================ */ |
| 74 | 86 | ||
| 75 | /* Here, add any special hacks needed to make Emacs work on this | 87 | /* Here, add any special hacks needed to make Emacs work on this |
| @@ -115,6 +127,17 @@ typedef unsigned short mode_t; | |||
| 115 | extern char *getenv (); | 127 | extern char *getenv (); |
| 116 | #endif | 128 | #endif |
| 117 | 129 | ||
| 130 | /* Prevent accidental use of features unavailable in older Windows | ||
| 131 | versions we still support. MinGW64 defines this to a higher value | ||
| 132 | in its system headers, and is not really compatible with values | ||
| 133 | lower than 0x0500, so leave it alone. */ | ||
| 134 | #ifndef _W64 | ||
| 135 | # define _WIN32_WINNT 0x0400 | ||
| 136 | #endif | ||
| 137 | |||
| 138 | /* Make a leaner executable. */ | ||
| 139 | #define WIN32_LEAN_AND_MEAN 1 | ||
| 140 | |||
| 118 | #ifdef HAVE_STRINGS_H | 141 | #ifdef HAVE_STRINGS_H |
| 119 | #include "strings.h" | 142 | #include "strings.h" |
| 120 | #endif | 143 | #endif |
| @@ -133,6 +156,21 @@ extern char *getenv (); | |||
| 133 | 156 | ||
| 134 | #ifdef emacs | 157 | #ifdef emacs |
| 135 | 158 | ||
| 159 | #ifdef _W64 | ||
| 160 | /* MinGW64 specific stuff. */ | ||
| 161 | /* Make sure 'struct timespec' and 'struct timezone' are defined. */ | ||
| 162 | #include <sys/types.h> | ||
| 163 | #include <time.h> | ||
| 164 | /* This prototype avoids MinGW64 compiler warnings due to the fact | ||
| 165 | that time.h is included before localtime is redirected to | ||
| 166 | sys_localtime below. */ | ||
| 167 | extern struct tm * sys_localtime (const time_t *); | ||
| 168 | /* MinGW64 uses a 2-argument _setjmp, and setjmp is a macro defined to | ||
| 169 | supply the 2nd arg correctly, so don't use _setjmp directly in that | ||
| 170 | case. */ | ||
| 171 | #undef HAVE__SETJMP | ||
| 172 | #endif | ||
| 173 | |||
| 136 | #ifdef _MSC_VER | 174 | #ifdef _MSC_VER |
| 137 | #include <sys/timeb.h> | 175 | #include <sys/timeb.h> |
| 138 | #include <sys/stat.h> | 176 | #include <sys/stat.h> |
| @@ -149,7 +187,6 @@ extern char *getenv (); | |||
| 149 | #define chdir sys_chdir | 187 | #define chdir sys_chdir |
| 150 | #undef chmod | 188 | #undef chmod |
| 151 | #define chmod sys_chmod | 189 | #define chmod sys_chmod |
| 152 | #define chown sys_chown | ||
| 153 | #undef close | 190 | #undef close |
| 154 | #define close sys_close | 191 | #define close sys_close |
| 155 | #undef creat | 192 | #undef creat |
| @@ -178,6 +215,10 @@ extern char *getenv (); | |||
| 178 | #define strerror sys_strerror | 215 | #define strerror sys_strerror |
| 179 | #undef unlink | 216 | #undef unlink |
| 180 | #define unlink sys_unlink | 217 | #define unlink sys_unlink |
| 218 | /* This prototype is needed because some files include config.h | ||
| 219 | _after_ the standard headers, so sys_unlink gets no prototype from | ||
| 220 | stdio.h or io.h. */ | ||
| 221 | extern int sys_unlink (const char *); | ||
| 181 | #undef write | 222 | #undef write |
| 182 | #define write sys_write | 223 | #define write sys_write |
| 183 | 224 | ||
| @@ -205,6 +246,7 @@ extern char *getenv (); | |||
| 205 | /* Map to MSVC names. */ | 246 | /* Map to MSVC names. */ |
| 206 | #define execlp _execlp | 247 | #define execlp _execlp |
| 207 | #define execvp _execvp | 248 | #define execvp _execvp |
| 249 | #define fdatasync _commit | ||
| 208 | #define fdopen _fdopen | 250 | #define fdopen _fdopen |
| 209 | #ifndef fileno | 251 | #ifndef fileno |
| 210 | #define fileno _fileno | 252 | #define fileno _fileno |
| @@ -218,7 +260,6 @@ typedef int pid_t; | |||
| 218 | #define strtoll _strtoi64 | 260 | #define strtoll _strtoi64 |
| 219 | #endif | 261 | #endif |
| 220 | #define isatty _isatty | 262 | #define isatty _isatty |
| 221 | #define logb _logb | ||
| 222 | #define _longjmp longjmp | 263 | #define _longjmp longjmp |
| 223 | #define lseek _lseek | 264 | #define lseek _lseek |
| 224 | #define popen _popen | 265 | #define popen _popen |
| @@ -251,18 +292,24 @@ int _getpid (void); | |||
| 251 | /* 'struct timespec' is used by time-related functions in lib/ and | 292 | /* 'struct timespec' is used by time-related functions in lib/ and |
| 252 | elsewhere, but we don't use lib/time.h where the structure is | 293 | elsewhere, but we don't use lib/time.h where the structure is |
| 253 | defined. */ | 294 | defined. */ |
| 295 | /* MinGW64 defines 'struct timespec' and _TIMESPEC_DEFINED in sys/types.h. */ | ||
| 296 | #ifndef _TIMESPEC_DEFINED | ||
| 254 | struct timespec | 297 | struct timespec |
| 255 | { | 298 | { |
| 256 | time_t tv_sec; /* seconds */ | 299 | time_t tv_sec; /* seconds */ |
| 257 | long int tv_nsec; /* nanoseconds */ | 300 | long int tv_nsec; /* nanoseconds */ |
| 258 | }; | 301 | }; |
| 302 | #endif | ||
| 259 | 303 | ||
| 260 | /* Required for functions in lib/time_r.c, since we don't use lib/time.h. */ | 304 | /* Required for functions in lib/time_r.c, since we don't use lib/time.h. */ |
| 261 | extern struct tm *gmtime_r (time_t const * restrict, struct tm * restrict); | 305 | extern struct tm *gmtime_r (time_t const * restrict, struct tm * restrict); |
| 262 | extern struct tm *localtime_r (time_t const * restrict, struct tm * restrict); | 306 | extern struct tm *localtime_r (time_t const * restrict, struct tm * restrict); |
| 263 | 307 | ||
| 308 | #ifdef _MSC_VER | ||
| 264 | /* This is hacky, but is necessary to avoid warnings about macro | 309 | /* This is hacky, but is necessary to avoid warnings about macro |
| 265 | redefinitions using the SDK compilers. */ | 310 | redefinitions using the MSVC compilers, since, when __STDC__ is |
| 311 | undefined or zero, those compilers declare functions like fileno, | ||
| 312 | lseek, and chdir, for which we defined macros above. */ | ||
| 266 | #ifndef __STDC__ | 313 | #ifndef __STDC__ |
| 267 | #define __STDC__ 1 | 314 | #define __STDC__ 1 |
| 268 | #define MUST_UNDEF__STDC__ | 315 | #define MUST_UNDEF__STDC__ |
| @@ -274,6 +321,11 @@ extern struct tm *localtime_r (time_t const * restrict, struct tm * restrict); | |||
| 274 | #undef __STDC__ | 321 | #undef __STDC__ |
| 275 | #undef MUST_UNDEF__STDC__ | 322 | #undef MUST_UNDEF__STDC__ |
| 276 | #endif | 323 | #endif |
| 324 | #else /* !_MSC_VER */ | ||
| 325 | #include <direct.h> | ||
| 326 | #include <io.h> | ||
| 327 | #include <stdio.h> | ||
| 328 | #endif /* !_MSC_VER */ | ||
| 277 | 329 | ||
| 278 | /* Defines that we need that aren't in the standard signal.h. */ | 330 | /* Defines that we need that aren't in the standard signal.h. */ |
| 279 | #define SIGHUP 1 /* Hang up */ | 331 | #define SIGHUP 1 /* Hang up */ |
| @@ -289,11 +341,19 @@ extern struct tm *localtime_r (time_t const * restrict, struct tm * restrict); | |||
| 289 | #define NSIG 23 | 341 | #define NSIG 23 |
| 290 | #endif | 342 | #endif |
| 291 | 343 | ||
| 344 | #ifndef ENOTSUP | ||
| 345 | #define ENOTSUP ENOSYS | ||
| 346 | #endif | ||
| 347 | |||
| 292 | #ifdef _MSC_VER | 348 | #ifdef _MSC_VER |
| 293 | typedef int sigset_t; | 349 | typedef int sigset_t; |
| 294 | typedef int ssize_t; | 350 | typedef int ssize_t; |
| 295 | #endif | 351 | #endif |
| 296 | 352 | ||
| 353 | #ifndef _POSIX /* MinGW64 */ | ||
| 354 | typedef _sigset_t sigset_t; | ||
| 355 | #endif | ||
| 356 | |||
| 297 | typedef void (_CALLBACK_ *signal_handler) (int); | 357 | typedef void (_CALLBACK_ *signal_handler) (int); |
| 298 | extern signal_handler sys_signal (int, signal_handler); | 358 | extern signal_handler sys_signal (int, signal_handler); |
| 299 | 359 | ||
| @@ -339,13 +399,6 @@ extern char *get_emacs_configuration_options (void); | |||
| 339 | #define _WINSOCKAPI_ 1 | 399 | #define _WINSOCKAPI_ 1 |
| 340 | #define _WINSOCK_H | 400 | #define _WINSOCK_H |
| 341 | 401 | ||
| 342 | /* Prevent accidental use of features unavailable in | ||
| 343 | older Windows versions we still support. */ | ||
| 344 | #define _WIN32_WINNT 0x0400 | ||
| 345 | |||
| 346 | /* Make a leaner executable. */ | ||
| 347 | #define WIN32_LEAN_AND_MEAN 1 | ||
| 348 | |||
| 349 | /* Defines size_t and alloca (). */ | 402 | /* Defines size_t and alloca (). */ |
| 350 | #ifdef emacs | 403 | #ifdef emacs |
| 351 | #define malloc e_malloc | 404 | #define malloc e_malloc |
| @@ -376,9 +429,19 @@ extern char *get_emacs_configuration_options (void); | |||
| 376 | #define sys_nerr _sys_nerr | 429 | #define sys_nerr _sys_nerr |
| 377 | #endif | 430 | #endif |
| 378 | 431 | ||
| 432 | /* This must be after including stdlib.h, which defines putenv on MinGW. */ | ||
| 433 | #ifdef putenv | ||
| 434 | # undef putenv | ||
| 435 | #endif | ||
| 436 | #define putenv sys_putenv | ||
| 437 | extern int sys_putenv (char *); | ||
| 438 | |||
| 379 | extern int getloadavg (double *, int); | 439 | extern int getloadavg (double *, int); |
| 380 | extern int getpagesize (void); | 440 | extern int getpagesize (void); |
| 381 | 441 | ||
| 442 | extern void * memrchr (void const *, int, size_t); | ||
| 443 | |||
| 444 | |||
| 382 | #if defined (__MINGW32__) | 445 | #if defined (__MINGW32__) |
| 383 | 446 | ||
| 384 | /* Define to 1 if the system has the type `long long int'. */ | 447 | /* Define to 1 if the system has the type `long long int'. */ |
diff --git a/nt/inc/nl_types.h b/nt/inc/nl_types.h index 3d3a162bada..e3eb9eb5477 100644 --- a/nt/inc/nl_types.h +++ b/nt/inc/nl_types.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Replacement nl_types.h file for building GNU Emacs on Windows. | 1 | /* Replacement nl_types.h file for building GNU Emacs on Windows. |
| 2 | 2 | ||
| 3 | Copyright (C) 2006-2012 Free Software Foundation, Inc. | 3 | Copyright (C) 2006-2013 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
diff --git a/nt/inc/stdint.h b/nt/inc/stdint.h index 97c9bbdaee9..c8b3aba0916 100644 --- a/nt/inc/stdint.h +++ b/nt/inc/stdint.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Replacement stdint.h file for building GNU Emacs on Windows. | 1 | /* Replacement stdint.h file for building GNU Emacs on Windows. |
| 2 | 2 | ||
| 3 | Copyright (C) 2011-2012 Free Software Foundation, Inc. | 3 | Copyright (C) 2011-2013 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
| @@ -38,6 +38,7 @@ typedef unsigned __int64 uint64_t; | |||
| 38 | #define INT64_MIN (~INT64_MAX) | 38 | #define INT64_MIN (~INT64_MAX) |
| 39 | #define INTPTR_MAX INT64_MAX | 39 | #define INTPTR_MAX INT64_MAX |
| 40 | #define INTPTR_MIN INT64_MIN | 40 | #define INTPTR_MIN INT64_MIN |
| 41 | #define UINTPTR_MAX UINT64_MAX | ||
| 41 | #define UINTMAX_MAX UINT64_MAX | 42 | #define UINTMAX_MAX UINT64_MAX |
| 42 | #define UINTMAX_MIN UINT64_MIN | 43 | #define UINTMAX_MIN UINT64_MIN |
| 43 | #define INTMAX_MAX INT64_MAX | 44 | #define INTMAX_MAX INT64_MAX |
| @@ -53,6 +54,7 @@ typedef unsigned int uint32_t; | |||
| 53 | #define INT32_MIN (~INT32_MAX) | 54 | #define INT32_MIN (~INT32_MAX) |
| 54 | #define INTPTR_MAX INT32_MAX | 55 | #define INTPTR_MAX INT32_MAX |
| 55 | #define INTPTR_MIN INT32_MIN | 56 | #define INTPTR_MIN INT32_MIN |
| 57 | #define UINTPTR_MAX UINT32_MAX | ||
| 56 | #define UINTMAX_MAX UINT32_MAX | 58 | #define UINTMAX_MAX UINT32_MAX |
| 57 | #define UINTMAX_MIN UINT32_MIN | 59 | #define UINTMAX_MIN UINT32_MIN |
| 58 | #define INTMAX_MAX INT32_MAX | 60 | #define INTMAX_MAX INT32_MAX |
diff --git a/nt/inc/sys/acl.h b/nt/inc/sys/acl.h new file mode 100644 index 00000000000..3133e3bfc09 --- /dev/null +++ b/nt/inc/sys/acl.h | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | /* Emulation of Posix ACLs for Windows. */ | ||
| 2 | |||
| 3 | #ifndef ACL_H | ||
| 4 | #define ACL_H | ||
| 5 | |||
| 6 | #define NOMINMAX 1 /* don't define min and max */ | ||
| 7 | #include <windows.h> | ||
| 8 | |||
| 9 | typedef PSECURITY_DESCRIPTOR acl_t; | ||
| 10 | typedef unsigned acl_type_t; | ||
| 11 | |||
| 12 | /* Values of acl_type_t */ | ||
| 13 | #define ACL_TYPE_ACCESS 0 | ||
| 14 | #define ACL_TYPE_DEFAULT 1 | ||
| 15 | |||
| 16 | typedef unsigned acl_perm_t; | ||
| 17 | |||
| 18 | extern int acl_valid (acl_t); | ||
| 19 | extern acl_t acl_get_file (const char *, acl_type_t); | ||
| 20 | extern int acl_set_file (const char *, acl_type_t, acl_t); | ||
| 21 | extern char * acl_to_text (acl_t, ssize_t *); | ||
| 22 | extern acl_t acl_from_text (const char *); | ||
| 23 | extern int acl_free (void *); | ||
| 24 | |||
| 25 | #endif /* ACL_H */ | ||
diff --git a/nt/inc/sys/socket.h b/nt/inc/sys/socket.h index 1c8be6c452f..99227d75d28 100644 --- a/nt/inc/sys/socket.h +++ b/nt/inc/sys/socket.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* Copyright (C) 1995, 2001-2012 Free Software Foundation, Inc. | 1 | /* Copyright (C) 1995, 2001-2013 Free Software Foundation, Inc. |
| 2 | 2 | ||
| 3 | This file is part of GNU Emacs. | 3 | This file is part of GNU Emacs. |
| 4 | 4 | ||
diff --git a/nt/inc/sys/stat.h b/nt/inc/sys/stat.h index b673b80a0e3..f6785c56477 100644 --- a/nt/inc/sys/stat.h +++ b/nt/inc/sys/stat.h | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* sys/stat.h supplied with MSVCRT uses too narrow data types for | 1 | /* sys/stat.h supplied with MSVCRT uses too narrow data types for |
| 2 | inode and user/group id, so we replace them with our own. | 2 | inode and user/group id, so we replace them with our own. |
| 3 | 3 | ||
| 4 | Copyright (C) 2008-2012 Free Software Foundation, Inc. | 4 | Copyright (C) 2008-2013 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | This file is part of GNU Emacs. | 6 | This file is part of GNU Emacs. |
| 7 | 7 | ||
| @@ -74,6 +74,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 74 | #define S_ISDOOR(m) 0 | 74 | #define S_ISDOOR(m) 0 |
| 75 | #define S_ISMPB(m) 0 | 75 | #define S_ISMPB(m) 0 |
| 76 | #define S_ISMPC(m) 0 | 76 | #define S_ISMPC(m) 0 |
| 77 | #define S_ISMPX(m) 0 | ||
| 77 | #define S_ISNWK(m) 0 | 78 | #define S_ISNWK(m) 0 |
| 78 | #define S_ISPORT(m) 0 | 79 | #define S_ISPORT(m) 0 |
| 79 | #define S_ISWHT(m) 0 | 80 | #define S_ISWHT(m) 0 |
| @@ -98,13 +99,18 @@ struct stat { | |||
| 98 | char st_gname[260]; | 99 | char st_gname[260]; |
| 99 | }; | 100 | }; |
| 100 | 101 | ||
| 102 | /* Internal variable for asking 'stat'/'lstat' to produce accurate | ||
| 103 | info about owner and group of files. */ | ||
| 104 | extern int w32_stat_get_owner_group; | ||
| 105 | |||
| 101 | /* Prevent redefinition by other headers, e.g. wchar.h. */ | 106 | /* Prevent redefinition by other headers, e.g. wchar.h. */ |
| 102 | #define _STAT_DEFINED | 107 | #define _STAT_DEFINED |
| 103 | 108 | ||
| 104 | _CRTIMP int __cdecl __MINGW_NOTHROW fstat (int, struct stat*); | 109 | int __cdecl __MINGW_NOTHROW fstat (int, struct stat*); |
| 105 | _CRTIMP int __cdecl __MINGW_NOTHROW chmod (const char*, int); | 110 | int __cdecl __MINGW_NOTHROW stat (const char*, struct stat*); |
| 106 | _CRTIMP int __cdecl __MINGW_NOTHROW stat (const char*, struct stat*); | 111 | int __cdecl __MINGW_NOTHROW lstat (const char*, struct stat*); |
| 107 | _CRTIMP int __cdecl __MINGW_NOTHROW lstat (const char*, struct stat*); | 112 | int __cdecl __MINGW_NOTHROW fstatat (int, char const *, |
| 113 | struct stat *, int); | ||
| 114 | int __cdecl __MINGW_NOTHROW chmod (const char*, int); | ||
| 108 | 115 | ||
| 109 | #endif /* INC_SYS_STAT_H_ */ | 116 | #endif /* INC_SYS_STAT_H_ */ |
| 110 | |||
diff --git a/nt/inc/sys/time.h b/nt/inc/sys/time.h index 2d2c3abe222..aa51041bcd8 100644 --- a/nt/inc/sys/time.h +++ b/nt/inc/sys/time.h | |||
| @@ -6,6 +6,9 @@ | |||
| 6 | * have the below stuff. | 6 | * have the below stuff. |
| 7 | */ | 7 | */ |
| 8 | 8 | ||
| 9 | /* The guards are for MinGW64, which defines these structs on its | ||
| 10 | system headers which are included by ms-w32.h. */ | ||
| 11 | #ifndef _W64 | ||
| 9 | /* Allow inclusion of sys/time.h and winsock2.h in any order. Needed | 12 | /* Allow inclusion of sys/time.h and winsock2.h in any order. Needed |
| 10 | for running the configure test, which is only relevant to MinGW. */ | 13 | for running the configure test, which is only relevant to MinGW. */ |
| 11 | #ifndef _TIMEVAL_DEFINED | 14 | #ifndef _TIMEVAL_DEFINED |
| @@ -22,12 +25,15 @@ struct timeval | |||
| 22 | ((tvp)->tv_usec cmp (uvp)->tv_usec)) | 25 | ((tvp)->tv_usec cmp (uvp)->tv_usec)) |
| 23 | #define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0 | 26 | #define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0 |
| 24 | #endif /* _TIMEVAL_DEFINED */ | 27 | #endif /* _TIMEVAL_DEFINED */ |
| 28 | #endif /* _W64 */ | ||
| 25 | 29 | ||
| 30 | #ifndef _TIMEZONE_DEFINED | ||
| 26 | struct timezone | 31 | struct timezone |
| 27 | { | 32 | { |
| 28 | int tz_minuteswest; /* minutes west of Greenwich */ | 33 | int tz_minuteswest; /* minutes west of Greenwich */ |
| 29 | int tz_dsttime; /* type of dst correction */ | 34 | int tz_dsttime; /* type of dst correction */ |
| 30 | }; | 35 | }; |
| 36 | #endif | ||
| 31 | 37 | ||
| 32 | void gettimeofday (struct timeval *, struct timezone *); | 38 | void gettimeofday (struct timeval *, struct timezone *); |
| 33 | 39 | ||
diff --git a/nt/inc/sys/wait.h b/nt/inc/sys/wait.h index 8d890c9e175..d192453ff57 100644 --- a/nt/inc/sys/wait.h +++ b/nt/inc/sys/wait.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* A limited emulation of sys/wait.h on Posix systems. | 1 | /* A limited emulation of sys/wait.h on Posix systems. |
| 2 | 2 | ||
| 3 | Copyright (C) 2012 Free Software Foundation, Inc. | 3 | Copyright (C) 2012-2013 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
diff --git a/nt/inc/unistd.h b/nt/inc/unistd.h index b75e7d7d6bf..8ad8cf213b1 100644 --- a/nt/inc/unistd.h +++ b/nt/inc/unistd.h | |||
| @@ -15,6 +15,7 @@ | |||
| 15 | and whose prototypes are usually found in unistd.h on POSIX | 15 | and whose prototypes are usually found in unistd.h on POSIX |
| 16 | platforms. */ | 16 | platforms. */ |
| 17 | extern ssize_t readlink (const char *, char *, size_t); | 17 | extern ssize_t readlink (const char *, char *, size_t); |
| 18 | extern ssize_t readlinkat (int, const char *, char *, size_t); | ||
| 18 | extern int symlink (char const *, char const *); | 19 | extern int symlink (char const *, char const *); |
| 19 | extern int setpgid (pid_t, pid_t); | 20 | extern int setpgid (pid_t, pid_t); |
| 20 | extern pid_t getpgrp (void); | 21 | extern pid_t getpgrp (void); |
| @@ -29,6 +30,11 @@ extern int faccessat (int, char const *, int, int); | |||
| 29 | #define AT_EACCESS 4 | 30 | #define AT_EACCESS 4 |
| 30 | #define AT_SYMLINK_NOFOLLOW 4096 | 31 | #define AT_SYMLINK_NOFOLLOW 4096 |
| 31 | 32 | ||
| 33 | #define O_IGNORE_CTTY 0 | ||
| 32 | #define O_NOCTTY 0 | 34 | #define O_NOCTTY 0 |
| 35 | #define O_NOFOLLOW 0 | ||
| 36 | |||
| 37 | /* This is normally on stdlib.h, but we don't override that header. */ | ||
| 38 | extern int unsetenv (const char *); | ||
| 33 | 39 | ||
| 34 | #endif /* _UNISTD_H */ | 40 | #endif /* _UNISTD_H */ |