diff options
| author | Kenichi Handa | 2012-11-23 23:36:24 +0900 |
|---|---|---|
| committer | Kenichi Handa | 2012-11-23 23:36:24 +0900 |
| commit | 2aaec2d9be5cec44ea3b59cba476fd3e091f2fc9 (patch) | |
| tree | 3711b97807201b7eeaa066003b1c3a4ce929e5bb /nt | |
| parent | e1d276cbf9e18f13101328f56bed1a1c0a66e63a (diff) | |
| parent | e7d0e5ee247a155a268ffbf80bedbe25e15b5032 (diff) | |
| download | emacs-2aaec2d9be5cec44ea3b59cba476fd3e091f2fc9.tar.gz emacs-2aaec2d9be5cec44ea3b59cba476fd3e091f2fc9.zip | |
Diffstat (limited to 'nt')
| -rw-r--r-- | nt/ChangeLog | 31 | ||||
| -rw-r--r-- | nt/config.nt | 6 | ||||
| -rw-r--r-- | nt/gmake.defs | 8 | ||||
| -rw-r--r-- | nt/inc/dirent.h | 38 | ||||
| -rw-r--r-- | nt/inc/stdint.h | 3 | ||||
| -rw-r--r-- | nt/inc/sys/dir.h | 6 | ||||
| -rw-r--r-- | nt/inc/unistd.h | 11 | ||||
| -rw-r--r-- | nt/nmake.defs | 3 |
8 files changed, 82 insertions, 24 deletions
diff --git a/nt/ChangeLog b/nt/ChangeLog index 95203b9d2fa..ae6cb231614 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog | |||
| @@ -1,3 +1,34 @@ | |||
| 1 | 2012-11-23 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * gmake.defs (SWITCHCHAR): Define to // under MSYS, / otherwise. | ||
| 4 | (Bug#12955) | ||
| 5 | |||
| 6 | * nmake.defs (SWITCHCHAR): Define to /. | ||
| 7 | |||
| 8 | 2012-11-23 Paul Eggert <eggert@cs.ucla.edu> | ||
| 9 | |||
| 10 | Assume POSIX 1003.1-1988 or later for dirent.h (Bug#12958). | ||
| 11 | * inc/dirent.h: Rename from ../src/ndir.h, with these changes: | ||
| 12 | (struct dirent): Rename from struct direct. All uses changed. | ||
| 13 | * inc/sys/dir.h: Remove. | ||
| 14 | |||
| 15 | 2012-11-21 Paul Eggert <eggert@cs.ucla.edu> | ||
| 16 | |||
| 17 | Assume POSIX 1003.1-1988 or later for unistd.h (Bug#12945). | ||
| 18 | * config.nt (HAVE_GETCWD): Remove. | ||
| 19 | |||
| 20 | 2012-11-21 Eli Zaretskii <eliz@gnu.org> | ||
| 21 | |||
| 22 | * nmake.defs: Use !if, not !ifdef. For the details, see | ||
| 23 | http://lists.gnu.org/archive/html/help-emacs-windows/2012-11/msg00027.html | ||
| 24 | |||
| 25 | * inc/stdint.h (INTPTR_MIN): | ||
| 26 | (PTRDIFF_MIN) [!__GNUC__]: Define for MSVC. | ||
| 27 | |||
| 28 | 2012-11-18 Eli Zaretskii <eliz@gnu.org> | ||
| 29 | |||
| 30 | * inc/unistd.h: Don't include fcntl.h and don't define O_RDWR. | ||
| 31 | |||
| 1 | 2012-11-17 Juanma Barranquero <lekktu@gmail.com> | 32 | 2012-11-17 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 33 | ||
| 3 | * config.nt: Sync with autogen/config.in. | 34 | * config.nt: Sync with autogen/config.in. |
diff --git a/nt/config.nt b/nt/config.nt index 57c18ad2789..1adcbca89be 100644 --- a/nt/config.nt +++ b/nt/config.nt | |||
| @@ -411,12 +411,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 411 | /* Define to 1 if you have the `getaddrinfo' function. */ | 411 | /* Define to 1 if you have the `getaddrinfo' function. */ |
| 412 | #undef HAVE_GETADDRINFO | 412 | #undef HAVE_GETADDRINFO |
| 413 | 413 | ||
| 414 | /* Define to 1 if you have the `getcwd' function. | ||
| 415 | If you think about defining HAVE_GETCWD, don't: the alternative | ||
| 416 | getwd is redefined on w32.c, and does not really return the current | ||
| 417 | directory, to get the desired results elsewhere in Emacs. */ | ||
| 418 | #undef HAVE_GETCWD | ||
| 419 | |||
| 420 | /* Define to 1 if you have the `getdelim' function. */ | 414 | /* Define to 1 if you have the `getdelim' function. */ |
| 421 | #undef HAVE_GETDELIM | 415 | #undef HAVE_GETDELIM |
| 422 | 416 | ||
diff --git a/nt/gmake.defs b/nt/gmake.defs index 358c262db28..3d545fab975 100644 --- a/nt/gmake.defs +++ b/nt/gmake.defs | |||
| @@ -69,10 +69,18 @@ sh_output := $(shell echo) | |||
| 69 | ifeq "$(findstring ECHO, $(sh_output))" "ECHO" | 69 | ifeq "$(findstring ECHO, $(sh_output))" "ECHO" |
| 70 | THE_SHELL = $(COMSPEC)$(ComSpec) | 70 | THE_SHELL = $(COMSPEC)$(ComSpec) |
| 71 | SHELLTYPE=CMD | 71 | SHELLTYPE=CMD |
| 72 | SWITCHCHAR=/ | ||
| 72 | else | 73 | else |
| 73 | USING_SH = 1 | 74 | USING_SH = 1 |
| 74 | THE_SHELL = $(SHELL) | 75 | THE_SHELL = $(SHELL) |
| 75 | SHELLTYPE=SH | 76 | SHELLTYPE=SH |
| 77 | # MSYS needs to double the slash in cmd-style switches to avoid | ||
| 78 | # interpreting /x as a Posix style file name reference | ||
| 79 | ifneq ($(MSYSTEM),) | ||
| 80 | SWITCHCHAR=// | ||
| 81 | else | ||
| 82 | SWITCHCHAR=/ | ||
| 83 | endif | ||
| 76 | endif | 84 | endif |
| 77 | 85 | ||
| 78 | MAKETYPE=gmake | 86 | MAKETYPE=gmake |
diff --git a/nt/inc/dirent.h b/nt/inc/dirent.h new file mode 100644 index 00000000000..618f3beddf0 --- /dev/null +++ b/nt/inc/dirent.h | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | /* | ||
| 2 | <dirent.h> -- definitions for POSIX-compatible directory access | ||
| 3 | |||
| 4 | * The code here is forced by the interface, and is not subject to | ||
| 5 | * copyright, constituting the only possible expression of the | ||
| 6 | * algorithm in this format. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #define DIRBLKSIZ 512 /* size of directory block */ | ||
| 10 | #ifdef WINDOWSNT | ||
| 11 | #define MAXNAMLEN 255 | ||
| 12 | #else /* not WINDOWSNT */ | ||
| 13 | #define MAXNAMLEN 15 /* maximum filename length */ | ||
| 14 | #endif /* not WINDOWSNT */ | ||
| 15 | /* NOTE: MAXNAMLEN must be one less than a multiple of 4 */ | ||
| 16 | |||
| 17 | struct dirent /* data from readdir() */ | ||
| 18 | { | ||
| 19 | long d_ino; /* inode number of entry */ | ||
| 20 | unsigned short d_reclen; /* length of this record */ | ||
| 21 | unsigned short d_namlen; /* length of string in d_name */ | ||
| 22 | char d_name[MAXNAMLEN+1]; /* name of file */ | ||
| 23 | }; | ||
| 24 | |||
| 25 | typedef struct | ||
| 26 | { | ||
| 27 | int dd_fd; /* file descriptor */ | ||
| 28 | int dd_loc; /* offset in block */ | ||
| 29 | int dd_size; /* amount of valid data */ | ||
| 30 | char dd_buf[DIRBLKSIZ]; /* directory block */ | ||
| 31 | } DIR; /* stream data from opendir() */ | ||
| 32 | |||
| 33 | extern DIR *opendir (char *); | ||
| 34 | extern struct dirent *readdir (DIR *); | ||
| 35 | extern void seekdir (DIR *, long); | ||
| 36 | extern void closedir (DIR *); | ||
| 37 | |||
| 38 | #define rewinddir( dirp ) seekdir( dirp, 0L ) | ||
diff --git a/nt/inc/stdint.h b/nt/inc/stdint.h index 5c53fa18b55..97c9bbdaee9 100644 --- a/nt/inc/stdint.h +++ b/nt/inc/stdint.h | |||
| @@ -37,6 +37,7 @@ typedef unsigned __int64 uint64_t; | |||
| 37 | #define INT64_MAX 9223372036854775807i64 | 37 | #define INT64_MAX 9223372036854775807i64 |
| 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 UINTMAX_MAX UINT64_MAX | 41 | #define UINTMAX_MAX UINT64_MAX |
| 41 | #define UINTMAX_MIN UINT64_MIN | 42 | #define UINTMAX_MIN UINT64_MIN |
| 42 | #define INTMAX_MAX INT64_MAX | 43 | #define INTMAX_MAX INT64_MAX |
| @@ -51,6 +52,7 @@ typedef unsigned int uint32_t; | |||
| 51 | #define INT32_MAX 2147483647 | 52 | #define INT32_MAX 2147483647 |
| 52 | #define INT32_MIN (~INT32_MAX) | 53 | #define INT32_MIN (~INT32_MAX) |
| 53 | #define INTPTR_MAX INT32_MAX | 54 | #define INTPTR_MAX INT32_MAX |
| 55 | #define INTPTR_MIN INT32_MIN | ||
| 54 | #define UINTMAX_MAX UINT32_MAX | 56 | #define UINTMAX_MAX UINT32_MAX |
| 55 | #define UINTMAX_MIN UINT32_MIN | 57 | #define UINTMAX_MIN UINT32_MIN |
| 56 | #define INTMAX_MAX INT32_MAX | 58 | #define INTMAX_MAX INT32_MAX |
| @@ -60,6 +62,7 @@ typedef unsigned int uint32_t; | |||
| 60 | #endif | 62 | #endif |
| 61 | 63 | ||
| 62 | #define PTRDIFF_MAX INTPTR_MAX | 64 | #define PTRDIFF_MAX INTPTR_MAX |
| 65 | #define PTRDIFF_MIN INTPTR_MIN | ||
| 63 | 66 | ||
| 64 | #endif /* !__GNUC__ */ | 67 | #endif /* !__GNUC__ */ |
| 65 | 68 | ||
diff --git a/nt/inc/sys/dir.h b/nt/inc/sys/dir.h deleted file mode 100644 index dc075cd7587..00000000000 --- a/nt/inc/sys/dir.h +++ /dev/null | |||
| @@ -1,6 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * map sys\dir.h to ..\..\..\src\ndir.h | ||
| 3 | */ | ||
| 4 | |||
| 5 | #include "..\..\..\src\ndir.h" | ||
| 6 | |||
diff --git a/nt/inc/unistd.h b/nt/inc/unistd.h index 0173fdbb943..e751ed124d3 100644 --- a/nt/inc/unistd.h +++ b/nt/inc/unistd.h | |||
| @@ -26,17 +26,6 @@ extern int faccessat (int, char const *, int, int); | |||
| 26 | #define AT_EACCESS 4 | 26 | #define AT_EACCESS 4 |
| 27 | #define AT_SYMLINK_NOFOLLOW 4096 | 27 | #define AT_SYMLINK_NOFOLLOW 4096 |
| 28 | 28 | ||
| 29 | /* Here are some more fcntl.h macros that default to gnulib-compatible | ||
| 30 | values. Include <fcntl.h> first, to make sure we don't override | ||
| 31 | its values if any. FIXME: If we know <fcntl.h> does not define | ||
| 32 | O_NOCTTY and O_RDWR, this can be replaced with a simple "#define | ||
| 33 | O_NOCTTY 0" and "#define O_RDWR 2". */ | ||
| 34 | #include <fcntl.h> | ||
| 35 | #ifndef O_NOCTTY | ||
| 36 | #define O_NOCTTY 0 | 29 | #define O_NOCTTY 0 |
| 37 | #endif | ||
| 38 | #ifndef O_RDWR | ||
| 39 | #define O_RDWR 2 | ||
| 40 | #endif | ||
| 41 | 30 | ||
| 42 | #endif /* _UNISTD_H */ | 31 | #endif /* _UNISTD_H */ |
diff --git a/nt/nmake.defs b/nt/nmake.defs index 48809afc771..2c6bc66b673 100644 --- a/nt/nmake.defs +++ b/nt/nmake.defs | |||
| @@ -22,6 +22,7 @@ all: | |||
| 22 | 22 | ||
| 23 | THE_SHELL = $(COMSPEC) | 23 | THE_SHELL = $(COMSPEC) |
| 24 | SHELLTYPE=CMD | 24 | SHELLTYPE=CMD |
| 25 | SWITCHCHAR=/ | ||
| 25 | 26 | ||
| 26 | MAKETYPE=nmake | 27 | MAKETYPE=nmake |
| 27 | 28 | ||
| @@ -116,7 +117,7 @@ RC_INCLUDE = -i | |||
| 116 | 117 | ||
| 117 | USE_CRT_DLL = 1 | 118 | USE_CRT_DLL = 1 |
| 118 | 119 | ||
| 119 | !ifdef USE_CRT_DLL | 120 | !if USE_CRT_DLL |
| 120 | libc = msvcrt$(D).lib | 121 | libc = msvcrt$(D).lib |
| 121 | EMACS_EXTRA_C_FLAGS= -D_DLL -D_MT -DUSE_CRT_DLL=1 | 122 | EMACS_EXTRA_C_FLAGS= -D_DLL -D_MT -DUSE_CRT_DLL=1 |
| 122 | !else | 123 | !else |