summaryrefslogtreecommitdiff
path: root/nt
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2012-12-17 07:56:22 -0700
committerTom Tromey <tromey@redhat.com>2012-12-17 07:56:22 -0700
commit3d6eced1ae51ffd0a782130e7c334052277e2724 (patch)
tree5d1d2ad7cd3374f922886c4a72062511a035c168 /nt
parentbf69f522a9e135f9aa483cedd53e71e915f2bf75 (diff)
parent7c3d167f48d6262ee4e5512aa50a07ee96bc1509 (diff)
downloademacs-3d6eced1ae51ffd0a782130e7c334052277e2724.tar.gz
merge from trunk
Diffstat (limited to 'nt')
-rw-r--r--nt/ChangeLog328
-rw-r--r--nt/addsection.c47
-rw-r--r--nt/config.nt221
-rwxr-xr-xnt/configure.bat9
-rw-r--r--nt/emacs-x64.manifest21
-rw-r--r--nt/emacs-x86.manifest (renamed from nt/emacs.manifest)0
-rw-r--r--nt/emacs.rc18
-rw-r--r--nt/emacsclient.rc8
-rw-r--r--nt/gmake.defs22
-rw-r--r--nt/inc/dirent.h38
-rw-r--r--nt/inc/grp.h5
-rw-r--r--nt/inc/ms-w32.h126
-rw-r--r--nt/inc/pwd.h7
-rw-r--r--nt/inc/stdint.h3
-rw-r--r--nt/inc/sys/dir.h6
-rw-r--r--nt/inc/sys/socket.h107
-rw-r--r--nt/inc/sys/stat.h4
-rw-r--r--nt/inc/sys/time.h15
-rw-r--r--nt/inc/sys/wait.h33
-rw-r--r--nt/inc/unistd.h26
-rw-r--r--nt/makefile.w32-in4
-rw-r--r--nt/nmake.defs55
-rw-r--r--nt/preprep.c79
-rw-r--r--nt/zipdist.bat11
24 files changed, 926 insertions, 267 deletions
diff --git a/nt/ChangeLog b/nt/ChangeLog
index 4ceb74ed0b5..bcd15422bdf 100644
--- a/nt/ChangeLog
+++ b/nt/ChangeLog
@@ -1,3 +1,327 @@
+2012-12-15 Eli Zaretskii <eliz@gnu.org>
+
+ * inc/ms-w32.h (sys_unlink): Provide prototype.
+
+2012-12-14 Eli Zaretskii <eliz@gnu.org>
+
+ * inc/sys/stat.h: Declare w32_stat_get_owner_group.
+
+2012-12-13 Juanma Barranquero <lekktu@gmail.com>
+
+ * config.nt: Sync with autogen/config.in.
+ (HAVE_INOTIFY, HAVE_SYS_INOTIFY_H): New macros.
+
+2012-12-11 Juanma Barranquero <lekktu@gmail.com>
+
+ * config.nt: Sync with autogen/config.in.
+ (HAVE_DECL_UNSETENV, HAVE_SIG2STR, VOID_UNSETENV): New macros.
+ (ULIMIT_BREAK_VALUE): Remove.
+
+2012-12-10 Daniel Colascione <dancol@dancol.org>
+
+ * emacs.rc: Use forward slashes in relative paths in order to
+ avoid complaints from Cygwin. (Forward slashes work perfectly
+ well in the NT build.)
+
+2012-12-09 Eli Zaretskii <eliz@gnu.org>
+
+ * inc/unistd.h (unsetenv): Provide a prototype.
+
+2012-12-08 Eli Zaretskii <eliz@gnu.org>
+
+ * inc/ms-w32.h (putenv): Redirect to sys_putenv.
+ (sys_putenv): Add prototype.
+
+ * config.nt (HAVE_UNSETENV): Define to 1.
+
+2012-12-01 Juanma Barranquero <lekktu@gmail.com>
+
+ * config.nt: Sync with autogen/config.in.
+
+2012-11-24 Ken Brown <kbrown@cornell.edu>
+
+ * config.nt (HAVE_MOUSE): Remove.
+
+2012-11-23 Juanma Barranquero <lekktu@gmail.com>
+
+ * config.nt: Sync with autogen/config.in.
+ (BROKEN_GETWD, HAVE_CLOSEDIR, HAVE_DIRENT_H, HAVE_FCNTL_H, HAVE_GETWD):
+ Remove.
+
+2012-11-23 Eli Zaretskii <eliz@gnu.org>
+
+ * gmake.defs (SWITCHCHAR): Define to // under MSYS, / otherwise.
+ (Bug#12955)
+
+ * nmake.defs (SWITCHCHAR): Define to /.
+
+2012-11-23 Paul Eggert <eggert@cs.ucla.edu>
+
+ Assume POSIX 1003.1-1988 or later for dirent.h (Bug#12958).
+ * inc/dirent.h: Rename from ../src/ndir.h, with these changes:
+ (struct dirent): Rename from struct direct. All uses changed.
+ * inc/sys/dir.h: Remove.
+
+2012-11-21 Paul Eggert <eggert@cs.ucla.edu>
+
+ Assume POSIX 1003.1-1988 or later for unistd.h (Bug#12945).
+ * config.nt (HAVE_GETCWD): Remove.
+
+2012-11-21 Eli Zaretskii <eliz@gnu.org>
+
+ * nmake.defs: Use !if, not !ifdef. For the details, see
+ http://lists.gnu.org/archive/html/help-emacs-windows/2012-11/msg00027.html
+
+ * inc/stdint.h (INTPTR_MIN):
+ (PTRDIFF_MIN) [!__GNUC__]: Define for MSVC.
+
+2012-11-18 Eli Zaretskii <eliz@gnu.org>
+
+ * inc/unistd.h: Don't include fcntl.h and don't define O_RDWR.
+
+2012-11-17 Juanma Barranquero <lekktu@gmail.com>
+
+ * config.nt: Sync with autogen/config.in.
+ (HAVE_FPATHCONF): Remove.
+
+2012-11-17 Paul Eggert <eggert@cs.ucla.edu>
+
+ Assume POSIX 1003.1-1988 or later for fcntl.h (Bug#12881).
+ * inc/sys/socket.h (O_NONBLOCK): Rename from O_NDELAY, since the
+ POSIX name for this flag is O_NONBLOCK. All uses changed.
+ * inc/unistd.h (O_RDWR, O_NOCTTY): New macros. Like AT_FDCWD etc.
+ these really should be moved to a replacement <fcntl.h> if and
+ when that gets implemented. In the meantime, include <fcntl.h>
+ to make sure we don't override its definitions.
+
+2012-11-17 Eli Zaretskii <eliz@gnu.org>
+
+ * inc/sys/wait.h: New file, with prototype of waitpid and
+ definitions of macros it needs.
+
+ * inc/ms-w32.h (wait): Don't define, 'wait' is not used anymore.
+ (sys_wait): Remove prototype.
+
+ * config.nt (HAVE_SYS_WAIT_H): Define to 1.
+
+2012-11-17 Dani Moncayo <dmoncayo@gmail.com>
+
+ * zipdist.bat (ZIP_CHECK): Remove unused label. When invoking 7z
+ to check if it's installed, redirect standard output and standard
+ error to the null device.
+ (ZIP_DIST): Don't build the "barebin" distribution.
+
+2012-11-15 Juanma Barranquero <lekktu@gmail.com>
+
+ * config.nt: Sync with autogen/config.in.
+ (GETGROUPS_T, GETGROUPS_ZERO_BUG, GNULIB_FACCESSAT, HAVE_ACCESS)
+ (HAVE_EACCESS, HAVE_FACCESSAT, HAVE_GETGROUPS, HAVE_LIBGEN_H):
+ New macros.
+
+2012-11-14 Eli Zaretskii <eliz@gnu.org>
+
+ * inc/unistd.h (faccessat): Add prototype.
+ (AT_FDCWD, AT_EACCESS, AT_SYMLINK_NOFOLLOW): New macros; the first
+ 2 moved from ms-w32.h.
+
+ * inc/ms-w32.h (AT_FDCWD, AT_EACCESS, faccessat): Remove macros.
+
+2012-11-14 Paul Eggert <eggert@cs.ucla.edu>
+
+ Use faccessat, not access, when checking file permissions (Bug#12632).
+ * inc/ms-w32.h (AT_FDCWD, AT_EACCESS): New symbols.
+ (access): Remove.
+ (faccessat): New macro.
+
+2012-11-05 Eli Zaretskii <eliz@gnu.org>
+
+ * inc/unistd.h (tcgetpgrp, setsid): Provide prototypes.
+
+2012-11-05 Juanma Barranquero <lekktu@gmail.com>
+
+ * config.nt: Sync with autogen/config.in.
+ (DISPNEW_NEEDS_STDIO_EXT, GETPGRP_VOID, HAVE_SETPGID, HAVE_SETSID)
+ (PENDING_OUTPUT_COUNT, SETPGRP_RELEASES_CTTY): Remove.
+
+2012-11-04 Juanma Barranquero <lekktu@gmail.com>
+
+ * config.nt: Sync with autogen/config.in.
+ (GNULIB_CLOSE_STREAM, HAVE_DECL___FPENDING): New macros.
+
+2012-11-03 Eli Zaretskii <eliz@gnu.org>
+
+ * config.nt (PENDING_OUTPUT_N_BYTES): Define.
+
+2012-11-01 Eli Zaretskii <eliz@gnu.org>
+
+ * inc/unistd.h (setpgid, getpgrp): Provide prototypes. (Bug#12776)
+
+ * config.nt (GETPGRP_VOID): Define to 1.
+
+2012-10-24 Juanma Barranquero <lekktu@gmail.com>
+
+ * config.nt: Sync with autogen/config.in.
+
+2012-10-17 Eli Zaretskii <eliz@gnu.org>
+
+ * inc/pwd.h (getuid, geteuid): Add prototypes.
+
+ * inc/ms-w32.h (sys_wait, _getpid, gmtgime_r, localtime_r)
+ (signal_handler, sys_signal, sigemptyset, sigfillset, sigprocmask)
+ (pthread_sigmask, sigismember, setpgrp, sigaction, alarm)
+ (sys_kill, getpagesize): Add prototypes for emulated functions.
+
+ * inc/grp.h (getgid, getegid): Add prototypes.
+
+ * gmake.defs (DEBUG_CFLAGS) [NOOPT]: Add -std=gnu99.
+
+ * configure.bat (chkapiN): Avoid compiler warning in junk.c when
+ compiling with -std=gnu99.
+
+ * config.nt (CHECK_LISP_OBJECT_TYPE): Don't undef, so that it
+ could be used via --cflags switch to configure.bat.
+
+2012-10-08 Juanma Barranquero <lekktu@gmail.com>
+
+ * config.nt: Sync with autogen/config.in.
+ (HAVE_NTGUI): New macro.
+
+2012-10-02 Eli Zaretskii <eliz@gnu.org>
+
+ * preprep.c (RVA_TO_PTR): Cast the result to 'void *', to avoid
+ compiler warnings when using the value.
+
+2012-10-01 Eli Zaretskii <eliz@gnu.org>
+
+ * preprep.c (RVA_TO_PTR): Use 'unsigned char *' instead of
+ 'void *', for pointer arithmetics.
+ (OFFSET_TO_RVA, RVA_TO_OFFSET, RVA_TO_SECTION_OFFSET): Enclose all
+ macro arguments in parentheses.
+
+2012-09-30 Eli Zaretskii <eliz@gnu.org>
+
+ * makefile.w32-in ($(TRES)): Use $(EMACS_MANIFEST).
+
+2012-09-30 Fabrice Popineau <fabrice.popineau@supelec.fr>
+
+ * inc/sys/socket.h: Don't map Winsock error codes to standard ones
+ that are already defined.
+
+ * inc/ms-w32.h (EMACS_INT, EMACS_UINT, EMACS_INT_MAX, PRIuMAX)
+ (pI, _INTPTR) [_MSC_VER]: Fix definitions for MSVC.
+ [_MSC_VER]: Add pragmas to suppress some MSVC warnings.
+
+ * preprep.c (pfnCheckSumMappedFile, rva_to_section)
+ (offset_to_section, relocate_offset, OFFSET_TO_RVA)
+ (RVA_TO_OFFSET, RVA_TO_SECTION_OFFSET, PTR_TO_RVA)
+ (OFFSET_TO_PTR, ROUND_UP, ROUND_DOWN)
+ (copy_executable_and_move_sections, ADJUST_IMPORT_RVA, main):
+ Use DWORD_PTR instead of DWORD for compatibility with x64.
+
+ * nmake.defs: Support AMD64.
+ (EMACS_HEAPSIZE, EMACS_PURESIZE, EMACS_MANIFEST): New macros.
+
+ * gmake.defs (EMACS_HEAPSIZE, EMACS_PURESIZE, EMACS_MANIFEST):
+ New macros.
+
+ * addsection.c (pfnCheckSumMappedFile, rva_to_section)
+ (offset_to_section, relocate_offset, OFFSET_TO_RVA)
+ (RVA_TO_OFFSET, RVA_TO_SECTION_OFFSET, PTR_TO_RVA)
+ (OFFSET_TO_PTR, ROUND_UP, ROUND_DOWN)
+ (copy_executable_and_add_section, main): Use DWORD_PTR instead of
+ DWORD, for compatibility with x64.
+
+ * emacs-x64.manifest: New file.
+
+ * emacs-x86.manifest: Renamed from emacs.manifest.
+
+2012-09-30 Eli Zaretskii <eliz@gnu.org>
+
+ * inc/sys/time.h (ITIMER_REAL, ITIMER_PROF): Define.
+ (struct itimerval): Define.
+ (getitimer, setitimer): Add prototypes.
+
+ * inc/ms-w32.h <sigset_t> [_MSVC_VER]: Make the typedef consistent
+ with MinGW.
+ (SA_RESTART, SIGPROF): Define.
+
+ * config.nt (HAVE_SETITIMER): Define to 1.
+
+2012-09-30 Juanma Barranquero <lekktu@gmail.com>
+
+ * config.nt: Sync with autogen/config.in.
+
+2012-09-29 Juanma Barranquero <lekktu@gmail.com>
+
+ * config.nt: Sync with autogen/config.in.
+ (HAVE_TIMER_SETTIME): New macro.
+
+2012-09-23 Eli Zaretskii <eliz@gnu.org>
+
+ * inc/ms-w32.h (emacs_raise): Redefine to invoke emacs_abort.
+
+2012-09-23 Paul Eggert <eggert@cs.ucla.edu>
+
+ Simplify and avoid signal-handling races (Bug#12471).
+ * inc/ms-w32.h (emacs_raise): New macro.
+
+2012-09-18 Eli Zaretskii <eliz@gnu.org>
+
+ * configure.bat: Include stddef.h before gif_lib.h, to have size_t
+ defined, as needed by giflib-5.0.0. (Bug#12464)
+
+2012-09-17 Juanma Barranquero <lekktu@gmail.com>
+
+ * config.nt: Sync with autogen/config.in.
+ (BROKEN_SA_RESTART, SYNC_INPUT): Remove.
+
+2012-09-17 Glenn Morris <rgm@gnu.org>
+
+ * config.nt (COPYRIGHT): New.
+
+2012-09-15 Paul Eggert <eggert@cs.ucla.edu>
+
+ Port _setjmp fix to POSIXish hosts as well as Microsoft.
+ * config.nt: Attempt to sync with autogen/config.in.
+ (HAVE_SIGSETJMP, HAVE__SETJMP): New macros.
+ (_longjmp, _setjmp): Remove.
+
+2012-09-14 Juanma Barranquero <lekktu@gmail.com>
+
+ * config.nt: Sync with autogen/config.in.
+ (BROKEN_FIONREAD, BROKEN_SIGAIO, BROKEN_SIGIO, BROKEN_SIGPOLL)
+ (BROKEN_SIGPTY, HAVE_CBRT, HAVE_LOGB, NO_TERMIO): Remove.
+ (USABLE_FIONREAD, USABLE_SIGIO): New macros.
+
+2012-09-10 Juanma Barranquero <lekktu@gmail.com>
+
+ * config.nt: Sync with autogen/config.in.
+ (FLOAT_CHECK_DOMAIN, HAVE_FMOD, HAVE_FREXP)
+ (HAVE_INVERSE_HYPERBOLIC, NO_MATHERR): Remove.
+
+2012-09-08 Eli Zaretskii <eliz@gnu.org>
+
+ * configure.bat <use_extensions>: Don't leave it set in the
+ environment when the script exits.
+
+2012-09-07 Juanma Barranquero <lekktu@gmail.com>
+
+ * config.nt: Sync with autogen/config.in.
+ (NO_ABORT, SIGNAL_H_AHB): Remove.
+
+2012-09-07 Eli Zaretskii <eliz@gnu.org>
+
+ * inc/ms-w32.h (struct sigaction): Declare sa_handler __cdecl.
+
+2012-09-05 Juanma Barranquero <lekktu@gmail.com>
+
+ * config.nt: Sync with autogen/config.in.
+
+2012-09-04 Paul Eggert <eggert@cs.ucla.edu>
+
+ Simplify redefinition of 'abort' (Bug#12316).
+ * inc/ms-w32.h (w32_abort) [HAVE_NTGUI]: Remove.
+
2012-09-02 Juanma Barranquero <lekktu@gmail.com>
* config.nt: Sync with autogen/config.in.
@@ -337,7 +661,7 @@
2012-02-05 Christoph Scholtes <cschol2112@googlemail.com>
- * README.W32: Clarification for inclusion in source tarball. (Bug#9750)
+ * README.W32: Clarification for inclusion in source tarball (bug#9750).
* gmake.defs (PRAGMA_SYSTEM_HEADER): Add for GCC.
@@ -346,7 +670,7 @@
* makefile.w32-in (maybe-copy-distfiles)
(maybe-copy-distfiles-CMD, maybe-copy-distfiles-SH)
(create-tmp-dist-dir): Add to make --distfiles optional.
- (dist): Use create-tmp-dist-dir and maybe-copy-distfiles. (Bug#10261)
+ (dist): Use create-tmp-dist-dir and maybe-copy-distfiles (bug#10261).
2012-02-04 Eli Zaretskii <eliz@gnu.org>
diff --git a/nt/addsection.c b/nt/addsection.c
index ac3dd913f17..d720dec428f 100644
--- a/nt/addsection.c
+++ b/nt/addsection.c
@@ -35,10 +35,10 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
in \\win32sdk\mstools\samples\image\include\imagehlp.h. */
PIMAGE_NT_HEADERS
-(__stdcall * pfnCheckSumMappedFile) (LPVOID BaseAddress,
- DWORD FileLength,
- LPDWORD HeaderSum,
- LPDWORD CheckSum);
+(__stdcall * pfnCheckSumMappedFile) (PVOID BaseAddress,
+ DWORD_PTR FileLength,
+ PDWORD_PTR HeaderSum,
+ PDWORD_PTR CheckSum);
#undef min
#undef max
@@ -164,7 +164,7 @@ find_section (const char *name, IMAGE_NT_HEADERS *nt_header)
/* Return pointer to section header for section containing the given
relative virtual address. */
IMAGE_SECTION_HEADER *
-rva_to_section (DWORD rva, IMAGE_NT_HEADERS * nt_header)
+rva_to_section (DWORD_PTR rva, IMAGE_NT_HEADERS * nt_header)
{
PIMAGE_SECTION_HEADER section;
int i;
@@ -179,7 +179,7 @@ rva_to_section (DWORD rva, IMAGE_NT_HEADERS * nt_header)
some very old exes (eg. gzip dated Dec 1993). Since
w32_executable_type relies on this function to work reliably,
we need to cope with this. */
- DWORD real_size = max (section->SizeOfRawData,
+ DWORD_PTR real_size = max (section->SizeOfRawData,
section->Misc.VirtualSize);
if (rva >= section->VirtualAddress
&& rva < section->VirtualAddress + real_size)
@@ -192,7 +192,7 @@ rva_to_section (DWORD rva, IMAGE_NT_HEADERS * nt_header)
/* Return pointer to section header for section containing the given
offset in its raw data area. */
IMAGE_SECTION_HEADER *
-offset_to_section (DWORD offset, IMAGE_NT_HEADERS * nt_header)
+offset_to_section (DWORD_PTR offset, IMAGE_NT_HEADERS * nt_header)
{
PIMAGE_SECTION_HEADER section;
int i;
@@ -212,8 +212,8 @@ offset_to_section (DWORD offset, IMAGE_NT_HEADERS * nt_header)
/* Return offset to an object in dst, given offset in src. We assume
there is at least one section in both src and dst images, and that
the some sections may have been added to dst (after sections in src). */
-static DWORD
-relocate_offset (DWORD offset,
+static DWORD_PTR
+relocate_offset (DWORD_PTR offset,
IMAGE_NT_HEADERS * src_nt_header,
IMAGE_NT_HEADERS * dst_nt_header)
{
@@ -247,32 +247,33 @@ relocate_offset (DWORD offset,
}
#define OFFSET_TO_RVA(offset, section) \
- (section->VirtualAddress + ((DWORD)(offset) - section->PointerToRawData))
+ (section->VirtualAddress + ((DWORD_PTR)(offset) - section->PointerToRawData))
#define RVA_TO_OFFSET(rva, section) \
- (section->PointerToRawData + ((DWORD)(rva) - section->VirtualAddress))
+ (section->PointerToRawData + ((DWORD_PTR)(rva) - section->VirtualAddress))
#define RVA_TO_SECTION_OFFSET(rva, section) \
- ((DWORD)(rva) - section->VirtualAddress)
+ ((DWORD_PTR)(rva) - section->VirtualAddress)
/* Convert address in executing image to RVA. */
-#define PTR_TO_RVA(ptr) ((DWORD)(ptr) - (DWORD) GetModuleHandle (NULL))
+#define PTR_TO_RVA(ptr) ((DWORD_PTR)(ptr) - (DWORD_PTR) GetModuleHandle (NULL))
#define PTR_TO_OFFSET(ptr, pfile_data) \
((unsigned const char *)(ptr) - (pfile_data)->file_base)
#define OFFSET_TO_PTR(offset, pfile_data) \
- ((pfile_data)->file_base + (DWORD)(offset))
+ ((pfile_data)->file_base + (DWORD_PTR)(offset))
-#define ROUND_UP(p, align) (((DWORD)(p) + (align)-1) & ~((align)-1))
-#define ROUND_DOWN(p, align) ((DWORD)(p) & ~((align)-1))
+#define ROUND_UP(p, align) \
+ (((DWORD_PTR)(p) + (align)-1) & ~((DWORD_PTR)(align)-1))
+#define ROUND_DOWN(p, align) ((DWORD_PTR)(p) & ~((DWORD_PTR)(align)-1))
static void
copy_executable_and_add_section (file_data *p_infile,
file_data *p_outfile,
const char *new_section_name,
- DWORD new_section_size)
+ DWORD_PTR new_section_size)
{
unsigned char *dst;
PIMAGE_DOS_HEADER dos_header;
@@ -280,7 +281,7 @@ copy_executable_and_add_section (file_data *p_infile,
PIMAGE_NT_HEADERS dst_nt_header;
PIMAGE_SECTION_HEADER section;
PIMAGE_SECTION_HEADER dst_section;
- DWORD offset;
+ DWORD_PTR offset;
int i;
int be_verbose = GetEnvironmentVariable ("DEBUG_DUMP", NULL, 0) > 0;
@@ -317,17 +318,17 @@ copy_executable_and_add_section (file_data *p_infile,
Note that dst is updated implicitly by each COPY_CHUNK. */
dos_header = (PIMAGE_DOS_HEADER) p_infile->file_base;
- nt_header = (PIMAGE_NT_HEADERS) (((unsigned long) dos_header) +
+ nt_header = (PIMAGE_NT_HEADERS) (((unsigned char *) dos_header) +
dos_header->e_lfanew);
section = IMAGE_FIRST_SECTION (nt_header);
dst = (unsigned char *) p_outfile->file_base;
COPY_CHUNK ("Copying DOS header...", dos_header,
- (DWORD) nt_header - (DWORD) dos_header, be_verbose);
+ (DWORD_PTR) nt_header - (DWORD_PTR) dos_header, be_verbose);
dst_nt_header = (PIMAGE_NT_HEADERS) dst;
COPY_CHUNK ("Copying NT header...", nt_header,
- (DWORD) section - (DWORD) nt_header, be_verbose);
+ (DWORD_PTR) section - (DWORD_PTR) nt_header, be_verbose);
dst_section = (PIMAGE_SECTION_HEADER) dst;
COPY_CHUNK ("Copying section table...", section,
nt_header->FileHeader.NumberOfSections * sizeof (*section),
@@ -509,8 +510,8 @@ main (int argc, char **argv)
/* Patch up header fields; profiler is picky about this. */
{
HANDLE hImagehelp = LoadLibrary ("imagehlp.dll");
- DWORD headersum;
- DWORD checksum;
+ DWORD_PTR headersum;
+ DWORD_PTR checksum;
dos_header = (PIMAGE_DOS_HEADER) out_file.file_base;
nt_header = (PIMAGE_NT_HEADERS) ((char *) dos_header + dos_header->e_lfanew);
diff --git a/nt/config.nt b/nt/config.nt
index 7658275f2d6..db26bf6cbae 100644
--- a/nt/config.nt
+++ b/nt/config.nt
@@ -54,33 +54,12 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define to the number of bits in type 'wint_t'. */
#undef BITSIZEOF_WINT_T
-/* Define if FIONREAD should not be used. */
-#undef BROKEN_FIONREAD
-
-/* Define if getwd should not be used. */
-#undef BROKEN_GETWD
-
/* Define if get_current_dir_name should not be used. */
#undef BROKEN_GET_CURRENT_DIR_NAME
/* Define on FreeBSD to work around an issue when reading from a PTY. */
#undef BROKEN_PTY_READ_AFTER_EAGAIN
-/* Define if SA_RESTART should only be used in batch mode. */
-#undef BROKEN_SA_RESTART
-
-/* Define if SIGAIO should not be used. */
-#undef BROKEN_SIGAIO
-
-/* Define if SIGIO should not be used. */
-#undef BROKEN_SIGIO
-
-/* Define if SIGPOLL should not be used. */
-#undef BROKEN_SIGPOLL
-
-/* Define if SIGPTY should not be used. */
-#undef BROKEN_SIGPTY
-
/* Define if the system is compatible with BSD 4.2. */
#undef BSD4_2
@@ -94,13 +73,16 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#undef CANNOT_DUMP
/* Define this to enable compile time checks for the Lisp_Object data type. */
-#undef CHECK_LISP_OBJECT_TYPE
+/* #undef CHECK_LISP_OBJECT_TYPE */
/* Define if you want lock files to be written, so that Emacs can tell
instantly when you try to modify a file that someone else has modified in
his/her Emacs. */
#undef CLASH_DETECTION
+/* Short copyright string for this version of Emacs. */
+#define COPYRIGHT "Copyright (C) 2012 Free Software Foundation, Inc."
+
/* Define to one of '_getb67', 'GETB67', 'getb67' for Cray-2 and Cray-YMP
systems. This function is required for 'alloca.c' support on those systems.
*/
@@ -133,9 +115,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Character that separates directories in a file name. */
#define DIRECTORY_SEP '/'
-/* Define if dispnew.c should include stdio_ext.h. */
-#undef DISPNEW_NEEDS_STDIO_EXT
-
/* Define if process.c does not need to close a pty to make it a controlling
terminal (it is already a controlling terminal of the subprocess, because
we did ioctl TIOCSCTTY). */
@@ -161,9 +140,12 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
*/
#define FIRST_PTY_LETTER 'a'
-/* Define if the float library doesn't handle errors by either setting errno,
- or signaling SIGFPE/SIGILL. */
-#undef FLOAT_CHECK_DOMAIN
+/* Enable compile-time and run-time bounds-checking, and some warnings,
+ without upsetting glibc 2.15+. */
+ #if !defined _FORTIFY_SOURCE && defined __OPTIMIZE__ && __OPTIMIZE__
+ # define _FORTIFY_SOURCE 2
+ #endif
+
/* Define to 1 if futimesat mishandles a NULL file name. */
#undef FUTIMESAT_NULL_BUG
@@ -195,8 +177,13 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
setjmp does work. */
#define GC_SETJMP_WORKS 1
-/* Define to 1 if the `getpgrp' function requires zero arguments. */
-#undef GETPGRP_VOID
+/* Define to the type of elements in the array set by `getgroups'. Usually
+ this is either `int' or `gid_t'. */
+#undef GETGROUPS_T
+
+/* Define this to 1 if getgroups(0,NULL) does not return the number of groups.
+ */
+#undef GETGROUPS_ZERO_BUG
/* Define if gettimeofday clobbers the localtime buffer. */
#undef GETTIMEOFDAY_CLOBBERS_LOCALTIME
@@ -209,6 +196,14 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* #undef GLYPH_DEBUG */
/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
+ whether the gnulib module close-stream shall be considered present. */
+#undef GNULIB_CLOSE_STREAM
+
+/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
+ whether the gnulib module faccessat shall be considered present. */
+#undef GNULIB_FACCESSAT
+
+/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
whether the gnulib module fscanf shall be considered present. */
#undef GNULIB_FSCANF
@@ -229,6 +224,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
startup, if using GTK. */
#undef G_SLICE_ALWAYS_MALLOC
+/* Define to 1 if you have the `access' function. */
+#undef HAVE_ACCESS
+
/* Define to 1 if the file /usr/lpp/X11/bin/smt.exp exists. */
#undef HAVE_AIX_SMT_EXP
@@ -249,9 +247,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define to 1 if strtold conforms to C99. */
#undef HAVE_C99_STRTOLD
-/* Define to 1 if you have the `cbrt' function. */
-#undef HAVE_CBRT
-
/* Define to 1 if you have the `cfmakeraw' function. */
#undef HAVE_CFMAKERAW
@@ -264,9 +259,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define to 1 if you have the `clock_settime' function. */
#undef HAVE_CLOCK_SETTIME
-/* Define to 1 if you have the `closedir' function. */
-#define HAVE_CLOSEDIR 1
-
/* Define to 1 if you have the <coff.h> header file. */
#undef HAVE_COFF_H
@@ -333,6 +325,14 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
*/
#define HAVE_DECL_TZNAME 1
+/* Define to 1 if you have the declaration of `unsetenv', and to 0 if you
+ don't. */
+#undef HAVE_DECL_UNSETENV
+
+/* Define to 1 if you have the declaration of `__fpending', and to 0 if you
+ don't. */
+#undef HAVE_DECL___FPENDING
+
/* Define to 1 if you have the declaration of `__sys_siglist', and to 0 if you
don't. */
#undef HAVE_DECL___SYS_SIGLIST
@@ -346,12 +346,12 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define to 1 if you have the `difftime' function. */
#undef HAVE_DIFFTIME
-/* Define to 1 if you have the <dirent.h> header file. */
-#undef HAVE_DIRENT_H
-
/* Define to 1 if you have the 'dup2' function. */
#define HAVE_DUP2 1
+/* Define to 1 if you have the `eaccess' function. */
+#undef HAVE_EACCESS
+
/* Define to 1 if you have the `endgrent' function. */
#undef HAVE_ENDGRENT
@@ -367,27 +367,18 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define to 1 if you have the <execinfo.h> header file. */
#define HAVE_EXECINFO_H 1
-/* Define to 1 if you have the <fcntl.h> header file. */
-#undef HAVE_FCNTL_H
-
-/* Define to 1 if you have the `fmod' function. */
-#define HAVE_FMOD 1
+/* Define to 1 if you have the `faccessat' function. */
+#undef HAVE_FACCESSAT
/* Define to 1 if you have the `fork' function. */
#undef HAVE_FORK
-/* Define to 1 if you have the `fpathconf' function. */
-#undef HAVE_FPATHCONF
-
/* Define to 1 if you have the `freeifaddrs' function. */
#undef HAVE_FREEIFADDRS
/* Define to 1 if using the freetype and fontconfig libraries. */
#undef HAVE_FREETYPE
-/* Define to 1 if you have the `frexp' function. */
-#define HAVE_FREXP 1
-
/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
#undef HAVE_FSEEKO
@@ -412,18 +403,15 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define to 1 if you have the `getaddrinfo' function. */
#undef HAVE_GETADDRINFO
-/* Define to 1 if you have the `getcwd' function.
- If you think about defining HAVE_GETCWD, don't: the alternative
- getwd is redefined on w32.c, and does not really return the current
- directory, to get the desired results elsewhere in Emacs. */
-#undef HAVE_GETCWD
-
/* Define to 1 if you have the `getdelim' function. */
#undef HAVE_GETDELIM
/* Define to 1 if you have the `getgrent' function. */
#undef HAVE_GETGRENT
+/* Define to 1 if your system has a working `getgroups' function. */
+#undef HAVE_GETGROUPS
+
/* Define to 1 if you have the `gethostname' function. */
#define HAVE_GETHOSTNAME 1
@@ -463,9 +451,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define to 1 if you have the `gettimeofday' function. */
#define HAVE_GETTIMEOFDAY 1
-/* Define to 1 if you have the `getwd' function. */
-#undef HAVE_GETWD
-
/* Define to 1 if you have the `get_current_dir_name' function. */
#undef HAVE_GET_CURRENT_DIR_NAME
@@ -539,12 +524,12 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define to 1 if you have inet sockets. */
#define HAVE_INET_SOCKETS 1
+/* Define to 1 to use inotify. */
+#undef HAVE_INOTIFY
+
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
-/* Define if you have the functions acosh, asinh, and atanh. */
-#undef HAVE_INVERSE_HYPERBOLIC
-
/* Define to 1 if you have the jpeg library (-ljpeg). */
#undef HAVE_JPEG
@@ -593,6 +578,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define to 1 if you have the `dnet' library (-ldnet). */
#undef HAVE_LIBDNET
+/* Define to 1 if you have the <libgen.h> header file. */
+#undef HAVE_LIBGEN_H
+
/* Define to 1 if you have the hesiod library (-lhesiod). */
#undef HAVE_LIBHESIOD
@@ -653,9 +641,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define to 1 if you have the `localtime_r' function. */
#undef HAVE_LOCALTIME_R
-/* Define to 1 if you have the `logb' function. */
-#define HAVE_LOGB 1
-
/* Define to 1 if you support file names longer than 14 characters. */
#define HAVE_LONG_FILE_NAMES 1
@@ -709,9 +694,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define to 1 if you have a working `mmap' system call. */
#undef HAVE_MMAP
-/* Define if you have mouse support. */
-#define HAVE_MOUSE 1
-
/* Define to 1 if you have the `nanotime' function. */
#undef HAVE_NANOTIME
@@ -728,6 +710,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
Mac OS X. */
#undef HAVE_NS
+/* Define to use native MS Windows GUI. */
+#define HAVE_NTGUI 1
+
/* Define to 1 if libotf has OTF_get_variation_glyphs. */
#undef HAVE_OTF_GET_VARIATION_GLYPHS
@@ -801,23 +786,20 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#define HAVE_SENDTO 1
/* Define to 1 if you have the `setitimer' function. */
-#undef HAVE_SETITIMER
+#define HAVE_SETITIMER 1
/* Define to 1 if you have the `setlocale' function. */
#define HAVE_SETLOCALE 1
-/* Define to 1 if you have the `setpgid' function. */
-#undef HAVE_SETPGID
-
/* Define to 1 if you have the `setrlimit' function. */
#undef HAVE_SETRLIMIT
-/* Define to 1 if you have the `setsid' function. */
-#undef HAVE_SETSID
-
/* Define to 1 if you have the `shutdown' function. */
#define HAVE_SHUTDOWN 1
+/* Define to 1 if you have the `sig2str' function. */
+#undef HAVE_SIG2STR
+
/* Define to 1 if 'sig_atomic_t' is a signed integer type. */
#undef HAVE_SIGNED_SIG_ATOMIC_T
@@ -827,6 +809,10 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define to 1 if 'wint_t' is a signed integer type. */
#undef HAVE_SIGNED_WINT_T
+/* Define to 1 if sigsetjmp and siglongjmp work. The value of this symbol is
+ irrelevant if HAVE__SETJMP is defined. */
+#undef HAVE_SIGSETJMP
+
/* Define to 1 if the system has the type `sigset_t'. */
#undef HAVE_SIGSET_T
@@ -937,6 +923,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define to 1 if you have the <sys/bitypes.h> header file. */
#undef HAVE_SYS_BITYPES_H
+/* Define to 1 if you have the <sys/inotify.h> header file. */
+#undef HAVE_SYS_INOTIFY_H
+
/* Define to 1 if you have the <sys/inttypes.h> header file. */
#undef HAVE_SYS_INTTYPES_H
@@ -983,7 +972,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#undef HAVE_SYS_VLIMIT_H
/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
-#undef HAVE_SYS_WAIT_H
+#define HAVE_SYS_WAIT_H 1
/* Define to 1 if you have the <term.h> header file. */
#undef HAVE_TERM_H
@@ -991,6 +980,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define to 1 if you have the tiff library (-ltiff). */
#undef HAVE_TIFF
+/* Define to 1 if you have the `timer_settime' function. */
+#undef HAVE_TIMER_SETTIME
+
/* Define if struct tm has the tm_gmtoff member. */
#undef HAVE_TM_GMTOFF
@@ -1011,6 +1003,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
+/* Define to 1 if you have the `unsetenv' function. */
+#define HAVE_UNSETENV 1
+
/* Define to 1 if the system has the type 'unsigned long long int'. */
#undef HAVE_UNSIGNED_LONG_LONG_INT
@@ -1111,6 +1106,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define to 1 if you have the `_ftime' function. */
#undef HAVE__FTIME
+/* Define to 1 if _setjmp and _longjmp work. */
+#define HAVE__SETJMP 1
+
/* Define to 1 if you have the `__builtin_unwind_init' function. */
#undef HAVE___BUILTIN_UNWIND_INIT
@@ -1182,21 +1180,12 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
`NO'. */
#undef NARROWPROTO
-/* Do not define abort in emacs.c. */
-#undef NO_ABORT
-
/* Define if XEditRes should not be used. */
#undef NO_EDITRES
-/* Define to 1 if you don't have struct exception in math.h. */
-#define NO_MATHERR 1
-
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
#undef NO_MINUS_C_MINUS_O
-/* Define if termio.h should not be included. */
-#undef NO_TERMIO
-
/* Minimum value of NSIG. */
#undef NSIG_MINIMUM
@@ -1239,8 +1228,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define to the version of this package. */
#undef PACKAGE_VERSION
-/* Number of chars of output in the buffer of a stdio stream. */
-#undef PENDING_OUTPUT_COUNT
+/* the number of pending output bytes on stream 'fp' */
+#define PENDING_OUTPUT_N_BYTES (fp->_ptr - fp->_base)
/* Define to empty to suppress deprecation warnings when building with
--enable-gcc-warnings and with libpng versions before 1.5, which lack
@@ -1297,18 +1286,12 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Character that separates PATH elements. */
#define SEPCHAR ';'
-/* Define if process.c:child_setup should not call setpgrp. */
-#undef SETPGRP_RELEASES_CTTY
-
/* How to set up a slave PTY, if needed. */
#undef SETUP_SLAVE_PTY
/* Make process_send_signal work by "typing" a signal character on the pty. */
#undef SIGNALS_VIA_CHARACTERS
-/* Define if AH_BOTTOM should include signal.h. */
-#undef SIGNAL_H_AHB
-
/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
'sig_atomic_t'. */
#undef SIG_ATOMIC_T_SUFFIX
@@ -1337,9 +1320,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define to 1 on System V Release 4. */
#undef SVR4
-/* Process async input synchronously. */
-#undef SYNC_INPUT
-
/* Define to use system malloc. */
#undef SYSTEM_MALLOC
@@ -1371,9 +1351,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
timespec. */
#undef TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC
-/* Undocumented. */
-#undef ULIMIT_BREAK_VALUE
-
/* Define to 1 for Encore UMAX. */
#undef UMAX
@@ -1384,6 +1361,12 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define if the system has Unix98 PTYs. */
#undef UNIX98_PTYS
+/* Define to 1 if FIONREAD is usable. */
+#define USABLE_FIONREAD 1
+
+/* Define to 1 if SIGIO is usable. */
+#undef USABLE_SIGIO
+
/* How to get a user's full name. */
#define USER_FULL_NAME pw->pw_gecos
@@ -1422,7 +1405,10 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#undef USG_SUBTTY_WORKS
/* Version number of package */
-#define VERSION "24.2.50"
+#define VERSION "24.3.50"
+
+/* Define to 1 if unsetenv returns void instead of int. */
+#undef VOID_UNSETENV
/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
'wchar_t'. */
@@ -1468,9 +1454,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Number of bits in a file offset, on hosts where this is settable. */
#undef _FILE_OFFSET_BITS
-/* enable compile-time and run-time bounds-checking, and some warnings */
-#undef _FORTIFY_SOURCE
-
/* Define to 1 if Gnulib overrides 'struct stat' on Windows so that struct
stat.st_size becomes 64-bit. */
#undef _GL_WINDOWS_64_BIT_ST_SIZE
@@ -1547,12 +1530,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
declarations. Define as empty for no equivalent. */
#undef __restrict_arr
-/* Some platforms redefine this. */
-#undef _longjmp
-
-/* Some platforms redefine this. */
-#undef _setjmp
-
/* Some platforms that do not use configure define this to include extra
configuration information. */
#define config_opsysfile <ms-w32.h>
@@ -1565,11 +1542,19 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
when FOO is an inline function in the header; see
<http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54113>.
_GL_INLINE_HEADER_END contains useful stuff to put
- in the same include file, after uses of _GL_INLINE. */
-#if __GNUC__ ? __GNUC_STDC_INLINE__ : 199901L <= __STDC_VERSION__
+ in the same include file, after uses of _GL_INLINE.
+
+ Suppress the use of extern inline on Apple's platforms,
+ as Libc-825.25 (2012-09-19) is incompatible with it; see
+ <http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00023.html>.
+ Perhaps Apple will fix this some day. */
+#if ((__GNUC__ \
+ ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \
+ : 199901L <= __STDC_VERSION__) \
+ && !defined __APPLE__)
# define _GL_INLINE inline
# define _GL_EXTERN_INLINE extern inline
-#elif 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
+#elif 2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __APPLE__
# if __GNUC_GNU_INLINE__
/* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */
# define _GL_INLINE extern inline __attribute__ ((__gnu_inline__))
@@ -1578,12 +1563,12 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
# endif
# define _GL_EXTERN_INLINE extern
#else
-# define _GL_INLINE static inline
-# define _GL_EXTERN_INLINE static inline
+# define _GL_INLINE static _GL_UNUSED
+# define _GL_EXTERN_INLINE static _GL_UNUSED
#endif
#if 4 < __GNUC__ + (6 <= __GNUC_MINOR__)
-# if __GNUC_STDC_INLINE__
+# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__
# define _GL_INLINE_HEADER_CONST_PRAGMA
# else
# define _GL_INLINE_HEADER_CONST_PRAGMA \
@@ -1607,12 +1592,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define to rpl_gmtime if the replacement function should be used. */
#undef gmtime
-/* Define to `__inline__' or `__inline' if that's what the C compiler
- calls it, or to nothing if 'inline' is not supported under any name. */
-#ifndef __cplusplus
-#undef inline
-#endif
-
/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports
the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of
earlier versions), but does not display it by setting __GNUC_STDC_INLINE__.
diff --git a/nt/configure.bat b/nt/configure.bat
index 56793a0d1c3..3118bb11e5d 100755
--- a/nt/configure.bat
+++ b/nt/configure.bat
@@ -429,7 +429,7 @@ rem
echo Checking whether Windows API headers are too old...
echo #include "windows.h" >junk.c
echo #include "usp10.h" >>junk.c
-echo test(PIMAGE_NT_HEADERS pHeader) >>junk.c
+echo void test(PIMAGE_NT_HEADERS pHeader) >>junk.c
echo {PIMAGE_SECTION_HEADER pSection = IMAGE_FIRST_SECTION(pHeader);} >>junk.c
if (%nocygwin%) == (Y) goto chkapi1
set cf=%usercflags%
@@ -627,7 +627,10 @@ rm -f junk.c junk.obj
if (%gifsupport%) == (N) goto gifDone
echo Checking for libgif...
-echo #include "gif_lib.h" >junk.c
+rem giflib-5.0.0 needs size_t defined before gif_lib.h is included
+rem redirection characters need to be protected from the shell
+echo #include ^<stddef.h^> >junk.c
+echo #include "gif_lib.h" >>junk.c
echo main (){} >>junk.c
rem -o option is ignored with cl, but allows result to be consistent.
echo %COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >>config.log
@@ -949,4 +952,6 @@ set HAVE_PNG=
set HAVE_TIFF=
set HAVE_XPM=
set dbginfo=
+endlocal
+set use_extensions=
diff --git a/nt/emacs-x64.manifest b/nt/emacs-x64.manifest
new file mode 100644
index 00000000000..517e44f150b
--- /dev/null
+++ b/nt/emacs-x64.manifest
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
+ <dependency>
+ <dependentAssembly>
+ <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls"
+ version="6.0.0.0" processorArchitecture="AMD64"
+ publicKeyToken="6595b64144ccf1df"
+ language="*"/>
+ </dependentAssembly>
+ </dependency>
+ <assemblyIdentity version="1.0.0.0" processorArchitecture="AMD64"
+ name="emacs" type="win32"/>
+ <description>GNU Emacs</description>
+ <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
+ <security>
+ <requestedPrivileges>
+ <requestedExecutionLevel level="asInvoker"/>
+ </requestedPrivileges>
+ </security>
+ </trustInfo>
+</assembly>
diff --git a/nt/emacs.manifest b/nt/emacs-x86.manifest
index 64c6f1edfb7..64c6f1edfb7 100644
--- a/nt/emacs.manifest
+++ b/nt/emacs-x86.manifest
diff --git a/nt/emacs.rc b/nt/emacs.rc
index b45c57bf60b..da4283b6fd1 100644
--- a/nt/emacs.rc
+++ b/nt/emacs.rc
@@ -1,14 +1,18 @@
-Emacs ICON icons\emacs.ico
-32649 CURSOR icons\hand.cur
-1 24 "emacs.manifest"
+Emacs ICON icons/emacs.ico
+32649 CURSOR icons/hand.cur
+#ifdef WIN64
+1 24 "emacs-x64.manifest"
+#else
+1 24 "emacs-x86.manifest"
+#endif
#ifndef VS_VERSION_INFO
#define VS_VERSION_INFO 1
#endif
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 24,2,50,0
- PRODUCTVERSION 24,2,50,0
+ FILEVERSION 24,3,50,0
+ PRODUCTVERSION 24,3,50,0
FILEFLAGSMASK 0x3FL
#ifdef EMACSDEBUG
FILEFLAGS 0x1L
@@ -25,12 +29,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "Free Software Foundation\0"
VALUE "FileDescription", "GNU Emacs: The extensible self-documenting text editor\0"
- VALUE "FileVersion", "24, 2, 50, 0\0"
+ VALUE "FileVersion", "24, 3, 50, 0\0"
VALUE "InternalName", "Emacs\0"
VALUE "LegalCopyright", "Copyright (C) 2001-2012\0"
VALUE "OriginalFilename", "emacs.exe"
VALUE "ProductName", "Emacs\0"
- VALUE "ProductVersion", "24, 2, 50, 0\0"
+ VALUE "ProductVersion", "24, 3, 50, 0\0"
VALUE "OLESelfRegister", "\0"
END
END
diff --git a/nt/emacsclient.rc b/nt/emacsclient.rc
index e79f1fa4aaa..59dd7b09f8a 100644
--- a/nt/emacsclient.rc
+++ b/nt/emacsclient.rc
@@ -5,8 +5,8 @@ Emacs ICON icons\emacs.ico
#endif
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 24,2,50,0
- PRODUCTVERSION 24,2,50,0
+ FILEVERSION 24,3,50,0
+ PRODUCTVERSION 24,3,50,0
FILEFLAGSMASK 0x3FL
#ifdef EMACSDEBUG
FILEFLAGS 0x1L
@@ -23,12 +23,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "Free Software Foundation\0"
VALUE "FileDescription", "GNU EmacsClient: Client for the extensible self-documenting text editor\0"
- VALUE "FileVersion", "24, 2, 50, 0\0"
+ VALUE "FileVersion", "24, 3, 50, 0\0"
VALUE "InternalName", "EmacsClient\0"
VALUE "LegalCopyright", "Copyright (C) 2001-2012\0"
VALUE "OriginalFilename", "emacsclientw.exe"
VALUE "ProductName", "EmacsClient\0"
- VALUE "ProductVersion", "24, 2, 50, 0\0"
+ VALUE "ProductVersion", "24, 3, 50, 0\0"
VALUE "OLESelfRegister", "\0"
END
END
diff --git a/nt/gmake.defs b/nt/gmake.defs
index 0b29c73e741..3d545fab975 100644
--- a/nt/gmake.defs
+++ b/nt/gmake.defs
@@ -69,10 +69,18 @@ sh_output := $(shell echo)
ifeq "$(findstring ECHO, $(sh_output))" "ECHO"
THE_SHELL = $(COMSPEC)$(ComSpec)
SHELLTYPE=CMD
+SWITCHCHAR=/
else
USING_SH = 1
THE_SHELL = $(SHELL)
SHELLTYPE=SH
+# MSYS needs to double the slash in cmd-style switches to avoid
+# interpreting /x as a Posix style file name reference
+ifneq ($(MSYSTEM),)
+SWITCHCHAR=//
+else
+SWITCHCHAR=/
+endif
endif
MAKETYPE=gmake
@@ -139,15 +147,27 @@ OS_TYPE = windowsnt
ifeq "$(PROCESSOR_ARCHITECTURE)" "x86"
ARCH = i386
CPU = i386
+EMACS_HEAPSIZE = 27
+EMACS_PURESIZE = 5000000
+EMACS_MANIFEST = emacs-x86.manifest
else
ifeq "$(PROCESSOR_ARCHITECTURE)" "MIPS"
ARCH = mips
+EMACS_HEAPSIZE = 27
+EMACS_PURESIZE = 5000000
+EMACS_MANIFEST = emacs-mips.manifest
else
ifeq "$(PROCESSOR_ARCHITECTURE)" "ALPHA"
ARCH = alpha
+EMACS_HEAPSIZE = 27
+EMACS_PURESIZE = 5000000
+EMACS_MANIFEST = emacs-alpha.manifest
else
ifeq "$(PROCESSOR_ARCHITECTURE)" "PPC"
ARCH = ppc
+EMACS_HEAPSIZE = 27
+EMACS_PURESIZE = 5000000
+EMACS_MANIFEST = emacs-ppc.manifest
else
$(error Unknown architecture type "$(PROCESSOR_ARCHITECTURE)")
endif
@@ -199,7 +219,7 @@ OBJ1_c = $(patsubst $(BLD)%.$(O),$(CURDIR)%.c,$(OBJ1))
OBJ2_c = $(patsubst $(BLD)%.$(O),$(CURDIR)%.c,$(OBJ2))
ifdef NOOPT
-DEBUG_CFLAGS = -DEMACSDEBUG -fno-crossjumping
+DEBUG_CFLAGS = -DEMACSDEBUG -fno-crossjumping -std=gnu99
else
DEBUG_CFLAGS =
endif
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 @@
+/*
+ <dirent.h> -- definitions for POSIX-compatible directory access
+
+ * The code here is forced by the interface, and is not subject to
+ * copyright, constituting the only possible expression of the
+ * algorithm in this format.
+ */
+
+#define DIRBLKSIZ 512 /* size of directory block */
+#ifdef WINDOWSNT
+#define MAXNAMLEN 255
+#else /* not WINDOWSNT */
+#define MAXNAMLEN 15 /* maximum filename length */
+#endif /* not WINDOWSNT */
+ /* NOTE: MAXNAMLEN must be one less than a multiple of 4 */
+
+struct dirent /* data from readdir() */
+ {
+ long d_ino; /* inode number of entry */
+ unsigned short d_reclen; /* length of this record */
+ unsigned short d_namlen; /* length of string in d_name */
+ char d_name[MAXNAMLEN+1]; /* name of file */
+ };
+
+typedef struct
+ {
+ int dd_fd; /* file descriptor */
+ int dd_loc; /* offset in block */
+ int dd_size; /* amount of valid data */
+ char dd_buf[DIRBLKSIZ]; /* directory block */
+ } DIR; /* stream data from opendir() */
+
+extern DIR *opendir (char *);
+extern struct dirent *readdir (DIR *);
+extern void seekdir (DIR *, long);
+extern void closedir (DIR *);
+
+#define rewinddir( dirp ) seekdir( dirp, 0L )
diff --git a/nt/inc/grp.h b/nt/inc/grp.h
index 8c3131ac893..3d369044974 100644
--- a/nt/inc/grp.h
+++ b/nt/inc/grp.h
@@ -28,7 +28,10 @@ struct group {
gid_t gr_gid; /* group numerical ID */
};
-struct group *getgrgid(gid_t);
+extern unsigned getgid (void);
+extern unsigned getegid (void);
+
+extern struct group *getgrgid(gid_t);
#endif /* _GRP_H */
diff --git a/nt/inc/ms-w32.h b/nt/inc/ms-w32.h
index 8945fb7be4d..aab30391063 100644
--- a/nt/inc/ms-w32.h
+++ b/nt/inc/ms-w32.h
@@ -120,20 +120,6 @@ extern char *getenv ();
#endif
#include <sys/types.h>
-#ifdef _MSC_VER
-typedef unsigned long sigset_t;
-typedef int ssize_t;
-#endif
-
-struct sigaction {
- int sa_flags;
- void (*sa_handler)(int);
- sigset_t sa_mask;
-};
-#define SIG_BLOCK 1
-#define SIG_SETMASK 2
-#define SIG_UNBLOCK 3
-
#ifndef MAXPATHLEN
#define MAXPATHLEN _MAX_PATH
#endif
@@ -159,8 +145,6 @@ struct sigaction {
#endif
/* Calls that are emulated or shadowed. */
-#undef access
-#define access sys_access
#undef chdir
#define chdir sys_chdir
#undef chmod
@@ -194,15 +178,21 @@ struct sigaction {
#define strerror sys_strerror
#undef unlink
#define unlink sys_unlink
+/* This prototype is needed because some files include config.h
+ _after_ the standard headers, so sys_unlink gets no prototype from
+ stdio.h or io.h. */
+extern int sys_unlink (const char *);
#undef write
#define write sys_write
/* Subprocess calls that are emulated. */
#define spawnve sys_spawnve
-#define wait sys_wait
#define kill sys_kill
#define signal sys_signal
+/* Internal signals. */
+#define emacs_raise(sig) emacs_abort()
+
/* termcap.c calls that are emulated. */
#define tputs sys_tputs
#define tgetstr sys_tgetstr
@@ -247,6 +237,9 @@ typedef int pid_t;
#define stricmp _stricmp
#define tzset _tzset
+/* We cannot include system header process.h, since there's src/process.h. */
+int _getpid (void);
+
/* Include time.h before redirecting tzname, since MSVC's time.h
defines _tzname to call a function, but also declares tzname a
2-element array. Having the redirection before including the
@@ -268,6 +261,10 @@ struct timespec
long int tv_nsec; /* nanoseconds */
};
+/* Required for functions in lib/time_r.c, since we don't use lib/time.h. */
+extern struct tm *gmtime_r (time_t const * restrict, struct tm * restrict);
+extern struct tm *localtime_r (time_t const * restrict, struct tm * restrict);
+
/* This is hacky, but is necessary to avoid warnings about macro
redefinitions using the SDK compilers. */
#ifndef __STDC__
@@ -290,11 +287,43 @@ struct timespec
#define SIGPIPE 13 /* Write on pipe with no readers */
#define SIGALRM 14 /* Alarm */
#define SIGCHLD 18 /* Death of child */
+#define SIGPROF 19 /* Profiling */
#ifndef NSIG
#define NSIG 23
#endif
+#ifdef _MSC_VER
+typedef int sigset_t;
+typedef int ssize_t;
+#endif
+
+typedef void (_CALLBACK_ *signal_handler) (int);
+extern signal_handler sys_signal (int, signal_handler);
+
+struct sigaction {
+ int sa_flags;
+ void (_CALLBACK_ *sa_handler)(int);
+ sigset_t sa_mask;
+};
+#define SA_RESTART 0
+#define SIG_BLOCK 1
+#define SIG_SETMASK 2
+#define SIG_UNBLOCK 3
+
+extern int sigemptyset (sigset_t *);
+extern int sigaddset (sigset_t *, int);
+extern int sigfillset (sigset_t *);
+extern int sigprocmask (int, const sigset_t *, sigset_t *);
+extern int pthread_sigmask (int, const sigset_t *, sigset_t *);
+extern int sigismember (const sigset_t *, int);
+extern int setpgrp (int, int);
+extern int sigaction (int, const struct sigaction *, struct sigaction *);
+extern int alarm (int);
+
+extern int sys_kill (int, int);
+
+
/* For integration with MSDOS support. */
#define getdisk() (_getdrive () - 1)
#ifdef emacs
@@ -334,16 +363,7 @@ extern char *get_emacs_configuration_options (void);
#include <malloc.h>
#endif
-/* stdlib.h must be included after redefining malloc & friends, but
- before redefining abort. Isn't library redefinition funny? */
#include <stdlib.h>
-
-/* Redefine abort. */
-#ifdef HAVE_NTGUI
-#define abort w32_abort
-extern _Noreturn void w32_abort (void);
-#endif
-
#include <sys/stat.h>
/* Define for those source files that do not include enough NT system files. */
@@ -360,9 +380,17 @@ extern _Noreturn void w32_abort (void);
#define sys_nerr _sys_nerr
#endif
+/* This must be after including stdlib.h, which defines putenv on MinGW. */
+#ifdef putenv
+# undef putenv
+#endif
+#define putenv sys_putenv
+extern int sys_putenv (char *);
+
extern int getloadavg (double *, int);
+extern int getpagesize (void);
-#if defined (__MINGW32__) || _MSC_VER >= 1400
+#if defined (__MINGW32__)
/* Define to 1 if the system has the type `long long int'. */
# define HAVE_LONG_LONG_INT 1
@@ -370,21 +398,37 @@ extern int getloadavg (double *, int);
/* Define to 1 if the system has the type `unsigned long long int'. */
# define HAVE_UNSIGNED_LONG_LONG_INT 1
-#elif _MSC_VER >= 1200
+#endif
+#ifdef _MSC_VER
+# if defined(_WIN64)
+typedef __int64 EMACS_INT;
+typedef unsigned __int64 EMACS_UINT;
+# define EMACS_INT_MAX LLONG_MAX
+# define PRIuMAX "llu"
+# define pI "ll"
+/* Fix a bug in MSVC headers : stdint.h */
+# define _INTPTR 2
+# elif defined(_WIN32)
/* Temporarily disable wider-than-pointer integers until they're tested more.
Build with CFLAGS='-DWIDE_EMACS_INT' to try them out. */
-# ifdef WIDE_EMACS_INT
+# ifdef WIDE_EMACS_INT
/* Use pre-C99-style 64-bit integers. */
typedef __int64 EMACS_INT;
typedef unsigned __int64 EMACS_UINT;
-# define EMACS_INT_MAX _I64_MAX
-# define pI "I64"
-
+# define EMACS_INT_MAX LLONG_MAX
+# define PRIuMAX "llu"
+# define pI "I64"
+# else
+typedef int EMACS_INT;
+typedef unsigned int EMACS_UINT;
+# define EMACS_INT_MAX LONG_MAX
+# define PRIuMAX "lu"
+# define pI "l"
+# endif
# endif
-
#endif
/* We need a little extra space, see ../../lisp/loadup.el. */
@@ -424,6 +468,22 @@ extern void _DebPrint (const char *fmt, ...);
#define DebPrint(stuff)
#endif
+#ifdef _MSC_VER
+#if _MSC_VER >= 800 && !defined(__cplusplus)
+/* Unnamed type definition in parentheses.
+ A structure, union, or enumerated type with no name is defined in a
+ parenthetical expression. The type definition is meaningless. */
+#pragma warning(disable:4116)
+/* 'argument' : conversion from 'type1' to 'type2', possible loss of
+ data A floating point type was converted to an integer type. A
+ possible loss of data may have occurred. */
+#pragma warning(disable:4244)
+/* Negative integral constant converted to unsigned type.
+ An expression converts a negative integer constant to an unsigned type.
+ The result of the expression is probably meaningless. */
+#pragma warning(disable:4308)
+#endif
+#endif
#define TERM_HEADER "w32term.h"
diff --git a/nt/inc/pwd.h b/nt/inc/pwd.h
index b39309d08fa..54e477e9665 100644
--- a/nt/inc/pwd.h
+++ b/nt/inc/pwd.h
@@ -18,8 +18,11 @@ struct passwd {
typedef unsigned uid_t;
typedef uid_t gid_t;
-struct passwd * getpwnam (char *);
-struct passwd * getpwuid (unsigned);
+extern unsigned getuid (void);
+extern unsigned geteuid (void);
+
+extern struct passwd * getpwnam (char *);
+extern struct passwd * getpwuid (unsigned);
#endif /* _PWD_H_ */
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;
#define INT64_MAX 9223372036854775807i64
#define INT64_MIN (~INT64_MAX)
#define INTPTR_MAX INT64_MAX
+#define INTPTR_MIN INT64_MIN
#define UINTMAX_MAX UINT64_MAX
#define UINTMAX_MIN UINT64_MIN
#define INTMAX_MAX INT64_MAX
@@ -51,6 +52,7 @@ typedef unsigned int uint32_t;
#define INT32_MAX 2147483647
#define INT32_MIN (~INT32_MAX)
#define INTPTR_MAX INT32_MAX
+#define INTPTR_MIN INT32_MIN
#define UINTMAX_MAX UINT32_MAX
#define UINTMAX_MIN UINT32_MIN
#define INTMAX_MAX INT32_MAX
@@ -60,6 +62,7 @@ typedef unsigned int uint32_t;
#endif
#define PTRDIFF_MAX INTPTR_MAX
+#define PTRDIFF_MIN INTPTR_MIN
#endif /* !__GNUC__ */
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 @@
-/*
- * map sys\dir.h to ..\..\..\src\ndir.h
- */
-
-#include "..\..\..\src\ndir.h"
-
diff --git a/nt/inc/sys/socket.h b/nt/inc/sys/socket.h
index 77610404ffb..95fee4c4659 100644
--- a/nt/inc/sys/socket.h
+++ b/nt/inc/sys/socket.h
@@ -119,49 +119,154 @@ int sys_sendto (int s, const char * buf, int len, int flags,
an fcntl function, for setting sockets to non-blocking mode. */
int fcntl (int s, int cmd, int options);
#define F_SETFL 4
-#define O_NDELAY 04000
+#define O_NONBLOCK 04000
/* we are providing a real h_errno variable */
#undef h_errno
extern int h_errno;
/* map winsock error codes to standard names */
+#if defined(EWOULDBLOCK)
+#undef EWOULDBLOCK
+#endif
#define EWOULDBLOCK WSAEWOULDBLOCK
+#if defined(EINPROGRESS)
+#undef EINPROGRESS
+#endif
#define EINPROGRESS WSAEINPROGRESS
+#if defined(EALREADY)
+#undef EALREADY
+#endif
#define EALREADY WSAEALREADY
+#if defined(ENOTSOCK)
+#undef ENOTSOCK
+#endif
#define ENOTSOCK WSAENOTSOCK
+#if defined(EDESTADDRREQ)
+#undef EDESTADDRREQ
+#endif
#define EDESTADDRREQ WSAEDESTADDRREQ
+#if defined(EMSGSIZE)
+#undef EMSGSIZE
+#endif
#define EMSGSIZE WSAEMSGSIZE
+#if defined(EPROTOTYPE)
+#undef EPROTOTYPE
+#endif
#define EPROTOTYPE WSAEPROTOTYPE
+#if defined(ENOPROTOOPT)
+#undef ENOPROTOOPT
+#endif
#define ENOPROTOOPT WSAENOPROTOOPT
+#if defined(EPROTONOSUPPORT)
+#undef EPROTONOSUPPORT
+#endif
#define EPROTONOSUPPORT WSAEPROTONOSUPPORT
+#if defined(ESOCKTNOSUPPORT)
+#undef ESOCKTNOSUPPORT
+#endif
#define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT
+#if defined(EOPNOTSUPP)
+#undef EOPNOTSUPP
+#endif
#define EOPNOTSUPP WSAEOPNOTSUPP
+#if defined(EPFNOSUPPORT)
+#undef EPFNOSUPPORT
+#endif
#define EPFNOSUPPORT WSAEPFNOSUPPORT
+#if defined(EAFNOSUPPORT)
+#undef EAFNOSUPPORT
+#endif
#define EAFNOSUPPORT WSAEAFNOSUPPORT
+#if defined(EADDRINUSE)
+#undef EADDRINUSE
+#endif
#define EADDRINUSE WSAEADDRINUSE
+#if defined(EADDRNOTAVAIL)
+#undef EADDRNOTAVAIL
+#endif
#define EADDRNOTAVAIL WSAEADDRNOTAVAIL
+#if defined(ENETDOWN)
+#undef ENETDOWN
+#endif
#define ENETDOWN WSAENETDOWN
+#if defined(ENETUNREACH)
+#undef ENETUNREACH
+#endif
#define ENETUNREACH WSAENETUNREACH
+#if defined(ENETRESET)
+#undef ENETRESET
+#endif
#define ENETRESET WSAENETRESET
+#if defined(ECONNABORTED)
+#undef ECONNABORTED
+#endif
#define ECONNABORTED WSAECONNABORTED
+#if defined(ECONNRESET)
+#undef ECONNRESET
+#endif
#define ECONNRESET WSAECONNRESET
+#if defined(ENOBUFS)
+#undef ENOBUFS
+#endif
#define ENOBUFS WSAENOBUFS
+#if defined(EISCONN)
+#undef EISCONN
+#endif
#define EISCONN WSAEISCONN
+#if defined(ENOTCONN)
+#undef ENOTCONN
+#endif
#define ENOTCONN WSAENOTCONN
+#if defined(ESHUTDOWN)
+#undef ESHUTDOWN
+#endif
#define ESHUTDOWN WSAESHUTDOWN
+#if defined(ETOOMANYREFS)
+#undef ETOOMANYREFS
+#endif
#define ETOOMANYREFS WSAETOOMANYREFS
+#if defined(ETIMEDOUT)
+#undef ETIMEDOUT
+#endif
#define ETIMEDOUT WSAETIMEDOUT
+#if defined(ECONNREFUSED)
+#undef ECONNREFUSED
+#endif
#define ECONNREFUSED WSAECONNREFUSED
+#if defined(ELOOP)
+#undef ELOOP
+#endif
#define ELOOP WSAELOOP
/* #define ENAMETOOLONG WSAENAMETOOLONG */
+#if defined(EHOSTDOWN)
+#undef EHOSTDOWN
+#endif
#define EHOSTDOWN WSAEHOSTDOWN
+#if defined(EHOSTUNREACH)
+#undef EHOSTUNREACH
+#endif
#define EHOSTUNREACH WSAEHOSTUNREACH
/* #define ENOTEMPTY WSAENOTEMPTY */
+#if defined(EPROCLIM)
+#undef EPROCLIM
+#endif
#define EPROCLIM WSAEPROCLIM
+#if defined(EUSERS)
+#undef EUSERS
+#endif
#define EUSERS WSAEUSERS
+#if defined(EDQUOT)
+#undef EDQUOT
+#endif
#define EDQUOT WSAEDQUOT
+#if defined(ESTALE)
+#undef ESTALE
+#endif
#define ESTALE WSAESTALE
+#if defined(EREMOTE)
+#undef EREMOTE
+#endif
#define EREMOTE WSAEREMOTE
#endif /* _SOCKET_H_ */
diff --git a/nt/inc/sys/stat.h b/nt/inc/sys/stat.h
index b673b80a0e3..fb56b7cab40 100644
--- a/nt/inc/sys/stat.h
+++ b/nt/inc/sys/stat.h
@@ -98,6 +98,10 @@ struct stat {
char st_gname[260];
};
+/* Internal variable for asking 'stat'/'lstat' to produce accurate
+ info about owner and group of files. */
+extern int w32_stat_get_owner_group;
+
/* Prevent redefinition by other headers, e.g. wchar.h. */
#define _STAT_DEFINED
diff --git a/nt/inc/sys/time.h b/nt/inc/sys/time.h
index db54c90cf1f..c12c194fd2a 100644
--- a/nt/inc/sys/time.h
+++ b/nt/inc/sys/time.h
@@ -2,7 +2,8 @@
#define SYS_TIME_H_INCLUDED
/*
- * sys/time.h doesn't exist on NT
+ * sys/time.h either doesn't exist on Windows, or doesn't necessarily
+ * have the below stuff.
*/
struct timeval
@@ -19,6 +20,18 @@ struct timezone
void gettimeofday (struct timeval *, struct timezone *);
+#define ITIMER_REAL 0
+#define ITIMER_PROF 1
+
+struct itimerval
+{
+ struct timeval it_interval; /* timer interval */
+ struct timeval it_value; /* current value */
+};
+
+int getitimer (int, struct itimerval *);
+int setitimer (int, struct itimerval *, struct itimerval *);
+
#endif /* SYS_TIME_H_INCLUDED */
/* end of sys/time.h */
diff --git a/nt/inc/sys/wait.h b/nt/inc/sys/wait.h
new file mode 100644
index 00000000000..8d890c9e175
--- /dev/null
+++ b/nt/inc/sys/wait.h
@@ -0,0 +1,33 @@
+/* A limited emulation of sys/wait.h on Posix systems.
+
+Copyright (C) 2012 Free Software Foundation, Inc.
+
+This file is part of GNU Emacs.
+
+GNU Emacs is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+GNU Emacs is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef INC_SYS_WAIT_H_
+#define INC_SYS_WAIT_H_
+
+#define WNOHANG 1
+#define WUNTRACED 2
+#define WSTOPPED 2 /* same as WUNTRACED */
+#define WEXITED 4
+#define WCONTINUED 8
+
+/* The various WIF* macros are defined in src/syswait.h. */
+
+extern pid_t waitpid (pid_t, int *, int);
+
+#endif /* INC_SYS_WAIT_H_ */
diff --git a/nt/inc/unistd.h b/nt/inc/unistd.h
index fb1f1c4b3bf..5fdd9c8eb88 100644
--- a/nt/inc/unistd.h
+++ b/nt/inc/unistd.h
@@ -3,8 +3,32 @@
#ifndef _UNISTD_H
#define _UNISTD_H
+/* On Microsoft platforms, <stdlib.h> declares 'environ'; on POSIX
+ platforms, <unistd.h> does. Every file in Emacs that includes
+ <unistd.h> also includes <stdlib.h>, so there's no need to declare
+ 'environ' here. */
+
+/* Provide prototypes of library functions that are emulated on w32
+ and whose prototypes are usually found in unistd.h on POSIX
+ platforms. */
extern ssize_t readlink (const char *, char *, size_t);
extern int symlink (char const *, char const *);
+extern int setpgid (pid_t, pid_t);
+extern pid_t getpgrp (void);
+extern pid_t setsid (void);
+extern pid_t tcgetpgrp (int);
-#endif /* _UNISTD_H */
+extern int faccessat (int, char const *, int, int);
+
+/* These are normally on fcntl.h, but we don't override that header. */
+/* Use values compatible with gnulib, as there's no reason to differ. */
+#define AT_FDCWD (-3041965)
+#define AT_EACCESS 4
+#define AT_SYMLINK_NOFOLLOW 4096
+#define O_NOCTTY 0
+
+/* This is normally on stdlib.h, but we don't override that header. */
+extern int unsetenv (const char *);
+
+#endif /* _UNISTD_H */
diff --git a/nt/makefile.w32-in b/nt/makefile.w32-in
index cf4af2b14cd..7377d7e33b9 100644
--- a/nt/makefile.w32-in
+++ b/nt/makefile.w32-in
@@ -22,7 +22,7 @@
# FIXME: This file uses DOS EOLs. Convert to Unix after 22.1 is out
# (and remove or replace this comment).
-VERSION = 24.2.50
+VERSION = 24.3.50
TMP_DIST_DIR = emacs-$(VERSION)
@@ -66,7 +66,7 @@ $(BLD)/preprep.exe: $(BLD)/preprep.$(O)
# The resource file. NT 3.10 requires the use of cvtres; even though
# it is not necessary on later versions, it is still ok to use it.
#
-$(TRES): emacs.rc icons/emacs.ico emacs.manifest stamp_BLD
+$(TRES): emacs.rc icons/emacs.ico $(EMACS_MANIFEST) stamp_BLD
$(RC) $(RC_OUT)$(TRES) emacs.rc
$(CLIENTRES): emacsclient.rc stamp_BLD
diff --git a/nt/nmake.defs b/nt/nmake.defs
index ec6f5102f4c..2c6bc66b673 100644
--- a/nt/nmake.defs
+++ b/nt/nmake.defs
@@ -22,6 +22,7 @@ all:
THE_SHELL = $(COMSPEC)
SHELLTYPE=CMD
+SWITCHCHAR=/
MAKETYPE=nmake
@@ -87,7 +88,11 @@ ARCH = alpha
! if "$(PROCESSOR_ARCHITECTURE)" == "PPC"
ARCH = ppc
! else
-! error Unknown architecture type "$(PROCESSOR_ARCHITECTURE)"
+! if "$(PROCESSOR_ARCHITECTURE)" == "AMD64"
+ARCH = AMD64
+! else
+! error Unknown architecture type "$(PROCESSOR_ARCHITECTURE)"
+! endif
! endif
! endif
! endif
@@ -106,13 +111,13 @@ CC = cl
CC_OUT = -Fo
LINK = link
LINK_OUT = -out:
-RC = rc
+RC = rc $(ARCH_RCFLAGS)
RC_OUT = -Fo
RC_INCLUDE = -i
USE_CRT_DLL = 1
-!ifdef USE_CRT_DLL
+!if USE_CRT_DLL
libc = msvcrt$(D).lib
EMACS_EXTRA_C_FLAGS= -D_DLL -D_MT -DUSE_CRT_DLL=1
!else
@@ -147,21 +152,21 @@ DEBUG_CFLAGS =
MWINDOWS = -subsystem:windows -entry:mainCRTStartup
-CFLAGS = -I. $(ARCH_CFLAGS) \
+CFLAGS = -I. $(ARCH_CFLAGS) -D_CRT_SECURE_NO_WARNINGS \
$(DEBUG_CFLAGS) $(USER_CFLAGS) $(LOCAL_FLAGS)
-ESC_CFLAGS = -I. $(ARCH_CFLAGS) \
+ESC_CFLAGS = -I. $(ARCH_CFLAGS) -D_CRT_SECURE_NO_WARNINGS \
$(DEBUG_CFLAGS) $(ESC_USER_CFLAGS) $(LOCAL_FLAGS)
#SYS_LDFLAGS = -nologo -release -incremental:no -version:3.10 -swaprun:cd -swaprun:net setargv.obj
-!ifdef NOOPT
-SYS_LDFLAGS = -nologo -manifest -dynamicbase:no -debug -incremental:no -version:3.10 -swaprun:cd -swaprun:net setargv.obj
-!else
-SYS_LDFLAGS = -nologo -manifest -dynamicbase:no -release -incremental:no -version:3.10 -swaprun:cd -swaprun:net setargv.obj
-!endif
+SYS_LDFLAGS = -nologo -manifest -dynamicbase:no -incremental:no -version:3.10 -swaprun:cd -swaprun:net setargv.obj
# see comments in allocate_heap in w32heap.c before changing any of the
# -stack, -heap, or -base settings.
-TEMACS_EXTRA_LINK = -stack:0x00800000 -heap:0x00100000 -base:0x01000000 -pdb:$(BLD)\temacs.pdb -machine:$(ARCH) $(SUBSYSTEM_CONSOLE) -entry:_start -map:$(BLD)\temacs.map $(EXTRA_LINK)
+!if "$(ARCH)" == "i386"
+TEMACS_EXTRA_LINK = -stack:0x00800000 -heap:0x00100000 -base:0x01000000 -pdb:$(BLD)\temacs.pdb -machine:x86 $(SUBSYSTEM_CONSOLE) -entry:_start -map:$(BLD)\temacs.map $(EXTRA_LINK)
+!elseif "$(ARCH)" == "AMD64"
+TEMACS_EXTRA_LINK = -stack:0x00800000 -heap:0x00100000 -base:0x400000000 -pdb:$(BLD)\temacs.pdb -machine:x64 $(SUBSYSTEM_CONSOLE) -entry:_start -map:$(BLD)\temacs.map $(EXTRA_LINK)
+!endif
!ifdef NOOPT
OBJDIR = obj
@@ -212,11 +217,17 @@ ARCH_CFLAGS = -nologo -D_X86_=1 -c -Zl -Zp8 -W2 -Od -Gd $(DEBUG_FLAG)
ARCH_CFLAGS = -nologo -D_X86_=1 -c -Zl -Zp8 -W2 -Oi -Ot -Oy- -Ob2 -GF -Gy -Gd $(DEBUG_FLAG)
!endif
ARCH_LDFLAGS = $(SYS_LDFLAGS)
+EMACS_HEAPSIZE = 27
+EMACS_PURESIZE = 5000000
+EMACS_MANIFEST = emacs-x86.manifest
!else
!if "$(ARCH)" == "mips"
ARCH_CFLAGS = -D_MIPS_=1 -c -W2 -Zi -Od -Gt0
ARCH_LDFLAGS = $(SYS_LDFLAGS)
+EMACS_HEAPSIZE = 27
+EMACS_PURESIZE = 5000000
+EMACS_MANIFEST = emacs-mips.manifest
!else
!if "$(ARCH)" == "alpha"
@@ -226,12 +237,30 @@ ARCH_CFLAGS = -D_ALPHA_=1 -c -Ze -Zi -W2 -Od -D__stdcall= -D__cdecl=
ARCH_CFLAGS = -D_ALPHA_=1 -c -Ze -Zi -W2 -O1 -D__stdcall= -D__cdecl=
!endif
ARCH_LDFLAGS = $(SYS_LDFLAGS)
+EMACS_HEAPSIZE = 27
+EMACS_PURESIZE = 5000000
+EMACS_MANIFEST = emacs-alpha.manifest
!else
!if "$(ARCH)" == "ppc"
# These flags are a guess...if they don't work, please send me mail.
-ARCH_CFLAGS = -D_PPC_=1 -c -Ze -Zi -W2 -Od
ARCH_LDFLAGS = $(SYS_LDFLAGS)
+EMACS_HEAPSIZE = 27
+EMACS_PURESIZE = 5000000
+EMACS_MANIFEST = emacs-ppc.manifest
+
+!else
+!if "$(ARCH)" == "AMD64"
+!ifdef NOOPT
+ARCH_CFLAGS = -nologo -D_AMD64_=1 -DWIN64 -D_WIN64 -DWIN32 -D_WIN32 -c -Zl -Zp8 -W2 -Od -Gd -Wp64 $(DEBUG_FLAG)
+!else
+ARCH_CFLAGS = -nologo -D_AMD64_=1 -DWIN64 -D_WIN64 -DWIN32 -D_WIN32 -c -Zl -Zp8 -W2 -O2x -GF -Gy -Gd $(DEBUG_FLAG)
+!endif
+ARCH_LDFLAGS = $(SYS_LDFLAGS) -machine:x64
+ARCH_RCFLAGS = -DWIN64
+EMACS_HEAPSIZE = 42
+EMACS_PURESIZE = 10000000
+EMACS_MANIFEST = emacs-x64.manifest
!else
!ERROR Unknown architecture type "$(ARCH)".
@@ -239,6 +268,7 @@ ARCH_LDFLAGS = $(SYS_LDFLAGS)
!endif
!endif
!endif
+!endif
LINK_FLAGS = $(ARCH_LDFLAGS) $(DEBUG_LINK) $(USER_LDFLAGS)
@@ -262,4 +292,3 @@ EXTRA_LINK = -profile
.c{$(BLD)}.obj::
$(CC) $(CFLAGS) -Fo$(BLD)\ $<
!ENDIF
-
diff --git a/nt/preprep.c b/nt/preprep.c
index 6fe7d325296..6976567e038 100644
--- a/nt/preprep.c
+++ b/nt/preprep.c
@@ -36,9 +36,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
PIMAGE_NT_HEADERS
(__stdcall * pfnCheckSumMappedFile) (LPVOID BaseAddress,
- DWORD FileLength,
- LPDWORD HeaderSum,
- LPDWORD CheckSum);
+ DWORD_PTR FileLength,
+ PDWORD_PTR HeaderSum,
+ PDWORD_PTR CheckSum);
#undef min
#undef max
@@ -196,7 +196,7 @@ find_section (const char *name, IMAGE_NT_HEADERS *nt_header)
/* Return pointer to section header for section containing the given
relative virtual address. */
IMAGE_SECTION_HEADER *
-rva_to_section (DWORD rva, IMAGE_NT_HEADERS * nt_header)
+rva_to_section (DWORD_PTR rva, IMAGE_NT_HEADERS * nt_header)
{
PIMAGE_SECTION_HEADER section;
int i;
@@ -211,7 +211,7 @@ rva_to_section (DWORD rva, IMAGE_NT_HEADERS * nt_header)
some very old exes (eg. gzip dated Dec 1993). Since
w32_executable_type relies on this function to work reliably,
we need to cope with this. */
- DWORD real_size = max (section->SizeOfRawData,
+ DWORD_PTR real_size = max (section->SizeOfRawData,
section->Misc.VirtualSize);
if (rva >= section->VirtualAddress
&& rva < section->VirtualAddress + real_size)
@@ -224,7 +224,7 @@ rva_to_section (DWORD rva, IMAGE_NT_HEADERS * nt_header)
/* Return pointer to section header for section containing the given
offset in its raw data area. */
IMAGE_SECTION_HEADER *
-offset_to_section (DWORD offset, IMAGE_NT_HEADERS * nt_header)
+offset_to_section (DWORD_PTR offset, IMAGE_NT_HEADERS * nt_header)
{
PIMAGE_SECTION_HEADER section;
int i;
@@ -244,8 +244,8 @@ offset_to_section (DWORD offset, IMAGE_NT_HEADERS * nt_header)
/* Return offset to an object in dst, given offset in src. We assume
there is at least one section in both src and dst images, and that
the some sections may have been added to dst (after sections in src). */
-static DWORD
-relocate_offset (DWORD offset,
+static DWORD_PTR
+relocate_offset (DWORD_PTR offset,
IMAGE_NT_HEADERS * src_nt_header,
IMAGE_NT_HEADERS * dst_nt_header)
{
@@ -279,28 +279,29 @@ relocate_offset (DWORD offset,
}
#define OFFSET_TO_RVA(offset, section) \
- (section->VirtualAddress + ((DWORD)(offset) - section->PointerToRawData))
+ ((section)->VirtualAddress + ((DWORD_PTR)(offset) - (section)->PointerToRawData))
#define RVA_TO_OFFSET(rva, section) \
- (section->PointerToRawData + ((DWORD)(rva) - section->VirtualAddress))
+ ((section)->PointerToRawData + ((DWORD_PTR)(rva) - (section)->VirtualAddress))
#define RVA_TO_SECTION_OFFSET(rva, section) \
- ((DWORD)(rva) - section->VirtualAddress)
+ ((DWORD_PTR)(rva) - (section)->VirtualAddress)
#define RVA_TO_PTR(var,section,filedata) \
- ((void *)(RVA_TO_OFFSET(var,section) + (filedata)->file_base))
+ ((void *)((unsigned char *)(RVA_TO_OFFSET(var,section) + (filedata)->file_base)))
/* Convert address in executing image to RVA. */
-#define PTR_TO_RVA(ptr) ((DWORD)(ptr) - (DWORD) GetModuleHandle (NULL))
+#define PTR_TO_RVA(ptr) ((DWORD_PTR)(ptr) - (DWORD_PTR) GetModuleHandle (NULL))
#define PTR_TO_OFFSET(ptr, pfile_data) \
((unsigned const char *)(ptr) - (pfile_data)->file_base)
#define OFFSET_TO_PTR(offset, pfile_data) \
- ((pfile_data)->file_base + (DWORD)(offset))
+ ((pfile_data)->file_base + (DWORD_PTR)(offset))
-#define ROUND_UP(p, align) (((DWORD)(p) + (align)-1) & ~((align)-1))
-#define ROUND_DOWN(p, align) ((DWORD)(p) & ~((align)-1))
+#define ROUND_UP(p, align) \
+ (((DWORD_PTR)(p) + (align)-1) & ~((DWORD_PTR)(align)-1))
+#define ROUND_DOWN(p, align) ((DWORD_PTR)(p) & ~((DWORD_PTR)(align)-1))
/* The MSVC prep program generates a ._xe file from .exe, where relevant
@@ -353,9 +354,9 @@ copy_executable_and_move_sections (file_data *p_infile,
PIMAGE_SECTION_HEADER reloc_section;
PIMAGE_DATA_DIRECTORY import_dir;
PIMAGE_DATA_DIRECTORY reloc_dir;
- DWORD import_delta_rva;
- DWORD reloc_delta_rva;
- DWORD offset;
+ DWORD_PTR import_delta_rva;
+ DWORD_PTR reloc_delta_rva;
+ DWORD_PTR offset;
int i;
#define COPY_CHUNK(message, src, size) \
@@ -388,7 +389,7 @@ copy_executable_and_move_sections (file_data *p_infile,
Note that dst is updated implicitly by each COPY_CHUNK. */
dos_header = (PIMAGE_DOS_HEADER) p_infile->file_base;
- nt_header = (PIMAGE_NT_HEADERS) (((unsigned long) dos_header) +
+ nt_header = (PIMAGE_NT_HEADERS) (((unsigned char *) dos_header) +
dos_header->e_lfanew);
section = IMAGE_FIRST_SECTION (nt_header);
@@ -406,10 +407,10 @@ copy_executable_and_move_sections (file_data *p_infile,
dst = (unsigned char *) p_outfile->file_base;
COPY_CHUNK ("Copying DOS header...", dos_header,
- (DWORD) nt_header - (DWORD) dos_header);
+ (DWORD_PTR) nt_header - (DWORD_PTR) dos_header);
dst_nt_header = (PIMAGE_NT_HEADERS) dst;
COPY_CHUNK ("Copying NT header...", nt_header,
- (DWORD) section - (DWORD) nt_header);
+ (DWORD_PTR) section - (DWORD_PTR) nt_header);
dst_section = (PIMAGE_SECTION_HEADER) dst;
COPY_CHUNK ("Copying section table...", section,
nt_header->FileHeader.NumberOfSections * sizeof (*section));
@@ -537,7 +538,7 @@ copy_executable_and_move_sections (file_data *p_infile,
#define ADJUST_IMPORT_RVA(var) \
do { \
if ((var) != 0) \
- *((DWORD *)&(var)) += import_delta_rva; \
+ *((DWORD_PTR *)&(var)) += import_delta_rva; \
} while (0)
dst_nt_header->OptionalHeader.SizeOfInitializedData = 0;
@@ -627,10 +628,10 @@ copy_executable_and_move_sections (file_data *p_infile,
{
IMAGE_BASE_RELOCATION *relocs, *block, *start_block, *end_block;
- DWORD import_start = import_section->VirtualAddress + dst_nt_header->OptionalHeader.ImageBase;
- DWORD import_end = import_start + import_section->Misc.VirtualSize;
- DWORD len_import_relocs;
- DWORD len_remaining_relocs;
+ DWORD_PTR import_start = import_section->VirtualAddress + dst_nt_header->OptionalHeader.ImageBase;
+ DWORD_PTR import_end = import_start + import_section->Misc.VirtualSize;
+ DWORD_PTR len_import_relocs;
+ DWORD_PTR len_remaining_relocs;
int seen_high = 0;
WORD * high_word;
void * holder;
@@ -643,8 +644,8 @@ copy_executable_and_move_sections (file_data *p_infile,
any; the profiler needs to be able to patch RVAs in the import
section itself. */
for (block = relocs, start_block = 0;
- (DWORD) block - (DWORD) relocs < reloc_dir->Size;
- block = (void *)((DWORD) block + block->SizeOfBlock))
+ (DWORD_PTR) block - (DWORD_PTR) relocs < reloc_dir->Size;
+ block = (void *)((DWORD_PTR) block + block->SizeOfBlock))
{
if (block->VirtualAddress >= import_section->VirtualAddress + import_section->Misc.VirtualSize)
{
@@ -660,8 +661,8 @@ copy_executable_and_move_sections (file_data *p_infile,
}
if (start_block)
{
- len_import_relocs = (DWORD) end_block - (DWORD) start_block;
- len_remaining_relocs = (DWORD) relocs + reloc_dir->Size - (DWORD) end_block;
+ len_import_relocs = (DWORD_PTR) end_block - (DWORD_PTR) start_block;
+ len_remaining_relocs = (DWORD_PTR) relocs + reloc_dir->Size - (DWORD_PTR) end_block;
holder = malloc (len_import_relocs);
if (holder == 0)
abort ();
@@ -675,14 +676,14 @@ copy_executable_and_move_sections (file_data *p_infile,
to the old import section location, and patching them to
reference the new location. */
for (block = relocs;
- (DWORD) block - (DWORD) relocs < reloc_dir->Size;
- block = (void *)((DWORD) block + block->SizeOfBlock))
+ (DWORD_PTR) block - (DWORD_PTR) relocs < reloc_dir->Size;
+ block = (void *)((DWORD_PTR) block + block->SizeOfBlock))
{
- DWORD page_rva = block->VirtualAddress;
- DWORD page_offset;
+ DWORD_PTR page_rva = block->VirtualAddress;
+ DWORD_PTR page_offset;
union {
WORD word;
- DWORD dword;
+ DWORD_PTR dword;
} * ploc;
WORD *fixup;
@@ -692,7 +693,7 @@ copy_executable_and_move_sections (file_data *p_infile,
continue;
for (fixup = (WORD *) &block[1];
- (DWORD) fixup - (DWORD) block < block->SizeOfBlock;
+ (DWORD_PTR) fixup - (DWORD_PTR) block < block->SizeOfBlock;
fixup++)
{
page_offset = (*fixup) & 0xfff;
@@ -794,8 +795,8 @@ main (int argc, char **argv)
/* Patch up header fields; profiler is picky about this. */
{
HANDLE hImagehelp = LoadLibrary ("imagehlp.dll");
- DWORD headersum;
- DWORD checksum;
+ DWORD_PTR headersum;
+ DWORD_PTR checksum;
dos_header = (PIMAGE_DOS_HEADER) out_file.file_base;
nt_header = (PIMAGE_NT_HEADERS) ((char *) dos_header + dos_header->e_lfanew);
diff --git a/nt/zipdist.bat b/nt/zipdist.bat
index 806415054fd..e196299b6d6 100644
--- a/nt/zipdist.bat
+++ b/nt/zipdist.bat
@@ -25,9 +25,8 @@ set EMACS_VER=%1
set TMP_DIST_DIR=emacs-%EMACS_VER%
rem Check, if 7zip is installed and available on path
-:ZIP_CHECK
-7z
-if %ERRORLEVEL% NEQ 0 goto :ZIP_ERROR
+7z 1>NUL 2>NUL
+if %ERRORLEVEL% NEQ 0 goto ZIP_ERROR
goto ZIP_DIST
:ZIP_ERROR
@@ -35,14 +34,10 @@ echo.
echo ERROR: Make sure 7zip is installed and available on the Windows Path!
goto EXIT
-rem Build distributions
+rem Build and verify the binary distribution
:ZIP_DIST
-rem Build and verify full distribution
7z a -bd -tZIP -mx=9 -x!.bzrignore -x!.gitignore -xr!emacs.mdp -xr!*.pdb -xr!*.opt -xr!*~ -xr!CVS -xr!.arch-inventory emacs-%EMACS_VER%-bin-i386.zip %TMP_DIST_DIR%
7z t emacs-%EMACS_VER%-bin-i386.zip
-rem Build and verify binary only distribution
-7z a -bd -tZIP -mx=9 -x!.bzrignore -x!.gitignore -xr!emacs.mdp -xr!*.pdb -xr!*.opt -xr!*~ -xr!CVS -xr!.arch-inventory emacs-%EMACS_VER%-barebin-i386.zip %TMP_DIST_DIR%/README.W32 %TMP_DIST_DIR%/bin %TMP_DIST_DIR%/etc/DOC-X %TMP_DIST_DIR%/COPYING
-7z t emacs-%EMACS_VER%-barebin-i386.zip
goto EXIT
:EXIT