comparison src/syswindows.h @ 5022:cfe36e196dc7

long comment in syswindows.h about build constants -------------------- ChangeLog entries follow: -------------------- src/ChangeLog addition: 2010-02-09 Ben Wing <ben@xemacs.org> * syswindows.h: Create a long comment about build flags such as WIN32_NATIVE, HAVE_MS_WINDOWS.
author Ben Wing <ben@xemacs.org>
date Tue, 09 Feb 2010 19:07:36 -0600
parents 4cfb6aeb989d
children d2c3bac89ba0 d4f666cda5e6
comparison
equal deleted inserted replaced
5021:4e784bfabae7 5022:cfe36e196dc7
17 along with XEmacs; see the file COPYING. If not, write to 17 along with XEmacs; see the file COPYING. If not, write to
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. */ 19 Boston, MA 02111-1307, USA. */
20 20
21 /* Synched up with: Not in FSF. */ 21 /* Synched up with: Not in FSF. */
22
23 #ifndef INCLUDED_syswindows_h_
24 #define INCLUDED_syswindows_h_
22 25
23 /* Authorship: 26 /* Authorship:
24 27
25 Current primary author: Ben Wing <ben@xemacs.org> 28 Current primary author: Ben Wing <ben@xemacs.org>
26 29
34 incomplete synching, so beware.) 37 incomplete synching, so beware.)
35 (in ntheap.h only) Geoff Voelker (voelker@cs.washington.edu) 7-29-94 38 (in ntheap.h only) Geoff Voelker (voelker@cs.washington.edu) 7-29-94
36 39
37 */ 40 */
38 41
39 #ifndef INCLUDED_syswindows_h_
40 #define INCLUDED_syswindows_h_
41
42 /* See win32.c for info about the different Windows files in XEmacs. */ 42 /* See win32.c for info about the different Windows files in XEmacs. */
43
44 /*
45 A capsule introduction to Windows-related build flags:
46
47 See also: (Info-goto-node "(internals)Windows Build Flags")
48
49 1. Operating-system level:
50 --------------------------
51
52 `CYGWIN' Compiled for Cygwin. Cygwin provides a full Unix-like
53 environment under Windows. Applications compiled for Cygwin
54 are linked with CYGWIN1.DLL, which provides the POSIX
55 emulation.
56
57 Corresponding s/ file: s/cygwin32.h
58
59 `MINGW' Compiled for MinGW. MinGW is a Unix-like environment under
60 Windows that allows for the use of `gcc' to create fully
61 native Windows applications that link with the normal
62 Microsoft C-runtime library (e.g. MSVCRT.DLL), and don't
63 require a special POSIX-emulation DLL (e.g. CYGWIN1.DLL).
64 Conversely, the only POSIX-like services available are
65 those in MSVCRT.DLL, which isn't much. Essentially, coding
66 for MinGW is identical to coding for native Windows using
67 Visual C++ or the like, whereas coding for Cygwin is like
68 coding for Linux, but with the additional possibility of
69 making Win32-API calls. Additional confusion comes from
70 the fact that you can use the Cygwin environment and
71 compilers to build a MINGW application (e.g. by passing the
72 `-mno-cygwin' command-line argument to `gcc').
73
74 Corresponding s/ file: s/mingw32.h
75
76 (none) There's no flag to indicate that you are specifically
77 targetting native Windows and not doing this with MINGW.
78 Presumably this means you're using Visual C++.
79
80 Corresponding s/ file: s/windowsnt.h
81
82 `WIN32_ANY' Any of the above three environments.
83
84 Corresponding s/ file: s/win32-common.h
85
86 `WIN32_NATIVE'
87 Native Windows target, either MinGW or Visual C++.
88 That is, not Cygwin.
89
90 Corresponding s/ file: s/win32-native.h
91
92
93 2. Compiler level:
94 ------------------
95
96 `__GNUC__' Defined whenever compiling with gcc (Cygwin or MinGW).
97
98 `_MSC_VER' Defined whenever compiling with Visual C++.
99
100 `CYGWIN_HEADERS'
101 Defined whenever using Cygwin-style header files rather
102 than Visual C++ headers. Currently this means the same
103 as "Cygwin or MinGW" and the same as "compiling with gcc".
104 This applies especially to the header files in
105 /usr/include/w32api, which is a free replacement for the
106 standard Visual C++ headers for the Win32 API.
107
108
109 3. Window-system level:
110 -----------------------
111
112 `HAVE_MS_WINDOWS'
113 MS Windows native windowing system (anything related to the
114 appearance of the graphical screen). May or may not apply
115 to any of VC++, MinGW, or Cygwin. For example, it's
116 definitely possible to compile XEmacs under Cygwin with
117 support for X-Windows frames and TTY frames, but no
118 native MS Windows frames. It may also be possible to do that
119 under MinGW or (less likely, but feasible) Visual C++.
120
121 `HAVE_X_WINDOWS'
122 Support for X-Windows frames, regardless of whether under
123 MS Windows. You can certainly compile XEmacs with support
124 for X-Windows frames when running on MS Windows, using Cygwin.
125
126 `HAVE_GTK', `HAVE_TTY'
127 Likewise. All are available on MS Windows with Cygwin.
128
129 Note further that more than one of these can be defined at the same time.
130 In fact, in general, it's possible to compile with support for all of
131 these at the same time.
132
133 */
43 134
44 /* ------------------------- Basic includes ------------------------- */ 135 /* ------------------------- Basic includes ------------------------- */
45 136
46 #ifndef WIN32_LEAN_AND_MEAN 137 #ifndef WIN32_LEAN_AND_MEAN
47 #define WIN32_LEAN_AND_MEAN 138 #define WIN32_LEAN_AND_MEAN