]> cygwin.com Git - cygwin-apps/setup.git/blob - win32.h
2004-10-25 Max Bowsher <maxb@ukf.net>
[cygwin-apps/setup.git] / win32.h
1 /*
2 * Copyright (c) 2000, Red Hat, Inc.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * A copy of the GNU General Public License can be found at
10 * http://www.gnu.org/
11 *
12 * Written by DJ Delorie <dj@cygnus.com>
13 * and Robert Collins <rbtcollins@hotmail.com>
14 *
15 */
16
17 #ifndef SETUP_WIN32_H
18 #define SETUP_WIN32_H
19
20 /* The inital purpose of this file was limit the number of Win32 headers we
21 actually have to parse. The Setup program only uses a few of them,
22 so there's no point in parsing them all (even lean-n-mean). Doing
23 this cuts compile time in half. Now it's also the header for the Win32
24 class which provides runtime information about the OS
25 */
26
27 #define NOCOMATTRIBUTE
28
29 #include <stdarg.h>
30
31 #define WIN32_LEAN_AND_MEAN
32
33 /* We want a minimum IE version of 3 */
34 #define _WIN32_IE 0x0300
35
36 /* libstdc++-v3 _really_ dislikes min & max defined as macros. */
37 /* As of gcc 3.3.1, it defines NOMINMAX itself, so test first,
38 * to avoid a redefinition error */
39 #ifndef NOMINMAX
40 #define NOMINMAX
41 #endif
42
43 /* In w32api 3.1, __declspec(dllinport) decoration is added to
44 * certain symbols. This breaks our autoload mechanism - the symptom is
45 * multiple declaration errors at link time. This define turns that off again.
46 * It will default to off again in later w32api versions, but we need to work
47 * with 3.1 for now. */
48 #define WINBASEAPI
49
50 #include <windows.h>
51
52 #if HAVE_ALLOCA_H
53 #include <alloca.h>
54 #else
55 #ifndef alloca
56 #define alloca __builtin_alloca
57 #endif
58 #endif
59
60 #ifndef _MAX_PATH
61 #define _MAX_PATH MAX_PATH
62 #endif
63
64 #ifndef _access
65 #define _access access
66 #endif
67
68 #include <wininet.h>
69 #include <windowsx.h>
70
71 /* =========================== */
72 #ifdef __cplusplus
73 class Win32 {
74 public:
75 enum _os {
76 Win9x,
77 WinNT
78 };
79 static enum _os OS ();
80 };
81
82 #endif //_cplusplus
83 #endif /* SETUP_WIN32_H */
This page took 0.040506 seconds and 6 git commands to generate.