This list is closed, nobody may subscribe to it.
| 2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(12) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2001 |
Jan
(13) |
Feb
(2) |
Mar
(1) |
Apr
(1) |
May
|
Jun
(38) |
Jul
(10) |
Aug
(70) |
Sep
(63) |
Oct
(61) |
Nov
(41) |
Dec
(28) |
| 2002 |
Jan
(43) |
Feb
(11) |
Mar
(9) |
Apr
(2) |
May
(97) |
Jun
(94) |
Jul
(13) |
Aug
(49) |
Sep
(41) |
Oct
(24) |
Nov
(55) |
Dec
(126) |
| 2003 |
Jan
(90) |
Feb
(75) |
Mar
(32) |
Apr
(24) |
May
(54) |
Jun
(54) |
Jul
(22) |
Aug
(4) |
Sep
(16) |
Oct
(8) |
Nov
(6) |
Dec
(13) |
| 2004 |
Jan
|
Feb
(17) |
Mar
(60) |
Apr
(21) |
May
(12) |
Jun
|
Jul
(13) |
Aug
|
Sep
(29) |
Oct
|
Nov
|
Dec
(2) |
| 2005 |
Jan
(22) |
Feb
(3) |
Mar
(2) |
Apr
(13) |
May
(82) |
Jun
(18) |
Jul
(30) |
Aug
(17) |
Sep
(3) |
Oct
(19) |
Nov
(4) |
Dec
(8) |
| 2006 |
Jan
(1) |
Feb
(6) |
Mar
(2) |
Apr
(40) |
May
|
Jun
(21) |
Jul
(1) |
Aug
(410) |
Sep
(3) |
Oct
|
Nov
(56) |
Dec
(7) |
| 2007 |
Jan
(19) |
Feb
|
Mar
(4) |
Apr
(8) |
May
(19) |
Jun
(6) |
Jul
(4) |
Aug
(6) |
Sep
|
Oct
(4) |
Nov
(3) |
Dec
(2) |
| 2008 |
Jan
(13) |
Feb
(18) |
Mar
(12) |
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2009 |
Jan
|
Feb
(6) |
Mar
(8) |
Apr
(2) |
May
(2) |
Jun
|
Jul
|
Aug
(2) |
Sep
(11) |
Oct
(13) |
Nov
(17) |
Dec
(6) |
| 2010 |
Jan
(24) |
Feb
(10) |
Mar
(27) |
Apr
(20) |
May
(108) |
Jun
(8) |
Jul
(23) |
Aug
(38) |
Sep
(49) |
Oct
(17) |
Nov
(12) |
Dec
(14) |
| 2011 |
Jan
(17) |
Feb
(7) |
Mar
(28) |
Apr
(8) |
May
(20) |
Jun
(11) |
Jul
(7) |
Aug
(12) |
Sep
(4) |
Oct
(20) |
Nov
(19) |
Dec
(2) |
| 2012 |
Jan
(2) |
Feb
(6) |
Mar
(5) |
Apr
(24) |
May
(5) |
Jun
(4) |
Jul
(6) |
Aug
(18) |
Sep
(38) |
Oct
(26) |
Nov
(12) |
Dec
(6) |
| 2013 |
Jan
(19) |
Feb
(18) |
Mar
(44) |
Apr
(35) |
May
(18) |
Jun
(21) |
Jul
(10) |
Aug
(19) |
Sep
(44) |
Oct
(25) |
Nov
(1) |
Dec
(2) |
| 2014 |
Jan
(8) |
Feb
|
Mar
|
Apr
(5) |
May
(1) |
Jun
(3) |
Jul
|
Aug
(3) |
Sep
|
Oct
(4) |
Nov
(4) |
Dec
(7) |
| 2015 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
(2) |
Jun
(4) |
Jul
(6) |
Aug
(2) |
Sep
(8) |
Oct
(2) |
Nov
(1) |
Dec
(3) |
| 2016 |
Jan
(7) |
Feb
(9) |
Mar
(5) |
Apr
(5) |
May
(9) |
Jun
(4) |
Jul
(20) |
Aug
(4) |
Sep
(7) |
Oct
(6) |
Nov
(9) |
Dec
(2) |
| 2017 |
Jan
(7) |
Feb
(7) |
Mar
(5) |
Apr
|
May
(1) |
Jun
(4) |
Jul
(12) |
Aug
(4) |
Sep
(1) |
Oct
(4) |
Nov
(11) |
Dec
(14) |
| 2018 |
Jan
(3) |
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
|
|
1
|
2
(1) |
|
3
|
4
|
5
|
6
(2) |
7
|
8
|
9
|
|
10
|
11
|
12
|
13
|
14
|
15
|
16
(2) |
|
17
(3) |
18
(1) |
19
|
20
(2) |
21
(1) |
22
(1) |
23
|
|
24
|
25
|
26
|
27
|
28
(1) |
29
|
30
|
|
31
|
|
|
|
|
|
|
|
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
|