aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJuanma Barranquero2012-07-06 19:19:33 +0200
committerJuanma Barranquero2012-07-06 19:19:33 +0200
commitf247498ead8b1898decf47537d59965340d6cebd (patch)
treef17827e6bda1b97d84188e50257683f208ce6a20 /src
parent216ee680e5c7e34177eedab9256a85042804545c (diff)
downloademacs-f247498ead8b1898decf47537d59965340d6cebd.tar.gz
emacs-f247498ead8b1898decf47537d59965340d6cebd.zip
* nt/config.nt: Complete rework to bring it in sync with autogen/config.in.
All Windows-specific code moved to src/s/ms-w32.h. * src/s/ms-w32.h: Settings not specific to Windows moved to nt/config.nt. Windows-specific code from nt/config.nt moved here. Obsolete settings removed.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog7
-rw-r--r--src/s/ms-w32.h166
2 files changed, 97 insertions, 76 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index ab5417f4ac4..bb9fabfaa8e 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,10 @@
12012-07-06 Juanma Barranquero <lekktu@gmail.com>
2 Eli Zaretskii <eliz@gnu.org>
3
4 * s/ms-w32.h: Settings not specific to Windows moved to nt/config.nt.
5 Windows-specific code from nt/config.nt moved here.
6 Obsolete settings removed.
7
12012-07-06 Paul Eggert <eggert@cs.ucla.edu> 82012-07-06 Paul Eggert <eggert@cs.ucla.edu>
2 9
3 * process.c: Avoid unnecessary calls to gettime. 10 * process.c: Avoid unnecessary calls to gettime.
diff --git a/src/s/ms-w32.h b/src/s/ms-w32.h
index f3d8b5ec472..866ffc9c048 100644
--- a/src/s/ms-w32.h
+++ b/src/s/ms-w32.h
@@ -27,6 +27,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
27#define DOS_NT /* MSDOS or WINDOWSNT */ 27#define DOS_NT /* MSDOS or WINDOWSNT */
28#endif 28#endif
29 29
30/* #undef const */
31
30/* If you are compiling with a non-C calling convention but need to 32/* If you are compiling with a non-C calling convention but need to
31 declare vararg routines differently, put it here. */ 33 declare vararg routines differently, put it here. */
32#define _VARARGS_ __cdecl 34#define _VARARGS_ __cdecl
@@ -36,8 +38,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
36 convention must be whatever standard the libraries expect. */ 38 convention must be whatever standard the libraries expect. */
37#define _CALLBACK_ __cdecl 39#define _CALLBACK_ __cdecl
38 40
39#define NO_MATHERR 1
40
41/* Letter to use in finding device name of first pty, 41/* Letter to use in finding device name of first pty,
42 if system supports pty's. 'a' means it is /dev/ptya0 */ 42 if system supports pty's. 'a' means it is /dev/ptya0 */
43#define FIRST_PTY_LETTER 'a' 43#define FIRST_PTY_LETTER 'a'
@@ -57,15 +57,19 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
57 for received packets, so datagrams are broken too. */ 57 for received packets, so datagrams are broken too. */
58#define BROKEN_DATAGRAM_SOCKETS 1 58#define BROKEN_DATAGRAM_SOCKETS 1
59 59
60#define MAIL_USE_POP 1 60/* MSVC ignores the "register" keyword, so test fails even though
61 setjmp does work. */
62#define GC_SETJMP_WORKS 1
63
64/* Enable conservative stack marking for GC. */
65#define GC_MARK_STACK 1
66
61#define MAIL_USE_SYSTEM_LOCK 1 67#define MAIL_USE_SYSTEM_LOCK 1
62 68
63/* If the character used to separate elements of the executable path 69/* If the character used to separate elements of the executable path
64 is not ':', #define this to be the appropriate character constant. */ 70 is not ':', #define this to be the appropriate character constant. */
65#define SEPCHAR ';' 71#define SEPCHAR ';'
66 72
67#define ORDINARY_LINK 1
68
69/* ============================================================ */ 73/* ============================================================ */
70 74
71/* Here, add any special hacks needed to make Emacs work on this 75/* Here, add any special hacks needed to make Emacs work on this
@@ -81,6 +85,46 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
81#define IS_DIRECTORY_SEP(_c_) ((_c_) == '/' || (_c_) == '\\') 85#define IS_DIRECTORY_SEP(_c_) ((_c_) == '/' || (_c_) == '\\')
82#define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_) || IS_DEVICE_SEP (_c_)) 86#define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_) || IS_DEVICE_SEP (_c_))
83 87
88#ifdef __GNUC__
89#ifndef __cplusplus
90#undef inline
91#endif
92#else /* MSVC */
93#define inline __inline
94#endif
95
96#ifdef __GNUC__
97# define restrict __restrict__
98#else
99# define restrict
100#endif
101
102/* `mode_t' is not defined for MSVC. Define. */
103#ifdef _MSC_VER
104typedef unsigned short mode_t;
105#endif
106
107/* A va_copy replacement for MSVC. */
108#ifdef _MSC_VER
109# ifdef _WIN64
110# ifndef va_copy /* Need to be checked (?) */
111# define va_copy(d,s) ((d) = (s))
112# endif
113# else /* not _WIN64 */
114# define va_copy(d,s) ((d) = (s))
115# endif /* not _WIN64 */
116#endif /* _MSC_VER */
117
118#ifndef WINDOWSNT
119/* Some of the files of Emacs which are intended for use with other
120 programs assume that if you have a config.h file, you must declare
121 the type of getenv. */
122extern char *getenv ();
123#endif
124
125#ifdef HAVE_STRINGS_H
126#include "strings.h"
127#endif
84#include <sys/types.h> 128#include <sys/types.h>
85 129
86#ifdef _MSC_VER 130#ifdef _MSC_VER
@@ -104,79 +148,11 @@ struct sigaction {
104#define MAXPATHLEN _MAX_PATH 148#define MAXPATHLEN _MAX_PATH
105#endif 149#endif
106 150
107#define HAVE_SOUND 1
108
109#define HAVE_SYS_TIMEB_H 1
110#define HAVE_SYS_TIME_H 1
111#define HAVE_UNISTD_H 1
112#undef HAVE_UTIME_H
113#undef HAVE_LINUX_VERSION_H
114#undef HAVE_SYS_SYSTEMINFO_H
115#define HAVE_PWD_H 1
116#define TIME_WITH_SYS_TIME 1
117
118#define HAVE_GETTIMEOFDAY 1
119#define HAVE_GETHOSTNAME 1
120#define HAVE_DUP2 1
121#define HAVE_RENAME 1
122#define HAVE_CLOSEDIR 1
123#define HAVE_FSYNC 1 /* fsync is called _commit in MSVC. */
124
125#undef TM_IN_SYS_TIME
126#undef HAVE_TM_ZONE
127
128#define HAVE_LONG_FILE_NAMES 1
129
130#define HAVE_MKDIR 1
131#define HAVE_RMDIR 1
132#define HAVE_RANDOM 1
133#undef HAVE_SYSINFO
134#undef HAVE_LRAND48
135#define HAVE_LOGB 1
136#define HAVE_FREXP 1
137#define HAVE_FMOD 1
138#undef HAVE_RINT
139#undef HAVE_CBRT
140#undef HAVE_RES_INIT /* For -lresolv on Suns. */
141#undef HAVE_SETSID
142#undef HAVE_FPATHCONF
143#define HAVE_SELECT 1
144#undef HAVE_EUIDACCESS
145#define HAVE_GETPAGESIZE 1
146#define HAVE_TZSET 1
147#define HAVE_SETLOCALE 1
148#undef HAVE_UTIMES
149#undef HAVE_SETRLIMIT
150#undef HAVE_SETPGID
151/* If you think about defining HAVE_GETCWD, don't: the alternative
152 getwd is redefined on w32.c, and does not really return the current
153 directory, to get the desired results elsewhere in Emacs */
154#undef HAVE_GETCWD
155#define HAVE_SHUTDOWN 1
156
157#define LOCALTIME_CACHE
158#define HAVE_INET_SOCKETS 1
159
160#undef HAVE_AIX_SMT_EXP
161#define USE_TOOLKIT_SCROLL_BARS 1
162
163/* MinGW has these in its library; MSVC doesn't. */ 151/* MinGW has these in its library; MSVC doesn't. */
164#ifdef _MSC_VER 152#ifdef _MSC_VER
165#define strcasecmp(s1,s2) _stricmp(s1,s2) 153#define strcasecmp(s1,s2) _stricmp(s1,s2)
166#define strncasecmp(s1,s2) _strnicmp(s1,s2) 154#define strncasecmp(s1,s2) _strnicmp(s1,s2)
167#endif 155#endif
168#define HAVE_STRCASECMP 1
169#define HAVE_STRNCASECMP 1
170
171/* Define if you have the ANSI `strerror' function.
172 Otherwise you must have the variable `char *sys_errlist[]'. */
173#define HAVE_STRERROR 1
174
175/* Define if `struct utimbuf' is declared by <utime.h>. */
176#undef HAVE_STRUCT_UTIMBUF
177
178#define HAVE_MOUSE 1
179#define HAVE_H_ERRNO 1
180 156
181#ifdef HAVE_NTGUI 157#ifdef HAVE_NTGUI
182#define HAVE_WINDOW_SYSTEM 1 158#define HAVE_WINDOW_SYSTEM 1
@@ -354,6 +330,13 @@ extern char *get_emacs_configuration_options (void);
354#define _WINSOCKAPI_ 1 330#define _WINSOCKAPI_ 1
355#define _WINSOCK_H 331#define _WINSOCK_H
356 332
333/* Prevent accidental use of features unavailable in
334 older Windows versions we still support. */
335#define _WIN32_WINNT 0x0400
336
337/* Make a leaner executable. */
338#define WIN32_LEAN_AND_MEAN 1
339
357/* Defines size_t and alloca (). */ 340/* Defines size_t and alloca (). */
358#ifdef emacs 341#ifdef emacs
359#define malloc e_malloc 342#define malloc e_malloc
@@ -367,6 +350,16 @@ extern char *get_emacs_configuration_options (void);
367#include <malloc.h> 350#include <malloc.h>
368#endif 351#endif
369 352
353/* stdlib.h must be included after redefining malloc & friends, but
354 before redefining abort. Isn't library redefinition funny? */
355#include <stdlib.h>
356
357/* Redefine abort. */
358#ifdef HAVE_NTGUI
359#define abort w32_abort
360extern _Noreturn void w32_abort (void);
361#endif
362
370#include <sys/stat.h> 363#include <sys/stat.h>
371 364
372/* Define for those source files that do not include enough NT system files. */ 365/* Define for those source files that do not include enough NT system files. */
@@ -379,14 +372,36 @@ extern char *get_emacs_configuration_options (void);
379#endif 372#endif
380 373
381/* For proper declaration of environ. */ 374/* For proper declaration of environ. */
382#include <stdlib.h>
383#ifndef sys_nerr 375#ifndef sys_nerr
384#define sys_nerr _sys_nerr 376#define sys_nerr _sys_nerr
385#endif 377#endif
386#include <string.h>
387 378
388extern int getloadavg (double *, int); 379extern int getloadavg (double *, int);
389 380
381#if defined (__MINGW32__) || _MSC_VER >= 1400
382
383/* Define to 1 if the system has the type `long long int'. */
384# define HAVE_LONG_LONG_INT 1
385
386/* Define to 1 if the system has the type `unsigned long long int'. */
387# define HAVE_UNSIGNED_LONG_LONG_INT 1
388
389#elif _MSC_VER >= 1200
390
391/* Temporarily disable wider-than-pointer integers until they're tested more.
392 Build with CFLAGS='-DWIDE_EMACS_INT' to try them out. */
393
394# ifdef WIDE_EMACS_INT
395
396/* Use pre-C99-style 64-bit integers. */
397# define EMACS_INT __int64
398# define EMACS_INT_MAX _I64_MAX
399# define pI "I64"
400
401# endif
402
403#endif
404
390/* We need a little extra space, see ../../lisp/loadup.el. */ 405/* We need a little extra space, see ../../lisp/loadup.el. */
391#define SYSTEM_PURESIZE_EXTRA 50000 406#define SYSTEM_PURESIZE_EXTRA 50000
392 407
@@ -424,5 +439,4 @@ extern void _DebPrint (const char *fmt, ...);
424#define DebPrint(stuff) 439#define DebPrint(stuff)
425#endif 440#endif
426 441
427
428/* ============================================================ */ 442/* ============================================================ */