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
|
From: Keith M. <no...@so...> - 2018-07-13 13:05:14
|
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, 5.1-trunk has been updated via 0d33685263a82a1f79b41ed4da723650c695682e (commit) from 7b0f1f23aa38ae883cded71ff30d94e31b4e39cb (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/0d33685263a82a1f79b41ed4da723650c695682e/ commit 0d33685263a82a1f79b41ed4da723650c695682e Author: Keith Marshall <ke...@us...> Date: Fri Jul 13 14:01:13 2018 +0100 Advertise new canonical URI for source code repository. diff --git a/ChangeLog b/ChangeLog index 5b2f5fb..d7c80f1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2018-07-13 Keith Marshall <ke...@us...> + + Advertise new canonical URI for source code repository. + + * README (Important Notice): New section; identify new canonical + repository URIs; note obsolescence of old repositories. + 2018-02-26 Keith Marshall <ke...@us...> Adjust repository version following WSL-5.1 release. diff --git a/README b/README index a3a8e96..3092823 100644 --- a/README +++ b/README @@ -1,12 +1,52 @@ -mingw.org-wsl (Windows System Libraries): -===== -This package contains both the C Runtime (libcrt) and the Windows API (winapi) -definitions as provided by the MinGW.org team. These libraries can be used -for both 32 bit and 64 bit Windows programming. We have extended some parts -of the C runtime to be C99 compliant but for the most part you can find the -documentation provided by http://msdn.microsoft.com to be your best source for -how to use these libraries in your C programming. The GNU C++ compiler (g++) -has its own implementation of the C++ standard and the documentation you find -for stdc++ on the http://gcc.gnu.org site will be your best source of informa- -tion for it. Note that some of the C++ API will not able to be used on Windows -due to lack of implementation for the Windows platform. +MinGW.org-WSL (Windows System Libraries) +======================================== + +This package provides both the C Runtime (mingwrt) and the Windows API +(winapi, a.k.a. w32api) system library components, which are required to +support the MinGW.org distribution of the GNU Compiler Collection. + + +Important Notice +---------------- + +The canonical URI for this package's source code repository is: +git://git.osdn.net/gitroot/mingw/mingw-org-wsl.git + +Alternative canonical URIs, equivalent to the above are: +https://scm.osdn.net/gitroot/mingw/mingw-org-wsl.git +http://scm.osdn.net/gitroot/mingw/mingw-org-wsl.git + +Privileged users, with SSH update rights, may clone the repository from: +ssh://USE...@gi...:/gitroot/mingw/mingw-org-wsl.git + +Privileged users, who favour Mercurial over Git, may enable Mercurial's +git extension, and then "hg clone" from the equivalent (hg-capable) URI: +git+ssh://USE...@gi...:/gitroot/mingw/mingw-org-wsl.git + +If you obtain source code from any URI, other than those canonical URIs +listed above, (or any alternative URI as may be identified subsequently, +at these URIs), then you should be advised that such source code is not +maintained by the MinGW.org Development Team, and is likely obsolete. + + +Description +----------- + +MinGW.org-WSL is provided, and maintained by the MinGW.org Development +Team, to furnish essential bindings between the GNU Compiler Collection +and the MS-Windows operating system. Historically, development has been +focused on support for the 32-bit MS-Windows platform. However, these +libraries are intended for use in both 32-bit and 64-bit programming; +patches to imporve support for both platforms, and in particular the +64-bit platform, will be gratefully considered. + +Parts of the C runtime have been adapted to improve C99 compliance, but +for the most part you may find that Microsoft's documentation, provided +at http://msdn.microsoft.com, offers the most useful advice on the use +the MinGW.org-WSL libraries in your own programming. + +The GNU C++ Compiler (g++) provides its own implementation of the C++ +standard; http://gcc.gnu.org offers the most useful documentation for +this particular implementation of the C++ standard. (Do please note +that not all features of this implementation are fully supported on +the MS-Windows platforms). ----------------------------------------------------------------------- Summary of changes: ChangeLog | 7 +++++++ README | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++------------ 2 files changed, 59 insertions(+), 12 deletions(-) hooks/post-receive -- Repository: mingw-org-wsl |
From: Keith M. <no...@so...> - 2018-07-12 10:24: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: mingw-org-wsl". The branch, 5.1-trunk has been updated via 7b0f1f23aa38ae883cded71ff30d94e31b4e39cb (commit) via 73aedcc0f2e6ba370de0d86ab878ad76a0dda7b5 (commit) via 753e249cdb3480951addf1c33151922cdd09705f (commit) via 9d119ea4e3ff628cf3c4ed67944eac509a9e8347 (commit) from 596ddea2abd2b59694337842839fad974656e60f (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/7b0f1f23aa38ae883cded71ff30d94e31b4e39cb/ commit 7b0f1f23aa38ae883cded71ff30d94e31b4e39cb Author: Keith Marshall <ke...@us...> Date: Wed Jul 11 21:20:14 2018 +0100 Make <wincrypt.h> header effectively self-contained. * include/wincrypt.h: Include <winbase.h> diff --git a/w32api/ChangeLog b/w32api/ChangeLog index 36bda4e..d8c6e14 100644 --- a/w32api/ChangeLog +++ b/w32api/ChangeLog @@ -1,3 +1,9 @@ +2018-07-11 Keith Marshall <ke...@us...> + + Make <wincrypt.h> header effectively self-contained. + + * include/wincrypt.h: Include <winbase.h> + 2018-07-11 Keith Marshall <ke...@us...> Correct <wincrypt.h> typographic errors; fix issue [#38391] diff --git a/w32api/include/wincrypt.h b/w32api/include/wincrypt.h index 708e3ac..48a16e7 100644 --- a/w32api/include/wincrypt.h +++ b/w32api/include/wincrypt.h @@ -34,6 +34,8 @@ #define _WINCRYPT_H #pragma GCC system_header +#include <winbase.h> + #ifndef WINADVAPI #define WINADVAPI #endif https://sf.net/p/mingw/mingw-org-wsl/ci/73aedcc0f2e6ba370de0d86ab878ad76a0dda7b5/ commit 73aedcc0f2e6ba370de0d86ab878ad76a0dda7b5 Author: Keith Marshall <ke...@us...> Date: Wed Jul 11 21:07:05 2018 +0100 Correct <wincrypt.h> typographic errors; fix issue [#38391] * include/wincrypt.h (CALG_TLS1PRF): Delete symbolic reference to... (ALG_CLASS_DHASH): ...this; there is no such symbol; replace it with... (ALG_CLASS_HASH): ...this, which represents the correct reference. (struct _CRYPTOAPI_BLOB): Delete extraneous "typedef" keyword; this struct definition is not directly associated with any type name. (struct _SSL_EXTRA_CERT_CHAIN_POLICY_PARA): Likewise. diff --git a/w32api/ChangeLog b/w32api/ChangeLog index e973b39..36bda4e 100644 --- a/w32api/ChangeLog +++ b/w32api/ChangeLog @@ -1,3 +1,14 @@ +2018-07-11 Keith Marshall <ke...@us...> + + Correct <wincrypt.h> typographic errors; fix issue [#38391] + + * include/wincrypt.h (CALG_TLS1PRF): Delete symbolic reference to... + (ALG_CLASS_DHASH): ...this; there is no such symbol; replace it with... + (ALG_CLASS_HASH): ...this, which represents the correct reference. + (struct _CRYPTOAPI_BLOB): Delete extraneous "typedef" keyword; this + struct definition is not directly associated with any type name. + (struct _SSL_EXTRA_CERT_CHAIN_POLICY_PARA): Likewise. + 2018-02-26 Keith Marshall <ke...@us...> Prepare and publish MinGW.org WSL-5.1 release. diff --git a/w32api/include/wincrypt.h b/w32api/include/wincrypt.h index c6085d4..708e3ac 100644 --- a/w32api/include/wincrypt.h +++ b/w32api/include/wincrypt.h @@ -6,7 +6,7 @@ * $Id$ * * Written by Anders Norlander <ano...@he...> - * Copyright (C) 1998-2000, 2002-2004, 2006-2008, 2010, 2015, + * Copyright (C) 1998-2000, 2002-2004, 2006-2008, 2010, 2015, 2018, * MinGW.org Project * * @@ -172,16 +172,16 @@ _BEGIN_C_DECLS #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_DESX (ALG_CLASS_DATA_ENCRYPT | ALG_TYPE_BLOCK | ALG_SID_DESX) #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 (ALG_CLASS_DATA_ENCRYPT | ALG_TYPE_BLOCK | ALG_SID_AES) #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 CALG_TLS1PRF (ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_TLS1PRF) /* dwFlags definitions for CryptAcquireContext */ @@ -827,7 +827,7 @@ typedef PVOID HCERTSTORE; typedef PVOID HCRYPTMSG; typedef PVOID HCERTCHAINENGINE; -typedef struct _CRYPTOAPI_BLOB +struct _CRYPTOAPI_BLOB { DWORD cbData; BYTE *pbData; }; @@ -845,7 +845,7 @@ typedef struct _CRYPTOAPI_BLOB CRYPT_DIGEST_BLOB, *PCRYPT_DIGEST_BLOB; typedef struct _CRYPTOAPI_BLOB CRYPT_DER_BLOB, *PCRYPT_DER_BLOB; typedef struct _CRYPTOAPI_BLOB CRYPT_ATTR_BLOB, *PCRYPT_ATTR_BLOB; -typedef struct _SSL_EXTRA_CERT_CHAIN_POLICY_PARA +struct _SSL_EXTRA_CERT_CHAIN_POLICY_PARA { /* not described in SDK; has the same layout as HTTPSPolicyCallbackData */ DWORD cbStruct; https://sf.net/p/mingw/mingw-org-wsl/ci/753e249cdb3480951addf1c33151922cdd09705f/ commit 753e249cdb3480951addf1c33151922cdd09705f Author: Keith Marshall <ke...@us...> Date: Mon Apr 16 15:53:36 2018 +0100 Suppress glob-brace expansion within quoted arguments. diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog index e108893..fe327f1 100644 --- a/mingwrt/ChangeLog +++ b/mingwrt/ChangeLog @@ -1,3 +1,10 @@ +2018-04-16 Keith Marshall <ke...@us...> + + Suppress glob-brace expansion within quoted arguments. + + * setargv.c (__mingw32_setargv) [quoted]: Handle '{', ',', and '}' + in the same manner as '*', and '?'. + 2018-04-16 Keith Marshall <ke...@us...> Suppress glob-brace expansion of single item lists. diff --git a/mingwrt/setargv.c b/mingwrt/setargv.c index 1b57f85..3ac119d 100644 --- a/mingwrt/setargv.c +++ b/mingwrt/setargv.c @@ -8,7 +8,7 @@ * $Id$ * * Written by Keith Marshall <kei...@us...> - * Copyright (C) 2014, 2017, MinGW.org Project + * Copyright (C) 2014, 2017, 2018, MinGW.org Project * * --------------------------------------------------------------------------- * @@ -143,9 +143,14 @@ void __mingw32_setargv( const char *cmdline ) */ bracket = (_CRT_glob & ARGV_NOGROUP) ? 0 : ARGV_NOGROUP; - case '*': - case '?': - /* These standard globbing tokens... + case '*': case '?': + /* These standard globbing tokens,... + */ + case '{': case ',': case '}': + /* ...this additional triplet, non-standard, but required + * to support GNU's GLOB_BRACE extension; (strictly we need + * to consider these only if GLOB_BRACE is enabled, but it + * should do no harm to consider them regardless),... */ case ARGV_ESCAPE: /* ...and the escape character itself, need to be escaped https://sf.net/p/mingw/mingw-org-wsl/ci/9d119ea4e3ff628cf3c4ed67944eac509a9e8347/ commit 9d119ea4e3ff628cf3c4ed67944eac509a9e8347 Author: Keith Marshall <ke...@us...> Date: Mon Apr 16 15:41:53 2018 +0100 Suppress glob-brace expansion of single item lists. diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog index 5c80702..e108893 100644 --- a/mingwrt/ChangeLog +++ b/mingwrt/ChangeLog @@ -1,3 +1,12 @@ +2018-04-16 Keith Marshall <ke...@us...> + + Suppress glob-brace expansion of single item lists. + + * mingwex/glob.c (glob_match) [c == '{']: Look-ahead to matching '}'; + ignore intervening nested '{' ... '}' expression groups, and suppress + special interpretation of '{' if '\0' encountered before '}' at outer + nesting level, or if no unescaped ',' found within outer expression. + 2018-02-26 Keith Marshall <ke...@us...> Prepare and publish MinGW.org WSL-5.1 release. diff --git a/mingwrt/mingwex/glob.c b/mingwrt/mingwex/glob.c index b51fdf0..2a6aea4 100644 --- a/mingwrt/mingwex/glob.c +++ b/mingwrt/mingwex/glob.c @@ -7,7 +7,7 @@ * $Id$ * * Written by Keith Marshall <kei...@us...> - * Copyright (C) 2011-2014, 2017, MinGW.org Project. + * Copyright (C) 2011-2014, 2017, 2018, MinGW.org Project. * * * Permission is hereby granted, free of charge, to any person obtaining a @@ -902,15 +902,96 @@ glob_match( const char *pattern, int flags, int (*errfn)(), glob_t *gl_buf ) */ if( *src != '\0') *dest++ = *src++; } - /* ...copying every character up to but excluding the - * opening brace of the first brace bounded expression - * (if any), or up to and including the NUL terminator - * otherwise... + if( (c = *src) == '{' ) + { + /* We've found the opening brace of a possible brace + * expansion; perform a look-ahead, to confirm that it + * is actually expandible, (i.e. its matching closing + * brace is present, and there is at least one comma + * separator at its initial nesting level). + */ + const char *scan = src; int level = 1, comma = ','; + do { + /* We already know that the first character in + * the look-ahead range is '{', so we start our + * look-ahead scan at the following character in + * level one, proceeding until we either find the + * corresponding '}', or we run out of scannable + * characters; in passing, note whether or not + * we find a comma separator at level one. + */ + switch( *++scan ) + { + /* While scanning, any further opening brace + * characters take us to one higher level of + * expression nesting, whereas closing braces + * bring us back to one lower level, until we + * ultimately drop out of level one. + */ + case '{': ++level; break; + case '}': --level; break; + + /* If we find a comma... + */ + case ',': + /* ...and it appears at expression nesting + * level one, we note that it is associated + * with an opening brace, (this doesn't imply + * character replacement; merely association, + * and at any other nesting level, we assign + * no significance to the comma). + */ + if( level == 1 ) comma = '{'; + break; + + /* If we run out of scannable characters, (i.e. + * we find a NUL terminator)... + */ + case '\0': + /* ...then the expression is malformed; drop + * any previously noted association for comma, + * and forcibly close all open nesting levels, + * so aborting the expression scan. + */ + comma = ','; level = 0; + break; + + /* Other than the above... + */ + default: + /* ...we must handle escapes for any of these + * special characters, while again taking care + * to avoid overrunning the NUL terminator. + */ + if( (*scan == glob_escape_char) && (scan[1] != '\0') ) + ++scan; + } + /* We continue this look-ahead until we either exit + * the level one scan naturally, (on detection of its + * closing '}'), or because we ran out of characters + * to scan, (i.e. we found a NUL terminator). + */ + } while( level > 0 ); + + /* In the event that we have found an opening brace, but + * no associated comma separator, (or worse, no matching + * closing brace), then our "comma" variable will reflect + * an unsuccessful expression validation; since it will + * otherwise have mapped an association to the opening + * brace, we can simply update "c" to match. + */ + c = comma; + } + /* In the event that we didn't find a well-formed brace + * expression, (including at least one comma separator at + * nesting level one), then we must simply store whatever + * character we did find at the current pattern offset... */ - if( (c = *src) != '{' ) *dest++ = *src++; + if( c != '{' ) *dest++ = *src++; /* * ...repeating until we either exhaust the original - * pattern, or we find an opening brace. + * pattern, or we do find an opening brace which does + * have an associated level one comma separator. */ } while( (c != '\0') && (c != '{') ); ----------------------------------------------------------------------- Summary of changes: mingwrt/ChangeLog | 16 ++++++++ mingwrt/mingwex/glob.c | 95 +++++++++++++++++++++++++++++++++++++++++++---- mingwrt/setargv.c | 13 +++++-- w32api/ChangeLog | 17 +++++++++ w32api/include/wincrypt.h | 14 ++++--- 5 files changed, 138 insertions(+), 17 deletions(-) hooks/post-receive -- Repository: mingw-org-wsl |
From: Keith M. <no...@so...> - 2018-02-26 19:26:24
|
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, 5.1-trunk has been updated via 596ddea2abd2b59694337842839fad974656e60f (commit) via 4924a14eed2d67a9a809944e035b89700279290c (commit) via 45cb48357e671918e7ddff8e5fc29588e42fc641 (commit) via c6a46d4a960a6c634c4dfc9a74ead56aa4270a19 (commit) from 2d24930930ca530a8b9e6b4fb892cf15562fce4a (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/596ddea2abd2b59694337842839fad974656e60f/ commit 596ddea2abd2b59694337842839fad974656e60f Author: Keith Marshall <ke...@us...> Date: Mon Feb 26 19:22:26 2018 +0000 Adjust repository version following WSL-5.1 release. diff --git a/ChangeLog b/ChangeLog index 90627d2..5b2f5fb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2018-02-26 Keith Marshall <ke...@us...> + Adjust repository version following WSL-5.1 release. + + * VERSION.m4 (__VERSION__): Increment it to 5.1.1 + +2018-02-26 Keith Marshall <ke...@us...> + Prepare and publish MinGW.org WSL-5.1 release. * All files (wsl-5.1-release): Tag assigned. diff --git a/VERSION.m4 b/VERSION.m4 index 2f2a53a..c7dd0bc 100644 --- a/VERSION.m4 +++ b/VERSION.m4 @@ -6,7 +6,7 @@ # assign a common version number to each of the mingwrt and w32api # MinGW System Library sub-packages. # -m4_define([__VERSION__],[5.1]) +m4_define([__VERSION__],[5.1.1]) # This is also a convenient place to specify the import library # associations, and DLLVERSION information for each DLL which may https://sf.net/p/mingw/mingw-org-wsl/ci/4924a14eed2d67a9a809944e035b89700279290c/ commit 4924a14eed2d67a9a809944e035b89700279290c Author: Keith Marshall <ke...@us...> Date: Mon Feb 26 18:52:57 2018 +0000 Added tag wsl-5.1-release for changeset 2b81c4eb9c59 diff --git a/.hgtags b/.hgtags index 56746d3..e717d8e 100644 --- a/.hgtags +++ b/.hgtags @@ -11,3 +11,4 @@ e92b7e85ef0890284b99d2c8243519f77457e2be mingwrt-3.22.4-release 44bf2b16d28510dd0857ac5a949171d33360973f wsl-5.0-release b44e016d9ea758327706bd9325d15c52e82400e8 wsl-5.0.1-release ce1ec977a1c0130e1729dd3dc26d3bc5193b439c wsl-5.0.2-release +2b81c4eb9c5977e7fc37e250dd1c6c97950d6ddf wsl-5.1-release https://sf.net/p/mingw/mingw-org-wsl/ci/45cb48357e671918e7ddff8e5fc29588e42fc641/ commit 45cb48357e671918e7ddff8e5fc29588e42fc641 Author: Keith Marshall <ke...@us...> Date: Mon Feb 26 18:52:43 2018 +0000 Prepare and publish MinGW.org WSL-5.1 release. diff --git a/ChangeLog b/ChangeLog index 9baa042..90627d2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2018-02-26 Keith Marshall <ke...@us...> + + Prepare and publish MinGW.org WSL-5.1 release. + + * All files (wsl-5.1-release): Tag assigned. + * VERSION.m4 (libmingwex.dll.a): Update ABI version identifier. + 2017-12-06 Keith Marshall <ke...@us...> Adjust repository version following WSL-5.0.2 release. diff --git a/VERSION.m4 b/VERSION.m4 index dcef900..2f2a53a 100644 --- a/VERSION.m4 +++ b/VERSION.m4 @@ -23,7 +23,7 @@ m4_define([__VERSION__],[5.1]) # as required, in accordance with libtool conventions. # m4_define([MINGW_AC_ENUMERATE_DLLVERSION_SPECS],dnl -[MINGW_AC_SET_DLLVERSION([LIBMINGWEX], [libmingwex.dll.a], [0:0:0])dnl +[MINGW_AC_SET_DLLVERSION([LIBMINGWEX], [libmingwex.dll.a], [1:0:1])dnl ]) # $RCSfile$: end of file diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog index a4a2777..5c80702 100644 --- a/mingwrt/ChangeLog +++ b/mingwrt/ChangeLog @@ -1,3 +1,9 @@ +2018-02-26 Keith Marshall <ke...@us...> + + Prepare and publish MinGW.org WSL-5.1 release. + + * All files (wsl-5.1-release): Tag assigned. + 2018-02-22 Keith Marshall <ke...@us...> Correct <sys/timeb.h> 32-bit vs. 64-bit time_t anomalies. diff --git a/w32api/ChangeLog b/w32api/ChangeLog index 86cb672..e973b39 100644 --- a/w32api/ChangeLog +++ b/w32api/ChangeLog @@ -1,3 +1,9 @@ +2018-02-26 Keith Marshall <ke...@us...> + + Prepare and publish MinGW.org WSL-5.1 release. + + * All files (wsl-5.1-release): Tag assigned. + 2018-02-24 Keith Marshall <ke...@us...> Make <iptypes.h> header effectively self-contained. https://sf.net/p/mingw/mingw-org-wsl/ci/c6a46d4a960a6c634c4dfc9a74ead56aa4270a19/ commit c6a46d4a960a6c634c4dfc9a74ead56aa4270a19 Author: Keith Marshall <ke...@us...> Date: Sat Feb 24 15:41:13 2018 +0000 Make <iptypes.h> header effectively self-contained. diff --git a/w32api/ChangeLog b/w32api/ChangeLog index eefa43d..86cb672 100644 --- a/w32api/ChangeLog +++ b/w32api/ChangeLog @@ -1,3 +1,18 @@ +2018-02-24 Keith Marshall <ke...@us...> + + Make <iptypes.h> header effectively self-contained. + + * include/iptypes.h: Assert copyright; tidy layout. + Include <windef.h>; it is required for self-containment. + (__need_time_t): Define for selective inclusion of <sys/types.h> + (_BEGIN_C_DECLS, _END_C_DECLS): Use them as appropriate. + (_WIN32_WINNT): Always compare it symbolically. + (__dhcp_time_t): New temporary data type macro; define it... + [_WIN64]: ...as equivalent to __time64_t, otherwise... + [!_WIN64]: ...equivalent to __time32_t, and then... + (struct _IP_ADAPTER_INFO): ...use it as the data type for... + (LeaseObtained, LeaseExpires): ...these fields. + 2017-12-20 Keith Marshall <ke...@us...> Make <winreg.h> header effectively self-contained. diff --git a/w32api/include/iptypes.h b/w32api/include/iptypes.h index df281e6..14257d7 100644 --- a/w32api/include/iptypes.h +++ b/w32api/include/iptypes.h @@ -1,91 +1,152 @@ +/* + * iptypes.h + * + * Internet Protocol Type Definitions and Manifest Constants + * + * + * $Id$ + * + * Written by Corinna Vinschen <co...@vi...> + * Copyright (C) 2000-2002, 2006, 2018, 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 _IPTYPES_H -#define _IPTYPES_H -#if __GNUC__ >= 3 #pragma GCC system_header -#endif +#define _IPTYPES_H +#include <windef.h> +#define __need_time_t 1 #include <sys/types.h> -#ifdef __cplusplus -extern "C" { -#endif +#undef __need_time_t + +_BEGIN_C_DECLS + +#define DEFAULT_MINIMUM_ENTITIES 32 + +#define MAX_ADAPTER_ADDRESS_LENGTH 8 +#define MAX_ADAPTER_DESCRIPTION_LENGTH 128 +#define MAX_ADAPTER_NAME_LENGTH 256 +#define MAX_DOMAIN_NAME_LEN 128 +#define MAX_HOSTNAME_LEN 128 +#define MAX_SCOPE_ID_LEN 256 + +#define BROADCAST_NODETYPE 1 +#define PEER_TO_PEER_NODETYPE 2 +#define MIXED_NODETYPE 4 +#define HYBRID_NODETYPE 8 +#define IF_OTHER_ADAPTERTYPE 0 +#define IF_ETHERNET_ADAPTERTYPE 1 +#define IF_TOKEN_RING_ADAPTERTYPE 2 +#define IF_FDDI_ADAPTERTYPE 3 +#define IF_PPP_ADAPTERTYPE 4 +#define IF_LOOPBACK_ADAPTERTYPE 5 -#define DEFAULT_MINIMUM_ENTITIES 32 -#define MAX_ADAPTER_ADDRESS_LENGTH 8 -#define MAX_ADAPTER_DESCRIPTION_LENGTH 128 -#define MAX_ADAPTER_NAME_LENGTH 256 -#define MAX_DOMAIN_NAME_LEN 128 -#define MAX_HOSTNAME_LEN 128 -#define MAX_SCOPE_ID_LEN 256 -#define BROADCAST_NODETYPE 1 -#define PEER_TO_PEER_NODETYPE 2 -#define MIXED_NODETYPE 4 -#define HYBRID_NODETYPE 8 -#define IF_OTHER_ADAPTERTYPE 0 -#define IF_ETHERNET_ADAPTERTYPE 1 -#define IF_TOKEN_RING_ADAPTERTYPE 2 -#define IF_FDDI_ADAPTERTYPE 3 -#define IF_PPP_ADAPTERTYPE 4 -#define IF_LOOPBACK_ADAPTERTYPE 5 -#if (_WIN32_WINNT >= 0x0501) -#define IP_ADAPTER_DDNS_ENABLED 0x00000001 -#define IP_ADAPTER_REGISTER_ADAPTER_SUFFIX 0x00000002 -#define IP_ADAPTER_DHCP_ENABLED 0x00000004 -#define IP_ADAPTER_RECEIVE_ONLY 0x00000008 -#define IP_ADAPTER_NO_MULTICAST 0x00000010 -#define IP_ADAPTER_IPV6_OTHER_STATEFUL_CONFIG 0x00000020 -#define IP_ADAPTER_ADDRESS_DNS_ELIGIBLE 0x00000001 -#define IP_ADAPTER_ADDRESS_TRANSIENT 0x00000002 +#if _WIN32_WINNT >= _WIN32_WINNT_WINXP +#define IP_ADAPTER_DDNS_ENABLED 0x00000001 +#define IP_ADAPTER_REGISTER_ADAPTER_SUFFIX 0x00000002 +#define IP_ADAPTER_DHCP_ENABLED 0x00000004 +#define IP_ADAPTER_RECEIVE_ONLY 0x00000008 +#define IP_ADAPTER_NO_MULTICAST 0x00000010 +#define IP_ADAPTER_IPV6_OTHER_STATEFUL_CONFIG 0x00000020 +#define IP_ADAPTER_ADDRESS_DNS_ELIGIBLE 0x00000001 +#define IP_ADAPTER_ADDRESS_TRANSIENT 0x00000002 #endif -typedef struct { - char String[16]; -} IP_ADDRESS_STRING, *PIP_ADDRESS_STRING, IP_MASK_STRING, *PIP_MASK_STRING; -typedef struct _IP_ADDR_STRING { - struct _IP_ADDR_STRING* Next; - IP_ADDRESS_STRING IpAddress; - IP_MASK_STRING IpMask; - DWORD Context; +typedef struct { char String[16]; } +IP_ADDRESS_STRING, *PIP_ADDRESS_STRING, IP_MASK_STRING, *PIP_MASK_STRING; + +typedef struct _IP_ADDR_STRING +{ struct _IP_ADDR_STRING *Next; + IP_ADDRESS_STRING IpAddress; + IP_MASK_STRING IpMask; + DWORD Context; } IP_ADDR_STRING, *PIP_ADDR_STRING; -typedef struct _IP_ADAPTER_INFO { - struct _IP_ADAPTER_INFO* Next; - DWORD ComboIndex; - char AdapterName[MAX_ADAPTER_NAME_LENGTH+4]; - char Description[MAX_ADAPTER_DESCRIPTION_LENGTH+4]; - UINT AddressLength; - BYTE Address[MAX_ADAPTER_ADDRESS_LENGTH]; - DWORD Index; - UINT Type; - UINT DhcpEnabled; - PIP_ADDR_STRING CurrentIpAddress; - IP_ADDR_STRING IpAddressList; - IP_ADDR_STRING GatewayList; - IP_ADDR_STRING DhcpServer; - BOOL HaveWins; - IP_ADDR_STRING PrimaryWinsServer; - IP_ADDR_STRING SecondaryWinsServer; - time_t LeaseObtained; - time_t LeaseExpires; + +typedef struct _IP_ADAPTER_INFO +/* This structure includes a pair of fields, which are declared, according to + * https://msdn.microsoft.com/en-us/library/windows/desktop/aa366062(v=vs.85).aspx + * as being of type time_t, yet they MUST be equivalent to __time32_t on 32-bit + * versions or MS-Windows, and to __time64_t on 64-bit versions. Since VS-2005, + * Microsoft have made the definition of time_t ambiguous, on 32-bit Windows, + * and have placed the onus on users to specify _USE_32_BIT_TIME_T in any + * translation unit which uses this structure, to resolve the ambiguity; + * WE can do better... + */ +#undef __dhcp_time_t +#ifdef _WIN64 +/* ...by introducing a local type replacement macro, to ensure that the + * field definitions become unequivocally 64-bit on Win64... + */ +# define __dhcp_time_t __time64_t +#else +/* ...and 32-bit, on Win32. + */ +# define __dhcp_time_t __time32_t +#endif +{ struct _IP_ADAPTER_INFO *Next; + DWORD ComboIndex; + char AdapterName[MAX_ADAPTER_NAME_LENGTH + 4]; + char Description[MAX_ADAPTER_DESCRIPTION_LENGTH + 4]; + UINT AddressLength; + BYTE Address[MAX_ADAPTER_ADDRESS_LENGTH]; + DWORD Index; + UINT Type; + UINT DhcpEnabled; + PIP_ADDR_STRING CurrentIpAddress; + IP_ADDR_STRING IpAddressList; + IP_ADDR_STRING GatewayList; + IP_ADDR_STRING DhcpServer; + BOOL HaveWins; + IP_ADDR_STRING PrimaryWinsServer; + IP_ADDR_STRING SecondaryWinsServer; + __dhcp_time_t LeaseObtained; + __dhcp_time_t LeaseExpires; } IP_ADAPTER_INFO, *PIP_ADAPTER_INFO; -typedef struct _IP_PER_ADAPTER_INFO { - UINT AutoconfigEnabled; - UINT AutoconfigActive; - PIP_ADDR_STRING CurrentDnsServer; - IP_ADDR_STRING DnsServerList; +#undef __dhcp_time_t + +typedef struct _IP_PER_ADAPTER_INFO +{ UINT AutoconfigEnabled; + UINT AutoconfigActive; + PIP_ADDR_STRING CurrentDnsServer; + IP_ADDR_STRING DnsServerList; } IP_PER_ADAPTER_INFO, *PIP_PER_ADAPTER_INFO; -typedef struct _FIXED_INFO { - char HostName[MAX_HOSTNAME_LEN+4] ; - char DomainName[MAX_DOMAIN_NAME_LEN+4]; - PIP_ADDR_STRING CurrentDnsServer; - IP_ADDR_STRING DnsServerList; - UINT NodeType; - char ScopeId[MAX_SCOPE_ID_LEN+4]; - UINT EnableRouting; - UINT EnableProxy; - UINT EnableDns; + +typedef struct _FIXED_INFO +{ char HostName[MAX_HOSTNAME_LEN + 4] ; + char DomainName[MAX_DOMAIN_NAME_LEN + 4]; + PIP_ADDR_STRING CurrentDnsServer; + IP_ADDR_STRING DnsServerList; + UINT NodeType; + char ScopeId[MAX_SCOPE_ID_LEN + 4]; + UINT EnableRouting; + UINT EnableProxy; + UINT EnableDns; } FIXED_INFO, *PFIXED_INFO; -#if (_WIN32_WINNT >= 0x0501) && defined(_WINSOCK2_H) -typedef enum { - IfOperStatusUp = 1, + +#if (_WIN32_WINNT >= _WIN32_WINNT_WINXP) && defined _WINSOCK2_H + +typedef enum +{ IfOperStatusUp = 1, IfOperStatusDown, IfOperStatusTesting, IfOperStatusUnknown, @@ -93,137 +154,148 @@ typedef enum { IfOperStatusNotPresent, IfOperStatusLowerLayerDown } IF_OPER_STATUS; -typedef enum { - IpDadStateInvalid = 0, + +typedef enum +{ IpDadStateInvalid = 0, IpDadStateTentative, IpDadStateDuplicate, IpDadStateDeprecated, IpDadStatePreferred } IP_DAD_STATE; -typedef enum { - IpPrefixOriginOther = 0, + +typedef enum +{ IpPrefixOriginOther = 0, IpPrefixOriginManual, IpPrefixOriginWellKnown, IpPrefixOriginDhcp, IpPrefixOriginRouterAdvertisement } IP_PREFIX_ORIGIN; -typedef enum { - IpSuffixOriginOther = 0, + +typedef enum +{ IpSuffixOriginOther = 0, IpSuffixOriginManual, IpSuffixOriginWellKnown, IpSuffixOriginDhcp, IpSuffixOriginLinkLayerAddress, IpSuffixOriginRandom } IP_SUFFIX_ORIGIN; -typedef enum { - ScopeLevelInterface = 1, - ScopeLevelLink = 2, - ScopeLevelSubnet = 3, - ScopeLevelAdmin = 4, - ScopeLevelSite = 5, - ScopeLevelOrganization = 8, - ScopeLevelGlobal = 14 + +typedef enum +{ ScopeLevelInterface = 1, + ScopeLevelLink = 2, + ScopeLevelSubnet = 3, + ScopeLevelAdmin = 4, + ScopeLevelSite = 5, + ScopeLevelOrganization = 8, + ScopeLevelGlobal = 14 } SCOPE_LEVEL; -typedef struct { - ULONG Index; - ULONG MediaType; - UCHAR ConnectionType; - UCHAR AccessType; - GUID DeviceGuid; - GUID InterfaceGuid; -} IP_INTERFACE_NAME_INFO,*PIP_INTERFACE_NAME_INFO; -typedef struct _IP_ADAPTER_ANYCAST_ADDRESS { - _ANONYMOUS_UNION union { - ULONGLONG Alignment; - _ANONYMOUS_STRUCT struct { - ULONG Length; - DWORD Flags; - } DUMMYSTRUCTNAME; - } DUMMYUNIONNAME; - struct _IP_ADAPTER_ANYCAST_ADDRESS* Next; - SOCKET_ADDRESS Address; -} IP_ADAPTER_ANYCAST_ADDRESS,*PIP_ADAPTER_ANYCAST_ADDRESS; -typedef struct _IP_ADAPTER_MULTICAST_ADDRESS { - _ANONYMOUS_UNION union { - ULONGLONG Alignment; - _ANONYMOUS_STRUCT struct { - ULONG Length; - DWORD Flags; - } DUMMYSTRUCTNAME; - } DUMMYUNIONNAME; - struct _IP_ADAPTER_MULTICAST_ADDRESS* Next; - SOCKET_ADDRESS Address; -} IP_ADAPTER_MULTICAST_ADDRESS,*PIP_ADAPTER_MULTICAST_ADDRESS; -typedef struct _IP_ADAPTER_UNICAST_ADDRESS { - _ANONYMOUS_UNION union { - ULONGLONG Alignment; - _ANONYMOUS_STRUCT struct { - ULONG Length; - DWORD Flags; - } DUMMYSTRUCTNAME; - } DUMMYUNIONNAME; - struct _IP_ADAPTER_UNICAST_ADDRESS* Next; - SOCKET_ADDRESS Address; - IP_PREFIX_ORIGIN PrefixOrigin; - IP_SUFFIX_ORIGIN SuffixOrigin; - IP_DAD_STATE DadState; - ULONG ValidLifetime; - ULONG PreferredLifetime; - ULONG LeaseLifetime; -} IP_ADAPTER_UNICAST_ADDRESS,*PIP_ADAPTER_UNICAST_ADDRESS; -typedef struct _IP_ADAPTER_DNS_SERVER_ADDRESS { - _ANONYMOUS_UNION union { - ULONGLONG Alignment; - _ANONYMOUS_STRUCT struct { - ULONG Length; - DWORD Reserved; - } DUMMYSTRUCTNAME; - } DUMMYUNIONNAME; - struct _IP_ADAPTER_DNS_SERVER_ADDRESS* Next; - SOCKET_ADDRESS Address; -} IP_ADAPTER_DNS_SERVER_ADDRESS,*PIP_ADAPTER_DNS_SERVER_ADDRESS; -typedef struct _IP_ADAPTER_PREFIX { - _ANONYMOUS_UNION union { - ULONGLONG Alignment; - _ANONYMOUS_STRUCT struct { - ULONG Length; - DWORD Flags; - } DUMMYSTRUCTNAME; - } DUMMYUNIONNAME; - struct _IP_ADAPTER_PREFIX* Next; - SOCKET_ADDRESS Address; - ULONG PrefixLength; -} IP_ADAPTER_PREFIX,*PIP_ADAPTER_PREFIX; -typedef struct _IP_ADAPTER_ADDRESSES { - _ANONYMOUS_UNION union { - ULONGLONG Alignment; - _ANONYMOUS_STRUCT struct { - ULONG Length; - DWORD IfIndex; - } DUMMYSTRUCTNAME; - } DUMMYUNIONNAME; - struct _IP_ADAPTER_ADDRESSES* Next; - PCHAR AdapterName; - PIP_ADAPTER_UNICAST_ADDRESS FirstUnicastAddress; - PIP_ADAPTER_ANYCAST_ADDRESS FirstAnycastAddress; - PIP_ADAPTER_MULTICAST_ADDRESS FirstMulticastAddress; - PIP_ADAPTER_DNS_SERVER_ADDRESS FirstDnsServerAddress; - PWCHAR DnsSuffix; - PWCHAR Description; - PWCHAR FriendlyName; - BYTE PhysicalAddress[MAX_ADAPTER_ADDRESS_LENGTH]; - DWORD PhysicalAddressLength; - DWORD Flags; - DWORD Mtu; - DWORD IfType; - IF_OPER_STATUS OperStatus; - DWORD Ipv6IfIndex; - DWORD ZoneIndices[16]; - PIP_ADAPTER_PREFIX FirstPrefix; -} IP_ADAPTER_ADDRESSES,*PIP_ADAPTER_ADDRESSES; -#endif -#ifdef __cplusplus -} -#endif -#endif /* _IPTYPES_H */ +typedef struct +{ ULONG Index; + ULONG MediaType; + UCHAR ConnectionType; + UCHAR AccessType; + GUID DeviceGuid; + GUID InterfaceGuid; +} IP_INTERFACE_NAME_INFO, *PIP_INTERFACE_NAME_INFO; + +typedef struct _IP_ADAPTER_ANYCAST_ADDRESS +{ _ANONYMOUS_UNION union + { ULONGLONG Alignment; + _ANONYMOUS_STRUCT struct + { ULONG Length; + DWORD Flags; + } DUMMYSTRUCTNAME; + } DUMMYUNIONNAME; + struct _IP_ADAPTER_ANYCAST_ADDRESS *Next; + SOCKET_ADDRESS Address; +} IP_ADAPTER_ANYCAST_ADDRESS, *PIP_ADAPTER_ANYCAST_ADDRESS; + +typedef struct _IP_ADAPTER_MULTICAST_ADDRESS +{ _ANONYMOUS_UNION union + { ULONGLONG Alignment; + _ANONYMOUS_STRUCT struct + { ULONG Length; + DWORD Flags; + } DUMMYSTRUCTNAME; + } DUMMYUNIONNAME; + struct _IP_ADAPTER_MULTICAST_ADDRESS *Next; + SOCKET_ADDRESS Address; +} IP_ADAPTER_MULTICAST_ADDRESS, *PIP_ADAPTER_MULTICAST_ADDRESS; + +typedef struct _IP_ADAPTER_UNICAST_ADDRESS +{ _ANONYMOUS_UNION union + { ULONGLONG Alignment; + _ANONYMOUS_STRUCT struct + { ULONG Length; + DWORD Flags; + } DUMMYSTRUCTNAME; + } DUMMYUNIONNAME; + struct _IP_ADAPTER_UNICAST_ADDRESS *Next; + SOCKET_ADDRESS Address; + IP_PREFIX_ORIGIN PrefixOrigin; + IP_SUFFIX_ORIGIN SuffixOrigin; + IP_DAD_STATE DadState; + ULONG ValidLifetime; + ULONG PreferredLifetime; + ULONG LeaseLifetime; +} IP_ADAPTER_UNICAST_ADDRESS, *PIP_ADAPTER_UNICAST_ADDRESS; + +typedef struct _IP_ADAPTER_DNS_SERVER_ADDRESS +{ _ANONYMOUS_UNION union + { ULONGLONG Alignment; + _ANONYMOUS_STRUCT struct + { ULONG Length; + DWORD Reserved; + } DUMMYSTRUCTNAME; + } DUMMYUNIONNAME; + struct _IP_ADAPTER_DNS_SERVER_ADDRESS *Next; + SOCKET_ADDRESS Address; +} IP_ADAPTER_DNS_SERVER_ADDRESS, *PIP_ADAPTER_DNS_SERVER_ADDRESS; + +typedef struct _IP_ADAPTER_PREFIX +{ _ANONYMOUS_UNION union + { ULONGLONG Alignment; + _ANONYMOUS_STRUCT struct + { ULONG Length; + DWORD Flags; + } DUMMYSTRUCTNAME; + } DUMMYUNIONNAME; + struct _IP_ADAPTER_PREFIX *Next; + SOCKET_ADDRESS Address; + ULONG PrefixLength; +} IP_ADAPTER_PREFIX, *PIP_ADAPTER_PREFIX; + +typedef struct _IP_ADAPTER_ADDRESSES +{ _ANONYMOUS_UNION union + { ULONGLONG Alignment; + _ANONYMOUS_STRUCT struct + { ULONG Length; + DWORD IfIndex; + } DUMMYSTRUCTNAME; + } DUMMYUNIONNAME; + struct _IP_ADAPTER_ADDRESSES *Next; + PCHAR AdapterName; + PIP_ADAPTER_UNICAST_ADDRESS FirstUnicastAddress; + PIP_ADAPTER_ANYCAST_ADDRESS FirstAnycastAddress; + PIP_ADAPTER_MULTICAST_ADDRESS FirstMulticastAddress; + PIP_ADAPTER_DNS_SERVER_ADDRESS FirstDnsServerAddress; + PWCHAR DnsSuffix; + PWCHAR Description; + PWCHAR FriendlyName; + BYTE PhysicalAddress[MAX_ADAPTER_ADDRESS_LENGTH]; + DWORD PhysicalAddressLength; + DWORD Flags; + DWORD Mtu; + DWORD IfType; + IF_OPER_STATUS OperStatus; + DWORD Ipv6IfIndex; + DWORD ZoneIndices[16]; + PIP_ADAPTER_PREFIX FirstPrefix; +} IP_ADAPTER_ADDRESSES, *PIP_ADAPTER_ADDRESSES; + +#endif /* WinXP && _WINSOCK2_H */ + +_END_C_DECLS + +#endif /* !_IPTYPES_H: $RCSfile$: end of file */ ----------------------------------------------------------------------- Summary of changes: .hgtags | 1 + ChangeLog | 13 ++ VERSION.m4 | 4 +- mingwrt/ChangeLog | 6 + w32api/ChangeLog | 21 +++ w32api/include/iptypes.h | 458 +++++++++++++++++++++++++++-------------------- 6 files changed, 308 insertions(+), 195 deletions(-) hooks/post-receive -- Repository: mingw-org-wsl |
From: Keith M. <no...@so...> - 2018-02-26 19:26:20
|
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 tag, wsl-5.1-release has been created at 45cb48357e671918e7ddff8e5fc29588e42fc641 (commit) - Log ----------------------------------------------------------------- commit 45cb48357e671918e7ddff8e5fc29588e42fc641 Author: Keith Marshall <ke...@us...> Date: Mon Feb 26 18:52:43 2018 +0000 Prepare and publish MinGW.org WSL-5.1 release. ----------------------------------------------------------------------- hooks/post-receive -- Repository: mingw-org-wsl |
From: Keith M. <no...@so...> - 2018-02-23 22:40:16
|
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, 5.1-trunk has been updated via 2d24930930ca530a8b9e6b4fb892cf15562fce4a (commit) via b0a6e63e896cf28447d2312375976bf111cbc100 (commit) from 5abede16dd604548bd822293335c58f0bf91fb1e (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/2d24930930ca530a8b9e6b4fb892cf15562fce4a/ commit 2d24930930ca530a8b9e6b4fb892cf15562fce4a Author: Keith Marshall <ke...@us...> Date: Fri Feb 23 19:51:52 2018 +0000 Correct <sys/timeb.h> 32-bit vs. 64-bit time_t anomalies. diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog index ab5367c..a4a2777 100644 --- a/mingwrt/ChangeLog +++ b/mingwrt/ChangeLog @@ -1,5 +1,33 @@ 2018-02-22 Keith Marshall <ke...@us...> + Correct <sys/timeb.h> 32-bit vs. 64-bit time_t anomalies. + + * include/sys/timeb.h: Assert copyright; tidy layout. + (_TIMEB_H_): Original multiple inclusion guard macro; rename it... + (_SYS_TIMEB_H): ...conforming to this preferred naming convention. + (GCC system_header): Add pragma, asserting it as such a header. + (__need_time_t): Define for selective <sys/types.h> inclusion. + (_BEGIN_C_DECLS, _END_C_DECLS): Use them as appropriate. + (pragma pack): Push to pack all structs with 2-byte alignment. + (struct timeb): Mark as deprecated, from POSIX.1-2001 onwards. + (ftime): Likewise, mark as deprecated; always emulate it by in-line + redirection to _ftime(), however this may be implemented. + (struct __timeb32): Make its definition unconditionally visible. + (_ftime32) [__MSVCRT_VERSION__ >= __MSVCR80_DLL]: Declare prototype. + (_ftime32) [_WIN64 || _WIN32_WINNT >= _WIN32_WINNT_VISTA]: Likewise, + otherwise emulate it by in-line redirection to 32-bit _ftime(). + (struct __timeb64, _ftime64): Make visibility condition symbolic... + [__MSVCRT_VERSION__ >= __MSVCR61_DLL]: ...thus; add visibility for... + [_WIN64 || _WIN32_WINNT >= _WIN32_WINNT_WIN2K]: ...these alternatives. + (_ftime) [__MSVCRT_VERSION__ < __MSVCR80_DLL]: Declare prototype. + (_ftime) [__MSVCRT_VERSION__ >= __MSVCR80_DLL]: Emulate it... + [_USE_32BIT_TIME_T]: ...by in-line redirection to _ftime32(), else... + [!_USE_32BIT_TIME_T]: ...to _ftime64(). + + * tests/headers.at [sys/timeb.h]: Suppress "deprecated" warnings. + +2018-02-22 Keith Marshall <ke...@us...> + Correct Windows version support for <utime.h> functions. * include/sys/utime.h: Tidy layout; assert copyright. diff --git a/mingwrt/include/sys/timeb.h b/mingwrt/include/sys/timeb.h index 5287e49..36ac9d5 100644 --- a/mingwrt/include/sys/timeb.h +++ b/mingwrt/include/sys/timeb.h @@ -1,97 +1,175 @@ /* - * timeb.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. + * sys/timeb.h * - * Support for the UNIX System V ftime system call. + * Support for the UNIX System V ftime() system call, and its various + * Microsoft counterparts. + * + * + * $Id$ + * + * Written by Colin Peters <co...@bi...> + * Copyright (C) 1997-2001, 2003, 2004, 2007, 2018, 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 _SYS_TIMEB_H +#pragma GCC system_header +#define _SYS_TIMEB_H -#ifndef _TIMEB_H_ -#define _TIMEB_H_ - -/* All the headers include this file. */ #include <_mingw.h> +#define __need_time_t 1 #include <sys/types.h> +#undef __need_time_t -#ifndef RC_INVOKED +#ifndef RC_INVOKED -/* - * TODO: Structure not tested. +/* Tests conducted on 32-bit Win7 indicate that all timeb structs, + * on Win32 hosts, are packed with 2-byte alignment. + * + * FIXME: Is this also true for Win64 hosts? + */ +#pragma pack( push, 2 ) + +#ifndef _NO_OLDNAMES +/* This is the standard POSIX/Unix System V API declaration; this + * API was declared as deprecated in POSIX.1-2001, and subsequently + * deleted from POSIX.1-2008 onwards. + */ +struct __POSIX_2001_DEPRECATED timeb +{ time_t time; + short millitm; + short timezone; + short dstflag; +}; +#endif +/* Microsoft's equivalent of the above uses their typically ugly + * underscore decorated name; in common with the POSIX variant, it + * is susceptible to bugs resulting from time_t ambiguity, which + * is endemic within non-free MSVCR80.DLL and later. */ struct _timeb -{ - time_t time; - short millitm; - short timezone; - short dstflag; +{ time_t time; + short millitm; + short timezone; + short dstflag; }; -#if __MSVCRT_VERSION__ >= 0x0800 -/* - * TODO: Structure not tested. +/* To avoid time_t ambiguity, the following is equivalent to struct + * _timeb, with explicitly 32-bit time_t; strictly, Microsoft didn't + * support this, on 32-bit Windows, until non-free MSVCR80.DLL, or + * universally from Win-Vista onwards; we make it unconditionally + * available, and back-port its associated _ftime32() function + * for use on legacy Win32 hosts. */ struct __timeb32 -{ - __time32_t time; - short millitm; - short timezone; - short dstflag; +{ __time32_t time; + short millitm; + short timezone; + short dstflag; }; -#endif /* __MSVCRT_VERSION__ >= 0x0800 */ -#ifndef _NO_OLDNAMES -/* - * TODO: Structure not tested. +#pragma pack( pop ) + +_BEGIN_C_DECLS + +#if defined _WIN64 /* Always supported on Win64; otherwise... */ \ + || __MSVCRT_VERSION__ >= __MSVCR61_DLL || _WIN32_WINNT >= _WIN32_WINNT_WIN2K +/* The _ftime64() function, and its associated struct __timeb64 data type, were + * first introduced in the non-free MSVCR61.DLL runtime, and subsequently, they + * were retrofitted to MSVCRT.DLL from Win2K onwards. */ -struct timeb -{ - time_t time; - short millitm; - short timezone; - short dstflag; +#pragma pack( push, 2 ) + +struct __timeb64 +{ __time64_t time; + short millitm; + short timezone; + short dstflag; }; -#endif -#ifdef __cplusplus -extern "C" { -#endif +#pragma pack( pop ) -/* TODO: Not tested. */ -_CRTIMP void __cdecl __MINGW_NOTHROW _ftime (struct _timeb*); +_CRTIMP __cdecl __MINGW_NOTHROW void _ftime64 (struct __timeb64 *); -#ifndef _NO_OLDNAMES -/* FIXME for __MSVCRT_VERSION__ >= 0x0800 */ -_CRTIMP void __cdecl __MINGW_NOTHROW ftime (struct timeb*); -#endif /* Not _NO_OLDNAMES */ +#endif /* _WIN64 || __MSVCR61_DLL || _WIN32_WINNT_WIN2K and later */ -/* This requires newer versions of msvcrt.dll (6.10 or higher). */ -#if __MSVCRT_VERSION__ >= 0x0601 -struct __timeb64 -{ - __time64_t time; - short millitm; - short timezone; - short dstflag; -}; +#if __MSVCRT_VERSION__ < __MSVCR80_DLL +/* Non-free MSVCR80.DLL, and later, don't povide _ftime() directly; + * (it must be emulated); when NOT using any of these non-free DLLs, + * we may import it from MSVCRT.DLL + */ +_CRTIMP __cdecl __MINGW_NOTHROW void _ftime (struct _timeb *); +#endif /* !__MSVCR80_DLL or later */ + +#if defined _WIN64 /* Also always supported on Win64, but... */ \ + || __MSVCRT_VERSION__ >= __MSVCR80_DLL || _WIN32_WINNT >= _WIN32_WINNT_VISTA +/* Conversely, the complementary _ftime32() function, and its associated struct + * __timeb32 data type, were not introduced until non-free MSVCR80.DLL runtime, + * nor retrofitted to MSVCRT.DLL until Win-Vista onwards. + */ +_CRTIMP __cdecl __MINGW_NOTHROW void _ftime32 (struct __timeb32 *); -_CRTIMP void __cdecl __MINGW_NOTHROW _ftime64 (struct __timeb64*); -#endif /* __MSVCRT_VERSION__ >= 0x0601 */ +#else /* !(_WIN64 || __MSVCR80_DLL || _WIN32_WINNT_VISTA and later) */ +/* This is a legacy _WIN32 system, pre-Win-Vista, and NOT using MSVCR80.DLL, + * or later; it is convenient for us to emulate _ftime32(), by the expedient + * of mapping it to the legacy 32-bit _ftime() implementation. + */ +__CRT_ALIAS __cdecl __MINGW_NOTHROW +void _ftime32 (struct __timeb32 *__t) {_ftime ((struct _timeb *)(__t));} -#if __MSVCRT_VERSION__ >= 0x0800 -_CRTIMP void __cdecl __MINGW_NOTHROW _ftime32 (struct __timeb32*); -#ifndef _USE_32BIT_TIME_T -_CRTALIAS void __cdecl __MINGW_NOTHROW _ftime (struct _timeb* _v) { return(_ftime64 ((struct __timeb64*)_v)); } -#else -_CRTALIAS void __cdecl __MINGW_NOTHROW _ftime (struct _timeb* _v) { return(_ftime32 ((struct __timeb32*)_v)); } -#endif -#endif /* __MSVCRT_VERSION__ >= 0x0800 */ +#endif /* !(_WIN64 || __MSVCR80_DLL || _WIN32_WINNT_VISTA and later) */ -#ifdef __cplusplus -} -#endif +#if __MSVCRT_VERSION__ >= __MSVCR80_DLL +/* When linking with any non-free runtime, from MSVCR80.DLL onwards, + * we must emulate _ftime(), by redirection to either _ftime32(), or + * _ftime64(), depending on (error prone) user feature selection... + */ +# ifdef _USE_32BIT_TIME_T + /* ...of an API with an explicitly 32-bit time_t... + */ +__CRT_ALIAS __cdecl __MINGW_NOTHROW +void _ftime (struct _timeb * __t) {_ftime32 ((struct __timeb32*)__t);} + +# else + /* ...or the Microsoft default, (incompatible with 32-bit MSVCRT.DLL, + * and not consistently implemented within all 32-bit WinAPI modules), + * 64-bit time_t + */ +__CRT_ALIAS __cdecl __MINGW_NOTHROW +void _ftime (struct _timeb * __t) {_ftime64 ((struct __timeb64*)__t);} + +# endif /* !_USE_32BIT_TIME_T */ +#endif /* __MSVCR80_DLL and later */ + +#ifndef _NO_OLDNAMES +/* Regardless of how the _ftime() function may be implemented, we provide + * the deprecated POSIX.1 equivalent API, by in-line mapping of the ftime() + * function to that _ftime() implementation. + */ +__CRT_ALIAS __cdecl __MINGW_NOTHROW __POSIX_2001_DEPRECATED +void ftime (struct timeb *__t) {_ftime ((struct _timeb *)(__t)); } +#endif /* !_NO_OLDNAMES */ -#endif /* Not RC_INVOKED */ +_END_C_DECLS -#endif /* Not _TIMEB_H_ */ +#endif /* ! RC_INVOKED */ +#endif /* !_SYS_TIMEB_H: $RCSfile$: end of file */ diff --git a/mingwrt/tests/headers.at b/mingwrt/tests/headers.at index 08e2b53..884a456 100644 --- a/mingwrt/tests/headers.at +++ b/mingwrt/tests/headers.at @@ -115,6 +115,7 @@ m4_foreach_w([HEADER],MINGWRT_AT_PACKAGE_HEADERS,[dnl AT_SETUP([#include <]HEADER[>])AT_KEYWORDS([$1 $1-headers]) AS_VAR_APPEND([CPPFLAGS],[" -Wall -Wextra -Wsystem-headers"]) m4_if(HEADER,[unistd.h],AS_VAR_APPEND([CPPFLAGS],[" -Wno-deprecated-declarations"])) +m4_if(HEADER,[sys/timeb.h],AS_VAR_APPEND([CPPFLAGS],[" -Wno-deprecated-declarations"])) m4_if(HEADER,[sys/stat.h],AS_VAR_APPEND([CPPFLAGS],[" -D_MINGW_S_IFBLK_KLUDGE"])) MINGW_AT_CHECK_COMPILE([dnl #define __IN_MINGWRT_TESTSUITE__ 1 @@ -136,7 +137,7 @@ m4_foreach([LANG],[C,C++],[MINGWRT_AT_CHECK_HEADERS_STANDALONE(LANG)]) m4_define([MINGWRT_AT_CHECK_HEADERS_COMBINED],[MINGW_AT_LANG([$1])dnl AT_SETUP([#include all; language = $1])AT_KEYWORDS([$1 $1-headers]) AS_VAR_APPEND([CPPFLAGS],[" -Wall -Wextra -Wsystem-headers"]) -m4_if([$1],[C],AS_VAR_APPEND([CPPFLAGS],[" -Wno-deprecated-declarations"])) +AS_VAR_APPEND([CPPFLAGS],[" -Wno-deprecated-declarations"]) MINGW_AT_CHECK_COMPILE([dnl #define _MINGW_S_IFBLK_KLUDGE 1 #define __IN_MINGWRT_TESTSUITE__ 1 https://sf.net/p/mingw/mingw-org-wsl/ci/b0a6e63e896cf28447d2312375976bf111cbc100/ commit b0a6e63e896cf28447d2312375976bf111cbc100 Author: Keith Marshall <ke...@us...> Date: Thu Feb 22 20:00:40 2018 +0000 Correct Windows version support for <utime.h> functions. diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog index c37a822..ab5367c 100644 --- a/mingwrt/ChangeLog +++ b/mingwrt/ChangeLog @@ -1,3 +1,24 @@ +2018-02-22 Keith Marshall <ke...@us...> + + Correct Windows version support for <utime.h> functions. + + * include/sys/utime.h: Tidy layout; assert copyright. + (_UTIME_H_): Rename this repeat inclusion guard macro... + (_SYS_UTIME_H): ...to this, for consistency with current practice. + (_BEGIN_C_DECLS, _END_C_DECLS): Use them, as appropriate. + (struct __utimbuf32): Define it unconditionally; remove... + [__MSVCRT_VERSION__>=0x0800]: ...this prerequisite. + (_utime32, _wutime32, _futime32): Declare them for... + [_WIN32_WINNT >= _WIN32_WINNT_VISTA]: ...this, in addition to... + [__MSVCRT_VERSION__>=__MSVCR80_DLL]: ...this original condition, but + also emulate them in-line, if neither condition applies. + [__MSVCRT_VERSION__>=__MSVCR80.DLL] (_utime, _wutime, _futime): + Implement them in-line, delegating each respectively to... + [_USE_32BIT_TIME_T] (_utime32, _wutime32, _futime32): ...these, or... + [!_USE_32BIT_TIME_T] (_utime64, _wutime64, _futime64): ...to these. + [__MSVCRT_VERSION__>=__MSVCR80.DLL] (utime): Implement in-line, or... + [__MSVCRT_VERSION__<__MSVCR80.DLL] (utime): ...declare it. + 2018-01-17 Keith Marshall <ke...@us...> Fix faulty POSIX deprecation warning logic. diff --git a/mingwrt/include/sys/utime.h b/mingwrt/include/sys/utime.h index 126d1ed..27086c6 100644 --- a/mingwrt/include/sys/utime.h +++ b/mingwrt/include/sys/utime.h @@ -1,110 +1,221 @@ /* - * utime.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. + * sys/utime.h * - * Support for the utime function. + * Microsoft counterpart to the (now deprecated) POSIX <utime.h> header; + * unlike POSIX, Microsoft provide this as <sys/utime.h> + * + * + * $Id$ + * + * Written by Colin Peters <co...@bi...> + * Copyright (C) 1997-2001, 2003, 2004, 2007, 2018, 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 _UTIME_H_ -#define _UTIME_H_ +#ifndef _SYS_UTIME_H +#pragma GCC system_header +#define _SYS_UTIME_H -/* All the headers include this file. */ #include <_mingw.h> +#define __need_time_t 1 +#include <sys/types.h> +#undef __need_time_t + +#ifndef RC_INVOKED #define __need_wchar_t #define __need_size_t -#ifndef RC_INVOKED #include <stddef.h> -#endif /* Not RC_INVOKED */ -#include <sys/types.h> -#ifndef RC_INVOKED +_BEGIN_C_DECLS -/* - * Structure used by _utime function. - */ struct _utimbuf -{ - time_t actime; /* Access time */ - time_t modtime; /* Modification time */ -}; -#if __MSVCRT_VERSION__ >= 0x0800 -struct __utimbuf32 -{ - __time32_t actime; - __time32_t modtime; +{ /* Microsoft's definition for their equivalent of the POSIX utimbuf + * structure, as used in their _utime() function. + */ + time_t actime; /* last file access time */ + time_t modtime; /* last modification time */ }; -#endif /* __MSVCRT_VERSION__ >= 0x0800 */ - -#ifndef _NO_OLDNAMES -/* NOTE: Must be the same as _utimbuf above. */ +#ifndef _NO_OLDNAMES +/* Microsoft used to also support the formal POSIX structure definition, + * but have discontinued this practice; for portability, NEVER disable + * Microsoft's old names, (i.e. NEVER define _NO_OLDNAMES). + */ struct utimbuf -{ - time_t actime; - time_t modtime; +{ /* This is the POSIX compatible definition; it must EXACTLY mimic the + * Microsoft definition (as specified above). + */ + time_t actime; + time_t modtime; }; -#endif /* Not _NO_OLDNAMES */ - -#ifdef __cplusplus -extern "C" { -#endif - -#if __MSVCRT_VERSION__ < 0x0800 -_CRTIMP int __cdecl __MINGW_NOTHROW _utime (const char*, struct _utimbuf*); -#endif - -#ifndef _NO_OLDNAMES -/* FIXME for __MSVCRT_VERSION__ >= 0x0800 */ -_CRTIMP int __cdecl __MINGW_NOTHROW utime (const char*, struct utimbuf*); -#endif /* Not _NO_OLDNAMES */ - -#if __MSVCRT_VERSION__ < 0x0800 -_CRTIMP int __cdecl __MINGW_NOTHROW _futime (int, struct _utimbuf*); -#endif - -/* The wide character version, only available for MSVCRT versions of the - * C runtime library. */ -#ifdef __MSVCRT__ -#if __MSVCRT_VERSION__ < 0x0800 -_CRTIMP int __cdecl __MINGW_NOTHROW _wutime (const wchar_t*, struct _utimbuf*); -#endif -#endif /* MSVCRT runtime */ - -/* These require newer versions of msvcrt.dll (6.10 or higher). */ -#if __MSVCRT_VERSION__ >= 0x0601 +#endif /* !_NO_OLDNAMES */ + +struct __utimbuf32 +{ /* A 32-bit-explicit equivalent for struct _utimbuf; technically, + * Microsoft don't support this, before the release of Vista, other + * than on non-free runtimes from MSVCR80.DLL onwards, but since it + * is fundamentally identical to struct _utimbuf on those platforms + * which do not explicitly support it, and WE provide emulation for + * the associated 32-bit-explicit functions on those platforms, it + * is convenient for us to define it unconditionally. + */ + __time32_t actime; + __time32_t modtime; +}; + +#if defined _WIN64 /* FIXME: is this true, for ALL Win64 versions? */ \ + || _WIN32_WINNT >= _WIN32_WINNT_VISTA || __MSVCRT_VERSION__ >= __MSVCR80_DLL + /* The associated 32-bit-explicit functions are implemented in, and exported + * from MSVCRT.DLL, from Vista onwards, and versions of non-free MSVCRxx.DLL + * from MSVCR80.DLL onwards; (for any runtime version which does not satisfy + * either one of these criteria, we provide emulations below). + */ +_CRTIMP __cdecl __MINGW_NOTHROW int _utime32( const char *, struct __utimbuf32 * ); +_CRTIMP __cdecl __MINGW_NOTHROW int _wutime32( const wchar_t *, struct __utimbuf32 * ); +_CRTIMP __cdecl __MINGW_NOTHROW int _futime32( int, struct __utimbuf32 * ); +#endif /* Win-Vista and later, or MSVCR80.DLL and later */ + +#if defined _WIN64 /* ALL Win64 versions should have this! */ \ + || _WIN32_WINNT >= _WIN32_WINNT_WIN2K || __MSVCRT_VERSION__ >= __MSVCR61_DLL + /* Conversely, the 64-bit-explicit alternative functions have been supported + * by MSVCRT.DLL, from Win2K onwards, and by non-free MSVCR61.DLL and later; + * we declare them, for such platforms, but we make no provision to emulate + * them on any earlier platform. + */ struct __utimbuf64 -{ - __time64_t actime; - __time64_t modtime; +{ /* The 64-bit-explicit equivalent of struct _utimbuf; it is necessary + * to declare it, only when the functions which use it are declared... + */ + __time64_t actime; + __time64_t modtime; }; -_CRTIMP int __cdecl __MINGW_NOTHROW _utime64 (const char*, struct __utimbuf64*); -_CRTIMP int __cdecl __MINGW_NOTHROW _wutime64 (const wchar_t*, struct __utimbuf64*); -_CRTIMP int __cdecl __MINGW_NOTHROW _futime64 (int, struct __utimbuf64*); -#endif /* __MSVCRT_VERSION__ >= 0x0601 */ - -#if __MSVCRT_VERSION__ >= 0x0800 -_CRTIMP int __cdecl __MINGW_NOTHROW _utime32 (const char*, struct __utimbuf32*); -_CRTIMP int __cdecl __MINGW_NOTHROW _wutime32 (const wchar_t*, struct __utimbuf32*); -_CRTIMP int __cdecl __MINGW_NOTHROW _futime32 (int, struct __utimbuf32*); -#ifndef _USE_32BIT_TIME_T -_CRTALIAS int __cdecl __MINGW_NOTHROW _utime (const char* _v1, struct _utimbuf* _v2) { return(_utime64 (_v1,(struct __utimbuf64*)_v2)); } -_CRTALIAS int __cdecl __MINGW_NOTHROW _wutime (const wchar_t* _v1, struct _utimbuf* _v2) { return(_wutime64 (_v1,(struct __utimbuf64*)_v2)); } -_CRTALIAS int __cdecl __MINGW_NOTHROW _futime (int _v1, struct _utimbuf* _v2) { return(_futime64 (_v1,(struct __utimbuf64*)_v2)); } -#else -_CRTALIAS int __cdecl __MINGW_NOTHROW _utime (const char* _v1, struct _utimbuf* _v2) { return(_utime32 (_v1,(struct __utimbuf32*)_v2)); } -_CRTALIAS int __cdecl __MINGW_NOTHROW _wutime (const wchar_t* _v1, struct _utimbuf* _v2) { return(_wutime32 (_v1,(struct __utimbuf32*)_v2)); } -_CRTALIAS int __cdecl __MINGW_NOTHROW _futime (int _v1, struct _utimbuf* _v2) { return(_futime32 (_v1,(struct __utimbuf32*)_v2)); } -#endif -#endif /* __MSVCRT_VERSION__ >= 0x0800 */ - -#ifdef __cplusplus -} -#endif - -#endif /* Not RC_INVOKED */ - -#endif /* Not _UTIME_H_ */ +/* ...as here. + */ +_CRTIMP __cdecl __MINGW_NOTHROW int _utime64( const char *, struct __utimbuf64 * ); +_CRTIMP __cdecl __MINGW_NOTHROW int _wutime64( const wchar_t *, struct __utimbuf64 * ); +_CRTIMP __cdecl __MINGW_NOTHROW int _futime64( int, struct __utimbuf64 * ); +#endif /* Win2K and later, or MSVCR61.DLL and later */ + +#if __MSVCRT_VERSION__ >= __MSVCR80_DLL +/* Non-free MSVCRxx.DLL variants, from MSVCR80.DLL onwards, do not export + * utime(), _utime(), _wutime(), or _futime(); instead, they require in-line + * emulation, under control of Microsoft's ill-conceived _USE_32BIT_TIME_T + * feature test macro... + */ +# ifdef _USE_32BIT_TIME_T +/* ...which, when defined, causes these generic function names to be mapped + * to their 32-bit-explicit variants, (which thus retain compatibility with + * their actual implementations, as exported by MSVCRT.DLL)... + */ +__CRT_ALIAS __cdecl __MINGW_NOTHROW +int _utime( const char * __v1, struct _utimbuf * __v2 ) +{ return _utime32( __v1, (struct __utimbuf32 *)(__v2) ); } + +__CRT_ALIAS __cdecl __MINGW_NOTHROW +int _wutime( const wchar_t * __v1, struct _utimbuf * __v2) +{ return _wutime32( __v1, (struct __utimbuf32 *)(__v2) ); } + +__CRT_ALIAS __cdecl __MINGW_NOTHROW +int _futime( int __v1, struct _utimbuf * __v2 ) +{ return _futime32( __v1, (struct __utimbuf32 *)(__v2) ); } + +# else +/* ...but, when NOT defined, they are mapped to the 64-bit-explicit + * variants, (which are incompatible with the corresponding MSVCRT.DLL + * implementations). + */ +__CRT_ALIAS __cdecl __MINGW_NOTHROW +int _utime( const char * __v1, struct _utimbuf * __v2 ) +{ return _utime64( __v1, (struct __utimbuf64 *)(__v2) ); } + +__CRT_ALIAS __cdecl __MINGW_NOTHROW +int _wutime( const wchar_t * __v1, struct _utimbuf * __v2 ) +{ return _wutime64( __v1, (struct __utimbuf64 *)(__v2) ); } + +__CRT_ALIAS __cdecl __MINGW_NOTHROW +int _futime( int __v1, struct _utimbuf * __v2 ) +{ return _futime64( __v1, (struct __utimbuf64 *)(__v2) ); } + +# endif /* !_USE_32BIT_TIME_T */ + +# ifndef _NO_OLDNAMES +/* The POSIX compatible (Microsoft old name) function must also be + * emulated; it maps to whatever in-line implementation has become + * applicable for _utime() + */ +__CRT_ALIAS __cdecl __MINGW_NOTHROW +int utime( const char * __v1, struct _utimbuf * __v2 ) +{ return _utime( __v1, (struct _utimbuf *)(__v2) ); } +# endif /* !_NO_OLDNAMES */ + +#else /* __MSVCRT_VERSION__ < __MSVCR80_DLL */ +/* When using CRTDLL.DLL, MSVCRT.DLL, or non-free MSVCRxx.DLL prior to + * MSVCR80.DLL, each of the preceding functions is physically exported. + */ +_CRTIMP __cdecl __MINGW_NOTHROW int _utime( const char *, struct _utimbuf * ); +_CRTIMP __cdecl __MINGW_NOTHROW int _futime( int, struct _utimbuf * ); + +# ifdef __MSVCRT__ +/* The wide character version is only available when linking with MSVCRT.DLL, + * (or non-free MSVCRxx.DLL variants); this is not declared, when linking with + * CRTDLL.DLL + */ +_CRTIMP __cdecl __MINGW_NOTHROW int _wutime( const wchar_t *, struct _utimbuf * ); +# endif /* MSVCRT.DLL only */ + +# if _WIN32_WINNT < _WIN32_WINNT_VISTA +/* However, there is no physical implementation of any 32-bit-explict + * function variant, prior to Vista, so emulate them. + * + * FIXME: maybe only if _MINGW32_SOURCE_EXTENDED is specified? + */ +__CRT_ALIAS __cdecl __MINGW_NOTHROW +int _utime32( const char *__v1, struct __utimbuf32 *__v2 ) +{ return _utime( __v1, (struct _utimbuf *)(__v2) ); } + +__CRT_ALIAS __cdecl __MINGW_NOTHROW +int _futime32( int __v1, struct __utimbuf32 *__v2 ) +{ return _futime( __v1, (struct _utimbuf *)(__v2) ); } + +__CRT_ALIAS __cdecl __MINGW_NOTHROW +int _wutime32( const wchar_t *__v1, struct __utimbuf32 *__v2 ) +{ return _wutime( __v1, (struct _utimbuf *)(__v2) ); } + +# endif /* _WIN32_WINNT < _WIN32_WINNT_VISTA */ + +# ifndef _NO_OLDNAMES +/* Strictly, the POSIX compatible utime() function is exported only by + * MSVCRT.DLL from Vista onwards, but it APPEARS to be exported, by way + * of a libmoldnames.a trampoline, for any MSVCRT.DLL which exports a + * physical _utime() implementation. + */ +_CRTIMP __cdecl __MINGW_NOTHROW int utime( const char *, struct utimbuf * ); + +# endif /* !_NO_OLDNAMES */ +#endif /* __MSVCRT_VERSION__ < __MSVCR80_DLL */ + +_END_C_DECLS + +#endif /* ! RC_INVOKED */ +#endif /* !_SYS_UTIME_H: $RCSfile$: end of file */ ----------------------------------------------------------------------- Summary of changes: mingwrt/ChangeLog | 49 ++++++++ mingwrt/include/sys/timeb.h | 216 +++++++++++++++++++++----------- mingwrt/include/sys/utime.h | 291 ++++++++++++++++++++++++++++++-------------- mingwrt/tests/headers.at | 3 +- 4 files changed, 399 insertions(+), 160 deletions(-) hooks/post-receive -- Repository: mingw-org-wsl |
From: Keith M. <no...@so...> - 2018-01-18 20:15: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: mingw-dist". The branch, master has been updated via 437b45b9f7df13938a119f9d4b970b3259b19c31 (commit) from 94885152990082a49dd62cd7822645e0b65f4f6f (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/437b45b9f7df13938a119f9d4b970b3259b19c31/ commit 437b45b9f7df13938a119f9d4b970b3259b19c31 Author: Keith Marshall <ke...@us...> Date: Thu Jan 18 20:15:06 2018 +0000 Publish MinGW.org WSL-5.0.2 package set. diff --git a/ChangeLog b/ChangeLog index e9dab4c..9d1b6fa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2018-01-18 Keith Marshall <kei...@us...> + + Publish MinGW.org WSL-5.0.2 package set. + + * mingw32/mingw32-runtime.xml (mingwrt-5.0.2-dev, mingwrt-5.0.2-dll) + (mingwrt-5.0.2-lic, mingwrt-5.0.2-man, libmingwex-5.0.2-dll-0) + (libmingwex-5.0.2-dev, w32api-5.0.2-dev): Add references. + * common/issue.log mingw32/issue.log: Update accordingly. + 2018-01-17 Keith Marshall <kei...@us...> Upgrade to correct malformed libmpfr.a @@ -5,7 +14,7 @@ * mingw32/mingw32-mpfr.xml (mpfr, libmpfr): Add 3.1.5-2 release; this removes references to libgmp.dll.a from libmpfr.a, correctly replacing them with references to static libgmp.a - * mingw32/issue.log: Update accordingly. + * common/issue.log mingw32/issue.log: Update accordingly. 2017-09-08 Keith Marshall <kei...@us...> diff --git a/common/issue.log b/common/issue.log index 61d7610..654fefa 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. # - c6a9068e183254c0b930ac6e1a70fd81743dc212 2018011702 package-list.xml + c6a9068e183254c0b930ac6e1a70fd81743dc212 2018011800 package-list.xml # # $RCSfile$: end of file diff --git a/mingw32/issue.log b/mingw32/issue.log index 52df478..ef1fe63 100644 --- a/mingw32/issue.log +++ b/mingw32/issue.log @@ -51,11 +51,11 @@ cd33ad74b608bce33ea297801253e6efbafce27c 2012073100 mingw32-mingw-utils.xml 6f1bec812a6376338cdb16f11929eb5e866a3fba 2017071600 mingw32-mpc.xml 671658adeceafd003aa2d1fd7a6c0177d01316e3 2018011700 mingw32-mpfr.xml - 5c9570cce1ddd4fe275b83acbc06739a4361c26a 2018011701 mingw32-package-list.xml + 5c9570cce1ddd4fe275b83acbc06739a4361c26a 2018011800 mingw32-package-list.xml 1f15439ee5f66ec22321c7aa853559b6f8f7172f 2015090800 mingw32-pexports.xml cdb2a4dbedfc9f2cdfc92340f6f9b12da061c0d9 2012073100 mingw32-popt.xml 6032af6ff68aa4821cf51938781fd9e75f05de5f 2016082200 mingw32-pthreads-w32.xml - 586719b6ec83bbcc69242aab146051314c743f95 2017073100 mingw32-runtime.xml + bef0689b8c12e8687b4b3e2942cecacc8c5b670c 2018011800 mingw32-runtime.xml 12acb32f80e49c893167cfae82e448dd766d49bb 2013070100 mingw32-wsl-candidate.xml 247a02890f109a5fe4996fde4af9d576dca3cd1e 2012073100 mingw32-xz.xml c223ecd7389eb02948b54f8959d595cf608306a7 2013101200 mingw32-zlib.xml diff --git a/mingw32/mingw32-runtime.xml b/mingw32/mingw32-runtime.xml index 3262b19..88b359d 100644 --- a/mingw32/mingw32-runtime.xml +++ b/mingw32/mingw32-runtime.xml @@ -29,6 +29,7 @@ <component class="dev"> <requires eq="mingwrt-%-mingw32-dll.tar" /> + <release tarname="mingwrt-5.0.2-mingw32-dev.tar.xz" /> <release tarname="mingwrt-5.0.1-mingw32-dev.tar.xz" /> <release tarname="mingwrt-5.0-mingw32-dev.tar.xz" /> <release tarname="mingwrt-3.22.4-mingw32-dev.tar.xz" /> @@ -57,6 +58,7 @@ </component> <component class="dll"> + <release tarname="mingwrt-5.0.2-mingw32-dll.tar.xz" /> <release tarname="mingwrt-5.0.1-mingw32-dll.tar.xz" /> <release tarname="mingwrt-5.0-mingw32-dll.tar.xz" /> <release tarname="mingwrt-3.22.4-mingw32-dll.tar.xz" /> @@ -73,6 +75,7 @@ </component> <component class="lic"> + <release tarname="mingwrt-5.0.2-mingw32-lic.tar.xz" /> <release tarname="mingwrt-5.0.1-mingw32-lic.tar.xz" /> <release tarname="mingwrt-5.0-mingw32-lic.tar.xz" /> <release tarname="mingwrt-3.22.4-mingw32-lic.tar.xz" /> @@ -101,6 +104,7 @@ </component> <component class="man"> + <release tarname="mingwrt-5.0.2-mingw32-man.tar.xz" /> <release tarname="mingwrt-5.0.1-mingw32-man.tar.xz" /> <release tarname="mingwrt-5.0-mingw32-man.tar.xz" /> <release tarname="mingwrt-3.22.4-mingw32-man.tar.xz" /> @@ -147,6 +151,7 @@ <licence tarname="mingwrt-%-mingw32-lic.tar.%" /> <component class="dev"> + <release tarname="libmingwex-5.0.2-mingw32-dev.tar.xz" /> <release tarname="libmingwex-5.0.1-mingw32-dev.tar.xz" /> <release tarname="libmingwex-5.0-mingw32-dev.tar.xz" /> <requires eq="libmingwex-%-mingw32-dll-0.tar" /> @@ -154,6 +159,7 @@ </component> <component class="dll"> + <release tarname="libmingwex-5.0.2-mingw32-dll-0.tar.xz" /> <release tarname="libmingwex-5.0.1-mingw32-dll-0.tar.xz" /> <release tarname="libmingwex-5.0-mingw32-dll-0.tar.xz" /> </component> @@ -178,6 +184,7 @@ <licence tarname="w32api-%-mingw32-dev.tar.%" /> <component class="dev"> + <release tarname="w32api-5.0.2-mingw32-dev.tar.xz" /> <release tarname="w32api-5.0.1-mingw32-dev.tar.xz" /> <release tarname="w32api-5.0-mingw32-dev.tar.xz" /> <release tarname="w32api-3.18.2-mingw32-dev.tar.xz" /> ----------------------------------------------------------------------- Summary of changes: ChangeLog | 11 ++++++++++- common/issue.log | 2 +- mingw32/issue.log | 4 ++-- mingw32/mingw32-runtime.xml | 7 +++++++ 4 files changed, 20 insertions(+), 4 deletions(-) hooks/post-receive -- Repository: mingw-dist |
From: Keith M. <no...@so...> - 2018-01-17 22:53: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 94885152990082a49dd62cd7822645e0b65f4f6f (commit) from 91433cc93d21aca1931d2d2c0626e4628d2be0c2 (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/94885152990082a49dd62cd7822645e0b65f4f6f/ commit 94885152990082a49dd62cd7822645e0b65f4f6f Author: Keith Marshall <ke...@us...> Date: Wed Jan 17 22:53:14 2018 +0000 Upgrade to correct malformed libmpfr.a diff --git a/ChangeLog b/ChangeLog index da76c95..e9dab4c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2018-01-17 Keith Marshall <kei...@us...> + + Upgrade to correct malformed libmpfr.a + + * mingw32/mingw32-mpfr.xml (mpfr, libmpfr): Add 3.1.5-2 release; + this removes references to libgmp.dll.a from libmpfr.a, correctly + replacing them with references to static libgmp.a + * mingw32/issue.log: Update accordingly. + 2017-09-08 Keith Marshall <kei...@us...> Eliminate libgcc_s_dw2-1.dll dependencies in GMP DLLs. diff --git a/common/issue.log b/common/issue.log old mode 100755 new mode 100644 index aff4f12..61d7610 --- 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. # - c6a9068e183254c0b930ac6e1a70fd81743dc212 2017122200 package-list.xml + c6a9068e183254c0b930ac6e1a70fd81743dc212 2018011702 package-list.xml # # $RCSfile$: end of file diff --git a/mingw32/issue.log b/mingw32/issue.log old mode 100755 new mode 100644 index e8021f3..52df478 --- a/mingw32/issue.log +++ b/mingw32/issue.log @@ -50,8 +50,8 @@ 00d41b72d8329a00a7018b7bf936dafda3618ef1 2013100400 mingw32-mingw-get.xml cd33ad74b608bce33ea297801253e6efbafce27c 2012073100 mingw32-mingw-utils.xml 6f1bec812a6376338cdb16f11929eb5e866a3fba 2017071600 mingw32-mpc.xml - 7744f313f4b203f4fd3f0d73b74ea012c98369db 2017071600 mingw32-mpfr.xml - 5c9570cce1ddd4fe275b83acbc06739a4361c26a 2017122100 mingw32-package-list.xml + 671658adeceafd003aa2d1fd7a6c0177d01316e3 2018011700 mingw32-mpfr.xml + 5c9570cce1ddd4fe275b83acbc06739a4361c26a 2018011701 mingw32-package-list.xml 1f15439ee5f66ec22321c7aa853559b6f8f7172f 2015090800 mingw32-pexports.xml cdb2a4dbedfc9f2cdfc92340f6f9b12da061c0d9 2012073100 mingw32-popt.xml 6032af6ff68aa4821cf51938781fd9e75f05de5f 2016082200 mingw32-pthreads-w32.xml diff --git a/mingw32/mingw32-mpfr.xml b/mingw32/mingw32-mpfr.xml index b14e65e..c964aad 100644 --- a/mingw32/mingw32-mpfr.xml +++ b/mingw32/mingw32-mpfr.xml @@ -32,6 +32,9 @@ <licence tarname="mpfr-%-mingw32-lic.tar.lzma" /> <component class="dev"> + <release tarname="mpfr-3.1.5-2-mingw32-dev.tar.xz"> + <requires eq="mingw32-libmpfr-%-mingw32-dll-4.tar" /> + </release> <release tarname="mpfr-3.1.5-1-mingw32-dev.tar.xz"> <requires eq="mingw32-libmpfr-%-mingw32-dll-4.tar" /> </release> @@ -45,16 +48,19 @@ </component> <component class="doc"> + <release tarname="mpfr-3.1.5-2-mingw32-doc.tar.xz" /> <release tarname="mpfr-3.1.5-1-mingw32-doc.tar.xz" /> <release tarname="mpfr-3.1.2-2-mingw32-doc.tar.lzma" /> <release tarname="mpfr-2.4.1-1-mingw32-doc.tar.lzma" /> </component> <component class="info"> + <release tarname="mpfr-3.1.5-2-mingw32-info.tar.xz" /> <release tarname="mpfr-3.1.5-1-mingw32-info.tar.xz" /> </component> <component class="lic"> + <release tarname="mpfr-3.1.5-2-mingw32-lic.tar.xz" /> <release tarname="mpfr-3.1.5-1-mingw32-lic.tar.xz" /> <release tarname="mpfr-3.1.2-2-mingw32-lic.tar.lzma" /> <release tarname="mpfr-2.4.1-1-mingw32-lic.tar.lzma" /> @@ -87,6 +93,7 @@ <licence tarname="mpfr-%-mingw32-lic.tar.lzma" /> <component class="dll"> + <release tarname="libmpfr-3.1.5-2-mingw32-dll-4.tar.xz" /> <release tarname="libmpfr-3.1.5-1-mingw32-dll-4.tar.xz" /> <release tarname="libmpfr-3.1.2-2-mingw32-dll-4.tar" > <download tarname="mpfr-3.1.2-2-mingw32-dll.tar.lzma" /> diff --git a/msys/issue.log b/msys/issue.log old mode 100755 new mode 100644 index 903adc4..bfab178 --- a/msys/issue.log +++ b/msys/issue.log @@ -74,7 +74,7 @@ b99a540c08e3321515ed2485c1771d22c0c9ef08 2016031600 msys-ncurses.xml 243df0057053eebc442d922dff075e09fb579805 2012073100 msys-openssh.xml 0103c79956ba9fa128755cd93374f0fc334c7cf6 2012073100 msys-openssl.xml - 5c9e6921f171ce31b016037f5b7c836ed1a4960f 2017122200 msys-package-list.xml + 5c9e6921f171ce31b016037f5b7c836ed1a4960f 2018011700 msys-package-list.xml d19e1e39e5fab25a3d40acb92b98b40a60b0da90 2012073100 msys-patch.xml d4f194d2e95035da2b712c54053fb6ad5d45e1d9 2013101200 msys-perl.xml 19ddf46e23e23010a440af1b423d986712c3bda7 2012073100 msys-popt.xml ----------------------------------------------------------------------- Summary of changes: ChangeLog | 9 +++++++++ common/issue.log | 2 +- mingw32/issue.log | 4 ++-- mingw32/mingw32-mpfr.xml | 7 +++++++ msys/issue.log | 2 +- 5 files changed, 20 insertions(+), 4 deletions(-) mode change 100755 => 100644 common/issue.log mode change 100755 => 100644 mingw32/issue.log mode change 100755 => 100644 msys/issue.log hooks/post-receive -- Repository: mingw-dist |
From: Keith M. <no...@so...> - 2018-01-17 16:05:36
|
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, 5.1-trunk has been updated via 5abede16dd604548bd822293335c58f0bf91fb1e (commit) from 392cbd7a4a3170713880eae9d2d185803cca2f0e (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/5abede16dd604548bd822293335c58f0bf91fb1e/ commit 5abede16dd604548bd822293335c58f0bf91fb1e Author: Keith Marshall <ke...@us...> Date: Wed Jan 17 16:01:48 2018 +0000 Fix faulty POSIX deprecation warning logic. diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog index 58b3e42..c37a822 100644 --- a/mingwrt/ChangeLog +++ b/mingwrt/ChangeLog @@ -1,3 +1,14 @@ +2018-01-17 Keith Marshall <ke...@us...> + + Fix faulty POSIX deprecation warning logic. + + * include/_mingw.h.in (__POSIX_2008_DEPRECATED): Do not nest... + (__POSIX_2001_DEPRECATED): ...within defininion of this; similarly... + (__POSIX_1995_DEPRECATED): ...neither within this; rename this as... + (__POSIX_1996_DEPRECATED): ...this; although conditional upon... + [_POSIX_C_SOURCE >= 199506L]: ...this, the corresponding standard was + eventually ratified, not as POSIX.1-1995, but as POSIX.1-1996 + 2017-12-28 Keith Marshall <ke...@us...> Fix a build issue, assembling generic SX files. diff --git a/mingwrt/include/_mingw.h.in b/mingwrt/include/_mingw.h.in index e5c6b86..b01570e 100644 --- a/mingwrt/include/_mingw.h.in +++ b/mingwrt/include/_mingw.h.in @@ -8,7 +8,7 @@ * $Id$ * * Written by Mumit Khan <kh...@xr...> - * Copyright (C) 1999, 2001-2011, 2014-2017, MinGW.org Project + * Copyright (C) 1999, 2001-2011, 2014-2018, MinGW.org Project * * * Permission is hereby granted, free of charge, to any person obtaining a @@ -483,7 +483,14 @@ allow GCC to optimize away some EH unwind code, at least in DW2 case. */ * interfaces which have been marked as "obsolescent", from this POSIX * version onwards, will be reported as "deprecated", at point of use. */ -# define __POSIX_1995_DEPRECATED __MINGW_ATTRIB_DEPRECATED +# define __POSIX_1996_DEPRECATED __MINGW_ATTRIB_DEPRECATED +#else +/* POSIX.1-1996 conformance is NOT required; do not object to use of + * interfaces which became "obsolescent" in this POSIX version, but + * were still fully supported in earlier versions. + */ +# define __POSIX_1996_DEPRECATED +#endif #if _POSIX_C_SOURCE >= 200112L /* Conformance with POSIX.1-2001 has been requested; ensure that any @@ -491,6 +498,13 @@ allow GCC to optimize away some EH unwind code, at least in DW2 case. */ * version onwards, will be reported as "deprecated", at point of use. */ # define __POSIX_2001_DEPRECATED __MINGW_ATTRIB_DEPRECATED +#else +/* POSIX.1-2001 conformance is NOT required; do not object to use of + * interfaces which became "obsolescent" in this POSIX version, but + * were still fully supported in earlier versions. + */ +# define __POSIX_2001_DEPRECATED +#endif #if _POSIX_C_SOURCE >= 200809L /* Conformance with POSIX.1-2008 has been requested; ensure that any @@ -498,7 +512,6 @@ allow GCC to optimize away some EH unwind code, at least in DW2 case. */ * version onwards, will be reported as "deprecated", at point of use. */ # define __POSIX_2008_DEPRECATED __MINGW_ATTRIB_DEPRECATED - #else /* POSIX.1-2008 conformance is NOT required; do not object to use of * interfaces which became "obsolescent" in this POSIX version, but @@ -506,20 +519,6 @@ allow GCC to optimize away some EH unwind code, at least in DW2 case. */ */ # define __POSIX_2008_DEPRECATED #endif -#else -/* POSIX.1-2001 conformance is NOT required; do not object to use of - * interfaces which became "obsolescent" in this POSIX version, but - * were still fully supported in earlier versions. - */ -# define __POSIX_2001_DEPRECATED -#endif -#else -/* POSIX.1-1996 conformance is NOT required; do not object to use of - * interfaces which became "obsolescent" in this POSIX version, but - * were still fully supported in earlier versions. - */ -# define __POSIX_1995_DEPRECATED -#endif #ifndef _ISOC99_SOURCE /* libmingwex.a provides free-standing implementations for many of the ----------------------------------------------------------------------- Summary of changes: mingwrt/ChangeLog | 11 +++++++++++ mingwrt/include/_mingw.h.in | 33 ++++++++++++++++----------------- 2 files changed, 27 insertions(+), 17 deletions(-) hooks/post-receive -- Repository: mingw-org-wsl |
From: Keith M. <no...@so...> - 2017-12-28 21:12:16
|
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, 5.1-trunk has been updated via 392cbd7a4a3170713880eae9d2d185803cca2f0e (commit) from 95cd5e0fa785ec3b21035e91884b1a3b860d2b0a (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/392cbd7a4a3170713880eae9d2d185803cca2f0e/ commit 392cbd7a4a3170713880eae9d2d185803cca2f0e Author: Keith Marshall <ke...@us...> Date: Thu Dec 28 21:08:21 2017 +0000 Fix a build issue, assembling generic SX files. diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog index 2f6fb6b..58b3e42 100644 --- a/mingwrt/ChangeLog +++ b/mingwrt/ChangeLog @@ -1,3 +1,12 @@ +2017-12-28 Keith Marshall <ke...@us...> + + Fix a build issue, assembling generic SX files. + + * Makefile.in (%_generic.sx): Always use $(COMPILE.sx) to pre-process + and assemble these; with $(CC) -c $(ALL_CPPFLAGS) $(ASFLAGS), versions + of GCC, prior to GCC-4.3, will fail to identify the source file suffix + correctly, resulting in failure to assemble the code. + 2017-12-18 Keith Marshall <ke...@us...> Support strtok() re-entrancy, per request [#2342]. diff --git a/mingwrt/Makefile.in b/mingwrt/Makefile.in index 1b8f081..0a12baf 100644 --- a/mingwrt/Makefile.in +++ b/mingwrt/Makefile.in @@ -491,15 +491,15 @@ $(addsuffix .$(OBJEXT), llround llroundf llroundl): %.$(OBJEXT): lround_generic. # vpath %.sx ${mingwrt_srcdir}/mingwex/math $(addsuffix .$(OBJEXT), % %f %l): %_generic.sx - $(CC) -c -D_$*_source $(ALL_CPPFLAGS) $(ASFLAGS) -o $*.$(OBJEXT) $< - $(CC) -c -D_$*f_source $(ALL_CPPFLAGS) $(ASFLAGS) -o $*f.$(OBJEXT) $< - $(CC) -c -D_$*l_source $(ALL_CPPFLAGS) $(ASFLAGS) -o $*l.$(OBJEXT) $< + $(COMPILE.sx) -D_$*_source -o $*.$(OBJEXT) $< + $(COMPILE.sx) -D_$*f_source -o $*f.$(OBJEXT) $< + $(COMPILE.sx) -D_$*l_source -o $*l.$(OBJEXT) $< # Several generically implemented functions also require separate # assembly of their generic back-end support routines. # x87%.$(OBJEXT): %_generic.sx - $(CC) -c $(ALL_CPPFLAGS) $(ASFLAGS) -o $@ $< + $(COMPILE.sx) -o $@ $< # Historically, MinGW.org's libm.a has been a dummy, delivering # nothing of value; FIXME: IMO, this sucks; it should deliver the ----------------------------------------------------------------------- Summary of changes: mingwrt/ChangeLog | 9 +++++++++ mingwrt/Makefile.in | 8 ++++---- 2 files changed, 13 insertions(+), 4 deletions(-) hooks/post-receive -- Repository: mingw-org-wsl |
From: Erwin W. <no...@so...> - 2017-12-22 00:18:55
|
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 91433cc93d21aca1931d2d2c0626e4628d2be0c2 (commit) from fa75ac1c8b1d6f63ca320cbbc76b888d158267f0 (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/91433cc93d21aca1931d2d2c0626e4628d2be0c2/ commit 91433cc93d21aca1931d2d2c0626e4628d2be0c2 Author: Erwin Waterlander <wat...@xs...> Date: Fri Dec 22 01:18:36 2017 +0100 fixed msys/msys-dos2unix.xml diff --git a/common/issue.log b/common/issue.log index d85cd9f..aff4f12 100755 --- 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. # - c6a9068e183254c0b930ac6e1a70fd81743dc212 2017122100 package-list.xml + c6a9068e183254c0b930ac6e1a70fd81743dc212 2017122200 package-list.xml # # $RCSfile$: end of file diff --git a/msys/issue.log b/msys/issue.log index 0f23a2a..903adc4 100755 --- a/msys/issue.log +++ b/msys/issue.log @@ -41,7 +41,7 @@ 000b65b5e1d1c9a0bf3fcb08e08d73cd952f3963 2012073100 msys-dash.xml dcce1ddf19a9c305adb350e958de55676cf69112 2012073100 msys-diffstat.xml 5cc54287970aca239fc154e9b46c988ef57b5c9a 2012073100 msys-diffutils.xml - a8008d8948b92bc5c779b387e698128576d16052 2017122100 msys-dos2unix.xml + b54efd9eb33c5e59b892a0a59b380d3c2b9dc888 2017122200 msys-dos2unix.xml 2654c6f215facbc7aa9a7391a76e9f626ee2188c 2012073100 msys-expat.xml 2a9bc928f054128d683e2f07e11aa5c73271eb82 2012073100 msys-file.xml 43501d0b51f801f6ee2b124c361b20223fcfeff2 2012073100 msys-findutils.xml @@ -74,7 +74,7 @@ b99a540c08e3321515ed2485c1771d22c0c9ef08 2016031600 msys-ncurses.xml 243df0057053eebc442d922dff075e09fb579805 2012073100 msys-openssh.xml 0103c79956ba9fa128755cd93374f0fc334c7cf6 2012073100 msys-openssl.xml - 5c9e6921f171ce31b016037f5b7c836ed1a4960f 2017122100 msys-package-list.xml + 5c9e6921f171ce31b016037f5b7c836ed1a4960f 2017122200 msys-package-list.xml d19e1e39e5fab25a3d40acb92b98b40a60b0da90 2012073100 msys-patch.xml d4f194d2e95035da2b712c54053fb6ad5d45e1d9 2013101200 msys-perl.xml 19ddf46e23e23010a440af1b423d986712c3bda7 2012073100 msys-popt.xml diff --git a/msys/msys-dos2unix.xml b/msys/msys-dos2unix.xml index fae93a5..7692b8a 100644 --- a/msys/msys-dos2unix.xml +++ b/msys/msys-dos2unix.xml @@ -20,7 +20,7 @@ <source tarname="dos2unix-%-msys-%-src.tar.%" /> <component class="bin"> - <release tarname="dos2unix-7.4.0-1-msys-1.0.18-bin.tar.lzma" > + <release tarname="dos2unix-7.4.0-1-msys-1.0.19-bin.tar.lzma" > <requires eq="msys-core-*-msys-*-bin.tar" /> <requires eq="msys-libiconv-*-msys-*-dll-2.tar" /> <requires eq="msys-libintl-*-msys-*-dll-8.tar" /> @@ -93,7 +93,7 @@ </component> <component class="doc"> - <release tarname="dos2unix-7.4.0-1-msys-1.0.18-doc.tar.lzma" /> + <release tarname="dos2unix-7.4.0-1-msys-1.0.19-doc.tar.lzma" /> <release tarname="dos2unix-7.3.2-1-msys-1.0.18-doc.tar.lzma" /> <release tarname="dos2unix-7.2.3-1-msys-1.0.18-doc.tar.lzma" /> <release tarname="dos2unix-7.2.2-1-msys-1.0.18-doc.tar.lzma" /> @@ -115,7 +115,7 @@ </component> <component class="lic"> - <release tarname="dos2unix-7.4.0-1-msys-1.0.18-lic.tar.lzma" /> + <release tarname="dos2unix-7.4.0-1-msys-1.0.19-lic.tar.lzma" /> <release tarname="dos2unix-7.3.2-1-msys-1.0.18-lic.tar.lzma" /> <release tarname="dos2unix-7.2.3-1-msys-1.0.18-lic.tar.lzma" /> <release tarname="dos2unix-7.2.2-1-msys-1.0.18-lic.tar.lzma" /> ----------------------------------------------------------------------- Summary of changes: common/issue.log | 2 +- msys/issue.log | 4 ++-- msys/msys-dos2unix.xml | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) hooks/post-receive -- Repository: mingw-dist |
From: Erwin W. <no...@so...> - 2017-12-21 23:49:58
|
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 fa75ac1c8b1d6f63ca320cbbc76b888d158267f0 (commit) from 6f60fffe47ff83e0077133dcab56c0e77bbcf508 (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/fa75ac1c8b1d6f63ca320cbbc76b888d158267f0/ commit fa75ac1c8b1d6f63ca320cbbc76b888d158267f0 Author: Erwin Waterlander <wat...@xs...> Date: Fri Dec 22 00:49:23 2017 +0100 upgrade dos2unix to version 7.4.0 diff --git a/common/issue.log b/common/issue.log old mode 100644 new mode 100755 index 4e932a0..d85cd9f --- 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. # - c6a9068e183254c0b930ac6e1a70fd81743dc212 2017090800 package-list.xml + c6a9068e183254c0b930ac6e1a70fd81743dc212 2017122100 package-list.xml # # $RCSfile$: end of file diff --git a/mingw32/issue.log b/mingw32/issue.log old mode 100644 new mode 100755 index 84b1c20..e8021f3 --- a/mingw32/issue.log +++ b/mingw32/issue.log @@ -31,7 +31,7 @@ 3df80e02d9d812756e8360dd4836722d1d2a0f2c 2017071200 mingw32-binutils.xml b4c60a4702749a0369b5059e7c1f50ce567e2c95 2012073100 mingw32-bzip2.xml c2fa4fe580615c774f72216fb06e35a909a08ba6 2012040200 mingw32-cygutils.xml - 6f0af5165a7ca9f67fdb7840dc5f7a5dda999c2a 2015122200 mingw32-dos2unix.xml + 8bd3df745d374821f2fa1f9a475f9c8ad8d87ed5 2017122100 mingw32-dos2unix.xml 4dab2d86ca2203a8ac0233824c687504fda4601e 2013091000 mingw32-expat.xml bc4b331f9bdfbf72a11a310fbc17a027396d09d5 2012073100 mingw32-gcc-tools.xml 9d1d9deeccee4fb04f2944e3cd5e7b85757308ce 2011050500 mingw32-gcc3.xml @@ -51,7 +51,7 @@ cd33ad74b608bce33ea297801253e6efbafce27c 2012073100 mingw32-mingw-utils.xml 6f1bec812a6376338cdb16f11929eb5e866a3fba 2017071600 mingw32-mpc.xml 7744f313f4b203f4fd3f0d73b74ea012c98369db 2017071600 mingw32-mpfr.xml - 5c9570cce1ddd4fe275b83acbc06739a4361c26a 2017090800 mingw32-package-list.xml + 5c9570cce1ddd4fe275b83acbc06739a4361c26a 2017122100 mingw32-package-list.xml 1f15439ee5f66ec22321c7aa853559b6f8f7172f 2015090800 mingw32-pexports.xml cdb2a4dbedfc9f2cdfc92340f6f9b12da061c0d9 2012073100 mingw32-popt.xml 6032af6ff68aa4821cf51938781fd9e75f05de5f 2016082200 mingw32-pthreads-w32.xml diff --git a/mingw32/mingw32-dos2unix.xml b/mingw32/mingw32-dos2unix.xml index da8cbb3..149f5d0 100644 --- a/mingw32/mingw32-dos2unix.xml +++ b/mingw32/mingw32-dos2unix.xml @@ -19,6 +19,10 @@ <source tarname="dos2unix-%-mingw32-%-src.tar.%" /> <component class="bin"> + <release tarname="dos2unix-7.4.0-1-mingw32-bin.tar.lzma" > + <requires eq="mingw32-libiconv-*-mingw32-*-dll-2.tar" /> + <requires eq="mingw32-libintl-*-mingw32-*-dll-8.tar" /> + </release> <release tarname="dos2unix-7.3.2-1-mingw32-bin.tar.lzma" > <requires eq="mingw32-libiconv-*-mingw32-*-dll-2.tar" /> <requires eq="mingw32-libintl-*-mingw32-*-dll-8.tar" /> @@ -75,6 +79,7 @@ </component> <component class="doc"> + <release tarname="dos2unix-7.4.0-1-mingw32-doc.tar.lzma" /> <release tarname="dos2unix-7.3.2-1-mingw32-doc.tar.lzma" /> <release tarname="dos2unix-7.2.3-1-mingw32-doc.tar.lzma" /> <release tarname="dos2unix-7.2.2-1-mingw32-doc.tar.lzma" /> @@ -94,6 +99,7 @@ </component> <component class="lic"> + <release tarname="dos2unix-7.4.0-1-mingw32-lic.tar.lzma" /> <release tarname="dos2unix-7.3.2-1-mingw32-lic.tar.lzma" /> <release tarname="dos2unix-7.2.3-1-mingw32-lic.tar.lzma" /> <release tarname="dos2unix-7.2.2-1-mingw32-lic.tar.lzma" /> diff --git a/msys/issue.log b/msys/issue.log old mode 100644 new mode 100755 index 4bacee2..0f23a2a --- a/msys/issue.log +++ b/msys/issue.log @@ -41,7 +41,7 @@ 000b65b5e1d1c9a0bf3fcb08e08d73cd952f3963 2012073100 msys-dash.xml dcce1ddf19a9c305adb350e958de55676cf69112 2012073100 msys-diffstat.xml 5cc54287970aca239fc154e9b46c988ef57b5c9a 2012073100 msys-diffutils.xml - 2846b6d6c8ebb8866b0b180bff42a4073f7dab60 2015122200 msys-dos2unix.xml + a8008d8948b92bc5c779b387e698128576d16052 2017122100 msys-dos2unix.xml 2654c6f215facbc7aa9a7391a76e9f626ee2188c 2012073100 msys-expat.xml 2a9bc928f054128d683e2f07e11aa5c73271eb82 2012073100 msys-file.xml 43501d0b51f801f6ee2b124c361b20223fcfeff2 2012073100 msys-findutils.xml @@ -74,7 +74,7 @@ b99a540c08e3321515ed2485c1771d22c0c9ef08 2016031600 msys-ncurses.xml 243df0057053eebc442d922dff075e09fb579805 2012073100 msys-openssh.xml 0103c79956ba9fa128755cd93374f0fc334c7cf6 2012073100 msys-openssl.xml - 5c9e6921f171ce31b016037f5b7c836ed1a4960f 2016071500 msys-package-list.xml + 5c9e6921f171ce31b016037f5b7c836ed1a4960f 2017122100 msys-package-list.xml d19e1e39e5fab25a3d40acb92b98b40a60b0da90 2012073100 msys-patch.xml d4f194d2e95035da2b712c54053fb6ad5d45e1d9 2013101200 msys-perl.xml 19ddf46e23e23010a440af1b423d986712c3bda7 2012073100 msys-popt.xml diff --git a/msys/msys-dos2unix.xml b/msys/msys-dos2unix.xml index ef5f1fa..fae93a5 100644 --- a/msys/msys-dos2unix.xml +++ b/msys/msys-dos2unix.xml @@ -20,6 +20,11 @@ <source tarname="dos2unix-%-msys-%-src.tar.%" /> <component class="bin"> + <release tarname="dos2unix-7.4.0-1-msys-1.0.18-bin.tar.lzma" > + <requires eq="msys-core-*-msys-*-bin.tar" /> + <requires eq="msys-libiconv-*-msys-*-dll-2.tar" /> + <requires eq="msys-libintl-*-msys-*-dll-8.tar" /> + </release> <release tarname="dos2unix-7.3.2-1-msys-1.0.18-bin.tar.lzma" > <requires eq="msys-core-*-msys-*-bin.tar" /> <requires eq="msys-libiconv-*-msys-*-dll-2.tar" /> @@ -88,6 +93,7 @@ </component> <component class="doc"> + <release tarname="dos2unix-7.4.0-1-msys-1.0.18-doc.tar.lzma" /> <release tarname="dos2unix-7.3.2-1-msys-1.0.18-doc.tar.lzma" /> <release tarname="dos2unix-7.2.3-1-msys-1.0.18-doc.tar.lzma" /> <release tarname="dos2unix-7.2.2-1-msys-1.0.18-doc.tar.lzma" /> @@ -109,6 +115,7 @@ </component> <component class="lic"> + <release tarname="dos2unix-7.4.0-1-msys-1.0.18-lic.tar.lzma" /> <release tarname="dos2unix-7.3.2-1-msys-1.0.18-lic.tar.lzma" /> <release tarname="dos2unix-7.2.3-1-msys-1.0.18-lic.tar.lzma" /> <release tarname="dos2unix-7.2.2-1-msys-1.0.18-lic.tar.lzma" /> ----------------------------------------------------------------------- Summary of changes: common/issue.log | 2 +- mingw32/issue.log | 4 ++-- mingw32/mingw32-dos2unix.xml | 6 ++++++ msys/issue.log | 4 ++-- msys/msys-dos2unix.xml | 7 +++++++ 5 files changed, 18 insertions(+), 5 deletions(-) mode change 100644 => 100755 common/issue.log mode change 100644 => 100755 mingw32/issue.log mode change 100644 => 100755 msys/issue.log hooks/post-receive -- Repository: mingw-dist |
From: Keith M. <no...@so...> - 2017-12-20 23:27:46
|
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, 5.1-trunk has been updated via 95cd5e0fa785ec3b21035e91884b1a3b860d2b0a (commit) from eb08924967a9b26e3695ec543700cd0da025f4cc (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/95cd5e0fa785ec3b21035e91884b1a3b860d2b0a/ commit 95cd5e0fa785ec3b21035e91884b1a3b860d2b0a Author: Keith Marshall <ke...@us...> Date: Wed Dec 20 23:26:30 2017 +0000 Make <winreg.h> header effectively self-contained. diff --git a/w32api/ChangeLog b/w32api/ChangeLog index e7d8715..eefa43d 100644 --- a/w32api/ChangeLog +++ b/w32api/ChangeLog @@ -1,5 +1,13 @@ 2017-12-20 Keith Marshall <ke...@us...> + Make <winreg.h> header effectively self-contained. + + * include/winreg.h: Include <winbase.h>, thus achieving effective + self-containment; since this also indirectly includes <_mingw.h>, + there is no longer any need to include it directly. + +2017-12-20 Keith Marshall <ke...@us...> + Clean up, following issue [#2262] patch application. * include/winreg.h: Tidy layout; correct copyright assertion. diff --git a/w32api/include/winreg.h b/w32api/include/winreg.h index cbdb8de..b370d8b 100644 --- a/w32api/include/winreg.h +++ b/w32api/include/winreg.h @@ -34,7 +34,7 @@ #pragma GCC system_header #define _WINREG_H -#include <_mingw.h> +#include <winbase.h> #include <reason.h> #ifndef WINADVAPI ----------------------------------------------------------------------- Summary of changes: w32api/ChangeLog | 8 ++++++++ w32api/include/winreg.h | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) hooks/post-receive -- Repository: mingw-org-wsl |
From: Keith M. <no...@so...> - 2017-12-20 22:53:20
|
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, 5.1-trunk has been updated via eb08924967a9b26e3695ec543700cd0da025f4cc (commit) via 61755ebc0a9abed29e1a77a8015aabbd005c17c3 (commit) from 8ea0d1ac0c1df465382dc525294b2725757f0628 (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/eb08924967a9b26e3695ec543700cd0da025f4cc/ commit eb08924967a9b26e3695ec543700cd0da025f4cc Author: Keith Marshall <ke...@us...> Date: Wed Dec 20 22:50:06 2017 +0000 Clean up, following issue [#2262] patch application. diff --git a/w32api/ChangeLog b/w32api/ChangeLog index c0ef29d..e7d8715 100644 --- a/w32api/ChangeLog +++ b/w32api/ChangeLog @@ -1,3 +1,29 @@ +2017-12-20 Keith Marshall <ke...@us...> + + Clean up, following issue [#2262] patch application. + + * include/winreg.h: Tidy layout; correct copyright assertion. + (_BEGIN_C_DECLS, _END_C_DECLS): Use them, as appropriate. + [UNICODE] (__AW): Do not use deleted macro; replace it with... + [UNICODE] (__AW_ALIAS__): ...this, for conditional typedef mapping... + [UNICODE] (VALENT, PVALENT): ...of these; similarly replace with... + [UNICODE] (__AW_SUFFIXED__): ...this, to define function mappings... + [UNICODE] (AbortSystemShutdown, InitiateSystemShutdown) + (RegConnectRegistry, RegCreateKey, RegCreateKeyEx, RegDeleteKey) + (RegDeleteValue, RegEnumKey, RegEnumKeyEx, RegEnumValue, RegLoadKey) + (RegOpenKey, RegOpenKeyEx, RegQueryInfoKey, RegQueryMultipleValues) + (RegQueryValue, RegQueryValueEx, RegReplaceKey, RegRestoreKey) + (RegSaveKey, RegSetValue, RegSetValueEx, RegUnLoadKey, RegSaveKeyEx) + (RegDeleteKeyTransacted, RegDeleteKeyValue, RegDeleteTree, RegGetValue) + (RegLoadMUIString, RegOpenKeyTransacted, RegSetKeyValue) + (RegDeleteKeyEx, RegCopyTree, RegCreateKeyTransacted): ...for these. + (RegDeleteKeyEx, RegDeleteKeyExA, RegDeleteKeyExW): Fix regression; + all "4.x" branches specified these incorrectly, dependent on... + [_WIN32_WINNT >= _WIN32_WINNT_WIN2K]: ...this condition, whereas the + "legacy" branch, whence the "5.x" branches are propagated, correctly + required an alternative condition which is the equivalent of... + [_WIN32_WINNT >= _WIN32_WINNT_WS03]: ...this; revert it. + 2017-12-20 Sebastián Puebla <sp...@us...> Update registry management API, per issue [#2262]. diff --git a/w32api/include/winreg.h b/w32api/include/winreg.h index 48927cf..cbdb8de 100644 --- a/w32api/include/winreg.h +++ b/w32api/include/winreg.h @@ -1,6 +1,14 @@ -/** - * @file winreg.h - * Copyright 2012, 2013 MinGW.org project +/* + * winreg.h + * + * Windows Registry Management API Declarations + * + * + * $Id$ + * + * Written by Anders Norlander <ano...@he...> + * Copyright (C) 2002, 2006, 2008, 2012, 2013, 2016, 2017, 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"), @@ -20,242 +28,335 @@ * 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 _WINREG_H #pragma GCC system_header #define _WINREG_H + #include <_mingw.h> +#include <reason.h> #ifndef WINADVAPI #define WINADVAPI #endif -#ifdef __cplusplus -extern "C" { -#endif +_BEGIN_C_DECLS -#include <reason.h> +#define HKEY_CLASSES_ROOT ((HKEY)(0x80000000)) +#define HKEY_CURRENT_USER ((HKEY)(0x80000001)) +#define HKEY_LOCAL_MACHINE ((HKEY)(0x80000002)) +#define HKEY_USERS ((HKEY)(0x80000003)) +#define HKEY_PERFORMANCE_DATA ((HKEY)(0x80000004)) +#define HKEY_CURRENT_CONFIG ((HKEY)(0x80000005)) +#define HKEY_DYN_DATA ((HKEY)(0x80000006)) + +#define REG_OPTION_VOLATILE 1 +#define REG_OPTION_NON_VOLATILE 0 -#define HKEY_CLASSES_ROOT ((HKEY)0x80000000) -#define HKEY_CURRENT_USER ((HKEY)0x80000001) -#define HKEY_LOCAL_MACHINE ((HKEY)0x80000002) -#define HKEY_USERS ((HKEY)0x80000003) -#define HKEY_PERFORMANCE_DATA ((HKEY)0x80000004) -#define HKEY_CURRENT_CONFIG ((HKEY)0x80000005) -#define HKEY_DYN_DATA ((HKEY)0x80000006) -#define REG_OPTION_VOLATILE 1 -#define REG_OPTION_NON_VOLATILE 0 /* https://msdn.microsoft.com/en-us/library/aa965882%28v=vs.85%29.aspx */ -#define REG_OPTION_BACKUP_RESTORE 4 -#define REG_CREATED_NEW_KEY 1 -#define REG_OPENED_EXISTING_KEY 2 -#define REG_NONE 0 -#define REG_SZ 1 -#define REG_EXPAND_SZ 2 -#define REG_BINARY 3 -#define REG_DWORD_LITTLE_ENDIAN 4 -#define REG_DWORD 4 -#define REG_DWORD_BIG_ENDIAN 5 -#define REG_LINK 6 -#define REG_MULTI_SZ 7 -#define REG_RESOURCE_LIST 8 -#define REG_FULL_RESOURCE_DESCRIPTOR 9 -#define REG_RESOURCE_REQUIREMENTS_LIST 10 -#define REG_QWORD_LITTLE_ENDIAN 11 -#define REG_QWORD 11 -#define REG_NOTIFY_CHANGE_NAME 1 -#define REG_NOTIFY_CHANGE_ATTRIBUTES 2 -#define REG_NOTIFY_CHANGE_LAST_SET 4 -#define REG_NOTIFY_CHANGE_SECURITY 8 +#define REG_OPTION_BACKUP_RESTORE 4 + +#define REG_CREATED_NEW_KEY 1 +#define REG_OPENED_EXISTING_KEY 2 + +#define REG_NONE 0 +#define REG_SZ 1 +#define REG_EXPAND_SZ 2 +#define REG_BINARY 3 +#define REG_DWORD_LITTLE_ENDIAN 4 +#define REG_DWORD 4 +#define REG_DWORD_BIG_ENDIAN 5 +#define REG_LINK 6 +#define REG_MULTI_SZ 7 +#define REG_RESOURCE_LIST 8 +#define REG_FULL_RESOURCE_DESCRIPTOR 9 +#define REG_RESOURCE_REQUIREMENTS_LIST 10 +#define REG_QWORD_LITTLE_ENDIAN 11 +#define REG_QWORD 11 + +#define REG_NOTIFY_CHANGE_NAME 1 +#define REG_NOTIFY_CHANGE_ATTRIBUTES 2 +#define REG_NOTIFY_CHANGE_LAST_SET 4 +#define REG_NOTIFY_CHANGE_SECURITY 8 + /* https://msdn.microsoft.com/en-us/library/ms724868%28v=vs.85%29.aspx */ -#define RRF_RT_REG_NONE 0x00000001 -#define RRF_RT_REG_SZ 0x00000002 -#define RRF_RT_REG_EXPAND_SZ 0x00000004 -#define RRF_RT_REG_BINARY 0x00000008 -#define RRF_RT_REG_DWORD 0x00000010 -#define RRF_RT_DWORD 0x00000018 -#define RRF_RT_REG_MULTI_SZ 0x00000020 -#define RRF_RT_REG_QWORD 0x00000040 -#define RRF_RT_QWORD 0x00000048 -#define RRF_RT_ANY 0x0000ffff -#define RRF_SUBKEY_WOW6464KEY 0x00010000 -#define RRF_SUBKEY_WOW6432KEY 0x00020000 -#define RRF_NOEXPAND 0x10000000 -#define RRF_ZEROONFAILURE 0x20000000 +#define RRF_RT_REG_NONE 0x00000001 +#define RRF_RT_REG_SZ 0x00000002 +#define RRF_RT_REG_EXPAND_SZ 0x00000004 +#define RRF_RT_REG_BINARY 0x00000008 +#define RRF_RT_REG_DWORD 0x00000010 +#define RRF_RT_DWORD 0x00000018 +#define RRF_RT_REG_MULTI_SZ 0x00000020 +#define RRF_RT_REG_QWORD 0x00000040 +#define RRF_RT_QWORD 0x00000048 +#define RRF_RT_ANY 0x0000FFFF +#define RRF_SUBKEY_WOW6464KEY 0x00010000 +#define RRF_SUBKEY_WOW6432KEY 0x00020000 +#define RRF_NOEXPAND 0x10000000 +#define RRF_ZEROONFAILURE 0x20000000 + /* https://msdn.microsoft.com/en-us/library/ms724919%28v=vs.85%29.aspx */ -#define REG_STANDARD_FORMAT 1 -#define REG_LATEST_FORMAT 2 -#define REG_NO_COMPRESSION 4 +#define REG_STANDARD_FORMAT 1 +#define REG_LATEST_FORMAT 2 + +#define REG_NO_COMPRESSION 4 #ifndef RC_INVOKED + typedef ACCESS_MASK REGSAM; -typedef struct value_entA { - LPSTR ve_valuename; - DWORD ve_valuelen; - DWORD ve_valueptr; - DWORD ve_type; -} VALENTA,*PVALENTA; -typedef struct value_entW { - LPWSTR ve_valuename; - DWORD ve_valuelen; - DWORD ve_valueptr; - DWORD ve_type; -} VALENTW,*PVALENTW; -WINADVAPI BOOL WINAPI AbortSystemShutdownA(LPCSTR); -WINADVAPI BOOL WINAPI AbortSystemShutdownW(LPCWSTR); -WINADVAPI BOOL WINAPI InitiateSystemShutdownA(LPSTR,LPSTR,DWORD,BOOL,BOOL); -WINADVAPI BOOL WINAPI InitiateSystemShutdownW(LPWSTR,LPWSTR,DWORD,BOOL,BOOL); -WINADVAPI LONG WINAPI RegCloseKey(HKEY); -WINADVAPI LONG WINAPI RegConnectRegistryA(LPCSTR,HKEY,PHKEY); -WINADVAPI LONG WINAPI RegConnectRegistryW(LPCWSTR,HKEY,PHKEY); -WINADVAPI LONG WINAPI RegCreateKeyA(HKEY,LPCSTR,PHKEY); -WINADVAPI LONG WINAPI RegCreateKeyExA(HKEY,LPCSTR,DWORD,LPSTR,DWORD,REGSAM,LPSECURITY_ATTRIBUTES,PHKEY,PDWORD); -WINADVAPI LONG WINAPI RegCreateKeyExW(HKEY,LPCWSTR,DWORD,LPWSTR,DWORD,REGSAM,LPSECURITY_ATTRIBUTES,PHKEY,PDWORD); -WINADVAPI LONG WINAPI RegCreateKeyW(HKEY,LPCWSTR,PHKEY); -WINADVAPI LONG WINAPI RegDeleteKeyA(HKEY,LPCSTR); -WINADVAPI LONG WINAPI RegDeleteKeyW(HKEY,LPCWSTR); - -WINADVAPI LONG WINAPI RegDeleteValueA(HKEY,LPCSTR); -WINADVAPI LONG WINAPI RegDeleteValueW(HKEY,LPCWSTR); + +typedef struct value_entA +{ LPSTR ve_valuename; + DWORD ve_valuelen; + DWORD ve_valueptr; + DWORD ve_type; +} VALENTA, *PVALENTA; + +typedef struct value_entW +{ LPWSTR ve_valuename; + DWORD ve_valuelen; + DWORD ve_valueptr; + DWORD ve_type; +} VALENTW, *PVALENTW; + +typedef __AW_ALIAS__(VALENT), *PVALENT; + +#define AbortSystemShutdown __AW_SUFFIXED__(AbortSystemShutdown) +WINADVAPI BOOL WINAPI AbortSystemShutdownA (LPCSTR); +WINADVAPI BOOL WINAPI AbortSystemShutdownW (LPCWSTR); + +#define InitiateSystemShutdown __AW_SUFFIXED__(InitiateSystemShutdown) +WINADVAPI BOOL WINAPI InitiateSystemShutdownA (LPSTR, LPSTR, DWORD, BOOL, BOOL); +WINADVAPI BOOL WINAPI InitiateSystemShutdownW (LPWSTR, LPWSTR, DWORD, BOOL, BOOL); + +WINADVAPI LONG WINAPI RegCloseKey (HKEY); + +#define RegConnectRegistry __AW_SUFFIXED__(RegConnectRegistry) +WINADVAPI LONG WINAPI RegConnectRegistryA (LPCSTR, HKEY, PHKEY); +WINADVAPI LONG WINAPI RegConnectRegistryW (LPCWSTR, HKEY, PHKEY); + +#define RegCreateKey __AW_SUFFIXED__(RegCreateKey) +WINADVAPI LONG WINAPI RegCreateKeyA (HKEY, LPCSTR, PHKEY); +WINADVAPI LONG WINAPI RegCreateKeyW (HKEY, LPCWSTR, PHKEY); + +#define RegCreateKeyEx __AW_SUFFIXED__(RegCreateKeyEx) +WINADVAPI LONG WINAPI RegCreateKeyExA + ( HKEY, LPCSTR, DWORD, LPSTR, DWORD, REGSAM, LPSECURITY_ATTRIBUTES, + PHKEY, PDWORD + ); +WINADVAPI LONG WINAPI RegCreateKeyExW + ( HKEY, LPCWSTR, DWORD, LPWSTR, DWORD, REGSAM, LPSECURITY_ATTRIBUTES, + PHKEY, PDWORD + ); +#define RegDeleteKey __AW_SUFFIXED__(RegDeleteKey) +WINADVAPI LONG WINAPI RegDeleteKeyA (HKEY, LPCSTR); +WINADVAPI LONG WINAPI RegDeleteKeyW (HKEY, LPCWSTR); + +#define RegDeleteValue __AW_SUFFIXED__(RegDeleteValue) +WINADVAPI LONG WINAPI RegDeleteValueA (HKEY, LPCSTR); +WINADVAPI LONG WINAPI RegDeleteValueW (HKEY, LPCWSTR); + /* https://msdn.microsoft.com/en-us/library/ms724854%28v=vs.85%29.aspx */ -WINADVAPI LONG WINAPI RegDisablePredefinedCache(void); -WINADVAPI LONG WINAPI RegEnumKeyA(HKEY,DWORD,LPSTR,DWORD); -WINADVAPI LONG WINAPI RegEnumKeyW(HKEY,DWORD,LPWSTR,DWORD); -WINADVAPI LONG WINAPI RegEnumKeyExA(HKEY,DWORD,LPSTR,PDWORD,PDWORD,LPSTR,PDWORD,PFILETIME); -WINADVAPI LONG WINAPI RegEnumKeyExW(HKEY,DWORD,LPWSTR,PDWORD,PDWORD,LPWSTR,PDWORD,PFILETIME); -WINADVAPI LONG WINAPI RegEnumValueA(HKEY,DWORD,LPSTR,PDWORD,PDWORD,PDWORD,LPBYTE,PDWORD); -WINADVAPI LONG WINAPI RegEnumValueW(HKEY,DWORD,LPWSTR,PDWORD,PDWORD,PDWORD,LPBYTE,PDWORD); -WINADVAPI LONG WINAPI RegFlushKey(HKEY); -WINADVAPI LONG WINAPI RegGetKeySecurity(HKEY,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,PDWORD); -WINADVAPI LONG WINAPI RegLoadKeyA(HKEY,LPCSTR,LPCSTR); -WINADVAPI LONG WINAPI RegLoadKeyW(HKEY,LPCWSTR,LPCWSTR); -WINADVAPI LONG WINAPI RegNotifyChangeKeyValue(HKEY,BOOL,DWORD,HANDLE,BOOL); +WINADVAPI LONG WINAPI RegDisablePredefinedCache (void); + +#define RegEnumKey __AW_SUFFIXED__(RegEnumKey) +WINADVAPI LONG WINAPI RegEnumKeyA (HKEY, DWORD, LPSTR, DWORD); +WINADVAPI LONG WINAPI RegEnumKeyW (HKEY, DWORD, LPWSTR, DWORD); + +#define RegEnumKeyEx __AW_SUFFIXED__(RegEnumKeyEx) +WINADVAPI LONG WINAPI RegEnumKeyExA + ( HKEY, DWORD, LPSTR, PDWORD, PDWORD, LPSTR, PDWORD, PFILETIME + ); +WINADVAPI LONG WINAPI RegEnumKeyExW + ( HKEY, DWORD, LPWSTR, PDWORD, PDWORD, LPWSTR, PDWORD, PFILETIME + ); +#define RegEnumValue __AW_SUFFIXED__(RegEnumValue) +WINADVAPI LONG WINAPI RegEnumValueA + ( HKEY, DWORD, LPSTR, PDWORD, PDWORD, PDWORD, LPBYTE, PDWORD + ); +WINADVAPI LONG WINAPI RegEnumValueW + ( HKEY, DWORD, LPWSTR, PDWORD, PDWORD, PDWORD, LPBYTE, PDWORD + ); +WINADVAPI LONG WINAPI RegFlushKey (HKEY); +WINADVAPI LONG WINAPI RegGetKeySecurity + ( HKEY, SECURITY_INFORMATION, PSECURITY_DESCRIPTOR, PDWORD + ); +#define RegLoadKey __AW_SUFFIXED__(RegLoadKey) +WINADVAPI LONG WINAPI RegLoadKeyA (HKEY, LPCSTR, LPCSTR); +WINADVAPI LONG WINAPI RegLoadKeyW (HKEY, LPCWSTR, LPCWSTR); + +WINADVAPI LONG WINAPI RegNotifyChangeKeyValue (HKEY, BOOL, DWORD, HANDLE, BOOL); + /* https://msdn.microsoft.com/en-us/library/ms724894%28v=vs.85%29.aspx */ -WINADVAPI LONG WINAPI RegOpenCurrentUser(REGSAM,PHKEY); -WINADVAPI LONG WINAPI RegOpenKeyA(HKEY,LPCSTR,PHKEY); -WINADVAPI LONG WINAPI RegOpenKeyExA(HKEY,LPCSTR,DWORD,REGSAM,PHKEY); -WINADVAPI LONG WINAPI RegOpenKeyExW(HKEY,LPCWSTR,DWORD,REGSAM,PHKEY); -WINADVAPI LONG WINAPI RegOpenKeyW(HKEY,LPCWSTR,PHKEY); +WINADVAPI LONG WINAPI RegOpenCurrentUser (REGSAM, PHKEY); + +#define RegOpenKey __AW_SUFFIXED__(RegOpenKey) +WINADVAPI LONG WINAPI RegOpenKeyA (HKEY, LPCSTR, PHKEY); +WINADVAPI LONG WINAPI RegOpenKeyW (HKEY, LPCWSTR, PHKEY); + +#define RegOpenKeyEx __AW_SUFFIXED__(RegOpenKeyEx) +WINADVAPI LONG WINAPI RegOpenKeyExA (HKEY, LPCSTR, DWORD, REGSAM, PHKEY); +WINADVAPI LONG WINAPI RegOpenKeyExW (HKEY, LPCWSTR, DWORD, REGSAM, PHKEY); + /* https://msdn.microsoft.com/en-us/library/ms724899%28v=vs.85%29.aspx */ -WINADVAPI LONG WINAPI RegOpenUserClassesRoot(HANDLE,DWORD,REGSAM,PHKEY); +WINADVAPI LONG WINAPI RegOpenUserClassesRoot (HANDLE, DWORD, REGSAM, PHKEY); + /* https://msdn.microsoft.com/en-us/library/ms724901%28v=vs.85%29.aspx */ -WINADVAPI LONG WINAPI RegOverridePredefKey(HKEY,HKEY); -WINADVAPI LONG WINAPI RegQueryInfoKeyA(HKEY,LPSTR,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PFILETIME); -WINADVAPI LONG WINAPI RegQueryInfoKeyW(HKEY,LPWSTR,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PFILETIME); -WINADVAPI LONG WINAPI RegQueryMultipleValuesA(HKEY,PVALENTA,DWORD,LPSTR,LPDWORD); -WINADVAPI LONG WINAPI RegQueryMultipleValuesW(HKEY,PVALENTW,DWORD,LPWSTR,LPDWORD); -WINADVAPI LONG WINAPI RegQueryValueA(HKEY,LPCSTR,LPSTR,PLONG); -WINADVAPI LONG WINAPI RegQueryValueExA(HKEY,LPCSTR,LPDWORD,LPDWORD,LPBYTE,LPDWORD); -WINADVAPI LONG WINAPI RegQueryValueExW(HKEY,LPCWSTR,LPDWORD,LPDWORD,LPBYTE,LPDWORD); -WINADVAPI LONG WINAPI RegQueryValueW(HKEY,LPCWSTR,LPWSTR,PLONG); -WINADVAPI LONG WINAPI RegReplaceKeyA(HKEY,LPCSTR,LPCSTR,LPCSTR); -WINADVAPI LONG WINAPI RegReplaceKeyW(HKEY,LPCWSTR,LPCWSTR,LPCWSTR); -WINADVAPI LONG WINAPI RegRestoreKeyA(HKEY,LPCSTR,DWORD); -WINADVAPI LONG WINAPI RegRestoreKeyW(HKEY,LPCWSTR,DWORD); -WINADVAPI LONG WINAPI RegSaveKeyA(HKEY,LPCSTR,LPSECURITY_ATTRIBUTES); -WINADVAPI LONG WINAPI RegSaveKeyW(HKEY,LPCWSTR,LPSECURITY_ATTRIBUTES); -WINADVAPI LONG WINAPI RegSetKeySecurity(HKEY,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR); -WINADVAPI LONG WINAPI RegSetValueA(HKEY,LPCSTR,DWORD,LPCSTR,DWORD); -WINADVAPI LONG WINAPI RegSetValueExA(HKEY,LPCSTR,DWORD,DWORD,const BYTE*,DWORD); -WINADVAPI LONG WINAPI RegSetValueExW(HKEY,LPCWSTR,DWORD,DWORD,const BYTE*,DWORD); -WINADVAPI LONG WINAPI RegSetValueW(HKEY,LPCWSTR,DWORD,LPCWSTR,DWORD); -WINADVAPI LONG WINAPI RegUnLoadKeyA(HKEY,LPCSTR); -WINADVAPI LONG WINAPI RegUnLoadKeyW(HKEY,LPCWSTR); - -typedef __AW(VALENT) VALENT,*PVALENT; -#define AbortSystemShutdown __AW(AbortSystemShutdown) -#define InitiateSystemShutdown __AW(InitiateSystemShutdown) -#define RegConnectRegistry __AW(RegConnectRegistry) -#define RegCreateKey __AW(RegCreateKey) -#define RegCreateKeyEx __AW(RegCreateKeyEx) -#define RegDeleteKey __AW(RegDeleteKey) - -#define RegDeleteValue __AW(RegDeleteValue) -#define RegEnumKey __AW(RegEnumKey) -#define RegEnumKeyEx __AW(RegEnumKeyEx) -#define RegEnumValue __AW(RegEnumValue) -#define RegLoadKey __AW(RegLoadKey) -#define RegOpenKey __AW(RegOpenKey) -#define RegOpenKeyEx __AW(RegOpenKeyEx) -#define RegQueryInfoKey __AW(RegQueryInfoKey) -#define RegQueryMultipleValues __AW(RegQueryMultipleValues) -#define RegQueryValue __AW(RegQueryValue) -#define RegQueryValueEx __AW(RegQueryValueEx) -#define RegReplaceKey __AW(RegReplaceKey) -#define RegRestoreKey __AW(RegRestoreKey) -#define RegSaveKey __AW(RegSaveKey) -#define RegSetValue __AW(RegSetValue) -#define RegSetValueEx __AW(RegSetValueEx) -#define RegUnLoadKey __AW(RegUnLoadKey) - -#if (_WIN32_WINNT >= _WIN32_WINNT_WIN2K) -WINADVAPI LONG WINAPI RegDeleteKeyExA(HKEY,LPCSTR,REGSAM,DWORD); -WINADVAPI LONG WINAPI RegDeleteKeyExW(HKEY,LPCWSTR,REGSAM,DWORD); -#define RegDeleteKeyEx __AW(RegDeleteKeyEx) -#endif /* (_WIN32_WINNT >= _WIN32_WINNT_WIN2K) */ - -#if (_WIN32_WINNT >= _WIN32_WINNT_WINXP) +WINADVAPI LONG WINAPI RegOverridePredefKey (HKEY, HKEY); + +#define RegQueryInfoKey __AW_SUFFIXED__(RegQueryInfoKey) +WINADVAPI LONG WINAPI RegQueryInfoKeyA + ( HKEY, LPSTR, PDWORD, PDWORD, PDWORD, PDWORD, PDWORD, PDWORD, PDWORD, + PDWORD, PDWORD, PFILETIME + ); +WINADVAPI LONG WINAPI RegQueryInfoKeyW + ( HKEY, LPWSTR, PDWORD, PDWORD, PDWORD, PDWORD, PDWORD, PDWORD, PDWORD, + PDWORD, PDWORD, PFILETIME + ); +#define RegQueryMultipleValues __AW_SUFFIXED__(RegQueryMultipleValues) +WINADVAPI LONG WINAPI RegQueryMultipleValuesA + ( HKEY, PVALENTA, DWORD, LPSTR, LPDWORD + ); +WINADVAPI LONG WINAPI RegQueryMultipleValuesW + ( HKEY, PVALENTW, DWORD, LPWSTR, LPDWORD + ); +#define RegQueryValue __AW_SUFFIXED__(RegQueryValue) +WINADVAPI LONG WINAPI RegQueryValueA (HKEY, LPCSTR, LPSTR, PLONG); +WINADVAPI LONG WINAPI RegQueryValueW (HKEY, LPCWSTR, LPWSTR, PLONG); + +#define RegQueryValueEx __AW_SUFFIXED__(RegQueryValueEx) +WINADVAPI LONG WINAPI RegQueryValueExA + ( HKEY, LPCSTR, LPDWORD, LPDWORD, LPBYTE, LPDWORD + ); +WINADVAPI LONG WINAPI RegQueryValueExW + ( HKEY, LPCWSTR, LPDWORD, LPDWORD, LPBYTE, LPDWORD + ); +#define RegReplaceKey __AW_SUFFIXED__(RegReplaceKey) +WINADVAPI LONG WINAPI RegReplaceKeyA (HKEY, LPCSTR, LPCSTR, LPCSTR); +WINADVAPI LONG WINAPI RegReplaceKeyW (HKEY, LPCWSTR, LPCWSTR, LPCWSTR); + +#define RegRestoreKey __AW_SUFFIXED__(RegRestoreKey) +WINADVAPI LONG WINAPI RegRestoreKeyA (HKEY, LPCSTR, DWORD); +WINADVAPI LONG WINAPI RegRestoreKeyW (HKEY, LPCWSTR, DWORD); + +#define RegSaveKey __AW_SUFFIXED__(RegSaveKey) +WINADVAPI LONG WINAPI RegSaveKeyA (HKEY, LPCSTR, LPSECURITY_ATTRIBUTES); +WINADVAPI LONG WINAPI RegSaveKeyW (HKEY, LPCWSTR, LPSECURITY_ATTRIBUTES); + +WINADVAPI LONG WINAPI RegSetKeySecurity + ( HKEY, SECURITY_INFORMATION, PSECURITY_DESCRIPTOR + ); +#define RegSetValue __AW_SUFFIXED__(RegSetValue) +WINADVAPI LONG WINAPI RegSetValueA (HKEY, LPCSTR, DWORD, LPCSTR, DWORD); +WINADVAPI LONG WINAPI RegSetValueW (HKEY, LPCWSTR, DWORD, LPCWSTR, DWORD); + +#define RegSetValueEx __AW_SUFFIXED__(RegSetValueEx) +WINADVAPI LONG WINAPI RegSetValueExA + ( HKEY, LPCSTR, DWORD, DWORD, const BYTE *, DWORD + ); +WINADVAPI LONG WINAPI RegSetValueExW + ( HKEY, LPCWSTR, DWORD, DWORD, const BYTE *, DWORD + ); +#define RegUnLoadKey __AW_SUFFIXED__(RegUnLoadKey) +WINADVAPI LONG WINAPI RegUnLoadKeyA (HKEY, LPCSTR); +WINADVAPI LONG WINAPI RegUnLoadKeyW (HKEY, LPCWSTR); + +#if _WIN32_WINNT >= _WIN32_WINNT_WINXP +#define RegSaveKeyEx __AW_SUFFIXED__(RegSaveKeyEx) /* https://msdn.microsoft.com/en-us/library/ms724919%28v=vs.85%29.aspx */ -WINADVAPI LONG WINAPI RegSaveKeyExA(HKEY,LPCSTR,LPSECURITY_ATTRIBUTES,DWORD); -WINADVAPI LONG WINAPI RegSaveKeyExW(HKEY,LPCWSTR,LPSECURITY_ATTRIBUTES,DWORD); -#define RegSaveKeyEx __AW(RegSaveKeyEx) -#endif /* (_WIN32_WINNT >= _WIN32_WINNT_WINXP) */ +WINADVAPI LONG WINAPI RegSaveKeyExA (HKEY, LPCSTR, LPSECURITY_ATTRIBUTES, DWORD); +WINADVAPI LONG WINAPI RegSaveKeyExW (HKEY, LPCWSTR, LPSECURITY_ATTRIBUTES, DWORD); + +#if _WIN32_WINNT >= _WIN32_WINNT_WS03 +#define RegDeleteKeyEx __AW_SUFFIXED__(RegDeleteKeyEx) +WINADVAPI LONG WINAPI RegDeleteKeyExA (HKEY, LPCSTR, REGSAM, DWORD); +WINADVAPI LONG WINAPI RegDeleteKeyExW (HKEY, LPCWSTR, REGSAM, DWORD); -#if (_WIN32_WINNT >= _WIN32_WINNT_WS03) /* https://msdn.microsoft.com/en-us/library/ms724858%28v=vs.85%29.aspx */ -WINADVAPI LONG WINAPI RegDisableReflectionKey(HKEY); +WINADVAPI LONG WINAPI RegDisableReflectionKey (HKEY); + /* https://msdn.microsoft.com/en-us/library/ms724859%28v=vs.85%29.aspx */ -WINADVAPI LONG WINAPI RegEnableReflectionKey(HKEY); +WINADVAPI LONG WINAPI RegEnableReflectionKey (HKEY); + /* https://msdn.microsoft.com/en-us/library/ms724907%28v=vs.85%29.aspx */ -WINADVAPI LONG WINAPI RegQueryReflectionKey(HKEY,BOOL*); -#endif /* (_WIN32_WINNT >= _WIN32_WINNT_WS03) */ +WINADVAPI LONG WINAPI RegQueryReflectionKey (HKEY, BOOL *); -#if (_WIN32_WINNT >= _WIN32_WINNT_VISTA) +#if _WIN32_WINNT >= _WIN32_WINNT_VISTA +#define RegCopyTree __AW_SUFFIXED__(RegCopyTree) /* https://msdn.microsoft.com/en-us/library/aa379768%28v=vs.85%29.aspx */ -WINADVAPI LONG WINAPI RegCopyTreeA(HKEY,LPCSTR,HKEY); -WINADVAPI LONG WINAPI RegCopyTreeW(HKEY,LPCWSTR,HKEY); +WINADVAPI LONG WINAPI RegCopyTreeA (HKEY, LPCSTR, HKEY); +WINADVAPI LONG WINAPI RegCopyTreeW (HKEY, LPCWSTR, HKEY); + +#define RegCreateKeyTransacted __AW_SUFFIXED__(RegCreateKeyTransacted) /* https://msdn.microsoft.com/en-us/library/aa965882%28v=vs.85%29.aspx */ -WINADVAPI LONG WINAPI RegCreateKeyTransactedA(HKEY,LPCSTR,DWORD,LPSTR,DWORD,REGSAM,const LPSECURITY_ATTRIBUTES,PHKEY,LPDWORD,HANDLE,PVOID); -WINADVAPI LONG WINAPI RegCreateKeyTransactedW(HKEY,LPCWSTR,DWORD,LPWSTR,DWORD,REGSAM,const LPSECURITY_ATTRIBUTES,PHKEY,LPDWORD,HANDLE,PVOID); +WINADVAPI LONG WINAPI RegCreateKeyTransactedA + ( HKEY, LPCSTR, DWORD, LPSTR, DWORD, REGSAM, const LPSECURITY_ATTRIBUTES, + PHKEY, LPDWORD, HANDLE, PVOID + ); +WINADVAPI LONG WINAPI RegCreateKeyTransactedW + ( HKEY, LPCWSTR, DWORD, LPWSTR, DWORD, REGSAM, const LPSECURITY_ATTRIBUTES, + PHKEY, LPDWORD, HANDLE, PVOID + ); +#define RegDeleteKeyTransacted __AW_SUFFIXED__(RegDeleteKeyTransacted) /* https://msdn.microsoft.com/en-us/library/aa965883%28v=vs.85%29.aspx */ -WINADVAPI LONG WINAPI RegDeleteKeyTransactedA(HKEY,LPCSTR,REGSAM,DWORD,HANDLE,PVOID); -WINADVAPI LONG WINAPI RegDeleteKeyTransactedW(HKEY,LPCWSTR,REGSAM,DWORD,HANDLE,PVOID); +WINADVAPI LONG WINAPI RegDeleteKeyTransactedA + ( HKEY, LPCSTR, REGSAM, DWORD, HANDLE, PVOID + ); +WINADVAPI LONG WINAPI RegDeleteKeyTransactedW + ( HKEY, LPCWSTR, REGSAM, DWORD, HANDLE, PVOID + ); +#define RegDeleteKeyValue __AW_SUFFIXED__(RegDeleteKeyValue) /* https://msdn.microsoft.com/en-us/library/ms724848%28v=vs.85%29.aspx */ -WINADVAPI LONG WINAPI RegDeleteKeyValueA(HKEY,LPCSTR,LPCSTR); -WINADVAPI LONG WINAPI RegDeleteKeyValueW(HKEY,LPCWSTR,LPCWSTR); +WINADVAPI LONG WINAPI RegDeleteKeyValueA (HKEY, LPCSTR, LPCSTR); +WINADVAPI LONG WINAPI RegDeleteKeyValueW (HKEY, LPCWSTR, LPCWSTR); + +#define RegDeleteTree __AW_SUFFIXED__(RegDeleteTree) /* https://msdn.microsoft.com/en-us/library/aa379776%28v=vs.85%29.aspx */ -WINADVAPI LONG WINAPI RegDeleteTreeA(HKEY,LPCSTR); -WINADVAPI LONG WINAPI RegDeleteTreeW(HKEY,LPCWSTR); +WINADVAPI LONG WINAPI RegDeleteTreeA (HKEY, LPCSTR); +WINADVAPI LONG WINAPI RegDeleteTreeW (HKEY, LPCWSTR); + /* https://msdn.microsoft.com/en-us/library/ms724855%28v=vs.85%29.aspx */ -WINADVAPI LONG WINAPI RegDisablePredefinedCacheEx(void); +WINADVAPI LONG WINAPI RegDisablePredefinedCacheEx (void); + +#define RegGetValue __AW_SUFFIXED__(RegGetValue) /* https://msdn.microsoft.com/en-us/library/ms724868%28v=vs.85%29.aspx */ -WINADVAPI LONG WINAPI RegGetValueA(HKEY,LPCSTR,LPCSTR,DWORD,LPDWORD,PVOID,LPDWORD); -WINADVAPI LONG WINAPI RegGetValueW(HKEY,LPCWSTR,LPCWSTR,DWORD,LPDWORD,PVOID,LPDWORD); +WINADVAPI LONG WINAPI RegGetValueA + ( HKEY, LPCSTR, LPCSTR, DWORD, LPDWORD, PVOID, LPDWORD + ); +WINADVAPI LONG WINAPI RegGetValueW + ( HKEY, LPCWSTR, LPCWSTR, DWORD, LPDWORD, PVOID, LPDWORD + ); +#define RegLoadMUIString __AW_SUFFIXED__(RegLoadMUIString) /* https://msdn.microsoft.com/en-us/library/ms724890%28v=vs.85%29.aspx */ -WINADVAPI LONG WINAPI RegLoadMUIStringA(HKEY,LPCSTR,LPSTR,DWORD,LPDWORD,DWORD,LPCSTR); -WINADVAPI LONG WINAPI RegLoadMUIStringW(HKEY,LPCWSTR,LPWSTR,DWORD,LPDWORD,DWORD,LPCWSTR); +WINADVAPI LONG WINAPI RegLoadMUIStringA + ( HKEY, LPCSTR, LPSTR, DWORD, LPDWORD, DWORD, LPCSTR + ); +WINADVAPI LONG WINAPI RegLoadMUIStringW + ( HKEY, LPCWSTR, LPWSTR, DWORD, LPDWORD, DWORD, LPCWSTR + ); +#define RegOpenKeyTransacted __AW_SUFFIXED__(RegOpenKeyTransacted) /* https://msdn.microsoft.com/en-us/library/aa965886%28v=vs.85%29.aspx */ -WINADVAPI LONG WINAPI RegOpenKeyTransactedA(HKEY,LPCSTR,DWORD,REGSAM,PHKEY,HANDLE,PVOID); -WINADVAPI LONG WINAPI RegOpenKeyTransactedW(HKEY,LPCWSTR,DWORD,REGSAM,PHKEY,HANDLE,PVOID); +WINADVAPI LONG WINAPI RegOpenKeyTransactedA + ( HKEY, LPCSTR, DWORD, REGSAM, PHKEY, HANDLE, PVOID + ); +WINADVAPI LONG WINAPI RegOpenKeyTransactedW + ( HKEY, LPCWSTR, DWORD, REGSAM, PHKEY, HANDLE, PVOID + ); +#define RegSetKeyValue __AW_SUFFIXED__(RegSetKeyValue) /* https://msdn.microsoft.com/en-us/library/ms724921%28v=vs.85%29.aspx */ -WINADVAPI LONG WINAPI RegSetKeyValueA(HKEY,LPCSTR,LPCSTR,DWORD,LPCVOID,DWORD); -WINADVAPI LONG WINAPI RegSetKeyValueW(HKEY,LPCWSTR,LPCWSTR,DWORD,LPCVOID,DWORD); - -#define RegCopyTree __AW(RegCopyTree) -#define RegCreateKeyTransacted __AW(RegCreateKeyTransacted) -#define RegDeleteKeyTransacted __AW(RegDeleteKeyTransacted) -#define RegDeleteKeyValue __AW(RegDeleteKeyValue) -#define RegDeleteTree __AW(RegDeleteTree) -#define RegGetValue __AW(RegGetValue) -#define RegLoadMUIString __AW(RegLoadMUIString) -#define RegOpenKeyTransacted __AW(RegOpenKeyTransacted) -#define RegSetKeyValue __AW(RegSetKeyValue) -#endif /* (_WIN32_WINNT >= _WIN32_WINNT_VISTA) */ - -#endif /* ! RC_INVOKED */ - -#ifdef __cplusplus -} -#endif +WINADVAPI LONG WINAPI RegSetKeyValueA + ( HKEY, LPCSTR, LPCSTR, DWORD, LPCVOID, DWORD + ); +WINADVAPI LONG WINAPI RegSetKeyValueW + ( HKEY, LPCWSTR, LPCWSTR, DWORD, LPCVOID, DWORD + ); +#endif /* _WIN32_WINNT >= _WIN32_WINNT_VISTA */ +#endif /* _WIN32_WINNT >= _WIN32_WINNT_WS03 */ +#endif /* _WIN32_WINNT >= _WIN32_WINNT_WINXP */ -#endif +#endif /* ! RC_INVOKED */ + +_END_C_DECLS + +#endif /* !_WINREG_H: $RCSfile$: end of file */ https://sf.net/p/mingw/mingw-org-wsl/ci/61755ebc0a9abed29e1a77a8015aabbd005c17c3/ commit 61755ebc0a9abed29e1a77a8015aabbd005c17c3 Author: Sebastián Puebla <sp...@us...> Date: Wed Dec 20 22:25:54 2017 +0000 Update registry management API, per issue [#2262]. diff --git a/w32api/ChangeLog b/w32api/ChangeLog index 3ed58a1..c0ef29d 100644 --- a/w32api/ChangeLog +++ b/w32api/ChangeLog @@ -1,3 +1,54 @@ +2017-12-20 Sebastián Puebla <sp...@us...> + + Update registry management API, per issue [#2262]. + + * include/winreg.h: Merge changes from 4.1-dev branch. + (REG_LATEST_FORMAT, REG_NO_COMPRESSION, REG_OPTION_BACKUP_RESTORE) + (REG_STANDARD_FORMAT, RRF_RT_ANY, RRF_RT_DWORD, RRF_RT_QWORD) + (RRF_RT_REG_BINARY, RRF_RT_REG_DWORD, RRF_RT_REG_EXPAND_SZ) + (RRF_RT_REG_MULTI_SZ, RRF_RT_REG_NONE, RRF_RT_REG_QWORD, RRF_RT_REG_SZ) + (RRF_NOEXPAND, RRF_SUBKEY_WOW6464KEY, RRF_SUBKEY_WOW6432KEY) + (RRF_ZEROONFAILURE): New manifest constants; define them. + (RegDisablePredefinedCache, RegOpenCurrentUser, RegOpenUserClassesRoot) + (RegOverridePredefKey): Add previously omitted function prototypes. + [_WIN32_WINNT >= _WIN32_WINNT_WINXP] (RegSaveKeyEx): Define... + [!defined UNICODE] (__AW): ...mapping it for SBCS/MBCS case, or... + [defined UNICODE] (__AW): ...for UTF-16LE case to either one of... + (RegSaveKeyExA, RegSaveKeyExW): ...these, respectively, and... + [_WIN32_WINNT >= _WIN32_WINNT_WINXP]: ...declare function prototypes. + [_WIN32_WINNT >= _WIN32_WINNT_WS03] (RegDisableReflectionKey) + (RegEnableReflectionKey, RegQueryReflectionKey): Declare prototypes. + [_WIN32_WINNT >= _WIN32_WINNT_VISTA] (RegCopyTreeA, RegCopyTreeW) + (RegCreateKeyTransactedA, RegCreateKeyTransactedW) + (RegDeleteKeyTransactedA, RegDeleteKeyTransactedW) + (RegDeleteKeyValueA, RegDeleteKeyValueW) + (RegDeleteTreeA, RegDeleteTreeW, RegDisablePredefinedCacheEx) + (RegGetValueA, RegGetValueW, RegLoadMUIStringA, RegLoadMUIStringW) + (RegOpenKeyTransactedA, RegOpenKeyTransactedW) + (RegSetKeyValueA, RegSetKeyValueW): Declare prototypes. + [_WIN32_WINNT >= _WIN32_WINNT_VISTA] (RegCopyTree) + (RegCreateKeyTransacted, RegDeleteKeyTransacted, RegDeleteKeyValue) + (RegDeleteTree, RegGetValue, RegLoadMUIString, RegOpenKeyTransacted) + (RegSetKeyValue): Define, mapping each to its respective function... + [!defined UNICODE] (__AW): ...for the SBCS/MBCS case, or... + [defined UNICODE] (__AW): ...for the UTF-16LE case. + + * lib/kernel32.def (RegDeleteTreeA@8, RegDeleteTreeW@8) + (RegDisablePredefinedCacheEx@0, RegGetValueA@28, RegGetValueW@28) + (RegLoadMUIStringA@28, RegLoadMUIStringW@28, RegSaveKeyExA@16) + (RegSaveKeyExW@16): Remove them; relocate them to... + * lib/advapi32.def (RegDeleteTreeA@8, RegDeleteTreeW@8) + (RegDisablePredefinedCacheEx@0, RegGetValueA@28, RegGetValueW@28) + (RegLoadMUIStringA@28, RegLoadMUIStringW@28, RegSaveKeyExA@16) + (RegSaveKeyExW@16): ...their correct location, here. + (RegCopyTreeA@12, RegCopyTreeW@12, RegQueryReflectionKey@8) + (RegCreateKeyTransactedA@44, RegCreateKeyTransactedW@44) + (RegDeleteKeyTransactedA@24, RegDeleteKeyTransactedW@24) + (RegDeleteKeyValueA@12, RegDeleteKeyValueW@12) + (RegDisableReflectionKey@4, RegEnableReflectionKey@4) + (RegOpenKeyTransactedA@28, RegOpenKeyTransactedW@28) + (RegSetKeyValueA@24, RegSetKeyValueW@24): Add these. + 2017-12-16 Keith Marshall <ke...@us...> Provide default definition for _WIN32_IE feature test macro. diff --git a/w32api/include/winreg.h b/w32api/include/winreg.h index 81aebba..48927cf 100644 --- a/w32api/include/winreg.h +++ b/w32api/include/winreg.h @@ -1,8 +1,30 @@ +/** + * @file winreg.h + * Copyright 2012, 2013 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 _WINREG_H -#define _WINREG_H -#if __GNUC__ >= 3 #pragma GCC system_header -#endif +#define _WINREG_H +#include <_mingw.h> #ifndef WINADVAPI #define WINADVAPI @@ -11,6 +33,9 @@ #ifdef __cplusplus extern "C" { #endif + +#include <reason.h> + #define HKEY_CLASSES_ROOT ((HKEY)0x80000000) #define HKEY_CURRENT_USER ((HKEY)0x80000001) #define HKEY_LOCAL_MACHINE ((HKEY)0x80000002) @@ -20,6 +45,8 @@ extern "C" { #define HKEY_DYN_DATA ((HKEY)0x80000006) #define REG_OPTION_VOLATILE 1 #define REG_OPTION_NON_VOLATILE 0 +/* https://msdn.microsoft.com/en-us/library/aa965882%28v=vs.85%29.aspx */ +#define REG_OPTION_BACKUP_RESTORE 4 #define REG_CREATED_NEW_KEY 1 #define REG_OPENED_EXISTING_KEY 2 #define REG_NONE 0 @@ -40,6 +67,25 @@ extern "C" { #define REG_NOTIFY_CHANGE_ATTRIBUTES 2 #define REG_NOTIFY_CHANGE_LAST_SET 4 #define REG_NOTIFY_CHANGE_SECURITY 8 +/* https://msdn.microsoft.com/en-us/library/ms724868%28v=vs.85%29.aspx */ +#define RRF_RT_REG_NONE 0x00000001 +#define RRF_RT_REG_SZ 0x00000002 +#define RRF_RT_REG_EXPAND_SZ 0x00000004 +#define RRF_RT_REG_BINARY 0x00000008 +#define RRF_RT_REG_DWORD 0x00000010 +#define RRF_RT_DWORD 0x00000018 +#define RRF_RT_REG_MULTI_SZ 0x00000020 +#define RRF_RT_REG_QWORD 0x00000040 +#define RRF_RT_QWORD 0x00000048 +#define RRF_RT_ANY 0x0000ffff +#define RRF_SUBKEY_WOW6464KEY 0x00010000 +#define RRF_SUBKEY_WOW6432KEY 0x00020000 +#define RRF_NOEXPAND 0x10000000 +#define RRF_ZEROONFAILURE 0x20000000 +/* https://msdn.microsoft.com/en-us/library/ms724919%28v=vs.85%29.aspx */ +#define REG_STANDARD_FORMAT 1 +#define REG_LATEST_FORMAT 2 +#define REG_NO_COMPRESSION 4 #ifndef RC_INVOKED typedef ACCESS_MASK REGSAM; @@ -68,12 +114,11 @@ WINADVAPI LONG WINAPI RegCreateKeyExW(HKEY,LPCWSTR,DWORD,LPWSTR,DWORD,REGSAM,LPS WINADVAPI LONG WINAPI RegCreateKeyW(HKEY,LPCWSTR,PHKEY); WINADVAPI LONG WINAPI RegDeleteKeyA(HKEY,LPCSTR); WINADVAPI LONG WINAPI RegDeleteKeyW(HKEY,LPCWSTR); -#if (WINVER >= 0x0502) -WINADVAPI LONG WINAPI RegDeleteKeyExA(HKEY,LPCSTR,REGSAM,DWORD); -WINADVAPI LONG WINAPI RegDeleteKeyExW(HKEY,LPCWSTR,REGSAM,DWORD); -#endif + WINADVAPI LONG WINAPI RegDeleteValueA(HKEY,LPCSTR); WINADVAPI LONG WINAPI RegDeleteValueW(HKEY,LPCWSTR); +/* https://msdn.microsoft.com/en-us/library/ms724854%28v=vs.85%29.aspx */ +WINADVAPI LONG WINAPI RegDisablePredefinedCache(void); WINADVAPI LONG WINAPI RegEnumKeyA(HKEY,DWORD,LPSTR,DWORD); WINADVAPI LONG WINAPI RegEnumKeyW(HKEY,DWORD,LPWSTR,DWORD); WINADVAPI LONG WINAPI RegEnumKeyExA(HKEY,DWORD,LPSTR,PDWORD,PDWORD,LPSTR,PDWORD,PFILETIME); @@ -85,10 +130,16 @@ WINADVAPI LONG WINAPI RegGetKeySecurity(HKEY,SECURITY_INFORMATION,PSECURITY_DESC WINADVAPI LONG WINAPI RegLoadKeyA(HKEY,LPCSTR,LPCSTR); WINADVAPI LONG WINAPI RegLoadKeyW(HKEY,LPCWSTR,LPCWSTR); WINADVAPI LONG WINAPI RegNotifyChangeKeyValue(HKEY,BOOL,DWORD,HANDLE,BOOL); +/* https://msdn.microsoft.com/en-us/library/ms724894%28v=vs.85%29.aspx */ +WINADVAPI LONG WINAPI RegOpenCurrentUser(REGSAM,PHKEY); WINADVAPI LONG WINAPI RegOpenKeyA(HKEY,LPCSTR,PHKEY); WINADVAPI LONG WINAPI RegOpenKeyExA(HKEY,LPCSTR,DWORD,REGSAM,PHKEY); WINADVAPI LONG WINAPI RegOpenKeyExW(HKEY,LPCWSTR,DWORD,REGSAM,PHKEY); WINADVAPI LONG WINAPI RegOpenKeyW(HKEY,LPCWSTR,PHKEY); +/* https://msdn.microsoft.com/en-us/library/ms724899%28v=vs.85%29.aspx */ +WINADVAPI LONG WINAPI RegOpenUserClassesRoot(HANDLE,DWORD,REGSAM,PHKEY); +/* https://msdn.microsoft.com/en-us/library/ms724901%28v=vs.85%29.aspx */ +WINADVAPI LONG WINAPI RegOverridePredefKey(HKEY,HKEY); WINADVAPI LONG WINAPI RegQueryInfoKeyA(HKEY,LPSTR,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PFILETIME); WINADVAPI LONG WINAPI RegQueryInfoKeyW(HKEY,LPWSTR,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PFILETIME); WINADVAPI LONG WINAPI RegQueryMultipleValuesA(HKEY,PVALENTA,DWORD,LPSTR,LPDWORD); @@ -111,65 +162,100 @@ WINADVAPI LONG WINAPI RegSetValueW(HKEY,LPCWSTR,DWORD,LPCWSTR,DWORD); WINADVAPI LONG WINAPI RegUnLoadKeyA(HKEY,LPCSTR); WINADVAPI LONG WINAPI RegUnLoadKeyW(HKEY,LPCWSTR); -#ifdef UNICODE -typedef VALENTW VALENT,*PVALENT; -#define AbortSystemShutdown AbortSystemShutdownW -#define InitiateSystemShutdown InitiateSystemShutdownW -#define RegConnectRegistry RegConnectRegistryW -#define RegCreateKey RegCreateKeyW -#define RegCreateKeyEx RegCreateKeyExW -#define RegDeleteKey RegDeleteKeyW -#if (WINVER >= 0x0502) -#define RegDeleteKeyEx RegDeleteKeyExW -#endif -#define RegDeleteValue RegDeleteValueW -#define RegEnumKey RegEnumKeyW -#define RegEnumKeyEx RegEnumKeyExW -#define RegEnumValue RegEnumValueW -#define RegLoadKey RegLoadKeyW -#define RegOpenKey RegOpenKeyW -#define RegOpenKeyEx RegOpenKeyExW -#define RegQueryInfoKey RegQueryInfoKeyW -#define RegQueryMultipleValues RegQueryMultipleValuesW -#define RegQueryValue RegQueryValueW -#define RegQueryValueEx RegQueryValueExW -#define RegReplaceKey RegReplaceKeyW -#define RegRestoreKey RegRestoreKeyW -#define RegSaveKey RegSaveKeyW -#define RegSetValue RegSetValueW -#define RegSetValueEx RegSetValueExW -#define RegUnLoadKey RegUnLoadKeyW -#else -typedef VALENTA VALENT,*PVALENT; -#define AbortSystemShutdown AbortSystemShutdownA -#define InitiateSystemShutdown InitiateSystemShutdownA -#define RegConnectRegistry RegConnectRegistryA -#define RegCreateKey RegCreateKeyA -#define RegCreateKeyEx RegCreateKeyExA -#define RegDeleteKey RegDeleteKeyA -#if (WINVER >= 0x0502) -#define RegDeleteKeyEx RegDeleteKeyExA -#endif -#define RegDeleteValue RegDeleteValueA -#define RegEnumKey RegEnumKeyA -#define RegEnumKeyEx RegEnumKeyExA -#define RegEnumValue RegEnumValueA -#define RegLoadKey RegLoadKeyA -#define RegOpenKey RegOpenKeyA -#define RegOpenKeyEx RegOpenKeyExA -#define RegQueryInfoKey RegQueryInfoKeyA -#define RegQueryMultipleValues RegQueryMultipleValuesA -#define RegQueryValue RegQueryValueA -#define RegQueryValueEx RegQueryValueExA -#define RegReplaceKey RegReplaceKeyA -#define RegRestoreKey RegRestoreKeyA -#define RegSaveKey RegSaveKeyA -#define RegSetValue RegSetValueA -#define RegSetValueEx RegSetValueExA -#define RegUnLoadKey RegUnLoadKeyA -#endif -#endif +typedef __AW(VALENT) VALENT,*PVALENT; +#define AbortSystemShutdown __AW(AbortSystemShutdown) +#define InitiateSystemShutdown __AW(InitiateSystemShutdown) +#define RegConnectRegistry __AW(RegConnectRegistry) +#define RegCreateKey __AW(RegCreateKey) +#define RegCreateKeyEx __AW(RegCreateKeyEx) +#define RegDeleteKey __AW(RegDeleteKey) + +#define RegDeleteValue __AW(RegDeleteValue) +#define RegEnumKey __AW(RegEnumKey) +#define RegEnumKeyEx __AW(RegEnumKeyEx) +#define RegEnumValue __AW(RegEnumValue) +#define RegLoadKey __AW(RegLoadKey) +#define RegOpenKey __AW(RegOpenKey) +#define RegOpenKeyEx __AW(RegOpenKeyEx) +#define RegQueryInfoKey __AW(RegQueryInfoKey) +#define RegQueryMultipleValues __AW(RegQueryMultipleValues) +#define RegQueryValue __AW(RegQueryValue) +#define RegQueryValueEx __AW(RegQueryValueEx) +#define RegReplaceKey __AW(RegReplaceKey) +#define RegRestoreKey __AW(RegRestoreKey) +#define RegSaveKey __AW(RegSaveKey) +#define RegSetValue __AW(RegSetValue) +#define RegSetValueEx __AW(RegSetValueEx) +#define RegUnLoadKey __AW(RegUnLoadKey) + +#if (_WIN32_WINNT >= _WIN32_WINNT_WIN2K) +WINADVAPI LONG WINAPI RegDeleteKeyExA(HKEY,LPCSTR,REGSAM,DWORD); +WINADVAPI LONG WINAPI RegDeleteKeyExW(HKEY,LPCWSTR,REGSAM,DWORD); +#define RegDeleteKeyEx __AW(RegDeleteKeyEx) +#endif /* (_WIN32_WINNT >= _WIN32_WINNT_WIN2K) */ + +#if (_WIN32_WINNT >= _WIN32_WINNT_WINXP) +/* https://msdn.microsoft.com/en-us/library/ms724919%28v=vs.85%29.aspx */ +WINADVAPI LONG WINAPI RegSaveKeyExA(HKEY,LPCSTR,LPSECURITY_ATTRIBUTES,DWORD); +WINADVAPI LONG WINAPI RegSaveKeyExW(HKEY,LPCWSTR,LPSECURITY_ATTRIBUTES,DWORD); +#define RegSaveKeyEx __AW(RegSaveKeyEx) +#endif /* (_WIN32_WINNT >= _WIN32_WINNT_WINXP) */ + +#if (_WIN32_WINNT >= _WIN32_WINNT_WS03) +/* https://msdn.microsoft.com/en-us/library/ms724858%28v=vs.85%29.aspx */ +WINADVAPI LONG WINAPI RegDisableReflectionKey(HKEY); +/* https://msdn.microsoft.com/en-us/library/ms724859%28v=vs.85%29.aspx */ +WINADVAPI LONG WINAPI RegEnableReflectionKey(HKEY); +/* https://msdn.microsoft.com/en-us/library/ms724907%28v=vs.85%29.aspx */ +WINADVAPI LONG WINAPI RegQueryReflectionKey(HKEY,BOOL*); +#endif /* (_WIN32_WINNT >= _WIN32_WINNT_WS03) */ + +#if (_WIN32_WINNT >= _WIN32_WINNT_VISTA) +/* https://msdn.microsoft.com/en-us/library/aa379768%28v=vs.85%29.aspx */ +WINADVAPI LONG WINAPI RegCopyTreeA(HKEY,LPCSTR,HKEY); +WINADVAPI LONG WINAPI RegCopyTreeW(HKEY,LPCWSTR,HKEY); +/* https://msdn.microsoft.com/en-us/library/aa965882%28v=vs.85%29.aspx */ +WINADVAPI LONG WINAPI RegCreateKeyTransactedA(HKEY,LPCSTR,DWORD,LPSTR,DWORD,REGSAM,const LPSECURITY_ATTRIBUTES,PHKEY,LPDWORD,HANDLE,PVOID); +WINADVAPI LONG WINAPI RegCreateKeyTransactedW(HKEY,LPCWSTR,DWORD,LPWSTR,DWORD,REGSAM,const LPSECURITY_ATTRIBUTES,PHKEY,LPDWORD,HANDLE,PVOID); +/* https://msdn.microsoft.com/en-us/library/aa965883%28v=vs.85%29.aspx */ +WINADVAPI LONG WINAPI RegDeleteKeyTransactedA(HKEY,LPCSTR,REGSAM,DWORD,HANDLE,PVOID); +WINADVAPI LONG WINAPI RegDeleteKeyTransactedW(HKEY,LPCWSTR,REGSAM,DWORD,HANDLE,PVOID); +/* https://msdn.microsoft.com/en-us/library/ms724848%28v=vs.85%29.aspx */ +WINADVAPI LONG WINAPI RegDeleteKeyValueA(HKEY,LPCSTR,LPCSTR); +WINADVAPI LONG WINAPI RegDeleteKeyValueW(HKEY,LPCWSTR,LPCWSTR); +/* https://msdn.microsoft.com/en-us/library/aa379776%28v=vs.85%29.aspx */ +WINADVAPI LONG WINAPI RegDeleteTreeA(HKEY,LPCSTR); +WINADVAPI LONG WINAPI RegDeleteTreeW(HKEY,LPCWSTR); +/* https://msdn.microsoft.com/en-us/library/ms724855%28v=vs.85%29.aspx */ +WINADVAPI LONG WINAPI RegDisablePredefinedCacheEx(void); +/* https://msdn.microsoft.com/en-us/library/ms724868%28v=vs.85%29.aspx */ +WINADVAPI LONG WINAPI RegGetValueA(HKEY,LPCSTR,LPCSTR,DWORD,LPDWORD,PVOID,LPDWORD); +WINADVAPI LONG WINAPI RegGetValueW(HKEY,LPCWSTR,LPCWSTR,DWORD,LPDWORD,PVOID,LPDWORD); +/* https://msdn.microsoft.com/en-us/library/ms724890%28v=vs.85%29.aspx */ +WINADVAPI LONG WINAPI RegLoadMUIStringA(HKEY,LPCSTR,LPSTR,DWORD,LPDWORD,DWORD,LPCSTR); +WINADVAPI LONG WINAPI RegLoadMUIStringW(HKEY,LPCWSTR,LPWSTR,DWORD,LPDWORD,DWORD,LPCWSTR); +/* https://msdn.microsoft.com/en-us/library/aa965886%28v=vs.85%29.aspx */ +WINADVAPI LONG WINAPI RegOpenKeyTransactedA(HKEY,LPCSTR,DWORD,REGSAM,PHKEY,HANDLE,PVOID); +WINADVAPI LONG WINAPI RegOpenKeyTransactedW(HKEY,LPCWSTR,DWORD,REGSAM,PHKEY,HANDLE,PVOID); +/* https://msdn.microsoft.com/en-us/library/ms724921%28v=vs.85%29.aspx */ +WINADVAPI LONG WINAPI RegSetKeyValueA(HKEY,LPCSTR,LPCSTR,DWORD,LPCVOID,DWORD); +WINADVAPI LONG WINAPI RegSetKeyValueW(HKEY,LPCWSTR,LPCWSTR,DWORD,LPCVOID,DWORD); + +#define RegCopyTree __AW(RegCopyTree) +#define RegCreateKeyTransacted __AW(RegCreateKeyTransacted) +#define RegDeleteKeyTransacted __AW(RegDeleteKeyTransacted) +#define RegDeleteKeyValue __AW(RegDeleteKeyValue) +#define RegDeleteTree __AW(RegDeleteTree) +#define RegGetValue __AW(RegGetValue) +#define RegLoadMUIString __AW(RegLoadMUIString) +#define RegOpenKeyTransacted __AW(RegOpenKeyTransacted) +#define RegSetKeyValue __AW(RegSetKeyValue) +#endif /* (_WIN32_WINNT >= _WIN32_WINNT_VISTA) */ + +#endif /* ! RC_INVOKED */ + #ifdef __cplusplus } #endif + #endif diff --git a/w32api/lib/advapi32.def b/w32api/lib/advapi32.def index dd358d4..6689a03 100644 --- a/w32api/lib/advapi32.def +++ b/w32api/lib/advapi32.def @@ -389,17 +389,30 @@ ReadEventLogW@28 RegCloseKey@4 RegConnectRegistryA@12 RegConnectRegistryW@12 +RegCopyTreeA@12 +RegCopyTreeW@12 RegCreateKeyA@12 RegCreateKeyExA@36 RegCreateKeyExW@36 +RegCreateKeyTransactedA@44 +RegCreateKeyTransactedW@44 RegCreateKeyW@12 RegDeleteKeyA@8 RegDeleteKeyW@8 RegDeleteKeyExA@16 RegDeleteKeyExW@16 +RegDeleteKeyTransactedA@24 +RegDeleteKeyTransactedW@24 +RegDeleteKeyValueA@12 +RegDeleteKeyValueW@12 +RegDeleteTreeA@8 +RegDeleteTreeW@8 RegDeleteValueA@8 RegDeleteValueW@8 RegDisablePredefinedCache@0 +RegDisablePredefinedCacheEx@0 +RegDisableReflectionKey@4 +RegEnableReflectionKey@4 RegEnumKeyA@16 RegEnumKeyExA@32 RegEnumKeyExW@32 @@ -408,13 +421,19 @@ RegEnumValueA@32 RegEnumValueW@32 RegFlushKey@4 RegGetKeySecurity@16 +RegGetValueA@28 +RegGetValueW@28 RegLoadKeyA@12 RegLoadKeyW@12 +RegLoadMUIStringA@28 +RegLoadMUIStringW@28 RegNotifyChangeKeyValue@20 RegOpenCurrentUser@8 RegOpenKeyA@12 RegOpenKeyExA@20 RegOpenKeyExW@20 +RegOpenKeyTransactedA@28 +RegOpenKeyTransactedW@28 RegOpenKeyW@12 RegOpenUserClassesRoot@16 RegOverridePredefKey@8 @@ -422,6 +441,7 @@ RegQueryInfoKeyA@48 RegQueryInfoKeyW@48 RegQueryMultipleValuesA@20 RegQueryMultipleValuesW@20 +RegQueryReflectionKey@8 RegQueryValueA@16 RegQueryValueExA@24 RegQueryValueExW@24 @@ -431,7 +451,11 @@ RegReplaceKeyW@16 RegRestoreKeyA@12 RegRestoreKeyW@12 RegSaveKeyA@12 +RegSaveKeyExA@16 +RegSaveKeyExW@16 RegSaveKeyW@12 +RegSetKeyValueA@24 +RegSetKeyValueW@24 RegSetKeySecurity@12 RegSetValueA@20 RegSetValueExA@24 diff --git a/w32api/lib/kernel32.def b/w32api/lib/kernel32.def index fca559a..f8a7715 100644 --- a/w32api/lib/kernel32.def +++ b/w32api/lib/kernel32.def @@ -957,17 +957,8 @@ ReadFileEx@20 ReadFileScatter@20 ReadProcessMemory@20 ReadThreadProfilingData@12 -RegDeleteTreeA@8 -RegDeleteTreeW@8 -RegDisablePredefinedCacheEx@0 -RegGetValueA@28 -RegGetValueW@28 RegKrnGetGlobalState@0 RegKrnInitialize@12 -RegLoadMUIStringA@28 -RegLoadMUIStringW@28 -RegSaveKeyExA@16 -RegSaveKeyExW@16 RegisterApplicationRecoveryCallback@16 RegisterApplicationRestart@8 RegisterConsoleIME@8 ----------------------------------------------------------------------- Summary of changes: w32api/ChangeLog | 77 ++++++++ w32api/include/winreg.h | 517 ++++++++++++++++++++++++++++++++---------------- w32api/lib/advapi32.def | 24 +++ w32api/lib/kernel32.def | 9 - 4 files changed, 453 insertions(+), 174 deletions(-) hooks/post-receive -- Repository: mingw-org-wsl |
From: Keith M. <no...@so...> - 2017-12-18 11:47:18
|
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, 5.1-trunk has been updated via 8ea0d1ac0c1df465382dc525294b2725757f0628 (commit) from 9808774164e87c6c8534479377191e59e4d1d24c (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/8ea0d1ac0c1df465382dc525294b2725757f0628/ commit 8ea0d1ac0c1df465382dc525294b2725757f0628 Author: Keith Marshall <ke...@us...> Date: Mon Dec 18 11:45:49 2017 +0000 Support strtok() re-entrancy, per request [#2342]. diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog index a628995..2f6fb6b 100644 --- a/mingwrt/ChangeLog +++ b/mingwrt/ChangeLog @@ -1,3 +1,19 @@ +2017-12-18 Keith Marshall <ke...@us...> + + Support strtok() re-entrancy, per request [#2342]. + + * mingwex/strtok_r.c: New file; it implements... + (strtok_r): ...this function, per POSIX.1-1995 specification. + * Makefile.in (libmingwex.a): Add reference; make it depend on... + (strtok_r.$OBJEXT): ...this. + + * include/string.h: Declare corresponding runtime API. + [_POSIX_C_SOURCE >= 199506L] (strtok_r): Add function prototype. + [__MSVCRT_VERSION__ >= __MSVCR80_DLL] (strtok_s): Likewise; this is + the Microsoft equivalent function, first introduced in this non-free + MSVC runtime library; subsequently available in MSVCRT.DLL since... + [_WIN32_WINNT >= _WIN32_WINNT_VISTA]: ...this release, likewise. + 2017-12-16 Keith Marshall <ke...@us...> Implement autotest module for POSIX clock API functions. @@ -12,14 +28,16 @@ * include/time.h [_POSIX_C_SOURCE >= 199309L] (clockid_t): New structured data type; define it opaquely, and... (CLOCK_REALTIME, CLOCK_MONOTONIC): ...declare these extern instances. - [_POSIX_C_SOURCE >= 200809L] (gettimeofday): Mark it "deprecated". - [_POSIX_C_SOURCE >= 199309L] (clock_getres, clock_gettime) - (clock_settime): New functions; declare prototypes. + (clock_getres, clock_gettime, clock_settime): New functions; declare + prototypes. * mingwex/clockapi.h mingwex/clockapi.c mingwex/clockres.c * mingwex/clockset.c mingwex/clocktime.c: New files; they implement the preceding clock instances, and associated API functions. + * include/sys/time.h [_POSIX_C_SOURCE >= 200809L] (gettimeofday): + Mark it as "deprecated". + 2017-12-14 Keith Marshall <ke...@us...> Add support for POSIX.1 "obsolescence" warnings. diff --git a/mingwrt/Makefile.in b/mingwrt/Makefile.in index 024918a..1b8f081 100644 --- a/mingwrt/Makefile.in +++ b/mingwrt/Makefile.in @@ -452,7 +452,7 @@ libmingwex.a: $(addsuffix .$(OBJEXT), clockapi clockres clockset clocktime) libmingwex.a: $(addsuffix .$(OBJEXT), mkstemp mkdtemp cryptnam setenv) libmingwex.a: $(addsuffix .$(OBJEXT), tdelete tfind tsearch twalk) -libmingwex.a: $(addsuffix .$(OBJEXT), dirent wdirent dlfcn strerror_r) +libmingwex.a: $(addsuffix .$(OBJEXT), dirent wdirent dlfcn strerror_r strtok_r) libmingwex.a: $(addsuffix .$(OBJEXT), getdelim gettimeofday) vpath %.s ${mingwrt_srcdir}/mingwex diff --git a/mingwrt/include/string.h b/mingwrt/include/string.h index 288aedc..c982a30 100644 --- a/mingwrt/include/string.h +++ b/mingwrt/include/string.h @@ -199,6 +199,17 @@ __CRT_ALIAS size_t strnlen (const char *__text, size_t __maxlen) #endif /* MSVCRT.DLL || pre-MSVCR80.DLL */ #endif /* _POSIX_C_SOURCE >= 200809L */ +#if _POSIX_C_SOURCE >= 199506L /* SUSv2 */ +/* SUSv2 added a re-entrant variant of strtok(), which maintains state + * using a user supplied reference pointer, rather than the internal + * reference used by strtok() itself, thus making it both thread-safe, + * and suitable for interleaved use on multiple strings, even within a + * single thread context, (which isn't possible with strtok() itself, + * even with Microsoft's intrinsically thread-safe implementation). + */ +extern char *strtok_r +(char *__restrict__, const char *__restrict__, char **__restrict__); + #if _POSIX_C_SOURCE >= 200112L /* POSIX.1-2001 added a re-entrant variant of strerror(), which stores * the message text in a user supplied buffer, rather than in (possibly @@ -210,7 +221,9 @@ __CRT_ALIAS size_t strnlen (const char *__text, size_t __maxlen) * copies of strerror()'s message text. */ extern int strerror_r (int, char *, size_t); -#endif + +#endif /* POSIX.1-2001 */ +#endif /* SUSv2 */ #if __MSVCRT_VERSION__>=__MSVCR80_DLL || _WIN32_WINNT >= _WIN32_WINNT_VISTA /* MSVCR80.DLL introduced a safer, (erroneously so called "more secure"), @@ -219,6 +232,13 @@ extern int strerror_r (int, char *, size_t); */ _CRTIMP __cdecl __MINGW_NOTHROW int strerror_s (char *, size_t, int); +/* Also introduced in MSVCR80.DLL, and retrofitted to MSVCRT.DLL from the + * release of Windows-Vista, strtok_s() is a direct analogue for POSIX.1's + * strtok_r() function; (contrary to Microsoft's description, it is neither + * a "more secure", nor even a "safer" version of strtok() itself). + */ +_CRTIMP __cdecl __MINGW_NOTHROW char *strtok_s (char *, const char *, char **); + #elif _POSIX_C_SOURCE >= 200112L /* For the benefit of pre-Vista MSVCRT.DLL users, we provide an approximate * emulation of strerror_s(), in terms of inline referral to POSIX.1-2001's diff --git a/mingwrt/mingwex/strtok_r.c b/mingwrt/mingwex/strtok_r.c new file mode 100644 index 0000000..87eebea --- /dev/null +++ b/mingwrt/mingwex/strtok_r.c @@ -0,0 +1,75 @@ +/* + * strtok_r.c + * + * Implementation of "re-entrant" version of ISO-C strtok() function. + * + * $Id$ + * + * Written by Keith Marshall <kei...@us...> + * Copyright (C) 2017, 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. + * + */ +#include <string.h> + +char *strtok_r +(char *__restrict__ s, const char *__restrict__ sep, char **__restrict__ state) +{ + /* "Re-entrant" version of ISO-C strtok() function; maintains state + * via caller provided pointer variable, to avoid interference between + * concurrent invocations on distinct source strings. Requires initial + * call with non-NULL "s", to retrieve the first token and initialize + * "state", followed by repeated calls with "s" == NULL, to retrieve + * subsequent tokens. + */ + if( s == NULL ) + /* Non-initialization call; retrieve previously saved state. + */ + s = *state; + + /* Step over any leading separator characters, at the beginning of "s"; + * check that this didn't take us all the way to the terminating NUL... + */ + if( *(s += strspn (s, sep)) == '\0' ) + { + /* ...or if it did, initialize/reset "state", to indicate that there + * are no (more) tokens to retrieve; return NULL token, to indicate + * that there are none available. + */ + *state = s; + return NULL; + } + /* Locate the first separator charactor, if any, following the current + * token; reset "state" to mark its position, then, ensuring that we + * never advance beyond the terminal NUL of "s"... + */ + if( *(*state = s + strcspn (s, sep)) != '\0' ) + /* ...when an actual separator has been identified, replace it with + * NUL, to terminate the token, and advance "state" to the point at + * which scanning for any potential "next" token should resume. + */ + *(*state)++ = '\0'; + + return s; +} + +/* $RCSfile$: end of file */ ----------------------------------------------------------------------- Summary of changes: mingwrt/ChangeLog | 24 +++++++++++++-- mingwrt/Makefile.in | 2 +- mingwrt/include/string.h | 22 +++++++++++++- mingwrt/mingwex/strtok_r.c | 75 ++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 118 insertions(+), 5 deletions(-) create mode 100644 mingwrt/mingwex/strtok_r.c hooks/post-receive -- Repository: mingw-org-wsl |
From: Keith M. <no...@so...> - 2017-12-17 16:00:19
|
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, master has been deleted was b6761db45b70f7def58ec55186574a084836450e - Log ----------------------------------------------------------------- b6761db45b70f7def58ec55186574a084836450e Ticket [#2050] Missing definition of FILE_FLAG_FIRST_PIPE_INSTANCE. ----------------------------------------------------------------------- hooks/post-receive -- Repository: mingw-org-wsl |
From: Keith M. <no...@so...> - 2017-12-17 13:10:29
|
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, 5.1-trunk has been created at 9808774164e87c6c8534479377191e59e4d1d24c (commit) - Log ----------------------------------------------------------------- https://sf.net/p/mingw/mingw-org-wsl/ci/9808774164e87c6c8534479377191e59e4d1d24c/ commit 9808774164e87c6c8534479377191e59e4d1d24c Author: Keith Marshall <ke...@us...> Date: Sat Dec 16 21:22:19 2017 +0000 Provide default definition for _WIN32_IE feature test macro. diff --git a/w32api/ChangeLog b/w32api/ChangeLog index 2efc39f..3ed58a1 100644 --- a/w32api/ChangeLog +++ b/w32api/ChangeLog @@ -1,3 +1,13 @@ +2017-12-16 Keith Marshall <ke...@us...> + + Provide default definition for _WIN32_IE feature test macro. + + * include/sdkddkver.h [!defined _WIN32_IE]: Define it, with... + (_WIN32_IE_IE50): ...this default value. + + * include/commctrl.h (_WIN32_IE): Delete definition hint; it offered + a conflicting proposal for the default value. + 2017-12-06 Keith Marshall <ke...@us...> Prepare and publish MinGW.org WSL-5.0.2 release. diff --git a/w32api/include/commctrl.h b/w32api/include/commctrl.h index ffb6d88..cb66b21 100644 --- a/w32api/include/commctrl.h +++ b/w32api/include/commctrl.h @@ -8,12 +8,6 @@ #ifdef __cplusplus extern "C" { #endif -#ifndef _WIN32_IE -/* define _WIN32_IE if you really want it */ -#if 0 -#define _WIN32_IE 0x0300 -#endif -#endif #ifndef COMMCTRLAPI #ifdef __W32API_USE_DLLIMPORT__ diff --git a/w32api/include/sdkddkver.h b/w32api/include/sdkddkver.h index d82e417..474166c 100644 --- a/w32api/include/sdkddkver.h +++ b/w32api/include/sdkddkver.h @@ -201,6 +201,17 @@ # define NTDDI_VERSION NTDDI_VERSION_FROM_WIN32_WINNT(_WIN32_WINNT) #endif +#ifndef _WIN32_IE +/* https://msdn.microsoft.com/en-us/library/windows/desktop/bb776779%28v=vs.85%29.aspx + * specifies that the user should define _WIN32_IE, but in the absence of + * any such definition, a default equivalent to IE-5.0 may be assumed. + */ +# ifdef _WARN_DEFAULTS +# warning "Assuming default _WIN32_IE setting to match _WIN32_IE_IE50" +# endif +# define _WIN32_IE _WIN32_IE_IE50 +#endif + /* Map GCC architecture identification macros to their MSVC equivalents. * This mapping was previously specified in <winnt.h>, and duplicated in * <windows.h>; it is now only defined here, because both <windows.h> and https://sf.net/p/mingw/mingw-org-wsl/ci/dfa8818f90d20c22d41aa87fce32c1075e81ad52/ commit dfa8818f90d20c22d41aa87fce32c1075e81ad52 Author: Keith Marshall <ke...@us...> Date: Sat Dec 16 10:04:49 2017 +0000 Implement autotest module for POSIX clock API functions. diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog index 8d7685e..a628995 100644 --- a/mingwrt/ChangeLog +++ b/mingwrt/ChangeLog @@ -1,3 +1,10 @@ +2017-12-16 Keith Marshall <ke...@us...> + + Implement autotest module for POSIX clock API functions. + + * tests/clockapi.at: New file. + * tests/testsuite.at.in (clockapi.at): Incorporate it. + 2017-12-15 Keith Marshall <ke...@us...> Implement a subset of the POSIX.1b-1993 clock API. diff --git a/mingwrt/tests/clockapi.at b/mingwrt/tests/clockapi.at new file mode 100644 index 0000000..3874608 --- /dev/null +++ b/mingwrt/tests/clockapi.at @@ -0,0 +1,104 @@ +# clockapi.at +# +# Autotest module to verify correct operation of the POSIX.1b-1993 +# clock API functions, providing CLOCK_REALTIME and CLOCK_MONOTONIC. +# +# $Id$ +# +# Written by Keith Marshall <kei...@us...> +# Copyright (C) 2017, 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 THE 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. +# +# +# All tests specified herein are written in the C language. +# +MINGW_AT_LANG([C]) +AT_BANNER([POSIX clock API function checks.]) + +# MINGW_AT_CHECK_CLOCK_WORKS( CLOCK_ID ) +# -------------------------------------- +# Confirm that, for the specified CLOCK_ID, both clock_getres() +# and clock_gettime() return zero, as they should for a correctly +# working clock; (this DOES NOT check for reasonable return values +# within the associated struct timespec argument). +# +m4_define([MINGW_AT_CHECK_CLOCK_WORKS],[dnl +AT_SETUP([$1 availability confirmation])dnl +AT_KEYWORDS([C clock $1])MINGW_AT_CHECK_RUN([[[ +#define _POSIX_C_SOURCE 199309L +#include <time.h> +int main() +{ struct timespec ts; + return clock_getres (]]$1[[, &ts) | clock_gettime (]]$1[[, &ts); +}]]])dnl +AT_CLEANUP +])# MINGW_AT_CHECK_CLOCK_WORKS + +# Apply the preceding availability check for CLOCK_REALTIME, then +# check that it does, in fact, return clock_gettime() results which +# agree closely with the system time reported by the time() function; +# (we note that system latency between the time() and clock_gettime() +# calls may introduce discrepancies between the two time indications, +# so we accept a maximum offset of one time() quantum, i.e. 1 second, +# between the first read clock_gettime() indication, and later time() +# indication, of what should represent the same wall-clock time). +# +MINGW_AT_CHECK_CLOCK_WORKS([CLOCK_REALTIME]) +AT_SETUP([CLOCK_REALTIME agreement with time() function])dnl +AT_KEYWORDS([C clock CLOCK_REALTIME])MINGW_AT_CHECK_RUN([[[ +#define _POSIX_C_SOURCE 199309L +#include <time.h> +int main() +{ struct timespec ts; + return clock_gettime( CLOCK_REALTIME, &ts ) + || ((time( NULL ) - ts.tv_sec) > 1LL); +}]]])dnl +AT_CLEANUP + +# Similarly, apply the availability check for CLOCK_MONOTONIC, then +# verify that it advances monotonically, in temporal synchronicity +# with intervals timed by the time() function, again allowing up to +# one time() quantum of deviation within each sampled interval, to +# account for the possible effect of system latency. +# +MINGW_AT_CHECK_CLOCK_WORKS([CLOCK_MONOTONIC]) +AT_SETUP([CLOCK_MONOTONIC advancement]) +AT_KEYWORDS([C clock CLOCK_MONOTONIC])MINGW_AT_CHECK_RUN([[[ +#define _POSIX_C_SOURCE 199309L +#include <time.h> +#include <unistd.h> +int main() +{ struct timespec ts; + int result = clock_gettime( CLOCK_MONOTONIC, &ts ); + time_t interval, start = time( NULL ); + while( (result == 0) && ((interval = time( NULL ) - start) < 15) ) + { struct timespec at; result = clock_gettime( CLOCK_MONOTONIC, &at ); + if( (at.tv_sec - ts.tv_sec - interval) > 1LL ) + result = -1; + sleep( 2 ); + } + return result; +}]]])dnl +AT_CLEANUP + +# vim: filetype=config formatoptions=croql +# $RCSfile$: end of file diff --git a/mingwrt/tests/testsuite.at.in b/mingwrt/tests/testsuite.at.in index bfe660c..6de6469 100644 --- a/mingwrt/tests/testsuite.at.in +++ b/mingwrt/tests/testsuite.at.in @@ -90,6 +90,7 @@ m4_include([headers.at]) m4_include([ansiprintf.at]) m4_include([logarithms.at]) m4_include([powerfunc.at]) +m4_include([clockapi.at]) # vim: filetype=config formatoptions=croql # $RCSfile$: end of file https://sf.net/p/mingw/mingw-org-wsl/ci/ecc51ca60bf82d678260fa7b119a9f42b3b77fb7/ commit ecc51ca60bf82d678260fa7b119a9f42b3b77fb7 Author: Keith Marshall <ke...@us...> Date: Fri Dec 15 20:58:19 2017 +0000 Implement a subset of the POSIX.1b-1993 clock API. diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog index b006185..8d7685e 100644 --- a/mingwrt/ChangeLog +++ b/mingwrt/ChangeLog @@ -1,3 +1,18 @@ +2017-12-15 Keith Marshall <ke...@us...> + + Implement a subset of the POSIX.1b-1993 clock API. + + * include/time.h [_POSIX_C_SOURCE >= 199309L] + (clockid_t): New structured data type; define it opaquely, and... + (CLOCK_REALTIME, CLOCK_MONOTONIC): ...declare these extern instances. + [_POSIX_C_SOURCE >= 200809L] (gettimeofday): Mark it "deprecated". + [_POSIX_C_SOURCE >= 199309L] (clock_getres, clock_gettime) + (clock_settime): New functions; declare prototypes. + + * mingwex/clockapi.h mingwex/clockapi.c mingwex/clockres.c + * mingwex/clockset.c mingwex/clocktime.c: New files; they implement + the preceding clock instances, and associated API functions. + 2017-12-14 Keith Marshall <ke...@us...> Add support for POSIX.1 "obsolescence" warnings. diff --git a/mingwrt/Makefile.in b/mingwrt/Makefile.in index b80dfb5..024918a 100644 --- a/mingwrt/Makefile.in +++ b/mingwrt/Makefile.in @@ -448,6 +448,7 @@ $(addsuffix fmt.$(OBJEXT),varo crto geto seto crtn getn setn): %.$(OBJEXT): ofmt # libmingwex.a: $(addsuffix .$(OBJEXT), mingw-aligned-malloc mingw-fseek) libmingwex.a: $(addsuffix .$(OBJEXT), glob getopt basename dirname nsleep) +libmingwex.a: $(addsuffix .$(OBJEXT), clockapi clockres clockset clocktime) libmingwex.a: $(addsuffix .$(OBJEXT), mkstemp mkdtemp cryptnam setenv) libmingwex.a: $(addsuffix .$(OBJEXT), tdelete tfind tsearch twalk) diff --git a/mingwrt/include/sys/time.h b/mingwrt/include/sys/time.h index c2d9839..6cc8da3 100644 --- a/mingwrt/include/sys/time.h +++ b/mingwrt/include/sys/time.h @@ -102,10 +102,8 @@ struct timezone * designated as IEEE Std 1003.1, 2016 Edition; the struct timezone pointer * argument of some Unix implementations (declared as a pointer to void in * POSIX.1) is ignored, as are all error conditions. - * - * FIXME: Deprecate this for _POSIX_C_SOURCE >= 200809L */ -int __cdecl __MINGW_NOTHROW gettimeofday +int __cdecl __MINGW_NOTHROW __POSIX_2008_DEPRECATED gettimeofday (struct timeval *__restrict__, void *__restrict__ /* tzp (unused) */); _END_C_DECLS diff --git a/mingwrt/include/time.h b/mingwrt/include/time.h index 634c831..d27add7 100644 --- a/mingwrt/include/time.h +++ b/mingwrt/include/time.h @@ -423,6 +423,34 @@ int nanosleep( const struct timespec *period, struct timespec *residual ) ? (unsigned)(-1) : (unsigned)(period->tv_nsec)); } #endif /* !__NO_INLINE__ */ + +#if _POSIX_C_SOURCE >= 199309L +/* POSIX.1b-1993 introduced the optional POSIX clocks API; it + * was subsequently moved to "base", as of POSIX.1-2008, to the + * extent required to support the CLOCK_REALTIME feature, with + * the remainder of its features remaining optional. We choose + * to provide a subset, supporting CLOCK_MONOTONIC in addition + * to the aforementioned CLOCK_REALTIME feature. + * + * We define the POSIX clockid_t type as a pointer to an opaque + * structure; user code should never need to know details of the + * internal layout of this structure. + */ +typedef struct __clockid__ *clockid_t; + +/* The standard clockid_t entities which we choose to support. + */ +extern clockid_t CLOCK_REALTIME; +extern clockid_t CLOCK_MONOTONIC; + +/* Prototypes for the standard POSIX functions which provide the + * API to these standard clockid_t entities. + */ +int clock_getres (clockid_t, struct timespec *); +int clock_gettime (clockid_t, struct timespec *); +int clock_settime (clockid_t, const struct timespec *); + +#endif /* _POSIX_C_SOURCE >= 199309L */ #endif /* _POSIX_C_SOURCE */ _END_C_DECLS diff --git a/mingwrt/mingwex/clockapi.c b/mingwrt/mingwex/clockapi.c new file mode 100644 index 0000000..47183e3 --- /dev/null +++ b/mingwrt/mingwex/clockapi.c @@ -0,0 +1,138 @@ +/* + * clockapi.c + * + * Implementation of the common elements of the POSIX clock API. + * + * $Id$ + * + * Written by Keith Marshall <kei...@us...> + * Copyright (C) 2017, 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. + * + */ +#include "clockapi.h" + +static struct __clockid__ clock_api[] = +{ { /* CLOCK_REALTIME pre-initialization implementation reference data. + */ + CLOCK_TYPE_REALTIME, /* Fixed category index */ + CLOCK_REALTIME_FREQUENCY, /* Always updated at this frequency */ + 0LL, /* Resolution in ns; needs initialization */ + UNIX_EPOCH_AS_FILETIME /* Fixed timebase reference */ + }, + { /* CLOCK_MONOTONIC pre-initialization implementation reference data. + */ + CLOCK_TYPE_MONOTONIC, /* Fixed category index */ + NANOSECONDS_PER_SECOND, /* Update frequency; needs initialization */ + 0LL, /* Resolution in ns; needs initialization */ + 0LL /* Fixed timebase reference */ + } +}; + +/* Publicly visible references to the preceding (opaque) clock definitions. + */ +clockid_t CLOCK_REALTIME = &clock_api[CLOCK_TYPE_REALTIME]; +clockid_t CLOCK_MONOTONIC = &clock_api[CLOCK_TYPE_MONOTONIC]; + +CLOCK_INLINE +int64_t clock_api_getres_interval( clockid_t clock_api ) +{ + /* Initialization helper for POSIX clock implementation; called ONLY + * by __clock_api_is_valid(), and triggered by an uninitialized value + * of zero (0LL) for the "resolution" field within the implementation + * reference data structure; returns the initialized value thereof. + */ + if( clock_api->resolution > 0LL ) + /* Already initialized: immediately return initialized value. + */ + return clock_api->resolution; + + else if( clock_api->resolution == 0LL ) + /* Not yet initialized: perform type specific initialization. + */ + switch( clock_api->type ) + { + /* We must be prepared to retrieve clock frequencies from Windows + * APIs, which report either LARGE_INTEGER or FILETIME values, but + * we prefer to interpret them as scalar int64_t values. + */ + union { int64_t value; LARGE_INTEGER qpc_value; FILETIME rtc_value; } + freq; + + case CLOCK_TYPE_REALTIME: + /* Clocks in this category use the GetSystemTimeAsFileTime() API + * to read the system clock; although this is nominally updated at + * 100ns intervals, it is unrealistic to expect resolution at such + * a high frequency. Thus, we read it once, then again in a busy + * wait loop, until we detect a change, and compute the actual + * update interval between the two reported values. + */ + GetSystemTimeAsFileTime( &freq.rtc_value ); + clock_api->resolution = freq.value; + do { GetSystemTimeAsFileTime( &freq.rtc_value ); + } while( freq.value == clock_api->resolution ); + freq.value -= clock_api->resolution; + + /* Ultimately, we initialize the effective resolution, converting + * from this indicated count of 100ns intervals, to nanoseconds. + */ + return clock_api->resolution = freq.value * 100LL; + + case CLOCK_TYPE_MONOTONIC: + /* Clocks in this category use the QueryPerformanceCounter() API + * to count arbitrarily scaled time slices, relative to an equally + * arbitrary timebase; we must use the QueryPerformanceFrequency() + * call to verify availability of this API, and to establish its + * update frequency and resolution in nanoseconds. + */ + if( QueryPerformanceFrequency( &freq.qpc_value ) && (freq.value > 0LL) ) + return clock_api->resolution = NANOSECONDS_PER_SECOND + / (clock_api->frequency = freq.value); + } + + /* If we get to here, initialization of the specified clock failed; set + * its "resolution" to -1LL, thus marking it as unavailable. + */ + return clock_api->resolution = ((uint64_t)(clock_api_invalid_error())); +} + +int __clock_api_is_valid( clockid_t clock_id ) +{ + /* Helper function, called by any of clock_getres(), clock_gettime(), + * or clock_settime(), to check availability of the specified clock, + * initializing it if necessary, returning... + */ + if( (clock_id != NULL) + && ((unsigned)(clock_id->type) < CLOCK_TYPE_UNIMPLEMENTED) + && (clock_api_getres_interval( clock_id ) > 0LL) ) + /* + * ...a nominally TRUE value of 1, in the case of a valid clock... + */ + return 1; + + /* ...or FALSE (zero), and setting "errno", otherwise. + */ + errno = EINVAL; + return 0; +} + +/* $RCSfile$: end of file */ diff --git a/mingwrt/mingwex/clockapi.h b/mingwrt/mingwex/clockapi.h new file mode 100644 index 0000000..64fb9ad --- /dev/null +++ b/mingwrt/mingwex/clockapi.h @@ -0,0 +1,90 @@ +/* + * clockapi.h + * + * Private header, declaring the common elements of the POSIX clock API. + * + * $Id$ + * + * Written by Keith Marshall <kei...@us...> + * Copyright (C) 2017, 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. + * + */ +#include <time.h> +#include <stdint.h> +#include <winbase.h> +#include <errno.h> + +typedef enum +{ /* The categories of clock, for which we provide support. + */ + CLOCK_TYPE_REALTIME, /* CLOCK_REALTIME and derivatives */ + CLOCK_TYPE_MONOTONIC, /* CLOCK_MONOTONIC and derivatives */ + + /* Only the above represent valid clock categories; we end the + * enumeration with this comparator reference value, to which, + * when compared as unsigned, all unsupported category values + * will be equal or greater. + */ + CLOCK_TYPE_UNIMPLEMENTED +} CLOCK_TYPE; + +/* POSIX specifies that CLOCK_REALTIME shall report time elapsed, in + * seconds and nanoseconds, since the start of the Unix epoch, (i.e. + * since 1970-01-01 00:00:00), but we count it, in 100ns increments, + * since the start of the Windows FILETIME epoch, (1601-01-01 00:00). + * The following manifest constants facilitate the conversion from + * Windows FILETIME to Unix epoch; (11644473600LL seconds of the + * Windows FILETIME epoch have elapsed, when the Unix epoch begins). + */ +#define NANOSECONDS_PER_SECOND 1000000000LL +#define CLOCK_REALTIME_FREQUENCY (NANOSECONDS_PER_SECOND / 100LL) +#define UNIX_EPOCH_AS_FILETIME (11644473600LL * CLOCK_REALTIME_FREQUENCY) + +typedef struct __clockid__ +{ /* Formal definition of the clockid_t structure; (opaque to + * user application code). + */ + CLOCK_TYPE type; + int64_t frequency; + int64_t resolution; + int64_t timebase; +} *clockid_t; + +/* Prototype for clockid_t validation function; considered private + * within the scope of the implementation, (so not declared publicly), + * this also provides initialization support. + */ +extern int __clock_api_is_valid( clockid_t ); + +#define CLOCK_INLINE static __inline__ __attribute__((__always_inline__)) + +CLOCK_INLINE +int clock_api_invalid_error( void ) +{ /* Inline helper function, to facilitate return from any of the + * standard clock API functions, while setting both "errno", and + * the return status, to report an invalid operation. + */ + errno = EINVAL; return -1; +} + +/* $RCSfile$: end of file */ diff --git a/mingwrt/mingwex/clockres.c b/mingwrt/mingwex/clockres.c new file mode 100644 index 0000000..b1640ed --- /dev/null +++ b/mingwrt/mingwex/clockres.c @@ -0,0 +1,61 @@ +/* + * clockres.c + * + * Implementation of the clock_getres() element of the POSIX clock API. + * + * $Id$ + * + * Written by Keith Marshall <kei...@us...> + * Copyright (C) 2017, 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. + * + */ +#include "clockapi.h" + +int clock_getres( clockid_t clock_id, struct timespec *counter ) +{ + /* Standard API function, first implemented in POSIX.1b-1993, to + * query the resolution of a specified clock; it first initializes + * the clock, if necessary, then returns the resolution value, as + * recorded within the associated implementation data structure, + * together with a "validity check" status code. + */ + if( __clock_api_is_valid( clock_id ) ) + { + /* The clock is valid; its resolution must be broken down into + * separate seconds and nanoseconds components, but only if the + * caller provided a struct timespec to receive them. + */ + if( counter != NULL ) + { counter->tv_nsec = clock_id->resolution % NANOSECONDS_PER_SECOND; + counter->tv_sec = clock_id->resolution / NANOSECONDS_PER_SECOND; + } + /* In any case, we return zero to indicate a valid clock... + */ + return 0; + } + /* ...or -1 otherwise. + */ + return -1; +} + +/* $RCSfile$: end of file */ diff --git a/mingwrt/mingwex/clockset.c b/mingwrt/mingwex/clockset.c new file mode 100644 index 0000000..d3d9a3a --- /dev/null +++ b/mingwrt/mingwex/clockset.c @@ -0,0 +1,48 @@ +/* + * clockset.c + * + * Implementation of the clock_settime() element of the POSIX clock API. + * + * $Id$ + * + * Written by Keith Marshall <kei...@us...> + * Copyright (C) 2017, 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. + * + */ +#include "clockapi.h" + +int clock_settime( clockid_t clock_id, const struct timespec *timeval ) +{ + /* Standard API function, first implemented in POSIX.1b-1993, to + * set (or reset) the time value to be indicated by the specified + * clockid_t entity, if permissable. + * + * FIXME: Decide which clockid_t entities should support any such + * adjustment; for the time being, deny all such requests. + */ + errno = ((timeval != NULL) && __clock_api_is_valid( clock_id )) + ? EPERM : EINVAL; + return -1; +} + +/* $RCSfile$: end of file */ diff --git a/mingwrt/mingwex/clocktime.c b/mingwrt/mingwex/clocktime.c new file mode 100644 index 0000000..91c6c91 --- /dev/null +++ b/mingwrt/mingwex/clocktime.c @@ -0,0 +1,98 @@ +/* + * clocktime.c + * + * Implementation of the clock_gettime() element of the POSIX clock API. + * + * $Id$ + * + * Written by Keith Marshall <kei...@us...> + * Copyright (C) 2017, 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. + * + */ +#include "clockapi.h" + +int clock_gettime( clockid_t clock_id, struct timespec *current ) +{ + /* Standard API function, first implemented in POSIX.1b-1993, to + * read the current time indicated by a specified clock; it first + * initializes the clock, if necessary, then reads its currently + * indicated time, and encodes it for return, in the specified + * "current" timespec structure, together with a "validity check" + * status code. + * + * Note that, unlike the clock_getres() API, it is NOT permitted + * to specify NULL for the timespec parameter here; doing so will + * cause the call to fail, irrespective of the clock validity. + */ + if( current == NULL ) + return clock_api_invalid_error(); + + if( __clock_api_is_valid( clock_id ) ) + { + /* We must be prepared to retrieve clock frequencies from Windows + * APIs, which report either LARGE_INTEGER or FILETIME values, but + * we prefer to interpret them as scalar int64_t values. + */ + union { uint64_t value; LARGE_INTEGER qpc_value; FILETIME rtc_value; } ct; + switch( clock_id->type ) + { + case CLOCK_TYPE_REALTIME: + /* The counter for CLOCK_REALTIME, and any derived clock, is + * represented by system time, expressed as a count of 100ns + * intervals since the start of the Windows FILETIME epoch. + */ + GetSystemTimeAsFileTime( &ct.rtc_value ); + break; + + case CLOCK_TYPE_MONOTONIC: + /* Conversely, the counter for CLOCK_MONOTIME and derivatives + * is obtained from the Windows QPC API, if supported... + */ + if( QueryPerformanceCounter( &ct.qpc_value ) == 0 ) + /* + * ...or forces an "invalid status" return, otherwise. + */ + return clock_api_invalid_error(); + } + /* In either case, once we have a valid count of clock ticks, we + * must adjust it, relative to the timebase for the clock, (which + * is recorded within the clock's implementation data structure), + * then scale it, and break it down into seconds and nanoseconds + * components, (again based on scaling factors which are similarly + * recorded within the implementation data)... + */ + ct.value -= clock_id->timebase; + current->tv_nsec = (ct.value % clock_id->frequency) + * NANOSECONDS_PER_SECOND / clock_id->frequency; + current->tv_sec = ct.value / clock_id->frequency; + + /* ...before returning zero, as "successful completion" status... + */ + return 0; + } + /* ...or -1, indicating failure. + */ + return -1; +} + +/* $RCSfile$: end of file */ https://sf.net/p/mingw/mingw-org-wsl/ci/06e14e2afe3ec94b7562f0fa436f63d7447af272/ commit 06e14e2afe3ec94b7562f0fa436f63d7447af272 Author: Keith Marshall <ke...@us...> Date: Thu Dec 14 23:42:03 2017 +0000 Add support for POSIX.1 "obsolescence" warnings. diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog index f4568ef..b006185 100644 --- a/mingwrt/ChangeLog +++ b/mingwrt/ChangeLog @@ -1,3 +1,13 @@ +2017-12-14 Keith Marshall <ke...@us...> + + Add support for POSIX.1 "obsolescence" warnings. + + * include/_mingwrt.h.in (__POSIX_1995_DEPRECATED) + (__POSIX_2001_DEPRECATED, __POSIX_2008_DEPRECATED): New macros; define + them, such as each is conditional on the specific value assigned to... + [_POSIX_C_SOURCE]: ...this feature test macro, as the equivalent of... + (__MINGW_ATTRIB_DEPRECATED): ...this, or of nothing, as appropriate. + 2017-12-06 Keith Marshall <ke...@us...> Prepare and publish MinGW.org WSL-5.0.2 release. diff --git a/mingwrt/include/_mingw.h.in b/mingwrt/include/_mingw.h.in index 1cd2b57..e5c6b86 100644 --- a/mingwrt/include/_mingw.h.in +++ b/mingwrt/include/_mingw.h.in @@ -478,6 +478,49 @@ allow GCC to optimize away some EH unwind code, at least in DW2 case. */ # endif #endif +#if _POSIX_C_SOURCE >= 199506L +/* Conformance with POSIX.1-1996 has been requested; ensure that any + * interfaces which have been marked as "obsolescent", from this POSIX + * version onwards, will be reported as "deprecated", at point of use. + */ +# define __POSIX_1995_DEPRECATED __MINGW_ATTRIB_DEPRECATED + +#if _POSIX_C_SOURCE >= 200112L +/* Conformance with POSIX.1-2001 has been requested; ensure that any + * interfaces which have been marked as "obsolescent", from this POSIX + * version onwards, will be reported as "deprecated", at point of use. + */ +# define __POSIX_2001_DEPRECATED __MINGW_ATTRIB_DEPRECATED + +#if _POSIX_C_SOURCE >= 200809L +/* Conformance with POSIX.1-2008 has been requested; ensure that any + * interfaces which have been marked as "obsolescent", from this POSIX + * version onwards, will be reported as "deprecated", at point of use. + */ +# define __POSIX_2008_DEPRECATED __MINGW_ATTRIB_DEPRECATED + +#else +/* POSIX.1-2008 conformance is NOT required; do not object to use of + * interfaces which became "obsolescent" in this POSIX version, but + * were still fully supported in earlier versions. + */ +# define __POSIX_2008_DEPRECATED +#endif +#else +/* POSIX.1-2001 conformance is NOT required; do not object to use of + * interfaces which became "obsolescent" in this POSIX version, but + * were still fully supported in earlier versions. + */ +# define __POSIX_2001_DEPRECATED +#endif +#else +/* POSIX.1-1996 conformance is NOT required; do not object to use of + * interfaces which became "obsolescent" in this POSIX version, but + * were still fully supported in earlier versions. + */ +# define __POSIX_1995_DEPRECATED +#endif + #ifndef _ISOC99_SOURCE /* libmingwex.a provides free-standing implementations for many of the * functions which were introduced in C99; MinGW headers do not expose https://sf.net/p/mingw/mingw-org-wsl/ci/1a0e5ad189b6ff58a9c34f3a60d7e32565c32ab9/ commit 1a0e5ad189b6ff58a9c34f3a60d7e32565c32ab9 Author: Keith Marshall <ke...@us...> Date: Wed Dec 6 19:54:35 2017 +0000 Adjust repository version following WSL-5.0.2 release. diff --git a/ChangeLog b/ChangeLog index 7b6a4e9..9baa042 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2017-12-06 Keith Marshall <ke...@us...> + Adjust repository version following WSL-5.0.2 release. + + * VERSION.m4 (__VERSION__): Increment it to 5.1; no further patch + releases are anticipated for development on the 5.0 branch, hence... + * All files (5.1-trunk): ...assign new development branch name. + +2017-12-06 Keith Marshall <ke...@us...> + Prepare and publish MinGW.org WSL-5.0.2 release. * All files (wsl-5.0.2-release): Tag assigned. diff --git a/VERSION.m4 b/VERSION.m4 index 6a0fec5..dcef900 100644 --- a/VERSION.m4 +++ b/VERSION.m4 @@ -6,7 +6,7 @@ # assign a common version number to each of the mingwrt and w32api # MinGW System Library sub-packages. # -m4_define([__VERSION__],[5.0.2]) +m4_define([__VERSION__],[5.1]) # This is also a convenient place to specify the import library # associations, and DLLVERSION information for each DLL which may ----------------------------------------------------------------------- hooks/post-receive -- Repository: mingw-org-wsl |
From: Keith M. <no...@so...> - 2017-12-17 13:09:45
|
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, 5.1-trunk has been deleted was 983865860a0650965bc461edea250625a0acf46e - Log ----------------------------------------------------------------- 983865860a0650965bc461edea250625a0acf46e Support strtok() re-entrancy, per request [#2342]. ----------------------------------------------------------------------- hooks/post-receive -- Repository: mingw-org-wsl |
From: Keith M. <no...@so...> - 2017-12-16 21:29:20
|
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, 5.1-trunk has been updated via 983865860a0650965bc461edea250625a0acf46e (commit) via 9808774164e87c6c8534479377191e59e4d1d24c (commit) from dfa8818f90d20c22d41aa87fce32c1075e81ad52 (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/983865860a0650965bc461edea250625a0acf46e/ commit 983865860a0650965bc461edea250625a0acf46e Author: Keith Marshall <kei...@us...> Date: Mon Apr 10 22:31:17 2017 +0100 Support strtok() re-entrancy, per request [#2342]. * mingwex/strtok_r.c: New file; it implements... (strtok_r): ...this function, per POSIX.1-1995 specification. * Makefile.in (libmingwex.a): Add reference; make it depend on... (strtok_r.$OBJEXT): ...this. * include/string.h: Declare corresponding runtime API. [_POSIX_C_SOURCE >= 199506L] (strtok_r): Add function prototype. [__MSVCRT_VERSION__ >= __MSVCR80_DLL] (strtok_s): Likewise; this is the Microsoft equivalent function, first introduced in this non-free MSVC runtime library; subsequently available in MSVCRT.DLL since... [_WIN32_WINNT >= _WIN32_WINNT_VISTA]: ...this release, likewise. diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog index a628995..7cd95d3 100644 --- a/mingwrt/ChangeLog +++ b/mingwrt/ChangeLog @@ -12,14 +12,16 @@ * include/time.h [_POSIX_C_SOURCE >= 199309L] (clockid_t): New structured data type; define it opaquely, and... (CLOCK_REALTIME, CLOCK_MONOTONIC): ...declare these extern instances. - [_POSIX_C_SOURCE >= 200809L] (gettimeofday): Mark it "deprecated". - [_POSIX_C_SOURCE >= 199309L] (clock_getres, clock_gettime) - (clock_settime): New functions; declare prototypes. + (clock_getres, clock_gettime, clock_settime): New functions; declare + prototypes. * mingwex/clockapi.h mingwex/clockapi.c mingwex/clockres.c * mingwex/clockset.c mingwex/clocktime.c: New files; they implement the preceding clock instances, and associated API functions. + * include/sys/time.h [_POSIX_C_SOURCE >= 200809L] (gettimeofday): + Mark it as "deprecated". + 2017-12-14 Keith Marshall <ke...@us...> Add support for POSIX.1 "obsolescence" warnings. diff --git a/mingwrt/Makefile.in b/mingwrt/Makefile.in index 024918a..1b8f081 100644 --- a/mingwrt/Makefile.in +++ b/mingwrt/Makefile.in @@ -452,7 +452,7 @@ libmingwex.a: $(addsuffix .$(OBJEXT), clockapi clockres clockset clocktime) libmingwex.a: $(addsuffix .$(OBJEXT), mkstemp mkdtemp cryptnam setenv) libmingwex.a: $(addsuffix .$(OBJEXT), tdelete tfind tsearch twalk) -libmingwex.a: $(addsuffix .$(OBJEXT), dirent wdirent dlfcn strerror_r) +libmingwex.a: $(addsuffix .$(OBJEXT), dirent wdirent dlfcn strerror_r strtok_r) libmingwex.a: $(addsuffix .$(OBJEXT), getdelim gettimeofday) vpath %.s ${mingwrt_srcdir}/mingwex diff --git a/mingwrt/include/string.h b/mingwrt/include/string.h index 288aedc..c982a30 100644 --- a/mingwrt/include/string.h +++ b/mingwrt/include/string.h @@ -199,6 +199,17 @@ __CRT_ALIAS size_t strnlen (const char *__text, size_t __maxlen) #endif /* MSVCRT.DLL || pre-MSVCR80.DLL */ #endif /* _POSIX_C_SOURCE >= 200809L */ +#if _POSIX_C_SOURCE >= 199506L /* SUSv2 */ +/* SUSv2 added a re-entrant variant of strtok(), which maintains state + * using a user supplied reference pointer, rather than the internal + * reference used by strtok() itself, thus making it both thread-safe, + * and suitable for interleaved use on multiple strings, even within a + * single thread context, (which isn't possible with strtok() itself, + * even with Microsoft's intrinsically thread-safe implementation). + */ +extern char *strtok_r +(char *__restrict__, const char *__restrict__, char **__restrict__); + #if _POSIX_C_SOURCE >= 200112L /* POSIX.1-2001 added a re-entrant variant of strerror(), which stores * the message text in a user supplied buffer, rather than in (possibly @@ -210,7 +221,9 @@ __CRT_ALIAS size_t strnlen (const char *__text, size_t __maxlen) * copies of strerror()'s message text. */ extern int strerror_r (int, char *, size_t); -#endif + +#endif /* POSIX.1-2001 */ +#endif /* SUSv2 */ #if __MSVCRT_VERSION__>=__MSVCR80_DLL || _WIN32_WINNT >= _WIN32_WINNT_VISTA /* MSVCR80.DLL introduced a safer, (erroneously so called "more secure"), @@ -219,6 +232,13 @@ extern int strerror_r (int, char *, size_t); */ _CRTIMP __cdecl __MINGW_NOTHROW int strerror_s (char *, size_t, int); +/* Also introduced in MSVCR80.DLL, and retrofitted to MSVCRT.DLL from the + * release of Windows-Vista, strtok_s() is a direct analogue for POSIX.1's + * strtok_r() function; (contrary to Microsoft's description, it is neither + * a "more secure", nor even a "safer" version of strtok() itself). + */ +_CRTIMP __cdecl __MINGW_NOTHROW char *strtok_s (char *, const char *, char **); + #elif _POSIX_C_SOURCE >= 200112L /* For the benefit of pre-Vista MSVCRT.DLL users, we provide an approximate * emulation of strerror_s(), in terms of inline referral to POSIX.1-2001's diff --git a/mingwrt/mingwex/strtok_r.c b/mingwrt/mingwex/strtok_r.c new file mode 100644 index 0000000..87eebea --- /dev/null +++ b/mingwrt/mingwex/strtok_r.c @@ -0,0 +1,75 @@ +/* + * strtok_r.c + * + * Implementation of "re-entrant" version of ISO-C strtok() function. + * + * $Id$ + * + * Written by Keith Marshall <kei...@us...> + * Copyright (C) 2017, 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. + * + */ +#include <string.h> + +char *strtok_r +(char *__restrict__ s, const char *__restrict__ sep, char **__restrict__ state) +{ + /* "Re-entrant" version of ISO-C strtok() function; maintains state + * via caller provided pointer variable, to avoid interference between + * concurrent invocations on distinct source strings. Requires initial + * call with non-NULL "s", to retrieve the first token and initialize + * "state", followed by repeated calls with "s" == NULL, to retrieve + * subsequent tokens. + */ + if( s == NULL ) + /* Non-initialization call; retrieve previously saved state. + */ + s = *state; + + /* Step over any leading separator characters, at the beginning of "s"; + * check that this didn't take us all the way to the terminating NUL... + */ + if( *(s += strspn (s, sep)) == '\0' ) + { + /* ...or if it did, initialize/reset "state", to indicate that there + * are no (more) tokens to retrieve; return NULL token, to indicate + * that there are none available. + */ + *state = s; + return NULL; + } + /* Locate the first separator charactor, if any, following the current + * token; reset "state" to mark its position, then, ensuring that we + * never advance beyond the terminal NUL of "s"... + */ + if( *(*state = s + strcspn (s, sep)) != '\0' ) + /* ...when an actual separator has been identified, replace it with + * NUL, to terminate the token, and advance "state" to the point at + * which scanning for any potential "next" token should resume. + */ + *(*state)++ = '\0'; + + return s; +} + +/* $RCSfile$: end of file */ https://sf.net/p/mingw/mingw-org-wsl/ci/9808774164e87c6c8534479377191e59e4d1d24c/ commit 9808774164e87c6c8534479377191e59e4d1d24c Author: Keith Marshall <ke...@us...> Date: Sat Dec 16 21:22:19 2017 +0000 Provide default definition for _WIN32_IE feature test macro. diff --git a/w32api/ChangeLog b/w32api/ChangeLog index 2efc39f..3ed58a1 100644 --- a/w32api/ChangeLog +++ b/w32api/ChangeLog @@ -1,3 +1,13 @@ +2017-12-16 Keith Marshall <ke...@us...> + + Provide default definition for _WIN32_IE feature test macro. + + * include/sdkddkver.h [!defined _WIN32_IE]: Define it, with... + (_WIN32_IE_IE50): ...this default value. + + * include/commctrl.h (_WIN32_IE): Delete definition hint; it offered + a conflicting proposal for the default value. + 2017-12-06 Keith Marshall <ke...@us...> Prepare and publish MinGW.org WSL-5.0.2 release. diff --git a/w32api/include/commctrl.h b/w32api/include/commctrl.h index ffb6d88..cb66b21 100644 --- a/w32api/include/commctrl.h +++ b/w32api/include/commctrl.h @@ -8,12 +8,6 @@ #ifdef __cplusplus extern "C" { #endif -#ifndef _WIN32_IE -/* define _WIN32_IE if you really want it */ -#if 0 -#define _WIN32_IE 0x0300 -#endif -#endif #ifndef COMMCTRLAPI #ifdef __W32API_USE_DLLIMPORT__ diff --git a/w32api/include/sdkddkver.h b/w32api/include/sdkddkver.h index d82e417..474166c 100644 --- a/w32api/include/sdkddkver.h +++ b/w32api/include/sdkddkver.h @@ -201,6 +201,17 @@ # define NTDDI_VERSION NTDDI_VERSION_FROM_WIN32_WINNT(_WIN32_WINNT) #endif +#ifndef _WIN32_IE +/* https://msdn.microsoft.com/en-us/library/windows/desktop/bb776779%28v=vs.85%29.aspx + * specifies that the user should define _WIN32_IE, but in the absence of + * any such definition, a default equivalent to IE-5.0 may be assumed. + */ +# ifdef _WARN_DEFAULTS +# warning "Assuming default _WIN32_IE setting to match _WIN32_IE_IE50" +# endif +# define _WIN32_IE _WIN32_IE_IE50 +#endif + /* Map GCC architecture identification macros to their MSVC equivalents. * This mapping was previously specified in <winnt.h>, and duplicated in * <windows.h>; it is now only defined here, because both <windows.h> and ----------------------------------------------------------------------- Summary of changes: mingwrt/ChangeLog | 8 +++-- mingwrt/Makefile.in | 2 +- mingwrt/include/string.h | 22 +++++++++++++- mingwrt/mingwex/strtok_r.c | 75 ++++++++++++++++++++++++++++++++++++++++++++++ w32api/ChangeLog | 10 +++++++ w32api/include/commctrl.h | 6 ---- w32api/include/sdkddkver.h | 11 +++++++ 7 files changed, 123 insertions(+), 11 deletions(-) create mode 100644 mingwrt/mingwex/strtok_r.c hooks/post-receive -- Repository: mingw-org-wsl |
From: Keith M. <no...@so...> - 2017-12-16 10:06:15
|
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, 5.1-trunk has been created at dfa8818f90d20c22d41aa87fce32c1075e81ad52 (commit) - Log ----------------------------------------------------------------- https://sf.net/p/mingw/mingw-org-wsl/ci/dfa8818f90d20c22d41aa87fce32c1075e81ad52/ commit dfa8818f90d20c22d41aa87fce32c1075e81ad52 Author: Keith Marshall <ke...@us...> Date: Sat Dec 16 10:04:49 2017 +0000 Implement autotest module for POSIX clock API functions. diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog index 8d7685e..a628995 100644 --- a/mingwrt/ChangeLog +++ b/mingwrt/ChangeLog @@ -1,3 +1,10 @@ +2017-12-16 Keith Marshall <ke...@us...> + + Implement autotest module for POSIX clock API functions. + + * tests/clockapi.at: New file. + * tests/testsuite.at.in (clockapi.at): Incorporate it. + 2017-12-15 Keith Marshall <ke...@us...> Implement a subset of the POSIX.1b-1993 clock API. diff --git a/mingwrt/tests/clockapi.at b/mingwrt/tests/clockapi.at new file mode 100644 index 0000000..3874608 --- /dev/null +++ b/mingwrt/tests/clockapi.at @@ -0,0 +1,104 @@ +# clockapi.at +# +# Autotest module to verify correct operation of the POSIX.1b-1993 +# clock API functions, providing CLOCK_REALTIME and CLOCK_MONOTONIC. +# +# $Id$ +# +# Written by Keith Marshall <kei...@us...> +# Copyright (C) 2017, 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 THE 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. +# +# +# All tests specified herein are written in the C language. +# +MINGW_AT_LANG([C]) +AT_BANNER([POSIX clock API function checks.]) + +# MINGW_AT_CHECK_CLOCK_WORKS( CLOCK_ID ) +# -------------------------------------- +# Confirm that, for the specified CLOCK_ID, both clock_getres() +# and clock_gettime() return zero, as they should for a correctly +# working clock; (this DOES NOT check for reasonable return values +# within the associated struct timespec argument). +# +m4_define([MINGW_AT_CHECK_CLOCK_WORKS],[dnl +AT_SETUP([$1 availability confirmation])dnl +AT_KEYWORDS([C clock $1])MINGW_AT_CHECK_RUN([[[ +#define _POSIX_C_SOURCE 199309L +#include <time.h> +int main() +{ struct timespec ts; + return clock_getres (]]$1[[, &ts) | clock_gettime (]]$1[[, &ts); +}]]])dnl +AT_CLEANUP +])# MINGW_AT_CHECK_CLOCK_WORKS + +# Apply the preceding availability check for CLOCK_REALTIME, then +# check that it does, in fact, return clock_gettime() results which +# agree closely with the system time reported by the time() function; +# (we note that system latency between the time() and clock_gettime() +# calls may introduce discrepancies between the two time indications, +# so we accept a maximum offset of one time() quantum, i.e. 1 second, +# between the first read clock_gettime() indication, and later time() +# indication, of what should represent the same wall-clock time). +# +MINGW_AT_CHECK_CLOCK_WORKS([CLOCK_REALTIME]) +AT_SETUP([CLOCK_REALTIME agreement with time() function])dnl +AT_KEYWORDS([C clock CLOCK_REALTIME])MINGW_AT_CHECK_RUN([[[ +#define _POSIX_C_SOURCE 199309L +#include <time.h> +int main() +{ struct timespec ts; + return clock_gettime( CLOCK_REALTIME, &ts ) + || ((time( NULL ) - ts.tv_sec) > 1LL); +}]]])dnl +AT_CLEANUP + +# Similarly, apply the availability check for CLOCK_MONOTONIC, then +# verify that it advances monotonically, in temporal synchronicity +# with intervals timed by the time() function, again allowing up to +# one time() quantum of deviation within each sampled interval, to +# account for the possible effect of system latency. +# +MINGW_AT_CHECK_CLOCK_WORKS([CLOCK_MONOTONIC]) +AT_SETUP([CLOCK_MONOTONIC advancement]) +AT_KEYWORDS([C clock CLOCK_MONOTONIC])MINGW_AT_CHECK_RUN([[[ +#define _POSIX_C_SOURCE 199309L +#include <time.h> +#include <unistd.h> +int main() +{ struct timespec ts; + int result = clock_gettime( CLOCK_MONOTONIC, &ts ); + time_t interval, start = time( NULL ); + while( (result == 0) && ((interval = time( NULL ) - start) < 15) ) + { struct timespec at; result = clock_gettime( CLOCK_MONOTONIC, &at ); + if( (at.tv_sec - ts.tv_sec - interval) > 1LL ) + result = -1; + sleep( 2 ); + } + return result; +}]]])dnl +AT_CLEANUP + +# vim: filetype=config formatoptions=croql +# $RCSfile$: end of file diff --git a/mingwrt/tests/testsuite.at.in b/mingwrt/tests/testsuite.at.in index bfe660c..6de6469 100644 --- a/mingwrt/tests/testsuite.at.in +++ b/mingwrt/tests/testsuite.at.in @@ -90,6 +90,7 @@ m4_include([headers.at]) m4_include([ansiprintf.at]) m4_include([logarithms.at]) m4_include([powerfunc.at]) +m4_include([clockapi.at]) # vim: filetype=config formatoptions=croql # $RCSfile$: end of file https://sf.net/p/mingw/mingw-org-wsl/ci/ecc51ca60bf82d678260fa7b119a9f42b3b77fb7/ commit ecc51ca60bf82d678260fa7b119a9f42b3b77fb7 Author: Keith Marshall <ke...@us...> Date: Fri Dec 15 20:58:19 2017 +0000 Implement a subset of the POSIX.1b-1993 clock API. diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog index b006185..8d7685e 100644 --- a/mingwrt/ChangeLog +++ b/mingwrt/ChangeLog @@ -1,3 +1,18 @@ +2017-12-15 Keith Marshall <ke...@us...> + + Implement a subset of the POSIX.1b-1993 clock API. + + * include/time.h [_POSIX_C_SOURCE >= 199309L] + (clockid_t): New structured data type; define it opaquely, and... + (CLOCK_REALTIME, CLOCK_MONOTONIC): ...declare these extern instances. + [_POSIX_C_SOURCE >= 200809L] (gettimeofday): Mark it "deprecated". + [_POSIX_C_SOURCE >= 199309L] (clock_getres, clock_gettime) + (clock_settime): New functions; declare prototypes. + + * mingwex/clockapi.h mingwex/clockapi.c mingwex/clockres.c + * mingwex/clockset.c mingwex/clocktime.c: New files; they implement + the preceding clock instances, and associated API functions. + 2017-12-14 Keith Marshall <ke...@us...> Add support for POSIX.1 "obsolescence" warnings. diff --git a/mingwrt/Makefile.in b/mingwrt/Makefile.in index b80dfb5..024918a 100644 --- a/mingwrt/Makefile.in +++ b/mingwrt/Makefile.in @@ -448,6 +448,7 @@ $(addsuffix fmt.$(OBJEXT),varo crto geto seto crtn getn setn): %.$(OBJEXT): ofmt # libmingwex.a: $(addsuffix .$(OBJEXT), mingw-aligned-malloc mingw-fseek) libmingwex.a: $(addsuffix .$(OBJEXT), glob getopt basename dirname nsleep) +libmingwex.a: $(addsuffix .$(OBJEXT), clockapi clockres clockset clocktime) libmingwex.a: $(addsuffix .$(OBJEXT), mkstemp mkdtemp cryptnam setenv) libmingwex.a: $(addsuffix .$(OBJEXT), tdelete tfind tsearch twalk) diff --git a/mingwrt/include/sys/time.h b/mingwrt/include/sys/time.h index c2d9839..6cc8da3 100644 --- a/mingwrt/include/sys/time.h +++ b/mingwrt/include/sys/time.h @@ -102,10 +102,8 @@ struct timezone * designated as IEEE Std 1003.1, 2016 Edition; the struct timezone pointer * argument of some Unix implementations (declared as a pointer to void in * POSIX.1) is ignored, as are all error conditions. - * - * FIXME: Deprecate this for _POSIX_C_SOURCE >= 200809L */ -int __cdecl __MINGW_NOTHROW gettimeofday +int __cdecl __MINGW_NOTHROW __POSIX_2008_DEPRECATED gettimeofday (struct timeval *__restrict__, void *__restrict__ /* tzp (unused) */); _END_C_DECLS diff --git a/mingwrt/include/time.h b/mingwrt/include/time.h index 634c831..d27add7 100644 --- a/mingwrt/include/time.h +++ b/mingwrt/include/time.h @@ -423,6 +423,34 @@ int nanosleep( const struct timespec *period, struct timespec *residual ) ? (unsigned)(-1) : (unsigned)(period->tv_nsec)); } #endif /* !__NO_INLINE__ */ + +#if _POSIX_C_SOURCE >= 199309L +/* POSIX.1b-1993 introduced the optional POSIX clocks API; it + * was subsequently moved to "base", as of POSIX.1-2008, to the + * extent required to support the CLOCK_REALTIME feature, with + * the remainder of its features remaining optional. We choose + * to provide a subset, supporting CLOCK_MONOTONIC in addition + * to the aforementioned CLOCK_REALTIME feature. + * + * We define the POSIX clockid_t type as a pointer to an opaque + * structure; user code should never need to know details of the + * internal layout of this structure. + */ +typedef struct __clockid__ *clockid_t; + +/* The standard clockid_t entities which we choose to support. + */ +extern clockid_t CLOCK_REALTIME; +extern clockid_t CLOCK_MONOTONIC; + +/* Prototypes for the standard POSIX functions which provide the + * API to these standard clockid_t entities. + */ +int clock_getres (clockid_t, struct timespec *); +int clock_gettime (clockid_t, struct timespec *); +int clock_settime (clockid_t, const struct timespec *); + +#endif /* _POSIX_C_SOURCE >= 199309L */ #endif /* _POSIX_C_SOURCE */ _END_C_DECLS diff --git a/mingwrt/mingwex/clockapi.c b/mingwrt/mingwex/clockapi.c new file mode 100644 index 0000000..47183e3 --- /dev/null +++ b/mingwrt/mingwex/clockapi.c @@ -0,0 +1,138 @@ +/* + * clockapi.c + * + * Implementation of the common elements of the POSIX clock API. + * + * $Id$ + * + * Written by Keith Marshall <kei...@us...> + * Copyright (C) 2017, 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. + * + */ +#include "clockapi.h" + +static struct __clockid__ clock_api[] = +{ { /* CLOCK_REALTIME pre-initialization implementation reference data. + */ + CLOCK_TYPE_REALTIME, /* Fixed category index */ + CLOCK_REALTIME_FREQUENCY, /* Always updated at this frequency */ + 0LL, /* Resolution in ns; needs initialization */ + UNIX_EPOCH_AS_FILETIME /* Fixed timebase reference */ + }, + { /* CLOCK_MONOTONIC pre-initialization implementation reference data. + */ + CLOCK_TYPE_MONOTONIC, /* Fixed category index */ + NANOSECONDS_PER_SECOND, /* Update frequency; needs initialization */ + 0LL, /* Resolution in ns; needs initialization */ + 0LL /* Fixed timebase reference */ + } +}; + +/* Publicly visible references to the preceding (opaque) clock definitions. + */ +clockid_t CLOCK_REALTIME = &clock_api[CLOCK_TYPE_REALTIME]; +clockid_t CLOCK_MONOTONIC = &clock_api[CLOCK_TYPE_MONOTONIC]; + +CLOCK_INLINE +int64_t clock_api_getres_interval( clockid_t clock_api ) +{ + /* Initialization helper for POSIX clock implementation; called ONLY + * by __clock_api_is_valid(), and triggered by an uninitialized value + * of zero (0LL) for the "resolution" field within the implementation + * reference data structure; returns the initialized value thereof. + */ + if( clock_api->resolution > 0LL ) + /* Already initialized: immediately return initialized value. + */ + return clock_api->resolution; + + else if( clock_api->resolution == 0LL ) + /* Not yet initialized: perform type specific initialization. + */ + switch( clock_api->type ) + { + /* We must be prepared to retrieve clock frequencies from Windows + * APIs, which report either LARGE_INTEGER or FILETIME values, but + * we prefer to interpret them as scalar int64_t values. + */ + union { int64_t value; LARGE_INTEGER qpc_value; FILETIME rtc_value; } + freq; + + case CLOCK_TYPE_REALTIME: + /* Clocks in this category use the GetSystemTimeAsFileTime() API + * to read the system clock; although this is nominally updated at + * 100ns intervals, it is unrealistic to expect resolution at such + * a high frequency. Thus, we read it once, then again in a busy + * wait loop, until we detect a change, and compute the actual + * update interval between the two reported values. + */ + GetSystemTimeAsFileTime( &freq.rtc_value ); + clock_api->resolution = freq.value; + do { GetSystemTimeAsFileTime( &freq.rtc_value ); + } while( freq.value == clock_api->resolution ); + freq.value -= clock_api->resolution; + + /* Ultimately, we initialize the effective resolution, converting + * from this indicated count of 100ns intervals, to nanoseconds. + */ + return clock_api->resolution = freq.value * 100LL; + + case CLOCK_TYPE_MONOTONIC: + /* Clocks in this category use the QueryPerformanceCounter() API + * to count arbitrarily scaled time slices, relative to an equally + * arbitrary timebase; we must use the QueryPerformanceFrequency() + * call to verify availability of this API, and to establish its + * update frequency and resolution in nanoseconds. + */ + if( QueryPerformanceFrequency( &freq.qpc_value ) && (freq.value > 0LL) ) + return clock_api->resolution = NANOSECONDS_PER_SECOND + / (clock_api->frequency = freq.value); + } + + /* If we get to here, initialization of the specified clock failed; set + * its "resolution" to -1LL, thus marking it as unavailable. + */ + return clock_api->resolution = ((uint64_t)(clock_api_invalid_error())); +} + +int __clock_api_is_valid( clockid_t clock_id ) +{ + /* Helper function, called by any of clock_getres(), clock_gettime(), + * or clock_settime(), to check availability of the specified clock, + * initializing it if necessary, returning... + */ + if( (clock_id != NULL) + && ((unsigned)(clock_id->type) < CLOCK_TYPE_UNIMPLEMENTED) + && (clock_api_getres_interval( clock_id ) > 0LL) ) + /* + * ...a nominally TRUE value of 1, in the case of a valid clock... + */ + return 1; + + /* ...or FALSE (zero), and setting "errno", otherwise. + */ + errno = EINVAL; + return 0; +} + +/* $RCSfile$: end of file */ diff --git a/mingwrt/mingwex/clockapi.h b/mingwrt/mingwex/clockapi.h new file mode 100644 index 0000000..64fb9ad --- /dev/null +++ b/mingwrt/mingwex/clockapi.h @@ -0,0 +1,90 @@ +/* + * clockapi.h + * + * Private header, declaring the common elements of the POSIX clock API. + * + * $Id$ + * + * Written by Keith Marshall <kei...@us...> + * Copyright (C) 2017, 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. + * + */ +#include <time.h> +#include <stdint.h> +#include <winbase.h> +#include <errno.h> + +typedef enum +{ /* The categories of clock, for which we provide support. + */ + CLOCK_TYPE_REALTIME, /* CLOCK_REALTIME and derivatives */ + CLOCK_TYPE_MONOTONIC, /* CLOCK_MONOTONIC and derivatives */ + + /* Only the above represent valid clock categories; we end the + * enumeration with this comparator reference value, to which, + * when compared as unsigned, all unsupported category values + * will be equal or greater. + */ + CLOCK_TYPE_UNIMPLEMENTED +} CLOCK_TYPE; + +/* POSIX specifies that CLOCK_REALTIME shall report time elapsed, in + * seconds and nanoseconds, since the start of the Unix epoch, (i.e. + * since 1970-01-01 00:00:00), but we count it, in 100ns increments, + * since the start of the Windows FILETIME epoch, (1601-01-01 00:00). + * The following manifest constants facilitate the conversion from + * Windows FILETIME to Unix epoch; (11644473600LL seconds of the + * Windows FILETIME epoch have elapsed, when the Unix epoch begins). + */ +#define NANOSECONDS_PER_SECOND 1000000000LL +#define CLOCK_REALTIME_FREQUENCY (NANOSECONDS_PER_SECOND / 100LL) +#define UNIX_EPOCH_AS_FILETIME (11644473600LL * CLOCK_REALTIME_FREQUENCY) + +typedef struct __clockid__ +{ /* Formal definition of the clockid_t structure; (opaque to + * user application code). + */ + CLOCK_TYPE type; + int64_t frequency; + int64_t resolution; + int64_t timebase; +} *clockid_t; + +/* Prototype for clockid_t validation function; considered private + * within the scope of the implementation, (so not declared publicly), + * this also provides initialization support. + */ +extern int __clock_api_is_valid( clockid_t ); + +#define CLOCK_INLINE static __inline__ __attribute__((__always_inline__)) + +CLOCK_INLINE +int clock_api_invalid_error( void ) +{ /* Inline helper function, to facilitate return from any of the + * standard clock API functions, while setting both "errno", and + * the return status, to report an invalid operation. + */ + errno = EINVAL; return -1; +} + +/* $RCSfile$: end of file */ diff --git a/mingwrt/mingwex/clockres.c b/mingwrt/mingwex/clockres.c new file mode 100644 index 0000000..b1640ed --- /dev/null +++ b/mingwrt/mingwex/clockres.c @@ -0,0 +1,61 @@ +/* + * clockres.c + * + * Implementation of the clock_getres() element of the POSIX clock API. + * + * $Id$ + * + * Written by Keith Marshall <kei...@us...> + * Copyright (C) 2017, 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. + * + */ +#include "clockapi.h" + +int clock_getres( clockid_t clock_id, struct timespec *counter ) +{ + /* Standard API function, first implemented in POSIX.1b-1993, to + * query the resolution of a specified clock; it first initializes + * the clock, if necessary, then returns the resolution value, as + * recorded within the associated implementation data structure, + * together with a "validity check" status code. + */ + if( __clock_api_is_valid( clock_id ) ) + { + /* The clock is valid; its resolution must be broken down into + * separate seconds and nanoseconds components, but only if the + * caller provided a struct timespec to receive them. + */ + if( counter != NULL ) + { counter->tv_nsec = clock_id->resolution % NANOSECONDS_PER_SECOND; + counter->tv_sec = clock_id->resolution / NANOSECONDS_PER_SECOND; + } + /* In any case, we return zero to indicate a valid clock... + */ + return 0; + } + /* ...or -1 otherwise. + */ + return -1; +} + +/* $RCSfile$: end of file */ diff --git a/mingwrt/mingwex/clockset.c b/mingwrt/mingwex/clockset.c new file mode 100644 index 0000000..d3d9a3a --- /dev/null +++ b/mingwrt/mingwex/clockset.c @@ -0,0 +1,48 @@ +/* + * clockset.c + * + * Implementation of the clock_settime() element of the POSIX clock API. + * + * $Id$ + * + * Written by Keith Marshall <kei...@us...> + * Copyright (C) 2017, 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. + * + */ +#include "clockapi.h" + +int clock_settime( clockid_t clock_id, const struct timespec *timeval ) +{ + /* Standard API function, first implemented in POSIX.1b-1993, to + * set (or reset) the time value to be indicated by the specified + * clockid_t entity, if permissable. + * + * FIXME: Decide which clockid_t entities should support any such + * adjustment; for the time being, deny all such requests. + */ + errno = ((timeval != NULL) && __clock_api_is_valid( clock_id )) + ? EPERM : EINVAL; + return -1; +} + +/* $RCSfile$: end of file */ diff --git a/mingwrt/mingwex/clocktime.c b/mingwrt/mingwex/clocktime.c new file mode 100644 index 0000000..91c6c91 --- /dev/null +++ b/mingwrt/mingwex/clocktime.c @@ -0,0 +1,98 @@ +/* + * clocktime.c + * + * Implementation of the clock_gettime() element of the POSIX clock API. + * + * $Id$ + * + * Written by Keith Marshall <kei...@us...> + * Copyright (C) 2017, 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. + * + */ +#include "clockapi.h" + +int clock_gettime( clockid_t clock_id, struct timespec *current ) +{ + /* Standard API function, first implemented in POSIX.1b-1993, to + * read the current time indicated by a specified clock; it first + * initializes the clock, if necessary, then reads its currently + * indicated time, and encodes it for return, in the specified + * "current" timespec structure, together with a "validity check" + * status code. + * + * Note that, unlike the clock_getres() API, it is NOT permitted + * to specify NULL for the timespec parameter here; doing so will + * cause the call to fail, irrespective of the clock validity. + */ + if( current == NULL ) + return clock_api_invalid_error(); + + if( __clock_api_is_valid( clock_id ) ) + { + /* We must be prepared to retrieve clock frequencies from Windows + * APIs, which report either LARGE_INTEGER or FILETIME values, but + * we prefer to interpret them as scalar int64_t values. + */ + union { uint64_t value; LARGE_INTEGER qpc_value; FILETIME rtc_value; } ct; + switch( clock_id->type ) + { + case CLOCK_TYPE_REALTIME: + /* The counter for CLOCK_REALTIME, and any derived clock, is + * represented by system time, expressed as a count of 100ns + * intervals since the start of the Windows FILETIME epoch. + */ + GetSystemTimeAsFileTime( &ct.rtc_value ); + break; + + case CLOCK_TYPE_MONOTONIC: + /* Conversely, the counter for CLOCK_MONOTIME and derivatives + * is obtained from the Windows QPC API, if supported... + */ + if( QueryPerformanceCounter( &ct.qpc_value ) == 0 ) + /* + * ...or forces an "invalid status" return, otherwise. + */ + return clock_api_invalid_error(); + } + /* In either case, once we have a valid count of clock ticks, we + * must adjust it, relative to the timebase for the clock, (which + * is recorded within the clock's implementation data structure), + * then scale it, and break it down into seconds and nanoseconds + * components, (again based on scaling factors which are similarly + * recorded within the implementation data)... + */ + ct.value -= clock_id->timebase; + current->tv_nsec = (ct.value % clock_id->frequency) + * NANOSECONDS_PER_SECOND / clock_id->frequency; + current->tv_sec = ct.value / clock_id->frequency; + + /* ...before returning zero, as "successful completion" status... + */ + return 0; + } + /* ...or -1, indicating failure. + */ + return -1; +} + +/* $RCSfile$: end of file */ https://sf.net/p/mingw/mingw-org-wsl/ci/06e14e2afe3ec94b7562f0fa436f63d7447af272/ commit 06e14e2afe3ec94b7562f0fa436f63d7447af272 Author: Keith Marshall <ke...@us...> Date: Thu Dec 14 23:42:03 2017 +0000 Add support for POSIX.1 "obsolescence" warnings. diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog index f4568ef..b006185 100644 --- a/mingwrt/ChangeLog +++ b/mingwrt/ChangeLog @@ -1,3 +1,13 @@ +2017-12-14 Keith Marshall <ke...@us...> + + Add support for POSIX.1 "obsolescence" warnings. + + * include/_mingwrt.h.in (__POSIX_1995_DEPRECATED) + (__POSIX_2001_DEPRECATED, __POSIX_2008_DEPRECATED): New macros; define + them, such as each is conditional on the specific value assigned to... + [_POSIX_C_SOURCE]: ...this feature test macro, as the equivalent of... + (__MINGW_ATTRIB_DEPRECATED): ...this, or of nothing, as appropriate. + 2017-12-06 Keith Marshall <ke...@us...> Prepare and publish MinGW.org WSL-5.0.2 release. diff --git a/mingwrt/include/_mingw.h.in b/mingwrt/include/_mingw.h.in index 1cd2b57..e5c6b86 100644 --- a/mingwrt/include/_mingw.h.in +++ b/mingwrt/include/_mingw.h.in @@ -478,6 +478,49 @@ allow GCC to optimize away some EH unwind code, at least in DW2 case. */ # endif #endif +#if _POSIX_C_SOURCE >= 199506L +/* Conformance with POSIX.1-1996 has been requested; ensure that any + * interfaces which have been marked as "obsolescent", from this POSIX + * version onwards, will be reported as "deprecated", at point of use. + */ +# define __POSIX_1995_DEPRECATED __MINGW_ATTRIB_DEPRECATED + +#if _POSIX_C_SOURCE >= 200112L +/* Conformance with POSIX.1-2001 has been requested; ensure that any + * interfaces which have been marked as "obsolescent", from this POSIX + * version onwards, will be reported as "deprecated", at point of use. + */ +# define __POSIX_2001_DEPRECATED __MINGW_ATTRIB_DEPRECATED + +#if _POSIX_C_SOURCE >= 200809L +/* Conformance with POSIX.1-2008 has been requested; ensure that any + * interfaces which have been marked as "obsolescent", from this POSIX + * version onwards, will be reported as "deprecated", at point of use. + */ +# define __POSIX_2008_DEPRECATED __MINGW_ATTRIB_DEPRECATED + +#else +/* POSIX.1-2008 conformance is NOT required; do not object to use of + * interfaces which became "obsolescent" in this POSIX version, but + * were still fully supported in earlier versions. + */ +# define __POSIX_2008_DEPRECATED +#endif +#else +/* POSIX.1-2001 conformance is NOT required; do not object to use of + * interfaces which became "obsolescent" in this POSIX version, but + * were still fully supported in earlier versions. + */ +# define __POSIX_2001_DEPRECATED +#endif +#else +/* POSIX.1-1996 conformance is NOT required; do not object to use of + * interfaces which became "obsolescent" in this POSIX version, but + * were still fully supported in earlier versions. + */ +# define __POSIX_1995_DEPRECATED +#endif + #ifndef _ISOC99_SOURCE /* libmingwex.a provides free-standing implementations for many of the * functions which were introduced in C99; MinGW headers do not expose https://sf.net/p/mingw/mingw-org-wsl/ci/1a0e5ad189b6ff58a9c34f3a60d7e32565c32ab9/ commit 1a0e5ad189b6ff58a9c34f3a60d7e32565c32ab9 Author: Keith Marshall <ke...@us...> Date: Wed Dec 6 19:54:35 2017 +0000 Adjust repository version following WSL-5.0.2 release. diff --git a/ChangeLog b/ChangeLog index 7b6a4e9..9baa042 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2017-12-06 Keith Marshall <ke...@us...> + Adjust repository version following WSL-5.0.2 release. + + * VERSION.m4 (__VERSION__): Increment it to 5.1; no further patch + releases are anticipated for development on the 5.0 branch, hence... + * All files (5.1-trunk): ...assign new development branch name. + +2017-12-06 Keith Marshall <ke...@us...> + Prepare and publish MinGW.org WSL-5.0.2 release. * All files (wsl-5.0.2-release): Tag assigned. diff --git a/VERSION.m4 b/VERSION.m4 index 6a0fec5..dcef900 100644 --- a/VERSION.m4 +++ b/VERSION.m4 @@ -6,7 +6,7 @@ # assign a common version number to each of the mingwrt and w32api # MinGW System Library sub-packages. # -m4_define([__VERSION__],[5.0.2]) +m4_define([__VERSION__],[5.1]) # This is also a convenient place to specify the import library # associations, and DLLVERSION information for each DLL which may ----------------------------------------------------------------------- hooks/post-receive -- Repository: mingw-org-wsl |
From: Keith M. <no...@so...> - 2017-12-06 22:04:48
|
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, 5.0-active has been updated via a771e066eaf830a3a94a21968939748e8af776d2 (commit) via 4b3cc3d08cd7568fd91419c3d54c340cf67b7655 (commit) from fa00fd4e4ce75d88daa9d00f720b91613bccdaee (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/a771e066eaf830a3a94a21968939748e8af776d2/ commit a771e066eaf830a3a94a21968939748e8af776d2 Author: Keith Marshall <ke...@us...> Date: Wed Dec 6 19:40:49 2017 +0000 Apply wsl-5.0.2-release tag. diff --git a/.hgtags b/.hgtags index ad68101..56746d3 100644 --- a/.hgtags +++ b/.hgtags @@ -10,3 +10,4 @@ cd725d6ae238714355b000ae9d7c6f3ace34317d w32api-3.18.2-release e92b7e85ef0890284b99d2c8243519f77457e2be mingwrt-3.22.4-release 44bf2b16d28510dd0857ac5a949171d33360973f wsl-5.0-release b44e016d9ea758327706bd9325d15c52e82400e8 wsl-5.0.1-release +ce1ec977a1c0130e1729dd3dc26d3bc5193b439c wsl-5.0.2-release https://sf.net/p/mingw/mingw-org-wsl/ci/4b3cc3d08cd7568fd91419c3d54c340cf67b7655/ commit 4b3cc3d08cd7568fd91419c3d54c340cf67b7655 Author: Keith Marshall <ke...@us...> Date: Wed Dec 6 19:38:31 2017 +0000 Prepare and publish MinGW.org WSL-5.0.2 release. diff --git a/ChangeLog b/ChangeLog index 377493b..7b6a4e9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2017-12-06 Keith Marshall <ke...@us...> + + Prepare and publish MinGW.org WSL-5.0.2 release. + + * All files (wsl-5.0.2-release): Tag assigned. + 2017-07-31 Keith Marshall <kei...@us...> MinGW.org WSL-5.0.1 released; update repository version. diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog index 01efb9f..f4568ef 100644 --- a/mingwrt/ChangeLog +++ b/mingwrt/ChangeLog @@ -1,3 +1,12 @@ +2017-12-06 Keith Marshall <ke...@us...> + + Prepare and publish MinGW.org WSL-5.0.2 release. + + * All files (wsl-5.0.2-release): Tag assigned. + + * Makefile.in (mingwrt-srcdist-package-files): Add reference... + * $mingwrt_srcdir/*.sx: ...for files matching this template. + 2017-12-02 Keith Marshall <ke...@us...> Provide legacy OS work around for issue [#2357] diff --git a/mingwrt/Makefile.in b/mingwrt/Makefile.in index 1022bbe..b80dfb5 100644 --- a/mingwrt/Makefile.in +++ b/mingwrt/Makefile.in @@ -954,7 +954,7 @@ mingwrt-srcdist-package-files: $(wildcard ${mingwrt_srcdir}/*.[chs]) \ $(wildcard ${mingwrt_srcdir}/*.def.in) $(wildcard ${mingwrt_srcdir}/config*) \ $(addprefix ${mingwrt_srcdir}/,include man mingwex msvcrt-xref profile) \ $(addprefix ${mingwrt_srcdir}/,TODO Makefile.in crtdll.def) \ - $(wildcard ${mingwrt_srcdir}/*.txt) + $(wildcard $(addprefix ${mingwrt_srcdir}/,*.sx *.txt)) mingwrt-srcdist-testsuite-files: $(wildcard ${mingwrt_srcdir}/tests/*.at) mingwrt-srcdist-testsuite-files: $(wildcard ${mingwrt_srcdir}/tests/*.in) diff --git a/w32api/ChangeLog b/w32api/ChangeLog index c806b90..2efc39f 100644 --- a/w32api/ChangeLog +++ b/w32api/ChangeLog @@ -1,3 +1,9 @@ +2017-12-06 Keith Marshall <ke...@us...> + + Prepare and publish MinGW.org WSL-5.0.2 release. + + * All files (wsl-5.0.2-release): Tag assigned. + 2017-11-28 Keith Marshall <ke...@us...> Make <wsnetbs.h> header effectively self-contained. ----------------------------------------------------------------------- Summary of changes: .hgtags | 1 + ChangeLog | 6 ++++++ mingwrt/ChangeLog | 9 +++++++++ mingwrt/Makefile.in | 2 +- w32api/ChangeLog | 6 ++++++ 5 files changed, 23 insertions(+), 1 deletion(-) hooks/post-receive -- Repository: mingw-org-wsl |
From: Keith M. <no...@so...> - 2017-12-06 22:04:45
|
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 tag, wsl-5.0.2-release has been created at 4b3cc3d08cd7568fd91419c3d54c340cf67b7655 (commit) - Log ----------------------------------------------------------------- commit 4b3cc3d08cd7568fd91419c3d54c340cf67b7655 Author: Keith Marshall <ke...@us...> Date: Wed Dec 6 19:38:31 2017 +0000 Prepare and publish MinGW.org WSL-5.0.2 release. ----------------------------------------------------------------------- hooks/post-receive -- Repository: mingw-org-wsl |
From: Keith M. <no...@so...> - 2017-12-02 13:29:36
|
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, 5.0-active has been updated via fa00fd4e4ce75d88daa9d00f720b91613bccdaee (commit) from 7cd51d65489ca65c0e35725ecc349a51ba0cc95a (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/fa00fd4e4ce75d88daa9d00f720b91613bccdaee/ commit fa00fd4e4ce75d88daa9d00f720b91613bccdaee Author: Keith Marshall <ke...@us...> Date: Sat Dec 2 13:23:14 2017 +0000 Provide legacy OS work around for issue [#2357] diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog index 9fb4f26..01efb9f 100644 --- a/mingwrt/ChangeLog +++ b/mingwrt/ChangeLog @@ -1,3 +1,15 @@ +2017-12-02 Keith Marshall <ke...@us...> + + Provide legacy OS work around for issue [#2357] + + * cpu_features.c: Delete; replace it with... + * cpu_features.sx: ...this new assembly language file. + + * cpu_features.h [__ASSEMBLER__] + (__cpu_features, __cpu_features_init): Suppress declarations. + + * Makefile (%.sx): Add $srcdir vpath reference. + 2017-11-28 Keith Marshall <ke...@us...> Handle indeterminate FLT_EVAL_METHOD; fix issue [#2352]. diff --git a/mingwrt/Makefile.in b/mingwrt/Makefile.in index 7e2be61..1022bbe 100644 --- a/mingwrt/Makefile.in +++ b/mingwrt/Makefile.in @@ -352,6 +352,7 @@ coldname.def: %.def: ${mingwrt_srcdir}/moldname.def.in $(addsuffix .def,$(all_moldname)): %.def: ${mingwrt_srcdir}/moldname.def.in $(CC) -C -E -P -D__FILENAME__=$@ -xc-header $< > $@ +vpath %.sx ${mingwrt_srcdir} all-mingwrt-libs install-mingwrt-libs: libmingw32.a libmingwex.a libmingw32.a: $(addsuffix .$(OBJEXT), CRTinit CRTglob setargv \ CRTfmode cpu_features CRT_fp10 txtmode main dllmain gccmain crtst \ diff --git a/mingwrt/cpu_features.c b/mingwrt/cpu_features.c deleted file mode 100644 index af2ead4..0000000 --- a/mingwrt/cpu_features.c +++ /dev/null @@ -1,105 +0,0 @@ -#include <stdbool.h> -#include "cpu_features.h" - -/* level 1 edx bits */ -#define EDX_CX8 (1 << 8) /* CMPXCHG8B */ -#define EDX_CMOV (1 << 15) -#define EDX_MMX (1 << 23) -#define EDX_FXSR (1 << 24) /* FXSAVE and FXRSTOR */ -#define EDX_SSE (1 << 25) -#define EDX_SSE2 (1 << 26) - -/* level 1 ecx bits */ -#define ECX_SSE3 (1 << 0) -#define ECX_CX16 (1 << 13) /* CMPXCHG16B */ - -/* extended level 0x80000001 edx bits */ -#define EDX_3DNOW (1 << 31) -#define EDX_3DNOWP (1 << 30) -#define EDX_LM (1 << 29) /*LONG MODE */ - -#define __cpuid(level,a,b,c,d) \ - asm volatile ("cpuid;" \ - : "=a" (a), "=b" (b), "=c" (c), "=d" (d)\ - : "0" (level)) - -/* Combine the different cpuid flags into a single bitmap. */ - -unsigned int __cpu_features = 0; - -void __cpu_features_init (void) -{ - unsigned int eax, ebx, ecx, edx; - /* Try to change the value of CPUID bit (bit 21) in EFLAGS. - If the bit can be toggled, CPUID is supported. */ - asm volatile ("pushfl; pushfl; popl %0;" - "movl %0,%1; xorl %2,%0;" - "pushl %0; popfl; pushfl; popl %0; popfl" - : "=&r" (eax), "=&r" (ebx) - : "i" (0x00200000)); - - if (((eax ^ ebx) & 0x00200000) == 0) - return; - - __cpuid (0, eax, ebx, ecx, edx); - if (eax == 0) - return; - - __cpuid (1, eax, ebx, ecx, edx); - - if (edx & EDX_CX8) - __cpu_features |= _CRT_CMPXCHG8B; - if (edx & EDX_CMOV) - __cpu_features |= _CRT_CMOV; - - if (edx & EDX_MMX) - __cpu_features |= _CRT_MMX; - if (edx & EDX_FXSR) - __cpu_features |= _CRT_FXSR; - if (edx & EDX_SSE) - __cpu_features |= _CRT_SSE; - if (edx & EDX_SSE2) - __cpu_features |= _CRT_SSE2; - - - if (ecx & ECX_SSE3) - __cpu_features |= _CRT_SSE3; - if (ecx & ECX_CX16) - __cpu_features |= _CRT_CMPXCHG16B; - - __cpuid (0x80000000, eax, ebx, ecx, edx); - if (eax < 0x80000001) - return; - __cpuid (0x80000001, eax, ebx, ecx, edx); - if (edx & EDX_3DNOW) - __cpu_features |= _CRT_3DNOW; - if (edx & EDX_3DNOWP) - __cpu_features |= _CRT_3DNOWP; - - return; -} - -#ifdef TEST - -#include <stdio.h> -#define report(feature) \ - if ((feature) & __cpu_features) printf( #feature " found\n") - -int main() -{ - __cpu_features_init(); - - report(_CRT_CMPXCHG8B); - report(_CRT_CMOV); - report(_CRT_MMX); - report(_CRT_FXSR); - report(_CRT_SSE); - report(_CRT_SSE2); - report(_CRT_SSE3); - report(_CRT_CMPXCHG16B); - report(_CRT_3DNOW); - report(_CRT_3DNOWP); - return 0; -} - -#endif diff --git a/mingwrt/cpu_features.h b/mingwrt/cpu_features.h index 8ec5ac1..52d92d4 100644 --- a/mingwrt/cpu_features.h +++ b/mingwrt/cpu_features.h @@ -14,11 +14,12 @@ #define _CRT_3DNOW 0x0100 #define _CRT_3DNOWP 0x0200 +#if !__ASSEMBLER__ extern unsigned int __cpu_features; extern void __cpu_features_init (void); +#endif /* Currently we use this in fpenv functions */ #define __HAS_SSE __cpu_features & _CRT_SSE - #endif diff --git a/mingwrt/cpu_features.sx b/mingwrt/cpu_features.sx new file mode 100644 index 0000000..8d4e61f --- /dev/null +++ b/mingwrt/cpu_features.sx @@ -0,0 +1,284 @@ +.file "cpu_features.sx" +/* + * Initialization procedure for identification of CPU supported features. + * + * $Id$ + * + * Written by Keith Marshall <ke...@us...> + * Copyright (C) 2017, MinGW.org Project + * + * Adapted from an original C language implementation. + * Written by Danny Smith <dan...@us...> + * Copyright (C) 2006, 2008, 2009, 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. + * + */ +.intel_syntax noprefix + +#include "cpu_features.h" + +#define RX_FLAG(BITNUM) (1 << (BITNUM)) +#define RH_FLAG(BITNUM) (1 << ((BITNUM) - 8)) + +#define CPUID_FLAG RX_FLAG(21) /* EFLAGS bit 21 */ + +#define FXSAVE_BUFSIZ 512 +#define FXSAVE_BUF_ALIGN 0xFFFFFFF0 +#define FXTEST_BITS 0x0013C0DE + +/* FIXME: is this optimization really worthwhile here? It breaks, + * with older GAS versions, (such as that commonly deployed in the + * GCC-3.4.5 era, and earlier)! + * + * GCC, (since GCC-4), emits "repz ret" rather than single-byte "ret", + * when optimizing with "generic" tuning, and the return opcode would + * otherwise become a branch destination, or is the fall-through for a + * conditional branch which is not taken. This opcode sequence, (which + * appears as if it should be illegal), is a work-around for an AMD K8, + * Athlon, and AMD10 family branch predictor bug; it is decoded as being + * effectively equivalent to a 2-byte "ret" instruction, (equivalent to + * preceding the "ret" with a "nop", but without incurring additional + * overhead to decode the "nop" instruction). + */ +#define ret repz ret + +.bss +.globl ___cpu_features; .align 4 +___cpu_features: .space 4 + +.text +.globl ___cpu_features_init; .p2align 4,,15 +.def ___cpu_features_init; .scl 2; .type 32; .endef + +___cpu_features_init: + +.cfi_startproc +/* Initialization requires use of the CPUID instruction; to check if it is + * supported by the host CPU, we try to toggle the CPUID flag bit within the + * EFLAGS register, (ultimately leaving it unchanged). + */ + pushf /* save original flags state */ + pushf /* duplicate them in both... */ + pop eax /* ...the EAX, and... */ + mov edx, eax /* ...the EDX registers */ + xor eax, CPUID_FLAG /* flip the CPUID_FLAG bit */ + push eax /* try to toggle the bit... */ + popf /* ...within EFLAGS itself */ + pushf /* capture the result... */ + pop eax /* ...in the EAX register */ + popf /* restore original flags */ + +/* The preceding code leaves all EFLAGS in their original state, as at + * procedure entry, with this state replicated in EDX, while EAX reflects + * their state after attempting to toggle the CPUID_FLAG bit; thus, if the + * CPU supports the CPUID instruction, EAX and EDX must now reflect + * differing states of this bit, and thus... + */ + xor eax, edx /* isolate CPUID_FLAG state */ + test eax, CPUID_FLAG /* did it change? */ + je 90f /* no: quit immediately */ + +/* If we're still here, then we may safely interrogate the CPU, using + * the CPUID instruction, to identify various CPU features which may, or + * may not, be supported, but first... + */ + push ebx /* ...we MUST preserve this! */ + +.cfi_def_cfa_offset 8 +.cfi_offset ebx, -8 + +/* First, we must perform a level zero CPUID enquiry, to determine the + * maximum level of interrogation which is supported. + */ + xor eax, eax /* zero request level code */ + cpuid /* get max supported level */ + test eax, eax /* is it greater than zero? */ + je 80f /* no: we can do no more */ + +/* If we're still here, we may progress to a level one (supported features) + * CPUID enquiry. + */ + mov eax, 1 /* select level one enquiry */ + cpuid /* get level one response */ + +/* Evaluate CPU capabilities (available features), accumulating flags for + * each in EAX, for eventual update of the global ___cpu_features variable. + */ + xor eax, eax /* start with a clean slate */ + +/* The CPUID level one features, in which we are interested, are reported + * in the ECX and EDX registers, using the following single bit flags for + * each feature; (note that, for code size efficiency, for flags expressed + * using bits 0..7 we interrogate only CL or DL, and for bits 8..15, only + * the CH or DH sub-registers, as appropriate). + */ +#define CPUID_SSE3_FLAG cl, RX_FLAG(0) +#define CPUID_CMPXCHG16B_FLAG ch, RH_FLAG(13) + +#define CPUID_CMPXCHG8B_FLAG dh, RH_FLAG(8) +#define CPUID_CMOV_FLAG dh, RH_FLAG(15) + +#define CPUID_MMX_FLAG edx, RX_FLAG(23) +#define CPUID_FXSR_FLAG edx, RX_FLAG(24) +#define CPUID_SSE_FLAG edx, RX_FLAG(25) +#define CPUID_SSE2_FLAG edx, RX_FLAG(26) + +.macro chk rx, cond, feature, next=15f + test \rx, \cond + jz \next + or eax, \feature +15: +.endm +#define CPUID_CAP(FLG) CPUID_##FLG##_FLAG, _CRT_##FLG + + chk CPUID_CAP(CMPXCHG8B) + chk CPUID_CAP(CMPXCHG16B) + chk CPUID_CAP(CMOV) + chk CPUID_CAP(MMX) + +/* Even if CPUID feature tests indicate that SSE instructions are available, + * the underlying operating system may not support them, and any attempt to + * use them may raise unhandled exceptions; (this is most likely to arise in + * the case of a legacy version of Windows, running on modern hardware). To + * avoid this issue, provided that the FXSAVE and FXRSTOR instructions are + * supported, we may use them to predict the likelihood of this issue + * arising, and consequently bypass SSE detection. + */ + chk CPUID_CAP(FXSR), 20f + +/* We must create a local stack frame, with the stack pointer aligned to a + * sixteen byte boundary, in which to allocate an FXSAVE buffer; (failure to + * align this correctly will raise an unhandled exception, and GCC cannot be + * trusted to get this right in C language code). + */ + push ebp + mov ebp, esp + +.cfi_def_cfa ebp, 12 +.cfi_offset ebp, -12 + + sub esp, FXSAVE_BUFSIZ + and esp, FXSAVE_BUF_ALIGN + +/* Save the FPU state, and immediately attempt to restore it with some of + * the SSE specific control flags inverted. + */ + fxsave [esp] + mov ebx, DWORD PTR 200[esp] + xor DWORD PTR 200[esp], FXTEST_BITS + fxrstor [esp] + +/* Return the FXSAVE buffer to its original state, then overwrite it with + * the state just restored. + */ + mov DWORD PTR 200[esp], ebx + fxsave [esp] + +/* Explicitly restore the original FPU state, while noting (in EBX) the + * state of those SSE control flags, as retrieved from the FPU itself, + * after the attempt to change them. + */ + xchg DWORD PTR 200[esp], ebx + fxrstor [esp] + +/* Check if the operating system actually allowed the requested change of + * the SSE control flags, then discard the local stack frame. + */ + xor ebx, DWORD PTR 200[esp] + leave + +.cfi_restore ebp +.cfi_def_cfa esp, 8 + + cmp ebx, FXTEST_BITS /* SSE flags were changed? */ + jne 20f /* no: skip SSE detection */ + +/* If we're still here, then the operating system should support SSE; + * proceed to check whether the CPU does so. + */ + chk CPUID_CAP(SSE) + chk CPUID_CAP(SSE2) + chk CPUID_CAP(SSE3) + +/* Before we move on to extended feature tests, we must store the feature + * test flags which we have accumulated so far... + */ +20: mov DWORD PTR ___cpu_features, eax + +/* ...so that EAX becomes available for us to, first confirm that extended + * feature tests are supported... + */ + mov eax, 0x80000000 /* select extended features */ + cpuid /* get maximum support level */ + cmp eax, 0x80000000 /* extended features okay? */ + jbe 80f /* no: exit now */ + +/* ...and, when so, request the extended feature test flags. + */ + mov eax, 0x80000001 /* select extended level 1 */ + cpuid /* get extended features */ + +/* Initially, we will accumulate the extended feature flags, in which we are + * interested, separately from those already accumulated, so... + */ + xor eax, eax /* ...clean the slate again */ + +/* Of the extended feature tests, we are interested in the following: + */ +#define CPUID_3DNOWP_FLAG edx, RX_FLAG(30) +#define CPUID_3DNOW_FLAG edx, RX_FLAG(31) + +/* Since the CPUID_3DNOW_FLAG maps directly to the sign bit of EDX, rather + * than the obvious feature test: + * + * chk CPUID_CAP(3DNOW) + * + * it is more efficient to use... + */ + test edx, edx /* is the sign bit set? */ + jns 30f /* no: we don't have 3DNOW */ + mov eax, _CRT_3DNOW /* yes: note that we do */ + +/* ...whereas, for other extended feature tests, we revert to use of + * our "chk" macro. + */ +30: chk CPUID_CAP(3DNOWP) + +/* Finally, we combine the extended feature test flags with those which we + * had previously accumulated from the regular feature tests, before... + */ + or DWORD PTR ___cpu_features, eax + +/* ...we restore the preserved state of the EBX register... + */ +80: pop ebx + +.cfi_restore ebx +.cfi_def_cfa_offset 4 + +/* ...and return to the C runtime initialization procedure. + */ +90: ret + +.cfi_endproc + +/* $RCSfile$: end of file */ ----------------------------------------------------------------------- Summary of changes: mingwrt/ChangeLog | 12 ++ mingwrt/Makefile.in | 1 + mingwrt/cpu_features.c | 105 ------------------ mingwrt/cpu_features.h | 3 +- mingwrt/cpu_features.sx | 284 ++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 299 insertions(+), 106 deletions(-) delete mode 100644 mingwrt/cpu_features.c create mode 100644 mingwrt/cpu_features.sx hooks/post-receive -- Repository: mingw-org-wsl |
From: Keith M. <no...@so...> - 2017-11-28 17:34:27
|
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, 5.0-active has been updated via 7cd51d65489ca65c0e35725ecc349a51ba0cc95a (commit) from d4d38f3736b22bb3b91b9f9010093a877a0dd0bd (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/7cd51d65489ca65c0e35725ecc349a51ba0cc95a/ commit 7cd51d65489ca65c0e35725ecc349a51ba0cc95a Author: Keith Marshall <ke...@us...> Date: Tue Nov 28 17:33:30 2017 +0000 Handle indeterminate FLT_EVAL_METHOD; fix issue [#2352]. diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog index 1fed35f..9fb4f26 100644 --- a/mingwrt/ChangeLog +++ b/mingwrt/ChangeLog @@ -1,3 +1,14 @@ +2017-11-28 Keith Marshall <ke...@us...> + + Handle indeterminate FLT_EVAL_METHOD; fix issue [#2352]. + + * include/math.h [FLT_EVAL_METHOD == 0 || FLT_EVAL_METHOD == 1] + (float_t, double_t): Define them explicitly, as appropriate for each + of these two specific cases only; otherwise, define them as if for... + [FLT_EVAL_METHOD == 2]: ...this explicit case, but also apply it as a + suitable default compromise for the indeterminate case, in which... + [FLT_EVAL_METHOD != 2]: ...emit indeterminacy warning. + 2017-10-25 Keith Marshall <kei...@us...> Include, and make <sys/bsdtypes.h> test suite safe. diff --git a/mingwrt/include/math.h b/mingwrt/include/math.h index 2ac331c..ac30253 100644 --- a/mingwrt/include/math.h +++ b/mingwrt/include/math.h @@ -326,28 +326,48 @@ _CRTIMP int __cdecl _set_SSE2_enable (int); # endif /* __MINGW_GNUC_PREREQ(3, 3) */ -#ifdef __FLT_EVAL_METHOD__ -/* Use the compiler's builtin definition for FLT_EVAL_METHOD - * to establish appropriate float_t and double_t typedefs. +/* Use the compiler's internal definition for FLT_EVAL_METHOD, if one + * is available, to establish appropriate float_t and double_t typedefs; + * in the case of GCC, this is specified as __FLT_EVAL_METHOD__, which + * is expected to be assigned standardized values of 0, 1, or 2, (or + * exceptionally, a value of -1, representing indeterminacy). */ +#if ! defined __FLT_EVAL_METHOD__ || __valueless(__FLT_EVAL_METHOD__) \ + || (__FLT_EVAL_METHOD__ - 0) < 0 || (__FLT_EVAL_METHOD__ - 0) > 1 + /* __FLT_EVAL_METHOD__ has not been defined, or it is defined with no + * value, or with a value of -1 (or less), or a value of 2 or more; in + * the specific case of a value of 2, this represents an explicit choice + * of the IX387 FPU configuration, while in each of the other cases, we + * implicitly fall back to this same default configuration. + * + * NOTE: this configuration is correct for X87 FPU computations, (for + * which __FLT_EVAL_METHOD__ is correctly specified as 2); however... + */ +# if defined __FLT_EVAL_METHOD__ && (__FLT_EVAL_METHOD__ - 0) != 2 + /* ...due to a GCC bug, introduced in GCC-6 and persisting into later + * versions, it may be selected via __FLT_EVAL_METHOD__ == -1, for the + * case of the "-msse -mfpmath=sse" option combination. In this case, + * it is (at best) an unsatisfactory compromise; to avoid it, you may + * prefer to adopt "-mfpmath=387", or "-msse2 -mfpmath=sse" instead. + */ +# warning "Default FLT_EVAL_METHOD is inderminate; assuming X87 semantics." +# endif + typedef long double float_t; + typedef long double double_t; + +#else + /* __FLT_EVAL_METHOD__ must have been defined with an explicit value + * of either 0 or 1; select the corresponding SSE configuration which + * is applicable in each case. + */ # if __FLT_EVAL_METHOD__ == 0 typedef float float_t; typedef double double_t; -# elif __FLT_EVAL_METHOD__ == 1 +# else /* __FLT_EVAL_METHOD__ == 1 */ typedef double float_t; typedef double double_t; - -# elif __FLT_EVAL_METHOD__ == 2 - typedef long double float_t; - typedef long double double_t; - # endif -#else - /* ix87 FPU default - */ - typedef long double float_t; - typedef long double double_t; #endif /* 7.12.3.1 ----------------------------------------------------------------------- Summary of changes: mingwrt/ChangeLog | 11 +++++++++++ mingwrt/include/math.h | 48 ++++++++++++++++++++++++++++++++++-------------- 2 files changed, 45 insertions(+), 14 deletions(-) hooks/post-receive -- Repository: mingw-org-wsl |
From: Keith M. <no...@so...> - 2017-11-28 16:50:58
|
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, 5.0-active has been updated via d4d38f3736b22bb3b91b9f9010093a877a0dd0bd (commit) from 4aa4a7a511f0fb7bf267088539aed97af93e4b71 (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/d4d38f3736b22bb3b91b9f9010093a877a0dd0bd/ commit d4d38f3736b22bb3b91b9f9010093a877a0dd0bd Author: Keith Marshall <ke...@us...> Date: Tue Nov 28 16:48:29 2017 +0000 Make <wsnetbs.h> header effectively self-contained. diff --git a/w32api/ChangeLog b/w32api/ChangeLog index e1919ca..c806b90 100644 --- a/w32api/ChangeLog +++ b/w32api/ChangeLog @@ -1,5 +1,14 @@ 2017-11-28 Keith Marshall <ke...@us...> + Make <wsnetbs.h> header effectively self-contained. + + * include/wsnetbs.h: Assert copyright; tidy layout; include + "_winsock.h", so making this header effectively self-contained, and + thus relieving the user of a responsibility for ensuring that some + other appropriate WinSock header has been included first. + +2017-11-28 Keith Marshall <ke...@us...> + Factor <winsock.h> duplicate content out of <winsock2.h> * include/winsock2.h: Remove all declarations and definitions which diff --git a/w32api/include/wsnetbs.h b/w32api/include/wsnetbs.h index e435b5d..9914efc 100644 --- a/w32api/include/wsnetbs.h +++ b/w32api/include/wsnetbs.h @@ -1,35 +1,66 @@ +/* + * wsnetbs.h + * + * NetBIOS extensions to the standard WinSock API. + * + * $Id$ + * + * Written by Kai Henningsen <kai...@us...> + * Copyright (C) 2002, 2017, 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 _WSNETBS_H -#define _WSNETBS_H -#if __GNUC__ >=3 #pragma GCC system_header -#endif +#define _WSNETBS_H -#define NETBIOS_NAME_LENGTH 16 -#define NETBIOS_UNIQUE_NAME 0 -#define NETBIOS_GROUP_NAME 1 -#define NETBIOS_TYPE_QUICK_UNIQUE 2 -#define NETBIOS_TYPE_QUICK_GROUP 3 +#define NETBIOS_NAME_LENGTH 16 +#define NETBIOS_UNIQUE_NAME 0 +#define NETBIOS_GROUP_NAME 1 +#define NETBIOS_TYPE_QUICK_UNIQUE 2 +#define NETBIOS_TYPE_QUICK_GROUP 3 #ifndef RC_INVOKED -typedef struct sockaddr_nb { - short snb_family; - u_short snb_type; - char snb_name[NETBIOS_NAME_LENGTH]; + +#include "_winsock.h" + +typedef struct sockaddr_nb +{ short snb_family; + u_short snb_type; + char snb_name[NETBIOS_NAME_LENGTH]; } SOCKADDR_NB, *PSOCKADDR_NB, *LPSOCKADDR_NB; -#define SET_NETBIOS_SOCKADDR(_snb,_type,_name,_port) \ -{ \ - register int _i; \ - register char *_n = (_name); \ - register PSOCKADDR_NB _s = (_snb); \ - _s->snb_family = AF_NETBIOS; \ - _s->snb_type = (_type); \ - for (_i=0; _n[_i] != '\0' && _i<NETBIOS_NAME_LENGTH-1; _i++) { \ - _s->snb_name[_i] = _n[_i]; \ - } \ - for (; _i<NETBIOS_NAME_LENGTH-1; _i++) { \ - _s->snb_name[_i] = ' '; \ - } \ - _s->snb_name[NETBIOS_NAME_LENGTH-1] = (_port); \ -} -#endif /* RC_INVOKED */ -#endif + +#define SET_NETBIOS_SOCKADDR(_snb,_type,_name,_port) \ + { register int _i; \ + register char *_n = (_name); \ + register PSOCKADDR_NB _s = (_snb); \ + _s->snb_family = AF_NETBIOS; \ + _s->snb_type = (_type); \ + for (_i = 0; _n[_i] != '\0' && _i < NETBIOS_NAME_LENGTH - 1; _i++) \ + { _s->snb_name[_i] = _n[_i]; } \ + while (_i < NETBIOS_NAME_LENGTH - 1) \ + { _s->snb_name[_i++] = ' '; } \ + _s->snb_name[NETBIOS_NAME_LENGTH - 1] = (_port); \ + } + +#endif /* RC_INVOKED */ +#endif /* !_WSNETBS_H: $RCSfile$: end of file */ ----------------------------------------------------------------------- Summary of changes: w32api/ChangeLog | 9 +++++ w32api/include/wsnetbs.h | 89 ++++++++++++++++++++++++++++++++---------------- 2 files changed, 69 insertions(+), 29 deletions(-) hooks/post-receive -- Repository: mingw-org-wsl |
From: Keith M. <no...@so...> - 2017-11-28 13:29:16
|
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, 5.0-active has been updated via 4aa4a7a511f0fb7bf267088539aed97af93e4b71 (commit) from 411a15dacafc564d2620284f0393e1879488761e (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/4aa4a7a511f0fb7bf267088539aed97af93e4b71/ commit 4aa4a7a511f0fb7bf267088539aed97af93e4b71 Author: Keith Marshall <ke...@us...> Date: Tue Nov 28 13:28:34 2017 +0000 Factor <winsock.h> duplicate content out of <winsock2.h> diff --git a/w32api/ChangeLog b/w32api/ChangeLog index 5e95b34..e1919ca 100644 --- a/w32api/ChangeLog +++ b/w32api/ChangeLog @@ -1,3 +1,18 @@ +2017-11-28 Keith Marshall <ke...@us...> + + Factor <winsock.h> duplicate content out of <winsock2.h> + + * include/winsock2.h: Remove all declarations and definitions which + are identically specified in <winsock.h>, but keep them in scope by... + [! defined _WINSOCK_H]: ...including <winsock.h> itself; override any + declarations and definitions therefrom, which introduce conflicts. + [defined _WINSOCK_H]: Diagnose misuse; suppress all further + definitions and declarations. + + * include/winsock.h (SOMAXCONN): Add comment; note disparity between + WinSock v1.1 and WinSock v2, the latter of which will override when + correctly included by <winsock2.h> + 2017-11-24 Keith Marshall <ke...@us...> Make <winsock.h> and <winsock2.h> duplicate code congruent. diff --git a/w32api/include/winsock.h b/w32api/include/winsock.h index 8b83d0c..08967b3 100644 --- a/w32api/include/winsock.h +++ b/w32api/include/winsock.h @@ -498,6 +498,11 @@ struct sockproto #ifndef __INSIDE_MSYS__ +/* This definition of SOMAXCONN is correct for WinSock v1.1, but not + * for WinSock v2; we define it thus here, but note that, if included + * by <winsock2.h>, it will subsequently be overridden by the correct + * WinSock v2 definition. + */ #define SOMAXCONN 5 #define MSG_OOB 1 diff --git a/w32api/include/winsock2.h b/w32api/include/winsock2.h index 328e00e..cdd1843 100644 --- a/w32api/include/winsock2.h +++ b/w32api/include/winsock2.h @@ -38,689 +38,29 @@ * Portions Copyright (C) 1993 by Digital Equipment Corporation. * */ -#if !(defined _WINSOCK2_H || defined _WINSOCK_H) +#ifndef _WINSOCK2_H #pragma GCC system_header #define _WINSOCK2_H -/* WinSock v2 deprecates several features, which are standard - * in WinSock v1.1; their declarations remain in scope, but we - * define this qualifying macro up-front, to ensure that the - * deprecated status is recorded. +#ifdef _WINSOCK_H /* included prematurely */ +/* Oops! <winsock.h> appears to have been included already, which now + * precludes any use of WinSock v2 protocol. */ -#define __WINSOCK2_DEPRECATED __MINGW_ATTRIB_DEPRECATED - -#define _WINSOCK_H /* to prevent later inclusion of winsock.h */ - -#define _GNU_H_WINDOWS32_SOCKETS -#define __WINSOCK_H_SOURCED__ 1 - -#include <windows.h> -#include <winerror.h> -#include <sys/bsdtypes.h> -#include <sys/time.h> - -#ifndef WINSOCK_API_LINKAGE -#ifdef __W32API_USE_DLLIMPORT__ -#define WINSOCK_API_LINKAGE DECLSPEC_IMPORT -#else -#define WINSOCK_API_LINKAGE -#endif -#endif - -#if ! defined _USE_SYS_TYPES_FD_SET && defined USE_SYS_TYPES_FD_SET -/* Originally defined by the deprecated name, USE_SYS_TYPES_FD_SET, users - * may specify this to suppress warnings, in the event that (incompatible) - * fd_set manipulation macros may have been inherited from <sys/types.h>; - * accommodate use of the deprecated feature test name. - */ -#warning "Feature test macro USE_SYS_TYPES_FD_SET is deprecated." -#warning "Use the _USE_SYS_TYPES_FD_SET feature test macro instead." -#define _USE_SYS_TYPES_FD_SET 1 -#endif - -_BEGIN_C_DECLS - -/* Names common to Winsock1.1 and Winsock2 - */ -typedef u_int SOCKET; - -#ifndef FD_SETSIZE -#define FD_SETSIZE 64 -#endif - -/* shutdown() how types */ -#define SD_RECEIVE 0x00 -#define SD_SEND 0x01 -#define SD_BOTH 0x02 - -#ifndef _SYS_TYPES_FD_SET -/* fd_set may have been defined by the newlib <sys/types.h>, if the - * internal __USE_W32_SOCKETS feature test has not been enabled. - */ -#undef fd_set -typedef -struct fd_set -{ u_int fd_count; - SOCKET fd_array[FD_SETSIZE]; -} fd_set; - -#ifndef FD_ISSET -int FD_ISSET (SOCKET, fd_set *); -#define FD_ISSET( __fd, __set ) __FD_ISSET ((__fd), (__set)) - -/* Microsoft provide this library function equivalent of the FD_ISSET - * macro, and erroneously claim that it is neccessary to implement the - * macro. We could just as easily implement it entirely inline... - */ -int PASCAL __WSAFDIsSet (SOCKET, fd_set *); -/* ...but, given the availability of the library function, we may just - * as well use it. - */ -__CRT_ALIAS int __FD_ISSET( SOCKET __fd, fd_set *__set ) -{ return __WSAFDIsSet (__fd, __set); } -#endif /* ! defined FD_ISSET */ - -#ifndef FD_SET -#if !_WINSOCK_ANOMALOUS_TYPEDEFS -/* WinSock is intended to mimic the Berkeley Sockets API, for which - * POSIX.1 provides a reference specification; this states that FD_SET - * may be implemented as either a macro, or as a function. The reference - * <winsock.h> implementation at http://www.sockets.com/winsock.htm#WinsockH - * includes a typedef for FD_SET, which a) conflicts with the latter POSIX.1 - * provision, and b) creates potential confusion with the former. Thus, we - * prefer to conform with POSIX.1 functional semantics, and recommend that - * users avoid the potentially confusing FD_SET typedefs, so allowing us - * to provide this function prototype: - */ -void FD_SET (SOCKET, fd_set *); - -#else /* _WINSOCK_ANOMALOUS_TYPEDEFS */ -/* However, for users who insist on eschewing standard C/C++ syntax, and - * for whatever reason must use FD_SET as a data type, instead of correctly - * referring to fd_set, or for pointer references, use PFD_SET or LPFD_SET - * instead of standard fd_set * references, we make these anomalous types - * visible, when the _WINSOCK_ANOMALOUS_TYPEDEFS feature test macro is - * defined with a non-zero value. - */ -#warning "FD_SET, PFD_SET, and LPFD_SET data types are non-portable." -#warning "Use portable fd_set, and fd_set * type references instead." - -typedef struct fd_set FD_SET, *PFD_SET, *LPFD_SET; -#endif -#define FD_SET( __fd, __set ) __FD_SET ((__fd), (__set)) -__CRT_ALIAS void __FD_SET (SOCKET __fd, fd_set *__set) -{ if( (__set->fd_count < FD_SETSIZE) && ! FD_ISSET (__fd, __set) ) - __set->fd_array[__set->fd_count++] = __fd; -} -#endif /* ! defined FD_SET */ - -#ifndef FD_CLR -void FD_CLR (SOCKET, fd_set *); -#define FD_CLR( __fd, __set ) __FD_CLR ((__fd), (__set)) -__CRT_ALIAS void __FD_CLR (SOCKET __fd, fd_set *__set) -{ u_int __m, __n; for (__m = __n = 0; __n < __set->fd_count; __n++) - { if (__fd != __set->fd_array[__n]) - { if (__m < __n) __set->fd_array[__m] = __set->fd_array[__n]; - ++__m; - } - } __set->fd_count = __m; -} -#endif /* ! defined FD_CLR */ - -#ifndef FD_ZERO -void FD_ZERO (fd_set *); -#define FD_ZERO( __set ) __FD_ZERO (__set) -__CRT_ALIAS void __FD_ZERO (fd_set *__set) -{ __set->fd_count = 0; } -#endif /* ! defined FD_ZERO */ - -#elif ! defined _USE_SYS_TYPES_FD_SET -/* Definitions from <sys/types.h> probably aren't what the user wants; - * if they know what they are doing, and they are sure that this really - * is what they want, then they may enable the _USE_SYS_TYPES_FD_SET - * feature test macro, to suppress this warning. - */ -#warning "fd_set and associated macros have been defined in <sys/types.h>" -#warning "Your <sys/types.h> may cause runtime problems with W32 sockets." -#endif /* !_SYS_TYPES_FD_SET */ - -#ifndef __INSIDE_MSYS__ - -struct hostent -{ char *h_name; - char **h_aliases; - short h_addrtype; - short h_length; -# define h_addr h_addr_list[0] - char **h_addr_list; -}; - -struct linger -{ u_short l_onoff; - u_short l_linger; -}; - -#endif /* !__INSIDE_MSYS__ */ - -#define IOCPARM_MASK 0x7F -#define IOC_VOID 0x20000000 -#define IOC_OUT 0x40000000 -#define IOC_IN 0x80000000 -#define IOC_INOUT (IOC_IN | IOC_OUT) - -#ifndef __INSIDE_MSYS__ - -#define _IO(x,y) (IOC_VOID|((x)<<8)|(y)) -#define _IOR(x,y,t) (IOC_OUT|(((long)sizeof(t)&IOCPARM_MASK)<<16)|((x)<<8)|(y)) -#define _IOW(x,y,t) (IOC_IN|(((long)sizeof(t)&IOCPARM_MASK)<<16)|((x)<<8)|(y)) - -#define FIONBIO _IOW('f', 126, u_long) - -#endif /* !__INSIDE_MSYS__ */ - -#define FIONREAD _IOR('f', 127, u_long) -#define FIOASYNC _IOW('f', 125, u_long) -#define SIOCSHIWAT _IOW('s', 0, u_long) -#define SIOCGHIWAT _IOR('s', 1, u_long) -#define SIOCSLOWAT _IOW('s', 2, u_long) -#define SIOCGLOWAT _IOR('s', 3, u_long) -#define SIOCATMARK _IOR('s', 7, u_long) - -#ifndef __INSIDE_MSYS__ - -struct netent -{ char *n_name; - char **n_aliases; - short n_addrtype; - u_long n_net; -}; - -struct servent -{ char *s_name; - char **s_aliases; - short s_port; - char *s_proto; -}; - -struct protoent -{ char *p_name; - char **p_aliases; - short p_proto; -}; - -#endif /* !__INSIDE_MSYS__ */ - -#define IPPROTO_IP 0 -#define IPPROTO_ICMP 1 -#define IPPROTO_IGMP 2 -#define IPPROTO_GGP 3 -#define IPPROTO_TCP 6 -#define IPPROTO_PUP 12 -#define IPPROTO_UDP 17 -#define IPPROTO_IDP 22 -#define IPPROTO_ND 77 - -#define IPPROTO_RAW 255 -#define IPPROTO_MAX 256 - -/* IPv6 options: these are unsupported, prior to Winsock v2. - */ -#define IPPROTO_HOPOPTS 0 /* IPv6 Hop-by-Hop options */ -#define IPPROTO_IPV6 41 /* IPv6 header */ -#define IPPROTO_ROUTING 43 /* IPv6 Routing header */ -#define IPPROTO_FRAGMENT 44 /* IPv6 fragmentation header */ -#define IPPROTO_ESP 50 /* encapsulating security payload */ -#define IPPROTO_AH 51 /* authentication header */ -#define IPPROTO_ICMPV6 58 /* ICMPv6 */ -#define IPPROTO_NONE 59 /* IPv6 no next header */ -#define IPPROTO_DSTOPTS 60 /* IPv6 Destination options */ - -#define IPPORT_ECHO 7 -#define IPPORT_DISCARD 9 -#define IPPORT_SYSTAT 11 -#define IPPORT_DAYTIME 13 -#define IPPORT_NETSTAT 15 -#define IPPORT_FTP 21 -#define IPPORT_TELNET 23 -#define IPPORT_SMTP 25 -#define IPPORT_TIMESERVER 37 -#define IPPORT_NAMESERVER 42 -#define IPPORT_WHOIS 43 -#define IPPORT_MTP 57 -#define IPPORT_TFTP 69 -#define IPPORT_RJE 77 -#define IPPORT_FINGER 79 -#define IPPORT_TTYLINK 87 -#define IPPORT_SUPDUP 95 -#define IPPORT_EXECSERVER 512 -#define IPPORT_LOGINSERVER 513 -#define IPPORT_CMDSERVER 514 -#define IPPORT_EFSSERVER 520 -#define IPPORT_BIFFUDP 512 -#define IPPORT_WHOSERVER 513 -#define IPPORT_ROUTESERVER 520 -#define IPPORT_RESERVED 1024 - -#define IMPLINK_IP 155 -#define IMPLINK_LOWEXPER 156 -#define IMPLINK_HIGHEXPER 158 - -struct in_addr -#define s_addr S_un.S_addr -#define s_host S_un.S_un_b.s_b2 -#define s_net S_un.S_un_b.s_b1 -#define s_imp S_un.S_un_w.s_w2 -#define s_impno S_un.S_un_b.s_b4 -#define s_lh S_un.S_un_b.s_b3 -{ union - { struct { u_char s_b1,s_b2,s_b3,s_b4; } S_un_b; - struct { u_short s_w1,s_w2; } S_un_w; - u_long S_addr; - } S_un; -}; - -#define IN_CLASSA(i) (((long)(i) & 0x80000000) == 0) -#define IN_CLASSA_NET 0xFF000000 -#define IN_CLASSA_NSHIFT 24 -#define IN_CLASSA_HOST 0x00FFFFFF -#define IN_CLASSA_MAX 128 -#define IN_CLASSB(i) (((long)(i) & 0xC0000000) == 0x80000000) -#define IN_CLASSB_NET 0xFFFF0000 -#define IN_CLASSB_NSHIFT 16 -#define IN_CLASSB_HOST 0x0000FFFF -#define IN_CLASSB_MAX 65536 -#define IN_CLASSC(i) (((long)(i) & 0xE0000000) == 0xC0000000) -#define IN_CLASSC_NET 0xFFFFFF00 -#define IN_CLASSC_NSHIFT 8 -#define IN_CLASSC_HOST 0xFF -#define INADDR_ANY (u_long)(0) -#define INADDR_LOOPBACK 0x7F000001 -#define INADDR_BROADCAST (u_long)(0xFFFFFFFF) -#define INADDR_NONE 0xFFFFFFFF - -struct sockaddr_in -{ short sin_family; - u_short sin_port; - struct in_addr sin_addr; - char sin_zero[8]; -}; - -#define WSADESCRIPTION_LEN 256 -#define WSASYS_STATUS_LEN 128 - -typedef -struct WSAData -{ WORD wVersion; - WORD wHighVersion; - char szDescription[WSADESCRIPTION_LEN+1]; - char szSystemStatus[WSASYS_STATUS_LEN+1]; - unsigned short iMaxSockets; - unsigned short iMaxUdpDg; - char *lpVendorInfo; -} WSADATA, *LPWSADATA; - -#ifndef __INSIDE_MSYS__ - -#define IP_OPTIONS 1 -#define SO_DEBUG 1 -#define SO_ACCEPTCONN 2 -#define SO_REUSEADDR 4 -#define SO_KEEPALIVE 8 -#define SO_DONTROUTE 16 -#define SO_BROADCAST 32 -#define SO_USELOOPBACK 64 -#define SO_LINGER 128 -#define SO_OOBINLINE 256 - -#define SO_DONTLINGER (u_int)(~SO_LINGER) -#define SO_EXCLUSIVEADDRUSE ((u_int)(~SO_REUSEADDR)) - -#define SO_SNDBUF 0x1001 -#define SO_RCVBUF 0x1002 -#define SO_SNDLOWAT 0x1003 -#define SO_RCVLOWAT 0x1004 -#define SO_SNDTIMEO 0x1005 -#define SO_RCVTIMEO 0x1006 -#define SO_ERROR 0x1007 -#define SO_TYPE 0x1008 - -#endif /* !__INSIDE_MSYS__ */ - -#define INVALID_SOCKET (SOCKET)(~0) -#define SOCKET_ERROR (-1) -#define SOCK_STREAM 1 -#define SOCK_DGRAM 2 -#define SOCK_RAW 3 -#define SOCK_RDM 4 -#define SOCK_SEQPACKET 5 -#define TCP_NODELAY 0x0001 -#define AF_UNSPEC 0 -#define AF_UNIX 1 -#define AF_INET 2 -#define AF_IMPLINK 3 -#define AF_PUP 4 -#define AF_CHAOS 5 -#define AF_IPX 6 -#define AF_NS 6 -#define AF_ISO 7 - -#define AF_OSI AF_ISO - -#define AF_ECMA 8 -#define AF_DATAKIT 9 -#define AF_CCITT 10 -#define AF_SNA 11 -#define AF_DECnet 12 -#define AF_DLI 13 -#define AF_LAT 14 -#define AF_HYLINK 15 -#define AF_APPLETALK 16 -#define AF_NETBIOS 17 -#define AF_VOICEVIEW 18 -#define AF_FIREFOX 19 -#define AF_UNKNOWN1 20 -#define AF_BAN 21 -#define AF_ATM 22 -#define AF_INET6 23 - -#define AF_CLUSTER 24 -#define AF_12844 25 -#define AF_IRDA 26 -#define AF_NETDES 28 - -#ifndef __INSIDE_MSYS__ - -#define AF_MAX 29 - -struct sockaddr -{ u_short sa_family; - char sa_data[14]; -}; - -/* Portable IPv6/IPv4 version of sockaddr. Based on RFC 2553. - * Pad to force 8 byte alignment and maximum size of 128 bytes. - * - * Desired design of maximum size and alignment - */ -#define _SS_MAXSIZE 128 -#define _SS_ALIGNSIZE sizeof(__int64) - -/* Definitions used for sockaddr_storage structure padding. - */ -#define _SS_PAD1SIZE (_SS_ALIGNSIZE - sizeof(short)) -#define _SS_PAD2SIZE (_SS_MAXSIZE - (sizeof(short) + _SS_PAD1SIZE + _SS_ALIGNSIZE)) - -struct sockaddr_storage -{ short ss_family; - char __ss_pad1[_SS_PAD1SIZE]; /* pad to 8 */ - __int64 __ss_align; /* force alignment */ - char __ss_pad2[_SS_PAD2SIZE]; /* pad to 128 */ -}; - -#endif /* !__INSIDE_MSYS__ */ - -struct sockproto -{ u_short sp_family; - u_short sp_protocol; -}; - -#define PF_UNSPEC AF_UNSPEC -#define PF_UNIX AF_UNIX -#define PF_INET AF_INET -#define PF_IMPLINK AF_IMPLINK -#define PF_PUP AF_PUP -#define PF_CHAOS AF_CHAOS -#define PF_NS AF_NS -#define PF_IPX AF_IPX -#define PF_ISO AF_ISO -#define PF_OSI AF_OSI -#define PF_ECMA AF_ECMA -#define PF_DATAKIT AF_DATAKIT -#define PF_CCITT AF_CCITT -#define PF_SNA AF_SNA -#define PF_DECnet AF_DECnet -#define PF_DLI AF_DLI -#define PF_LAT AF_LAT -#define PF_HYLINK AF_HYLINK -#define PF_APPLETALK AF_APPLETALK -#define PF_VOICEVIEW AF_VOICEVIEW -#define PF_FIREFOX AF_FIREFOX -#define PF_UNKNOWN1 AF_UNKNOWN1 -#define PF_BAN AF_BAN -#define PF_ATM AF_ATM -#define PF_INET6 AF_INET6 -#define PF_MAX AF_MAX - -#define SOL_SOCKET 0xFFFF - -#ifndef __INSIDE_MSYS__ - -#define SOMAXCONN 0x7FFFFFFF /* (5) in WinSock1.1 */ - -#define MSG_OOB 1 -#define MSG_PEEK 2 -#define MSG_DONTROUTE 4 - -#endif /* !__INSIDE_MSYS__ */ - -#define MSG_MAXIOVLEN 16 -#define MSG_PARTIAL 0x8000 -#define MAXGETHOSTSTRUCT 1024 - -enum -{ /* Enumerate the flags used to represent the events which may be - * detected on any socket, when monitored via an fd_set array. - */ - FD_READ_BIT = 0, -# define FD_READ (1 << FD_READ_BIT) - - FD_WRITE_BIT, -# define FD_WRITE (1 << FD_WRITE_BIT) - - FD_OOB_BIT, -# define FD_OOB (1 << FD_OOB_BIT) - - FD_ACCEPT_BIT, -# define FD_ACCEPT (1 << FD_ACCEPT_BIT) - - FD_CONNECT_BIT, -# define FD_CONNECT (1 << FD_CONNECT_BIT) - - FD_CLOSE_BIT, -# define FD_CLOSE (1 << FD_CLOSE_BIT) - -# ifdef _WINSOCK2_H -/* WinSock v1.1 defines no further events, beyond FD_CLOSE (1 << 5 = 32). - * The following are specific to WinSock v2; for convenience, they may be - * enumerated here, but they are exposed only when <winsock.h> is included - * indirectly, by way of including <winsock2.h> - */ - FD_QOS_BIT, -# define FD_QOS (1 << FD_QOS_BIT) - - FD_GROUP_QOS_BIT, -# define FD_GROUP_QOS (1 << FD_GROUP_QOS_BIT) - - FD_ROUTING_INTERFACE_CHANGE_BIT, -# define FD_ROUTING_INTERFACE_CHANGE (1 << FD_ROUTING_INTERFACE_CHANGE_BIT) - - FD_ADDRESS_LIST_CHANGE_BIT, -# define FD_ADDRESS_LIST_CHANGE (1 << FD_ADDRESS_LIST_CHANGE_BIT) - -# endif /* _WINSOCK2_H */ - /* Regardless of WinSock version, FD_MAX_EVENTS represents the first - * unused flag bit, whence we may deduce FD_ALL_EVENTS, as a mask for - * all supported event flags, specific to the WinSock version in use. - */ - FD_MAX_EVENTS, -# define FD_ALL_EVENTS ((1 << FD_MAX_EVENTS) - 1) -}; - -#define WSANO_ADDRESS WSANO_DATA - -#ifndef __INSIDE_MSYS__ - -#define h_errno WSAGetLastError() -#define HOST_NOT_FOUND WSAHOST_NOT_FOUND -#define TRY_AGAIN WSATRY_AGAIN -#define NO_RECOVERY WSANO_RECOVERY -#define NO_DATA WSANO_DATA -#define NO_ADDRESS WSANO_ADDRESS - -#endif /* !__INSIDE_MSYS__ */ - -WINSOCK_API_LINKAGE SOCKET PASCAL accept (SOCKET, struct sockaddr *, int *); - -WINSOCK_API_LINKAGE int PASCAL bind (SOCKET, const struct sockaddr *, int); -WINSOCK_API_LINKAGE int PASCAL closesocket (SOCKET); -WINSOCK_API_LINKAGE int PASCAL connect (SOCKET, const struct sockaddr *, int); -WINSOCK_API_LINKAGE int PASCAL ioctlsocket (SOCKET, long, u_long *); -WINSOCK_API_LINKAGE int PASCAL getpeername (SOCKET, struct sockaddr *, int *); -WINSOCK_API_LINKAGE int PASCAL getsockname (SOCKET, struct sockaddr *, int *); -WINSOCK_API_LINKAGE int PASCAL getsockopt (SOCKET, int, int, char *, int *); - -WINSOCK_API_LINKAGE unsigned long PASCAL inet_addr (const char *); - -WINSOCK_API_LINKAGE DECLARE_STDCALL_P (char *) inet_ntoa (struct in_addr); - -WINSOCK_API_LINKAGE int PASCAL listen (SOCKET, int); -WINSOCK_API_LINKAGE int PASCAL recv (SOCKET, char *, int, int); -WINSOCK_API_LINKAGE int PASCAL recvfrom (SOCKET, char *, int, int, struct sockaddr *, int *); -WINSOCK_API_LINKAGE int PASCAL send (SOCKET, const char *, int, int); -WINSOCK_API_LINKAGE int PASCAL sendto (SOCKET, const char *, int, int, const struct sockaddr *, int); -WINSOCK_API_LINKAGE int PASCAL setsockopt (SOCKET, int, int, const char *, int); -WINSOCK_API_LINKAGE int PASCAL shutdown (SOCKET, int); - -WINSOCK_API_LINKAGE SOCKET PASCAL socket (int, int, int); - -WINSOCK_API_LINKAGE DECLARE_STDCALL_P (struct hostent *) gethostbyaddr (const char *, int, int); -WINSOCK_API_LINKAGE DECLARE_STDCALL_P (struct hostent *) gethostbyname (const char *); -WINSOCK_API_LINKAGE DECLARE_STDCALL_P (struct servent *) getservbyport (int, const char *); -WINSOCK_API_LINKAGE DECLARE_STDCALL_P (struct servent *) getservbyname (const char *, const char *); -WINSOCK_API_LINKAGE DECLARE_STDCALL_P (struct protoent *) getprotobynumber (int); -WINSOCK_API_LINKAGE DECLARE_STDCALL_P (struct protoent *) getprotobyname (const char *); - -typedef SOCKET (PASCAL *LPFN_ACCEPT) (SOCKET, struct sockaddr *, int *); - -typedef int (PASCAL *LPFN_BIND) (SOCKET, const struct sockaddr *, int); -typedef int (PASCAL *LPFN_CLOSESOCKET) (SOCKET); -typedef int (PASCAL *LPFN_CONNECT) (SOCKET, const struct sockaddr *, int); -typedef int (PASCAL *LPFN_IOCTLSOCKET) (SOCKET, long, u_long *); -typedef int (PASCAL *LPFN_GETPEERNAME) (SOCKET, struct sockaddr *, int *); -typedef int (PASCAL *LPFN_GETSOCKNAME) (SOCKET, struct sockaddr *, int *); -typedef int (PASCAL *LPFN_GETSOCKOPT) (SOCKET, int, int, char *, int *); - -typedef u_long (PASCAL *LPFN_HTONL) (u_long); -typedef u_short (PASCAL *LPFN_HTONS) (u_short); - -typedef unsigned long (PASCAL *LPFN_INET_ADDR) (const char *); - -typedef char *(PASCAL *LPFN_INET_NTOA) (struct in_addr); - -typedef int (PASCAL *LPFN_LISTEN) (SOCKET, int); - -typedef u_long (PASCAL *LPFN_NTOHL) (u_long); -typedef u_short (PASCAL *LPFN_NTOHS) (u_short); - -typedef int (PASCAL *LPFN_RECV) (SOCKET, char *, int, int); -typedef int (PASCAL *LPFN_RECVFROM) (SOCKET, char *, int, int, struct sockaddr *, int *); -typedef int (PASCAL *LPFN_SELECT) (int, fd_set *, fd_set *, fd_set *, const struct timeval *); -typedef int (PASCAL *LPFN_SEND) (SOCKET, const char *, int, int); -typedef int (PASCAL *LPFN_SENDTO) (SOCKET, const char *, int, int, const struct sockaddr *, int); -typedef int (PASCAL *LPFN_SETSOCKOPT) (SOCKET, int, int, const char *, int); -typedef int (PASCAL *LPFN_SHUTDOWN) (SOCKET, int); - -typedef SOCKET (PASCAL *LPFN_SOCKET) (int, int, int); - -typedef struct hostent *(PASCAL *LPFN_GETHOSTBYADDR) ( const char *, int, int); -typedef struct hostent *(PASCAL *LPFN_GETHOSTBYNAME) ( const char *); - -typedef int (PASCAL *LPFN_GETHOSTNAME) (char *, int); - -typedef struct servent *(PASCAL *LPFN_GETSERVBYPORT) (int, const char *); -typedef struct servent *(PASCAL *LPFN_GETSERVBYNAME) (const char *, const char *); -typedef struct protoent *(PASCAL *LPFN_GETPROTOBYNUMBER) (int); -typedef struct protoent *(PASCAL *LPFN_GETPROTOBYNAME) (const char *); - -WINSOCK_API_LINKAGE int PASCAL WSAStartup (WORD, LPWSADATA); -WINSOCK_API_LINKAGE int PASCAL WSACleanup (void); -WINSOCK_API_LINKAGE void PASCAL WSASetLastError (int); -WINSOCK_API_LINKAGE int PASCAL WSAGetLastError (void); - -typedef int (PASCAL *LPFN_WSASTARTUP) (WORD, LPWSADATA); -typedef int (PASCAL *LPFN_WSACLEANUP) (void); -typedef int (PASCAL *LPFN_WSAGETLASTERROR) (void); -typedef void (PASCAL *LPFN_WSASETLASTERROR) (int); - -/* The following four pseudo-blocking functions are provided - * to support WinSock v1.1, but have been marked as deprecated - * in WinSock v2; they remain available, but it is recommended - * that threads should be used instead! +#error "Including <winsock2.h> after <winsock.h> is unsupported." +#warning "Falling back to WinSock v1.1 protocol." + +#else /* !_WINSOCK_H included prematurely */ +/* This is correct WinSock v2 protocol usage: <winsock.h> has not been + * included previously, so we include it now, to establish definitions + * which are common to both WinSock v1 and WinSock v2 protocols. This + * is filtered, on our prior definition of _WINSOCK2_H, to exclude any + * obsolete or conflicting definitions from WinSock v1, which are no + * longer applicable in WinSock v2, and on __WINSOCK2_DEPRECATED to + * identify any which remain available, but have been deprecated. */ -WINSOCK_API_LINKAGE BOOL PASCAL WSAIsBlocking (void) __WINSOCK2_DEPRECATED; -WINSOCK_API_LINKAGE int PASCAL WSAUnhookBlockingHook (void) __WINSOCK2_DEPRECATED; -WINSOCK_API_LINKAGE FARPROC PASCAL WSASetBlockingHook (FARPROC) __WINSOCK2_DEPRECATED; -WINSOCK_API_LINKAGE int PASCAL WSACancelBlockingCall (void) __WINSOCK2_DEPRECATED; - -typedef BOOL (PASCAL *LPFN_WSAISBLOCKING) (void); -typedef int (PASCAL *LPFN_WSAUNHOOKBLOCKINGHOOK) (void); -typedef FARPROC (PASCAL *LPFN_WSASETBLOCKINGHOOK) (FARPROC); -typedef int (PASCAL *LPFN_WSACANCELBLOCKINGCALL) (void); - -WINSOCK_API_LINKAGE HANDLE PASCAL WSAAsyncGetServByName (HWND, u_int, const char *, const char *, char *, int); -WINSOCK_API_LINKAGE HANDLE PASCAL WSAAsyncGetServByPort (HWND, u_int, int, const char *, char *, int); -WINSOCK_API_LINKAGE HANDLE PASCAL WSAAsyncGetProtoByName (HWND, u_int, const char *, char *, int); -WINSOCK_API_LINKAGE HANDLE PASCAL WSAAsyncGetProtoByNumber (HWND, u_int, int, char *, int); -WINSOCK_API_LINKAGE HANDLE PASCAL WSAAsyncGetHostByName (HWND, u_int, const char *, char *, int); -WINSOCK_API_LINKAGE HANDLE PASCAL WSAAsyncGetHostByAddr (HWND, u_int, const char *, int, int, char *, int); - -WINSOCK_API_LINKAGE int PASCAL WSACancelAsyncRequest (HANDLE); -WINSOCK_API_LINKAGE int PASCAL WSAAsyncSelect (SOCKET, HWND, u_int, long); - -typedef HANDLE (PASCAL *LPFN_WSAASYNCGETSERVBYNAME) (HWND, u_int, const char *, const char *, char *, int); -typedef HANDLE (PASCAL *LPFN_WSAASYNCGETSERVBYPORT) (HWND, u_int, int, const char *, char *, int); -typedef HANDLE (PASCAL *LPFN_WSAASYNCGETPROTOBYNAME) (HWND, u_int, const char*, char*, int); -typedef HANDLE (PASCAL *LPFN_WSAASYNCGETPROTOBYNUMBER) (HWND, u_int, int, char*, int); -typedef HANDLE (PASCAL *LPFN_WSAASYNCGETHOSTBYADDR) (HWND, u_int, const char*, int, int, char*, int); - -typedef int (PASCAL *LPFN_WSACANCELASYNCREQUEST) (HANDLE); -typedef int (PASCAL *LPFN_WSAASYNCSELECT) (SOCKET, HWND, u_int, long); - -#ifndef __INSIDE_MSYS__ - -WINSOCK_API_LINKAGE u_long PASCAL htonl (u_long); -WINSOCK_API_LINKAGE u_long PASCAL ntohl (u_long); -WINSOCK_API_LINKAGE u_short PASCAL htons (u_short); -WINSOCK_API_LINKAGE u_short PASCAL ntohs (u_short); -WINSOCK_API_LINKAGE int PASCAL select (int nfds, fd_set *, fd_set *, fd_set *, const struct timeval *); - -#endif /* !__INSIDE_MSYS__ */ - -WINSOCK_API_LINKAGE int PASCAL gethostname (char *, int); - -#define WSAMAKEASYNCREPLY(b,e) MAKELONG(b,e) -#define WSAMAKESELECTREPLY(e,error) MAKELONG(e,error) -#define WSAGETASYNCBUFLEN(l) LOWORD(l) -#define WSAGETASYNCERROR(l) HIWORD(l) -#define WSAGETSELECTEVENT(l) LOWORD(l) -#define WSAGETSELECTERROR(l) HIWORD(l) - -typedef struct sockaddr SOCKADDR, *PSOCKADDR, *LPSOCKADDR; -typedef struct sockaddr_storage SOCKADDR_STORAGE, *PSOCKADDR_STORAGE; -typedef struct sockaddr_in SOCKADDR_IN, *PSOCKADDR_IN, *LPSOCKADDR_IN; -typedef struct linger LINGER, *PLINGER, *LPLINGER; -typedef struct in_addr IN_ADDR, *PIN_ADDR, *LPIN_ADDR; -typedef struct hostent HOSTENT, *PHOSTENT, *LPHOSTENT; -typedef struct servent SERVENT, *PSERVENT, *LPSERVENT; -typedef struct protoent PROTOENT, *PPROTOENT, *LPPROTOENT; -typedef struct timeval TIMEVAL, *PTIMEVAL, *LPTIMEVAL; - -_END_C_DECLS - - -#undef __WINSOCK_H_SOURCED__ +#define __WINSOCK2_DEPRECATED __MINGW_ATTRIB_DEPRECATED +#include "winsock.h" -/* winsock2 additions */ #define __WINSOCK2_H_SOURCED__ /* We need a definition for the BLOB data type; although an incomplete @@ -791,6 +131,70 @@ typedef enum GuaranteedService } GUARANTEE; +/* IPv6 protocol options: these are additional to protocol option constants + * already defined in <winsock.h>; they are unsupported prior to WinSock v2. + */ +#define IPPROTO_HOPOPTS 0 /* IPv6 Hop-by-Hop options */ +#define IPPROTO_IPV6 41 /* IPv6 header */ +#define IPPROTO_ROUTING 43 /* IPv6 Routing header */ +#define IPPROTO_FRAGMENT 44 /* IPv6 fragmentation header */ +#define IPPROTO_ESP 50 /* encapsulating security payload */ +#define IPPROTO_AH 51 /* authentication header */ +#define IPPROTO_ICMPV6 58 /* ICMPv6 */ +#define IPPROTO_NONE 59 /* IPv6 no next header */ +#define IPPROTO_DSTOPTS 60 /* IPv6 Destination options */ + +/* Address family definitions: these extend the set which has been defined + * already, in <winsock.h>; they are applicable only for WinSock v2. + */ +#define AF_CLUSTER 24 +#define AF_12844 25 +#define AF_IRDA 26 +#define AF_NETDES 28 + +#ifndef __INSIDE_MSYS__ +/* MSYS provides its own definition for AF_MAX; otherwise, <winsock.h> has + * already defined it as 24, but we need to override that to accommodate the + * additional constants, defined above. + */ +#undef AF_MAX +#define AF_MAX 29 + +/* Portable IPv6/IPv4 version of sockaddr, based on RFC 2553. + * The sockaddr_storage structure is padded to force 8 byte alignment of + * its member fields, and its size is fixed at 128 bytes. + * + * Desired design maximum size and alignment. + */ +#define _SS_MAXSIZE 128 +#define _SS_ALIGNSIZE sizeof(__int64) + +/* Definitions used for sockaddr_storage structure padding. + */ +#define _SS_PAD1SIZE (_SS_ALIGNSIZE - sizeof(short)) +#define _SS_PAD2SIZE (_SS_MAXSIZE - (sizeof(short) + _SS_PAD1SIZE + _SS_ALIGNSIZE)) + +struct sockaddr_storage +{ short ss_family; + char __ss_pad1[_SS_PAD1SIZE]; /* pad to 8 */ + __int64 __ss_align; /* force alignment */ + char __ss_pad2[_SS_PAD2SIZE]; /* pad to 128 */ +}; + +/* As in the case of AF_MAX, MSYS provides its own value for SOMAXCONN; + * otherwise, <winsock.h> has already defined it, with a value of 5; this + * was correct for WinSock v1.1, but we must now override it with this + * alternative definition, to make it correct for WinSock v2. + */ +#undef SOMAXCONN +#define SOMAXCONN 0x7FFFFFFF + +/* SO_EXCLUSIVEADDRUSE is not applicable, prior to WinSock v2; it is + * derived from SO_REUSEADDR, which has been defined in <winsock.h> + */ +#define SO_EXCLUSIVEADDRUSE ((u_int)(~SO_REUSEADDR)) +#endif /* !__INSIDE_MSYS__ */ + /* FIXME: FLOWSPEC and related definitions belong in qos.h */ /* Windows Sockets 2 Application Programming Interface, @@ -1091,46 +495,46 @@ struct _WSACOMPLETION } Parameters; } WSACOMPLETION, *PWSACOMPLETION, *LPWSACOMPLETION; -#define PFL_MULTIPLE_PROTO_ENTRIES 0x00000001 -#define PFL_RECOMMENDED_PROTO_ENTRY 0x00000002 -#define PFL_HIDDEN 0x00000004 -#define PFL_MATCHES_PROTOCOL_ZERO 0x00000008 -#define XP1_CONNECTIONLESS 0x00000001 -#define XP1_GUARANTEED_DELIVERY 0x00000002 -#define XP1_GUARANTEED_ORDER 0x00000004 -#define XP1_MESSAGE_ORIENTED 0x00000008 -#define XP1_PSEUDO_STREAM 0x00000010 -#define XP1_GRACEFUL_CLOSE 0x00000020 -#define XP1_EXPEDITED_DATA 0x00000040 -#define XP1_CONNECT_DATA 0x00000080 -#define XP1_DISCONNECT_DATA 0x00000100 -#define XP1_SUPPORT_BROADCAST 0x00000200 -#define XP1_SUPPORT_MULTIPOINT 0x00000400 -#define XP1_MULTIPOINT_CONTROL_PLANE 0x00000800 -#define XP1_MULTIPOINT_DATA_PLANE 0x00001000 -#define XP1_QOS_SUPPORTED 0x00002000 -#define XP1_INTERRUPT 0x00004000 -#define XP1_UNI_SEND 0x00008000 -#define XP1_UNI_RECV 0x00010000 -#define XP1_IFS_HANDLES 0x00020000 -#define XP1_PARTIAL_MESSAGE 0x00040000 - -#define BIGENDIAN 0x0000 -#define LITTLEENDIAN 0x0001 - -#define SECURITY_PROTOCOL_NONE 0x0000 -#define JL_SENDER_ONLY 0x01 -#define JL_RECEIVER_ONLY 0x02 -#define JL_BOTH 0x04 -#define WSA_FLAG_OVERLAPPED 0x01 -#define WSA_FLAG_MULTIPOINT_C_ROOT 0x02 -#define WSA_FLAG_MULTIPOINT_C_LEAF 0x04 -#define WSA_FLAG_MULTIPOINT_D_ROOT 0x08 -#define WSA_FLAG_MULTIPOINT_D_LEAF 0x10 -#define IOC_UNIX 0x00000000 -#define IOC_WS2 0x08000000 -#define IOC_PROTOCOL 0x10000000 -#define IOC_VENDOR 0x18000000 +#define PFL_MULTIPLE_PROTO_ENTRIES 0x00000001 +#define PFL_RECOMMENDED_PROTO_ENTRY 0x00000002 +#define PFL_HIDDEN 0x00000004 +#define PFL_MATCHES_PROTOCOL_ZERO 0x00000008 +#define XP1_CONNECTIONLESS 0x00000001 +#define XP1_GUARANTEED_DELIVERY 0x00000002 +#define XP1_GUARANTEED_ORDER 0x00000004 +#define XP1_MESSAGE_ORIENTED 0x00000008 +#define XP1_PSEUDO_STREAM 0x00000010 +#define XP1_GRACEFUL_CLOSE 0x00000020 +#define XP1_EXPEDITED_DATA 0x00000040 +#define XP1_CONNECT_DATA 0x00000080 +#define XP1_DISCONNECT_DATA 0x00000100 +#define XP1_SUPPORT_BROADCAST 0x00000200 +#define XP1_SUPPORT_MULTIPOINT 0x00000400 +#define XP1_MULTIPOINT_CONTROL_PLANE 0x00000800 +#define XP1_MULTIPOINT_DATA_PLANE 0x00001000 +#define XP1_QOS_SUPPORTED 0x00002000 +#define XP1_INTERRUPT 0x00004000 +#define XP1_UNI_SEND 0x00008000 +#define XP1_UNI_RECV 0x00010000 +#define XP1_IFS_HANDLES 0x00020000 +#define XP1_PARTIAL_MESSAGE 0x00040000 + +#define BIGENDIAN 0x0000 +#define LITTLEENDIAN 0x0001 + +#define SECURITY_PROTOCOL_NONE 0x0000 +#define JL_SENDER_ONLY 0x01 +#define JL_RECEIVER_ONLY 0x02 +#define JL_BOTH 0x04 +#define WSA_FLAG_OVERLAPPED 0x01 +#define WSA_FLAG_MULTIPOINT_C_ROOT 0x02 +#define WSA_FLAG_MULTIPOINT_C_LEAF 0x04 +#define WSA_FLAG_MULTIPOINT_D_ROOT 0x08 +#define WSA_FLAG_MULTIPOINT_D_LEAF 0x10 +#define IOC_UNIX 0x00000000 +#define IOC_WS2 0x08000000 +#define IOC_PROTOCOL 0x10000000 +#define IOC_VENDOR 0x18000000 #define _WSAIO(x,y) (IOC_VOID|(x)|(y)) #define _WSAIOR(x,y) (IOC_OUT|(x)|(y)) @@ -1158,8 +562,71 @@ struct _WSACOMPLETION #define SIO_NSP_NOTIFY_CHANGE _WSAIOW(IOC_WS2,25) #define SIO_UDP_CONNRESET _WSAIOW(IOC_VENDOR,12) -#define TH_NETDEV 0x00000001 -#define TH_TAPI 0x00000002 +#define TH_NETDEV 0x00000001 +#define TH_TAPI 0x00000002 + +typedef SOCKET (PASCAL *LPFN_ACCEPT) (SOCKET, struct sockaddr *, int *); + +typedef int (PASCAL *LPFN_BIND) (SOCKET, const struct sockaddr *, int); +typedef int (PASCAL *LPFN_CLOSESOCKET) (SOCKET); +typedef int (PASCAL *LPFN_CONNECT) (SOCKET, const struct sockaddr *, int); +typedef int (PASCAL *LPFN_IOCTLSOCKET) (SOCKET, long, u_long *); +typedef int (PASCAL *LPFN_GETPEERNAME) (SOCKET, struct sockaddr *, int *); +typedef int (PASCAL *LPFN_GETSOCKNAME) (SOCKET, struct sockaddr *, int *); +typedef int (PASCAL *LPFN_GETSOCKOPT) (SOCKET, int, int, char *, int *); + +typedef u_long (PASCAL *LPFN_HTONL) (u_long); +typedef u_short (PASCAL *LPFN_HTONS) (u_short); + +typedef unsigned long (PASCAL *LPFN_INET_ADDR) (const char *); + +typedef char *(PASCAL *LPFN_INET_NTOA) (struct in_addr); + +typedef int (PASCAL *LPFN_LISTEN) (SOCKET, int); + +typedef u_long (PASCAL *LPFN_NTOHL) (u_long); +typedef u_short (PASCAL *LPFN_NTOHS) (u_short); + +typedef int (PASCAL *LPFN_RECV) (SOCKET, char *, int, int); +typedef int (PASCAL *LPFN_RECVFROM) (SOCKET, char *, int, int, struct sockaddr *, int *); +typedef int (PASCAL *LPFN_SELECT) (int, fd_set *, fd_set *, fd_set *, const struct timeval *); +typedef int (PASCAL *LPFN_SEND) (SOCKET, const char *, int, int); +typedef int (PASCAL *LPFN_SENDTO) (SOCKET, const char *, int, int, const struct sockaddr *, int); +typedef int (PASCAL *LPFN_SETSOCKOPT) (SOCKET, int, int, const char *, int); +typedef int (PASCAL *LPFN_SHUTDOWN) (SOCKET, int); + +typedef SOCKET (PASCAL *LPFN_SOCKET) (int, int, int); + +typedef struct hostent *(PASCAL *LPFN_GETHOSTBYADDR) ( const char *, int, int); +typedef struct hostent *(PASCAL *LPFN_GETHOSTBYNAME) ( const char *); + +typedef int (PASCAL *LPFN_GETHOSTNAME) (char *, int); + +typedef struct servent *(PASCAL *LPFN_GETSERVBYPORT) (int, const char *); +typedef struct servent *(PASCAL *LPFN_GETSERVBYNAME) (const char *, const char *); +typedef struct protoent *(PASCAL *LPFN_GETPROTOBYNUMBER) (int); +typedef struct protoent *(PASCAL *LPFN_GETPROTOBYNAME) (const char *); + +typedef int (PASCAL *LPFN_WSASTARTUP) (WORD, LPWSADATA); +typedef int (PASCAL *LPFN_WSACLEANUP) (void); +typedef int (PASCAL *LPFN_WSAGETLASTERROR) (void); +typedef void (PASCAL *LPFN_WSASETLASTERROR) (int); + +typedef BOOL (PASCAL *LPFN_WSAISBLOCKING) (void); +typedef int (PASCAL *LPFN_WSAUNHOOKBLOCKINGHOOK) (void); +typedef FARPROC (PASCAL *LPFN_WSASETBLOCKINGHOOK) (FARPROC); +typedef int (PASCAL *LPFN_WSACANCELBLOCKINGCALL) (void); + +typedef HANDLE (PASCAL *LPFN_WSAASYNCGETSERVBYNAME) (HWND, u_int, const char *, const char *, char *, int); +typedef HANDLE (PASCAL *LPFN_WSAASYNCGETSERVBYPORT) (HWND, u_int, int, const char *, char *, int); +typedef HANDLE (PASCAL *LPFN_WSAASYNCGETPROTOBYNAME) (HWND, u_int, const char*, char*, int); +typedef HANDLE (PASCAL *LPFN_WSAASYNCGETPROTOBYNUMBER) (HWND, u_int, int, char*, int); +typedef HANDLE (PASCAL *LPFN_WSAASYNCGETHOSTBYADDR) (HWND, u_int, const char*, int, int, char*, int); + +typedef int (PASCAL *LPFN_WSACANCELASYNCREQUEST) (HANDLE); +typedef int (PASCAL *LPFN_WSAASYNCSELECT) (SOCKET, HWND, u_int, long); + +typedef struct sockaddr_storage SOCKADDR_STORAGE, *PSOCKADDR_STORAGE; WINSOCK_API_LINKAGE SOCKET WINAPI WSAAccept (SOCKET, struct sockaddr *, LPINT, LPCONDITIONPROC, DWORD); @@ -1328,4 +795,5 @@ typedef DWORD (WINAPI *LPFN_WSAWAITFORMULTIPLEEVENTS) (DWORD, const WSAEVENT *, _END_C_DECLS #undef __WINSOCK2_H_SOURCED__ +#endif /* !_WINSOCK_H included prematurely */ #endif /* _WINSOCK2_H: $RCSfile$: end of file */ ----------------------------------------------------------------------- Summary of changes: w32api/ChangeLog | 15 + w32api/include/winsock.h | 5 + w32api/include/winsock2.h | 906 ++++++++++------------------------------------ 3 files changed, 207 insertions(+), 719 deletions(-) hooks/post-receive -- Repository: mingw-org-wsl |