This list is closed, nobody may subscribe to it.
| 2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(12) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2001 |
Jan
(13) |
Feb
(2) |
Mar
(1) |
Apr
(1) |
May
|
Jun
(38) |
Jul
(10) |
Aug
(70) |
Sep
(63) |
Oct
(61) |
Nov
(41) |
Dec
(28) |
| 2002 |
Jan
(43) |
Feb
(11) |
Mar
(9) |
Apr
(2) |
May
(97) |
Jun
(94) |
Jul
(13) |
Aug
(49) |
Sep
(41) |
Oct
(24) |
Nov
(55) |
Dec
(126) |
| 2003 |
Jan
(90) |
Feb
(75) |
Mar
(32) |
Apr
(24) |
May
(54) |
Jun
(54) |
Jul
(22) |
Aug
(4) |
Sep
(16) |
Oct
(8) |
Nov
(6) |
Dec
(13) |
| 2004 |
Jan
|
Feb
(17) |
Mar
(60) |
Apr
(21) |
May
(12) |
Jun
|
Jul
(13) |
Aug
|
Sep
(29) |
Oct
|
Nov
|
Dec
(2) |
| 2005 |
Jan
(22) |
Feb
(3) |
Mar
(2) |
Apr
(13) |
May
(82) |
Jun
(18) |
Jul
(30) |
Aug
(17) |
Sep
(3) |
Oct
(19) |
Nov
(4) |
Dec
(8) |
| 2006 |
Jan
(1) |
Feb
(6) |
Mar
(2) |
Apr
(40) |
May
|
Jun
(21) |
Jul
(1) |
Aug
(410) |
Sep
(3) |
Oct
|
Nov
(56) |
Dec
(7) |
| 2007 |
Jan
(19) |
Feb
|
Mar
(4) |
Apr
(8) |
May
(19) |
Jun
(6) |
Jul
(4) |
Aug
(6) |
Sep
|
Oct
(4) |
Nov
(3) |
Dec
(2) |
| 2008 |
Jan
(13) |
Feb
(18) |
Mar
(12) |
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2009 |
Jan
|
Feb
(6) |
Mar
(8) |
Apr
(2) |
May
(2) |
Jun
|
Jul
|
Aug
(2) |
Sep
(11) |
Oct
(13) |
Nov
(17) |
Dec
(6) |
| 2010 |
Jan
(24) |
Feb
(10) |
Mar
(27) |
Apr
(20) |
May
(108) |
Jun
(8) |
Jul
(23) |
Aug
(38) |
Sep
(49) |
Oct
(17) |
Nov
(12) |
Dec
(14) |
| 2011 |
Jan
(17) |
Feb
(7) |
Mar
(28) |
Apr
(8) |
May
(20) |
Jun
(11) |
Jul
(7) |
Aug
(12) |
Sep
(4) |
Oct
(20) |
Nov
(19) |
Dec
(2) |
| 2012 |
Jan
(2) |
Feb
(6) |
Mar
(5) |
Apr
(24) |
May
(5) |
Jun
(4) |
Jul
(6) |
Aug
(18) |
Sep
(38) |
Oct
(26) |
Nov
(12) |
Dec
(6) |
| 2013 |
Jan
(19) |
Feb
(18) |
Mar
(44) |
Apr
(35) |
May
(18) |
Jun
(21) |
Jul
(10) |
Aug
(19) |
Sep
(44) |
Oct
(25) |
Nov
(1) |
Dec
(2) |
| 2014 |
Jan
(8) |
Feb
|
Mar
|
Apr
(5) |
May
(1) |
Jun
(3) |
Jul
|
Aug
(3) |
Sep
|
Oct
(4) |
Nov
(4) |
Dec
(7) |
| 2015 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
(2) |
Jun
(4) |
Jul
(6) |
Aug
(2) |
Sep
(8) |
Oct
(2) |
Nov
(1) |
Dec
(3) |
| 2016 |
Jan
(7) |
Feb
(9) |
Mar
(5) |
Apr
(5) |
May
(9) |
Jun
(4) |
Jul
(20) |
Aug
(4) |
Sep
(7) |
Oct
(6) |
Nov
(9) |
Dec
(2) |
| 2017 |
Jan
(7) |
Feb
(7) |
Mar
(5) |
Apr
|
May
(1) |
Jun
(4) |
Jul
(12) |
Aug
(4) |
Sep
(1) |
Oct
(4) |
Nov
(11) |
Dec
(14) |
| 2018 |
Jan
(3) |
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
1
|
2
|
3
|
4
|
5
|
|
6
(1) |
7
|
8
(3) |
9
|
10
|
11
|
12
|
|
13
|
14
(1) |
15
|
16
|
17
|
18
|
19
(1) |
|
20
(1) |
21
|
22
|
23
|
24
|
25
|
26
|
|
27
|
28
|
29
|
30
(1) |
|
|
|
|
From: Keith M. <no...@so...> - 2015-09-30 08:04:52
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Repository: mingw-org-wsl".
The branch, legacy has been updated
via 0a93cd4072e7fff4b857ad7d9910fa1fe55ea791 (commit)
via 5469f3574186fea8e7160d5ad307fa1e601343c9 (commit)
from 93fc8c251370d5207558c59efbff49dcb21265fb (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://sf.net/p/mingw/mingw-org-wsl/ci/0a93cd4072e7fff4b857ad7d9910fa1fe55ea791/
commit 0a93cd4072e7fff4b857ad7d9910fa1fe55ea791
Author: Keith Marshall <kei...@us...>
Date: Tue Sep 29 22:31:14 2015 +0100
Code clean-up; fix MinGW-Bug [#2263].
diff --git a/w32api/ChangeLog b/w32api/ChangeLog
index 80c8761..00d2342 100644
--- a/w32api/ChangeLog
+++ b/w32api/ChangeLog
@@ -1,3 +1,91 @@
+2015-09-29 Keith Marshall <kei...@us...>
+
+ Code clean-up; fix MinGW-Bug [#2263].
+
+ * include/w32api.h (__AW_SUFFIXED__): New macro; define it.
+ (__AW_EXTENDED__, __AW_STRING_A__, __AW_STRING_W__): Likewise.
+ (__AW__WCHAR_T__): Likewise; this is a helper for __AW_STRING_W__.
+
+ * include/wincrypt.h: Assert copyright; tidy layout; replace all C++
+ style comments, using ISO-C conforming style; remove all redundant
+ parameter names from function prototype declarations, throughout.
+ (pragma GCC system_header): Remove pointless conditional guard.
+ (_BEGIN_C_DECLS, _END_C_DECLS): Use to wrap extern "C" declarations.
+ [WINVER >= 0x500, WINVER >= 0x501]: Replace conditionals with...
+ [WINVER >= _WIN32_WINNT_WIN2K, WINVER >= _WIN32_WINNT_WINXP]: ...these
+ alternatives, respectively; they offer improved self-documentation.
+ (MS_DEF_PROV, MS_ENHANCED_PROV, MS_STRONG_PROV, MS_SCARD_PROV)
+ (MS_DEF_RSA_SIG_PROV, MS_DEF_RSA_SCHANNEL_PROV, MS_DEF_DSS_PROV)
+ (MS_DEF_DSS_DH_PROV, MS_ENH_DSS_DH_PROV, MS_DEF_DH_SCHANNEL_PROV)
+ (MS_ENH_RSA_AES_PROV): Redefine as __AW_EXTENDED__ derivatives.
+ (MS_DEF_PROV_W, MS_ENHANCED_PROV_W, MS_STRONG_PROV_W, MS_SCARD_PROV_W)
+ (MS_DEF_RSA_SIG_PROV_W, MS_DEF_RSA_SCHANNEL_PROV_W, MS_DEF_DSS_PROV_W)
+ (MS_DEF_DSS_DH_PROV_W, MS_ENH_DSS_DH_PROV_W, MS_DEF_DH_SCHANNEL_PROV_W)
+ (MS_ENH_RSA_AES_PROV_W): Redefine; use __AW_STRING_W__ to derive them
+ from their __AW_STRING_A__ equivalent string constant definitions.
+ (GET_ALG_CLASS): Redefine, expressing result in terms of...
+ (ALG_CLASS_ALL): ...this manifest bit mask; also redefined, preferring
+ a hexadecimal expression of the mask value over the former decimal.
+ (GET_ALG_TYPE, GET_ALG_SID): Similarly, use hexadecimal mask values.
+ (ALG_CLASS_SIGNATURE, ALG_CLASS_MSG_ENCRYPT, ALG_CLASS_DATA_ENCRYPT)
+ (ALG_CLASS_HASH, ALG_CLASS_KEY_EXCHANGE, ALG_TYPE_DSS, ALG_TYPE_RSA)
+ (ALG_TYPE_BLOCK, ALG_TYPE_STREAM, ALG_TYPE_DH, ALG_TYPE_SECURECHANNEL)
+ (CRYPT_UPDATE_KEY, CRYPT_NEWKEYSET, CRYPT_DELETEKEYSET, CRYPT_SILENT)
+ (CRYPT_MACHINE_KEYSET, CRYPT_USER_PROTECTED, CRYPT_CREATE_SALT)
+ (CRYPT_EXPORTABLE, CRYPT_ENCRYPT, CRYPT_DECRYPT, CRYPT_EXPORT)
+ (CRYPT_READ, CRYPT_WRITE, CRYPT_MAC, CERT_TRUST_IS_NOT_TIME_VALID)
+ (CERT_TRUST_IS_NOT_TIME_NESTED, CERT_TRUST_IS_REVOKED)
+ (CERT_TRUST_IS_NOT_SIGNATURE_VALID, CERT_TRUST_IS_NOT_VALID_FOR_USAGE)
+ (CERT_TRUST_IS_UNTRUSTED_ROOT, CERT_TRUST_REVOCATION_STATUS_UNKNOWN)
+ (CERT_TRUST_IS_CYCLIC, CERT_TRUST_CTL_IS_NOT_SIGNATURE_VALID)
+ (CERT_TRUST_IS_PARTIAL_CHAIN, CERT_TRUST_CTL_IS_NOT_TIME_VALID)
+ (CERT_TRUST_CTL_IS_NOT_VALID_FOR_USAGE, CERT_TRUST_IS_SELF_SIGNED)
+ (CERT_TRUST_HAS_EXACT_MATCH_ISSUER, CERT_TRUST_HAS_KEY_MATCH_ISSUER)
+ (CERT_TRUST_HAS_NAME_MATCH_ISSUER, CERT_TRUST_IS_COMPLEX_CHAIN)
+ (CERT_CHAIN_POLICY_BASE, CERT_CHAIN_POLICY_AUTHENTICODE)
+ (CERT_CHAIN_POLICY_AUTHENTICODE_TS, CERT_CHAIN_POLICY_SSL)
+ (CERT_CHAIN_POLICY_BASIC_CONSTRAINTS, CERT_CHAIN_POLICY_NT_AUTH)
+ (CERT_NAME_STR_REVERSE_FLAG, CERT_NAME_STR_DISABLE_IE4_UTF8_FLAG)
+ (CERT_NAME_STR_CRLF_FLAG, CERT_NAME_STR_ENABLE_UTF8_UNICODE_FLAG)
+ (CERT_NAME_STR_ENABLE_T61_UNICODE_FLAG, CERT_NAME_STR_NO_PLUS_FLAG)
+ (CERT_NAME_STR_NO_QUOTING_FLAG, CERT_NAME_STR_SEMICOLON_FLAG)
+ (CERT_FIND_CERT_ID, CERT_FIND_CTL_USAGE, CERT_FIND_ENHKEY_USAGE)
+ (CERT_FIND_EXISTING, CERT_FIND_HASH, CERT_FIND_ISSUER_ATTR)
+ (CERT_FIND_ISSUER_NAME, CERT_FIND_ISSUER_OF, CERT_FIND_KEY_IDENTIFIER)
+ (CERT_FIND_KEY_SPEC, CERT_FIND_MD5_HASH, CERT_FIND_PROPERTY)
+ (CERT_FIND_PUBLIC_KEY, CERT_FIND_SHA1_HASH, CERT_FIND_SIGNATURE_HASH)
+ (CERT_FIND_SUBJECT_ATTR, CERT_FIND_SUBJECT_CERT, CERT_FIND_SUBJECT_NAME)
+ (CERT_FIND_SUBJECT_STR_A, CERT_FIND_SUBJECT_STR_W)
+ (CERT_FIND_ISSUER_STR_A, CERT_FIND_ISSUER_STR_W)
+ (CERT_FIND_OR_ENHKEY_USAGE_FLAG, CERT_FIND_OPTIONAL_ENHKEY_USAGE_FLAG)
+ (CERT_FIND_NO_ENHKEY_USAGE_FLAG, CERT_FIND_VALID_ENHKEY_USAGE_FLAG)
+ (CERT_FIND_EXT_ONLY_ENHKEY_USAGE_FLAG, CERT_UNICODE_IS_RDN_ATTRS_FLAG)
+ (CERT_CASE_INSENSITIVE_IS_RDN_ATTRS_FLAG, CERT_CHAIN_FIND_BY_ISSUER)
+ (CERT_CHAIN_FIND_BY_ISSUER_COMPARE_KEY_FLAG)
+ (CERT_CHAIN_FIND_BY_ISSUER_COMPLEX_CHAIN_FLAG)
+ (CERT_CHAIN_FIND_BY_ISSUER_CACHE_ONLY_FLAG)
+ (CERT_CHAIN_FIND_BY_ISSUER_CACHE_ONLY_URL_FLAG)
+ (CERT_CHAIN_FIND_BY_ISSUER_LOCAL_MACHINE_FLAG)
+ (CERT_CHAIN_FIND_BY_ISSUER_NO_KEY_FLAG)
+ (CERT_SYSTEM_STORE_LOCAL_MACHINE): All represent bit-mapped values;
+ express them in hexadecimal, in preference to original decimal form.
+ (CERT_FIND_SUBJECT_STR, CERT_FIND_ISSUER_STR): Redefine them as
+ __AW_EXTENDED__ macros, for UNICODE/non-UNICODE cases respectively.
+ (szOID_CRL_DIST_POINTS): Correct defective definition; value should be
+ a string literal, but was missing delimiting quotes; insert them.
+ (CertNameToStr, CertOpenSystemStore, CertGetNameString, CryptSignHash)
+ (CryptAcquireContext, CryptVerifySignature, CryptGetDefaultProvider)
+ (CryptEnumProviders, CryptSetProvider): Define as __AW_SUFFIXED__
+ aliases for each of the UNICODE/non-UNICODE cases respectively.
+ (CryptEnumProvidersA): Correct prototype declaration; 5th parameter
+ was declared as type LPTSTR, but should be type LPSTR.
+ (CryptEnumProvidersW): Likewise; 5th parameter should be type LPWSTR.
+ (CryptGetDefaultProviderW): Likewise; 4th parameter was declared as
+ type LPSTR, but should be type LPWSTR.
+ [defined MINGW_TENTATIVE_ASSUMPTIONS] (X509_ANY_STRING)
+ (X509_CRL_REASON_CODE, X509_DSS_PUBLICKEY, X509_UNICODE_ANY_STRING)
+ (struct _CERT_ALT_NAME_ENTRY): Add tentative definitions.
+
2015-09-22 Keith Marshall <kei...@us...>
Correct defect in build system compilation rule.
diff --git a/w32api/include/w32api.h b/w32api/include/w32api.h
index 0da309c..52220da 100644
--- a/w32api/include/w32api.h
+++ b/w32api/include/w32api.h
@@ -135,9 +135,40 @@ __WIN32_DEPRECATED_ALIAS( long, IE7, _WIN32_IE_IE70 )
#elif defined _UNICODE && ! defined UNICODE
# define UNICODE _UNICODE
#endif
+/* Related to the UNICODE macro definition, there are many functions in
+ * the Win32 API with a generic name, which is mapped to a variant with
+ * wchar_t UTF-16LE encoding of string arguments, in cases when UNICODE
+ * is defined, as facilitated by the following macro...
+ */
+#ifdef UNICODE
+ /* ...by appending a "W" suffix to the generic function name...
+ */
+# define __AW_SUFFIXED__(__NAME__) __NAME__##W
+#else
+ /* ...or by appending an "A" suffix, to select an ANSI variant with
+ * char encoding of string arguments, when UNICODE is not defined.
+ */
+# define __AW_SUFFIXED__(__NAME__) __NAME__##A
+#endif
+/* Further related, the __AW_EXTENDED__ macro reproduces the effect of
+ * __AW_SUFFIXED__, with the addition of a single underscore character
+ * separating the base name from the appropriate suffix.
+ */
+#define __AW_EXTENDED__(__NAME__) __AW_SUFFIXED__(__NAME__##_)
+
+/* __AW_EXTENDED__ may often be used to map manifest string constants.
+ * The following triplet provide a convenient mechanism to derive the
+ * UNICODE variant of the string from its ANSI definition; (note that
+ * this requires a two stage expansion, to ensure that the "L" prefix
+ * is attached to the expansion of the ANSI string definition, rather
+ * than just to the defining macro name).
+ */
+#define __AW_STRING_A__(__TEXT__) __TEXT__
+#define __AW__WCHAR_T__(__TEXT__) __AW_STRING_A__(L##__TEXT__)
+#define __AW_STRING_W__(__TEXT__) __AW__WCHAR_T__(__TEXT__)
#ifdef __cplusplus
-/* When compiling C++ code, these macros provide a convenient notation,
+/* When compiling C++ code, these macros provide a convenient notation
* for designating those sections of system header files which declare
* prototypes for API functions with "C" binding...
*/
diff --git a/w32api/include/wincrypt.h b/w32api/include/wincrypt.h
index 46e9a71..ca74c28 100644
--- a/w32api/include/wincrypt.h
+++ b/w32api/include/wincrypt.h
@@ -1,1322 +1,1531 @@
+/*
+ * wincrypt.h
+ *
+ * Cryptographic services API manifest constants and function prototypes.
+ *
+ * $Id$
+ *
+ * Written by Anders Norlander <ano...@he...>
+ * Copyright (C) 1998-2000, 2002-2004, 2006-2008, 2010, 2015,
+ * MinGW.org Project
+ *
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ */
#ifndef _WINCRYPT_H
#define _WINCRYPT_H
-#if __GNUC__ >= 3
#pragma GCC system_header
-#endif
#ifndef WINADVAPI
#define WINADVAPI
#endif
-#ifdef __cplusplus
-extern "C" {
-#endif
-#define MS_DEF_PROV_A "Microsoft Base Cryptographic Provider v1.0"
-#define MS_DEF_PROV_W L"Microsoft Base Cryptographic Provider v1.0"
-#define MS_ENHANCED_PROV_A "Microsoft Enhanced Cryptographic Provider v1.0"
-#define MS_ENHANCED_PROV_W L"Microsoft Enhanced Cryptographic Provider v1.0"
-#define MS_STRONG_PROV_A "Microsoft Strong Cryptographic Provider"
-#define MS_STRONG_PROV_W L"Microsoft Strong Cryptographic Provider"
-#define MS_DEF_RSA_SIG_PROV_A "Microsoft RSA Signature Cryptographic Provider"
-#define MS_DEF_RSA_SIG_PROV_W L"Microsoft RSA Signature Cryptographic Provider"
+_BEGIN_C_DECLS
+
+#define MS_DEF_PROV __AW_EXTENDED__( MS_DEF_PROV )
+#define MS_DEF_PROV_W __AW_STRING_W__( MS_DEF_PROV_A )
+#define MS_DEF_PROV_A "Microsoft Base Cryptographic Provider v1.0"
+
+#define MS_ENHANCED_PROV __AW_EXTENDED__( MS_ENHANCED_PROV )
+#define MS_ENHANCED_PROV_W __AW_STRING_W__( MS_ENHANCED_PROV_A )
+#define MS_ENHANCED_PROV_A "Microsoft Enhanced Cryptographic Provider v1.0"
+
+#define MS_STRONG_PROV __AW_EXTENDED__( MS_STRONG_PROV )
+#define MS_STRONG_PROV_W __AW_STRING_W__( MS_STRONG_PROV_A )
+#define MS_STRONG_PROV_A "Microsoft Strong Cryptographic Provider"
+
+#define MS_DEF_RSA_SIG_PROV __AW_EXTENDED__( MS_DEF_RSA_SIG_PROV )
+#define MS_DEF_RSA_SIG_PROV_W __AW_STRING_W__( MS_DEF_RSA_SIG_PROV_A )
+#define MS_DEF_RSA_SIG_PROV_A "Microsoft RSA Signature Cryptographic Provider"
+
+#define MS_DEF_RSA_SCHANNEL_PROV __AW_EXTENDED__( MS_DEF_RSA_SCHANNEL_PROV )
+#define MS_DEF_RSA_SCHANNEL_PROV_W __AW_STRING_W__( MS_DEF_RSA_SCHANNEL_PROV_A )
#define MS_DEF_RSA_SCHANNEL_PROV_A "Microsoft RSA SChannel Cryptographic Provider"
-#define MS_DEF_RSA_SCHANNEL_PROV_W L"Microsoft RSA SChannel Cryptographic Provider"
-#define MS_DEF_DSS_PROV_A "Microsoft Base DSS Cryptographic Provider"
-#define MS_DEF_DSS_PROV_W L"Microsoft Base DSS Cryptographic Provider"
-#define MS_DEF_DSS_DH_PROV_A "Microsoft Base DSS and Diffie-Hellman Cryptographic Provider"
-#define MS_DEF_DSS_DH_PROV_W L"Microsoft Base DSS and Diffie-Hellman Cryptographic Provider"
-#define MS_ENH_DSS_DH_PROV_A "Microsoft Enhanced DSS and Diffie-Hellman Cryptographic Provider"
-#define MS_ENH_DSS_DH_PROV_W L"Microsoft Enhanced DSS and Diffie-Hellman Cryptographic Provider"
+
+#define MS_DEF_DSS_PROV __AW_EXTENDED__( MS_DEF_DSS_PROV )
+#define MS_DEF_DSS_PROV_W __AW_STRING_W__( MS_DEF_DSS_PROV_A )
+#define MS_DEF_DSS_PROV_A "Microsoft Base DSS Cryptographic Provider"
+
+#define MS_DEF_DSS_DH_PROV __AW_EXTENDED__( MS_DEF_DSS_DH_PROV )
+#define MS_DEF_DSS_DH_PROV_W __AW_STRING_W__( MS_DEF_DSS_DH_PROV_A )
+#define MS_DEF_DSS_DH_PROV_A "Microsoft Base DSS and Diffie-Hellman Cryptographic Provider"
+
+#define MS_ENH_DSS_DH_PROV __AW_EXTENDED__( MS_ENH_DSS_DH_PROV )
+#define MS_ENH_DSS_DH_PROV_W __AW_STRING_W__( MS_ENH_DSS_DH_PROV_A )
+#define MS_ENH_DSS_DH_PROV_A "Microsoft Enhanced DSS and Diffie-Hellman Cryptographic Provider"
+
+#define MS_DEF_DH_SCHANNEL_PROV __AW_EXTENDED__( MS_DEF_DH_SCHANNEL_PROV )
+#define MS_DEF_DH_SCHANNEL_PROV_W __AW_STRING_W__( MS_DEF_DH_SCHANNEL_PROV_A )
#define MS_DEF_DH_SCHANNEL_PROV_A "Microsoft DH SChannel Cryptographic Provider"
-#define MS_DEF_DH_SCHANNEL_PROV_W L"Microsoft DH SChannel Cryptographic Provider"
-#define MS_SCARD_PROV_A "Microsoft Base Smart Card Crypto Provider"
-#define MS_SCARD_PROV_W L"Microsoft Base Smart Card Crypto Provider"
-#if (_WIN32_WINNT == 0x0501)
-#define MS_ENH_RSA_AES_PROV_A "Microsoft Enhanced RSA and AES Cryptographic Provider (Prototype)"
-#define MS_ENH_RSA_AES_PROV_W L"Microsoft Enhanced RSA and AES Cryptographic Provider (Prototype)"
-#elif (_WIN32_WINNT > 0x0501)
-#define MS_ENH_RSA_AES_PROV_A "Microsoft Enhanced RSA and AES Cryptographic Provider"
-#define MS_ENH_RSA_AES_PROV_W L"Microsoft Enhanced RSA and AES Cryptographic Provider"
+
+#define MS_SCARD_PROV __AW_EXTENDED__( MS_SCARD_PROV )
+#define MS_SCARD_PROV_W __AW_STRING_W__( MS_SCARD_PROV_A )
+#define MS_SCARD_PROV_A "Microsoft Base Smart Card Crypto Provider"
+
+#if _WIN32_WINNT >= _WIN32_WINNT_WINXP
+# define MS_ENH_RSA_AES_PROV __AW_EXTENDED__( MS_ENH_RSA_AES_PROV )
+# define MS_ENH_RSA_AES_PROV_W __AW_STRING_W__( MS_ENH_RSA_AES_PROV_A )
+
+# if _WIN32_WINNT == _WIN32_WINNT_WINXP
+# define MS_ENH_RSA_AES_PROV_A "Microsoft Enhanced RSA and AES Cryptographic Provider (Prototype)"
+
+#else /* _WIN32_WINNT > _WIN32_WINNT_WINXP */
+# define MS_ENH_RSA_AES_PROV_A "Microsoft Enhanced RSA and AES Cryptographic Provider"
+# endif
+#endif
+
+#define GET_ALG_CLASS(x) ((x) & ALG_CLASS_ALL)
+#define GET_ALG_TYPE(x) ((x) & 0x1E00) /* x & 7680 */
+#define GET_ALG_SID(x) ((x) & 0x01FF) /* x & 511 */
+
+#define ALG_CLASS_ANY 0
+#define ALG_CLASS_SIGNATURE 0x2000 /* 8192 */
+#define ALG_CLASS_MSG_ENCRYPT 0x4000 /* 16384 */
+#define ALG_CLASS_DATA_ENCRYPT 0x6000 /* 24576 */
+#define ALG_CLASS_HASH 0x8000 /* 32768 */
+#define ALG_CLASS_KEY_EXCHANGE 0xA000 /* 40960 */
+#define ALG_CLASS_ALL 0xE000 /* (0x0007 << 13) */
+
+#define ALG_TYPE_ANY 0
+#define ALG_TYPE_DSS 0x0200 /* 512 */
+#define ALG_TYPE_RSA 0x0400 /* 1024 */
+#define ALG_TYPE_BLOCK 0x0600 /* 1536 */
+#define ALG_TYPE_STREAM 0x0800 /* 2048 */
+#define ALG_TYPE_DH 0x0A00 /* (0x0005 << 9) */
+#define ALG_TYPE_SECURECHANNEL 0x0C00 /* (6 << 9) */
+
+#define ALG_SID_ANY 0
+
+#define ALG_SID_RSA_ANY 0
+#define ALG_SID_RSA_PKCS 1
+#define ALG_SID_RSA_MSATWORK 2
+#define ALG_SID_RSA_ENTRUST 3
+#define ALG_SID_RSA_PGP 4
+
+#define ALG_SID_DSS_ANY 0
+#define ALG_SID_DSS_PKCS 1
+#define ALG_SID_DSS_DMS 2
+
+#define ALG_SID_DES 1
+#define ALG_SID_3DES 3
+#define ALG_SID_DESX 4
+#define ALG_SID_IDEA 5
+#define ALG_SID_CAST 6
+#define ALG_SID_SAFERSK64 7
+#define ALG_SID_SAFERSK128 8
+#define ALG_SID_3DES_112 9
+#define ALG_SID_SKIPJACK 10
+#define ALG_SID_TEK 11
+#define ALG_SID_CYLINK_MEK 12
+#define ALG_SID_RC5 13
+
+#define ALG_SID_RC4 1
+#define ALG_SID_RC2 2
+
+#define ALG_SID_SEAL 2
+
+#define ALG_SID_MD2 1
+#define ALG_SID_MD4 2
+#define ALG_SID_MD5 3
+#define ALG_SID_SHA 4
+#define ALG_SID_MAC 5
+#define ALG_SID_RIPEMD 6
+#define ALG_SID_RIPEMD160 7
+#define ALG_SID_SSL3SHAMD5 8
+#define ALG_SID_HMAC 9
+#define ALG_SID_TLS1PRF 10
+#define ALG_SID_AES_128 14
+#define ALG_SID_AES_192 15
+#define ALG_SID_AES_256 16
+#define ALG_SID_AES 17
+#define ALG_SID_EXAMPLE 80
+
+#define CALG_MD2 (ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_MD2)
+#define CALG_MD4 (ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_MD4)
+#define CALG_MD5 (ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_MD5)
+#define CALG_SHA (ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_SHA)
+#define CALG_SHA1 CALG_SHA
+#define CALG_MAC (ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_MAC)
+#define CALG_3DES (ALG_CLASS_DATA_ENCRYPT | ALG_TYPE_BLOCK | 3)
+#define CALG_CYLINK_MEK (ALG_CLASS_DATA_ENCRYPT | ALG_TYPE_BLOCK | 12)
+#define CALG_SKIPJACK (ALG_CLASS_DATA_ENCRYPT | ALG_TYPE_BLOCK | 10)
+#define CALG_KEA_KEYX (ALG_CLASS_KEY_EXCHANGE | ALG_TYPE_STREAM | ALG_TYPE_DSS | 4)
+#define CALG_RSA_SIGN (ALG_CLASS_SIGNATURE | ALG_TYPE_RSA | ALG_SID_RSA_ANY)
+#define CALG_DSS_SIGN (ALG_CLASS_SIGNATURE | ALG_TYPE_DSS | ALG_SID_DSS_ANY)
+#define CALG_RSA_KEYX (ALG_CLASS_KEY_EXCHANGE | ALG_TYPE_RSA | ALG_SID_RSA_ANY)
+#define CALG_DES (ALG_CLASS_DATA_ENCRYPT | ALG_TYPE_BLOCK | ALG_SID_DES)
+#define CALG_RC2 (ALG_CLASS_DATA_ENCRYPT | ALG_TYPE_BLOCK | ALG_SID_RC2)
+#define CALG_RC4 (ALG_CLASS_DATA_ENCRYPT | ALG_TYPE_STREAM | ALG_SID_RC4)
+#define CALG_SEAL (ALG_CLASS_DATA_ENCRYPT | ALG_TYPE_STREAM | ALG_SID_SEAL)
+#define CALG_DH_EPHEM (ALG_CLASS_KEY_EXCHANGE | ALG_TYPE_STREAM | ALG_TYPE_DSS | ALG_SID_DSS_DMS)
+#define CALG_DESX (ALG_CLASS_DATA_ENCRYPT | ALG_TYPE_BLOCK | ALG_SID_DESX)
+#define CALG_TLS1PRF (ALG_CLASS_DHASH | ALG_TYPE_ANY | ALG_SID_TLS1PRF)
+#define CALG_AES_128 (ALG_CLASS_DATA_ENCRYPT | ALG_TYPE_BLOCK | ALG_SID_AES_128)
+#define CALG_AES_192 (ALG_CLASS_DATA_ENCRYPT | ALG_TYPE_BLOCK | ALG_SID_AES_192)
+#define CALG_AES_256 (ALG_CLASS_DATA_ENCRYPT | ALG_TYPE_BLOCK | ALG_SID_AES_256)
+#define CALG_AES (ALG_CLASS_DATA_ENCRYPT | ALG_TYPE_BLOCK | ALG_SID_AES)
+
+#define CRYPT_VERIFYCONTEXT 0xF0000000
+#define CRYPT_NEWKEYSET 0x00000008
+#define CRYPT_DELETEKEYSET 0x00000010 /* 16 */
+#define CRYPT_MACHINE_KEYSET 0x00000020 /* 32 */
+#define CRYPT_SILENT 0x00000040 /* 64 */
+#define CRYPT_EXPORTABLE 0x00000001
+#define CRYPT_USER_PROTECTED 0x00000002
+#define CRYPT_CREATE_SALT 0x00000004
+#define CRYPT_UPDATE_KEY 0x00000008
+
+#define SIMPLEBLOB 1
+#define PUBLICKEYBLOB 6
+#define PRIVATEKEYBLOB 7
+#define PLAINTEXTKEYBLOB 8
+#define OPAQUEKEYBLOB 9
+#define PUBLICKEYBLOBEX 10
+#define SYMMETRICWRAPKEYBLOB 11
+
+#define AT_KEYEXCHANGE 1
+#define AT_SIGNATURE 2
+
+#define CRYPT_USERDATA 1
+
+#define PKCS5_PADDING 1
+
+#define CRYPT_MODE_CBC 1
+#define CRYPT_MODE_ECB 2
+#define CRYPT_MODE_OFB 3
+#define CRYPT_MODE_CFB 4
+#define CRYPT_MODE_CTS 5
+#define CRYPT_MODE_CBCI 6
+#define CRYPT_MODE_CFBP 7
+#define CRYPT_MODE_OFBP 8
+#define CRYPT_MODE_CBCOFM 9
+#define CRYPT_MODE_CBCOFMI 10
+
+#define CRYPT_ENCRYPT 0x0001
+#define CRYPT_DECRYPT 0x0002
+#define CRYPT_EXPORT 0x0004
+#define CRYPT_READ 0x0008
+#define CRYPT_WRITE 0x0010 /* 16 */
+#define CRYPT_MAC 0x0020 /* 32 */
+
+#define HP_ALGID 1
+#define HP_HASHVAL 2
+#define HP_HASHSIZE 4
+#define HP_HMAC_INFO 5
+
+#define CRYPT_FAILED FALSE
+#define CRYPT_SUCCEED TRUE
+#define RCRYPT_SUCCEEDED(r) ((r) == CRYPT_SUCCEED)
+#define RCRYPT_FAILED(r) ((r) == CRYPT_FAILED)
+
+#define PP_ENUMALGS 1
+#define PP_ENUMCONTAINERS 2
+#define PP_IMPTYPE 3
+#define PP_NAME 4
+#define PP_VERSION 5
+#define PP_CONTAINER 6
+#define PP_CHANGE_PASSWORD 7
+#define PP_KEYSET_SEC_DESCR 8
+#define PP_CERTCHAIN 9
+#define PP_KEY_TYPE_SUBTYPE 10
+#define PP_PROVTYPE 16
+#define PP_KEYSTORAGE 17
+#define PP_APPLI_CERT 18
+#define PP_SYM_KEYSIZE 19
+#define PP_SESSION_KEYSIZE 20
+#define PP_UI_PROMPT 21
+#define PP_ENUMALGS_EX 22
+#define PP_ENUMMANDROOTS 25
+#define PP_ENUMELECTROOTS 26
+#define PP_KEYSET_TYPE 27
+#define PP_ADMIN_PIN 31
+#define PP_KEYEXCHANGE_PIN 32
+#define PP_SIGNATURE_PIN 33
+#define PP_SIG_KEYSIZE_INC 34
+#define PP_KEYX_KEYSIZE_INC 35
+#define PP_UNIQUE_CONTAINER 36
+#define PP_SGC_INFO 37
+#define PP_USE_HARDWARE_RNG 38
+#define PP_KEYSPEC 39
+#define PP_ENUMEX_SIGNING_PROT 40
+
+#define CRYPT_FIRST 1
+#define CRYPT_NEXT 2
+
+#define CRYPT_IMPL_HARDWARE 1
+#define CRYPT_IMPL_SOFTWARE 2
+#define CRYPT_IMPL_MIXED 3
+#define CRYPT_IMPL_UNKNOWN 4
+
+#define PROV_RSA_FULL 1
+#define PROV_RSA_SIG 2
+#define PROV_DSS 3
+#define PROV_FORTEZZA 4
+#define PROV_MS_EXCHANGE 5
+#define PROV_MS_MAIL 5
+#define PROV_SSL 6
+#define PROV_STT_MER 7
+#define PROV_STT_ACQ 8
+#define PROV_STT_BRND 9
+#define PROV_STT_ROOT 10
+#define PROV_STT_ISS 11
+#define PROV_RSA_SCHANNEL 12
+#define PROV_DSS_DH 13
+#define PROV_EC_ECDSA_SIG 14
+#define PROV_EC_ECNRA_SIG 15
+#define PROV_EC_ECDSA_FULL 16
+#define PROV_EC_ECNRA_FULL 17
+#define PROV_DH_SCHANNEL 18
+#define PROV_SPYRUS_LYNKS 20
+#define PROV_RNG 21
+#define PROV_INTEL_SEC 22
+#define PROV_RSA_AES 24
+
+#define MAXUIDLEN 64
+
+#define CUR_BLOB_VERSION 2
+
+#define X509_ASN_ENCODING 1
+#define PKCS_7_ASN_ENCODING 65536
+
+#define CERT_V1 0
+#define CERT_V2 1
+#define CERT_V3 2
+
+#define CERT_E_CHAINING (-2146762486)
+#define CERT_E_CN_NO_MATCH (-2146762481)
+#define CERT_E_EXPIRED (-2146762495)
+#define CERT_E_PURPOSE (-2146762490)
+#define CERT_E_REVOCATION_FAILURE (-2146762482)
+#define CERT_E_REVOKED (-2146762484)
+#define CERT_E_ROLE (-2146762493)
+#define CERT_E_UNTRUSTEDROOT (-2146762487)
+#define CERT_E_UNTRUSTEDTESTROOT (-2146762483)
+#define CERT_E_VALIDITYPERIODNESTING (-2146762494)
+#define CERT_E_WRONG_USAGE (-2146762480)
+#define CERT_E_PATHLENCONST (-2146762492)
+#define CERT_E_CRITICAL (-2146762491)
+#define CERT_E_ISSUERCHAINING (-2146762489)
+#define CERT_E_MALFORMED (-2146762488)
+#define CRYPT_E_REVOCATION_OFFLINE (-2146885613)
+#define CRYPT_E_REVOKED (-2146885616)
+#define TRUST_E_BASIC_CONSTRAINTS (-2146869223)
+#define TRUST_E_CERT_SIGNATURE (-2146869244)
+#define TRUST_E_FAIL (-2146762485)
+
+#define CERT_TRUST_NO_ERROR 0
+#define CERT_TRUST_IS_NOT_TIME_VALID 0x00000001
+#define CERT_TRUST_IS_NOT_TIME_NESTED 0x00000002
+#define CERT_TRUST_IS_REVOKED 0x00000004
+#define CERT_TRUST_IS_NOT_SIGNATURE_VALID 0x00000008
+#define CERT_TRUST_IS_NOT_VALID_FOR_USAGE 0x00000010 /* 16 */
+#define CERT_TRUST_IS_UNTRUSTED_ROOT 0x00000020 /* 32 */
+#define CERT_TRUST_REVOCATION_STATUS_UNKNOWN 0x00000040 /* 64 */
+#define CERT_TRUST_IS_CYCLIC 0x00000080 /* 128 */
+#define CERT_TRUST_IS_PARTIAL_CHAIN 0x00010000 /* 65336 */
+#define CERT_TRUST_CTL_IS_NOT_TIME_VALID 0x00020000 /* 131072 */
+#define CERT_TRUST_CTL_IS_NOT_SIGNATURE_VALID 0x00040000 /* 262144 */
+#define CERT_TRUST_CTL_IS_NOT_VALID_FOR_USAGE 0x00080000 /* 524288 */
+
+#define CERT_TRUST_HAS_EXACT_MATCH_ISSUER 0x00000001
+#define CERT_TRUST_HAS_KEY_MATCH_ISSUER 0x00000002
+#define CERT_TRUST_HAS_NAME_MATCH_ISSUER 0x00000004
+#define CERT_TRUST_IS_SELF_SIGNED 0x00000008
+#define CERT_TRUST_IS_COMPLEX_CHAIN 0x00010000 /* 65336 */
+
+#define CERT_CHAIN_POLICY_BASE ((LPCSTR)(1))
+#define CERT_CHAIN_POLICY_AUTHENTICODE ((LPCSTR)(2))
+#define CERT_CHAIN_POLICY_AUTHENTICODE_TS ((LPCSTR)(3))
+#define CERT_CHAIN_POLICY_SSL ((LPCSTR)(4))
+#define CERT_CHAIN_POLICY_BASIC_CONSTRAINTS ((LPCSTR)(5))
+#define CERT_CHAIN_POLICY_NT_AUTH ((LPCSTR)(6))
+
+#define USAGE_MATCH_TYPE_AND 0
+#define USAGE_MATCH_TYPE_OR 1
+
+#define CERT_SIMPLE_NAME_STR 1
+#define CERT_OID_NAME_STR 2
+#define CERT_X500_NAME_STR 3
+
+#define CERT_NAME_STR_DISABLE_IE4_UTF8_FLAG 0x00010000
+#define CERT_NAME_STR_ENABLE_T61_UNICODE_FLAG 0x00020000 /* 131072 */
+#define CERT_NAME_STR_ENABLE_UTF8_UNICODE_FLAG 0x00040000
+#define CERT_NAME_STR_REVERSE_FLAG 0x02000000 /* 33554432 */
+#define CERT_NAME_STR_COMMA_FLAG 0x04000000
+#define CERT_NAME_STR_CRLF_FLAG 0x08000000 /* 134217728 */
+#define CERT_NAME_STR_NO_QUOTING_FLAG 0x10000000 /* 268435456 */
+#define CERT_NAME_STR_NO_PLUS_FLAG 0x20000000 /* 536870912 */
+#define CERT_NAME_STR_SEMICOLON_FLAG 0x40000000 /* 1073741824 */
+
+#define CERT_FIND_ANY 0
+#define CERT_FIND_CERT_ID 0x00100000 /* 1048576 */
+#define CERT_FIND_CTL_USAGE 0x000A0000 /* 653360 */
+#define CERT_FIND_ENHKEY_USAGE 0x000A0000 /* 653360 */
+#define CERT_FIND_EXISTING 0x000D0000 /* 851968 */
+#define CERT_FIND_HASH 0x00010000 /* 65336 */
+#define CERT_FIND_ISSUER_ATTR 0x00030004 /* 196612 */
+#define CERT_FIND_ISSUER_NAME 0x00020004 /* 131076 */
+#define CERT_FIND_ISSUER_OF 0x000C0000 /* 786432 */
+#define CERT_FIND_KEY_IDENTIFIER 0x000F0000 /* 983040 */
+#define CERT_FIND_KEY_SPEC 0x00090000 /* 589824 */
+#define CERT_FIND_MD5_HASH 0x00040000 /* 262144 */
+#define CERT_FIND_PROPERTY 0x00050000 /* 327680 */
+#define CERT_FIND_PUBLIC_KEY 0x00060000 /* 393216 */
+#define CERT_FIND_SHA1_HASH 0x00010000 /* 65536 */
+#define CERT_FIND_SIGNATURE_HASH 0x000E0000 /* 917504 */
+#define CERT_FIND_SUBJECT_ATTR 0x00030007 /* 196615 */
+#define CERT_FIND_SUBJECT_CERT 0x000B0000 /* 720896 */
+#define CERT_FIND_SUBJECT_NAME 0x00020007 /* 131079 */
+
+#define CERT_FIND_SUBJECT_STR __AW_EXTENDED__( CERT_FIND_SUBJECT_STR )
+#define CERT_FIND_SUBJECT_STR_A 0x00070007 /* 458759 */
+#define CERT_FIND_SUBJECT_STR_W 0x00080007 /* 524295 */
+
+#define CERT_FIND_ISSUER_STR __AW_EXTENDED__( CERT_FIND_ISSUER_STR )
+#define CERT_FIND_ISSUER_STR_A 0x00070004 /* 458756 */
+#define CERT_FIND_ISSUER_STR_W 0x00080004 /* 524292 */
+
+#define CERT_FIND_OR_ENHKEY_USAGE_FLAG 0x00000010 /* 16 */
+#define CERT_FIND_OPTIONAL_ENHKEY_USAGE_FLAG 0x00000001
+#define CERT_FIND_NO_ENHKEY_USAGE_FLAG 0x00000008
+#define CERT_FIND_VALID_ENHKEY_USAGE_FLAG 0x00000020 /* 32 */
+#define CERT_FIND_EXT_ONLY_ENHKEY_USAGE_FLAG 0x00000002
+
+#define \
+ CERT_CASE_INSENSITIVE_IS_RDN_ATTRS_FLAG 0x00000002
+#define CERT_UNICODE_IS_RDN_ATTRS_FLAG 0x00000001
+
+#define CERT_CHAIN_FIND_BY_ISSUER 0x00000001
+#define \
+ CERT_CHAIN_FIND_BY_ISSUER_COMPARE_KEY_FLAG 0x00000001
+#define \
+ CERT_CHAIN_FIND_BY_ISSUER_COMPLEX_CHAIN_FLAG 0x00000002
+#define \
+ CERT_CHAIN_FIND_BY_ISSUER_CACHE_ONLY_FLAG 0x00008000 /* 32768 */
+#define \
+ CERT_CHAIN_FIND_BY_ISSUER_CACHE_ONLY_URL_FLAG 0x00000004
+#define \
+ CERT_CHAIN_FIND_BY_ISSUER_LOCAL_MACHINE_FLAG 0x00000008
+#define CERT_CHAIN_FIND_BY_ISSUER_NO_KEY_FLAG 0x00004000 /* 16384 */
+
+#define CERT_STORE_PROV_SYSTEM 10
+#define CERT_SYSTEM_STORE_LOCAL_MACHINE 0x00020000 /* 131072 */
+
+#define szOID_PKIX_KP_SERVER_AUTH "4235600"
+#define szOID_SERVER_GATED_CRYPTO "4235658"
+#define szOID_SGC_NETSCAPE "2.16.840.1.113730.4.1"
+#define szOID_PKIX_KP_CLIENT_AUTH "1.3.6.1.5.5.7.3.2"
+
+#define CRYPT_NOHASHOID 0x00000001
+#define CRYPT_NO_SALT 0x00000010
+#define CRYPT_PREGEN 0x00000040
+#define CRYPT_RECIPIENT 0x00000010
+#define CRYPT_INITIATOR 0x00000040
+#define CRYPT_ONLINE 0x00000080
+#define CRYPT_SF 0x00000100
+#define CRYPT_CREATE_IV 0x00000200
+#define CRYPT_KEK 0x00000400
+#define CRYPT_DATA_KEY 0x00000800
+#define CRYPT_VOLATILE 0x00001000
+#define CRYPT_SGCKEY 0x00002000
+
+#define KP_IV 0x00000001
+#define KP_SALT 0x00000002
+#define KP_PADDING 0x00000003
+#define KP_MODE 0x00000004
+#define KP_MODE_BITS 0x00000005
+#define KP_PERMISSIONS 0x00000006
+#define KP_ALGID 0x00000007
+#define KP_BLOCKLEN 0x00000008
+#define KP_KEYLEN 0x00000009
+#define KP_SALT_EX 0x0000000A
+#define KP_P 0x0000000B
+#define KP_G 0x0000000C
+#define KP_Q 0x0000000D
+#define KP_X 0x0000000E
+#define KP_Y 0x0000000F
+#define KP_RA 0x00000010
+#define KP_RB 0x00000011
+#define KP_INFO 0x00000012
+#define KP_EFFECTIVE_KEYLEN 0x00000013
+#define KP_SCHANNEL_ALG 0x00000014
+#define KP_PUB_PARAMS 0x00000027
+
+#define CRYPT_FLAG_PCT1 0x00000001
+#define CRYPT_FLAG_SSL2 0x00000002
+#define CRYPT_FLAG_SSL3 0x00000004
+#define CRYPT_FLAG_TLS1 0x00000008
+#define CRYPT_FLAG_IPSEC 0x00000010
+#define CRYPT_FLAG_SIGNING 0x00000020
+
+#define SCHANNEL_MAC_KEY 0x00000000
+#define SCHANNEL_ENC_KEY 0x00000001
+
+#define INTERNATIONAL_USAGE 0x00000001
+
+#if WINVER >= _WIN32_WINNT_WINXP
+/* These are available only on Windows XP, Windows Server 2003, and later
+ */
+#define CMC_ADD_ATTRIBUTES ((LPCSTR)(63))
+#define CMC_ADD_EXTENSIONS ((LPCSTR)(62))
+#define X509_CERT_PAIR ((LPCSTR)(53))
+#define X509_CERTIFICATE_TEMPLATE ((LPCSTR)(64))
+#define X509_CROSS_CERT_DIST_POINTS ((LPCSTR)(58))
+#define CMC_DATA ((LPCSTR)(59))
+#define X509_NAME_CONSTRAINTS ((LPCSTR)(55))
+#define X509_POLICY_CONSTRAINTS ((LPCSTR)(57))
+#define X509_POLICY_MAPPINGS ((LPCSTR)(56))
+#define CMC_RESPONSE ((LPCSTR)(60))
+#define CMC_STATUS ((LPCSTR)(61))
+#endif /* WINVER >= _WIN32_WINNT_WINXP */
+
+#define X509_ALGORITHM_IDENTIFIER ((LPCSTR)(74))
+#define X509_ALTERNATE_NAME ((LPCSTR)(12))
+
+/* FIXME: need #define X509_ANY_STRING */
+#ifdef MINGW_TENTATIVE_ASSUMPTIONS
+/* https://msdn.microsoft.com/en-us/library/aa378145.aspx suggests
+ * that this may be an alias for...
+ */
+#define X509_ANY_STRING X509_NAME_VALUE
#endif
-#define GET_ALG_CLASS(x) (x&57344)
-#define GET_ALG_TYPE(x) (x&7680)
-#define GET_ALG_SID(x) (x&511)
-#define ALG_CLASS_ANY 0
-#define ALG_CLASS_SIGNATURE 8192
-#define ALG_CLASS_MSG_ENCRYPT 16384
-#define ALG_CLASS_DATA_ENCRYPT 24576
-#define ALG_CLASS_HASH 32768
-#define ALG_CLASS_KEY_EXCHANGE 40960
-#define ALG_CLASS_ALL 57344 /* (7 << 13) */
-#define ALG_TYPE_ANY 0
-#define ALG_TYPE_DSS 512
-#define ALG_TYPE_RSA 1024
-#define ALG_TYPE_BLOCK 1536
-#define ALG_TYPE_STREAM 2048
-#define ALG_TYPE_DH 2560 /* (5 << 9) */
-#define ALG_TYPE_SECURECHANNEL 3072 /* (6 << 9) */
-#define ALG_SID_ANY 0
-#define ALG_SID_RSA_ANY 0
-#define ALG_SID_RSA_PKCS 1
-#define ALG_SID_RSA_MSATWORK 2
-#define ALG_SID_RSA_ENTRUST 3
-#define ALG_SID_RSA_PGP 4
-#define ALG_SID_DSS_ANY 0
-#define ALG_SID_DSS_PKCS 1
-#define ALG_SID_DSS_DMS 2
-#define ALG_SID_DES 1
-#define ALG_SID_3DES 3
-#define ALG_SID_DESX 4
-#define ALG_SID_IDEA 5
-#define ALG_SID_CAST 6
-#define ALG_SID_SAFERSK64 7
-#define ALG_SID_SAFERSK128 8
-#define ALG_SID_3DES_112 9
-#define ALG_SID_SKIPJACK 10
-#define ALG_SID_TEK 11
-#define ALG_SID_CYLINK_MEK 12
-#define ALG_SID_RC5 13
-#define ALG_SID_RC2 2
-#define ALG_SID_RC4 1
-#define ALG_SID_SEAL 2
-#define ALG_SID_MD2 1
-#define ALG_SID_MD4 2
-#define ALG_SID_MD5 3
-#define ALG_SID_SHA 4
-#define ALG_SID_MAC 5
-#define ALG_SID_RIPEMD 6
-#define ALG_SID_RIPEMD160 7
-#define ALG_SID_SSL3SHAMD5 8
-#define ALG_SID_HMAC 9
-#define ALG_SID_TLS1PRF 10
-#define ALG_SID_AES_128 14
-#define ALG_SID_AES_192 15
-#define ALG_SID_AES_256 16
-#define ALG_SID_AES 17
-#define ALG_SID_EXAMPLE 80
-
-#define CALG_MD2 (ALG_CLASS_HASH|ALG_TYPE_ANY|ALG_SID_MD2)
-#define CALG_MD4 (ALG_CLASS_HASH|ALG_TYPE_ANY|ALG_SID_MD4)
-#define CALG_MD5 (ALG_CLASS_HASH|ALG_TYPE_ANY|ALG_SID_MD5)
-#define CALG_SHA (ALG_CLASS_HASH|ALG_TYPE_ANY|ALG_SID_SHA)
-#define CALG_SHA1 CALG_SHA
-#define CALG_MAC (ALG_CLASS_HASH|ALG_TYPE_ANY|ALG_SID_MAC)
-#define CALG_3DES (ALG_CLASS_DATA_ENCRYPT|ALG_TYPE_BLOCK|3)
-#define CALG_CYLINK_MEK (ALG_CLASS_DATA_ENCRYPT|ALG_TYPE_BLOCK|12)
-#define CALG_SKIPJACK (ALG_CLASS_DATA_ENCRYPT|ALG_TYPE_BLOCK|10)
-#define CALG_KEA_KEYX (ALG_CLASS_KEY_EXCHANGE|ALG_TYPE_STREAM|ALG_TYPE_DSS|4)
-#define CALG_RSA_SIGN (ALG_CLASS_SIGNATURE|ALG_TYPE_RSA|ALG_SID_RSA_ANY)
-#define CALG_DSS_SIGN (ALG_CLASS_SIGNATURE|ALG_TYPE_DSS|ALG_SID_DSS_ANY)
-#define CALG_RSA_KEYX (ALG_CLASS_KEY_EXCHANGE|ALG_TYPE_RSA|ALG_SID_RSA_ANY)
-#define CALG_DES (ALG_CLASS_DATA_ENCRYPT|ALG_TYPE_BLOCK|ALG_SID_DES)
-#define CALG_RC2 (ALG_CLASS_DATA_ENCRYPT|ALG_TYPE_BLOCK|ALG_SID_RC2)
-#define CALG_RC4 (ALG_CLASS_DATA_ENCRYPT|ALG_TYPE_STREAM|ALG_SID_RC4)
-#define CALG_SEAL (ALG_CLASS_DATA_ENCRYPT|ALG_TYPE_STREAM|ALG_SID_SEAL)
-#define CALG_DH_EPHEM (ALG_CLASS_KEY_EXCHANGE|ALG_TYPE_STREAM|ALG_TYPE_DSS|ALG_SID_DSS_DMS)
-#define CALG_DESX (ALG_CLASS_DATA_ENCRYPT|ALG_TYPE_BLOCK|ALG_SID_DESX)
-#define CALG_TLS1PRF (ALG_CLASS_DHASH|ALG_TYPE_ANY|ALG_SID_TLS1PRF)
-#define CALG_AES_128 (ALG_CLASS_DATA_ENCRYPT|ALG_TYPE_BLOCK|ALG_SID_AES_128)
-#define CALG_AES_192 (ALG_CLASS_DATA_ENCRYPT|ALG_TYPE_BLOCK|ALG_SID_AES_192)
-#define CALG_AES_256 (ALG_CLASS_DATA_ENCRYPT|ALG_TYPE_BLOCK|ALG_SID_AES_256)
-#define CALG_AES (ALG_CLASS_DATA_ENCRYPT|ALG_TYPE_BLOCK|ALG_SID_AES)
-
-#define CRYPT_VERIFYCONTEXT 0xF0000000
-#define CRYPT_NEWKEYSET 8
-#define CRYPT_DELETEKEYSET 16
-#define CRYPT_MACHINE_KEYSET 32
-#define CRYPT_SILENT 64
-#define CRYPT_EXPORTABLE 1
-#define CRYPT_USER_PROTECTED 2
-#define CRYPT_CREATE_SALT 4
-#define CRYPT_UPDATE_KEY 8
-#define SIMPLEBLOB 1
-#define PUBLICKEYBLOB 6
-#define PRIVATEKEYBLOB 7
-#define PLAINTEXTKEYBLOB 8
-#define OPAQUEKEYBLOB 9
-#define PUBLICKEYBLOBEX 10
-#define SYMMETRICWRAPKEYBLOB 11
-#define AT_KEYEXCHANGE 1
-#define AT_SIGNATURE 2
-#define CRYPT_USERDATA 1
-#define PKCS5_PADDING 1
-#define CRYPT_MODE_CBC 1
-#define CRYPT_MODE_ECB 2
-#define CRYPT_MODE_OFB 3
-#define CRYPT_MODE_CFB 4
-#define CRYPT_MODE_CTS 5
-#define CRYPT_MODE_CBCI 6
-#define CRYPT_MODE_CFBP 7
-#define CRYPT_MODE_OFBP 8
-#define CRYPT_MODE_CBCOFM 9
-#define CRYPT_MODE_CBCOFMI 10
-#define CRYPT_ENCRYPT 1
-#define CRYPT_DECRYPT 2
-#define CRYPT_EXPORT 4
-#define CRYPT_READ 8
-#define CRYPT_WRITE 16
-#define CRYPT_MAC 32
-#define HP_ALGID 1
-#define HP_HASHVAL 2
-#define HP_HASHSIZE 4
-#define HP_HMAC_INFO 5
-#define CRYPT_FAILED FALSE
-#define CRYPT_SUCCEED TRUE
-#define RCRYPT_SUCCEEDED(r) ((r)==CRYPT_SUCCEED)
-#define RCRYPT_FAILED(r) ((r)==CRYPT_FAILED)
-#define PP_ENUMALGS 1
-#define PP_ENUMCONTAINERS 2
-#define PP_IMPTYPE 3
-#define PP_NAME 4
-#define PP_VERSION 5
-#define PP_CONTAINER 6
-#define PP_CHANGE_PASSWORD 7
-#define PP_KEYSET_SEC_DESCR 8
-#define PP_CERTCHAIN 9
-#define PP_KEY_TYPE_SUBTYPE 10
-#define PP_PROVTYPE 16
-#define PP_KEYSTORAGE 17
-#define PP_APPLI_CERT 18
-#define PP_SYM_KEYSIZE 19
-#define PP_SESSION_KEYSIZE 20
-#define PP_UI_PROMPT 21
-#define PP_ENUMALGS_EX 22
-#define PP_ENUMMANDROOTS 25
-#define PP_ENUMELECTROOTS 26
-#define PP_KEYSET_TYPE 27
-#define PP_ADMIN_PIN 31
-#define PP_KEYEXCHANGE_PIN 32
-#define PP_SIGNATURE_PIN 33
-#define PP_SIG_KEYSIZE_INC 34
-#define PP_KEYX_KEYSIZE_INC 35
-#define PP_UNIQUE_CONTAINER 36
-#define PP_SGC_INFO 37
-#define PP_USE_HARDWARE_RNG 38
-#define PP_KEYSPEC 39
-#define PP_ENUMEX_SIGNING_PROT 40
-#define CRYPT_FIRST 1
-#define CRYPT_NEXT 2
-#define CRYPT_IMPL_HARDWARE 1
-#define CRYPT_IMPL_SOFTWARE 2
-#define CRYPT_IMPL_MIXED 3
-#define CRYPT_IMPL_UNKNOWN 4
-#define PROV_RSA_FULL 1
-#define PROV_RSA_SIG 2
-#define PROV_DSS 3
-#define PROV_FORTEZZA 4
-#define PROV_MS_EXCHANGE 5
-#define PROV_MS_MAIL 5
-#define PROV_SSL 6
-#define PROV_STT_MER 7
-#define PROV_STT_ACQ 8
-#define PROV_STT_BRND 9
-#define PROV_STT_ROOT 10
-#define PROV_STT_ISS 11
-#define PROV_RSA_SCHANNEL 12
-#define PROV_DSS_DH 13
-#define PROV_EC_ECDSA_SIG 14
-#define PROV_EC_ECNRA_SIG 15
-#define PROV_EC_ECDSA_FULL 16
-#define PROV_EC_ECNRA_FULL 17
-#define PROV_DH_SCHANNEL 18
-#define PROV_SPYRUS_LYNKS 20
-#define PROV_RNG 21
-#define PROV_INTEL_SEC 22
-#define PROV_RSA_AES 24
-#define MAXUIDLEN 64
-#define CUR_BLOB_VERSION 2
-#define X509_ASN_ENCODING 1
-#define PKCS_7_ASN_ENCODING 65536
-#define CERT_V1 0
-#define CERT_V2 1
-#define CERT_V3 2
-#define CERT_E_CHAINING (-2146762486)
-#define CERT_E_CN_NO_MATCH (-2146762481)
-#define CERT_E_EXPIRED (-2146762495)
-#define CERT_E_PURPOSE (-2146762490)
-#define CERT_E_REVOCATION_FAILURE (-2146762482)
-#define CERT_E_REVOKED (-2146762484)
-#define CERT_E_ROLE (-2146762493)
-#define CERT_E_UNTRUSTEDROOT (-2146762487)
-#define CERT_E_UNTRUSTEDTESTROOT (-2146762483)
-#define CERT_E_VALIDITYPERIODNESTING (-2146762494)
-#define CERT_E_WRONG_USAGE (-2146762480)
-#define CERT_E_PATHLENCONST (-2146762492)
-#define CERT_E_CRITICAL (-2146762491)
-#define CERT_E_ISSUERCHAINING (-2146762489)
-#define CERT_E_MALFORMED (-2146762488)
-#define CRYPT_E_REVOCATION_OFFLINE (-2146885613)
-#define CRYPT_E_REVOKED (-2146885616)
-#define TRUST_E_BASIC_CONSTRAINTS (-2146869223)
-#define TRUST_E_CERT_SIGNATURE (-2146869244)
-#define TRUST_E_FAIL (-2146762485)
-#define CERT_TRUST_NO_ERROR 0
-#define CERT_TRUST_IS_NOT_TIME_VALID 1
-#define CERT_TRUST_IS_NOT_TIME_NESTED 2
-#define CERT_TRUST_IS_REVOKED 4
-#define CERT_TRUST_IS_NOT_SIGNATURE_VALID 8
-#define CERT_TRUST_IS_NOT_VALID_FOR_USAGE 16
-#define CERT_TRUST_IS_UNTRUSTED_ROOT 32
-#define CERT_TRUST_REVOCATION_STATUS_UNKNOWN 64
-#define CERT_TRUST_IS_CYCLIC 128
-#define CERT_TRUST_IS_PARTIAL_CHAIN 65536
-#define CERT_TRUST_CTL_IS_NOT_TIME_VALID 131072
-#define CERT_TRUST_CTL_IS_NOT_SIGNATURE_VALID 262144
-#define CERT_TRUST_CTL_IS_NOT_VALID_FOR_USAGE 524288
-#define CERT_TRUST_HAS_EXACT_MATCH_ISSUER 1
-#define CERT_TRUST_HAS_KEY_MATCH_ISSUER 2
-#define CERT_TRUST_HAS_NAME_MATCH_ISSUER 4
-#define CERT_TRUST_IS_SELF_SIGNED 8
-#define CERT_TRUST_IS_COMPLEX_CHAIN 65536
-#define CERT_CHAIN_POLICY_BASE ((LPCSTR) 1)
-#define CERT_CHAIN_POLICY_AUTHENTICODE ((LPCSTR) 2)
-#define CERT_CHAIN_POLICY_AUTHENTICODE_TS ((LPCSTR) 3)
-#define CERT_CHAIN_POLICY_SSL ((LPCSTR) 4)
-#define CERT_CHAIN_POLICY_BASIC_CONSTRAINTS ((LPCSTR) 5)
-#define CERT_CHAIN_POLICY_NT_AUTH ((LPCSTR) 6)
-#define USAGE_MATCH_TYPE_AND 0
-#define USAGE_MATCH_TYPE_OR 1
-#define CERT_SIMPLE_NAME_STR 1
-#define CERT_OID_NAME_STR 2
-#define CERT_X500_NAME_STR 3
-#define CERT_NAME_STR_COMMA_FLAG 0x04000000
-#define CERT_NAME_STR_SEMICOLON_FLAG 1073741824
-#define CERT_NAME_STR_CRLF_FLAG 134217728
-#define CERT_NAME_STR_NO_PLUS_FLAG 536870912
-#define CERT_NAME_STR_NO_QUOTING_FLAG 268435456
-#define CERT_NAME_STR_DISABLE_IE4_UTF8_FLAG 0x00010000
-#define CERT_NAME_STR_ENABLE_UTF8_UNICODE_FLAG 0x00040000
-#define CERT_NAME_STR_REVERSE_FLAG 33554432
-#define CERT_NAME_STR_ENABLE_T61_UNICODE_FLAG 131072
-#define CERT_FIND_ANY 0
-#define CERT_FIND_CERT_ID 1048576
-#define CERT_FIND_CTL_USAGE 655360
-#define CERT_FIND_ENHKEY_USAGE 655360
-#define CERT_FIND_EXISTING 851968
-#define CERT_FIND_HASH 65536
-#define CERT_FIND_ISSUER_ATTR 196612
-#define CERT_FIND_ISSUER_NAME 131076
-#define CERT_FIND_ISSUER_OF 786432
-#define CERT_FIND_KEY_IDENTIFIER 983040
-#define CERT_FIND_KEY_SPEC 589824
-#define CERT_FIND_MD5_HASH 262144
-#define CERT_FIND_PROPERTY 327680
-#define CERT_FIND_PUBLIC_KEY 393216
-#define CERT_FIND_SHA1_HASH 65536
-#define CERT_FIND_SIGNATURE_HASH 917504
-#define CERT_FIND_SUBJECT_ATTR 196615
-#define CERT_FIND_SUBJECT_CERT 720896
-#define CERT_FIND_SUBJECT_NAME 131079
-#define CERT_FIND_SUBJECT_STR_A 458759
-#define CERT_FIND_SUBJECT_STR_W 524295
-#define CERT_FIND_ISSUER_STR_A 458756
-#define CERT_FIND_ISSUER_STR_W 524292
-#define CERT_FIND_OR_ENHKEY_USAGE_FLAG 16
-#define CERT_FIND_OPTIONAL_ENHKEY_USAGE_FLAG 1
-#define CERT_FIND_NO_ENHKEY_USAGE_FLAG 8
-#define CERT_FIND_VALID_ENHKEY_USAGE_FLAG 32
-#define CERT_FIND_EXT_ONLY_ENHKEY_USAGE_FLAG 2
-#define CERT_CASE_INSENSITIVE_IS_RDN_ATTRS_FLAG 2
-#define CERT_UNICODE_IS_RDN_ATTRS_FLAG 1
-#define CERT_CHAIN_FIND_BY_ISSUER 1
-#define CERT_CHAIN_FIND_BY_ISSUER_COMPARE_KEY_FLAG 1
-#define CERT_CHAIN_FIND_BY_ISSUER_COMPLEX_CHAIN_FLAG 2
-#define CERT_CHAIN_FIND_BY_ISSUER_CACHE_ONLY_FLAG 32768
-#define CERT_CHAIN_FIND_BY_ISSUER_CACHE_ONLY_URL_FLAG 4
-#define CERT_CHAIN_FIND_BY_ISSUER_LOCAL_MACHINE_FLAG 8
-#define CERT_CHAIN_FIND_BY_ISSUER_NO_KEY_FLAG 16384
-#define CERT_STORE_PROV_SYSTEM 10
-#define CERT_SYSTEM_STORE_LOCAL_MACHINE 131072
-#define szOID_PKIX_KP_SERVER_AUTH "4235600"
-#define szOID_SERVER_GATED_CRYPTO "4235658"
-#define szOID_SGC_NETSCAPE "2.16.840.1.113730.4.1"
-#define szOID_PKIX_KP_CLIENT_AUTH "1.3.6.1.5.5.7.3.2"
-#define CRYPT_NOHASHOID 0x00000001
-#define CRYPT_NO_SALT 0x10
-#define CRYPT_PREGEN 0x40
-#define CRYPT_RECIPIENT 0x10
-#define CRYPT_INITIATOR 0x40
-#define CRYPT_ONLINE 0x80
-#define CRYPT_SF 0x100
-#define CRYPT_CREATE_IV 0x200
-#define CRYPT_KEK 0x400
-#define CRYPT_DATA_KEY 0x800
-#define CRYPT_VOLATILE 0x1000
-#define CRYPT_SGCKEY 0x2000
-#define KP_IV 0x00000001
-#define KP_SALT 0x00000002
-#define KP_PADDING 0x00000003
-#define KP_MODE 0x00000004
-#define KP_MODE_BITS 0x00000005
-#define KP_PERMISSIONS 0x00000006
-#define KP_ALGID 0x00000007
-#define KP_BLOCKLEN 0x00000008
-#define KP_KEYLEN 0x00000009
-#define KP_SALT_EX 0x0000000a
-#define KP_P 0x0000000b
-#define KP_G 0x0000000c
-#define KP_Q 0x0000000d
-#define KP_X 0x0000000e
-#define KP_Y 0x0000000f
-#define KP_RA 0x00000010
-#define KP_RB 0x00000011
-#define KP_INFO 0x00000012
-#define KP_EFFECTIVE_KEYLEN 0x00000013
-#define KP_SCHANNEL_ALG 0x00000014
-#define KP_PUB_PARAMS 0x00000027
-#define CRYPT_FLAG_PCT1 0x0001
-#define CRYPT_FLAG_SSL2 0x0002
-#define CRYPT_FLAG_SSL3 0x0004
-#define CRYPT_FLAG_TLS1 0x0008
-#define CRYPT_FLAG_IPSEC 0x0010
-#define CRYPT_FLAG_SIGNING 0x0020
-#define SCHANNEL_MAC_KEY 0x00000000
-#define SCHANNEL_ENC_KEY 0x00000001
-#define INTERNATIONAL_USAGE 0x00000001
-#if (WINVER >= 0x0501) /* Windows Server 2003, Windows XP */
-#define CMC_ADD_ATTRIBUTES (LPCSTR) 63
-#define CMC_ADD_EXTENSIONS (LPCSTR) 62
-#define X509_CERT_PAIR (LPCSTR) 53
-#define X509_CERTIFICATE_TEMPLATE (LPCSTR) 64
-#define X509_CROSS_CERT_DIST_POINTS (LPCSTR) 58
-#define CMC_DATA (LPCSTR) 59
-#define X509_NAME_CONSTRAINTS (LPCSTR) 55
-#define X509_POLICY_CONSTRAINTS (LPCSTR) 57
-#define X509_POLICY_MAPPINGS (LPCSTR) 56
-#define CMC_RESPONSE (LPCSTR) 60
-#define CMC_STATUS (LPCSTR) 61
-#endif /* (WINVER >= 0x0501) */ /* Windows Server 2003, Windows XP */
-#define X509_ALGORITHM_IDENTIFIER (LPCSTR) 74
-#define X509_ALTERNATE_NAME (LPCSTR) 12
-/* need X509_ANY_STRING */
-#define PKCS_ATTRIBUTE (LPCSTR) 22
-#define X509_AUTHORITY_INFO_ACCESS (LPCSTR) 32
-#define X509_AUTHORITY_KEY_ID (LPCSTR) 9
-#define X509_AUTHORITY_KEY_ID2 (LPCSTR) 31
-#define szOID_BASIC_CONSTRAINTS "2.5.29.10"
-#define X509_BASIC_CONSTRAINTS2 (LPCSTR) 15
-#define X509_BIOMETRIC_EXT (LPCSTR) 71
-#define X509_BITS (LPCSTR) 26
-#define X509_CERT (LPCSTR) 1
-#define X509_CERT_CRL_TO_BE_SIGNED (LPCSTR) 3
-#define X509_CERT_POLICIES (LPCSTR) 16
-#define X509_CERT_REQUEST_TO_BE_SIGNED (LPCSTR) 4
-#define X509_CERT_TO_BE_SIGNED (LPCSTR) 2
-#define X509_CHOICE_OF_TIME (LPCSTR) 30
-#define PKCS_CONTENT_INFO (LPCSTR) 33
-#define PKCS_CONTENT_INFO_SEQUENCE_OF_ANY (LPCSTR) 23
-#define X509_CRL_DIST_POINTS (LPCSTR) 35
-/* need X509_CRL_REASON_CODE */
-#define RSA_CSP_PUBLICKEYBLOB (LPCSTR) 19
-#define PKCS_CTL (LPCSTR) 37
-#define X509_DSS_PARAMETERS (LPCSTR) 39
-/* need X509_DSS_PUBLICKEY */
-#define X509_DSS_SIGNATURE (LPCSTR) 40
-#define X509_ECC_SIGNATURE (LPCSTR) 47
-#define X509_ENHANCED_KEY_USAGE (LPCSTR) 36
-#define X509_ENUMERATED (LPCSTR) 29
-#define X509_EXTENSIONS (LPCSTR) 5
-#define X509_INTEGER (LPCSTR) 27
-#define X509_ISSUING_DIST_POINT (LPCSTR) 54
-#define X509_KEY_ATTRIBUTES (LPCSTR) 10
-#define X509_KEY_USAGE (LPCSTR) 14
-#define X509_KEY_USAGE_RESTRICTION (LPCSTR) 11
-#define X509_KEYGEN_REQUEST_TO_BE_SIGNED (LPCSTR) 21
-#define X509_LOGOTYPE_EXT (LPCSTR) 70
-#define X509_MULTI_BYTE_INTEGER (LPCSTR) 28
-#define X509_MULTI_BYTE_UINT (LPCSTR) 38
-#define X509_NAME (LPCSTR) 7
-#define X509_NAME_VALUE (LPCSTR) 6
-#define X509_OBJECT_IDENTIFIER (LPCSTR) 73
-#define X509_OCTET_STRING (LPCSTR) 25
-#define X509_PUBLIC_KEY_INFO (LPCSTR) 8
-#define PKCS_RC2_CBC_PARAMETERS (LPCSTR) 41
-#define CNG_RSA_PUBLIC_KEY_BLOB (LPCSTR) 72
-#define PKCS_RSA_SSA_PSS_PARAMETERS (LPCSTR) 75
-#define PKCS_RSAES_OAEP_PARAMETERS (LPCSTR) 76
-#define ECC_CMS_SHARED_INFO (LPCSTR) 77
-#define X509_SEQUENCE_OF_ANY (LPCSTR) 34
-#define PKCS7_SIGNER_INFO (LPCSTR) 500
-#define CMS_SIGNER_INFO (LPCSTR) 501
-#define PKCS_SMIME_CAPABILITIES (LPCSTR) 42
-#define PKCS_TIME_REQUEST (LPCSTR) 18
-/* need X509_UNICODE_ANY_STRING */
-#define X509_UNICODE_NAME (LPCSTR) 20
-#define X509_UNICODE_NAME_VALUE (LPCSTR) 24
-#define PKCS_UTC_TIME (LPCSTR) 17
-#define OCSP_SIGNED_REQUEST (LPCSTR) 65
-#define OCSP_REQUEST (LPCSTR) 66
-#define OCSP_RESPONSE (LPCSTR) 67
-#define OCSP_BASIC_SIGNED_RESPONSE (LPCSTR) 68
-#define OCSP_BASIC_RESPONSE (LPCSTR) 69
-enum { CRL_REASON_UNSPECIFIED=0,
- CRL_REASON_KEY_COMPROMISE=1,
- CRL_REASON_CA_COMPROMISE=2,
- CRL_REASON_AFFILIATION_CHANGED=3,
- CRL_REASON_SUPERSEDED=4,
- CRL_REASON_CESSATION_OF_OPERATION=5,
- CRL_REASON_CERTIFICATE_HOLD=6,
- CRL_REASON_REMOVE_FROM_CRL=7
- };
-/* need CRYPT_DECODE_NOCOPY_FLAG */
-#define CRYPT_ENCODE_ALLOC_FLAG 0x8000
-#define CRYPT_UNICODE_NAME_ENCODE_DISABLE_CHECK_TYPE_FLAG 0x40000000
-#define CRYPT_UNICODE_NAME_ENCODE_ENABLE_T61_UNICODE_FLAG 0x80000000
-#define CRYPT_UNICODE_NAME_ENCODE_ENABLE_UTF8_UNICODE_FLAG 0x20000000
-#define CRYPT_UNICODE_NAME_ENCODE_FORCE_UTF8_UNICODE_FLAG 0x10000000
-
-
-#define szOID_RSA "1.2.840.113549"
-#define szOID_PKCS "1.2.840.113549.1"
-#define szOID_RSA_HASH "1.2.840.113549.2"
-#define szOID_RSA_ENCRYPT "1.2.840.113549.3"
-#define szOID_PKCS_1 "1.2.840.113549.1.1"
-#define szOID_PKCS_2 "1.2.840.113549.1.2"
-#define szOID_PKCS_3 "1.2.840.113549.1.3"
-#define szOID_PKCS_4 "1.2.840.113549.1.4"
-#define szOID_PKCS_5 "1.2.840.113549.1.5"
-#define szOID_PKCS_6 "1.2.840.113549.1.6"
-#define szOID_PKCS_7 "1.2.840.113549.1.7"
-#define szOID_PKCS_8 "1.2.840.113549.1.8"
-#define szOID_PKCS_9 "1.2.840.113549.1.9"
-#define szOID_PKCS_10 "1.2.840.113549.1.10"
-#define szOID_PKCS_12 "1.2.840.113549.1.12"
-#define szOID_RSA_MD2 "1.2.840.113549.1.1.2"
-#define szOID_RSA_MD4 "1.2.840.113549.1.1.3"
-#define szOID_RSA_MD5 "1.2.840.113549.2.5"
-#define szOID_RSA_RSA "1.2.840.113549.1.1.1"
-#define szOID_RSA_MD2RSA "1.2.840.113549.1.1.2"
-#define szOID_RSA_MD4RSA "1.2.840.113549.1.1.3"
-#define szOID_RSA_MD5RSA "1.2.840.113549.1.1.4"
-#define szOID_RSA_SHA1RSA "1.2.840.113549.1.1.5"
-#define szOID_RSA_SETOAEP_RSA "1.2.840.113549.1.1.5"
-#define szOID_RSA_DH "1.2.840.113549.1.3.1"
-#define szOID_RSA_data "1.2.840.113549.1.7.1"
-#define szOID_RSA_signedData "1.2.840.113549.1.7.2"
-#define szOID_RSA_envelopedData "1.2.840.113549.1.7.3"
-#define szOID_RSA_signEnvData "1.2.840.113549.1.7.4"
-#define szOID_RSA_digestedData "1.2.840.113549.1.7.5"
-#define szOID_RSA_hashedData "1.2.840.113549.1.7.5"
-#define szOID_RSA_encryptedData "1.2.840.113549.1.7.6"
-#define szOID_RSA_emailAddr "1.2.840.113549.1.9.1"
-#define szOID_RSA_unstructName "1.2.840.113549.1.9.2"
-#define szOID_RSA_contentType "1.2.840.113549.1.9.3"
-#define szOID_RSA_messageDigest "1.2.840.113549.1.9.4"
-#define szOID_RSA_signingTime "1.2.840.113549.1.9.5"
-#define szOID_RSA_counterSign "1.2.840.113549.1.9.6"
-#define szOID_RSA_challengePwd "1.2.840.113549.1.9.7"
-#define szOID_RSA_unstructAddr "1.2.840.113549.1.9.8"
-#define szOID_RSA_extCertAttrs "1.2.840.113549.1.9.9"
-#define szOID_RSA_SMIMECapabilities "1.2.840.113549.1.9.15"
-#define szOID_RSA_preferSignedData "1.2.840.113549.1.9.15.1"
-#define szOID_RSA_RC2CBC "1.2.840.113549.3.2"
-#define szOID_RSA_RC4 "1.2.840.113549.3.4"
-#define szOID_RSA_DES_EDE3_CBC "1.2.840.113549.3.7"
-#define szOID_RSA_RC5_CBCPad "1.2.840.113549.3.9"
-#define szOID_ANSI_x942 "1.2.840.10046"
-#define szOID_ANSI_x942_DH "1.2.840.10046.2.1"
-#define szOID_X957 "1.2.840.10040"
-#define szOID_X957_DSA "1.2.840.10040.4.1"
-#define szOID_DATA STRUCTURE "1.2.840.10040.4.3"
-#define szOID_DS "2.5"
-#define szOID_DSALG "2.5.8"
-#define szOID_DSALG_CRPT "2.5.8.1"
-#define szOID_DSALG_HASH "2.5.8.2"
-#define szOID_DSALG_SIGN "2.5.8.3"
-#define szOID_DSALG_RSA "2.5.8.1.1"
-#define szOID_OIW "1.3.14"
-#define szOID_OIWSEC "1.3.14.3.2"
-#define szOID_OIWSEC_md4RSA "1.3.14.3.2.2"
-#define szOID_OIWSEC_md5RSA "1.3.14.3.2.3"
-#define szOID_OIWSEC_md4RSA2 "1.3.14.3.2.4"
-#define szOID_OIWSEC_desECB "1.3.14.3.2.6"
-#define szOID_OIWSEC_desCBC "1.3.14.3.2.7"
-#define szOID_OIWSEC_desOFB "1.3.14.3.2.8"
-#define szOID_OIWSEC_desCFB "1.3.14.3.2.9"
-#define szOID_OIWSEC_desMAC "1.3.14.3.2.10"
-#define szOID_OIWSEC_rsaSign "1.3.14.3.2.11"
-#define szOID_OIWSEC_dsa "1.3.14.3.2.12"
-#define szOID_OIWSEC_shaDSA "1.3.14.3.2.13"
-#define szOID_OIWSEC_mdc2RSA "1.3.14.3.2.14"
-#define szOID_OIWSEC_shaRSA "1.3.14.3.2.15"
-#define szOID_OIWSEC_dhCommMod "1.3.14.3.2.16"
-#define szOID_OIWSEC_desEDE "1.3.14.3.2.17"
-#define szOID_OIWSEC_sha "1.3.14.3.2.18"
-#define szOID_OIWSEC_mdc2 "1.3.14.3.2.19"
-#define szOID_OIWSEC_dsaComm "1.3.14.3.2.20"
-#define szOID_OIWSEC_dsaCommSHA "1.3.14.3.2.21"
-#define szOID_OIWSEC_rsaXchg "1.3.14.3.2.22"
-#define szOID_OIWSEC_keyHashSeal "1.3.14.3.2.23"
-#define szOID_OIWSEC_md2RSASign "1.3.14.3.2.24"
-#define szOID_OIWSEC_md5RSASign "1.3.14.3.2.25"
-#define szOID_OIWSEC_sha1 "1.3.14.3.2.26"
-#define szOID_OIWSEC_dsaSHA1 "1.3.14.3.2.27"
-#define szOID_OIWSEC_dsaCommSHA1 "1.3.14.3.2.28"
-#define szOID_OIWSEC_sha1RSASign "1.3.14.3.2.29"
-#define szOID_OIWDIR "1.3.14.7.2"
-#define szOID_OIWDIR_CRPT "1.3.14.7.2.1"
-#define szOID_OIWDIR_HASH "1.3.14.7.2.2"
-#define szOID_OIWDIR_SIGN "1.3.14.7.2.3"
-#define szOID_OIWDIR_md2 "1.3.14.7.2.2.1"
-#define szOID_OIWDIR_md2RSA "1.3.14.7.2.3.1"
-#define szOID_INFOSEC "2.16.840.1.101.2.1"
-#define szOID_INFOSEC_sdnsSignature "2.16.840.1.101.2.1.1.1"
-#define szOID_INFOSEC_mosaicSignature "2.16.840.1.101.2.1.1.2"
-#define szOID_INFOSEC_sdnsConfidentiality "2.16.840.1.101.2.1.1.3"
-#define szOID_INFOSEC_mosaicConfidentiality "2.16.840.1.101.2.1.1.4"
-#define szOID_INFOSEC_sdnsIntegrity "2.16.840.1.101.2.1.1.5"
-#define szOID_INFOSEC_mosaicIntegrity "2.16.840.1.101.2.1.1.6"
-#define szOID_INFOSEC_sdnsTokenProtection "2.16.840.1.101.2.1.1.7"
-#define szOID_INFOSEC_mosaicTokenProtection "2.16.840.1.101.2.1.1.8"
+#define PKCS_ATTRIBUTE ((LPCSTR)(22))
+#define X509_AUTHORITY_INFO_ACCESS ((LPCSTR)(32))
+#define X509_AUTHORITY_KEY_ID ((LPCSTR) (9))
+#define X509_AUTHORITY_KEY_ID2 ((LPCSTR)(31))
+
+#define szOID_BASIC_CONSTRAINTS "2.5.29.10"
+#define X509_BASIC_CONSTRAINTS ((LPCSTR) (13))
+#define X509_BASIC_CONSTRAINTS2 ((LPCSTR) (15))
+#define X509_BIOMETRIC_EXT ((LPCSTR) (71))
+#define X509_BITS ((LPCSTR) (26))
+#define X509_CERT ((LPCSTR) (1))
+#define X509_CERT_CRL_TO_BE_SIGNED ((LPCSTR) (3))
+#define X509_CERT_POLICIES ((LPCSTR) (16))
+#define X509_CERT_REQUEST_TO_BE_SIGNED ((LPCSTR) (4))
+#define X509_CERT_TO_BE_SIGNED ((LPCSTR) (2))
+#define X509_CHOICE_OF_TIME ((LPCSTR) (30))
+#define PKCS_CONTENT_INFO ((LPCSTR) (33))
+#define PKCS_CONTENT_INFO_SEQUENCE_OF_ANY ((LPCSTR) (23))
+#define X509_CRL_DIST_POINTS ((LPCSTR) (35))
+
+/* FIXME: need #define X509_CRL_REASON_CODE */
+#ifdef MINGW_TENTATIVE_ASSUMPTIONS
+/* https://msdn.microsoft.com/en-us/library/aa378145.aspx suggests
+ * that this may be an alias for...
+ */
+#define X509_CRL_REASON_CODE X509_ENUMERATED
+#endif
+
+#define RSA_CSP_PUBLICKEYBLOB ((LPCSTR) (19))
+#define PKCS_CTL ((LPCSTR) (37))
+#define X509_DSS_PARAMETERS ((LPCSTR) (39))
+
+/* FIXME: need #define X509_DSS_PUBLICKEY */
+#ifdef MINGW_TENTATIVE_ASSUMPTIONS
+/* https://msdn.microsoft.com/en-us/library/aa378145.aspx suggests
+ * that this may be an alias for...
+ */
+#define X509_DSS_PUBLICKEY X509_MULTI_BYTE_UINT
+#endif
+
+#define X509_DSS_SIGNATURE ((LPCSTR) (40))
+#define X509_ECC_SIGNATURE ((LPCSTR) (47))
+#define X509_ENHANCED_KEY_USAGE ((LPCSTR) (36))
+#define X509_ENUMERATED ((LPCSTR) (29))
+#define X509_EXTENSIONS ((LPCSTR) (5))
+#define X509_INTEGER ((LPCSTR) (27))
+#define X509_ISSUING_DIST_POINT ((LPCSTR) (54))
+#define X509_KEY_ATTRIBUTES ((LPCSTR) (10))
+#define X509_KEY_USAGE ((LPCSTR) (14))
+#define X509_KEY_USAGE_RESTRICTION ((LPCSTR) (11))
+#define X509_KEYGEN_REQUEST_TO_BE_SIGNED ((LPCSTR) (21))
+#define X509_LOGOTYPE_EXT ((LPCSTR) (70))
+#define X509_MULTI_BYTE_INTEGER ((LPCSTR) (28))
+#define X509_MULTI_BYTE_UINT ((LPCSTR) (38))
+#define X509_NAME ((LPCSTR) (7))
+#define X509_NAME_VALUE ((LPCSTR) (6))
+#define X509_OBJECT_IDENTIFIER ((LPCSTR) (73))
+#define X509_OCTET_STRING ((LPCSTR) (25))
+#define X509_PUBLIC_KEY_INFO ((LPCSTR) (8))
+#define PKCS_RC2_CBC_PARAMETERS ((LPCSTR) (41))
+#define CNG_RSA_PUBLIC_KEY_BLOB ((LPCSTR) (72))
+#define PKCS_RSA_SSA_PSS_PARAMETERS ((LPCSTR) (75))
+#define PKCS_RSAES_OAEP_PARAMETERS ((LPCSTR) (76))
+#define ECC_CMS_SHARED_INFO ((LPCSTR) (77))
+#define X509_SEQUENCE_OF_ANY ((LPCSTR) (34))
+#define PKCS7_SIGNER_INFO ((LPCSTR)(500))
+#define CMS_SIGNER_INFO ((LPCSTR)(501))
+#define PKCS_SMIME_CAPABILITIES ((LPCSTR) (42))
+#define PKCS_TIME_REQUEST ((LPCSTR) (18))
+
+/* FIXME: need #define X509_UNICODE_ANY_STRING */
+#ifdef MINGW_TENTATIVE_ASSUMPTIONS
+/* https://msdn.microsoft.com/en-us/library/aa378145.aspx suggests
+ * that this may be an alias for...
+ */
+#define X509_UNICODE_ANY_STRING X509_UNICODE_NAME_VALUE
+#endif
+
+#define X509_UNICODE_NAME ((LPCSTR) (20))
+#define X509_UNICODE_NAME_VALUE ((LPCSTR) (24))
+#define PKCS_UTC_TIME ((LPCSTR) (17))
+#define OCSP_SIGNED_REQUEST ((LPCSTR) (65))
+#define OCSP_REQUEST ((LPCSTR) (66))
+#define OCSP_RESPONSE ((LPCSTR) (67))
+#define OCSP_BASIC_SIGNED_RESPONSE ((LPCSTR) (68))
+#define OCSP_BASIC_RESPONSE ((LPCSTR) (69))
+
+enum
+{ CRL_REASON_UNSPECIFIED=0,
+ CRL_REASON_KEY_COMPROMISE=1,
+ CRL_REASON_CA_COMPROMISE=2,
+ CRL_REASON_AFFILIATION_CHANGED=3,
+ CRL_REASON_SUPERSEDED=4,
+ CRL_REASON_CESSATION_OF_OPERATION=5,
+ CRL_REASON_CERTIFICATE_HOLD=6,
+ CRL_REASON_REMOVE_FROM_CRL=7
+};
+
+/* FIXME: need #define CRYPT_DECODE_NOCOPY_FLAG */
+
+#define CRYPT_ENCODE_ALLOC_FLAG 0x00008000
+#define CRYPT_UNICODE_NAME_ENCODE_DISABLE_CHECK_TYPE_FLAG 0x40000000
+#define CRYPT_UNICODE_NAME_ENCODE_ENABLE_T61_UNICODE_FLAG 0x80000000
+#define CRYPT_UNICODE_NAME_ENCODE_ENABLE_UTF8_UNICODE_FLAG 0x20000000
+#define CRYPT_UNICODE_NAME_ENCODE_FORCE_UTF8_UNICODE_FLAG 0x10000000
+
+/* Object ID codes from https://support.microsoft.com/en-gb/kb/287547
+ * and/or from https://msdn.microsoft.com/en-us/library/aa378145.aspx
+ */
+#define szOID_RSA "1.2.840.113549"
+#define szOID_PKCS "1.2.840.113549.1"
+#define szOID_RSA_HASH "1.2.840.113549.2"
+#define szOID_RSA_ENCRYPT "1.2.840.113549.3"
+#define szOID_PKCS_1 "1.2.840.113549.1.1"
+#define szOID_PKCS_2 "1.2.840.113549.1.2"
+#define szOID_PKCS_3 "1.2.840.113549.1.3"
+#define szOID_PKCS_4 "1.2.840.113549.1.4"
+#define szOID_PKCS_5 "1.2.840.113549.1.5"
+#define szOID_PKCS_6 "1.2.840.113549.1.6"
+#define szOID_PKCS_7 "1.2.840.113549.1.7"
+#define szOID_PKCS_8 "1.2.840.113549.1.8"
+#define szOID_PKCS_9 "1.2.840.113549.1.9"
+#define szOID_PKCS_10 "1.2.840.113549.1.10"
+#define szOID_PKCS_12 "1.2.840.113549.1.12"
+#define szOID_RSA_MD2 "1.2.840.113549.1.1.2"
+#define szOID_RSA_MD4 "1.2.840.113549.1.1.3"
+#define szOID_RSA_MD5 "1.2.840.113549.2.5"
+#define szOID_RSA_RSA "1.2.840.113549.1.1.1"
+#define szOID_RSA_MD2RSA "1.2.840.113549.1.1.2"
+#define szOID_RSA_MD4RSA "1.2.840.113549.1.1.3"
+#define szOID_RSA_MD5RSA "1.2.840.113549.1.1.4"
+#define szOID_RSA_SHA1RSA "1.2.840.113549.1.1.5"
+#define szOID_RSA_SETOAEP_RSA "1.2.840.113549.1.1.5"
+#define szOID_RSA_DH "1.2.840.113549.1.3.1"
+#define szOID_RSA_data "1.2.840.113549.1.7.1"
+#define szOID_RSA_signedData "1.2.840.113549.1.7.2"
+#define szOID_RSA_envelopedData "1.2.840.113549.1.7.3"
+#define szOID_RSA_signEnvData "1.2.840.113549.1.7.4"
+#define szOID_RSA_digestedData "1.2.840.113549.1.7.5"
+#define szOID_RSA_hashedData "1.2.840.113549.1.7.5"
+#define szOID_RSA_encryptedData "1.2.840.113549.1.7.6"
+#define szOID_RSA_emailAddr "1.2.840.113549.1.9.1"
+#define szOID_RSA_unstructName "1.2.840.113549.1.9.2"
+#define szOID_RSA_contentType "1.2.840.113549.1.9.3"
+#define szOID_RSA_messageDigest "1.2.840.113549.1.9.4"
+#define szOID_RSA_signingTime "1.2.840.113549.1.9.5"
+#define szOID_RSA_counterSign "1.2.840.113549.1.9.6"
+#define szOID_RSA_challengePwd "1.2.840.113549.1.9.7"
+#define szOID_RSA_unstructAddr "1.2.840.113549.1.9.8"
+#define szOID_RSA_extCertAttrs "1.2.840.113549.1.9.9"
+#define szOID_RSA_SMIMECapabilities "1.2.840.113549.1.9.15"
+#define szOID_RSA_preferSignedData "1.2.840.113549.1.9.15.1"
+#define szOID_RSA_RC2CBC "1.2.840.113549.3.2"
+#define szOID_RSA_RC4 "1.2.840.113549.3.4"
+#define szOID_RSA_DES_EDE3_CBC "1.2.840.113549.3.7"
+#define szOID_RSA_RC5_CBCPad "1.2.840.113549.3.9"
+#define szOID_ANSI_x942 "1.2.840.10046"
+#define szOID_ANSI_x942_DH "1.2.840.10046.2.1"
+#define szOID_X957 "1.2.840.10040"
+#define szOID_X957_DSA "1.2.840.10040.4.1"
+#define szOID_DATA STRUCTURE "1.2.840.10040.4.3"
+#define szOID_DS "2.5"
+#define szOID_DSALG "2.5.8"
+#define szOID_DSALG_CRPT "2.5.8.1"
+#define szOID_DSALG_HASH "2.5.8.2"
+#define szOID_DSALG_SIGN "2.5.8.3"
+#define szOID_DSALG_RSA "2.5.8.1.1"
+#define szOID_OIW "1.3.14"
+#define szOID_OIWSEC "1.3.14.3.2"
+#define szOID_OIWSEC_md4RSA "1.3.14.3.2.2"
+#define szOID_OIWSEC_md5RSA "1.3.14.3.2.3"
+#define szOID_OIWSEC_md4RSA2 "1.3.14.3.2.4"
+#define szOID_OIWSEC_desECB "1.3.14.3.2.6"
+#define szOID_OIWSEC_desCBC "1.3.14.3.2.7"
+#define szOID_OIWSEC_desOFB "1.3.14.3.2.8"
+#define szOID_OIWSEC_desCFB "1.3.14.3.2.9"
+#define szOID_OIWSEC_desMAC "1.3.14.3.2.10"
+#define szOID_OIWSEC_rsaSign "1.3.14.3.2.11"
+#define szOID_OIWSEC_dsa "1.3.14.3.2.12"
+#define szOID_OIWSEC_shaDSA "1.3.14.3.2.13"
+#define szOID_OIWSEC_mdc2RSA "1.3.14.3.2.14"
+#define szOID_OIWSEC_shaRSA "1.3.14.3.2.15"
+#define szOID_OIWSEC_dhCommMod "1.3.14.3.2.16"
+#define szOID_OIWSEC_desEDE "1.3.14.3.2.17"
+#define szOID_OIWSEC_sha "1.3.14.3.2.18"
+#define szOID_OIWSEC_mdc2 "1.3.14.3.2.19"
+#define szOID_OIWSEC_dsaComm "1.3.14.3.2.20"
+#define szOID_OIWSEC_dsaCommSHA "1.3.14.3.2.21"
+#define szOID_OIWSEC_rsaXchg "1.3.14.3.2.22"
+#define szOID_OIWSEC_keyHashSeal "1.3.14.3.2.23"
+#define szOID_OIWSEC_md2RSASign "1.3.14.3.2.24"
+#define szOID_OIWSEC_md5RSASign "1.3.14.3.2.25"
+#define szOID_OIWSEC_sha1 "1.3.14.3.2.26"
+#define szOID_OIWSEC_dsaSHA1 "1...
[truncated message content] |
|
From: Keith M. <no...@so...> - 2015-09-20 10:40:38
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Repository: mingw-dist".
The branch, master has been updated
via 50485f6c0f96ded573d6fc0105aaef91305f19a5 (commit)
from 2387f0d238678919f806f2ace95179605fbf7550 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://sf.net/p/mingw/mingw-dist/ci/50485f6c0f96ded573d6fc0105aaef91305f19a5/
commit 50485f6c0f96ded573d6fc0105aaef91305f19a5
Author: Keith Marshall <kei...@us...>
Date: Sun Sep 20 11:39:06 2015 +0100
Upgrade binutils package to version 2.25.1 (correction)
diff --git a/ChangeLog b/ChangeLog
index e6a64ad..5107869 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2015-09-20 Keith Marshall <kei...@us...>
+
+ Upgrade binutils package to version 2.25.1 (correction)
+
+ * mingw32/mingw32-binutils.xml (binutils) <bin>: Correct archive
+ compression type; was recorded as .lzma; should be .xz
+ * common/issue.log mingw32/issue.log: Update accordingly.
+
2015-09-19 Keith Marshall <kei...@us...>
Upgrade binutils package to version 2.25.1
diff --git a/common/issue.log b/common/issue.log
index ea9bcdb..67b01ec 100644
--- a/common/issue.log
+++ b/common/issue.log
@@ -23,6 +23,6 @@
# MinGW Project, accept liability for any damages, however caused,
# arising from the use of this software.
#
- 75fc52dde8d408d798c0be51070d5d02f4c63085 2015091900 package-list.xml
+ 75fc52dde8d408d798c0be51070d5d02f4c63085 2015092000 package-list.xml
#
# $RCSfile$: end of file
diff --git a/mingw32/issue.log b/mingw32/issue.log
index e5aab12..0fe9479 100644
--- a/mingw32/issue.log
+++ b/mingw32/issue.log
@@ -28,7 +28,7 @@
e2f730e78dc27254776b672fc007a4bef3dd0f56 2010090601 mingw32-autotools.xml
31874b31b811211470b739b8af7fc6b9a97331e6 2013072200 mingw32-base.xml
221dd61fa0e2d7745ba41d05d18a3114e946c513 2012073100 mingw32-basic-bsdtar.xml
- 3c593d6cf896fa5c27c57c216ad03132699f42e7 2015091900 mingw32-binutils.xml
+ 770165afae7b51cfa83d34d0115d7dd563b4557f 2015092000 mingw32-binutils.xml
b4c60a4702749a0369b5059e7c1f50ce567e2c95 2012073100 mingw32-bzip2.xml
c2fa4fe580615c774f72216fb06e35a909a08ba6 2012040200 mingw32-cygutils.xml
edf7a0775bc30b6d17d4fbe7f0d5438aea2768ba 2015070300 mingw32-dos2unix.xml
@@ -50,7 +50,7 @@
cd33ad74b608bce33ea297801253e6efbafce27c 2012073100 mingw32-mingw-utils.xml
8d3a7125499a85916b53efb4c897ac907e2490ab 2015082000 mingw32-mpc.xml
8a11de23e7a89fd11436bdf162ef90712f30101b 2013102300 mingw32-mpfr.xml
- 1413ad59660ad963082e7de10c31bbb725116aee 2015091900 mingw32-package-list.xml
+ 1413ad59660ad963082e7de10c31bbb725116aee 2015092000 mingw32-package-list.xml
1f15439ee5f66ec22321c7aa853559b6f8f7172f 2015090800 mingw32-pexports.xml
cdb2a4dbedfc9f2cdfc92340f6f9b12da061c0d9 2012073100 mingw32-popt.xml
0a5d210a13d073104fb74b4f9c081674c9745cd1 2013090900 mingw32-pthreads-w32.xml
diff --git a/mingw32/mingw32-binutils.xml b/mingw32/mingw32-binutils.xml
index f0955cf..e7db59e 100644
--- a/mingw32/mingw32-binutils.xml
+++ b/mingw32/mingw32-binutils.xml
@@ -23,8 +23,8 @@
<licence tarname="binutils-%-mingw32-lic.tar.%" />
<component class="bin">
- <release tarname="binutils-2.25.1-1-mingw32-bin.tar.lzma" />
<requires eq="mingw32-libintl-*-mingw32-*-dll-8.tar" />
+ <release tarname="binutils-2.25.1-1-mingw32-bin.tar.xz" />
<release tarname="binutils-2.24-1-mingw32-bin.tar.xz" />
<release tarname="binutils-2.23.2-1-mingw32-bin.tar.lzma" >
<requires eq="binutils-%-mingw32-dev.tar.lzma" />
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 8 ++++++++
common/issue.log | 2 +-
mingw32/issue.log | 4 ++--
mingw32/mingw32-binutils.xml | 2 +-
4 files changed, 12 insertions(+), 4 deletions(-)
hooks/post-receive
--
Repository: mingw-dist
|
|
From: Keith M. <no...@so...> - 2015-09-19 13:51:31
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Repository: mingw-dist".
The branch, master has been updated
via 2387f0d238678919f806f2ace95179605fbf7550 (commit)
from 93102f753b71769537f1befef9a787e460f1ff02 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://sf.net/p/mingw/mingw-dist/ci/2387f0d238678919f806f2ace95179605fbf7550/
commit 2387f0d238678919f806f2ace95179605fbf7550
Author: Keith Marshall <kei...@us...>
Date: Sat Sep 19 14:50:25 2015 +0100
Upgrade binutils package to version 2.25.1
diff --git a/ChangeLog b/ChangeLog
index 73b0781..e6a64ad 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2015-09-19 Keith Marshall <kei...@us...>
+
+ Upgrade binutils package to version 2.25.1
+
+ * mingw32/mingw32-binutils.xml: Add new release specifications.
+ (binutils) <doc>: Component package marked obsolete; NOT upgraded.
+ * common/issue.log mingw32/issue.log: Update accordingly.
+
2015-09-08 Keith Marshall <kei...@us...>
Upgrade pexports package to version 0.47
diff --git a/common/issue.log b/common/issue.log
index 4ea78df..ea9bcdb 100644
--- a/common/issue.log
+++ b/common/issue.log
@@ -23,6 +23,6 @@
# MinGW Project, accept liability for any damages, however caused,
# arising from the use of this software.
#
- 75fc52dde8d408d798c0be51070d5d02f4c63085 2015090800 package-list.xml
+ 75fc52dde8d408d798c0be51070d5d02f4c63085 2015091900 package-list.xml
#
# $RCSfile$: end of file
diff --git a/mingw32/issue.log b/mingw32/issue.log
index 15e6d6b..e5aab12 100644
--- a/mingw32/issue.log
+++ b/mingw32/issue.log
@@ -28,7 +28,7 @@
e2f730e78dc27254776b672fc007a4bef3dd0f56 2010090601 mingw32-autotools.xml
31874b31b811211470b739b8af7fc6b9a97331e6 2013072200 mingw32-base.xml
221dd61fa0e2d7745ba41d05d18a3114e946c513 2012073100 mingw32-basic-bsdtar.xml
- ec23cc610568f0bee49576b3d4bfae99c6fc383d 2014061400 mingw32-binutils.xml
+ 3c593d6cf896fa5c27c57c216ad03132699f42e7 2015091900 mingw32-binutils.xml
b4c60a4702749a0369b5059e7c1f50ce567e2c95 2012073100 mingw32-bzip2.xml
c2fa4fe580615c774f72216fb06e35a909a08ba6 2012040200 mingw32-cygutils.xml
edf7a0775bc30b6d17d4fbe7f0d5438aea2768ba 2015070300 mingw32-dos2unix.xml
@@ -50,7 +50,7 @@
cd33ad74b608bce33ea297801253e6efbafce27c 2012073100 mingw32-mingw-utils.xml
8d3a7125499a85916b53efb4c897ac907e2490ab 2015082000 mingw32-mpc.xml
8a11de23e7a89fd11436bdf162ef90712f30101b 2013102300 mingw32-mpfr.xml
- 1413ad59660ad963082e7de10c31bbb725116aee 2015090800 mingw32-package-list.xml
+ 1413ad59660ad963082e7de10c31bbb725116aee 2015091900 mingw32-package-list.xml
1f15439ee5f66ec22321c7aa853559b6f8f7172f 2015090800 mingw32-pexports.xml
cdb2a4dbedfc9f2cdfc92340f6f9b12da061c0d9 2012073100 mingw32-popt.xml
0a5d210a13d073104fb74b4f9c081674c9745cd1 2013090900 mingw32-pthreads-w32.xml
diff --git a/mingw32/mingw32-binutils.xml b/mingw32/mingw32-binutils.xml
index 905a6fa..f0955cf 100644
--- a/mingw32/mingw32-binutils.xml
+++ b/mingw32/mingw32-binutils.xml
@@ -23,31 +23,21 @@
<licence tarname="binutils-%-mingw32-lic.tar.%" />
<component class="bin">
- <release tarname="binutils-2.24-1-mingw32-bin.tar.xz" >
- <requires eq="mingw32-libintl-*-mingw32-*-dll-8.tar" />
- </release>
+ <release tarname="binutils-2.25.1-1-mingw32-bin.tar.lzma" />
+ <requires eq="mingw32-libintl-*-mingw32-*-dll-8.tar" />
+ <release tarname="binutils-2.24-1-mingw32-bin.tar.xz" />
<release tarname="binutils-2.23.2-1-mingw32-bin.tar.lzma" >
<requires eq="binutils-%-mingw32-dev.tar.lzma" />
<requires eq="mingw32-libz-*-dll-1.tar" />
<requires eq="mingw32-libgcc-*-dll-1.tar" />
</release>
- <release tarname="binutils-2.23.1-1-mingw32-bin.tar.lzma" >
- <requires eq="mingw32-libintl-*-mingw32-*-dll-8.tar" />
- </release>
- <release tarname="binutils-2.22-1-mingw32-bin.tar.lzma" >
- <requires eq="mingw32-libintl-*-mingw32-*-dll-8.tar" />
- </release>
- <release tarname="binutils-2.21.53-1-mingw32-bin.tar.lzma" >
- <requires eq="mingw32-libintl-*-mingw32-*-dll-8.tar" />
- </release>
- <release tarname="binutils-2.21.1-2-mingw32-bin.tar.lzma" >
- <requires eq="mingw32-libintl-*-mingw32-*-dll-8.tar" />
- </release>
- <release tarname="binutils-2.21.1-1-mingw32-bin.tar.lzma" />
- <release tarname="binutils-2.21-3-mingw32-bin.tar.lzma" >
- <requires eq="mingw32-libintl-*-mingw32-*-dll-8.tar" />
- </release>
+ <release tarname="binutils-2.23.1-1-mingw32-bin.tar.lzma" />
+ <release tarname="binutils-2.22-1-mingw32-bin.tar.lzma" />
+ <release tarname="binutils-2.21.53-1-mingw32-bin.tar.lzma" />
+ <release tarname="binutils-2.21-3-mingw32-bin.tar.lzma" />
<release tarname="binutils-2.21-2-mingw32-bin.tar.lzma" />
+ <release tarname="binutils-2.21.1-2-mingw32-bin.tar.lzma" />
+ <release tarname="binutils-2.21.1-1-mingw32-bin.tar.lzma" />
<release tarname="binutils-2.20.51-1-mingw32-bin.tar.lzma" />
<release tarname="binutils-2.20.1-2-mingw32-bin.tar.gz" />
<release tarname="binutils-2.20-1-mingw32-bin.tar.gz" />
@@ -55,15 +45,17 @@
</component>
<component class="dev">
+ <release tarname="binutils-2.25.1-1-mingw32-dev.tar.xz" />
<release tarname="binutils-2.24-1-mingw32-dev.tar.xz" />
<release tarname="binutils-2.23.2-1-mingw32-dev.tar.lzma" />
</component>
<component class="doc">
<description lang="en">
- <paragraph>As of release 2.24-1, this "doc" subpackage has been
- superseded by the "info" and "man" subpackages; this subpackage
- now delivers no content, and may be safely removed.
+ <paragraph>As of release 2.24-1, this "doc" component package has
+ been superseded by the "info" and "man" component packages; this
+ component package now delivers no content, will not be updated
+ for subsequent releases, and may be safely removed.
</paragraph>
</description>
<release tarname="binutils-2.24-1-mingw32-doc.tar.xz">
@@ -82,16 +74,19 @@
</component>
<component class="info">
+ <release tarname="binutils-2.25.1-1-mingw32-info.tar.xz" />
<release tarname="binutils-2.24-1-mingw32-info.tar.xz" />
<release tarname="binutils-2.23.2-1-mingw32-info.tar.lzma" />
</component>
<component class="man">
+ <release tarname="binutils-2.25.1-1-mingw32-man.tar.xz" />
<release tarname="binutils-2.24-1-mingw32-man.tar.xz" />
<release tarname="binutils-2.23.2-1-mingw32-man.tar.lzma" />
</component>
<component class="lang">
+ <release tarname="binutils-2.25.1-1-mingw32-lang.tar.xz" />
<release tarname="binutils-2.24-1-mingw32-lang.tar.xz" />
<release tarname="binutils-2.23.2-1-mingw32-lang.tar.lzma" />
<release tarname="binutils-2.23.1-1-mingw32-lang.tar.lzma" />
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 8 ++++++++
common/issue.log | 2 +-
mingw32/issue.log | 4 ++--
mingw32/mingw32-binutils.xml | 39 +++++++++++++++++----------------------
4 files changed, 28 insertions(+), 25 deletions(-)
hooks/post-receive
--
Repository: mingw-dist
|
|
From: Keith M. <no...@so...> - 2015-09-14 17:20:51
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Repository: mingw-org-wsl".
The branch, legacy has been updated
via 93fc8c251370d5207558c59efbff49dcb21265fb (commit)
from 28083507cec882bed0b08f5e5df530c4f3b6142b (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://sf.net/p/mingw/mingw-org-wsl/ci/93fc8c251370d5207558c59efbff49dcb21265fb/
commit 93fc8c251370d5207558c59efbff49dcb21265fb
Author: Keith Marshall <kei...@us...>
Date: Mon Sep 14 16:38:35 2015 +0100
Make strings.h mostly POSIX.1-2008 compliant.
diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog
index 5737cab..e7f5b63 100644
--- a/mingwrt/ChangeLog
+++ b/mingwrt/ChangeLog
@@ -1,3 +1,38 @@
+2015-09-14 Keith Marshall <kei...@us...>
+
+ Make strings.h mostly POSIX.1-2008 compliant.
+
+ * include/strings.h: Rewritten. Do not include...
+ (string.h): ...this; mandated by POSIX.1, it now defines...
+ (strcasecmp, strncasecmp): ...these POSIX.1 functions, complete with
+ prototypes, possible in-line implementations, and JMPSTUB references
+ to corresponding external implementations, which will now become
+ automatically created within libmingwex.a
+
+ * include/parts/strings.h: New file; it declares prototypes for...
+ (_stricmp, _strnicmp): ...these MSVC functions; nominally declared in
+ string.h, but we also require them in strings.h
+
+ * include/parts/wchar.h: New file; it declares prototypes for all wide
+ character functions which MSVC specifies in both wchar.h and string.h
+
+ * include/string.h: Miscellaneous layout adjustments.
+ (strcasecmp, strncasecmp): Delete; they belong in strings.h
+ (_stricmp, _strnicmp): Factor out; include them from parts/strings.h
+ [!_WSTRING_DEFINED]: Factor out all associated function prototypes;
+ include them from parts/wchar.h instead.
+
+ * include/wchar.h [!_WSTRING_DEFINED]: Delete all associated function
+ prototypes; include them from parts/wchar.h instead, so making this
+ guard macro redundant; delete it.
+
+ * Makefile.in (strcasecmp.$OBJEXT, strncasecmp.$OBJEXT)
+ (wcscmpi.$OBJEXT): Implementations are now automatically generated
+ from header file, for inclusion in libmingwex.a; remove free-standing
+ implementations from the entire family of liboldname libraries, and...
+ * strcasecmp.c strncasecmp.c wcscmpi.c: ...delete corresponding source
+ files; they are no longer required.
+
2015-07-16 Keith Marshall <kei...@us...>
Incorporate build system updates from w32api package.
diff --git a/mingwrt/Makefile.in b/mingwrt/Makefile.in
index 28d46a4..0f7c3b0 100644
--- a/mingwrt/Makefile.in
+++ b/mingwrt/Makefile.in
@@ -351,7 +351,7 @@ $(foreach name,coldname $(all_moldname),lib$(name).a): lib%.a: %.def
# Microsoft DLLs, but which nevertheless are easily emulated.
#
$(foreach name,coldname $(all_moldname),lib$(name).a): $(addsuffix .$(OBJEXT), \
- isascii iscsym iscsymf strcasecmp strncasecmp toascii wcscmpi)
+ isascii iscsym iscsymf toascii)
coldname.def: %.def: ${mingwrt_srcdir}/moldname.def.in
$(CC) -C -E -P -D__FILENAME__=$@ -D__CRTDLL__ -xc-header $< > $@
diff --git a/mingwrt/include/parts/strings.h b/mingwrt/include/parts/strings.h
new file mode 100644
index 0000000..99d6471
--- /dev/null
+++ b/mingwrt/include/parts/strings.h
@@ -0,0 +1,58 @@
+/*
+ * parts/strings.h
+ *
+ * Internal header file, declaring function prototypes which we require
+ * to be declared in our POSIX.1 conforming <strings.h> header, but for
+ * which MSVC expects to find declarations in <string.h>.
+ *
+ * $Id$
+ *
+ * Written by Keith Marshall <kei...@us...>
+ * Copyright (C) 2015, MinGW.org Project.
+ *
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice, this permission notice, and the following
+ * disclaimer shall be included in all copies or substantial portions of
+ * the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OF OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ */
+#if _FAKE_STRINGS_H_SOURCED
+/*
+ * Since we expect this part-header to be sourced exclusively by other
+ * system headers, (nominally <strings.h>), we don't apply any conventional
+ * multiple inclusion guard; rather, we rely on the guard within <strings.h>
+ * itself, but allow other headers to fake it for one-shot inclusion...
+ */
+# undef _FAKE_STRINGS_H_SOURCED
+
+#elif ! defined _STRINGS_H
+/*
+ * ...otherwise, we fail if the <strings.h> guard is not in place.
+ */
+# error "Never include <parts/strings.h> directly; use <strings.h> instead"
+#endif
+
+/* These are the MSVCRT.DLL equivalents for POSIX.1's strcasecmp() and
+ * strncasecmp() functions, for which we provide in-line implementations
+ * in <strings.h> respectively; MSVC expects to find these prototypes in
+ * <string.h>, but we also need them in <strings.h>.
+ */
+_CRTIMP int __cdecl __MINGW_NOTHROW _stricmp( const char *, const char * );
+_CRTIMP int __cdecl __MINGW_NOTHROW _strnicmp( const char *, const char *, size_t );
+
+/* $RCSfile$: end of file */
diff --git a/mingwrt/include/parts/wchar.h b/mingwrt/include/parts/wchar.h
new file mode 100644
index 0000000..7b8e88d
--- /dev/null
+++ b/mingwrt/include/parts/wchar.h
@@ -0,0 +1,137 @@
+/*
+ * parts/wchar.h
+ *
+ * Internal header file, declaring types and structures which nominally
+ * originate from <wchar.h>, but which POSIX, or MSVC, require to be made
+ * visible on inclusion of certain other headers, without inclusion of
+ * <wchar.h> itself.
+ *
+ * $Id$
+ *
+ * Written by Keith Marshall <kei...@us...>
+ * Copyright (C) 2015, MinGW.org Project.
+ *
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice, this permission notice, and the following
+ * disclaimer shall be included in all copies or substantial portions of
+ * the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OF OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ */
+#if _FAKE_WCHAR_H_SOURCED
+/*
+ * Since we expect this part-header to be sourced exclusively by other
+ * system headers, (nominally <wchar.h>), we don't apply any conventional
+ * multiple inclusion guard; rather, we rely on the guard within <wchar.h>
+ * itself, but allow other headers to fake it for one-shot inclusion...
+ */
+# undef _FAKE_WCHAR_H_SOURCED
+
+#elif ! defined _WCHAR_H
+/*
+ * ...otherwise, we fail if the <wchar.h> guard is not in place.
+ */
+# error "Never include <parts/wchar.h> directly; use <wchar.h> instead"
+#endif
+
+#if defined _WCHAR_H || defined __need_wstring_function_prototypes
+/*
+ * Wide character versions of the ISO-C standard string functions.
+ */
+_CRTIMP wchar_t * __cdecl __MINGW_NOTHROW wcscat (wchar_t *, const wchar_t *);
+_CRTIMP wchar_t * __cdecl __MINGW_NOTHROW wcschr (const wchar_t *, wchar_t);
+_CRTIMP int __cdecl __MINGW_NOTHROW wcscmp (const wchar_t *, const wchar_t *);
+_CRTIMP int __cdecl __MINGW_NOTHROW wcscoll (const wchar_t *, const wchar_t *);
+_CRTIMP wchar_t * __cdecl __MINGW_NOTHROW wcscpy (wchar_t *, const wchar_t *);
+_CRTIMP size_t __cdecl __MINGW_NOTHROW wcscspn (const wchar_t *, const wchar_t *);
+_CRTIMP size_t __cdecl __MINGW_NOTHROW wcslen (const wchar_t *);
+_CRTIMP wchar_t * __cdecl __MINGW_NOTHROW wcsncat (wchar_t *, const wchar_t *, size_t);
+_CRTIMP int __cdecl __MINGW_NOTHROW wcsncmp (const wchar_t *, const wchar_t *, size_t);
+_CRTIMP wchar_t * __cdecl __MINGW_NOTHROW wcsncpy (wchar_t *, const wchar_t *, size_t);
+_CRTIMP wchar_t * __cdecl __MINGW_NOTHROW wcspbrk (const wchar_t *, const wchar_t *);
+_CRTIMP wchar_t * __cdecl __MINGW_NOTHROW wcsrchr (const wchar_t *, wchar_t);
+_CRTIMP size_t __cdecl __MINGW_NOTHROW wcsspn (const wchar_t *, const wchar_t *);
+_CRTIMP wchar_t * __cdecl __MINGW_NOTHROW wcsstr (const wchar_t *, const wchar_t *);
+_CRTIMP wchar_t * __cdecl __MINGW_NOTHROW wcstok (wchar_t *, const wchar_t *);
+_CRTIMP size_t __cdecl __MINGW_NOTHROW wcsxfrm (wchar_t *, const wchar_t *, size_t);
+
+#ifndef __STRICT_ANSI__
+/* UTF-16LE versions of non-ANSI string functions provided by CRTDLL.
+ */
+_CRTIMP wchar_t * __cdecl __MINGW_NOTHROW _wcsdup (const wchar_t *);
+_CRTIMP int __cdecl __MINGW_NOTHROW _wcsicmp (const wchar_t *, const wchar_t *);
+_CRTIMP int __cdecl __MINGW_NOTHROW _wcsicoll (const wchar_t *, const wchar_t *);
+_CRTIMP wchar_t * __cdecl __MINGW_NOTHROW _wcslwr (wchar_t*);
+_CRTIMP int __cdecl __MINGW_NOTHROW _wcsnicmp (const wchar_t *, const wchar_t *, size_t);
+_CRTIMP wchar_t * __cdecl __MINGW_NOTHROW _wcsnset (wchar_t *, wchar_t, size_t);
+_CRTIMP wchar_t * __cdecl __MINGW_NOTHROW _wcsrev (wchar_t *);
+_CRTIMP wchar_t * __cdecl __MINGW_NOTHROW _wcsset (wchar_t *, wchar_t);
+_CRTIMP wchar_t * __cdecl __MINGW_NOTHROW _wcsupr (wchar_t *);
+
+#ifdef __MSVCRT__
+_CRTIMP int __cdecl __MINGW_NOTHROW _wcsncoll (const wchar_t *, const wchar_t *, size_t);
+_CRTIMP int __cdecl __MINGW_NOTHROW _wcsnicoll (const wchar_t *, const wchar_t *, size_t);
+
+/* A wide character counterpart to the strerror() API was introduced in
+ * MSVCR70.DLL, and subsequently back-ported to MSVCRT.DLL in WinXP.
+ */
+#if __MSVCRT_VERSION__ >= __MSVCR70_DLL || NTDDI_VERSION >= NTDDI_WINXP
+ /*
+ * These are are the wide character counterparts to the strerror()
+ * function itself, and the _strerror() function, respectively.
+ */
+_CRTIMP wchar_t * __cdecl __MINGW_NOTHROW _wcserror (int);
+_CRTIMP wchar_t * __cdecl __MINGW_NOTHROW __wcserror (const wchar_t *);
+
+#endif /* MSVCR70.DLL / WinXP */
+#endif /* __MSVCRT__ */
+
+/* MSVCRT.DLL provides neither _wcscmpi() nor wcscmpi(); the heritage
+ * is uncertain, but for the convenience, (and portability), of legacy
+ * applications which assume wcscmpi() should be available:
+ */
+#define _wcscmpi _wcsicmp
+int __cdecl __MINGW_NOTHROW wcscmpi (const wchar_t *, const wchar_t *);
+
+#if ! defined __NO_INLINE__ && ! defined __have_wcscmpi
+__CRT_ALIAS __JMPSTUB__(( FUNCTION = wcscmpi, REMAPPED = _wcsicmp ))
+ int wcscmpi (const wchar_t * __ws1, const wchar_t * __ws2)
+ { return _wcsicmp (__ws1, __ws2); }
+
+# define __have_wcscmpi
+#endif
+
+#ifndef _NO_OLDNAMES
+ /* Older CRTDLL versions may have provided these alternatively named
+ * functions; we continue to support them, via the OLDNAME libraries:
+ */
+_CRTIMP wchar_t * __cdecl __MINGW_NOTHROW wcsdup (const wchar_t*);
+_CRTIMP int __cdecl __MINGW_NOTHROW wcsicmp (const wchar_t*, const wchar_t*);
+_CRTIMP int __cdecl __MINGW_NOTHROW wcsicoll (const wchar_t*, const wchar_t*);
+_CRTIMP wchar_t * __cdecl __MINGW_NOTHROW wcslwr (wchar_t*);
+_CRTIMP int __cdecl __MINGW_NOTHROW wcsnicmp (const wchar_t*, const wchar_t*, size_t);
+_CRTIMP wchar_t * __cdecl __MINGW_NOTHROW wcsnset (wchar_t*, wchar_t, size_t);
+_CRTIMP wchar_t * __cdecl __MINGW_NOTHROW wcsrev (wchar_t*);
+_CRTIMP wchar_t * __cdecl __MINGW_NOTHROW wcsset (wchar_t*, wchar_t);
+_CRTIMP wchar_t * __cdecl __MINGW_NOTHROW wcsupr (wchar_t*);
+
+#endif /* ! _NO_OLDNAMES */
+
+#endif /* ! __STRICT_ANSI__ */
+#endif /* __need_wstring_function_prototypes */
+
+/* $RCSfile$: end of file */
diff --git a/mingwrt/include/string.h b/mingwrt/include/string.h
index 2680d0a..9b68f08 100644
--- a/mingwrt/include/string.h
+++ b/mingwrt/include/string.h
@@ -1,201 +1,152 @@
/*
* string.h
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is a part of the mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within the package.
*
- * Definitions for memory and string functions.
+ * ISO-C standard header, with MSVC compatible extensions.
+ *
+ * $Id$
+ *
+ * Written by Rob Savoye <ro...@cy...>
+ * Copyright (C) 1997-2000, 2002-2004, 2007, 2009, 2015, MinGW.org Project.
+ *
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice, this permission notice, and the following
+ * disclaimer shall be included in all copies or substantial portions of
+ * the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OF OR OTHER
+ * DEALINGS IN THE SOFTWARE.
*
*/
+#ifndef _STRING_H
+#define _STRING_H
-#ifndef _STRING_H_
-#define _STRING_H_
-
-/* All the headers include this file. */
+/* All MinGW system headers must include this...
+ */
#include <_mingw.h>
-/*
- * Define size_t, wchar_t and NULL
+#ifndef RC_INVOKED
+/* ISO-C requires this header to expose definitions for NULL and size_t,
+ * retaining compatiblity with their fundamental <stddef.h> definitions.
*/
+#define __need_NULL
#define __need_size_t
-#define __need_wchar_t
-#define __need_NULL
-#ifndef RC_INVOKED
+#ifndef __STRICT_ANSI__
+ /* MSVC extends this requirement to include a definition of wchar_t,
+ * (which contravenes strict ISO-C standards conformity).
+ */
+# define __need_wchar_t
+#endif
#include <stddef.h>
-#endif /* Not RC_INVOKED */
-
-#ifndef RC_INVOKED
-#ifdef __cplusplus
-extern "C" {
-#endif
+_BEGIN_C_DECLS
-/*
- * Prototypes of the ANSI Standard C library string functions.
+/* Prototypes for the ISO-C Standard library string functions.
*/
-_CRTIMP void* __cdecl __MINGW_NOTHROW memchr (const void*, int, size_t) __MINGW_ATTRIB_PURE;
-_CRTIMP int __cdecl __MINGW_NOTHROW memcmp (const void*, const void*, size_t) __MINGW_ATTRIB_PURE;
-_CRTIMP void* __cdecl __MINGW_NOTHROW memcpy (void*, const void*, size_t);
-_CRTIMP void* __cdecl __MINGW_NOTHROW memmove (void*, const void*, size_t);
-_CRTIMP void* __cdecl __MINGW_NOTHROW memset (void*, int, size_t);
-_CRTIMP char* __cdecl __MINGW_NOTHROW strcat (char*, const char*);
-_CRTIMP char* __cdecl __MINGW_NOTHROW strchr (const char*, int) __MINGW_ATTRIB_PURE;
-_CRTIMP int __cdecl __MINGW_NOTHROW strcmp (const char*, const char*) __MINGW_ATTRIB_PURE;
-_CRTIMP int __cdecl __MINGW_NOTHROW strcoll (const char*, const char*); /* Compare using locale */
-_CRTIMP char* __cdecl __MINGW_NOTHROW strcpy (char*, const char*);
+_CRTIMP void * __cdecl __MINGW_NOTHROW memchr (const void*, int, size_t) __MINGW_ATTRIB_PURE;
+_CRTIMP int __cdecl __MINGW_NOTHROW memcmp (const void*, const void*, size_t) __MINGW_ATTRIB_PURE;
+_CRTIMP void * __cdecl __MINGW_NOTHROW memcpy (void*, const void*, size_t);
+_CRTIMP void * __cdecl __MINGW_NOTHROW memmove (void*, const void*, size_t);
+_CRTIMP void * __cdecl __MINGW_NOTHROW memset (void*, int, size_t);
+_CRTIMP char * __cdecl __MINGW_NOTHROW strcat (char*, const char*);
+_CRTIMP char * __cdecl __MINGW_NOTHROW strchr (const char*, int) __MINGW_ATTRIB_PURE;
+_CRTIMP int __cdecl __MINGW_NOTHROW strcmp (const char*, const char*) __MINGW_ATTRIB_PURE;
+_CRTIMP int __cdecl __MINGW_NOTHROW strcoll (const char*, const char*); /* Compare using locale */
+_CRTIMP char * __cdecl __MINGW_NOTHROW strcpy (char*, const char*);
_CRTIMP size_t __cdecl __MINGW_NOTHROW strcspn (const char*, const char*) __MINGW_ATTRIB_PURE;
-_CRTIMP char* __cdecl __MINGW_NOTHROW strerror (int); /* NOTE: NOT an old name wrapper. */
+_CRTIMP char * __cdecl __MINGW_NOTHROW strerror (int); /* NOTE: NOT an old name wrapper. */
_CRTIMP size_t __cdecl __MINGW_NOTHROW strlen (const char*) __MINGW_ATTRIB_PURE;
-_CRTIMP char* __cdecl __MINGW_NOTHROW strncat (char*, const char*, size_t);
-_CRTIMP int __cdecl __MINGW_NOTHROW strncmp (const char*, const char*, size_t) __MINGW_ATTRIB_PURE;
-_CRTIMP char* __cdecl __MINGW_NOTHROW strncpy (char*, const char*, size_t);
-_CRTIMP char* __cdecl __MINGW_NOTHROW strpbrk (const char*, const char*) __MINGW_ATTRIB_PURE;
-_CRTIMP char* __cdecl __MINGW_NOTHROW strrchr (const char*, int) __MINGW_ATTRIB_PURE;
+_CRTIMP char * __cdecl __MINGW_NOTHROW strncat (char*, const char*, size_t);
+_CRTIMP int __cdecl __MINGW_NOTHROW strncmp (const char*, const char*, size_t) __MINGW_ATTRIB_PURE;
+_CRTIMP char * __cdecl __MINGW_NOTHROW strncpy (char*, const char*, size_t);
+_CRTIMP char * __cdecl __MINGW_NOTHROW strpbrk (const char*, const char*) __MINGW_ATTRIB_PURE;
+_CRTIMP char * __cdecl __MINGW_NOTHROW strrchr (const char*, int) __MINGW_ATTRIB_PURE;
_CRTIMP size_t __cdecl __MINGW_NOTHROW strspn (const char*, const char*) __MINGW_ATTRIB_PURE;
-_CRTIMP char* __cdecl __MINGW_NOTHROW strstr (const char*, const char*) __MINGW_ATTRIB_PURE;
-_CRTIMP char* __cdecl __MINGW_NOTHROW strtok (char*, const char*);
+_CRTIMP char * __cdecl __MINGW_NOTHROW strstr (const char*, const char*) __MINGW_ATTRIB_PURE;
+_CRTIMP char * __cdecl __MINGW_NOTHROW strtok (char*, const char*);
_CRTIMP size_t __cdecl __MINGW_NOTHROW strxfrm (char*, const char*, size_t);
#ifndef __STRICT_ANSI__
/*
* Extra non-ANSI functions provided by the CRTDLL library
*/
-_CRTIMP char* __cdecl __MINGW_NOTHROW _strerror (const char *);
-_CRTIMP void* __cdecl __MINGW_NOTHROW _memccpy (void*, const void*, int, size_t);
-_CRTIMP int __cdecl __MINGW_NOTHROW _memicmp (const void*, const void*, size_t);
-_CRTIMP char* __cdecl __MINGW_NOTHROW _strdup (const char*) __MINGW_ATTRIB_MALLOC;
-_CRTIMP int __cdecl __MINGW_NOTHROW _strcmpi (const char*, const char*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _stricmp (const char*, const char*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _stricoll (const char*, const char*);
-_CRTIMP char* __cdecl __MINGW_NOTHROW _strlwr (char*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _strnicmp (const char*, const char*, size_t);
-_CRTIMP char* __cdecl __MINGW_NOTHROW _strnset (char*, int, size_t);
-_CRTIMP char* __cdecl __MINGW_NOTHROW _strrev (char*);
-_CRTIMP char* __cdecl __MINGW_NOTHROW _strset (char*, int);
-_CRTIMP char* __cdecl __MINGW_NOTHROW _strupr (char*);
-_CRTIMP void __cdecl __MINGW_NOTHROW _swab (const char*, char*, size_t);
-
-#ifdef __MSVCRT__
-_CRTIMP int __cdecl __MINGW_NOTHROW _strncoll(const char*, const char*, size_t);
-_CRTIMP int __cdecl __MINGW_NOTHROW _strnicoll(const char*, const char*, size_t);
-#endif
-
-#ifndef _NO_OLDNAMES
-/*
- * Non-underscored versions of non-ANSI functions. They live in liboldnames.a
- * and provide a little extra portability. Also a few extra UNIX-isms like
- * strcasecmp.
+_CRTIMP char * __cdecl __MINGW_NOTHROW _strerror (const char *);
+_CRTIMP void * __cdecl __MINGW_NOTHROW _memccpy (void*, const void*, int, size_t);
+_CRTIMP int __cdecl __MINGW_NOTHROW _memicmp (const void*, const void*, size_t);
+_CRTIMP char * __cdecl __MINGW_NOTHROW _strdup (const char*) __MINGW_ATTRIB_MALLOC;
+_CRTIMP int __cdecl __MINGW_NOTHROW _strcmpi (const char*, const char*);
+_CRTIMP int __cdecl __MINGW_NOTHROW _stricoll (const char*, const char*);
+_CRTIMP char * __cdecl __MINGW_NOTHROW _strlwr (char*);
+_CRTIMP char * __cdecl __MINGW_NOTHROW _strnset (char*, int, size_t);
+_CRTIMP char * __cdecl __MINGW_NOTHROW _strrev (char*);
+_CRTIMP char * __cdecl __MINGW_NOTHROW _strset (char*, int);
+_CRTIMP char * __cdecl __MINGW_NOTHROW _strupr (char*);
+_CRTIMP void __cdecl __MINGW_NOTHROW _swab (const char*, char*, size_t);
+
+/* MSVC's non-ANSI _stricmp() and _strnicmp() functions must also be
+ * prototyped here, but we need to share them with <strings.h>, where
+ * we declare their POSIX strcasecmp() and strncasecmp() equivalents.
*/
-_CRTIMP void* __cdecl __MINGW_NOTHROW memccpy (void*, const void*, int, size_t);
-_CRTIMP int __cdecl __MINGW_NOTHROW memicmp (const void*, const void*, size_t);
-_CRTIMP char* __cdecl __MINGW_NOTHROW strdup (const char*) __MINGW_ATTRIB_MALLOC;
-_CRTIMP int __cdecl __MINGW_NOTHROW strcmpi (const char*, const char*);
-_CRTIMP int __cdecl __MINGW_NOTHROW stricmp (const char*, const char*);
-int __cdecl __MINGW_NOTHROW strcasecmp (const char*, const char *);
-#ifndef __NO_INLINE__
-__CRT_INLINE int __cdecl __MINGW_NOTHROW
-strcasecmp (const char * __sz1, const char * __sz2)
- {return _stricmp (__sz1, __sz2);}
-#endif
-_CRTIMP int __cdecl __MINGW_NOTHROW stricoll (const char*, const char*);
-_CRTIMP char* __cdecl __MINGW_NOTHROW strlwr (char*);
-_CRTIMP int __cdecl __MINGW_NOTHROW strnicmp (const char*, const char*, size_t);
-int __cdecl __MINGW_NOTHROW strncasecmp (const char *, const char *, size_t);
-#ifndef __NO_INLINE__
-__CRT_INLINE int __cdecl __MINGW_NOTHROW
-strncasecmp (const char * __sz1, const char * __sz2, size_t __sizeMaxCompare)
- {return _strnicmp (__sz1, __sz2, __sizeMaxCompare);}
-#endif
-_CRTIMP char* __cdecl __MINGW_NOTHROW strnset (char*, int, size_t);
-_CRTIMP char* __cdecl __MINGW_NOTHROW strrev (char*);
-_CRTIMP char* __cdecl __MINGW_NOTHROW strset (char*, int);
-_CRTIMP char* __cdecl __MINGW_NOTHROW strupr (char*);
-#ifndef _UWIN
-_CRTIMP void __cdecl __MINGW_NOTHROW swab (const char*, char*, size_t);
-#endif /* _UWIN */
-#endif /* _NO_OLDNAMES */
-
-#endif /* Not __STRICT_ANSI__ */
-
-#ifndef _WSTRING_DEFINED
-/*
- * Unicode versions of the standard calls.
- * Also in wchar.h, where they belong according to ISO standard.
- */
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcscat (wchar_t*, const wchar_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcschr (const wchar_t*, wchar_t);
-_CRTIMP int __cdecl __MINGW_NOTHROW wcscmp (const wchar_t*, const wchar_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW wcscoll (const wchar_t*, const wchar_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcscpy (wchar_t*, const wchar_t*);
-_CRTIMP size_t __cdecl __MINGW_NOTHROW wcscspn (const wchar_t*, const wchar_t*);
-/* Note: _wcserror requires __MSVCRT_VERSION__ >= 0x0700. */
-_CRTIMP size_t __cdecl __MINGW_NOTHROW wcslen (const wchar_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsncat (wchar_t*, const wchar_t*, size_t);
-_CRTIMP int __cdecl __MINGW_NOTHROW wcsncmp(const wchar_t*, const wchar_t*, size_t);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsncpy(wchar_t*, const wchar_t*, size_t);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcspbrk(const wchar_t*, const wchar_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsrchr(const wchar_t*, wchar_t);
-_CRTIMP size_t __cdecl __MINGW_NOTHROW wcsspn(const wchar_t*, const wchar_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsstr(const wchar_t*, const wchar_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcstok(wchar_t*, const wchar_t*);
-_CRTIMP size_t __cdecl __MINGW_NOTHROW wcsxfrm(wchar_t*, const wchar_t*, size_t);
-
-#ifndef __STRICT_ANSI__
-/*
- * Unicode versions of non-ANSI string functions provided by CRTDLL.
- */
-
-/* NOTE: _wcscmpi not provided by CRTDLL, this define is for portability */
-#define _wcscmpi _wcsicmp
-
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcsdup (const wchar_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _wcsicmp (const wchar_t*, const wchar_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _wcsicoll (const wchar_t*, const wchar_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcslwr (wchar_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _wcsnicmp (const wchar_t*, const wchar_t*, size_t);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcsnset (wchar_t*, wchar_t, size_t);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcsrev (wchar_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcsset (wchar_t*, wchar_t);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcsupr (wchar_t*);
-
-#ifdef __MSVCRT__
-_CRTIMP int __cdecl __MINGW_NOTHROW _wcsncoll(const wchar_t*, const wchar_t*, size_t);
-_CRTIMP int __cdecl __MINGW_NOTHROW _wcsnicoll(const wchar_t*, const wchar_t*, size_t);
-#if __MSVCRT_VERSION__ >= 0x0700
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcserror(int);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW __wcserror(const wchar_t*);
-#endif
-#endif
-
-#ifndef _NO_OLDNAMES
-/* NOTE: There is no _wcscmpi, but this is for compatibility. */
-int __cdecl __MINGW_NOTHROW wcscmpi (const wchar_t * __ws1, const wchar_t * __ws2);
-#ifndef __NO_INLINE__
-__CRT_INLINE int __cdecl __MINGW_NOTHROW
-wcscmpi (const wchar_t * __ws1, const wchar_t * __ws2)
- {return _wcsicmp (__ws1, __ws2);}
-#endif
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsdup (const wchar_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW wcsicmp (const wchar_t*, const wchar_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW wcsicoll (const wchar_t*, const wchar_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcslwr (wchar_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW wcsnicmp (const wchar_t*, const wchar_t*, size_t);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsnset (wchar_t*, wchar_t, size_t);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsrev (wchar_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsset (wchar_t*, wchar_t);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsupr (wchar_t*);
-#endif /* Not _NO_OLDNAMES */
-
-#endif /* Not strict ANSI */
-
-#define _WSTRING_DEFINED
-#endif /* _WSTRING_DEFINED */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* Not RC_INVOKED */
-
-#endif /* Not _STRING_H_ */
+#define _FAKE_STRINGS_H_SOURCED 1
+#include <parts/strings.h>
+
+# ifdef __MSVCRT__
+ /* These were not present in the CRTDLL prior to the first release of
+ * MSVCRT.DLL, but are available in all versions of that library.
+ */
+_CRTIMP int __cdecl __MINGW_NOTHROW _strncoll(const char*, const char*, size_t);
+_CRTIMP int __cdecl __MINGW_NOTHROW _strnicoll(const char*, const char*, size_t);
+# endif
+
+# ifndef _NO_OLDNAMES
+ /* Non-underscore decorated versions of non-ANSI functions. They live in the
+ * OLDNAMES libraries, whence they provide a little extra portability.
+ */
+_CRTIMP void * __cdecl __MINGW_NOTHROW memccpy (void*, const void*, int, size_t);
+_CRTIMP int __cdecl __MINGW_NOTHROW memicmp (const void*, const void*, size_t);
+_CRTIMP char * __cdecl __MINGW_NOTHROW strdup (const char*) __MINGW_ATTRIB_MALLOC;
+_CRTIMP int __cdecl __MINGW_NOTHROW strcmpi (const char*, const char*);
+_CRTIMP int __cdecl __MINGW_NOTHROW stricmp (const char*, const char*);
+_CRTIMP int __cdecl __MINGW_NOTHROW stricoll (const char*, const char*);
+_CRTIMP char * __cdecl __MINGW_NOTHROW strlwr (char*);
+_CRTIMP int __cdecl __MINGW_NOTHROW strnicmp (const char*, const char*, size_t);
+_CRTIMP char * __cdecl __MINGW_NOTHROW strnset (char*, int, size_t);
+_CRTIMP char * __cdecl __MINGW_NOTHROW strrev (char*);
+_CRTIMP char * __cdecl __MINGW_NOTHROW strset (char*, int);
+_CRTIMP char * __cdecl __MINGW_NOTHROW strupr (char*);
+
+# ifndef _UWIN
+ /* FIXME: Do we really care that UWin doesn't support this? We are
+ * under no obligation to support UWin.
+ */
+_CRTIMP void __cdecl __MINGW_NOTHROW swab (const char*, char*, size_t);
+
+# endif /* ! _UWIN */
+# endif /* ! _NO_OLDNAMES */
+
+# define _FAKE_WCHAR_H_SOURCED 1
+# define __need_wstring_function_prototypes
+ /* This inclusion of <wchar.h> string function prototypes is required for
+ * MSVC <string.h> compatibility. Strictly conforming ISO-C applications
+ * should include <wchar.h>; they should not rely on this anomaly.
+ */
+# include <parts/wchar.h>
+
+#endif /* ! __STRICT_ANSI__ */
+
+_END_C_DECLS
+
+#endif /* ! RC_INVOKED */
+#endif /* ! _STRING_H: $RCSfile$: end of file */
diff --git a/mingwrt/include/strings.h b/mingwrt/include/strings.h
index 5342276..1a2cb52 100644
--- a/mingwrt/include/strings.h
+++ b/mingwrt/include/strings.h
@@ -1,12 +1,72 @@
/*
- File: strings.h
- Copyright: Public Domain
-
- This file is provided because non ANSI fuctions are described in string.h
- that belong in strings.h. These functions are provided for in the OLDNAME
- libraries.
-*/
-#if !defined(_STRINGS_H_)
-# define _STRINGS_H_ 1
-# include <string.h>
-#endif
+ * strings.h
+ *
+ * API declarations for POSIX.1-2008 string functions supported by MinGW.
+ *
+ * $Id$
+ *
+ * Written by Keith Marshall <kei...@us...>
+ * Copyright (C) 2015, MinGW.org Project.
+ *
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice, this permission notice, and the following
+ * disclaimer shall be included in all copies or substantial portions of
+ * the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OF OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ */
+#ifndef _STRINGS_H
+#define _STRINGS_H
+#pragma GCC system_header
+
+/* All MinGW system headers must include this...
+ */
+#include <_mingw.h>
+
+#ifndef RC_INVOKED
+/* POSIX.1-2008 requires this header to expose the typedef for size_t; to
+ * ensure consistency, we import this from GCC's own <stddef.h> header.
+ */
+#define __need_size_t
+#include <stddef.h>
+
+_BEGIN_C_DECLS
+
+int __cdecl __MINGW_NOTHROW strcasecmp( const char *, const char * );
+int __cdecl __MINGW_NOTHROW strncasecmp( const char *, const char *, size_t );
+
+#ifndef __NO_INLINE__
+/* Provide in-line implementations for each of the preceding two functions,
+ * effectively aliasing them to their MSVCRT.DLL (non-standard) equivalents,
+ * (for which we maintain prototypes in <parts/strings.h>).
+ */
+#include <parts/strings.h>
+
+__CRT_ALIAS __JMPSTUB__(( FUNCTION = strcasecmp, REMAPPED = _stricmp ))
+ int strcasecmp( const char *__s1, const char *__s2 )
+ { return _stricmp( __s1, __s2 ); }
+
+__CRT_ALIAS __JMPSTUB__(( FUNCTION = strncasecmp, REMAPPED = _strnicmp ))
+ int strncasecmp( const char *__s1, const char *__s2, size_t __n )
+ { return _strnicmp( __s1, __s2, __n ); }
+
+#endif /* ! __NO_INLINE__ */
+
+_END_C_DECLS
+
+#endif /* ! RC_INVOKED */
+#endif /* ! _STRINGS_H: $RCSfile$: end of file */
diff --git a/mingwrt/include/wchar.h b/mingwrt/include/wchar.h
index 76b9043..3ab0830 100644
--- a/mingwrt/include/wchar.h
+++ b/mingwrt/include/wchar.h
@@ -220,79 +220,13 @@ _CRTIMP size_t __cdecl __MINGW_NOTHROW wcsftime (wchar_t*, size_t, const wchar_t
#endif /* _WTIME_DEFINED */
-#ifndef _WSTRING_DEFINED
-/*
- * Unicode versions of the standard string calls.
- * Also in string.h.
- */
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcscat (wchar_t*, const wchar_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcschr (const wchar_t*, wchar_t);
-_CRTIMP int __cdecl __MINGW_NOTHROW wcscmp (const wchar_t*, const wchar_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW wcscoll (const wchar_t*, const wchar_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcscpy (wchar_t*, const wchar_t*);
-_CRTIMP size_t __cdecl __MINGW_NOTHROW wcscspn (const wchar_t*, const wchar_t*);
-/* Note: _wcserror requires __MSVCRT_VERSION__ >= 0x0700. */
-_CRTIMP size_t __cdecl __MINGW_NOTHROW wcslen (const wchar_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsncat (wchar_t*, const wchar_t*, size_t);
-_CRTIMP int __cdecl __MINGW_NOTHROW wcsncmp(const wchar_t*, const wchar_t*, size_t);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsncpy(wchar_t*, const wchar_t*, size_t);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcspbrk(const wchar_t*, const wchar_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsrchr(const wchar_t*, wchar_t);
-_CRTIMP size_t __cdecl __MINGW_NOTHROW wcsspn(const wchar_t*, const wchar_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsstr(const wchar_t*, const wchar_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcstok(wchar_t*, const wchar_t*);
-_CRTIMP size_t __cdecl __MINGW_NOTHROW wcsxfrm(wchar_t*, const wchar_t*, size_t);
-
-#ifndef __STRICT_ANSI__
-/*
- * Unicode versions of non-ANSI functions provided by CRTDLL.
+/* Wide character string functions must be specified here, as required
+ * by the ISO-C Standard; however, MSVC contravenes this standard by also
+ * requiring them to appear in <string.h>, so we specify them in a shared
+ * <parts/wchar.h> header, which we may include both here and in <string.h>
*/
+#include <parts/wchar.h>
-/* NOTE: _wcscmpi not provided by CRTDLL, this define is for portability */
-#define _wcscmpi _wcsicmp
-
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcsdup (const wchar_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _wcsicmp (const wchar_t*, const wchar_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _wcsicoll (const wchar_t*, const wchar_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcslwr (wchar_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _wcsnicmp (const wchar_t*, const wchar_t*, size_t);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcsnset (wchar_t*, wchar_t, size_t);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcsrev (wchar_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcsset (wchar_t*, wchar_t);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcsupr (wchar_t*);
-
-#ifdef __MSVCRT__
-_CRTIMP int __cdecl __MINGW_NOTHROW _wcsncoll(const wchar_t*, const wchar_t*, size_t);
-_CRTIMP int __cdecl __MINGW_NOTHROW _wcsnicoll(const wchar_t*, const wchar_t*, size_t);
-#if __MSVCRT_VERSION__ >= 0x0700
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcserror(int);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW __wcserror(const wchar_t*);
-#endif
-#endif
-
-#ifndef _NO_OLDNAMES
-/* NOTE: There is no _wcscmpi, but this is for compatibility. */
-int __cdecl __MINGW_NOTHROW wcscmpi (const wchar_t *, const wchar_t *);
-#ifndef __NO_INLINE__
-__CRT_INLINE int __cdecl __MINGW_NOTHROW
-wcscmpi (const wchar_t * __ws1, const wchar_t * __ws2)
- {return _wcsicmp (__ws1, __ws2);}
-#endif
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsdup (const wchar_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW wcsicmp (const wchar_t*, const wchar_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW wcsicoll (const wchar_t*, const wchar_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcslwr (wchar_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW wcsnicmp (const wchar_t*, const wchar_t*, size_t);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsnset (wchar_t*, wchar_t, size_t);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsrev (wchar_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsset (wchar_t*, wchar_t);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsupr (wchar_t*);
-#endif /* Not _NO_OLDNAMES */
-
-#endif /* Not strict ANSI */
-
-#define _WSTRING_DEFINED
-#endif /* _WSTRING_DEFINED */
/* These are resolved by -lmingwex. Alternatively, they can be resolved by
adding -lmsvcp60 to your command line, which will give you the VC++
diff --git a/mingwrt/strcasecmp.c b/mingwrt/strcasecmp.c
deleted file mode 100644
index a238e22..0000000
--- a/mingwrt/strcasecmp.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * strcasecmp.c
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is a part of the mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within the package.
- *
- * Oldnames from ANSI header string.h
- *
- * Some wrapper functions for those old name functions whose appropriate
- * equivalents are not simply underscore prefixed.
- *
- */
-
-#include <string.h>
-
-int
-strcasecmp (const char *sz1, const char *sz2)
-{
- return _stricmp (sz1, sz2);
-}
-
diff --git a/mingwrt/strncasecmp.c b/mingwrt/strncasecmp.c
deleted file mode 100644
index 7607ea1..0000000
--- a/mingwrt/strncasecmp.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * strncasecmp.c
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is a part of the mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within the package.
- *
- * Oldnames from ANSI header string.h
- *
- * Some wrapper functions for those old name functions whose appropriate
- * equivalents are not simply underscore prefixed.
- *
- */
-
-#include <string.h>
-
-int
-strncasecmp (const char *sz1, const char *sz2, size_t sizeMaxCompare)
-{
- return _strnicmp (sz1, sz2, sizeMaxCompare);
-}
-
diff --git a/mingwrt/wcscmpi.c b/mingwrt/wcscmpi.c
deleted file mode 100644
index 497964b..0000000
--- a/mingwrt/wcscmpi.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * wcscmpi.c
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is a part of the mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within the package.
- *
- * Oldnames from ANSI header string.h
- *
- * Some wrapper functions for those old name functions whose appropriate
- * equivalents are not simply underscore prefixed.
- *
- */
-
-#include <string.h>
-
-int
-wcscmpi (const wchar_t * ws1, const wchar_t * ws2)
-{
- return _wcsicmp (ws1, ws2);
-}
-
-----------------------------------------------------------------------
Summary of changes:
mingwrt/ChangeLog | 35 +++++
mingwrt/Makefile.in | 2 +-
mingwrt/include/parts/strings.h | 58 ++++++++
mingwrt/include/parts/wchar.h | 137 ++++++++++++++++++
mingwrt/include/string.h | 303 ++++++++++++++++-----------------------
mingwrt/include/strings.h | 82 +++++++++--
mingwrt/include/wchar.h | 76 +---------
mingwrt/strcasecmp.c | 21 ---
mingwrt/strncasecmp.c | 21 ---
mingwrt/wcscmpi.c | 21 ---
10 files changed, 434 insertions(+), 322 deletions(-)
create mode 100644 mingwrt/include/parts/strings.h
create mode 100644 mingwrt/include/parts/wchar.h
delete mode 100644 mingwrt/strcasecmp.c
delete mode 100644 mingwrt/strncasecmp.c
delete mode 100644 mingwrt/wcscmpi.c
hooks/post-receive
--
Repository: mingw-org-wsl
|
|
From: Keith M. <no...@so...> - 2015-09-08 13:58:01
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Repository: mingw-dist".
The branch, master has been updated
via 93102f753b71769537f1befef9a787e460f1ff02 (commit)
from 79d68e5cb2fd6815003fca41698513a28865bcf8 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://sf.net/p/mingw/mingw-dist/ci/93102f753b71769537f1befef9a787e460f1ff02/
commit 93102f753b71769537f1befef9a787e460f1ff02
Author: Keith Marshall <kei...@us...>
Date: Tue Sep 8 14:57:38 2015 +0100
Upgrade pexports package to version 0.47
diff --git a/ChangeLog b/ChangeLog
index dfd3439..73b0781 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2015-09-08 Keith Marshall <kei...@us...>
+
+ Upgrade pexports package to version 0.47
+
+ * mingw32/mingw32-pexports.xml: Add new release specifications.
+ * common/issue.log mingw32/issue.log: Update accordingly.
+
2015-09-06 Keith Marshall <kei...@us...>
Fix MinGW-Bug [#2216]: error in gettext-0.18.3.2 packaging.
diff --git a/common/issue.log b/common/issue.log
index e112ff0..4ea78df 100644
--- a/common/issue.log
+++ b/common/issue.log
@@ -23,6 +23,6 @@
# MinGW Project, accept liability for any damages, however caused,
# arising from the use of this software.
#
- 75fc52dde8d408d798c0be51070d5d02f4c63085 2015090600 package-list.xml
+ 75fc52dde8d408d798c0be51070d5d02f4c63085 2015090800 package-list.xml
#
# $RCSfile$: end of file
diff --git a/mingw32/issue.log b/mingw32/issue.log
index 3978fc4..15e6d6b 100644
--- a/mingw32/issue.log
+++ b/mingw32/issue.log
@@ -50,8 +50,8 @@
cd33ad74b608bce33ea297801253e6efbafce27c 2012073100 mingw32-mingw-utils.xml
8d3a7125499a85916b53efb4c897ac907e2490ab 2015082000 mingw32-mpc.xml
8a11de23e7a89fd11436bdf162ef90712f30101b 2013102300 mingw32-mpfr.xml
- 1413ad59660ad963082e7de10c31bbb725116aee 2015090600 mingw32-package-list.xml
- bad22da9b9ec9bcea1d539e29ee2976cc88d9fc2 2013053000 mingw32-pexports.xml
+ 1413ad59660ad963082e7de10c31bbb725116aee 2015090800 mingw32-package-list.xml
+ 1f15439ee5f66ec22321c7aa853559b6f8f7172f 2015090800 mingw32-pexports.xml
cdb2a4dbedfc9f2cdfc92340f6f9b12da061c0d9 2012073100 mingw32-popt.xml
0a5d210a13d073104fb74b4f9c081674c9745cd1 2013090900 mingw32-pthreads-w32.xml
68b3d00fc0dd2e7ae7ea22cbbc154a34c7618614 2014122800 mingw32-runtime.xml
diff --git a/mingw32/mingw32-pexports.xml b/mingw32/mingw32-pexports.xml
index 2a1a774..dab387b 100644
--- a/mingw32/mingw32-pexports.xml
+++ b/mingw32/mingw32-pexports.xml
@@ -32,6 +32,7 @@
<source tarname="pexports-%-mingw32-%-src.tar.%" />
<component class="bin">
+ <release tarname="pexports-0.47-mingw32-bin.tar.xz" />
<release tarname="pexports-0.46-mingw32-bin.tar.xz" />
<release tarname="pexports-0.44-1-mingw32-bin.tar.lzma" />
<requires eq="mingw32-gcc-core-*-mingw32-*-bin.tar" />
@@ -40,11 +41,13 @@
</component>
<component class="doc">
+ <release tarname="pexports-0.47-mingw32-doc.tar.xz" />
<release tarname="pexports-0.46-mingw32-doc.tar.xz" />
<release tarname="pexports-0.44-1-mingw32-doc.tar.lzma" />
</component>
<component class="lic">
+ <release tarname="pexports-0.47-mingw32-lic.tar.xz" />
<release tarname="pexports-0.46-mingw32-lic.tar.xz" />
<release tarname="pexports-0.44-1-mingw32-lic.tar.lzma" />
</component>
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 7 +++++++
common/issue.log | 2 +-
mingw32/issue.log | 4 ++--
mingw32/mingw32-pexports.xml | 3 +++
4 files changed, 13 insertions(+), 3 deletions(-)
hooks/post-receive
--
Repository: mingw-dist
|
|
From: Keith M. <no...@so...> - 2015-09-08 12:53:42
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Repository: pexports".
The branch, master has been updated
via df9914658a21f943c14cebb50e4eb2bf535c11ab (commit)
via 819d4fe3cde92d1d902e3d48771aca4dba6a0b3a (commit)
via 466c07d586e9748095549cc11274444613e285fc (commit)
via 76ec49ceffda4ba129c0616dfbdf2b28063116bf (commit)
from 47e0c86a4ac5ce100649ea75334c16a64ca82586 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://sf.net/p/mingw/pexports/ci/df9914658a21f943c14cebb50e4eb2bf535c11ab/
commit df9914658a21f943c14cebb50e4eb2bf535c11ab
Author: Keith Marshall <kei...@us...>
Date: Tue Sep 8 13:45:52 2015 +0100
Added tag v0_47 for changeset be3d231ad8ea
diff --git a/.hgtags b/.hgtags
index e1925c4..64f9860 100644
--- a/.hgtags
+++ b/.hgtags
@@ -1,2 +1,3 @@
6dd98480346eeb4f94a16696d652412374917b07 v0_45
cb0995437e4a3989b42b49409b3b743341e54f31 v0_46
+be3d231ad8eaee668fac82204b949e12b4f5bee8 v0_47
https://sf.net/p/mingw/pexports/ci/819d4fe3cde92d1d902e3d48771aca4dba6a0b3a/
commit 819d4fe3cde92d1d902e3d48771aca4dba6a0b3a
Author: Keith Marshall <kei...@us...>
Date: Tue Sep 8 13:44:40 2015 +0100
Prepare, tag, and publish 0.47 release.
diff --git a/ChangeLog b/ChangeLog
index 59ea8e5..28406be 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2015-09-08 Keith Marshall <kei...@us...>
+
+ Prepare, tag, and publish 0.47 release.
+
+ * configure.ac: Update copyright notice.
+ (AC_INIT): Increment PACKAGE_VERSION assignment to 0.47
+
+ * pexports.c: Update copyright notice.
+
+ * README: Add release notes.
+ * All files: Tagged "v0_47" for release.
+
2015-09-07 Keith Marshall <kei...@us...>
Avoid uint32_t difference overflow in 64-bit pointer adjustment.
diff --git a/README b/README
index 05f1d8f..6ba9c04 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-PEXPORTS 0.46 README
+PEXPORTS 0.47 README
============================================
Anders Norlander <ano...@he...>
@@ -9,6 +9,8 @@ URL: http://www.is.lg.ua/~paul/devel/binutils.html
Hacked by Tor Lillqvist <tm...@ik...>
+Hacked by Keith Marshall <kei...@us...>
+
============================================
PEXPORTS is a program to extract exported symbols from a PE image
@@ -41,6 +43,13 @@ C parser, there are probably many conditions when it will fail
(especially complex parameter types), although I it works fine for me.
Please do not report bugs, but feel free to send patches.
+RELEASE 0.47
+=================
+* Eliminate Microsoft style typedef obfuscation.
+* Correct a further potential segmentation fault, resulting from
+ overflow when computing 32-bit offset differences, which are then
+ applied to 64-bit pointers.
+
RELEASE 0.46
=================
* Corrects two potential segmentation fault bugs.
diff --git a/configure.ac b/configure.ac
index cf211ce..4dc8ee7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,8 +1,8 @@
# configure.ac for pexports
# Created 2013-05-29 by Keith Marshall <kei...@us...>
-# Copyright (C) 2013, MinGW.org Project.
+# Copyright (C) 2013, 2015, MinGW.org Project.
#
- AC_INIT([pexports],[0.46],[http://mingw.org/reporting_bugs])
+ AC_INIT([pexports],[0.47],[http://mingw.org/reporting_bugs])
#
# Directory organisation.
#
diff --git a/pexports.c b/pexports.c
index be80aa6..ae4c00d 100644
--- a/pexports.c
+++ b/pexports.c
@@ -141,19 +141,20 @@ main(int argc, char *argv[])
if (filename == NULL)
{
- printf("PExports %s; Originally written 1998, Anders Norlander\n"
- "Updated 1999, Paul Sokolovsky, 2008, Tor Lillqvist, 2013, Keith Marshall\n"
- "Copyright (C) 1998, 1999, 2008, 2013, MinGW.org Project\n\n"
- "This program is free software; you may redistribute it under the terms of\n"
- "the GNU General Public License. This program has absolutely no warranty.\n"
-
- "\nUsage: %s [-v] [-o] [-h header] [-p preprocessor] dll\n"
- " -h\tparse header\n"
- " -o\tprint ordinals\n"
- " -p\tset preprocessor program\n"
- " -v\tverbose mode\n"
- "\nReport bugs as directed at %s\n",
- PACKAGE_VERSION_STRING, program_name, PACKAGE_BUG_REPORT);
+ printf(
+ "PExports %s; Originally written 1998, Anders Norlander\n"
+ "Updated 1999, Paul Sokolovsky, 2008, Tor Lillqvist, 2013, 2015, Keith Marshall\n"
+ "Copyright (C) 1998, 1999, 2008, 2013, 2015, MinGW.org Project\n\n"
+ "This program is free software; you may redistribute it under the terms of\n"
+ "the GNU General Public License. This program has absolutely no warranty.\n"
+
+ "\nUsage: %s [-v] [-o] [-h header] [-p preprocessor] dll\n"
+ " -h\tparse header\n"
+ " -o\tprint ordinals\n"
+ " -p\tset preprocessor program\n"
+ " -v\tverbose mode\n"
+ "\nReport bugs as directed at %s\n",
+ PACKAGE_VERSION_STRING, program_name, PACKAGE_BUG_REPORT);
return 1;
}
https://sf.net/p/mingw/pexports/ci/466c07d586e9748095549cc11274444613e285fc/
commit 466c07d586e9748095549cc11274444613e285fc
Author: Keith Marshall <kei...@us...>
Date: Mon Sep 7 22:00:26 2015 +0100
Avoid uint32_t difference overflow in 64-bit pointer adjustment.
diff --git a/ChangeLog b/ChangeLog
index 8a195ce..59ea8e5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
2015-09-07 Keith Marshall <kei...@us...>
+ Avoid uint32_t difference overflow in 64-bit pointer adjustment.
+
+ * pexports.c (rva_to_ptr): Do not compute uint32_t offset differences;
+ apply each offset adjustment individually to the base pointer.
+
+ * pexports.h: Add '#pragma ms_struct on', to keep structures aligned
+ per MSVC convention.
+
+2015-09-07 Keith Marshall <kei...@us...>
+
Eliminate Microsoft inspired obfuscated typedef insanity.
* pexports.c pexports.h (BYTE, WORD, DWORD): Delete typedefs;
diff --git a/pexports.c b/pexports.c
index cb6dc42..be80aa6 100644
--- a/pexports.c
+++ b/pexports.c
@@ -228,10 +228,10 @@ dump_exports(uint32_t exports_rva, uint32_t exports_size)
exports = RVA_TO_PTR(exports_rva, IMAGE_EXPORT_DIRECTORY *);
/* set up various pointers */
- export_name = RVA_TO_PTR(exports->Name,char*);
- ordinal_table = RVA_TO_PTR(exports->AddressOfNameOrdinals, uint16_t *);
+ export_name = RVA_TO_PTR(exports->Name, char *);
name_table = RVA_TO_PTR(exports->AddressOfNames, uint32_t *);
- function_table = RVA_TO_PTR(exports->AddressOfFunctions,void*);
+ ordinal_table = RVA_TO_PTR(exports->AddressOfNameOrdinals, uint16_t *);
+ function_table = RVA_TO_PTR(exports->AddressOfFunctions, void *);
if (verbose)
{
@@ -344,10 +344,9 @@ void *
rva_to_ptr(uint32_t rva)
{
IMAGE_SECTION_HEADER *section = find_section(rva);
- if (section->PointerToRawData == 0)
- return NULL;
- else
- return ((char *) dos_hdr + rva - (section->VirtualAddress - section->PointerToRawData));
+ return (section->PointerToRawData != 0)
+ ? (char *)(dos_hdr) + rva - section->VirtualAddress + section->PointerToRawData
+ : NULL;
}
/* Load a portable executable into memory */
diff --git a/pexports.h b/pexports.h
index 24db504..a2c8e46 100644
--- a/pexports.h
+++ b/pexports.h
@@ -12,6 +12,8 @@
#ifndef _pexports_h
#define _pexports_h
+#pragma ms_struct on
+
#include <stdio.h>
#include <stdint.h>
https://sf.net/p/mingw/pexports/ci/76ec49ceffda4ba129c0616dfbdf2b28063116bf/
commit 76ec49ceffda4ba129c0616dfbdf2b28063116bf
Author: Keith Marshall <kei...@us...>
Date: Mon Sep 7 21:19:27 2015 +0100
Eliminate Microsoft inspired obfuscated typedef insanity.
diff --git a/.hgsub b/.hgsub
deleted file mode 100644
index 92c6100..0000000
--- a/.hgsub
+++ /dev/null
@@ -1 +0,0 @@
-build-aux = ../build-aux
diff --git a/.hgsubstate b/.hgsubstate
deleted file mode 100644
index 541d184..0000000
--- a/.hgsubstate
+++ /dev/null
@@ -1 +0,0 @@
-92c883f2daa845b9fa1f0e739e23cd50887082b5 build-aux
diff --git a/ChangeLog b/ChangeLog
index a508e55..8a195ce 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2015-09-07 Keith Marshall <kei...@us...>
+
+ Eliminate Microsoft inspired obfuscated typedef insanity.
+
+ * pexports.c pexports.h (BYTE, WORD, DWORD): Delete typedefs;
+ respectively replace all corresponding usage instances with...
+ (uint8_t, uint16_t, uint32_t): ...these ISO-C standard types.
+ (PVOID, PIMAGE_DOS_HEADER, PIMAGE_FILE_HEADER, PIMAGE_SECTION_HEADER)
+ (PIMAGE_DATA_DIRECTORY, PIMAGE_EXPORT_DIRECTORY, PIMAGE_NT_HEADERS32)
+ (PIMAGE_NT_HEADERS64, PIMAGE_OPTIONAL_HEADER32)
+ (PIMAGE_OPTIONAL_HEADER64): Delete these non-standard style pointer
+ reference typedefs; replace with conventional pointer references to
+ the underlying data type; where these are structural types, delete
+ initial underscores from the corresponding structure tag names.
+ (HMODULE): Likewise; replace with pointer to void.
+
2013-05-30 Keith Marshall <kei...@us...>
Prepare, tag, and publish 0.46 release.
diff --git a/pexports.c b/pexports.c
index 310f48a..cb6dc42 100644
--- a/pexports.c
+++ b/pexports.c
@@ -18,13 +18,14 @@
#endif
/* get pointer to section header n */
-#define IMAGE_SECTION_HDR(n) ((PIMAGE_SECTION_HEADER) ((char *) nt_hdr32 + \
- 4 + sizeof(IMAGE_FILE_HEADER) + \
- nt_hdr32->FileHeader.SizeOfOptionalHeader + \
- n * sizeof(IMAGE_SECTION_HEADER)))
+#define IMAGE_SECTION_HDR(n) \
+ ((IMAGE_SECTION_HEADER *)((char *) nt_hdr32 \
+ + 4 + sizeof(IMAGE_FILE_HEADER) + nt_hdr32->FileHeader.SizeOfOptionalHeader \
+ + n * sizeof(IMAGE_SECTION_HEADER)) \
+ )
/* convert relative virtual address to a useable pointer */
-#define RVA_TO_PTR(rva,type) ((type) rva_to_ptr((DWORD) rva))
+#define RVA_TO_PTR(rva,type) ((type)(rva_to_ptr((uint32_t)(rva))))
typedef struct str_list {
char *s;
@@ -38,15 +39,15 @@ static void add_path_list(char *path);
static const char *find_file(const char *name);
static void str_list_add(str_list **head, const char *s);
static void parse_headers();
-static void dump_symbol(char *name, int ord, DWORD rva);
+static void dump_symbol(char *name, int ord, uint32_t rva);
static const char mz_sign[2] = {'M','Z'};
static const char pe_sign[4] = {'P','E','\0','\0'};
static const char exp_sign[6] = {'.','e','d','a','t','a'};
-static PIMAGE_DOS_HEADER dos_hdr;
-static PIMAGE_NT_HEADERS32 nt_hdr32;
-static PIMAGE_NT_HEADERS64 nt_hdr64;
+static IMAGE_DOS_HEADER *dos_hdr;
+static IMAGE_NT_HEADERS32 *nt_hdr32;
+static IMAGE_NT_HEADERS64 *nt_hdr64;
static char *filename = NULL;
static char *program_name;
@@ -64,31 +65,30 @@ extern FILE *yyin;
int
main(int argc, char *argv[])
{
- PIMAGE_SECTION_HEADER section;
- DWORD exp_rva, exp_size;
+ IMAGE_SECTION_HEADER *section;
+ uint32_t exp_rva, exp_size;
int i;
-#if defined(_WIN32) && !defined(_WIN64)
- /* If running on 64-bit Windows and built as a 32-bit process, try
+# if defined(_WIN32) && !defined(_WIN64)
+ /*
+ * If running on 64-bit Windows and built as a 32-bit process, try
* disable Wow64 file system redirection, so that we can open DLLs
* in the real system32 folder if requested.
*/
+ void *old_redirection;
+ void *kernel32;
- PVOID old_redirection;
+ extern __declspec(dllimport) void __stdcall *GetModuleHandleA(char *name);
+ extern __declspec(dllimport) void __stdcall *GetProcAddress(void *module, char *name);
- HMODULE kernel32;
-
- extern __declspec(dllimport) HMODULE __stdcall GetModuleHandleA(char *name);
- extern __declspec(dllimport) PVOID __stdcall GetProcAddress(HMODULE module, char *name);
-
- BOOL (__stdcall *pWow64DisableWow64FsRedirection) (PVOID *old_value);
+ int32_t (__stdcall *pWow64DisableWow64FsRedirection) (void **old_value);
kernel32 = GetModuleHandleA("kernel32.dll");
pWow64DisableWow64FsRedirection = GetProcAddress(kernel32, "Wow64DisableWow64FsRedirection");
if (pWow64DisableWow64FsRedirection)
pWow64DisableWow64FsRedirection(&old_redirection);
-#endif
+# endif
program_name = argv[0];
@@ -161,17 +161,16 @@ main(int argc, char *argv[])
parse_headers();
/* load file */
- dos_hdr = load_pe_image(filename);
- if (dos_hdr == NULL)
+ if( (dos_hdr = load_pe_image(filename)) == NULL )
{
fprintf(stderr, "%s: %s: could not load PE image\n",
program_name, filename);
return 1;
}
- nt_hdr32 = (PIMAGE_NT_HEADERS32) ((char *) dos_hdr + dos_hdr->e_lfanew);
- nt_hdr64 = (PIMAGE_NT_HEADERS64) nt_hdr32;
-
+ nt_hdr32 = (IMAGE_NT_HEADERS32 *) ((char *) dos_hdr + dos_hdr->e_lfanew);
+ nt_hdr64 = (IMAGE_NT_HEADERS64 *) nt_hdr32;
+
if (nt_hdr32->FileHeader.Machine == IMAGE_FILE_MACHINE_I386) {
exp_rva = nt_hdr32->OptionalHeader.DataDirectory[0].VirtualAddress;
exp_size = nt_hdr32->OptionalHeader.DataDirectory[0].Size;
@@ -198,7 +197,7 @@ main(int argc, char *argv[])
section = IMAGE_SECTION_HDR(i);
if (memcmp(section->Name, exp_sign, sizeof(exp_sign)) == 0)
dump_exports(section->VirtualAddress, exp_size);
- else if ((exp_rva >= section->VirtualAddress) &&
+ else if ((exp_rva >= section->VirtualAddress) &&
(exp_rva < (section->VirtualAddress + section->SizeOfRawData)))
dump_exports(exp_rva, exp_size);
}
@@ -209,14 +208,14 @@ main(int argc, char *argv[])
/* dump exported symbols on stdout */
void
-dump_exports(DWORD exports_rva, DWORD exports_size)
+dump_exports(uint32_t exports_rva, uint32_t exports_size)
{
- PIMAGE_SECTION_HEADER section;
- PIMAGE_EXPORT_DIRECTORY exports;
+ IMAGE_SECTION_HEADER *section;
+ IMAGE_EXPORT_DIRECTORY *exports;
char *export_name;
- WORD *ordinal_table;
- DWORD *name_table;
- DWORD *function_table;
+ uint16_t *ordinal_table;
+ uint32_t *name_table;
+ uint32_t *function_table;
int i;
static int first = 1;
@@ -226,12 +225,12 @@ dump_exports(DWORD exports_rva, DWORD exports_size)
printf("; Reading exports from section: %s\n",
section->Name);
- exports = RVA_TO_PTR(exports_rva, PIMAGE_EXPORT_DIRECTORY);
+ exports = RVA_TO_PTR(exports_rva, IMAGE_EXPORT_DIRECTORY *);
/* set up various pointers */
export_name = RVA_TO_PTR(exports->Name,char*);
- ordinal_table = RVA_TO_PTR(exports->AddressOfNameOrdinals,WORD*);
- name_table = RVA_TO_PTR(exports->AddressOfNames,DWORD*);
+ ordinal_table = RVA_TO_PTR(exports->AddressOfNameOrdinals, uint16_t *);
+ name_table = RVA_TO_PTR(exports->AddressOfNames, uint32_t *);
function_table = RVA_TO_PTR(exports->AddressOfFunctions,void*);
if (verbose)
@@ -260,33 +259,33 @@ dump_exports(DWORD exports_rva, DWORD exports_size)
dump_symbol(RVA_TO_PTR(name_table[i],char*),
ordinal_table[i] + exports->Base,
function_table[ordinal_table[i]]);
-
+
int f_off = ordinal_table[i];
-
+
if(function_table[f_off] >= exports_rva && function_table[f_off] < (exports_rva + exports_size) && verbose) {
printf(" ; Forwarder (%s)", RVA_TO_PTR(function_table[f_off], char*));
}
-
+
printf("\n");
}
for (i = 0; i < exports->NumberOfFunctions; i++)
{
- if ( (function_table[i] >= exports_rva) &&
+ if ( (function_table[i] >= exports_rva) &&
(function_table[i] < (exports_rva + exports_size)))
{
int name_present = 0, n;
-
+
for(n = 0; n < exports->NumberOfNames; n++) {
if(ordinal_table[n] == i) {
name_present = 1;
break;
}
}
-
+
if(!name_present) {
dump_symbol(strchr(RVA_TO_PTR(function_table[i],char*), '.')+1, i + exports->Base, function_table[i]);
-
+
printf(" ; WARNING: Symbol name guessed from forwarder (%s)\n", RVA_TO_PTR(function_table[i], char*));
}
}
@@ -294,7 +293,7 @@ dump_exports(DWORD exports_rva, DWORD exports_size)
}
static void
-dump_symbol(char *name, int ord, DWORD rva)
+dump_symbol(char *name, int ord, uint32_t rva)
{
char s[256];
str_tree *symbol = str_tree_find(symbols, name);
@@ -303,7 +302,7 @@ dump_symbol(char *name, int ord, DWORD rva)
sprintf(s, "%s@%"PRIdPTR, name, (intptr_t)(symbol->extra));
else
sprintf(s, "%s", name);
-
+
/* output ordinal */
if (ordinal_flag)
printf("%-24s\t@%d", s, ord);
@@ -311,7 +310,7 @@ dump_symbol(char *name, int ord, DWORD rva)
printf("%s", s);
{
- PIMAGE_SECTION_HEADER s=find_section(rva);
+ IMAGE_SECTION_HEADER *s = find_section(rva);
/* Stupid msvc doesn't have .bss section, it spews uninitilized data
* to no section
@@ -329,23 +328,22 @@ dump_symbol(char *name, int ord, DWORD rva)
}
/* get section to which rva points */
-PIMAGE_SECTION_HEADER
-find_section(DWORD rva)
+IMAGE_SECTION_HEADER *find_section(uint32_t rva)
{
int i;
- PIMAGE_SECTION_HEADER section = IMAGE_SECTION_HDR(0);
+ IMAGE_SECTION_HEADER *section = IMAGE_SECTION_HDR(0);
for (i = 0; i < nt_hdr32->FileHeader.NumberOfSections; i++, section++)
- if ((rva >= section->VirtualAddress) &&
+ if ((rva >= section->VirtualAddress) &&
(rva <= (section->VirtualAddress + section->SizeOfRawData)))
return section;
- return NULL;
+ return NULL;
}
/* convert rva to pointer into loaded file */
void *
-rva_to_ptr(DWORD rva)
+rva_to_ptr(uint32_t rva)
{
- PIMAGE_SECTION_HEADER section = find_section(rva);
+ IMAGE_SECTION_HEADER *section = find_section(rva);
if (section->PointerToRawData == 0)
return NULL;
else
@@ -353,25 +351,24 @@ rva_to_ptr(DWORD rva)
}
/* Load a portable executable into memory */
-PIMAGE_DOS_HEADER
-load_pe_image(const char *filename)
+IMAGE_DOS_HEADER *load_pe_image(const char *filename)
{
#ifdef _MSC_VER
struct _stat32 st;
#else
struct stat st;
#endif
- PIMAGE_DOS_HEADER phdr;
+ IMAGE_DOS_HEADER *phdr;
FILE *f;
-
+
if (stat(filename, &st) == -1)
{
perror("stat");
return NULL;
}
- phdr = (PIMAGE_DOS_HEADER) xmalloc(st.st_size);
-
+ phdr = (IMAGE_DOS_HEADER *) xmalloc(st.st_size);
+
f = fopen(filename, "rb");
if (f == NULL)
@@ -479,8 +476,7 @@ parse_headers()
}
/* allocate memory; abort on failure */
-static void
-*xmalloc(size_t count)
+static void *xmalloc(size_t count)
{
void *p = malloc(count);
if (p == NULL)
diff --git a/pexports.h b/pexports.h
index 7f7e5d9..24db504 100644
--- a/pexports.h
+++ b/pexports.h
@@ -9,7 +9,6 @@
pexports will work only on intel machines.
*/
-
#ifndef _pexports_h
#define _pexports_h
@@ -18,187 +17,167 @@
#include "str_tree.h"
-/* These are needed:
- * FIXME: However, I'd really much prefer to see ISO-C99 standard
- * types used throughout, in preference to these Micrsoft-inspired
- * obfuscated typedefs.
- */
-typedef uint8_t BYTE;
-typedef uint16_t WORD;
-typedef uint32_t DWORD;
-typedef void* PVOID;
-typedef int32_t LONG;
-typedef uint64_t ULONGLONG;
-typedef int BOOL;
-typedef void* HMODULE;
-
-#define FALSE 0
-#define TRUE 1
+#define FALSE (int32_t)(0)
+#define TRUE (int32_t)(1)
/* PE structures */
-typedef struct _IMAGE_DATA_DIRECTORY {
- DWORD VirtualAddress;
- DWORD Size;
-} IMAGE_DATA_DIRECTORY, *PIMAGE_DATA_DIRECTORY;
-
-typedef struct _IMAGE_FILE_HEADER {
- WORD Machine;
- WORD NumberOfSections;
- DWORD TimeDateStamp;
- DWORD PointerToSymbolTable;
- DWORD NumberOfSymbols;
- WORD SizeOfOptionalHeader;
- WORD Characteristics;
-} IMAGE_FILE_HEADER, *PIMAGE_FILE_HEADER;
+typedef struct IMAGE_DATA_DIRECTORY {
+ uint32_t VirtualAddress;
+ uint32_t Size;
+} IMAGE_DATA_DIRECTORY;
+
+typedef struct IMAGE_FILE_HEADER {
+ uint16_t Machine;
+ uint16_t NumberOfSections;
+ uint32_t TimeDateStamp;
+ uint32_t PointerToSymbolTable;
+ uint32_t NumberOfSymbols;
+ uint16_t SizeOfOptionalHeader;
+ uint16_t Characteristics;
+} IMAGE_FILE_HEADER;
#define IMAGE_FILE_MACHINE_I386 0x014c
#define IMAGE_FILE_MACHINE_IA64 0x0200
#define IMAGE_FILE_MACHINE_AMD64 0x8664
-typedef struct _IMAGE_OPTIONAL_HEADER32 {
- WORD Magic;
- BYTE MajorLinkerVersion;
- BYTE MinorLinkerVersion;
- DWORD SizeOfCode;
- DWORD SizeOfInitializedData;
- DWORD SizeOfUninitializedData;
- DWORD AddressOfEntryPoint;
- DWORD BaseOfCode;
- DWORD BaseOfData;
- DWORD ImageBase;
- DWORD SectionAlignment;
- DWORD FileAlignment;
- WORD MajorOperatingSystemVersion;
- WORD MinorOperatingSystemVersion;
- WORD MajorImageVersion;
- WORD MinorImageVersion;
- WORD MajorSubsystemVersion;
- WORD MinorSubsystemVersion;
- DWORD Reserved1;
- DWORD SizeOfImage;
- DWORD SizeOfHeaders;
- DWORD CheckSum;
- WORD Subsystem;
- WORD DllCharacteristics;
- DWORD SizeOfStackReserve;
- DWORD SizeOfStackCommit;
- DWORD SizeOfHeapReserve;
- DWORD SizeOfHeapCommit;
- DWORD LoaderFlags;
- DWORD NumberOfRvaAndSizes;
+typedef struct IMAGE_OPTIONAL_HEADER32 {
+ uint16_t Magic;
+ uint8_t MajorLinkerVersion;
+ uint8_t MinorLinkerVersion;
+ uint32_t SizeOfCode;
+ uint32_t SizeOfInitializedData;
+ uint32_t SizeOfUninitializedData;
+ uint32_t AddressOfEntryPoint;
+ uint32_t BaseOfCode;
+ uint32_t BaseOfData;
+ uint32_t ImageBase;
+ uint32_t SectionAlignment;
+ uint32_t FileAlignment;
+ uint16_t MajorOperatingSystemVersion;
+ uint16_t MinorOperatingSystemVersion;
+ uint16_t MajorImageVersion;
+ uint16_t MinorImageVersion;
+ uint16_t MajorSubsystemVersion;
+ uint16_t MinorSubsystemVersion;
+ uint32_t Reserved1;
+ uint32_t SizeOfImage;
+ uint32_t SizeOfHeaders;
+ uint32_t CheckSum;
+ uint16_t Subsystem;
+ uint16_t DllCharacteristics;
+ uint32_t SizeOfStackReserve;
+ uint32_t SizeOfStackCommit;
+ uint32_t SizeOfHeapReserve;
+ uint32_t SizeOfHeapCommit;
+ uint32_t LoaderFlags;
+ uint32_t NumberOfRvaAndSizes;
IMAGE_DATA_DIRECTORY DataDirectory[16];
-} IMAGE_OPTIONAL_HEADER32, *PIMAGE_OPTIONAL_HEADER32;
-
-typedef struct _IMAGE_OPTIONAL_HEADER64 {
- WORD Magic;
- BYTE MajorLinkerVersion;
- BYTE MinorLinkerVersion;
- DWORD SizeOfCode;
- DWORD SizeOfInitializedData;
- DWORD SizeOfUninitializedData;
- DWORD AddressOfEntryPoint;
- DWORD BaseOfCode;
- ULONGLONG ImageBase;
- DWORD SectionAlignment;
- DWORD FileAlignment;
- WORD MajorOperatingSystemVersion;
- WORD MinorOperatingSystemVersion;
- WORD MajorImageVersion;
- WORD MinorImageVersion;
- WORD MajorSubsystemVersion;
- WORD MinorSubsystemVersion;
- DWORD Win32VersionValue;
- DWORD SizeOfImage;
- DWORD SizeOfHeaders;
- DWORD CheckSum;
- WORD Subsystem;
- WORD DllCharacteristics;
- ULONGLONG SizeOfStackReserve;
- ULONGLONG SizeOfStackCommit;
- ULONGLONG SizeOfHeapReserve;
- ULONGLONG SizeOfHeapCommit;
- DWORD LoaderFlags;
- DWORD NumberOfRvaAndSizes;
+} IMAGE_OPTIONAL_HEADER32;
+
+typedef struct IMAGE_OPTIONAL_HEADER64 {
+ uint16_t Magic;
+ uint8_t MajorLinkerVersion;
+ uint8_t MinorLinkerVersion;
+ uint32_t SizeOfCode;
+ uint32_t SizeOfInitializedData;
+ uint32_t SizeOfUninitializedData;
+ uint32_t AddressOfEntryPoint;
+ uint32_t BaseOfCode;
+ uint64_t ImageBase;
+ uint32_t SectionAlignment;
+ uint32_t FileAlignment;
+ uint16_t MajorOperatingSystemVersion;
+ uint16_t MinorOperatingSystemVersion;
+ uint16_t MajorImageVersion;
+ uint16_t MinorImageVersion;
+ uint16_t MajorSubsystemVersion;
+ uint16_t MinorSubsystemVersion;
+ uint32_t Win32VersionValue;
+ uint32_t SizeOfImage;
+ uint32_t SizeOfHeaders;
+ uint32_t CheckSum;
+ uint16_t Subsystem;
+ uint16_t DllCharacteristics;
+ uint64_t SizeOfStackReserve;
+ uint64_t SizeOfStackCommit;
+ uint64_t SizeOfHeapReserve;
+ uint64_t SizeOfHeapCommit;
+ uint32_t LoaderFlags;
+ uint32_t NumberOfRvaAndSizes;
IMAGE_DATA_DIRECTORY DataDirectory[16];
-} IMAGE_OPTIONAL_HEADER64, *PIMAGE_OPTIONAL_HEADER64;
+} IMAGE_OPTIONAL_HEADER64;
typedef struct IMAGE_NT_HEADERS32 {
char Signature[4];
IMAGE_FILE_HEADER FileHeader;
IMAGE_OPTIONAL_HEADER32 OptionalHeader;
-} IMAGE_NT_HEADERS32, *PIMAGE_NT_HEADERS32;
+} IMAGE_NT_HEADERS32;
-typedef struct _IMAGE_NT_HEADERS64 {
+typedef struct IMAGE_NT_HEADERS64 {
char Signature[4];
IMAGE_FILE_HEADER FileHeader;
IMAGE_OPTIONAL_HEADER64 OptionalHeader;
-} IMAGE_NT_HEADERS64, *PIMAGE_NT_HEADERS64;
+} IMAGE_NT_HEADERS64;
-typedef struct _IMAGE_SECTION_HEADER {
- BYTE Name[8];
+typedef struct IMAGE_SECTION_HEADER {
+ uint8_t Name[8];
union {
- DWORD PhysicalAddress;
- DWORD VirtualSize;
+ uint32_t PhysicalAddress;
+ uint32_t VirtualSize;
} Misc;
- DWORD VirtualAddress;
- DWORD SizeOfRawData;
- DWORD PointerToRawData;
- DWORD PointerToRelocations;
- DWORD PointerToLinenumbers;
- WORD NumberOfRelocations;
- WORD NumberOfLinenumbers;
- DWORD Characteristics;
-} IMAGE_SECTION_HEADER, *PIMAGE_SECTION_HEADER;
+ uint32_t VirtualAddress;
+ uint32_t SizeOfRawData;
+ uint32_t PointerToRawData;
+ uint32_t PointerToRelocations;
+ uint32_t PointerToLinenumbers;
+ uint16_t NumberOfRelocations;
+ uint16_t NumberOfLinenumbers;
+ uint32_t Characteristics;
+} IMAGE_SECTION_HEADER;
#define IMAGE_SCN_CNT_CODE 0x00000020
-typedef struct _IMAGE_EXPORT_DIRECTORY {
- DWORD Characteristics;
- DWORD TimeDateStamp;
- WORD MajorVersion;
- WORD MinorVersion;
- DWORD Name;
- DWORD Base;
- DWORD NumberOfFunctions;
- DWORD NumberOfNames;
- DWORD AddressOfFunctions;
- DWORD AddressOfNames;
- DWORD AddressOfNameOrdinals;
-} IMAGE_EXPORT_DIRECTORY, *PIMAGE_EXPORT_DIRECTORY;
-
-typedef struct _IMAGE_DOS_HEADER {
- WORD e_magic;
- WORD e_cblp;
- WORD e_cp;
- WORD e_crlc;
- WORD e_cparhdr;
- WORD e_minalloc;
- WORD e_maxalloc;
- WORD e_ss;
- WORD e_sp;
- WORD e_csum;
- WORD e_ip;
- WORD e_cs;
- WORD e_lfarlc;
- WORD e_ovno;
- WORD e_res[4];
- WORD e_oemid;
- WORD e_oeminfo;
- WORD e_res2[10];
- LONG e_lfanew;
-} IMAGE_DOS_HEADER, *PIMAGE_DOS_HEADER;
-
-PIMAGE_SECTION_HEADER
-find_section(DWORD rva);
-
-PIMAGE_DOS_HEADER
-load_pe_image(const char *filename);
-
-void *
-rva_to_ptr(DWORD rva);
-
-void
-dump_exports(DWORD exports_rva, DWORD exports_size);
+typedef struct IMAGE_EXPORT_DIRECTORY {
+ uint32_t Characteristics;
+ uint32_t TimeDateStamp;
+ uint16_t MajorVersion;
+ uint16_t MinorVersion;
+ uint32_t Name;
+ uint32_t Base;
+ uint32_t NumberOfFunctions;
+ uint32_t NumberOfNames;
+ uint32_t AddressOfFunctions;
+ uint32_t AddressOfNames;
+ uint32_t AddressOfNameOrdinals;
+} IMAGE_EXPORT_DIRECTORY;
+
+typedef struct IMAGE_DOS_HEADER {
+ uint16_t e_magic;
+ uint16_t e_cblp;
+ uint16_t e_cp;
+ uint16_t e_crlc;
+ uint16_t e_cparhdr;
+ uint16_t e_minalloc;
+ uint16_t e_maxalloc;
+ uint16_t e_ss;
+ uint16_t e_sp;
+ uint16_t e_csum;
+ uint16_t e_ip;
+ uint16_t e_cs;
+ uint16_t e_lfarlc;
+ uint16_t e_ovno;
+ uint16_t e_res[4];
+ uint16_t e_oemid;
+ uint16_t e_oeminfo;
+ uint16_t e_res2[10];
+ int32_t e_lfanew;
+} IMAGE_DOS_HEADER;
+
+IMAGE_SECTION_HEADER *find_section( uint32_t );
+IMAGE_DOS_HEADER *load_pe_image( const char * );
+
+void *rva_to_ptr( uint32_t );
+void dump_exports( uint32_t, uint32_t );
#define ADD_FUNCTION(nm,n) str_tree_add(&symbols, nm, (void*)(intptr_t)(n))
extern str_tree *symbols;
-----------------------------------------------------------------------
Summary of changes:
.hgsub | 1 -
.hgsubstate | 1 -
.hgtags | 1 +
ChangeLog | 38 ++++++++
README | 11 ++-
configure.ac | 4 +-
pexports.c | 156 +++++++++++++++----------------
pexports.h | 297 +++++++++++++++++++++++++++-------------------------------
8 files changed, 266 insertions(+), 243 deletions(-)
delete mode 100644 .hgsub
delete mode 100644 .hgsubstate
hooks/post-receive
--
Repository: pexports
|
|
From: Keith M. <no...@so...> - 2015-09-08 12:53:40
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Repository: pexports".
The tag, v0_47 has been created
at 819d4fe3cde92d1d902e3d48771aca4dba6a0b3a (commit)
- Log -----------------------------------------------------------------
commit 819d4fe3cde92d1d902e3d48771aca4dba6a0b3a
Author: Keith Marshall <kei...@us...>
Date: Tue Sep 8 13:44:40 2015 +0100
Prepare, tag, and publish 0.47 release.
-----------------------------------------------------------------------
hooks/post-receive
--
Repository: pexports
|
|
From: Keith M. <no...@so...> - 2015-09-06 20:51:33
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Repository: mingw-dist".
The branch, master has been updated
via 79d68e5cb2fd6815003fca41698513a28865bcf8 (commit)
from 7f596af8de8e6a08bc81ccec91c02077ca6fe24b (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://sf.net/p/mingw/mingw-dist/ci/79d68e5cb2fd6815003fca41698513a28865bcf8/
commit 79d68e5cb2fd6815003fca41698513a28865bcf8
Author: Keith Marshall <kei...@us...>
Date: Sun Sep 6 21:50:20 2015 +0100
Fix MinGW-Bug [#2216]: error in gettext-0.18.3.2 packaging.
diff --git a/ChangeLog b/ChangeLog
index be1fe58..dfd3439 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2015-09-06 Keith Marshall <kei...@us...>
+
+ Fix MinGW-Bug [#2216]: error in gettext-0.18.3.2 packaging.
+
+ * mingw32-gettext.xml (all package components): Add new release
+ specifications, at version 0.18.3.2-2; these effectlively duplicate
+ the version 0.18.3.2-1 package set, but with all offending *.la files
+ removed from the archive corresponding to the gettext-dev component.
+ * common/issue.log mingw32/issue.log: Update accordingly.
+
2015-08-22 Keith Marshall <kei...@us...>
Upgrade GNU MPC package set to version 1.0.2
diff --git a/common/issue.log b/common/issue.log
index 0a928ba..e112ff0 100644
--- a/common/issue.log
+++ b/common/issue.log
@@ -23,6 +23,6 @@
# MinGW Project, accept liability for any damages, however caused,
# arising from the use of this software.
#
- 75fc52dde8d408d798c0be51070d5d02f4c63085 2015082002 package-list.xml
+ 75fc52dde8d408d798c0be51070d5d02f4c63085 2015090600 package-list.xml
#
# $RCSfile$: end of file
diff --git a/mingw32/issue.log b/mingw32/issue.log
index 4b5f7ba..3978fc4 100644
--- a/mingw32/issue.log
+++ b/mingw32/issue.log
@@ -38,7 +38,7 @@
db58df47f1a7040488cac4bd0fc6dfab758035e7 2014082600 mingw32-gcc4.xml
21031079d59268339bfd7c6dc8239df214588bca 2013091501 mingw32-gdb.xml
14dd10ab97b27430bdb688f4e85993cd821f7a05 2012073100 mingw32-gendef.xml
- 1f3543e9db268270f03ee13db26e558be896a45c 2014043000 mingw32-gettext.xml
+ 7b16c690a8b02106e7cc7abc6c6310fe30390683 2015090600 mingw32-gettext.xml
8272b6fc44a3e7766adec484742f007f28a39eaf 2013090900 mingw32-gmp.xml
99e3ac0d2c743b0d927a4d89a3153a975d2bdf87 2012073100 mingw32-libarchive.xml
e8392e268250e1bc37bc008e34c4c180cec4fdaa 2014042900 mingw32-libiconv.xml
@@ -50,7 +50,7 @@
cd33ad74b608bce33ea297801253e6efbafce27c 2012073100 mingw32-mingw-utils.xml
8d3a7125499a85916b53efb4c897ac907e2490ab 2015082000 mingw32-mpc.xml
8a11de23e7a89fd11436bdf162ef90712f30101b 2013102300 mingw32-mpfr.xml
- 1413ad59660ad963082e7de10c31bbb725116aee 2015082001 mingw32-package-list.xml
+ 1413ad59660ad963082e7de10c31bbb725116aee 2015090600 mingw32-package-list.xml
bad22da9b9ec9bcea1d539e29ee2976cc88d9fc2 2013053000 mingw32-pexports.xml
cdb2a4dbedfc9f2cdfc92340f6f9b12da061c0d9 2012073100 mingw32-popt.xml
0a5d210a13d073104fb74b4f9c081674c9745cd1 2013090900 mingw32-pthreads-w32.xml
diff --git a/mingw32/mingw32-gettext.xml b/mingw32/mingw32-gettext.xml
index 058c6e8..ce4adac 100644
--- a/mingw32/mingw32-gettext.xml
+++ b/mingw32/mingw32-gettext.xml
@@ -38,6 +38,7 @@
<source tarname="gettext-%-mingw32-%-src.tar.%" />
<component class="bin">
+ <release tarname="gettext-0.18.3.2-2-mingw32-bin.tar.xz" />
<release tarname="gettext-0.18.3.2-1-mingw32-bin.tar.xz">
<download tarname="gettext-0.18.3.2-1-1-mingw32-bin.tar.xz" />
</release>
@@ -61,6 +62,9 @@
bogus inter-package dependencies ceases to be a concern.
</paragraph>
</description>
+ <release tarname="gettext-0.18.3.2-2-mingw32-dll.tar.xz">
+ <download tarname="none" />
+ </release>
<release tarname="gettext-0.18.3.2-1-mingw32-dll.tar.xz">
<download tarname="none" />
</release>
@@ -71,6 +75,7 @@
</component>
<component class="doc">
+ <release tarname="gettext-0.18.3.2-2-mingw32-doc.tar.xz" />
<release tarname="gettext-0.18.3.2-1-mingw32-doc.tar.xz" />
<release tarname="gettext-0.18.3.1-1-mingw32-doc.tar.lzma" />
<release tarname="gettext-0.18.1.1-2-mingw32-doc.tar.lzma" />
@@ -78,6 +83,7 @@
</component>
<component class="lic">
+ <release tarname="gettext-0.18.3.2-2-mingw32-lic.tar.xz" />
<release tarname="gettext-0.18.3.2-1-mingw32-lic.tar.xz" />
<release tarname="gettext-0.18.3.1-1-mingw32-lic.tar.lzma" />
<release tarname="gettext-0.18.1.1-2-mingw32-lic.tar.lzma" />
@@ -85,16 +91,22 @@
</component>
<component class="info">
+ <release tarname="gettext-0.18.3.2-2-mingw32-info.tar.xz" />
<release tarname="gettext-0.18.3.2-1-mingw32-info.tar.xz" />
<release tarname="gettext-0.18.3.1-1-mingw32-info.tar.lzma" />
</component>
<component class="man">
+ <release tarname="gettext-0.18.3.2-2-mingw32-man.tar.xz" />
<release tarname="gettext-0.18.3.2-1-mingw32-man.tar.xz" />
<release tarname="gettext-0.18.3.1-1-mingw32-man.tar.lzma" />
</component>
<component class="html">
+ <release tarname="gettext-0.18.3.2-2-mingw32-html.tar.xz" >
+ <requires eq="gettext-%-mingw32-%-doc.tar" />
+ <download tarname="none" />
+ </release>
<release tarname="gettext-0.18.3.2-1-mingw32-html.tar.xz" >
<requires eq="gettext-%-mingw32-%-doc.tar" />
<download tarname="none" />
@@ -103,6 +115,7 @@
</component>
<component class="dev">
+ <release tarname="gettext-0.18.3.2-2-mingw32-dev.tar.xz" />
<release tarname="gettext-0.18.3.2-1-mingw32-dev.tar.xz" />
<release tarname="gettext-0.18.3.1-1-mingw32-dev.tar.lzma" >
<requires eq="gettext-0.18.3.1-1-mingw32-dll.tar.lzma" />
@@ -119,6 +132,7 @@
</component>
<component class="ext">
+ <release tarname="gettext-0.18.3.2-2-mingw32-ext.tar.xz" />
<release tarname="gettext-0.18.3.2-1-mingw32-ext.tar.xz" />
<release tarname="gettext-0.18.3.1-1-mingw32-ext.tar.lzma" />
<release tarname="gettext-0.18.1.1-2-mingw32-ext.tar.lzma" />
@@ -165,6 +179,7 @@
<release tarname="libintl-0.18.3.1-1-mingw32-dll-8.tar" >
<download tarname="gettext-0.18.3.1-1-mingw32-dll.tar.lzma"/>
</release>
+ <release tarname="libintl-0.18.3.2-2-mingw32-dll-8.tar.xz" />
<release tarname="libintl-0.18.3.2-1-mingw32-dll-8.tar.xz" />
</component>
</package>
@@ -211,6 +226,7 @@
<release tarname="libgettextpo-0.18.3.1-1-mingw32-dll-0.tar" >
<download tarname="gettext-0.18.3.1-1-mingw32-dll.tar.lzma"/>
</release>
+ <release tarname="libgettextpo-0.18.3.2-2-mingw32-dll-0.tar.xz" />
<release tarname="libgettextpo-0.18.3.2-1-mingw32-dll-0.tar.xz" />
</component>
</package>
@@ -256,6 +272,7 @@
<release tarname="libasprintf-0.18.3.1-1-mingw32-dll-0.tar" >
<download tarname="none"/>
</release>
+ <release tarname="libasprintf-0.18.3.2-2-mingw32-dll-0.tar.xz" />
<release tarname="libasprintf-0.18.3.2-1-mingw32-dll-0.tar.xz" />
</component>
</package>
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 10 ++++++++++
common/issue.log | 2 +-
mingw32/issue.log | 4 ++--
mingw32/mingw32-gettext.xml | 17 +++++++++++++++++
4 files changed, 30 insertions(+), 3 deletions(-)
hooks/post-receive
--
Repository: mingw-dist
|