~ubuntu-branches/ubuntu/precise/boinc/precise

« back to all changes in this revision

Viewing changes to lib/boinc_win.h

Tags: 6.12.8+dfsg-1
* New upstream release.
* Simplified debian/rules

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
#ifndef _BOINC_WIN_
23
23
#define _BOINC_WIN_
24
24
 
 
25
#ifndef __CYGWIN32__
 
26
 
 
27
// Windows C Runtime Library
 
28
 
 
29
#ifndef HAVE_STD_MAX
 
30
#define HAVE_STD_MAX 1
 
31
#endif 
 
32
 
 
33
#ifndef HAVE_STD_MIN
 
34
#define HAVE_STD_MIN 1
 
35
#endif 
 
36
 
 
37
#ifndef HAVE_STD_TRANSFORM
 
38
#define HAVE_STD_TRANSFORM 1
 
39
#endif 
 
40
 
 
41
#ifndef HAVE_ALLOCA
 
42
#define HAVE_ALLOCA 1
 
43
#endif 
 
44
 
 
45
#else
 
46
 
25
47
// Under CYGWIN we need to include config.h first.
26
 
#ifdef __CYGWIN32__
27
48
#include "config.h"
 
49
 
28
50
#endif
29
51
 
30
52
// Windows System Libraries
36
58
// platforms we are going to disable the deprecation warnings if we are compiling
37
59
// on Visual Studio 2005
38
60
#if _MSC_VER >= 1400
 
61
 
39
62
#ifndef _CRT_SECURE_NO_DEPRECATE
40
63
#define _CRT_SECURE_NO_DEPRECATE
41
64
#endif
42
 
#endif
43
 
 
44
 
// Modify the following defines if you have to target a platform prior to the ones specified below.
45
 
// Refer to MSDN for the latest info on corresponding values for different platforms.
46
 
#ifndef WINVER                  // Allow use of features specific to Windows 95 and Windows NT 4 or later.
47
 
#define WINVER 0x0400           // Change this to the appropriate value to target Windows 98 and Windows 2000 or later.
48
 
#endif
49
 
 
50
 
#ifndef _WIN32_WINNT            // Allow use of features specific to Windows NT 4 or later.
51
 
#define _WIN32_WINNT 0x0400             // Change this to the appropriate value to target Windows 98 and Windows 2000 or later.
52
 
#endif
53
 
 
54
 
#ifndef _WIN32_WINDOWS          // Allow use of features specific to Windows 98 or later.
55
 
#define _WIN32_WINDOWS 0x0400   // Change this to the appropriate value to target Windows Me or later.
56
 
#endif
57
 
 
58
 
#ifndef _WIN32_IE               // Allow use of features specific to IE 4.0 or later.
59
 
#define _WIN32_IE 0x0500        // Change this to the appropriate value to target IE 5.0 or later.
60
 
#endif
61
 
 
62
 
#ifndef WIN32_LEAN_AND_MEAN
63
 
#define WIN32_LEAN_AND_MEAN     // This trims down the windows libraries.
64
 
#endif
65
 
 
66
 
#ifndef WIN32_EXTRA_LEAN
67
 
#define WIN32_EXTRA_LEAN        // Trims even farther.
 
65
 
 
66
#ifndef _CRT_SECURE_NO_WARNINGS
 
67
#define _CRT_SECURE_NO_WARNINGS
 
68
#endif
 
69
 
 
70
#endif
 
71
 
 
72
// Target Windows 2000 or better with Internet Explorer 5.01 or better
 
73
#ifndef WINVER
 
74
#define WINVER 0x0500
 
75
#endif
 
76
#ifndef _WIN32_WINNT
 
77
#define _WIN32_WINNT 0x0500
 
78
#endif
 
79
#ifndef _WIN32_WINDOWS
 
80
#define _WIN32_WINDOWS 0x0500
 
81
#endif
 
82
#ifndef _WIN32_IE
 
83
#define _WIN32_IE 0x0501
68
84
#endif
69
85
 
70
86
#include <windows.h>
72
88
#include <shlobj.h>
73
89
#include <userenv.h>
74
90
#include <aclapi.h>
 
91
#include <iphlpapi.h>
75
92
 
76
93
#if !defined(__CYGWIN32__) || defined(USE_WINSOCK)
77
94
 
108
125
 
109
126
#include <commctrl.h>
110
127
#include <raserror.h>
 
128
#if defined(__MINGW32__)
 
129
#include <stdint.h>
 
130
#include <imagehlp.h>
 
131
#else
111
132
#include <dbghelp.h>
 
133
#endif
112
134
#include <tlhelp32.h>
113
135
 
114
136
#include <io.h>
141
163
// C headers
142
164
#include <sys/stat.h>
143
165
#include <sys/types.h>
 
166
#if !defined(__MINGW32__)
144
167
#include <fcntl.h>
 
168
#endif
145
169
#include <malloc.h>
146
170
 
147
171
#if !defined(__MINGW32__) && !defined(__CYGWIN32__)
150
174
#endif
151
175
 
152
176
#ifdef __cplusplus
 
177
#include <algorithm>
153
178
#include <cassert>
154
179
#include <cctype>
155
180
#include <cerrno>
192
217
#include <list>
193
218
#include <map>
194
219
#include <set>
 
220
#include <stdexcept>
195
221
#endif
196
222
 
 
223
// Define a generic string type that can be a Unicode string on
 
224
// Unicode builds and an ANSI string on ANSI builds
 
225
//
 
226
#ifdef _UNICODE
 
227
#define tstring std::wstring
 
228
#else
 
229
#define tstring std::string
 
230
#endif
197
231
 
198
232
#ifndef SIGRTMAX
199
233
#if defined(_SIGRTMAX)
205
239
#endif
206
240
#endif
207
241
 
208
 
 
209
 
#ifndef __CYGWIN__
210
 
 
211
 
#define vsnprintf               _vsnprintf
212
 
#define snprintf                _snprintf
213
 
#define stprintf                _stprintf
214
 
#define stricmp                                 _stricmp
215
 
#define strdup                                  _strdup
216
 
#define fdopen                                  _fdopen
217
 
#define dup                                             _dup
218
 
#define unlink                                  _unlink
219
 
#define read                                    _read
220
 
#define stat                                    _stat
221
 
#define chdir                                   _chdir
222
 
#define finite                                  _finite
223
 
#define strdate                 _strdate
224
 
#define strtime                 _strtime
225
 
#define getcwd                  _getcwd
226
 
 
227
 
#endif
228
 
 
229
242
#ifndef __GNUC__
230
243
#define __attribute__(x)
231
244
#endif
236
249
#endif
237
250
void __cdecl _fpreset (void);
238
251
void __cdecl fpreset (void);
 
252
#if (__GNUC__ < 4) // breaks build on MinGW gcc-4
239
253
#define SetClassLongPtr SetClassLong
240
254
#define GCLP_HICON GCL_HICON
241
255
#define GCLP_HICONSM GCL_HICONSM
 
256
#endif //GNUC
242
257
#ifdef __cplusplus
243
258
}
244
 
#endif
245
 
#endif
 
259
#endif //cplusplus
 
260
#endif //MINGW
246
261
 
247
262
// On the Win32 platform include file and line number information for each
248
263
//   memory allocation/deallocation