1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
|
/* This is an implementation of the threads API of POSIX 1003.1-2001.
*
* --------------------------------------------------------------------------
*
* Pthreads-win32 - POSIX Threads Library for Win32
* Copyright(C) 1998 John E. Bossom
* Copyright(C) 1999,2012 Pthreads-win32 contributors
*
* Homepage1: http://sourceware.org/pthreads-win32/
* Homepage2: http://sourceforge.net/projects/pthreads4w/
*
* The current list of contributors is contained
* in the file CONTRIBUTORS included with the source
* code distribution. The list can also be seen at the
* following World Wide Web location:
* http://sources.redhat.com/pthreads-win32/contributors.html
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library in the file COPYING.LIB;
* if not, write to the Free Software Foundation, Inc.,
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#include <winver.h>
#include "pthread.h"
/*
* Note: the correct __CLEANUP_* macro must be defined corresponding to
* the definition used for the object file builds. This is done in the
* relevent makefiles for the command line builds, but users should ensure
* that their resource compiler knows what it is too.
* If using the default (no __CLEANUP_* defined), pthread.h will define it
* as __CLEANUP_C.
*/
#if defined(PTW32_RC_MSC)
# if defined(PTW32_ARCHx64)
# define PTW32_ARCH "x64"
# elif defined(PTW32_ARCHx86)
# define PTW32_ARCH "x86"
# endif
# if defined(__CLEANUP_C)
# define PTW32_VERSIONINFO_NAME "pthreadVC2.DLL\0"
# define PTW32_VERSIONINFO_DESCRIPTION "MS C " PTW32_ARCH "\0"
# elif defined(__CLEANUP_CXX)
# define PTW32_VERSIONINFO_NAME "pthreadVCE2.DLL\0"
# define PTW32_VERSIONINFO_DESCRIPTION "MS C++ " PTW32_ARCH "\0"
# elif defined(__CLEANUP_SEH)
# define PTW32_VERSIONINFO_NAME "pthreadVSE2.DLL\0"
# define PTW32_VERSIONINFO_DESCRIPTION "MS C SEH " PTW32_ARCH "\0"
# else
# error Resource compiler doesn't know which cleanup style you're using - see version.rc
# endif
#elif defined(__GNUC__)
# if defined(_M_X64)
# define PTW32_ARCH "x64 (mingw64)"
# else
# define PTW32_ARCH "x86 (mingw32)"
# endif
# if defined(__CLEANUP_C)
# define PTW32_VERSIONINFO_NAME "pthreadGC2.DLL\0"
# define PTW32_VERSIONINFO_DESCRIPTION "GNU C " PTW32_ARCH "\0"
# elif defined(__CLEANUP_CXX)
# define PTW32_VERSIONINFO_NAME "pthreadGCE2.DLL\0"
# define PTW32_VERSIONINFO_DESCRIPTION "GNU C++ " PTW32_ARCH "\0"
# else
# error Resource compiler doesn't know which cleanup style you're using - see version.rc
# endif
#elif defined(__BORLANDC__)
# if defined(_M_X64)
# define PTW32_ARCH "x64 (Borland)"
# else
# define PTW32_ARCH "x86 (Borland)"
# endif
# if defined(__CLEANUP_C)
# define PTW32_VERSIONINFO_NAME "pthreadBC2.DLL\0"
# define PTW32_VERSIONINFO_DESCRIPTION "BORLAND C " PTW32_ARCH "\0"
# elif defined(__CLEANUP_CXX)
# define PTW32_VERSIONINFO_NAME "pthreadBCE2.DLL\0"
# define PTW32_VERSIONINFO_DESCRIPTION "BORLAND C++ " PTW32_ARCH "\0"
# else
# error Resource compiler doesn't know which cleanup style you're using - see version.rc
# endif
#elif defined(__WATCOMC__)
# if defined(_M_X64)
# define PTW32_ARCH "x64 (Watcom)"
# else
# define PTW32_ARCH "x86 (Watcom)"
# endif
# if defined(__CLEANUP_C)
# define PTW32_VERSIONINFO_NAME "pthreadWC2.DLL\0"
# define PTW32_VERSIONINFO_DESCRIPTION "WATCOM C " PTW32_ARCH "\0"
# elif defined(__CLEANUP_CXX)
# define PTW32_VERSIONINFO_NAME "pthreadWCE2.DLL\0"
# define PTW32_VERSIONINFO_DESCRIPTION "WATCOM C++ " PTW32_ARCH "\0"
# else
# error Resource compiler doesn't know which cleanup style you're using - see version.rc
# endif
#else
# error Resource compiler doesn't know which compiler you're using - see version.rc
#endif
VS_VERSION_INFO VERSIONINFO
FILEVERSION PTW32_VERSION
PRODUCTVERSION PTW32_VERSION
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
FILEFLAGS 0
FILEOS VOS__WINDOWS32
FILETYPE VFT_DLL
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "ProductName", "POSIX Threads for Windows LPGL\0"
VALUE "ProductVersion", PTW32_VERSION_STRING
VALUE "FileVersion", PTW32_VERSION_STRING
VALUE "FileDescription", PTW32_VERSIONINFO_DESCRIPTION
VALUE "InternalName", PTW32_VERSIONINFO_NAME
VALUE "OriginalFilename", PTW32_VERSIONINFO_NAME
VALUE "CompanyName", "Open Source Software community LGPL\0"
VALUE "LegalCopyright", "Copyright (C) Project contributors 2012\0"
VALUE "Comments", "http://sourceware.org/pthreads-win32/\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
/*
VERSIONINFO Resource
The VERSIONINFO resource-definition statement creates a version-information
resource. The resource contains such information about the file as its
version number, its intended operating system, and its original filename.
The resource is intended to be used with the Version Information functions.
versionID VERSIONINFO fixed-info { block-statement...}
versionID
Version-information resource identifier. This value must be 1.
fixed-info
Version information, such as the file version and the intended operating
system. This parameter consists of the following statements.
Statement Description
--------------------------------------------------------------------------
FILEVERSION
version Binary version number for the file. The version
consists of two 32-bit integers, defined by four
16-bit integers. For example, "FILEVERSION 3,10,0,61"
is translated into two doublewords: 0x0003000a and
0x0000003d, in that order. Therefore, if version is
defined by the DWORD values dw1 and dw2, they need
to appear in the FILEVERSION statement as follows:
HIWORD(dw1), LOWORD(dw1), HIWORD(dw2), LOWORD(dw2).
PRODUCTVERSION
version Binary version number for the product with which the
file is distributed. The version parameter is two
32-bit integers, defined by four 16-bit integers.
For more information about version, see the
FILEVERSION description.
FILEFLAGSMASK
fileflagsmask Bits in the FILEFLAGS statement are valid. If a bit
is set, the corresponding bit in FILEFLAGS is valid.
FILEFLAGSfileflags Attributes of the file. The fileflags parameter must
be the combination of all the file flags that are
valid at compile time. For 16-bit Windows, this
value is 0x3f.
FILEOSfileos Operating system for which this file was designed.
The fileos parameter can be one of the operating
system values given in the Remarks section.
FILETYPEfiletype General type of file. The filetype parameter can be
one of the file type values listed in the Remarks
section.
FILESUBTYPE
subtype Function of the file. The subtype parameter is zero
unless the type parameter in the FILETYPE statement
is VFT_DRV, VFT_FONT, or VFT_VXD. For a list of file
subtype values, see the Remarks section.
block-statement
Specifies one or more version-information blocks. A block can contain
string information or variable information. For more information, see
StringFileInfo Block or VarFileInfo Block.
Remarks
To use the constants specified with the VERSIONINFO statement, you must
include the Winver.h or Windows.h header file in the resource-definition file.
The following list describes the parameters used in the VERSIONINFO statement:
fileflags
A combination of the following values.
Value Description
VS_FF_DEBUG File contains debugging information or is compiled
with debugging features enabled.
VS_FF_PATCHED File has been modified and is not identical to the
original shipping file of the same version number.
VS_FF_PRERELEASE File is a development version, not a commercially
released product.
VS_FF_PRIVATEBUILD File was not built using standard release procedures.
If this value is given, the StringFileInfo block must
contain a PrivateBuild string.
VS_FF_SPECIALBUILD File was built by the original company using standard
release procedures but is a variation of the standard
file of the same version number. If this value is
given, the StringFileInfo block must contain a
SpecialBuild string.
fileos
One of the following values.
Value Description
VOS_UNKNOWN The operating system for which the file was designed
is unknown.
VOS_DOS File was designed for MS-DOS.
VOS_NT File was designed for Windows Server 2003 family,
Windows XP, Windows 2000, or Windows NT.
VOS__WINDOWS16 File was designed for 16-bit Windows.
VOS__WINDOWS32 File was designed for 32-bit Windows.
VOS_DOS_WINDOWS16 File was designed for 16-bit Windows running with
MS-DOS.
VOS_DOS_WINDOWS32 File was designed for 32-bit Windows running with
MS-DOS.
VOS_NT_WINDOWS32 File was designed for Windows Server 2003 family,
Windows XP, Windows 2000, or Windows NT.
The values 0x00002L, 0x00003L, 0x20000L and 0x30000L are reserved.
filetype
One of the following values.
Value Description
VFT_UNKNOWN File type is unknown.
VFT_APP File contains an application.
VFT_DLL File contains a dynamic-link library (DLL).
VFT_DRV File contains a device driver. If filetype is
VFT_DRV, subtype contains a more specific
description of the driver.
VFT_FONT File contains a font. If filetype is VFT_FONT,
subtype contains a more specific description of the
font.
VFT_VXD File contains a virtual device.
VFT_STATIC_LIB File contains a static-link library.
All other values are reserved for use by Microsoft.
subtype
Additional information about the file type.
If filetype specifies VFT_DRV, this parameter can be one of the
following values.
Value Description
VFT2_UNKNOWN Driver type is unknown.
VFT2_DRV_COMM File contains a communications driver.
VFT2_DRV_PRINTER File contains a printer driver.
VFT2_DRV_KEYBOARD File contains a keyboard driver.
VFT2_DRV_LANGUAGE File contains a language driver.
VFT2_DRV_DISPLAY File contains a display driver.
VFT2_DRV_MOUSE File contains a mouse driver.
VFT2_DRV_NETWORK File contains a network driver.
VFT2_DRV_SYSTEM File contains a system driver.
VFT2_DRV_INSTALLABLE File contains an installable driver.
VFT2_DRV_SOUND File contains a sound driver.
VFT2_DRV_VERSIONED_PRINTER File contains a versioned printer driver.
If filetype specifies VFT_FONT, this parameter can be one of the
following values.
Value Description
VFT2_UNKNOWN Font type is unknown.
VFT2_FONT_RASTER File contains a raster font.
VFT2_FONT_VECTOR File contains a vector font.
VFT2_FONT_TRUETYPE File contains a TrueType font.
If filetype specifies VFT_VXD, this parameter must be the virtual-device
identifier included in the virtual-device control block.
All subtype values not listed here are reserved for use by Microsoft.
langID
One of the following language codes.
Code Language Code Language
0x0401 Arabic 0x0415 Polish
0x0402 Bulgarian 0x0416 Portuguese (Brazil)
0x0403 Catalan 0x0417 Rhaeto-Romanic
0x0404 Traditional Chinese 0x0418 Romanian
0x0405 Czech 0x0419 Russian
0x0406 Danish 0x041A Croato-Serbian (Latin)
0x0407 German 0x041B Slovak
0x0408 Greek 0x041C Albanian
0x0409 U.S. English 0x041D Swedish
0x040A Castilian Spanish 0x041E Thai
0x040B Finnish 0x041F Turkish
0x040C French 0x0420 Urdu
0x040D Hebrew 0x0421 Bahasa
0x040E Hungarian 0x0804 Simplified Chinese
0x040F Icelandic 0x0807 Swiss German
0x0410 Italian 0x0809 U.K. English
0x0411 Japanese 0x080A Mexican Spanish
0x0412 Korean 0x080C Belgian French
0x0413 Dutch 0x0C0C Canadian French
0x0414 Norwegian ā Bokmal 0x100C Swiss French
0x0810 Swiss Italian 0x0816 Portuguese (Portugal)
0x0813 Belgian Dutch 0x081A Serbo-Croatian (Cyrillic)
0x0814 Norwegian ā Nynorsk
charsetID
One of the following character-set identifiers.
Identifier Character Set
0 7-bit ASCII
932 Japan (Shift %Gā%@ JIS X-0208)
949 Korea (Shift %Gā%@ KSC 5601)
950 Taiwan (Big5)
1200 Unicode
1250 Latin-2 (Eastern European)
1251 Cyrillic
1252 Multilingual
1253 Greek
1254 Turkish
1255 Hebrew
1256 Arabic
string-name
One of the following predefined names.
Name Description
Comments Additional information that should be displayed for
diagnostic purposes.
CompanyName Company that produced the file%Gā%@for example,
"Microsoft Corporation" or "Standard Microsystems
Corporation, Inc." This string is required.
FileDescription File description to be presented to users. This
string may be displayed in a list box when the user
is choosing files to install%Gā%@for example,
"Keyboard Driver for AT-Style Keyboards". This
string is required.
FileVersion Version number of the file%Gā%@for example,
"3.10" or "5.00.RC2". This string is required.
InternalName Internal name of the file, if one exists ā for
example, a module name if the file is a dynamic-link
library. If the file has no internal name, this
string should be the original filename, without
extension. This string is required.
LegalCopyright Copyright notices that apply to the file. This
should include the full text of all notices, legal
symbols, copyright dates, and so on ā for example,
"Copyright (C) Microsoft Corporation 1990ā1999".
This string is optional.
LegalTrademarks Trademarks and registered trademarks that apply to
the file. This should include the full text of all
notices, legal symbols, trademark numbers, and so on.
This string is optional.
OriginalFilename Original name of the file, not including a path.
This information enables an application to determine
whether a file has been renamed by a user. The
format of the name depends on the file system for
which the file was created. This string is required.
PrivateBuild Information about a private version of the file ā for
example, "Built by TESTER1 on \TESTBED". This string
should be present only if VS_FF_PRIVATEBUILD is
specified in the fileflags parameter of the root
block.
ProductName Name of the product with which the file is
distributed. This string is required.
ProductVersion Version of the product with which the file is
distributed ā for example, "3.10" or "5.00.RC2".
This string is required.
SpecialBuild Text that indicates how this version of the file
differs from the standard version ā for example,
"Private build for TESTER1 solving mouse problems
on M250 and M250E computers". This string should be
present only if VS_FF_SPECIALBUILD is specified in
the fileflags parameter of the root block.
*/
|