version.rc 15 KB

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