* nt/config.nt: (mode_t) [!__GNUC__]: Define mode_t for MSVC.
[bpt/emacs.git] / nt / config.nt
1 /* GNU Emacs site configuration template file. -*- C -*-
2
3 Copyright (C) 1988, 1993-1994, 2001-2011 Free Software Foundation, Inc.
4
5 This file is part of GNU Emacs.
6
7 GNU Emacs is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11
12 GNU Emacs is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
19
20
21 /* No code in Emacs #includes config.h twice, but some of the code
22 intended to work with other packages as well (like gmalloc.c)
23 think they can include it as many times as they like. */
24 #ifndef EMACS_CONFIG_H
25 #define EMACS_CONFIG_H
26
27 /* These are all defined in the top-level Makefile by configure.
28 They're here only for reference. */
29
30 /* Define LISP_FLOAT_TYPE if you want emacs to support floating-point
31 numbers. */
32 #undef LISP_FLOAT_TYPE
33
34 /* Define GNU_MALLOC if you want to use the GNU memory allocator. */
35 #define GNU_MALLOC
36
37 /* Define if you are using the GNU C Library. */
38 #undef DOUG_LEA_MALLOC
39
40 /* Define REL_ALLOC if you want to use the relocating allocator for
41 buffer space. */
42 #define REL_ALLOC
43
44 /* Enable conservative stack marking for GC. */
45 #define GC_MARK_STACK 1
46
47 /* MSVC ignores the "register" keyword, so test fails even though
48 setjmp does work. */
49 #define GC_SETJMP_WORKS 1
50
51 /* Define HAVE_X_WINDOWS if you want to use the X window system. */
52 #undef HAVE_X_WINDOWS
53
54 /* Define HAVE_X11 if you want to use version 11 of X windows.
55 Otherwise, Emacs expects to use version 10. */
56 #undef HAVE_X11
57
58 /* Define if using an X toolkit. */
59 #undef USE_X_TOOLKIT
60
61 /* Define this if you're using XFree386. */
62 #undef HAVE_XFREE386
63
64 /* Define this if you have Motif 2.1 or newer. */
65 #undef HAVE_MOTIF_2_1
66
67 /* Define HAVE_MENUS if you have mouse menus.
68 (This is automatic if you use X, but the option to specify it remains.)
69 It is also defined with other window systems that support xmenu.c. */
70 #undef HAVE_MENUS
71
72 /* Define if we have the X11R6 or newer version of Xt. */
73 #undef HAVE_X11XTR6
74
75 /* Define if we have the X11R6 or newer version of Xlib. */
76 #undef HAVE_X11R6
77
78 /* Define if netdb.h declares h_errno. */
79 #undef HAVE_H_ERRNO
80
81 /* If we're using any sort of window system, define some consequences. */
82 #ifdef HAVE_X_WINDOWS
83 #define HAVE_WINDOW_SYSTEM
84 #define HAVE_MOUSE
85 #endif
86
87 /* Define USE_TEXT_PROPERTIES to support visual and other properties
88 on text. */
89 #define USE_TEXT_PROPERTIES
90
91 /* Define USER_FULL_NAME to return a string
92 that is the user's full name.
93 It can assume that the variable `pw'
94 points to the password file entry for this user.
95
96 At some sites, the pw_gecos field contains
97 the user's full name. If neither this nor any other
98 field contains the right thing, use pw_name,
99 giving the user's login name, since that is better than nothing. */
100 #define USER_FULL_NAME pw->pw_gecos
101
102 /* Define AMPERSAND_FULL_NAME if you use the convention
103 that & in the full name stands for the login id. */
104 #undef AMPERSAND_FULL_NAME
105
106 /* Things set by --with options in the configure script. */
107
108 /* Define to support POP mail retrieval. */
109 #undef MAIL_USE_POP
110
111 /* Define to support Kerberos-authenticated POP mail retrieval. */
112 #undef KERBEROS
113 /* Define to use Kerberos 5 instead of Kerberos 4 */
114 #undef KERBEROS5
115 /* Define to support GSS-API in addition to (or instead of) Kerberos */
116 #undef GSSAPI
117
118 /* Define to support using a Hesiod database to find the POP server. */
119 #undef HESIOD
120
121 /* Some things figured out by the configure script, grouped as they are in
122 configure.in. */
123 #ifndef _ALL_SOURCE /* suppress warning if this is pre-defined */
124 #undef _ALL_SOURCE
125 #endif
126 #undef HAVE_SYS_SELECT_H
127 #undef HAVE_SYS_TIMEB_H
128 #undef HAVE_SYS_TIME_H
129 #undef HAVE_UNISTD_H
130 #undef HAVE_UTIME_H
131 #undef HAVE_LINUX_VERSION_H
132 #undef HAVE_SYS_SYSTEMINFO_H
133 #undef HAVE_TERMIOS_H
134 #undef HAVE_STRINGS_H
135 #undef HAVE_PWD_H
136
137 #undef HAVE_LIBDNET
138 #undef HAVE_LIBPTHREADS
139 #undef HAVE_LIBRESOLV
140 #undef HAVE_LIBXMU
141 #undef HAVE_LIBNCURSES
142 #undef HAVE_LIBINTL
143
144 /* movemail Kerberos support */
145 /* libraries */
146 #undef HAVE_LIBKRB
147 #undef HAVE_LIBKRB4
148 #undef HAVE_LIBDES
149 #undef HAVE_LIBDES425
150 #undef HAVE_LIBKRB5
151 #undef HAVE_LIBCRYPTO
152 #undef HAVE_LIBCOM_ERR
153 /* header files */
154 #undef HAVE_KRB5_H
155 #undef HAVE_DES_H
156 #undef HAVE_KRB_H
157 #undef HAVE_KERBEROSIV_DES_H
158 #undef HAVE_KERBEROSIV_KRB_H
159 #undef HAVE_KERBEROS_DES_H
160 #undef HAVE_KERBEROS_KRB_H
161 #undef HAVE_COM_ERR_H
162
163 /* GSS-API libraries and headers */
164 #undef HAVE_LIBGSSAPI_KRB5
165 #undef HAVE_LIBGSSAPI
166 #undef HAVE_GSSAPI_H
167
168 /* Mail-file locking */
169 #undef HAVE_LIBMAIL
170 #undef HAVE_MAILLOCK_H
171 #undef HAVE_TOUCHLOCK
172
173 #undef HAVE_ALLOCA_H
174
175 #undef HAVE_GETTIMEOFDAY
176 /* If we don't have gettimeofday,
177 the test for GETTIMEOFDAY_ONE_ARGUMENT may succeed,
178 but we should ignore it. */
179 #ifdef HAVE_GETTIMEOFDAY
180 #undef GETTIMEOFDAY_ONE_ARGUMENT
181 #endif
182 #undef HAVE_GETHOSTNAME
183 #undef HAVE_GETDOMAINNAME
184 #undef HAVE_DUP2
185 #undef HAVE_RENAME
186 #undef HAVE_CLOSEDIR
187
188 #undef TM_IN_SYS_TIME
189 #undef HAVE_TM_ZONE
190
191 /* Define to 1 if you don't have `tm_zone' but do have the external array
192 `tzname'. */
193 #define HAVE_TZNAME 1
194
195 /* Define to 1 if you have the declaration of `tzname', and to 0 if you don't.
196 */
197 #define HAVE_DECL_TZNAME 1
198
199 #undef const
200
201 #undef HAVE_LONG_FILE_NAMES
202
203 #undef CRAY_STACKSEG_END
204
205 #undef HAVE_LIBXBSD
206 #undef HAVE_XRMSETDATABASE
207 #undef HAVE_XSCREENRESOURCESTRING
208 #undef HAVE_XSCREENNUMBEROFSCREEN
209 #undef HAVE_XSETWMPROTOCOLS
210
211 #undef HAVE_MKDIR
212 #undef HAVE_RMDIR
213 #undef HAVE_SYSINFO
214 #undef HAVE_RANDOM
215 #undef HAVE_LRAND48
216 #undef HAVE_MEMCPY
217 #undef HAVE_MEMMOVE
218 #undef HAVE_MEMSET
219 #undef HAVE_MEMCMP
220 #undef HAVE_LOGB
221 #undef HAVE_FREXP
222 #undef HAVE_FMOD
223 #undef HAVE_RINT
224 #undef HAVE_CBRT
225 #undef HAVE_FTIME
226 #undef HAVE_RES_INIT /* For -lresolv on Suns. */
227 #undef HAVE_SETSID
228 #undef HAVE_FPATHCONF
229 #undef HAVE_SELECT
230 #undef HAVE_EUIDACCESS
231 #undef HAVE_GETPAGESIZE
232 #undef HAVE_GET_CURRENT_DIR_NAME
233 #undef HAVE_TZSET
234 #undef HAVE_SETLOCALE
235 #undef HAVE_UTIMES
236 #undef HAVE_SETRLIMIT
237 #undef HAVE_SETPGID
238 #undef HAVE_GETCWD
239 #undef HAVE_SHUTDOWN
240 #undef HAVE_STRFTIME
241 /* Standard Windows strftime does not support POSIX.2 extensions. */
242 #define STRFTIME_NO_POSIX2 1
243
244 #define HAVE_SENDTO 1
245 #define HAVE_RECVFROM 1
246 #define HAVE_GETSOCKOPT 1
247 #define HAVE_SETSOCKOPT 1
248 #define HAVE_GETSOCKNAME 1
249 #define HAVE_GETPEERNAME 1
250 #define HAVE_SNPRINTF 1
251 #define HAVE_LANGINFO_CODESET 1
252 /* Local (unix) sockets are not supported. */
253 #undef HAVE_SYS_UN_H
254
255 #define LOCALTIME_CACHE
256 #undef HAVE_INET_SOCKETS
257
258 #undef HAVE_AIX_SMT_EXP
259
260 /* Define if you have the ANSI `strerror' function.
261 Otherwise you must have the variable `char *sys_errlist[]'. */
262 #undef HAVE_STRERROR
263
264 /* Define if `sys_siglist' is declared by <signal.h>. */
265 #undef SYS_SIGLIST_DECLARED
266
267 /* Define if `struct utimbuf' is declared by <utime.h>. */
268 #undef HAVE_STRUCT_UTIMBUF
269
270 /* Define if `struct timeval' is declared by <sys/time.h>. */
271 #undef HAVE_TIMEVAL
272
273 /* Define to 1 if you have the <getopt.h> header file. */
274 #undef HAVE_GETOPT_H
275
276 /* Define to 1 if you have the `getopt_long_only' function. */
277 #undef HAVE_GETOPT_LONG_ONLY
278
279 /* Preprocessor macros needed for gnulib imports. */
280
281 /* Define to 1 if GCC-style __attribute__ ((__aligned__ (expr))) works. */
282 #ifdef __GNUC__
283 #define HAVE_ATTRIBUTE_ALIGNED 1
284 #else
285 #undef HAVE_ATTRIBUTE_ALIGNED
286 #endif
287
288 /* Define to 1 if strtold conforms to C99. */
289 #ifdef __GNUC__
290 #define HAVE_C99_STRTOLD 1
291 #else
292 #undef HAVE_C99_STRTOLD
293 #endif
294
295 /* Define to 1 if you have the declaration of `getenv', and to 0 if you don't.
296 */
297 #define HAVE_DECL_GETENV 1
298
299 /* Define to 1 if you have the declaration of `localtime_r', and to 0 if you
300 don't. */
301 #undef HAVE_DECL_LOCALTIME_R
302
303 /* Define to 1 if you have the `localtime_r' function. */
304 #undef HAVE_LOCALTIME_R
305
306 /* Define to 1 if you have the declaration of `strtoull', and to 0 if you
307 don't. */
308 #define HAVE_DECL_STRTOULL 1
309
310 /* Define to 1 if you have the declaration of `strtoumax', and to 0 if you
311 don't. */
312 #define HAVE_DECL_STRTOUMAX 1
313
314 /* Define to 1 if you have the `strtoull' function. */
315 #define HAVE_STRTOULL 1
316
317 /* Define to 1 if you have the `strtoumax' function. */
318 #define HAVE_STRTOUMAX 1
319
320 /* Define if you have the 'wchar_t' type. */
321 #define HAVE_WCHAR_T 1
322
323 /* Name of package */
324 #define PACKAGE "emacs"
325
326 /* Version number of package */
327 #define VERSION "24.0.91"
328
329 /* Define to `__inline__' or `__inline' if that's what the C compiler
330 calls it, or to nothing if 'inline' is not supported under any name. */
331 #ifdef __GNUC__
332 #ifndef __cplusplus
333 #undef inline
334 #endif
335 #else /* MSVC */
336 #define inline __inline
337 #endif
338
339 /* Define to the equivalent of the C99 'restrict' keyword, or to
340 nothing if this is not supported. Do not define if restrict is
341 supported directly. */
342 #ifdef __GNUC__
343 # define restrict __restrict__
344 #else
345 # define restrict
346 #endif
347
348 /* Define to `int' if <sys/types.h> does not define. */
349 #ifdef __GNUC__
350 /* No action required for gcc */
351 #else /* MSVC */
352 #define mode_t int
353 #endif
354
355 /* A va_copy replacement for MSVC. */
356 #ifdef _MSC_VER
357 # ifdef _WIN64
358 # ifndef va_copy
359 # error "va_copy is needed, but not defined!"
360 # endif
361 # else /* not _WIN64 */
362 # define va_copy(d,s) ((d) = (s))
363 # endif /* not _WIN64 */
364 #endif /* _MSC_VER */
365
366 /* Define as a marker that can be attached to declarations that might not
367 be used. This helps to reduce warnings, such as from
368 GCC -Wunused-parameter. */
369 #if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
370 # define _GL_UNUSED __attribute__ ((__unused__))
371 #else
372 # define _GL_UNUSED
373 #endif
374 /* The name _UNUSED_PARAMETER_ is an earlier spelling, although the name
375 is a misnomer outside of parameter lists. */
376 #define _UNUSED_PARAMETER_ _GL_UNUSED
377
378 /* End of gnulib-related stuff. */
379
380 #if __GNUC__ >= 3 /* On GCC 3.0 we might get a warning. */
381 #define NO_INLINE __attribute__((noinline))
382 #else
383 #define NO_INLINE
384 #endif
385
386 #if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1))
387 #define EXTERNALLY_VISIBLE __attribute__((externally_visible))
388 #else
389 #define EXTERNALLY_VISIBLE
390 #endif
391
392 #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
393 # define ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec))
394 #else
395 # define ATTRIBUTE_FORMAT(spec) /* empty */
396 #endif
397
398 #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)
399 # define ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \
400 ATTRIBUTE_FORMAT ((__gnu_printf__, formatstring_parameter, first_argument))
401 #else
402 # define ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \
403 ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument))
404 #endif
405
406 #if (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8))
407 #define HAVE___BUILTIN_UNWIND_INIT 1
408 #endif
409
410 #undef EMACS_CONFIGURATION
411
412 #undef EMACS_CONFIG_OPTIONS
413
414 /* The configuration script defines opsysfile to be the name of the
415 s/SYSTEM.h file that describes the system type you are using. The file
416 is chosen based on the configuration name you give.
417
418 See the file ../etc/MACHINES for a list of systems and the
419 configuration names to use for them.
420
421 See s/template.h for documentation on writing s/SYSTEM.h files. */
422 #undef config_opsysfile
423 #include "s/ms-w32.h"
424
425 /* The configuration script defines machfile to be the name of the
426 m/MACHINE.h file that describes the machine you are using. The file is
427 chosen based on the configuration name you give.
428
429 See the file ../etc/MACHINES for a list of machines and the
430 configuration names to use for them.
431
432 See m/template.h for documentation on writing m/MACHINE.h files. */
433 #undef config_machfile
434 #include "m/intel386.h"
435
436 /* Define `subprocesses' should be defined if you want to
437 have code for asynchronous subprocesses
438 (as used in M-x compile and M-x shell).
439 Only MSDOS does not support this. */
440
441 #define subprocesses
442
443 /* Define STACK_DIRECTION here, but not if m/foo.h did. */
444 #ifndef STACK_DIRECTION
445 #undef STACK_DIRECTION
446 #endif
447
448 #ifdef emacs /* Don't do this for lib-src. */
449 /* Tell regex.c to use a type compatible with Emacs. */
450 #define RE_TRANSLATE_TYPE Lisp_Object
451 #define RE_TRANSLATE(TBL, C) CHAR_TABLE_TRANSLATE (TBL, C)
452 #define RE_TRANSLATE_P(TBL) (XFASTINT (TBL) != 0)
453 #endif
454
455 #define my_strftime nstrftime /* for strftime.c */
456
457 /* Define to the type of st_nlink in struct stat, or a supertype. */
458 #define nlink_t short
459
460 #ifndef WINDOWSNT
461 /* Some of the files of Emacs which are intended for use with other
462 programs assume that if you have a config.h file, you must declare
463 the type of getenv. */
464 extern char *getenv ();
465 #endif
466
467 #endif /* EMACS_CONFIG_H */
468
469 /* These default definitions are good for almost all machines.
470 The exceptions override them in m/MACHINE.h. */
471
472 #ifndef BITS_PER_CHAR
473 #define BITS_PER_CHAR 8
474 #endif
475
476 #ifndef BITS_PER_SHORT
477 #define BITS_PER_SHORT 16
478 #endif
479
480 /* Note that lisp.h uses this in a preprocessor conditional, so it
481 would not work to use sizeof. That being so, we do all of them
482 without sizeof, for uniformity's sake. */
483 #ifndef BITS_PER_INT
484 #define BITS_PER_INT 32
485 #endif
486
487 #ifndef BITS_PER_LONG
488 #define BITS_PER_LONG 32
489 #endif
490
491 #if defined (__MINGW32__) || _MSC_VER >= 1400
492
493 /* Define to 1 if the system has the type `long long int'. */
494 # define HAVE_LONG_LONG_INT 1
495
496 /* Define to 1 if the system has the type `unsigned long long int'. */
497 # define HAVE_UNSIGNED_LONG_LONG_INT 1
498
499 #elif _MSC_VER >= 1200
500
501 /* Temporarily disable wider-than-pointer integers until they're tested more.
502 Build with CFLAGS='-DWIDE_EMACS_INT' to try them out. */
503 /* #undef WIDE_EMACS_INT */
504
505 # ifdef WIDE_EMACS_INT
506
507 /* Use pre-C99-style 64-bit integers. */
508 # define EMACS_INT __int64
509 # define BITS_PER_EMACS_INT 64
510 # define pI "I64"
511
512 # endif
513
514 #endif
515
516 #ifndef POINTER_TYPE
517 #define POINTER_TYPE void
518 #endif
519
520 #ifndef PROTOTYPES
521 #define PROTOTYPES 1
522 #endif
523
524 #include "string.h"
525 #ifdef HAVE_STRINGS_H
526 #include "strings.h"
527 #endif
528 #include <stdlib.h>
529
530 #ifndef NO_RETURN
531 #if defined __GNUC__ && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR >= 5))
532 #define NO_RETURN __attribute__ ((__noreturn__))
533 #else
534 #define NO_RETURN /* nothing */
535 #endif
536 #endif
537
538 /* Redefine abort. */
539 #ifdef HAVE_NTGUI
540 #define abort w32_abort
541 void w32_abort (void) NO_RETURN;
542 #endif
543
544 /* Prevent accidental use of features unavailable in
545 older Windows versions we still support. */
546 #define _WIN32_WINNT 0x0400
547
548 /* Make a leaner executable. */
549 #define WIN32_LEAN_AND_MEAN 1