]> git.eshelyaron.com Git - emacs.git/commitdiff
Move NT-specific include file to the NT include directory
authorGlenn Morris <rgm@gnu.org>
Thu, 2 Aug 2012 06:19:48 +0000 (23:19 -0700)
committerGlenn Morris <rgm@gnu.org>
Thu, 2 Aug 2012 06:19:48 +0000 (23:19 -0700)
* nt/inc/ms-w32.h: Move here from ../src/s.
* nt/config.nt (config_opsysfile): Change to <ms-w32.h>.

* s/ms-w32.h: Move to ../nt/inc.
* src/makefile.w32-in (TAGS, TAGS-gmake, MS_W32_H):
Update for new ms-w32.h location.

* lib-src/makefile.w32-in (MS_W32_H): Update for new ms-w32.h location.

* lib/makefile.w32-in (MS_W32_H): Update for new ms-w32.h location.

* lisp/emacs-lisp/authors.el (authors-renamed-files-alist): Add ms-w32.h.

12 files changed:
ChangeLog
lib-src/ChangeLog
lib-src/makefile.w32-in
lib/makefile.w32-in
lisp/ChangeLog
lisp/emacs-lisp/authors.el
nt/ChangeLog
nt/config.nt
nt/inc/ms-w32.h [new file with mode: 0644]
src/ChangeLog
src/makefile.w32-in
src/s/ms-w32.h [deleted file]

