annotate src/s/windowsnt.h @ 2500:3d8143fc88e1

[xemacs-hg @ 2005-01-24 23:33:30 by ben] get working with VC7 config.inc.samp: Declare OPTIONAL_LIBRARY_DIR as root of library directories. Redo all graphics library defaults to mirror the versions and directories in the current binary aux distribution on xemacs web site. Enable TIFF and COMPFACE by default since you can now compile with them and binary libs are provided. xemacs.mak: Put our own directories first in case of conflict (e.g. config.h in compface). xemacs.mak: Use MSVCRT to avoid link problems. s/windowsnt.h: bytecode.c, print.c: Add casts to avoid warning. compiler.h: Add MSC_VERSION and include definitions of DOESNT_RETURN and friends here, like for GCC. Need different definitions for VC7 and VC6. s/windowsnt.h: Remove stuff moved to compiler.h. Disable warning 4646 ("function declared with __declspec(noreturn) has non-void return type") on VC7 since lots of Lisp primitives trigger this and there is no easy way to kludge around the warning. glyphs-eimage.c: Some really nasty hacks to allow TIFF and JPEG to both be compiled. #### The better solution is to move the TIFF and JPEG code to different files. glyphs-msw.c: Define __STDC__ to avoid problems with compface.h. intl-auto-encap-win32.c, intl-auto-encap-win32.h, intl-encap-win32.c, syswindows.h: Those wankers at Microsoft cannot leave well enough alone. Various functions change parameter types semi-randomly between VC6 and VC7, so we need to include our own versions that can handle both kinds with appropriate casting. EmacsFrame.c, EmacsShell-sub.c, EmacsShell.c, alloc.c, alloca.c, buffer.c, bytecode.c, charset.h, chartab.c, cm.c, console-stream.c, console.c, data.c, debug.h, device-msw.c, device-tty.c, device-x.c, doprnt.c, dumper.c, dynarr.c, elhash.c, emacs.c, eval.c, event-Xt.c, event-gtk.c, event-msw.c, event-stream.c, events.c, extents.c, faces.c, file-coding.c, fileio.c, fns.c, font-lock.c, frame-gtk.c, frame-x.c, frame.c, free-hook.c, gccache-gtk.c, glyphs-eimage.c, glyphs-gtk.c, glyphs-msw.c, glyphs-x.c, glyphs.c, gtk-glue.c, gutter.c, input-method-xlib.c, insdel.c, intl-win32.c, keymap.c, lisp.h, lread.c, lstream.c, macros.c, malloc.c, menubar-gtk.c, menubar-msw.c, menubar-x.c, mule-coding.c, native-gtk-toolbar.c, number.c, objects-msw.c, objects.c, print.c, process-nt.c, process-unix.c, process.c, ralloc.c, rangetab.c, redisplay-gtk.c, redisplay-msw.c, redisplay-output.c, redisplay-tty.c, redisplay-x.c, redisplay.c, regex.c, scrollbar-gtk.c, scrollbar-x.c, search.c, select-x.c, signal.c, specifier.c, specifier.h, strftime.c, sunplay.c, symbols.c, sysdep.c, sysproc.h, text.c, text.h, toolbar-common.c, toolbar-msw.c, toolbar.c, ui-gtk.c, unexnt.c, unicode.c, win32.c, window.c, xgccache.c, s/windowsnt.h: abort() -> ABORT(). Eliminate preprocessor games with abort() since it creates huge problems in VC7, solvable only by including massive amounts of files in every compile (and not worth it).
author ben
date Mon, 24 Jan 2005 23:34:34 +0000
parents ecf1ebac70d8
children 5460287a3327
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1 /* System description file for Windows 9x and NT.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2 Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc.
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
3 Copyright (C) 2001, 2002 Ben Wing.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
4
613
023b83f4e54b [xemacs-hg @ 2001-06-10 10:42:16 by ben]
ben
parents: 535
diff changeset
5 This file is part of XEmacs.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
6
613
023b83f4e54b [xemacs-hg @ 2001-06-10 10:42:16 by ben]
ben
parents: 535
diff changeset
7 XEmacs is free software; you can redistribute it and/or modify
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
8 it under the terms of the GNU General Public License as published by
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
9 the Free Software Foundation; either version 2, or (at your option)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
10 any later version.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
11
613
023b83f4e54b [xemacs-hg @ 2001-06-10 10:42:16 by ben]
ben
parents: 535
diff changeset
12 XEmacs is distributed in the hope that it will be useful,
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
15 GNU General Public License for more details.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
16
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
17 You should have received a copy of the GNU General Public License
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
18 along with XEmacs; see the file COPYING. If not, write to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
19 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
20 Boston, MA 02111-1307, USA. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
21
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
22 /* Synched up with: FSF 19.31. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
23
2367
ecf1ebac70d8 [xemacs-hg @ 2004-11-04 23:05:23 by ben]
ben
parents: 2282
diff changeset
24 /* See win32.c for info about the different Windows files in XEmacs. */
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
25
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
26 #include "win32-native.h"
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
27
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
28 /* In case non-Microsoft compiler is used, we fake _MSC_VER */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
29 #ifndef _MSC_VER
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
30 #define _MSC_VER 1
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
31 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
32
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
33 /* Stuff from old nt/config.h: */
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
34
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
35 #define NTHEAP_PROBE_BASE 1
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
36
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
37 #ifdef HAVE_X_WINDOWS
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
38
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
39 #define HAVE_XREGISTERIMINSTANTIATECALLBACK
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
40
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
41 #define THIS_IS_X11R6
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
42 #define HAVE_XMU
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
43 #define HAVE_XLOCALE_H
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
44 #define HAVE_X11_LOCALE_H
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
45 #define GETTIMEOFDAY_ONE_ARGUMENT
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
46
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
47 #define LWLIB_USES_ATHENA
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
48 #define LWLIB_MENUBARS_LUCID
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
49 #define LWLIB_SCROLLBARS_LUCID
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
50 #define LWLIB_DIALOGS_ATHENA
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
51 #define LWLIB_TABS_LUCID
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
52 #define LWLIB_WIDGETS_ATHENA
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
53
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
54 /* These are what gets defined under Cygwin */
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
55 #define _BSD_SOURCE 1
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
56 #define _SVID_SOURCE 1
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
57 #define X_LOCALE 1
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
58 #define NARROWPROTO 1
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
59
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
60 #endif /* HAVE_X_WINDOWS */
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
61
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
62 #define HAVE_LOCALE_H
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
63 #define STDC_HEADERS
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
64
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
65 #define HAVE_LONG_FILE_NAMES
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
66
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
67 #define HAVE_TIMEVAL
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
68 #define HAVE_TZNAME
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
69 #define HAVE_H_ERRNO
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
70
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
71 #define HAVE_CLOSEDIR
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
72 #define HAVE_DUP2
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
73 #define HAVE_EXECVPE
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
74 #define HAVE_FMOD
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
75 #define HAVE_FREXP
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
76 #define HAVE_FTIME
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
77 #define HAVE_GETCWD
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
78 #define HAVE_GETHOSTNAME
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
79 #define HAVE_GETPAGESIZE
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
80 #define getpagesize() 4096
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
81 #define HAVE_GETTIMEOFDAY
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
82 #define HAVE_LINK
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
83 #define HAVE_LOGB
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
84 #define HAVE_MKDIR
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
85 #define HAVE_MKTIME
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
86 #define HAVE_RENAME
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
87 #define HAVE_RMDIR
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
88 #define HAVE_SELECT
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
89 #define HAVE_STRERROR
1257
4424541fa226 [xemacs-hg @ 2003-02-05 06:20:50 by ben]
ben
parents: 1111
diff changeset
90 #define HAVE_STRLWR
4424541fa226 [xemacs-hg @ 2003-02-05 06:20:50 by ben]
ben
parents: 1111
diff changeset
91 #define HAVE_STRUPR
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
92
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
93 #define HAVE_SOCKETS
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
94
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
95 #ifdef DEBUG_XEMACS
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
96 #define USE_ASSERTIONS
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
97 #define MEMORY_USAGE_STATS
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
98 #endif /* DEBUG_XEMACS */
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
99
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
100 #define HAVE_DRAGNDROP
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
101
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
102 #define SIZEOF_SHORT 2
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
103 #define SIZEOF_INT 4
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
104 #define SIZEOF_LONG 4
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
105 #define SIZEOF_LONG_LONG 0
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
106 #define SIZEOF_VOID_P 4
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
107
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
108 typedef int mode_t;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
109 typedef int pid_t;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
110 typedef int uid_t;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
111 typedef int gid_t;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
112 typedef int pid_t;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
113 typedef int ssize_t;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
114
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
115 /* If your system uses COFF (Common Object File Format) then define the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
116 preprocessor symbol "COFF". */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
117
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
118 #define COFF
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
119
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
120 /* define MAIL_USE_FLOCK if the mailer uses flock
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
121 to interlock access to /usr/spool/mail/$USER.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
122 The alternative is that a lock file named
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
123 /usr/spool/mail/$USER.lock. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
124
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
125 #define MAIL_USE_POP
438
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
126 #define HAVE_LOCKING
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
127 #define MAIL_USE_LOCKING
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
128
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
129 /* See unexnt.c */
827
28426972f654 [xemacs-hg @ 2002-05-06 14:14:33 by jhar]
jhar
parents: 800
diff changeset
130 #if (_MSC_VER >= 1100) && !defined(PDUMP)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
131 #define DUMP_SEPARATE_SECTION
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
132 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
133 #ifdef DUMP_SEPARATE_SECTION
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
134 #pragma data_seg("xdata")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
135 #pragma bss_seg("xdata")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
136 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
137
827
28426972f654 [xemacs-hg @ 2002-05-06 14:14:33 by jhar]
jhar
parents: 800
diff changeset
138 #ifdef emacs
28426972f654 [xemacs-hg @ 2002-05-06 14:14:33 by jhar]
jhar
parents: 800
diff changeset
139 /* intl-auto-encap-win32.[ch] assumes _WIN32_WINNT>=0x0400
28426972f654 [xemacs-hg @ 2002-05-06 14:14:33 by jhar]
jhar
parents: 800
diff changeset
140 We don't want this set when building command-line helpers in lib-src */
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
141 # ifndef _WIN32_WINNT
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
142 # define _WIN32_WINNT 0x0400
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
143 # endif
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
144 #endif
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
145
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
146 /* The VC++ (5.0, at least) headers treat WINVER non-existent as 0x0400 */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
147 #if defined (WINVER) && WINVER < 0x0400
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
148 # undef WINVER
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
149 # define WINVER 0x0400
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
150 #endif
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
151
872
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents: 827
diff changeset
152 /* Vararg routines, main(), and callback routines for library functions
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents: 827
diff changeset
153 (qsort(), signal(), etc.) need to be __cdecl if we use the fastcall
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents: 827
diff changeset
154 convention by default (a good idea, since it speeds things up). #### Why
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents: 827
diff changeset
155 do they have to complain about this? Why not just do the right thing
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents: 827
diff changeset
156 automatically?
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents: 827
diff changeset
157
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents: 827
diff changeset
158 Prefix with X because plain CDECL is already defined by the VC++ header
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents: 827
diff changeset
159 files. */
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents: 827
diff changeset
160 #define XCDECL __cdecl
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents: 827
diff changeset
161
1257
4424541fa226 [xemacs-hg @ 2003-02-05 06:20:50 by ben]
ben
parents: 1111
diff changeset
162 /* MSVC warnings no-no crap. When adding one to this section,
4424541fa226 [xemacs-hg @ 2003-02-05 06:20:50 by ben]
ben
parents: 1111
diff changeset
163 1. Think twice.
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
164 2. Insert textual description of the warning.
1257
4424541fa226 [xemacs-hg @ 2003-02-05 06:20:50 by ben]
ben
parents: 1111
diff changeset
165 3. Think again. Undo still works. */
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
166 #if (_MSC_VER >= 800)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
167
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
168 /* unnamed type definition in parentheses
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
169 (Martin added a pedantically correct definition of ALIGNOF, which
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
170 generates temporary anonymous structures, and MSVC complains) */
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
171 #pragma warning ( disable : 4116 )
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
172
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
173 #endif /* compiler understands #pragma warning*/
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
174
2500
3d8143fc88e1 [xemacs-hg @ 2005-01-24 23:33:30 by ben]
ben
parents: 2367
diff changeset
175 #if (_MSC_VER >= 1300)
3d8143fc88e1 [xemacs-hg @ 2005-01-24 23:33:30 by ben]
ben
parents: 2367
diff changeset
176 /* function declared with __declspec(noreturn) has non-void return type;
3d8143fc88e1 [xemacs-hg @ 2005-01-24 23:33:30 by ben]
ben
parents: 2367
diff changeset
177 Lisp primitives have to be declared with Lisp_Object return type or
3d8143fc88e1 [xemacs-hg @ 2005-01-24 23:33:30 by ben]
ben
parents: 2367
diff changeset
178 lots of things get very messed up */
3d8143fc88e1 [xemacs-hg @ 2005-01-24 23:33:30 by ben]
ben
parents: 2367
diff changeset
179 #pragma warning ( disable : 4646 )
3d8143fc88e1 [xemacs-hg @ 2005-01-24 23:33:30 by ben]
ben
parents: 2367
diff changeset
180 #endif
3d8143fc88e1 [xemacs-hg @ 2005-01-24 23:33:30 by ben]
ben
parents: 2367
diff changeset
181
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
182 /* MSVC version >= 2.x without /Za supports __inline */
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
183 #if (_MSC_VER < 900) || defined (__STDC__)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
184 # define inline
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
185 #else
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
186 # define inline __inline
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 613
diff changeset
187 #endif