index 715c6abd5b0fb98efca5cb1e8fb733b13698d585..60376bc41585a18e2a0facc81a31e239c8327eb4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2012-08-02  Glenn Morris  <rgm@gnu.org>
+
+       * lib/makefile.w32-in (MS_W32_H): Update for new ms-w32.h location.
+
 2012-08-02  Paul Eggert  <eggert@cs.ucla.edu>
 
        Merge from gnulib (Bug#12116), incorporating:
index 4dc648b410b78e90fbadceac7ae4b36a05c98955..1e5433467071f17abd9ab6786171322172287a0e 100644 (file)
@@ -1,3 +1,7 @@
+2012-08-02  Glenn Morris  <rgm@gnu.org>
+
+       * makefile.w32-in (MS_W32_H): Update for new ms-w32.h location.
+
 2012-08-01  Glenn Morris  <rgm@gnu.org>
 
        * Makefile.in (config_h): New variable.
index 8c9482b91944dddb15a345c365304ea90a18262d..26605b8ba4e182ee902c236a1307717c1301d431 100644 (file)
@@ -360,7 +360,7 @@ SRC         = $(EMACS_ROOT)/src
 NT_INC         = $(EMACS_ROOT)/nt/inc
 GNU_LIB                = $(EMACS_ROOT)/lib
 
-MS_W32_H       = $(SRC)/s/ms-w32.h \
+MS_W32_H       = $(NT_INC)/ms-w32.h \
                 $(NT_INC)/sys/stat.h
 CONF_POST_H    = $(SRC)/conf_post.h \
                 $(MS_W32_H)
index 4cebc72751342ed3297bba16c5b88c5960dbef48..db451d542a8c7ed229892bb042c45c60bc1751d3 100644 (file)
@@ -1,5 +1,5 @@
 # -*- Makefile -*- for GNU Emacs on the Microsoft Windows API.
-# Copyright (C) 2011 Free Software Foundation, Inc.
+# Copyright (C) 2011-2012 Free Software Foundation, Inc.
 
 # This file is part of GNU Emacs.
 
@@ -71,7 +71,7 @@ NT_INC                = $(EMACS_ROOT)/nt/inc
 
 C_CTYPE_H      = $(GNU_LIB)/c-ctype.h \
                 $(NT_INC)/stdbool.h
-MS_W32_H       = $(SRC)/s/ms-w32.h \
+MS_W32_H       = $(NT_INC)/ms-w32.h \
                 $(NT_INC)/sys/stat.h
 CONF_POST_H    = $(SRC)/conf_post.h \
                 $(MS_W32_H)
index 075c6c7a3891e3e80ad32fba68ca68432a3e282e..ec93d25a991e9e6cb2e83778836846c7503568e3 100644 (file)
@@ -1,3 +1,7 @@
+2012-08-02  Glenn Morris  <rgm@gnu.org>
+
+       * emacs-lisp/authors.el (authors-renamed-files-alist): Add ms-w32.h.
+
 2012-08-02  Paul Eggert  <eggert@cs.ucla.edu>
 
        Obsolete alias inactivate-current-input-method-function (Bug#10150).
index 20cc38cd9c2aa75ea2bf8cd3bdb48beba6fc3ead..6c70642ba832b6c746007038bf1b05ff88b8c87a 100644 (file)
@@ -578,6 +578,7 @@ in the repository.")
     ("w32console.c" . "w32term.c")
     ("unexnt.c" . "unexw32.c")
     ("s/windowsnt.h" . "s/ms-w32.h")
+    ("s/ms-w32.h" . "inc/ms-w32.h")
     ("winnt.el" . "w32-fns.el")
     ("config.emacs" . "configure")
     ("configure.in" . "configure.ac")
index 7e97faad311fddcbdb6bb3716f38c64764c1d650..e903b4375dbc8b139593b2b2cabd01f3d1ab2596 100644 (file)
@@ -1,3 +1,8 @@
+2012-08-02  Glenn Morris  <rgm@gnu.org>
+
+       * inc/ms-w32.h: Move here from ../src/s.
+       * config.nt (config_opsysfile): Change to <ms-w32.h>.
+
 2012-08-01  Juanma Barranquero  <lekktu@gmail.com>
 
        * config.nt: Sync with autogen/config.in.
index 97889438cc6d054affda31d3575571190b16b207..4687630589b44fcca5325682bca719270ad72052 100644 (file)
@@ -22,7 +22,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
    This file is intentionally kept in sync with autogen/config.in to
    ease maintenance.  Please do not remove non-Windows related stuff
    unless strictly necessary.  Also, before adding anything here
-   consider whether src/s/ms-w32.h would be a better place; this is
+   consider whether inc/ms-w32.h would be a better place; this is
    particularly true for gcc vs. MSVC conditional defines, MinGW or
    MSVC specific code, and macros not already defined in config.in.  */
 
@@ -1538,7 +1538,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 /* Some platforms that do not use configure define this to include extra
    configuration information. */
-#define config_opsysfile "s/ms-w32.h"
+#define config_opsysfile <ms-w32.h>
 
 /* A replacement for va_copy, if needed.  */
 #define gl_va_copy(a,b) ((a) = (b))
diff --git a/nt/inc/ms-w32.h b/nt/inc/ms-w32.h
new file mode 100644 (file)
index 0000000..8c02a8b
--- /dev/null
@@ -0,0 +1,423 @@
+/* System description file for Windows NT.
+
+Copyright (C) 1993-1995, 2001-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/>.  */
+
+/* Define symbols to identify the version of Unix this is.
+   Define all the symbols that apply correctly.  */
+
+#ifndef WINDOWSNT
+#define WINDOWSNT
+#endif
+#ifndef DOS_NT
+#define DOS_NT         /* MSDOS or WINDOWSNT */
+#endif
+
+/* #undef const */
+
+/* If you are compiling with a non-C calling convention but need to
+   declare vararg routines differently, put it here.  */
+#define _VARARGS_ __cdecl
+
+/* If you are providing a function to something that will call the
+   function back (like a signal handler and signal, or main) its calling
+   convention must be whatever standard the libraries expect.  */
+#define _CALLBACK_ __cdecl
+
+/* Define HAVE_TIMEVAL if the system supports the BSD style clock values.
+   Look in <sys/time.h> for a timeval structure.  */
+#define HAVE_TIMEVAL 1
+
+/* But our select implementation doesn't allow us to make non-blocking
+   connects.  So until that is fixed, this is necessary:  */
+#define BROKEN_NON_BLOCKING_CONNECT 1
+
+/* And the select implementation does 1-byte read-ahead waiting
+   for received packets, so datagrams are broken too.  */
+#define BROKEN_DATAGRAM_SOCKETS 1
+
+#define MAIL_USE_SYSTEM_LOCK 1
+
+/* Define to 1 if GCC-style __attribute__ ((__aligned__ (expr))) works. */
+#ifdef __GNUC__
+#define HAVE_ATTRIBUTE_ALIGNED 1
+#endif
+
+/* Define to 1 if strtold conforms to C99. */
+#ifdef __GNUC__
+#define HAVE_C99_STRTOLD 1
+#endif
+
+#if (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8))
+#define HAVE___BUILTIN_UNWIND_INIT 1
+#endif
+
+/* ============================================================ */
+
+/* Here, add any special hacks needed to make Emacs work on this
+   system.  For example, you might define certain system call names
+   that don't exist on your system, or that do different things on
+   your system and must be used only through an encapsulation (which
+   you should place, by convention, in sysdep.c).  */
+
+#ifdef __GNUC__
+#ifndef __cplusplus
+#undef inline
+#endif
+#else  /* MSVC */
+#define inline __inline
+#endif
+
+#ifdef __GNUC__
+# define restrict __restrict__
+#else
+# define restrict
+#endif
+
+/* `mode_t' is not defined for MSVC. Define. */
+#ifdef _MSC_VER
+typedef unsigned short mode_t;
+#endif
+
+/* A va_copy replacement for MSVC.  */
+#ifdef _MSC_VER
+# ifdef _WIN64
+#  ifndef va_copy               /* Need to be checked (?) */
+#   define va_copy(d,s) ((d) = (s))
+#  endif
+# else /* not _WIN64 */
+#  define va_copy(d,s) ((d) = (s))
+# endif         /* not _WIN64 */
+#endif  /* _MSC_VER */
+
+#ifndef WINDOWSNT
+/* Some of the files of Emacs which are intended for use with other
+   programs assume that if you have a config.h file, you must declare
+   the type of getenv.  */
+extern char *getenv ();
+#endif
+
+#ifdef HAVE_STRINGS_H
+#include "strings.h"
+#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
+
+#ifdef HAVE_NTGUI
+#define HAVE_WINDOW_SYSTEM 1
+#define HAVE_MENUS 1
+#endif
+
+/* Get some redefinitions in place.  */
+
+#ifdef emacs
+
+#ifdef _MSC_VER
+#include <sys/timeb.h>
+#include <sys/stat.h>
+#include <signal.h>
+
+/* MSVC gets link-time errors without these redirections.  */
+#define fstat(a, b) sys_fstat(a, b)
+#define stat(a, b)  sys_stat(a, b)
+#define utime       sys_utime
+#endif
+
+/* Calls that are emulated or shadowed.  */
+#undef access
+#define access  sys_access
+#undef chdir
+#define chdir   sys_chdir
+#undef chmod
+#define chmod   sys_chmod
+#define chown   sys_chown
+#undef close
+#define close   sys_close
+#undef creat
+#define creat   sys_creat
+#define ctime  sys_ctime
+#undef dup
+#define dup     sys_dup
+#undef dup2
+#define dup2    sys_dup2
+#define fopen   sys_fopen
+#define link    sys_link
+#define localtime sys_localtime
+#define mkdir   sys_mkdir
+#undef mktemp
+#define mktemp  sys_mktemp
+#undef open
+#define open    sys_open
+#define pipe    sys_pipe
+#undef read
+#define read    sys_read
+#define rename  sys_rename
+#define rmdir   sys_rmdir
+#define select  sys_select
+#define pselect sys_select
+#define sleep   sys_sleep
+#define strerror sys_strerror
+#undef unlink
+#define unlink  sys_unlink
+#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
+
+/* termcap.c calls that are emulated.  */
+#define tputs   sys_tputs
+#define tgetstr sys_tgetstr
+
+/* cm.c calls that are emulated.  */
+#define chcheckmagic sys_chcheckmagic
+#define cmcostinit   sys_cmcostinit
+#define cmgoto       sys_cmgoto
+#define cmputc       sys_cmputc
+#define Wcm_clear    sys_Wcm_clear
+
+#endif /* emacs */
+
+/* Map to MSVC names.  */
+#define execlp    _execlp
+#define execvp    _execvp
+#define fdopen   _fdopen
+#ifndef fileno
+#define fileno   _fileno
+#endif
+#define fsync    _commit
+#define ftruncate _chsize
+#define getpid    _getpid
+#ifdef _MSC_VER
+typedef int pid_t;
+#define snprintf  _snprintf
+#define strtoll   _strtoi64
+#endif
+#define isatty    _isatty
+#define logb      _logb
+#define _longjmp  longjmp
+#define lseek     _lseek
+#define popen     _popen
+#define pclose    _pclose
+#define umask    _umask
+#ifndef _MSC_VER
+#define utimbuf          _utimbuf
+#endif
+#define strdup    _strdup
+#define strupr    _strupr
+#define strnicmp  _strnicmp
+#define stricmp   _stricmp
+#define tzset     _tzset
+
+/* 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
+   header thus has the effect of declaring a function that returns an
+   array, and triggers an error message.  */
+#include <time.h>
+#define tzname    _tzname
+#if !defined (_MSC_VER) || (_MSC_VER < 1400)
+#undef  utime
+#define utime    _utime
+#endif
+
+/* 'struct timespec' is used by time-related functions in lib/ and
+   elsewhere, but we don't use lib/time.h where the structure is
+   defined.  */
+struct timespec
+{
+  time_t       tv_sec;         /* seconds */
+  long int     tv_nsec;        /* nanoseconds */
+};
+
+/* This is hacky, but is necessary to avoid warnings about macro
+   redefinitions using the SDK compilers.  */
+#ifndef __STDC__
+#define __STDC__ 1
+#define MUST_UNDEF__STDC__
+#endif
+#include <direct.h>
+#include <io.h>
+#include <stdio.h>
+#ifdef MUST_UNDEF__STDC__
+#undef __STDC__
+#undef MUST_UNDEF__STDC__
+#endif
+
+/* Defines that we need that aren't in the standard signal.h.  */
+#define SIGHUP  1               /* Hang up */
+#define SIGQUIT 3               /* Quit process */
+#define SIGTRAP 5               /* Trace trap */
+#define SIGKILL 9               /* Die, die die */
+#define SIGPIPE 13              /* Write on pipe with no readers */
+#define SIGALRM 14              /* Alarm */
+#define SIGCHLD 18              /* Death of child */
+
+#ifndef NSIG
+#define NSIG 23
+#endif
+
+/* For integration with MSDOS support.  */
+#define getdisk()               (_getdrive () - 1)
+#ifdef emacs
+#define getdefdir(_drv, _buf)   ((_buf[0] = (_drv + 'A' - 1), _buf[1] = ':', _buf[2] = '/', _buf[3] = 0), 1)
+#else
+#define getdefdir(_drv, _buf)   _getdcwd (_drv, _buf, MAXPATHLEN)
+#endif
+
+extern char *get_emacs_configuration (void);
+extern char *get_emacs_configuration_options (void);
+#define EMACS_CONFIGURATION    get_emacs_configuration ()
+#define EMACS_CONFIG_OPTIONS   get_emacs_configuration_options ()
+
+/* Define this so that winsock.h definitions don't get included with
+   windows.h.  For this to have proper effect, config.h must always be
+   included before windows.h.  */
+#define _WINSOCKAPI_    1
+#define _WINSOCK_H
+
+/* Prevent accidental use of features unavailable in
+   older Windows versions we still support.  */
+#define _WIN32_WINNT 0x0400
+
+/* Make a leaner executable.  */
+#define WIN32_LEAN_AND_MEAN 1
+
+/* Defines size_t and alloca ().  */
+#ifdef emacs
+#define malloc e_malloc
+#define free   e_free
+#define realloc e_realloc
+#define calloc e_calloc
+#endif
+#ifdef _MSC_VER
+#define alloca _alloca
+#else
+#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.  */
+#ifndef NULL
+#ifdef __cplusplus
+#define NULL   0
+#else
+#define NULL   ((void *)0)
+#endif
+#endif
+
+/* For proper declaration of environ.  */
+#ifndef sys_nerr
+#define sys_nerr _sys_nerr
+#endif
+
+extern int getloadavg (double *, int);
+
+#if defined (__MINGW32__) || _MSC_VER >= 1400
+
+/* Define to 1 if the system has the type `long long int'. */
+# define HAVE_LONG_LONG_INT 1
+
+/* Define to 1 if the system has the type `unsigned long long int'. */
+# define HAVE_UNSIGNED_LONG_LONG_INT 1
+
+#elif _MSC_VER >= 1200
+
+/* 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
+
+/* 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"
+
+# endif
+
+#endif
+
+/* We need a little extra space, see ../../lisp/loadup.el.  */
+#define SYSTEM_PURESIZE_EXTRA 50000
+
+#define DATA_START     get_data_start ()
+
+/* For unexec to work on Alpha systems, we need to put Emacs'
+   initialized data into a separate section from the CRT initialized
+   data (because the Alpha linker freely reorders data variables, even
+   across libraries, so our data and the CRT data get intermingled).
+
+   Starting with MSVC 5.0, we must also place the uninitialized data
+   into its own section.  VC5 intermingles uninitialized data from the CRT
+   between Emacs' static uninitialized data and its public uninitialized
+   data.  A separate .bss section for Emacs groups both static and
+   public uninitialized together.
+
+   Note that unexw32.c relies on this fact, and must be modified
+   accordingly if this section name is changed, or if this pragma is
+   removed.  Also, obviously, all files that define initialized data
+   must include config.h to pick up this pragma.  */
+
+/* Names must be < 8 bytes.  */
+#ifdef _MSC_VER
+#pragma data_seg("EMDATA")
+#pragma bss_seg("EMBSS")
+#endif
+
+/* #define FULL_DEBUG */
+/* #define EMACSDEBUG */
+
+#ifdef EMACSDEBUG
+extern void _DebPrint (const char *fmt, ...);
+#define DebPrint(stuff) _DebPrint stuff
+#else
+#define DebPrint(stuff)
+#endif
+
+/* ============================================================ */
index 50c6d18e242774040b779e353e9ae32eed77021c..906107a667d93dfc5e564965c05515c3613027ca 100644 (file)
@@ -1,3 +1,9 @@
+2012-08-02  Glenn Morris  <rgm@gnu.org>
+
+       * s/ms-w32.h: Move to ../nt/inc.
+       * makefile.w32-in (TAGS, TAGS-gmake, MS_W32_H):
+       Update for new ms-w32.h location.
+
 2012-08-02  Paul Eggert  <eggert@cs.ucla.edu>
 
        Port to Solaris 8.
index ee5424cf7578f853b1211120d92a146c5e5b11f0..31dc94f79649533a000382a08805ac95beeb8546 100644 (file)
@@ -339,7 +339,7 @@ cleanall:   clean
 ##
 ## This works only with GNU Make.
 
-TAGS: $(OBJ0) $(OBJ1) $(OBJ2) $(CURDIR)/s/ms-w32.h
+TAGS: $(OBJ0) $(OBJ1) $(OBJ2) $(CURDIR)/../nt/inc/ms-w32.h
        $(MAKE) $(MFLAGS) TAGS-$(MAKETYPE)
 
 TAGS-LISP: $(OBJ0) $(OBJ1) $(OBJ2)
@@ -353,7 +353,7 @@ TAGS-gmake:
          $(OBJ1_c)
        ../lib-src/$(BLD)/etags.exe -a --regex=@../nt/emacs-src.tags \
          $(OBJ2_c) \
-         $(CURDIR)/*.h $(CURDIR)/s/ms-w32.h
+         $(CURDIR)/*.h $(CURDIR)/../nt/inc/ms-w32.h
 
 TAGS-nmake:
        echo This target is not supported with NMake
@@ -403,7 +403,7 @@ CHARSET_H      = $(SRC)/charset.h \
                 $(GNU_LIB)/verify.h
 CODING_H       = $(SRC)/coding.h \
                 $(SRC)/composite.h
-MS_W32_H       = $(SRC)/s/ms-w32.h \
+MS_W32_H       = $(NT_INC)/ms-w32.h \
                 $(NT_INC)/sys/stat.h
 CONF_POST_H    = $(SRC)/conf_post.h \
                 $(MS_W32_H)
diff --git a/src/s/ms-w32.h b/src/s/ms-w32.h
deleted file mode 100644 (file)
index 8c02a8b..0000000
+++ /dev/null
@@ -1,423 +0,0 @@
-/* System description file for Windows NT.
-
-Copyright (C) 1993-1995, 2001-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/>.  */
-
-/* Define symbols to identify the version of Unix this is.
-   Define all the symbols that apply correctly.  */
-
-#ifndef WINDOWSNT
-#define WINDOWSNT
-#endif
-#ifndef DOS_NT
-#define DOS_NT         /* MSDOS or WINDOWSNT */
-#endif
-
-/* #undef const */
-
-/* If you are compiling with a non-C calling convention but need to
-   declare vararg routines differently, put it here.  */
-#define _VARARGS_ __cdecl
-
-/* If you are providing a function to something that will call the
-   function back (like a signal handler and signal, or main) its calling
-   convention must be whatever standard the libraries expect.  */
-#define _CALLBACK_ __cdecl
-
-/* Define HAVE_TIMEVAL if the system supports the BSD style clock values.
-   Look in <sys/time.h> for a timeval structure.  */
-#define HAVE_TIMEVAL 1
-
-/* But our select implementation doesn't allow us to make non-blocking
-   connects.  So until that is fixed, this is necessary:  */
-#define BROKEN_NON_BLOCKING_CONNECT 1
-
-/* And the select implementation does 1-byte read-ahead waiting
-   for received packets, so datagrams are broken too.  */
-#define BROKEN_DATAGRAM_SOCKETS 1
-
-#define MAIL_USE_SYSTEM_LOCK 1
-
-/* Define to 1 if GCC-style __attribute__ ((__aligned__ (expr))) works. */
-#ifdef __GNUC__
-#define HAVE_ATTRIBUTE_ALIGNED 1
-#endif
-
-/* Define to 1 if strtold conforms to C99. */
-#ifdef __GNUC__
-#define HAVE_C99_STRTOLD 1
-#endif
-
-#if (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8))
-#define HAVE___BUILTIN_UNWIND_INIT 1
-#endif
-
-/* ============================================================ */
-
-/* Here, add any special hacks needed to make Emacs work on this
-   system.  For example, you might define certain system call names
-   that don't exist on your system, or that do different things on
-   your system and must be used only through an encapsulation (which
-   you should place, by convention, in sysdep.c).  */
-
-#ifdef __GNUC__
-#ifndef __cplusplus
-#undef inline
-#endif
-#else  /* MSVC */
-#define inline __inline
-#endif
-
-#ifdef __GNUC__
-# define restrict __restrict__
-#else
-# define restrict
-#endif
-
-/* `mode_t' is not defined for MSVC. Define. */
-#ifdef _MSC_VER
-typedef unsigned short mode_t;
-#endif
-
-/* A va_copy replacement for MSVC.  */
-#ifdef _MSC_VER
-# ifdef _WIN64
-#  ifndef va_copy               /* Need to be checked (?) */
-#   define va_copy(d,s) ((d) = (s))
-#  endif
-# else /* not _WIN64 */
-#  define va_copy(d,s) ((d) = (s))
-# endif         /* not _WIN64 */
-#endif  /* _MSC_VER */
-
-#ifndef WINDOWSNT
-/* Some of the files of Emacs which are intended for use with other
-   programs assume that if you have a config.h file, you must declare
-   the type of getenv.  */
-extern char *getenv ();
-#endif
-
-#ifdef HAVE_STRINGS_H
-#include "strings.h"
-#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
-
-#ifdef HAVE_NTGUI
-#define HAVE_WINDOW_SYSTEM 1
-#define HAVE_MENUS 1
-#endif
-
-/* Get some redefinitions in place.  */
-
-#ifdef emacs
-
-#ifdef _MSC_VER
-#include <sys/timeb.h>
-#include <sys/stat.h>
-#include <signal.h>
-
-/* MSVC gets link-time errors without these redirections.  */
-#define fstat(a, b) sys_fstat(a, b)
-#define stat(a, b)  sys_stat(a, b)
-#define utime       sys_utime
-#endif
-
-/* Calls that are emulated or shadowed.  */
-#undef access
-#define access  sys_access
-#undef chdir
-#define chdir   sys_chdir
-#undef chmod
-#define chmod   sys_chmod
-#define chown   sys_chown
-#undef close
-#define close   sys_close
-#undef creat
-#define creat   sys_creat
-#define ctime  sys_ctime
-#undef dup
-#define dup     sys_dup
-#undef dup2
-#define dup2    sys_dup2
-#define fopen   sys_fopen
-#define link    sys_link
-#define localtime sys_localtime
-#define mkdir   sys_mkdir
-#undef mktemp
-#define mktemp  sys_mktemp
-#undef open
-#define open    sys_open
-#define pipe    sys_pipe
-#undef read
-#define read    sys_read
-#define rename  sys_rename
-#define rmdir   sys_rmdir
-#define select  sys_select
-#define pselect sys_select
-#define sleep   sys_sleep
-#define strerror sys_strerror
-#undef unlink
-#define unlink  sys_unlink
-#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
-
-/* termcap.c calls that are emulated.  */
-#define tputs   sys_tputs
-#define tgetstr sys_tgetstr
-
-/* cm.c calls that are emulated.  */
-#define chcheckmagic sys_chcheckmagic
-#define cmcostinit   sys_cmcostinit
-#define cmgoto       sys_cmgoto
-#define cmputc       sys_cmputc
-#define Wcm_clear    sys_Wcm_clear
-
-#endif /* emacs */
-
-/* Map to MSVC names.  */
-#define execlp    _execlp
-#define execvp    _execvp
-#define fdopen   _fdopen
-#ifndef fileno
-#define fileno   _fileno
-#endif
-#define fsync    _commit
-#define ftruncate _chsize
-#define getpid    _getpid
-#ifdef _MSC_VER
-typedef int pid_t;
-#define snprintf  _snprintf
-#define strtoll   _strtoi64
-#endif
-#define isatty    _isatty
-#define logb      _logb
-#define _longjmp  longjmp
-#define lseek     _lseek
-#define popen     _popen
-#define pclose    _pclose
-#define umask    _umask
-#ifndef _MSC_VER
-#define utimbuf          _utimbuf
-#endif
-#define strdup    _strdup
-#define strupr    _strupr
-#define strnicmp  _strnicmp
-#define stricmp   _stricmp
-#define tzset     _tzset
-
-/* 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
-   header thus has the effect of declaring a function that returns an
-   array, and triggers an error message.  */
-#include <time.h>
-#define tzname    _tzname
-#if !defined (_MSC_VER) || (_MSC_VER < 1400)
-#undef  utime
-#define utime    _utime
-#endif
-
-/* 'struct timespec' is used by time-related functions in lib/ and
-   elsewhere, but we don't use lib/time.h where the structure is
-   defined.  */
-struct timespec
-{
-  time_t       tv_sec;         /* seconds */
-  long int     tv_nsec;        /* nanoseconds */
-};
-
-/* This is hacky, but is necessary to avoid warnings about macro
-   redefinitions using the SDK compilers.  */
-#ifndef __STDC__
-#define __STDC__ 1
-#define MUST_UNDEF__STDC__
-#endif
-#include <direct.h>
-#include <io.h>
-#include <stdio.h>
-#ifdef MUST_UNDEF__STDC__
-#undef __STDC__
-#undef MUST_UNDEF__STDC__
-#endif
-
-/* Defines that we need that aren't in the standard signal.h.  */
-#define SIGHUP  1               /* Hang up */
-#define SIGQUIT 3               /* Quit process */
-#define SIGTRAP 5               /* Trace trap */
-#define SIGKILL 9               /* Die, die die */
-#define SIGPIPE 13              /* Write on pipe with no readers */
-#define SIGALRM 14              /* Alarm */
-#define SIGCHLD 18              /* Death of child */
-
-#ifndef NSIG
-#define NSIG 23
-#endif
-
-/* For integration with MSDOS support.  */
-#define getdisk()               (_getdrive () - 1)
-#ifdef emacs
-#define getdefdir(_drv, _buf)   ((_buf[0] = (_drv + 'A' - 1), _buf[1] = ':', _buf[2] = '/', _buf[3] = 0), 1)
-#else
-#define getdefdir(_drv, _buf)   _getdcwd (_drv, _buf, MAXPATHLEN)
-#endif
-
-extern char *get_emacs_configuration (void);
-extern char *get_emacs_configuration_options (void);
-#define EMACS_CONFIGURATION    get_emacs_configuration ()
-#define EMACS_CONFIG_OPTIONS   get_emacs_configuration_options ()
-
-/* Define this so that winsock.h definitions don't get included with
-   windows.h.  For this to have proper effect, config.h must always be
-   included before windows.h.  */
-#define _WINSOCKAPI_    1
-#define _WINSOCK_H
-
-/* Prevent accidental use of features unavailable in
-   older Windows versions we still support.  */
-#define _WIN32_WINNT 0x0400
-
-/* Make a leaner executable.  */
-#define WIN32_LEAN_AND_MEAN 1
-
-/* Defines size_t and alloca ().  */
-#ifdef emacs
-#define malloc e_malloc
-#define free   e_free
-#define realloc e_realloc
-#define calloc e_calloc
-#endif
-#ifdef _MSC_VER
-#define alloca _alloca
-#else
-#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.  */
-#ifndef NULL
-#ifdef __cplusplus
-#define NULL   0
-#else
-#define NULL   ((void *)0)
-#endif
-#endif
-
-/* For proper declaration of environ.  */
-#ifndef sys_nerr
-#define sys_nerr _sys_nerr
-#endif
-
-extern int getloadavg (double *, int);
-
-#if defined (__MINGW32__) || _MSC_VER >= 1400
-
-/* Define to 1 if the system has the type `long long int'. */
-# define HAVE_LONG_LONG_INT 1
-
-/* Define to 1 if the system has the type `unsigned long long int'. */
-# define HAVE_UNSIGNED_LONG_LONG_INT 1
-
-#elif _MSC_VER >= 1200
-
-/* 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
-
-/* 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"
-
-# endif
-
-#endif
-
-/* We need a little extra space, see ../../lisp/loadup.el.  */
-#define SYSTEM_PURESIZE_EXTRA 50000
-
-#define DATA_START     get_data_start ()
-
-/* For unexec to work on Alpha systems, we need to put Emacs'
-   initialized data into a separate section from the CRT initialized
-   data (because the Alpha linker freely reorders data variables, even
-   across libraries, so our data and the CRT data get intermingled).
-
-   Starting with MSVC 5.0, we must also place the uninitialized data
-   into its own section.  VC5 intermingles uninitialized data from the CRT
-   between Emacs' static uninitialized data and its public uninitialized
-   data.  A separate .bss section for Emacs groups both static and
-   public uninitialized together.
-
-   Note that unexw32.c relies on this fact, and must be modified
-   accordingly if this section name is changed, or if this pragma is
-   removed.  Also, obviously, all files that define initialized data
-   must include config.h to pick up this pragma.  */
-
-/* Names must be < 8 bytes.  */
-#ifdef _MSC_VER
-#pragma data_seg("EMDATA")
-#pragma bss_seg("EMBSS")
-#endif
-
-/* #define FULL_DEBUG */
-/* #define EMACSDEBUG */
-
-#ifdef EMACSDEBUG
-extern void _DebPrint (const char *fmt, ...);
-#define DebPrint(stuff) _DebPrint stuff
-#else
-#define DebPrint(stuff)
-#endif
-
-/* ============================================================ */