This list is closed, nobody may subscribe to it.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(12) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(13) |
Feb
(2) |
Mar
(1) |
Apr
(1) |
May
|
Jun
(38) |
Jul
(10) |
Aug
(70) |
Sep
(63) |
Oct
(61) |
Nov
(41) |
Dec
(28) |
2002 |
Jan
(43) |
Feb
(11) |
Mar
(9) |
Apr
(2) |
May
(97) |
Jun
(94) |
Jul
(13) |
Aug
(49) |
Sep
(41) |
Oct
(24) |
Nov
(55) |
Dec
(126) |
2003 |
Jan
(90) |
Feb
(75) |
Mar
(32) |
Apr
(24) |
May
(54) |
Jun
(54) |
Jul
(22) |
Aug
(4) |
Sep
(16) |
Oct
(8) |
Nov
(6) |
Dec
(13) |
2004 |
Jan
|
Feb
(17) |
Mar
(60) |
Apr
(21) |
May
(12) |
Jun
|
Jul
(13) |
Aug
|
Sep
(29) |
Oct
|
Nov
|
Dec
(2) |
2005 |
Jan
(22) |
Feb
(3) |
Mar
(2) |
Apr
(13) |
May
(82) |
Jun
(18) |
Jul
(30) |
Aug
(17) |
Sep
(3) |
Oct
(19) |
Nov
(4) |
Dec
(8) |
2006 |
Jan
(1) |
Feb
(6) |
Mar
(2) |
Apr
(40) |
May
|
Jun
(21) |
Jul
(1) |
Aug
(410) |
Sep
(3) |
Oct
|
Nov
(56) |
Dec
(7) |
2007 |
Jan
(19) |
Feb
|
Mar
(4) |
Apr
(8) |
May
(19) |
Jun
(6) |
Jul
(4) |
Aug
(6) |
Sep
|
Oct
(4) |
Nov
(3) |
Dec
(2) |
2008 |
Jan
(13) |
Feb
(18) |
Mar
(12) |
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
(6) |
Mar
(8) |
Apr
(2) |
May
(2) |
Jun
|
Jul
|
Aug
(2) |
Sep
(11) |
Oct
(13) |
Nov
(17) |
Dec
(6) |
2010 |
Jan
(24) |
Feb
(10) |
Mar
(27) |
Apr
(20) |
May
(108) |
Jun
(8) |
Jul
(23) |
Aug
(38) |
Sep
(49) |
Oct
(17) |
Nov
(12) |
Dec
(14) |
2011 |
Jan
(17) |
Feb
(7) |
Mar
(28) |
Apr
(8) |
May
(20) |
Jun
(11) |
Jul
(7) |
Aug
(12) |
Sep
(4) |
Oct
(20) |
Nov
(19) |
Dec
(2) |
2012 |
Jan
(2) |
Feb
(6) |
Mar
(5) |
Apr
(24) |
May
(5) |
Jun
(4) |
Jul
(6) |
Aug
(18) |
Sep
(38) |
Oct
(26) |
Nov
(12) |
Dec
(6) |
2013 |
Jan
(19) |
Feb
(18) |
Mar
(44) |
Apr
(35) |
May
(18) |
Jun
(21) |
Jul
(10) |
Aug
(19) |
Sep
(44) |
Oct
(25) |
Nov
(1) |
Dec
(2) |
2014 |
Jan
(8) |
Feb
|
Mar
|
Apr
(5) |
May
(1) |
Jun
(3) |
Jul
|
Aug
(3) |
Sep
|
Oct
(4) |
Nov
(4) |
Dec
(7) |
2015 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
(2) |
Jun
(4) |
Jul
(6) |
Aug
(2) |
Sep
(8) |
Oct
(2) |
Nov
(1) |
Dec
(3) |
2016 |
Jan
(7) |
Feb
(9) |
Mar
(5) |
Apr
(5) |
May
(9) |
Jun
(4) |
Jul
(20) |
Aug
(4) |
Sep
(7) |
Oct
(6) |
Nov
(9) |
Dec
(2) |
2017 |
Jan
(7) |
Feb
(7) |
Mar
(5) |
Apr
|
May
(1) |
Jun
(4) |
Jul
(12) |
Aug
(4) |
Sep
(1) |
Oct
(4) |
Nov
(11) |
Dec
(14) |
2018 |
Jan
(3) |
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Keith M. <no...@so...> - 2017-07-14 21:34:57
|
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 e8e87136d7d841c78fd929a1fb693272de722a32 (commit) from f4c685c12aede31b0172ff0ab2ce1230736e01cd (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/e8e87136d7d841c78fd929a1fb693272de722a32/ commit e8e87136d7d841c78fd929a1fb693272de722a32 Author: Keith Marshall <kei...@us...> Date: Fri Jul 14 22:33:52 2017 +0100 Add and publish new mingw32-isl-0.18 package set. diff --git a/ChangeLog b/ChangeLog index 675a55d..7852caf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2017-07-14 Keith Marshall <kei...@us...> + + Add and publish new mingw32-isl-0.18 package set. + + * mingw32/mingw32-isl.xml: New package specification file. + * mingw32/mingw32-package-list.xml (mingw32-isl): Register it. + * common/issue.log mingw32/issue.log: Update accordingly. + 2017-07-12 Keith Marshall <kei...@us...> Upgrade mingw32-binutils package to version 2.28-1. diff --git a/common/issue.log b/common/issue.log index 152fca6..83c32c3 100644 --- a/common/issue.log +++ b/common/issue.log @@ -23,6 +23,6 @@ # MinGW Project, accept liability for any damages, however caused, # arising from the use of this software. # - c6a9068e183254c0b930ac6e1a70fd81743dc212 2017071200 package-list.xml + c6a9068e183254c0b930ac6e1a70fd81743dc212 2017071401 package-list.xml # # $RCSfile$: end of file diff --git a/mingw32/issue.log b/mingw32/issue.log index f256a2a..4181eeb 100644 --- a/mingw32/issue.log +++ b/mingw32/issue.log @@ -40,6 +40,7 @@ 14dd10ab97b27430bdb688f4e85993cd821f7a05 2012073100 mingw32-gendef.xml 7b16c690a8b02106e7cc7abc6c6310fe30390683 2015090600 mingw32-gettext.xml 8272b6fc44a3e7766adec484742f007f28a39eaf 2013090900 mingw32-gmp.xml + a8d68c6dfdea77d8a2a7fb899004955f51a5dbe1 2017071400 mingw32-isl.xml 99e3ac0d2c743b0d927a4d89a3153a975d2bdf87 2012073100 mingw32-libarchive.xml e8392e268250e1bc37bc008e34c4c180cec4fdaa 2014042900 mingw32-libiconv.xml ccc15973cdc9ff14c12e4385c3e692af1c18b29d 2012073100 mingw32-libtool.xml @@ -50,7 +51,7 @@ cd33ad74b608bce33ea297801253e6efbafce27c 2012073100 mingw32-mingw-utils.xml 8d3a7125499a85916b53efb4c897ac907e2490ab 2015082000 mingw32-mpc.xml 8a11de23e7a89fd11436bdf162ef90712f30101b 2013102300 mingw32-mpfr.xml - 56f4032058328cacfabe64fa46706d72c2fa931e 2017071200 mingw32-package-list.xml + 5c9570cce1ddd4fe275b83acbc06739a4361c26a 2017071401 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-isl.xml b/mingw32/mingw32-isl.xml new file mode 100644 index 0000000..dbd6abb --- /dev/null +++ b/mingw32/mingw32-isl.xml @@ -0,0 +1,73 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<software-distribution project="MinGW" home="http://www.mingw.org" issue="@YYYYMMDDNN@"> + + <!-- File: mingw32-isl.xml ~~ mingw-get package description for ISL --> + + <package-collection subsystem="mingw32"> + <download-host uri="http://prdownloads.sourceforge.net/mingw/%F?download" /> + + <!-- Provides the package descriptions for the ISL library, which --> + <!-- is a runtime prerequisite for modern versions of GCC. --> + + <package name="mingw32-isl" alias="isl"> + <affiliate group="MinGW Standard Libraries" /> + <description lang="en" title="Integer Set Library"> + <paragraph> + ISL is a C library for manipulating sets of, and the relationships + between, integer points bounded by linear constraints. + </paragraph> + <paragraph> + This mingw32-isl package set provides the documentation for the ISL + library, as well as the related development files. The associated + mingw32-libisl package provides the C runtime library. + </paragraph> + </description> + + <source tarname="isl-%-mingw32-src.tar.%" /> + <licence tarname="isl-%-mingw32-lic.tar.%" /> + + <component class="dev"> + <release tarname="isl-0.18-1-mingw32-dev.tar.xz" /> + <requires eq="libisl-%-mingw32-dll-15.tar" /> + <requires ge="gmp-*-mingw32-dev.tar" /> + </component> + + <component class="doc"> + <release tarname="isl-0.18-1-mingw32-doc.tar.xz" /> + </component> + + <component class="lic"> + <release tarname="isl-0.18-1-mingw32-lic.tar.xz" /> + </component> + </package> + + <package name="mingw32-libisl" alias="libisl"> + <affiliate group="MinGW Standard Libraries" /> + <description lang="en" title="Integer Set Library"> + <paragraph> + ISL is a C library for manipulating sets of, and the relationships + between, integer points bounded by linear constraints. This package + provides the runtime library; the associated development files, and + documentation, may be found in the mingw32-isl package set. + </paragraph> + <paragraph> + From the release of GCC-6.3.0 onwards, this package is a required + component of the MinGW Compiler Suite. + </paragraph> + </description> + + <source tarname="isl-%-mingw32-src.tar.%" /> + <licence tarname="isl-%-mingw32-lic.tar.%" /> + + <component class="dll"> + <release tarname="libisl-0.18-1-mingw32-dll-15.tar.xz" /> + <requires eq="mingw32-libgmp-*-mingw32-dll-10.tar" /> + <requires eq="mingw32-libgcc-*-mingw32-dll-1.tar" /> + </component> + </package> + + </package-collection> +</software-distribution> + +<!-- vim: set textwidth=80 tabstop=2 shiftwidth=2 expandtab: --> +<!-- vim: set fileformat=unix nocompatible: --> diff --git a/mingw32/mingw32-package-list.xml b/mingw32/mingw32-package-list.xml index c5cae92..1b73a73 100644 --- a/mingw32/mingw32-package-list.xml +++ b/mingw32/mingw32-package-list.xml @@ -38,6 +38,7 @@ <package-list catalogue="mingw32-gendef" /> <package-list catalogue="mingw32-gettext" /> <package-list catalogue="mingw32-gmp" /> + <package-list catalogue="mingw32-isl" /> <package-list catalogue="mingw32-libarchive" /> <package-list catalogue="mingw32-libiconv" /> <package-list catalogue="mingw32-libtool" /> ----------------------------------------------------------------------- Summary of changes: ChangeLog | 8 +++++ common/issue.log | 2 +- mingw32/issue.log | 3 +- mingw32/mingw32-isl.xml | 73 ++++++++++++++++++++++++++++++++++++++++ mingw32/mingw32-package-list.xml | 1 + 5 files changed, 85 insertions(+), 2 deletions(-) create mode 100644 mingw32/mingw32-isl.xml hooks/post-receive -- Repository: mingw-dist |
From: Keith M. <no...@so...> - 2017-07-12 21:44:52
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Repository: mingw-dist". The branch, master has been updated via f4c685c12aede31b0172ff0ab2ce1230736e01cd (commit) from c55eb69c8e69e02a29d30025c14eb74e60af5105 (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/f4c685c12aede31b0172ff0ab2ce1230736e01cd/ commit f4c685c12aede31b0172ff0ab2ce1230736e01cd Author: Keith Marshall <kei...@us...> Date: Wed Jul 12 22:44:42 2017 +0100 Upgrade mingw32-binutils package to version 2.28-1. diff --git a/ChangeLog b/ChangeLog index 1d01e05..675a55d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2017-07-12 Keith Marshall <kei...@us...> + + Upgrade mingw32-binutils package to version 2.28-1. + + * mingw32/mingw32-binutils.xml: Add new release specifications. + * common/issue.log mingw32/issue.log: Update accordingly. + 2017-03-09 Keith Marshall <kei...@us...> Publish MinGW.org WSL-5.0 package set. diff --git a/common/issue.log b/common/issue.log index dd86cde..152fca6 100644 --- a/common/issue.log +++ b/common/issue.log @@ -23,6 +23,6 @@ # MinGW Project, accept liability for any damages, however caused, # arising from the use of this software. # - c6a9068e183254c0b930ac6e1a70fd81743dc212 2017030900 package-list.xml + c6a9068e183254c0b930ac6e1a70fd81743dc212 2017071200 package-list.xml # # $RCSfile$: end of file diff --git a/mingw32/issue.log b/mingw32/issue.log index 195db2a..f256a2a 100644 --- a/mingw32/issue.log +++ b/mingw32/issue.log @@ -28,7 +28,7 @@ e2f730e78dc27254776b672fc007a4bef3dd0f56 2010090601 mingw32-autotools.xml 31874b31b811211470b739b8af7fc6b9a97331e6 2013072200 mingw32-base.xml 221dd61fa0e2d7745ba41d05d18a3114e946c513 2012073100 mingw32-basic-bsdtar.xml - 770165afae7b51cfa83d34d0115d7dd563b4557f 2015092000 mingw32-binutils.xml + 3df80e02d9d812756e8360dd4836722d1d2a0f2c 2017071200 mingw32-binutils.xml b4c60a4702749a0369b5059e7c1f50ce567e2c95 2012073100 mingw32-bzip2.xml c2fa4fe580615c774f72216fb06e35a909a08ba6 2012040200 mingw32-cygutils.xml 6f0af5165a7ca9f67fdb7840dc5f7a5dda999c2a 2015122200 mingw32-dos2unix.xml @@ -50,7 +50,7 @@ cd33ad74b608bce33ea297801253e6efbafce27c 2012073100 mingw32-mingw-utils.xml 8d3a7125499a85916b53efb4c897ac907e2490ab 2015082000 mingw32-mpc.xml 8a11de23e7a89fd11436bdf162ef90712f30101b 2013102300 mingw32-mpfr.xml - 56f4032058328cacfabe64fa46706d72c2fa931e 2017030900 mingw32-package-list.xml + 56f4032058328cacfabe64fa46706d72c2fa931e 2017071200 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-binutils.xml b/mingw32/mingw32-binutils.xml index e7db59e..8544c65 100644 --- a/mingw32/mingw32-binutils.xml +++ b/mingw32/mingw32-binutils.xml @@ -24,6 +24,7 @@ <component class="bin"> <requires eq="mingw32-libintl-*-mingw32-*-dll-8.tar" /> + <release tarname="binutils-2.28-1-mingw32-bin.tar.xz" /> <release tarname="binutils-2.25.1-1-mingw32-bin.tar.xz" /> <release tarname="binutils-2.24-1-mingw32-bin.tar.xz" /> <release tarname="binutils-2.23.2-1-mingw32-bin.tar.lzma" > @@ -45,6 +46,7 @@ </component> <component class="dev"> + <release tarname="binutils-2.28-1-mingw32-dev.tar.xz" /> <release tarname="binutils-2.25.1-1-mingw32-dev.tar.xz" /> <release tarname="binutils-2.24-1-mingw32-dev.tar.xz" /> <release tarname="binutils-2.23.2-1-mingw32-dev.tar.lzma" /> @@ -74,18 +76,21 @@ </component> <component class="info"> + <release tarname="binutils-2.28-1-mingw32-info.tar.xz" /> <release tarname="binutils-2.25.1-1-mingw32-info.tar.xz" /> <release tarname="binutils-2.24-1-mingw32-info.tar.xz" /> <release tarname="binutils-2.23.2-1-mingw32-info.tar.lzma" /> </component> <component class="man"> + <release tarname="binutils-2.28-1-mingw32-man.tar.xz" /> <release tarname="binutils-2.25.1-1-mingw32-man.tar.xz" /> <release tarname="binutils-2.24-1-mingw32-man.tar.xz" /> <release tarname="binutils-2.23.2-1-mingw32-man.tar.lzma" /> </component> <component class="lang"> + <release tarname="binutils-2.28-1-mingw32-lang.tar.xz" /> <release tarname="binutils-2.25.1-1-mingw32-lang.tar.xz" /> <release tarname="binutils-2.24-1-mingw32-lang.tar.xz" /> <release tarname="binutils-2.23.2-1-mingw32-lang.tar.lzma" /> ----------------------------------------------------------------------- Summary of changes: ChangeLog | 7 +++++++ common/issue.log | 2 +- mingw32/issue.log | 4 ++-- mingw32/mingw32-binutils.xml | 5 +++++ 4 files changed, 15 insertions(+), 3 deletions(-) hooks/post-receive -- Repository: mingw-dist |
From: Keith M. <no...@so...> - 2017-07-12 18:15: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.0-active has been updated via 2fd5e9adb6a018bc636882af676fea21434c9da9 (commit) from d1b3b1693bdec6472d72b085b1e2651866472162 (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/2fd5e9adb6a018bc636882af676fea21434c9da9/ commit 2fd5e9adb6a018bc636882af676fea21434c9da9 Author: Keith Marshall <kei...@us...> Date: Wed Jul 12 18:54:11 2017 +0100 Automate testsuite dependency generation. diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog index 6b604b3..1c49af2 100644 --- a/mingwrt/ChangeLog +++ b/mingwrt/ChangeLog @@ -1,3 +1,12 @@ +2017-07-12 Keith Marshall <kei...@us...> + + Automate testsuite dependency generation. + + * tests/Makefile.in (testsuite) [$srcdir/*.at]: Automatically + enumerate all such wildcard matches as prerequisites, instead of... + (headers.at, ansiprintf.at, logarithms.at, powerfunc.at): ...these, + which were previously enumerated explicitly. + 2017-06-05 Keith Marshall <kei...@us...> Automatically correct obsolete _XOPEN_SOURCE usage. diff --git a/mingwrt/tests/Makefile.in b/mingwrt/tests/Makefile.in index 1a57f37..2bdf904 100644 --- a/mingwrt/tests/Makefile.in +++ b/mingwrt/tests/Makefile.in @@ -5,7 +5,7 @@ # $Id$ # # Written by Keith Marshall <kei...@us...> -# Copyright (C) 2016, MinGW.org Project +# Copyright (C) 2016, 2017, MinGW.org Project # # # Permission is hereby granted, free of charge, to any person obtaining a @@ -102,7 +102,7 @@ autotest_missing = $(call missing,autom4te,Unable to compile the testsuite) testsuite: %: %.at $(AUTOTEST_COMPILE) -o $* $< -testsuite: headers.at ansiprintf.at logarithms.at powerfunc.at +testsuite: $(notdir $(wildcard ${srcdir}/*.at)) # Display a diagnostic message, explaining that any specified program # is required, but has not been installed. diff --git a/w32api/ChangeLog b/w32api/ChangeLog index 813be72..bb49dd9 100644 --- a/w32api/ChangeLog +++ b/w32api/ChangeLog @@ -1,3 +1,11 @@ +2017-07-12 Keith Marshall <kei...@us...> + + Automate testsuite dependency generation. + + * tests/Makefile.in (testsuite) [$srcdir/*.at]: Automatically + enumerate all such wildcard matches as prerequisites, instead of... + (headers.at): ...this sole explicit dependency. + 2017-06-20 Keith Marshall <kei...@us...> Make <winnt.h> header effectively self-contained. diff --git a/w32api/tests/Makefile.in b/w32api/tests/Makefile.in index 39da276..347ec78 100644 --- a/w32api/tests/Makefile.in +++ b/w32api/tests/Makefile.in @@ -103,7 +103,7 @@ autotest_missing = $(call missing,autom4te,Unable to compile the testsuite) testsuite: %: %.at $(AUTOTEST_COMPILE) -o $* $< -testsuite: headers.at +testsuite: $(notdir $(wildcard ${srcdir}/*.at)) # Display a diagnostic message, explaining that any specified program # is required, but has not been installed. ----------------------------------------------------------------------- Summary of changes: mingwrt/ChangeLog | 9 +++++++++ mingwrt/tests/Makefile.in | 4 ++-- w32api/ChangeLog | 8 ++++++++ w32api/tests/Makefile.in | 2 +- 4 files changed, 20 insertions(+), 3 deletions(-) hooks/post-receive -- Repository: mingw-org-wsl |
From: Keith M. <no...@so...> - 2017-07-12 18:11:39
|
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 d1b3b1693bdec6472d72b085b1e2651866472162 (commit) from e8d3e5c3fe205e7a9e8ce5fa5b80e6b8160ee5cd (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/d1b3b1693bdec6472d72b085b1e2651866472162/ commit d1b3b1693bdec6472d72b085b1e2651866472162 Author: Keith Marshall <kei...@us...> Date: Tue Jun 20 22:41:37 2017 +0100 Make <winnt.h> header effectively self-contained. diff --git a/w32api/ChangeLog b/w32api/ChangeLog index 235e3ec..813be72 100644 --- a/w32api/ChangeLog +++ b/w32api/ChangeLog @@ -1,3 +1,11 @@ +2017-06-20 Keith Marshall <kei...@us...> + + Make <winnt.h> header effectively self-contained. + + * include/winnt.h (_WINNT_H): Defer definition unless included via... + (windef.h): ...this; include it, to enforce inclusion order, then... + [_WINNT_H]: ...re-evaluate it, to avoid recursive inclusion loop. + 2017-06-12 Keith Marshall <kei...@us...> Consolidate <winuser.h> version specific conditionals. diff --git a/w32api/include/winnt.h b/w32api/include/winnt.h index 4dc1101..ce1ad6d 100644 --- a/w32api/include/winnt.h +++ b/w32api/include/winnt.h @@ -31,6 +31,16 @@ */ #ifndef _WINNT_H #pragma GCC system_header + +/* For effective self-containment, <winnt.h> requires <windef.h> to have + * been included, BEFORE defining the _WINNT_H repeat inclusion guard... + */ +#include <windef.h> +/* ...but this has the unfortunate side effect that <windef.h> may then + * recursively include <winnt.h>; retest the inclusion guard, to break + * out of any ensuing recursive inclusion loop. + */ +#ifndef _WINNT_H #define _WINNT_H #include <winerror.h> @@ -4324,4 +4334,5 @@ static FORCEINLINE void MemoryBarrier (void) _END_C_DECLS #endif /* ! RC_INVOKED */ +#endif /* !_WINNT_H: internal recursion break */ #endif /* !_WINNT_H: $RCSfile$: end of file */ ----------------------------------------------------------------------- Summary of changes: w32api/ChangeLog | 8 ++++++++ w32api/include/winnt.h | 11 +++++++++++ 2 files changed, 19 insertions(+) hooks/post-receive -- Repository: mingw-org-wsl |
From: Keith M. <no...@so...> - 2017-06-12 19:33:49
|
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 e8d3e5c3fe205e7a9e8ce5fa5b80e6b8160ee5cd (commit) via fbe762913d496a42c1a798d4b8e0628b4e3738a4 (commit) from 16ab58171b55e2959b97866b6fc8e913615c8e03 (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/e8d3e5c3fe205e7a9e8ce5fa5b80e6b8160ee5cd/ commit e8d3e5c3fe205e7a9e8ce5fa5b80e6b8160ee5cd Author: Keith Marshall <kei...@us...> Date: Mon Jun 12 20:20:10 2017 +0100 Consolidate <winuser.h> version specific conditionals. diff --git a/w32api/ChangeLog b/w32api/ChangeLog index b682fc6..235e3ec 100644 --- a/w32api/ChangeLog +++ b/w32api/ChangeLog @@ -1,3 +1,14 @@ +2017-06-12 Keith Marshall <kei...@us...> + + Consolidate <winuser.h> version specific conditionals. + + * include/winuser.h: Reorganize file content; group manifest constant + definitions into one nested collection of conditional blocks, with one + block per Windows version evolution; do likewise for type definitions + and function prototypes which are always exposed, and separately... + [! defined NOGDI]: ...for those which may be suppressed, when GDI + support is not required. + 2017-06-06 Keith Marshall <kei...@us...> Make <winuser.h> header effectively self-contained. diff --git a/w32api/include/winuser.h b/w32api/include/winuser.h index bfb1f9d..6a18beb 100644 --- a/w32api/include/winuser.h +++ b/w32api/include/winuser.h @@ -60,6 +60,9 @@ _BEGIN_C_DECLS #endif #endif +#define ATF_ONOFFFEEDBACK 2 +#define ATF_TIMEOUTON 1 + #define MNGO_NOINTERFACE 0x00 #define MNGO_NOERROR 0x01 #define MNGOF_TOPGAP 0x01 @@ -128,13 +131,6 @@ _BEGIN_C_DECLS #define CF_HDROP 15 #define CF_LOCALE 16 -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K -#define CF_DIBV5 17 -#define CF_MAX 18 -#else -#define CF_MAX 17 -#endif - #define CF_OWNERDISPLAY 128 #define CF_DSPTEXT 129 #define CF_DSPBITMAP 130 @@ -455,14 +451,6 @@ _BEGIN_C_DECLS #define DC_TEXT 0x00000008 #define DC_INBUTTON 0x00000010 -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K || _WIN32_WINDOWS >= _WIN32_WINDOWS_98 -#define DC_GRADIENT 0x00000020 -#endif - -#if _WIN32_WINNT >= _WIN32_WINNT_WINXP -#define DC_BUTTONS 0x00001000 -#endif - /* Where are these documented? */ #define DC_CAPTION (DC_ICON | DC_TEXT | DC_BUTTONS) #define DC_NC (DC_CAPTION | DC_FRAME) @@ -498,15 +486,12 @@ _BEGIN_C_DECLS #define BF_ADJUST 0x2000 #define BF_FLAT 0x4000 #define BF_MONO 0x8000 + #define DFC_CAPTION 1 #define DFC_MENU 2 #define DFC_SCROLL 3 #define DFC_BUTTON 4 -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K -#define DFC_POPUPMENU 5 -#endif /* >= _WIN32_WINNT_WIN2K */ - #define DFCS_CAPTIONCLOSE 0 #define DFCS_CAPTIONMIN 1 #define DFCS_CAPTIONMAX 2 @@ -533,11 +518,6 @@ _BEGIN_C_DECLS #define DFCS_PUSHED 512 #define DFCS_CHECKED 1024 -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K -#define DFCS_TRANSPARENT 0x800 -#define DFCS_HOT 0x1000 -#endif - #define DFCS_ADJUSTRECT 0x2000 #define DFCS_FLAT 0x4000 #define DFCS_MONO 0x8000 @@ -650,10 +630,6 @@ _BEGIN_C_DECLS #define EWX_REBOOT 2 #define EWX_SHUTDOWN 1 -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K -#define EWX_FORCEIFHUNG 16 -#endif - #define CS_BYTEALIGNCLIENT 4096 #define CS_BYTEALIGNWINDOW 8192 #define CS_KEYCVTWINDOW 4 @@ -669,10 +645,6 @@ _BEGIN_C_DECLS #define CS_VREDRAW 1 #define CS_IME 0x10000 -#if _WIN32_WINNT >= _WIN32_WINNT_WINXP -#define CS_DROPSHADOW 0x20000 -#endif - #define GCW_ATOM (-32) #define GCL_CBCLSEXTRA (-20) #define GCL_CBWNDEXTRA (-18) @@ -748,21 +720,6 @@ _BEGIN_C_DECLS #define MIIM_BITMAP 128 #define MIIM_FTYPE 256 -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K -#define MIM_MAXHEIGHT 1 -#define MIM_BACKGROUND 2 -#define MIM_HELPID 4 -#define MIM_MENUDATA 8 -#define MIM_STYLE 16 -#define MIM_APPLYTOSUBMENUS 0x80000000L -#define MNS_NOCHECK 0x80000000 -#define MNS_MODELESS 0x40000000 -#define MNS_DRAGDROP 0x20000000 -#define MNS_AUTODISMISS 0x10000000 -#define MNS_NOTIFYBYPOS 0x08000000 -#define MNS_CHECKORBMP 0x04000000 -#endif - #define MFT_BITMAP 4 #define MFT_MENUBARBREAK 32 #define MFT_MENUBREAK 64 @@ -825,17 +782,6 @@ _BEGIN_C_DECLS #define MB_OKCANCEL 1 #define MB_RETRYCANCEL 5 -#ifdef _WIN32_WINNT -#if _WIN32_WINNT >= _WIN32_WINNT_NT4 -#define MB_SERVICE_NOTIFICATION 0x00200000 - -#else -#define MB_SERVICE_NOTIFICATION 0x00040000 -#endif - -#define MB_SERVICE_NOTIFICATION_NT3X 0x00040000 -#endif - #define MB_SETFOREGROUND 0x10000 #define MB_SYSTEMMODAL 4096 #define MB_TASKMODAL 0x2000 @@ -849,10 +795,6 @@ _BEGIN_C_DECLS #define MB_TYPEMASK 15 #define MB_TOPMOST 0x40000 -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K -#define MB_CANCELTRYCONTINUE 6 -#endif - #define IDOK 1 #define IDCANCEL 2 #define IDABORT 3 @@ -861,16 +803,6 @@ _BEGIN_C_DECLS #define IDYES 6 #define IDNO 7 -#if WINVER >= _WIN32_WINNT_NT4 /* || _WIN32_WINDOWS_95 */ -#define IDCLOSE 8 -#define IDHELP 9 -#endif - -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K -#define IDTRYAGAIN 10 -#define IDCONTINUE 11 -#endif - #define GWL_EXSTYLE (-20) #define GWL_STYLE (-16) #define GWL_WNDPROC (-4) @@ -890,34 +822,15 @@ _BEGIN_C_DECLS #define DWL_USER 8 #define DWLP_USER 8 -#if _WIN32_WINNT >= _WIN32_WINNT_WINXP -#define QS_ALLEVENTS 1215 -#define QS_ALLINPUT 1279 -#else -#define QS_ALLEVENTS 191 -#define QS_ALLINPUT 255 -#endif - #define QS_ALLPOSTMESSAGE 256 #define QS_HOTKEY 128 -#if _WIN32_WINNT >= _WIN32_WINNT_WINXP -#define QS_INPUT 1031 -#else -#define QS_INPUT 7 -#endif - #define QS_KEY 1 #define QS_MOUSE 6 #define QS_MOUSEBUTTON 4 #define QS_MOUSEMOVE 2 #define QS_PAINT 32 #define QS_POSTMESSAGE 8 - -#if _WIN32_WINNT >= _WIN32_WINNT_WINXP -#define QS_RAWINPUT 1024 -#endif - #define QS_SENDMESSAGE 64 #define QS_TIMER 16 #define MWMO_WAITALL 1 @@ -1056,12 +969,6 @@ _BEGIN_C_DECLS #define SM_STARTER 88 #define SM_SERVERR2 89 -#if _WIN32_WINNT < _WIN32_WINNT_NT4 -#define SM_CMETRICS 76 -#else -#define SM_CMETRICS 88 -#endif - #define SM_REMOTESESSION 0x1000 #define ARW_BOTTOMLEFT 0 #define ARW_BOTTOMRIGHT 1 @@ -1093,11 +1000,6 @@ _BEGIN_C_DECLS #define KEYEVENTF_EXTENDEDKEY 0x00000001 #define KEYEVENTF_KEYUP 0x00000002 -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K -#define KEYEVENTF_UNICODE 0x00000004 -#define KEYEVENTF_SCANCODE 0x00000008 -#endif - #define OBM_BTNCORNERS 32758 #define OBM_BTSIZE 32761 #define OBM_CHECK 32760 @@ -1175,51 +1077,10 @@ _BEGIN_C_DECLS #define MOUSEEVENTF_MIDDLEUP 0x00000040 #define MOUSEEVENTF_ABSOLUTE 0x00008000 -#if _WIN32_WINNT >= _WIN32_WINNT_NT4 -#define MOUSEEVENTF_WHEEL 0x00000800 -#endif - -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K -#define MOUSEEVENTF_XDOWN 0x00000080 -#define MOUSEEVENTF_XUP 0x00000100 -#endif - -#if _WIN32_WINNT >= _WIN32_WINNT_NT4 -/* The following group of definitions were formerly duplicated from - * header <pbt.h>, which is now declared obsolete. - */ -#define PBT_APMQUERYSUSPEND 0 -#define PBT_APMQUERYSTANDBY 1 -#define PBT_APMQUERYSUSPENDFAILED 2 -#define PBT_APMQUERYSTANDBYFAILED 3 -#define PBT_APMSUSPEND 4 -#define PBT_APMSTANDBY 5 -#define PBT_APMRESUMECRITICAL 6 -#define PBT_APMRESUMESUSPEND 7 -#define PBT_APMRESUMESTANDBY 8 -#define PBT_APMBATTERYLOW 9 -#define PBT_APMPOWERSTATUSCHANGE 10 -#define PBT_APMOEMEVENT 11 -#define PBT_APMRESUMEAUTOMATIC 18 -#define PBTF_APMRESUMEFROMFAILURE 1 -#endif - -#if _WIN32_WINNT >= _WIN32_WINNT_VISTA -#define PBT_POWERSETTINGCHANGE 32787 -#endif -/* end pbt.h */ - #define PM_NOREMOVE 0 #define PM_REMOVE 1 #define PM_NOYIELD 2 -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K -# define PM_QS_INPUT (QS_INPUT << 16) -# define PM_QS_POSTMESSAGE ((QS_POSTMESSAGE | QS_HOTKEY | QS_TIMER) << 16) -# define PM_QS_PAINT (QS_PAINT << 16) -# define PM_QS_SENDMESSAGE (QS_SENDMESSAGE << 16) -#endif - #define HWND_BROADCAST ((HWND)(0xFFFF)) #define HWND_BOTTOM ((HWND)(1)) #define HWND_NOTOPMOST ((HWND)(-2)) @@ -1227,10 +1088,6 @@ _BEGIN_C_DECLS #define HWND_TOPMOST ((HWND)(-1)) #define HWND_DESKTOP ((HWND)(0)) -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K -#define HWND_MESSAGE ((HWND)(-3)) -#endif - #define RDW_ERASE 4 #define RDW_FRAME 1024 #define RDW_INTERNALPAINT 2 @@ -1247,10 +1104,6 @@ _BEGIN_C_DECLS #define SMTO_BLOCK 0x0001 #define SMTO_NORMAL 0x0000 -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K -#define SMTO_NOTIMEOUTIFNOTHUNG 0x0008 -#endif - #define SIF_DISABLENOSCROLL 0x0008 #define SIF_PAGE 0x0002 #define SIF_POS 0x0004 @@ -1282,18 +1135,6 @@ _BEGIN_C_DECLS #define HSHELL_WINDOWCREATED 1 #define HSHELL_WINDOWDESTROYED 2 -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K -#define HSHELL_ACCESSIBILITYSTATE 11 -#define HSHELL_APPCOMMAND 12 -#define HSHELL_RUDEAPPACTIVATED 32772 -#define HSHELL_FLASH 32774 -#endif - -#if _WIN32_WINNT >= _WIN32_WINNT_WINXP -#define HSHELL_WINDOWREPLACED 13 -#define HSHELL_WINDOWREPLACING 14 -#endif - #define SPI_GETACCESSTIMEOUT 0x003C #define SPI_GETACTIVEWINDOWTRACKING 0x1000 #define SPI_GETACTIVEWNDTRKTIMEOUT 8194 @@ -1443,34 +1284,10 @@ _BEGIN_C_DECLS #define SPI_SETWHEELSCROLLLINES 0x0069 #define SPI_SETWORKAREA 0x002F -#if _WIN32_WINNT >= _WIN32_WINNT_WINXP -#define SPI_GETDROPSHADOW 0x1024 -#define SPI_GETFLATMENU 0x1022 -#define SPI_GETFOCUSBORDERHEIGHT 0x2010 -#define SPI_GETFOCUSBORDERWIDTH 0x200E -#define SPI_GETFONTSMOOTHINGCONTRAST 0x200C -#define SPI_GETFONTSMOOTHINGTYPE 0x200A -#define SPI_GETMOUSECLICKLOCK 0x101E -#define SPI_GETMOUSECLICKLOCKTIME 0x2008 -#define SPI_GETMOUSESONAR 0x101C -#define SPI_GETMOUSEVANISH 0x1020 -#define SPI_SETDROPSHADOW 0x1025 -#define SPI_SETFLATMENU 0x1023 -#define SPI_SETFOCUSBORDERHEIGHT 0x2011 -#define SPI_SETFOCUSBORDERWIDTH 0x200F -#define SPI_SETFONTSMOOTHINGCONTRAST 0x200D -#define SPI_SETFONTSMOOTHINGTYPE 0x200B -#define SPI_SETMOUSECLICKLOCK 0x101F -#define SPI_SETMOUSECLICKLOCKTIME 0x2009 -#define SPI_SETMOUSESONAR 0x101D -#define SPI_SETMOUSEVANISH 0x1021 -#endif - #define SPIF_UPDATEINIFILE 0x0001 #define SPIF_SENDCHANGE 0x0002 #define SPIF_SENDWININICHANGE SPIF_SENDCHANGE -#define ATF_ONOFFFEEDBACK 2 -#define ATF_TIMEOUTON 1 + #define WM_APP 32768 #define WM_ACTIVATE 6 #define WM_ACTIVATEAPP 28 @@ -1545,10 +1362,6 @@ _BEGIN_C_DECLS #define WM_INITMENU 278 #define WM_INITMENUPOPUP 279 -#if _WIN32_WINNT >= _WIN32_WINNT_WINXP -#define WM_INPUT 0x00FF -#endif - #define WM_INPUTLANGCHANGE 81 #define WM_INPUTLANGCHANGEREQUEST 80 #define WM_KEYDOWN 256 @@ -1568,19 +1381,6 @@ _BEGIN_C_DECLS #define WM_MDITILE 550 #define WM_MEASUREITEM 44 -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K -#define WM_GETOBJECT 0x003D -#define WM_CHANGEUISTATE 0x0127 -#define WM_UPDATEUISTATE 0x0128 -#define WM_QUERYUISTATE 0x0129 -#define WM_UNINITMENUPOPUP 0x0125 -#define WM_MENURBUTTONUP 290 -#define WM_MENUCOMMAND 0x0126 -#define WM_MENUGETOBJECT 0x0124 -#define WM_MENUDRAG 0x0123 -#define WM_APPCOMMAND 0x0319 -#endif - #define WM_MENUCHAR 288 #define WM_MENUSELECT 287 #define WM_NEXTMENU 531 @@ -1598,14 +1398,6 @@ _BEGIN_C_DECLS #define WM_NCMBUTTONDOWN 167 #define WM_NCMBUTTONUP 168 -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K -#define WM_NCXBUTTONDOWN 171 -#define WM_NCXBUTTONUP 172 -#define WM_NCXBUTTONDBLCLK 173 -#define WM_NCMOUSEHOVER 0x02A0 -#define WM_NCMOUSELEAVE 0x02A2 -#endif - #define WM_NCMOUSEMOVE 160 #define WM_NCPAINT 133 #define WM_NCRBUTTONDBLCLK 166 @@ -1673,15 +1465,6 @@ _BEGIN_C_DECLS #define WM_WININICHANGE 26 #define WM_KEYFIRST 256 -#if _WIN32_WINNT >= _WIN32_WINNT_WINXP -#define WM_KEYLAST 265 -#define WM_UNICHAR 265 -#define UNICODE_NOCHAR 0xFFFF - -#else -#define WM_KEYLAST 264 -#endif - #define WM_SYNCPAINT 136 #define WM_MOUSEACTIVATE 33 #define WM_MOUSEMOVE 512 @@ -1697,31 +1480,9 @@ _BEGIN_C_DECLS #define WM_MOUSEWHEEL 522 #define WM_MOUSEFIRST 512 -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K -#define WM_XBUTTONDOWN 523 -#define WM_XBUTTONUP 524 -#define WM_XBUTTONDBLCLK 525 -#define WM_MOUSELAST 525 - -#else -#define WM_MOUSELAST 522 -#endif - #define WM_MOUSEHOVER 0x2A1 #define WM_MOUSELEAVE 0x2A3 -#if _WIN32_WINNT >= _WIN32_WINNT_NT4 -#define WHEEL_DELTA 120 -#define GET_WHEEL_DELTA_WPARAM(wparam) ((short)(HIWORD(wparam))) -#define WHEEL_PAGESCROLL UINT_MAX -#endif - -#if _WIN32_WINNT >= _WIN32_WINNT_WIN7 -#define WM_TOUCHMOVE 576 -#define WM_TOUCHDOWN 577 -#define WM_TOUCHUP 578 -#endif - #define BM_CLICK 245 #define BM_GETCHECK 240 #define BM_GETIMAGE 246 @@ -1776,11 +1537,6 @@ _BEGIN_C_DECLS #define CB_SETTOPINDEX 348 #define CB_SHOWDROPDOWN 335 -#if _WIN32_WINNT >= _WIN32_WINNT_WINXP -#define CB_SETMINVISIBLE 0x1701 -#define CB_GETMINVISIBLE 0x1702 -#endif - #define CBN_CLOSEUP 8 #define CBN_DBLCLK 2 #define CBN_DROPDOWN 7 @@ -1830,11 +1586,6 @@ _BEGIN_C_DECLS #define EM_SETWORDBREAKPROC 208 #define EM_UNDO 199 -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K -#define EM_GETIMESTATUS 217 -#define EM_SETIMESTATUS 216 -#endif - #define EN_CHANGE 768 #define EN_ERRSPACE 1280 #define EN_HSCROLL 1537 @@ -1994,11 +1745,6 @@ _BEGIN_C_DECLS #define VK_CANCEL 3 #define VK_MBUTTON 4 -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K -#define VK_XBUTTON1 5 -#define VK_XBUTTON2 6 -#endif - #define VK_BACK 8 #define VK_TAB 9 #define VK_CLEAR 12 @@ -2089,36 +1835,7 @@ _BEGIN_C_DECLS #define VK_LMENU 0xA4 #define VK_RMENU 0xA5 -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K -#define VK_BROWSER_BACK 0xA6 -#define VK_BROWSER_FORWARD 0xA7 -#define VK_BROWSER_REFRESH 0xA8 -#define VK_BROWSER_STOP 0xA9 -#define VK_BROWSER_SEARCH 0xAA -#define VK_BROWSER_FAVORITES 0xAB -#define VK_BROWSER_HOME 0xAC -#define VK_VOLUME_MUTE 0xAD -#define VK_VOLUME_DOWN 0xAE -#define VK_VOLUME_UP 0xAF -#define VK_MEDIA_NEXT_TRACK 0xB0 -#define VK_MEDIA_PREV_TRACK 0xB1 -#define VK_MEDIA_STOP 0xB2 -#define VK_MEDIA_PLAY_PAUSE 0xB3 -#define VK_LAUNCH_MAIL 0xB4 -#define VK_LAUNCH_MEDIA_SELECT 0xB5 -#define VK_LAUNCH_APP1 0xB6 -#define VK_LAUNCH_APP2 0xB7 -#endif - #define VK_OEM_1 0xBA - -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K -#define VK_OEM_PLUS 0xBB -#define VK_OEM_COMMA 0xBC -#define VK_OEM_MINUS 0xBD -#define VK_OEM_PERIOD 0xBE -#endif - #define VK_OEM_2 0xBF #define VK_OEM_3 0xC0 #define VK_OEM_4 0xDB @@ -2127,16 +1844,8 @@ _BEGIN_C_DECLS #define VK_OEM_7 0xDE #define VK_OEM_8 0xDF -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K -#define VK_OEM_102 0xE2 -#endif - #define VK_PROCESSKEY 0xE5 -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K -#define VK_PACKET 0xE7 -#endif - #define VK_ATTN 0xF6 #define VK_CRSEL 0xF7 #define VK_EXSEL 0xF8 @@ -2157,11 +1866,6 @@ _BEGIN_C_DECLS #define MK_CONTROL 8 #define MK_MBUTTON 16 -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K -#define MK_XBUTTON1 32 -#define MK_XBUTTON2 64 -#endif - #define TPM_CENTERALIGN 4 #define TPM_LEFTALIGN 0 #define TPM_RIGHTALIGN 8 @@ -2175,10 +1879,6 @@ _BEGIN_C_DECLS #define TPM_NONOTIFY 128 #define TPM_RETURNCMD 256 -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K || _WIN32_WINDOWS >= _WIN32_WINDOWS_98 -#define TPM_RECURSE 1 -#endif - #define HELP_COMMAND 0x102 #define HELP_CONTENTS 3 #define HELP_CONTEXT 1 @@ -2344,10 +2044,6 @@ _BEGIN_C_DECLS #define SW_INVALIDATE 2 #define SW_ERASE 4 -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K || _WIN32_WINDOWS >= _WIN32_WINDOWS_98 -#define SW_SMOOTHSCROLL 0x0010 -#endif /* >= _WIN32_WINDOWS_98 || >= _WIN32_WINNT_WIN2K */ - #define SC_SIZE 0xF000 #define SC_MOVE 0xF010 #define SC_MINIMIZE 0xF020 @@ -2392,10 +2088,6 @@ _BEGIN_C_DECLS #define ICON_SMALL 0 #define ICON_BIG 1 -#if _WIN32_WINNT >= _WIN32_WINNT_WINXP -#define ICON_SMALL2 2 -#endif - #define HBMMENU_CALLBACK ((HBITMAP)(-1)) #define HBMMENU_SYSTEM ((HBITMAP)(1)) #define HBMMENU_MBAR_RESTORE ((HBITMAP)(2)) @@ -2420,56 +2112,138 @@ _BEGIN_C_DECLS #define LLKHF_ALTDOWN (KF_ALTDOWN >> 8) #define LLKHF_UP (KF_UP >> 8) -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K -#define FLASHW_STOP 0 -#define FLASHW_CAPTION 1 -#define FLASHW_TRAY 2 -#define FLASHW_ALL (FLASHW_CAPTION | FLASHW_TRAY) -#define FLASHW_TIMER 4 -#define FLASHW_TIMERNOFG 12 -#endif /* >= _WIN32_WINNT_WIN2K */ - #define CURSOR_SHOWING 0x00000001 #define WS_ACTIVECAPTION 0x00000001 -#if _WIN32_WINNT >= _WIN32_WINNT_NT4SP3 -#define INPUT_MOUSE 0x00000000 -#define INPUT_KEYBOARD 0x00000001 -#define INPUT_HARDWARE 0x00000002 -#endif /* >= _WIN32_WINNT_NT4SP3 */ +#define GA_PARENT 1 +#define GA_ROOT 2 +#define GA_ROOTOWNER 3 + +#define MAPVK_VK_TO_VSC 0 +#define MAPVK_VSC_TO_VK 1 +#define MAPVK_VK_TO_CHAR 2 +#define MAPVK_VSC_TO_VK_EX 3 +#define MAPVK_VK_TO_VSC_EX 4 + #if WINVER >= _WIN32_WINNT_NT4 /* || _WIN32_WINDOWS_95 */ #define ENDSESSION_LOGOFF 0x80000000 + +#define IDCLOSE 8 +#define IDHELP 9 +#endif /* Win9x || WINNT >= WinNT4 */ + + +#if _WIN32_WINNT >= _WIN32_WINNT_NT4 +#define GET_WHEEL_DELTA_WPARAM(wparam) ((short)(HIWORD(wparam))) + +#define MB_SERVICE_NOTIFICATION 0x00200000 +#define MOUSEEVENTF_WHEEL 0x00000800 + +/* The following group of definitions were formerly duplicated from + * header <pbt.h>, which is now declared obsolete. + */ +#define PBT_APMQUERYSUSPEND 0 +#define PBT_APMQUERYSTANDBY 1 +#define PBT_APMQUERYSUSPENDFAILED 2 +#define PBT_APMQUERYSTANDBYFAILED 3 +#define PBT_APMSUSPEND 4 +#define PBT_APMSTANDBY 5 +#define PBT_APMRESUMECRITICAL 6 +#define PBT_APMRESUMESUSPEND 7 +#define PBT_APMRESUMESTANDBY 8 +#define PBT_APMBATTERYLOW 9 +#define PBT_APMPOWERSTATUSCHANGE 10 +#define PBT_APMOEMEVENT 11 +#define PBT_APMRESUMEAUTOMATIC 18 +#define PBTF_APMRESUMEFROMFAILURE 1 +/* end pbt.h */ + +#define SM_CMETRICS 88 + +#define WHEEL_DELTA 120 +#define WHEEL_PAGESCROLL UINT_MAX + + +#ifdef _WIN32_WINNT +#if _WIN32_WINNT < _WIN32_WINNT_NT4 +/* The following are defined for the WinNT platforms only, but this + * generic representation acquired a new value from WinNT4 onwards... + */ +#define MB_SERVICE_NOTIFICATION 0x00040000 +#endif +/* ...whereas this alternative always represents the value which is + * specific to the older WinNT3x platforms. + */ +#define MB_SERVICE_NOTIFICATION_NT3X 0x00040000 #endif -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K -#define CHILDID_SELF 0 -#define OBJID_WINDOW 0x00000000 -#define OBJID_SYSMENU 0xFFFFFFFF -#define OBJID_TITLEBAR 0xFFFFFFFE -#define OBJID_MENU 0xFFFFFFFD -#define OBJID_CLIENT 0xFFFFFFFC -#define OBJID_VSCROLL 0xFFFFFFFB -#define OBJID_HSCROLL 0xFFFFFFFA -#define OBJID_SIZEGRIP 0xFFFFFFF9 -#define OBJID_CARET 0xFFFFFFF8 -#define OBJID_CURSOR 0xFFFFFFF7 -#define OBJID_ALERT 0xFFFFFFF6 -#define OBJID_SOUND 0xFFFFFFF5 -#define GUI_CARETBLINKING 0x00000001 -#define GUI_INMOVESIZE 0x00000002 -#define GUI_INMENUMODE 0x00000004 -#define GUI_SYSTEMMENUMODE 0x00000008 -#define GUI_POPUPMENUMODE 0x00000010 -#if _WIN32_WINNT >= _WIN32_WINNT_WINXP -#define GUI_16BITTASK 0x00000020 +#if _WIN32_WINNT < _WIN32_WINNT_NT4 +/* This is defined for all Win32 platforms, but a different value + * applies for WinNT, from WinNT4 onwards. + */ +#define SM_CMETRICS 76 +#endif +#if _WIN32_WINNT < _WIN32_WINNT_WIN2K +/* Similarly, these are defined with different values, for all WinNT + * derivatives, from Win2K onwards... + */ +#define CF_MAX 17 +#define WM_MOUSELAST 522 #endif +#if _WIN32_WINNT < _WIN32_WINNT_WINXP +/* ...and these, with the change in value becoming applicable for + * all WinNT derivatives from WinXP onwards. + */ +#define QS_INPUT 7 +#define QS_ALLEVENTS 191 +#define QS_ALLINPUT 255 -#define WINEVENT_OUTOFCONTEXT 0x0000 -#define WINEVENT_SKIPOWNTHREAD 0x0001 -#define WINEVENT_SKIPOWNPROCESS 0x0002 -#define WINEVENT_INCONTEXT 0x0004 +#define WM_KEYLAST 264 +#endif + + +#if _WIN32_WINNT >= _WIN32_WINNT_NT4SP3 +#define INPUT_MOUSE 0x00000000 +#define INPUT_KEYBOARD 0x00000001 +#define INPUT_HARDWARE 0x00000002 + +#endif /* WINNT >= WinNT4-SP3 */ +#endif /* WINNT >= WinNT4 */ + + +#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K || _WIN32_WINDOWS >= _WIN32_WINDOWS_98 +#define DC_GRADIENT 0x00000020 + +#define EDS_RAWMODE 0x00000002 + +#define ISMEX_NOSEND 0x00000000 +#define ISMEX_CALLBACK 0x00000004 +#define ISMEX_NOTIFY 0x00000002 +#define ISMEX_REPLIED 0x00000008 +#define ISMEX_SEND 0x00000001 + +#define MONITOR_DEFAULTTONULL 0 +#define MONITOR_DEFAULTTOPRIMARY 1 +#define MONITOR_DEFAULTTONEAREST 2 +#define MONITORINFOF_PRIMARY 1 + +#define SW_SMOOTHSCROLL 0x0010 +#define TPM_RECURSE 1 + + +#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K || _WIN32_WINDOWS >= _WIN32_WINDOWS_ME +#define ASFW_ANY ((DWORD)(-1)) + +#define GMMP_USE_DISPLAY_POINTS 1 +#define GMMP_USE_HIGH_RESOLUTION_POINTS 2 + +#define LSFW_LOCK 1 +#define LSFW_UNLOCK 2 + + +#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K #define AW_HOR_POSITIVE 0x00000001 #define AW_HOR_NEGATIVE 0x00000002 #define AW_VER_POSITIVE 0x00000004 @@ -2479,12 +2253,24 @@ _BEGIN_C_DECLS #define AW_ACTIVATE 0x00020000 #define AW_SLIDE 0x00040000 #define AW_BLEND 0x00080000 + +#define CF_DIBV5 17 +#define CF_MAX 18 + +#define CHILDID_SELF 0 + +#define DC_BUTTONS 0x00001000 + #define DEVICE_NOTIFY_WINDOW_HANDLE 0x00000000 #define DEVICE_NOTIFY_SERVICE_HANDLE 0x00000001 -#if _WIN32_WINNT >= _WIN32_WINNT_WINXP -#define DEVICE_NOTIFY_ALL_INTERFACE_CLASSES 0x00000004 -#endif +#define DFC_POPUPMENU 5 + +#define DFCS_TRANSPARENT 0x800 +#define DFCS_HOT 0x1000 + +#define EM_GETIMESTATUS 217 +#define EM_SETIMESTATUS 216 #define EVENT_MIN 0x00000001 #define EVENT_SYSTEM_SOUND 0x00000001 @@ -2529,82 +2315,194 @@ _BEGIN_C_DECLS #define EVENT_OBJECT_HELPCHANGE 0x00008010 #define EVENT_OBJECT_DEFACTIONCHANGE 0x00008011 #define EVENT_OBJECT_ACCELERATORCHANGE 0x00008012 - -#if _WIN32_WINNT >= _WIN32_WINNT_WINXP -#define EVENT_CONSOLE_CARET 0x00004001 -#define CONSOLE_CARET_SELECTION 0x00000001 -#define CONSOLE_CARET_VISIBLE 0x00000002 -#define EVENT_CONSOLE_UPDATE_REGION 0x00004002 -#define EVENT_CONSOLE_UPDATE_SIMPLE 0x00004003 -#define EVENT_CONSOLE_UPDATE_SCROLL 0x00004004 -#define EVENT_CONSOLE_LAYOUT 0x00004005 -#define EVENT_CONSOLE_START_APPLICATION 0x00004006 -#define CONSOLE_APPLICATION_16BIT 0x00000001 -#define EVENT_CONSOLE_END_APPLICATION 0x00004007 -#endif /* >= _WIN32_WINNT_WINXP */ - #define EVENT_MAX 0x7FFFFFFF -#endif /* >= _WIN32_WINNT_WIN2K */ -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K || _WIN32_WINDOWS >= _WIN32_WINDOWS_ME -#define ASFW_ANY ((DWORD)(-1)) -#define LSFW_LOCK 1 -#define LSFW_UNLOCK 2 -#endif +#define EWX_FORCEIFHUNG 16 -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K -#define LWA_COLORKEY 0x01 -#define LWA_ALPHA 0x02 -#define ULW_COLORKEY 0x01 -#define ULW_ALPHA 0x02 -#define ULW_OPAQUE 0x04 -#endif +#define FLASHW_STOP 0 +#define FLASHW_CAPTION 1 +#define FLASHW_TRAY 2 +#define FLASHW_ALL (FLASHW_CAPTION | FLASHW_TRAY) +#define FLASHW_TIMER 4 +#define FLASHW_TIMERNOFG 12 -#define GA_PARENT 1 -#define GA_ROOT 2 -#define GA_ROOTOWNER 3 - -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K || _WIN32_WINDOWS >= _WIN32_WINDOWS_98 -#define MONITOR_DEFAULTTONULL 0 -#define MONITOR_DEFAULTTOPRIMARY 1 -#define MONITOR_DEFAULTTONEAREST 2 -#define MONITORINFOF_PRIMARY 1 -#define EDS_RAWMODE 0x00000002 -#define ISMEX_NOSEND 0x00000000 -#define ISMEX_CALLBACK 0x00000004 -#define ISMEX_NOTIFY 0x00000002 -#define ISMEX_REPLIED 0x00000008 -#define ISMEX_SEND 0x00000001 -#endif - -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K #define GR_GDIOBJECTS 0 #define GR_USEROBJECTS 1 -#endif -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K || _WIN32_WINDOWS >= _WIN32_WINDOWS_ME -#define GMMP_USE_DISPLAY_POINTS 1 -#define GMMP_USE_HIGH_RESOLUTION_POINTS 2 -#endif +#define GUI_CARETBLINKING 0x00000001 +#define GUI_INMOVESIZE 0x00000002 +#define GUI_INMENUMODE 0x00000004 +#define GUI_SYSTEMMENUMODE 0x00000008 +#define GUI_POPUPMENUMODE 0x00000010 + +#define HSHELL_ACCESSIBILITYSTATE 11 +#define HSHELL_APPCOMMAND 12 +#define HSHELL_RUDEAPPACTIVATED 32772 +#define HSHELL_FLASH 32774 + +#define HWND_MESSAGE ((HWND)(-3)) + +#define IDTRYAGAIN 10 +#define IDCONTINUE 11 + +#define KEYEVENTF_UNICODE 0x00000004 +#define KEYEVENTF_SCANCODE 0x00000008 + +#define LWA_COLORKEY 0x01 +#define LWA_ALPHA 0x02 + +#define MB_CANCELTRYCONTINUE 6 + +#define MIM_MAXHEIGHT 1 +#define MIM_BACKGROUND 2 +#define MIM_HELPID 4 +#define MIM_MENUDATA 8 +#define MIM_STYLE 16 +#define MIM_APPLYTOSUBMENUS 0x80000000L + +#define MNS_NOCHECK 0x80000000 +#define MNS_MODELESS 0x40000000 +#define MNS_DRAGDROP 0x20000000 +#define MNS_AUTODISMISS 0x10000000 +#define MNS_NOTIFYBYPOS 0x08000000 +#define MNS_CHECKORBMP 0x04000000 + +#define MK_XBUTTON1 32 +#define MK_XBUTTON2 64 + +#define MOUSEEVENTF_XDOWN 0x00000080 +#define MOUSEEVENTF_XUP 0x00000100 + +#define OBJID_WINDOW 0x00000000 +#define OBJID_SYSMENU 0xFFFFFFFF +#define OBJID_TITLEBAR 0xFFFFFFFE +#define OBJID_MENU 0xFFFFFFFD +#define OBJID_CLIENT 0xFFFFFFFC +#define OBJID_VSCROLL 0xFFFFFFFB +#define OBJID_HSCROLL 0xFFFFFFFA +#define OBJID_SIZEGRIP 0xFFFFFFF9 +#define OBJID_CARET 0xFFFFFFF8 +#define OBJID_CURSOR 0xFFFFFFF7 +#define OBJID_ALERT 0xFFFFFFF6 +#define OBJID_SOUND 0xFFFFFFF5 + +# define PM_QS_INPUT (QS_INPUT << 16) +# define PM_QS_POSTMESSAGE ((QS_POSTMESSAGE | QS_HOTKEY | QS_TIMER) << 16) +# define PM_QS_PAINT (QS_PAINT << 16) +# define PM_QS_SENDMESSAGE (QS_SENDMESSAGE << 16) + +#define SMTO_NOTIMEOUTIFNOTHUNG 0x0008 + +#define ULW_COLORKEY 0x01 +#define ULW_ALPHA 0x02 +#define ULW_OPAQUE 0x04 + +#define VK_XBUTTON1 5 +#define VK_XBUTTON2 6 +#define VK_BROWSER_BACK 0xA6 +#define VK_BROWSER_FORWARD 0xA7 +#define VK_BROWSER_REFRESH 0xA8 +#define VK_BROWSER_STOP 0xA9 +#define VK_BROWSER_SEARCH 0xAA +#define VK_BROWSER_FAVORITES 0xAB +#define VK_BROWSER_HOME 0xAC +#define VK_VOLUME_MUTE 0xAD +#define VK_VOLUME_DOWN 0xAE +#define VK_VOLUME_UP 0xAF +#define VK_MEDIA_NEXT_TRACK 0xB0 +#define VK_MEDIA_PREV_TRACK 0xB1 +#define VK_MEDIA_STOP 0xB2 +#define VK_MEDIA_PLAY_PAUSE 0xB3 +#define VK_LAUNCH_MAIL 0xB4 +#define VK_LAUNCH_MEDIA_SELECT 0xB5 +#define VK_LAUNCH_APP1 0xB6 +#define VK_LAUNCH_APP2 0xB7 +#define VK_OEM_PLUS 0xBB +#define VK_OEM_COMMA 0xBC +#define VK_OEM_MINUS 0xBD +#define VK_OEM_PERIOD 0xBE +#define VK_OEM_102 0xE2 +#define VK_PACKET 0xE7 + +#define WINEVENT_OUTOFCONTEXT 0x0000 +#define WINEVENT_SKIPOWNTHREAD 0x0001 +#define WINEVENT_SKIPOWNPROCESS 0x0002 +#define WINEVENT_INCONTEXT 0x0004 + +#define WM_GETOBJECT 0x003D +#define WM_CHANGEUISTATE 0x0127 +#define WM_UPDATEUISTATE 0x0128 +#define WM_QUERYUISTATE 0x0129 +#define WM_UNINITMENUPOPUP 0x0125 +#define WM_MENURBUTTONUP 290 +#define WM_MENUCOMMAND 0x0126 +#define WM_MENUGETOBJECT 0x0124 +#define WM_MENUDRAG 0x0123 +#define WM_APPCOMMAND 0x0319 +#define WM_NCXBUTTONDOWN 171 +#define WM_NCXBUTTONUP 172 +#define WM_NCXBUTTONDBLCLK 173 +#define WM_NCMOUSEHOVER 0x02A0 +#define WM_NCMOUSELEAVE 0x02A2 + +#define WM_XBUTTONDOWN 523 +#define WM_XBUTTONUP 524 +#define WM_XBUTTONDBLCLK 525 +#define WM_MOUSELAST 525 -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K #define XBUTTON1 0x0001 #define XBUTTON2 0x0002 -#endif + #if _WIN32_WINNT >= _WIN32_WINNT_WINXP +#define CB_SETMINVISIBLE 0x1701 +#define CB_GETMINVISIBLE 0x1702 + +#define CONSOLE_APPLICATION_16BIT 0x00000001 +#define CONSOLE_CARET_SELECTION 0x00000001 +#define CONSOLE_CARET_VISIBLE 0x00000002 + +#define CS_DROPSHADOW 0x20000 + +#define DEVICE_NOTIFY_ALL_INTERFACE_CLASSES 0x00000004 + +#define EVENT_CONSOLE_CARET 0x00004001 +#define EVENT_CONSOLE_UPDATE_REGION 0x00004002 +#define EVENT_CONSOLE_UPDATE_SIMPLE 0x00004003 +#define EVENT_CONSOLE_UPDATE_SCROLL 0x00004004 +#define EVENT_CONSOLE_LAYOUT 0x00004005 +#define EVENT_CONSOLE_START_APPLICATION 0x00004006 +#define EVENT_CONSOLE_END_APPLICATION 0x00004007 + #define FE_FONTSMOOTHINGSTANDARD 0x0001 #define FE_FONTSMOOTHINGCLEARTYPE 0x0002 + +#define GUI_16BITTASK 0x00000020 + +#define HSHELL_WINDOWREPLACED 13 +#define HSHELL_WINDOWREPLACING 14 + +#define ICON_SMALL2 2 + +#define KEYBOARD_OVERRUN_MAKE_CODE 0x00FF + +#define MOUSE_MOVE_RELATIVE 0x00000000 +#define MOUSE_MOVE_ABSOLUTE 0x00000001 +#define MOUSE_VIRTUAL_DESKTOP 0x00000002 +#define MOUSE_ATTRIBUTES_CHANGED 0x00000004 + #define PW_CLIENTONLY 0x00000001 + +#define QS_INPUT 1031 +#define QS_RAWINPUT 1024 +#define QS_ALLEVENTS 1215 +#define QS_ALLINPUT 1279 + #define RIM_INPUT 0x00000000 #define RIM_INPUTSINK 0x00000001 #define RIM_TYPEMOUSE 0x00000000 #define RIM_TYPEKEYBOARD 0x00000001 #define RIM_TYPEHID 0x00000002 -#define MOUSE_MOVE_RELATIVE 0x00000000 -#define MOUSE_MOVE_ABSOLUTE 0x00000001 -#define MOUSE_VIRTUAL_DESKTOP 0x00000002 -#define MOUSE_ATTRIBUTES_CHANGED 0x00000004 #define RI_MOUSE_LEFT_BUTTON_DOWN 0x0001 #define RI_MOUSE_LEFT_BUTTON_UP 0x0002 #define RI_MOUSE_RIGHT_BUTTON_DOWN 0x0004 @@ -2622,7 +2520,6 @@ _BEGIN_C_DECLS #define RI_MOUSE_BUTTON_5_DOWN 0x0100 #define RI_MOUSE_BUTTON_5_UP 0x0200 #define RI_MOUSE_WHEEL 0x0400 -#define KEYBOARD_OVERRUN_MAKE_CODE 0x00ff #define RI_KEY_MAKE 0x0000 #define RI_KEY_BREAK 0x0001 #define RI_KEY_E0 0x0002 @@ -2642,7 +2539,38 @@ _BEGIN_C_DECLS #define RIDEV_CAPTUREMOUSE 0x00000200 #define RIDEV_NOHOTKEYS 0x00000200 #define RIDEV_APPKEYS 0x00000400 -#endif + +#define SPI_GETDROPSHADOW 0x1024 +#define SPI_GETFLATMENU 0x1022 +#define SPI_GETFOCUSBORDERHEIGHT 0x2010 +#define SPI_GETFOCUSBORDERWIDTH 0x200E +#define SPI_GETFONTSMOOTHINGCONTRAST 0x200C +#define SPI_GETFONTSMOOTHINGTYPE 0x200A +#define SPI_GETMOUSECLICKLOCK 0x101E +#define SPI_GETMOUSECLICKLOCKTIME 0x2008 +#define SPI_GETMOUSESONAR 0x101C +#define SPI_GETMOUSEVANISH 0x1020 +#define SPI_SETDROPSHADOW 0x1025 +#define SPI_SETFLATMENU 0x1023 +#define SPI_SETFOCUSBORDERHEIGHT 0x2011 +#define SPI_SETFOCUSBORDERWIDTH 0x200F +#define SPI_SETFONTSMOOTHINGCONTRAST 0x200D +#define SPI_SETFONTSMOOTHINGTYPE 0x200B +#define SPI_SETMOUSECLICKLOCK 0x101F +#define SPI_SETMOUSECLICKLOCKTIME 0x2009 +#define SPI_SETMOUSESONAR 0x101D +#define SPI_SETMOUSEVANISH 0x1021 + +#define UNICODE_NOCHAR 0xFFFF + +#define WM_INPUT 0x00FF +#define WM_KEYLAST 265 +#define WM_UNICHAR 265 + + +#if _WIN32_WINNT >= _WIN32_WINNT_VISTA +#define PBT_POWERSETTINGCHANGE 32787 + #if _WIN32_WINNT >= _WIN32_WINNT_WIN7 #define TOUCHEVENTF_DOWN 0x0001 @@ -2657,13 +2585,18 @@ _BEGIN_C_DECLS #define TOUCHEVENTMASKF_CONTACTAREA 0x0004 #define TOUCHEVENTMASKF_EXTRAINFO 0x0002 #define TOUCHEVENTMASKF_TIMEFROMSYSTEM 0x0001 -#endif -#define MAPVK_VK_TO_VSC 0 -#define MAPVK_VSC_TO_VK 1 -#define MAPVK_VK_TO_CHAR 2 -#define MAPVK_VSC_TO_VK_EX 3 -#define MAPVK_VK_TO_VSC_EX 4 +#define WM_TOUCHMOVE 576 +#define WM_TOUCHDOWN 577 +#define WM_TOUCHUP 578 + +#endif /* WINNT >= Win7 */ +#endif /* WINNT >= Vista */ +#endif /* WINNT >= WinXP */ +#endif /* WINNT >= Win2K */ +#endif /* WINNT >= Win2K || Win9x >= WinME */ +#endif /* WINNT >= Win2K || Win9x >= Win98 */ + #ifndef RC_INVOKED #define DEKSTOPENUMPROC __AW_SUFFIXED__(DEKSTOPENUMPROC) @@ -3122,26 +3055,6 @@ typedef struct tagHIGHCONTRASTW typedef __AW_SUFFIXED__(HIGHCONTRAST) HIGHCONTRAST, *LPHIGHCONTRAST; -#ifndef NOGDI -typedef struct tagICONMETRICSA -{ UINT cbSize; - int iHorzSpacing; - int iVertSpacing; - int iTitleWrap; - LOGFONTA lfFont; -} ICONMETRICSA, *LPICONMETRICSA; - -typedef struct tagICONMETRICSW -{ UINT cbSize; - int iHorzSpacing; - int iVertSpacing; - int iTitleWrap; - LOGFONTW lfFont; -} ICONMETRICSW, *LPICONMETRICSW; - -typedef __AW_SUFFIXED__(ICONMETRICS) ICONMETRICS, *LPICONMETRICS; -#endif /* ! NOGDI */ - typedef struct tagMINIMIZEDMETRICS { UINT cbSize; int iWidth; @@ -3160,47 +3073,7 @@ typedef struct tagMOUSEKEYS DWORD dwReserved2; } MOUSEKEYS, *LPMOUSEKEYS; -#ifndef NOGDI -typedef struct tagNONCLIENTMETRICSA -{ UINT cbSize; - int iBorderWidth; - int iScrollWidth; - int iScrollHeight; - int iCaptionWidth; - int iCaptionHeight; - LOGFONTA lfCaptionFont; - int iSmCaptionWidth; - int iSmCaptionHeight; - LOGFONTA lfSmCaptionFont; - int iMenuWidth; - int iMenuHeight; - LOGFONTA lfMenuFont; - LOGFONTA lfStatusFont; - LOGFONTA lfMessageFont; -} NONCLIENTMETRICSA, *LPNONCLIENTMETRICSA; - -typedef struct tagNONCLIENTMETRICSW -{ UINT cbSize; - int iBorderWidth; - int iScrollWidth; - int iScrollHeight; - int iCaptionWidth; - int iCaptionHeight; - LOGFONTW lfCaptionFont; - int iSmCaptionWidth; - int iSmCaptionHeight; - LOGFONTW lfSmCaptionFont; - int iMenuWidth; - int iMenuHeight; - LOGFONTW lfMenuFont; - LOGFONTW lfStatusFont; - LOGFONTW lfMessageFont; -} NONCLIENTMETRICSW, *LPNONCLIENTMETRICSW; - -typedef __AW_SUFFIXED__(NONCLIENTMETRICS) NONCLIENTMETRICS, *LPNONCLIENTMETRICS; -#endif /* ! NOGDI */ - -typedef struct tagSERIALKEYSA +typedef struct tagSERIALKEYSA { UINT cbSize; DWORD dwFlags; LPSTR lpszActivePort; @@ -3467,15 +3340,6 @@ typedef struct tagSCROLLBARINFO DWORD rgstate[CCHILDREN_SCROLLBAR+1]; } SCROLLBARINFO, *PSCROLLBARINFO, *LPSCROLLBARINFO; -#if _WIN32_WINDOWS >= _WIN32_WINDOWS_98 -#define CCHILDREN_TITLEBAR 5 -typedef struct tagTITLEBARINFO -{ DWORD cbSize; - RECT rcTitleBar; - DWORD rgstate[CCHILDREN_TITLEBAR+1]; -} TITLEBARINFO, *PTITLEBARINFO, *LPTITLEBARINFO; -#endif - typedef struct tagWINDOWINFO { DWORD cbSize; RECT rcWindow; @@ -3540,195 +3404,6 @@ typedef struct tagKBDLLHOOKSTRUCT DWORD dwExtraInfo; } KBDLLHOOKSTRUCT, *LPKBDLLHOOKSTRUCT, *PKBDLLHOOKSTRUCT; -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K || _WIN32_WINDOWS >= _WIN32_WINDOWS_98 -typedef struct -{ UINT cbSize; - HWND hwnd; - DWORD dwFlags; - UINT uCount; - DWORD dwTimeout; -} FLASHWINFO, *PFLASHWINFO; -#endif /* >= _WIN32_WINNT_WIN2K || >= _WIN32_WINDOWS_98 */ - -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K || _WIN32_WINDOWS >= _WIN32_WINDOWS_ME -typedef struct tagMOUSEMOVEPOINT -{ int x; - int y; - DWORD time; - ULONG_PTR dwExtraInfo; -} MOUSEMOVEPOINT, *PMOUSEMOVEPOINT, *LPMOUSEMOVEPOINT; -#endif - -#if _WIN32_WINNT >= _WIN32_WINNT_NT4SP3 -typedef struct tagMOUSEINPUT -{ LONG dx; - LONG dy; - DWORD mouseData; - DWORD dwFlags; - DWORD time; - ULONG_PTR dwExtraInfo; -} MOUSEINPUT, *PMOUSEINPUT; - -typedef struct tagKEYBDINPUT -{ WORD wVk; - WORD wScan; - DWORD dwFlags; - DWORD time; - ULONG_PTR dwExtraInfo; -} KEYBDINPUT, *PKEYBDINPUT; - -typedef struct tagHARDWAREINPUT -{ DWORD uMsg; - WORD wParamL; - WORD wParamH; -} HARDWAREINPUT, *PHARDWAREINPUT; - -typedef struct tagINPUT -{ DWORD type; - _ANONYMOUS_UNION union - { MOUSEINPUT mi; - KEYBDINPUT ki; - HARDWAREINPUT hi; - } DUMMYUNIONNAME; -} INPUT, *PINPUT, *LPINPUT; -#endif /* >= _WIN32_WINNT_NT4SP3 */ - -#if _WIN32_WINNT >= _WIN32_WINNT_WIN7 -typedef struct _TOUCHINPUT -{ LONG x; - LONG y; - HANDLE hSource; - DWORD dwID; - DWORD dwFlags; - DWORD dwMask; - DWORD dwTime; - ULONG_PTR dwExtraInfo; - DWORD cxContact; - DWORD cyContact; -} TOUCHINPUT, *PTOUCHINPUT; -#endif /* >= _WIN32_WINNT_WIN7 */ - -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K -typedef struct tagGUITHREADINFO -{ DWORD cbSize; - DWORD flags; - HWND hwndActive; - HWND hwndFocus; - HWND hwndCapture; - HWND hwndMenuOwner; - HWND hwndMoveSize; - HWND hwndCaret; - RECT rcCaret; -} GUITHREADINFO, *PGUITHREADINFO, *LPGUITHREADINFO; - -typedef VOID (CALLBACK *WINEVENTPROC) (HWINEVENTHOOK, DWORD, HWND, LONG, LONG, DWORD, DWORD); -#endif /* >= _WIN32_WINNT_WIN2K */ - -#if _WIN32_WINNT >= _WIN32_WINNT_WINXP -typedef struct -{ UINT cbSize; - HDESK hdesk; - HWND hwnd; - LUID luid; -} BSMINFO, *PBSMINFO; - -DECLARE_HANDLE(HRAWINPUT); - -typedef struct tagRAWINPUTHEADER -{ DWORD dwType; - DWORD dwSize; - HANDLE hDevice; - WPARAM wParam; -} RAWINPUTHEADER, *PRAWINPUTHEADER; - -typedef struct tagRAWMOUSE -{ USHORT usFlags; - _ANONYMOUS_UNION union - { ULONG ulButtons; - _ANONYMOUS_STRUCT struct - { USHORT usButtonFlags; - USHORT usButtonData; - }; - }; - ULONG ulRawButtons; - LONG lLastX; - LONG lLastY; - ULONG ulExtraInformation; -} RAWMOUSE, *PRAWMOUSE, *LPRAWMOUSE; - -typedef struct tagRAWKEYBOARD -{ USHORT MakeCode; - USHORT Flags; - USHORT Reserved; - USHORT VKey; - UINT Message; - ULONG ExtraInformation; -} RAWKEYBOARD, *PRAWKEYBOARD, *LPRAWKEYBOARD; - -typedef struct tagRAWHID -{ DWORD dwSizeHid; - DWORD dwCount; - BYTE bRawData; -} RAWHID, *PRAWHID, *LPRAWHID; - -typedef struct tagRAWINPUT -{ RAWINPUTHEADER header; - union - { RAWMOUSE mouse; - RAWKEYBOARD keyboard; - RAWHID hid; - } data; -} RAWINPUT, *PRAWINPUT, *LPRAWINPUT; - -typedef struct tagRAWINPUTDEVICE -{ USHORT usUsagePage; - USHORT usUsage; - DWORD dwFlags; - HWND hwndTarget; -} RAWINPUTDEVICE, *PRAWINPUTDEVICE, *LPRAWINPUTDEVICE; - -typedef const RAWINPUTDEVICE *PCRAWINPUTDEVICE; - -typedef struct tagRAWINPUTDEVICELIST -{ HANDLE hDevice; - DWORD dwType; -} RAWINPUTDEVICELIST, *PRAWINPUTDEVICELIST; - -typedef struct tagRID_DEVICE_INFO_MOUSE -{ DWORD dwId; - DWORD dwNumberOfButtons; - DWORD dwSampleRate; - BOOL fHasHorizontalWheel; -} RID_DEVICE_INFO_MOUSE, *PRID_DEVICE_INFO_MOUSE; - -typedef struct tagRID_DEVICE_INFO_KEYBOARD -{ DWORD dwType; - DWORD dwSubType; - DWORD dwKeyboardMode; - DWORD dwNumberOfFunctionKeys; - DWORD dwNumberOfIndicators; - DWORD dwNumberOfKeysTotal; -} RID_DEVICE_INFO_KEYBOARD, *PRID_DEVICE_INFO_KEYBOARD; - -typedef struct tagRID_DEVICE_INFO_HID -{ DWORD dwVendorId; - DWORD dwProductId; - DWORD dwVersionNumber; - USHORT usUsagePage; - USHORT usUsage; -} RID_DEVICE_INFO_HID, *PRID_DEVICE_INFO_HID; - -typedef struct tagRID_DEVICE_INFO -{ DWORD cbSize; - DWORD dwType; - _ANONYMOUS_UNION union - { RID_DEVICE_INFO_MOUSE mouse; - RID_DEVICE_INFO_KEYBOARD keyboard; - RID_DEVICE_INFO_HID hid; - } DUMMYUNIONNAME; -} RID_DEVICE_INFO, *PRID_DEVICE_INFO, *LPRID_DEVICE_INFO; -#endif /* >= _WIN32_WINNT_WINXP */ - typedef struct { POINT pt; DWORD mouseData; @@ -3762,34 +3437,10 @@ typedef struct typedef const GUID *LPCGUID; #endif -#if _WIN32_WINNT >= _WIN32_WINNT_VISTA -typedef HANDLE HPOWERNOTIFY; - -typedef struct -{ GUID PowerSetting; - DWORD DataLength; - UCHAR Data[1]; -} POWERBROADCAST_SETTING, *PPOWERBROADCAST_SETTING; - -extern const GUID GUID_POWERSCHEME_PERSONALITY; -extern const GUID GUID_MIN_POWER_SAVINGS; -extern const GUID GUID_MAX_POWER_SAVINGS; -extern const GUID GUID_TYPICAL_POWER_SAVINGS; -extern const GUID GUID_ACDC_POWER_SOURCE; -extern const GUID GUID_BATTERY_PERCENTAGE_REMAINING; -extern const GUID GUID_IDLE_BACKGROUND_TASK; -extern const GUID GUID_SYSTEM_AWAYMODE; -extern const GUID GUID_MONITOR_POWER_ON; -#endif - WINUSERAPI HKL WINAPI ActivateKeyboardLayout (HKL, UINT); WINUSERAPI BOOL WINAPI AdjustWindowRect (LPRECT, DWORD, BOOL); WINUSERAPI BOOL WINAPI AdjustWindowRectEx (LPRECT, DWORD, BOOL, DWORD); -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K -WINUSERAPI BOOL WINAPI AnimateWindow (HWND, DWORD, DWORD); -#endif /* >= _WIN32_WINNT_WIN2K */ - WINUSERAPI BOOL WINAPI AnyPopup (void); #define AppendMenu __AW_SUFFIXED__(AppendMenu) @@ -3801,21 +3452,8 @@ WINUSERAPI BOOL WINAPI AttachThreadInput (DWORD, DWORD, BOOL); WINUSERAPI HDWP WINAPI BeginDeferWindowPos (int); WINUSERAPI HDC WINAPI BeginPaint (HWND, LPPAINTSTRUCT); WINUSERAPI BOOL WINAPI BringWindowToTop (HWND); - WINUSERAPI long WINAPI BroadcastSystemMessage (DWORD, LPDWORD, UINT, WPARAM, LPARAM); -#if _WIN32_WINNT >= _WIN32_WINNT_NT4 -#define BroadcastSystemMessage __AW_SUFFIXED__(BroadcastSystemMessage) -WINUSERAPI long WINAPI BroadcastSystemMessageA (DWORD, LPDWORD, UINT, WPARAM, LPARAM); -WINUSERAPI long WINAPI BroadcastSystemMessageW (DWORD, LPDWORD, UINT, WPARAM, LPARAM); -#endif /* >= _WIN32_WINNT_NT4 */ - -#if _WIN32_WINNT >= _WIN32_WINNT_WINXP -#define BroadcastSystemMessageEx __AW_SUFFIXED__(BroadcastSystemMessageEx) -WINUSERAPI long WINAPI BroadcastSystemMessageExA (DWORD, LPDWORD, UINT, WPARAM, LPARAM, PBSMINFO); -WINUSERAPI long WINAPI BroadcastSystemMessageExW (DWORD, LPDWORD, UINT, WPARAM, LPARAM, PBSMINFO); -#endif /* >= _WIN32_WINNT_WINXP */ - #define CallMsgFilter __AW_SUFFIXED__(CallMsgFilter) WINUSERAPI BOOL WINAPI CallMsgFilterA (LPMSG, INT); WINUSERAPI BOOL WINAPI CallMsgFilterW (LPMSG, INT); @@ -3830,16 +3468,6 @@ WINUSERAPI BOOL WINAPI ChangeClipboardChain (HWND, HWND); #define DefHookProc(c, p, lp, h) CallNextHookEx ((HHOOK)(*(h)), c, p, lp) WINUSERAPI LRESULT WINAPI CallNextHookEx (HHOOK, int, WPARAM, LPARAM); -#ifndef NOGDI -#define ChangeDisplaySettings __AW_SUFFIXED__(ChangeDisplaySettings) -WINUSERAPI LONG WINAPI ChangeDisplaySettingsA (PDEVMODEA, DWORD); -WINUSERAPI LONG WINAPI ChangeDisplaySettingsW (PDEVMODEW, DWORD); - -#define ChangeDisplaySettingsEx __AW_SUFFIXED__(ChangeDisplaySettingsEx) -WINUSERAPI LONG WINAPI ChangeDisplaySettingsExA (LPCSTR, LPDEVMODEA, HWND, DWORD, LPVOID); -WINUSERAPI LONG WINAPI ChangeDisplaySettingsExW (LPCWSTR, LPDEVMODEW, HWND, DWORD, LPVOID); -#endif /* ! NOGDI */ - #define ChangeMenu __AW_SUFFIXED__(ChangeMenu) WINUSERAPI BOOL WINAPI ChangeMenuA (HMENU, UINT, LPCSTR, UINT, UINT); WINUSERAPI BOOL WINAPI ChangeMenuW (HMENU, UINT, LPCWSTR, UINT, UINT); @@ -3908,14 +3536,6 @@ WINUSERAPI HACCEL WINAPI CreateAcceleratorTableW (LPACCEL, int); WINUSERAPI BOOL WINAPI CreateCaret (HWND, HBITMAP, int, int); WINUSERAPI HCURSOR WINAPI CreateCursor (HINSTANCE, int, int, int, int, PCVOID, PCVOID); -#ifndef NOGDI -#define CreateDesktop __AW_SUFFIXED__(CreateDesktop) -WINUSERAPI HDESK WINAPI CreateDesktopA -(LPCSTR, LPCSTR, LPDEVMODEA, DWORD, ACCESS_MASK, LPSECURITY_ATTRIBUTES); -WINUSERAPI HDESK WINAPI CreateDesktopW -(LPCWSTR, LPCWSTR, LPDEVMODEW, DWORD, ACCESS_MASK, LPSECURITY_ATTRIBUTES); -#endif /* ! NOGDI */ - #define CreateDialog __AW_SUFFIXED__(CreateDialog) #define CreateDialogA(h,n,w,f) CreateDialogParamA (h, n, w, f, 0) #define CreateDialogW(h,n,w,f) CreateDialogParamW (h, n, w, f, 0) @@ -3975,10 +3595,6 @@ WINUSERAPI LRESULT WINAPI DefFrameProcW (HWND, HWND, UINT, WPARAM, LPARAM); WINUSERAPI LRESULT WINAPI DefMDIChildProcA (HWND, UINT, WPARAM, LPARAM); WINUSERAPI LRESULT WINAPI DefMDIChildProcW (HWND, UINT, WPARAM, LPARAM); -#if _WIN32_WINNT >= _WIN32_WINNT_WINXP -WINUSERAPI LRESULT WINAPI DefRawInputProc (PRAWINPUT *, INT, UINT); -#endif - #define DefWindowProc __AW_SUFFIXED__(DefWindowProc) WINUSERAPI LRESULT WINAPI DefWindowProcA (HWND, UINT, WPARAM, LPARAM); WINUSERAPI LRESULT WINAPI DefWindowProcW (HWND, UINT, WPARAM, LPARAM); @@ -4068,10 +3684,6 @@ WINUSERAPI BOOL WINAPI EndDialog (HWND, int); WINUSERAPI BOOL WINAPI EndMenu (void); WINUSERAPI BOOL WINAPI EndPaint (HWND, const PAINTSTRUCT *); -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K -WINUSERAPI BOOL WINAPI EndTask (HWND, BOOL, BOOL); -#endif - WINUSERAPI BOOL WINAPI EnumChildWindows (HWND, ENUMWINDOWSPROC, LPARAM); WINUSERAPI UINT WINAPI EnumClipboardFormats (UINT); @@ -4082,22 +3694,6 @@ WINUSERAPI BOOL WINAPI EnumDesktopsW (HWINSTA, DESKTOPENUMPROCW, LPARAM); WINUSERAPI BOOL WINAPI EnumDesktopWindows (HDESK, ENUMWINDOWSPROC, LPARAM); WINUSERAPI BOOL WINAPI EnumDisplayMonitors (HDC, LPCRECT, MONITORENUMPROC, LPARAM); -#ifndef NOGDI -#define EnumDisplaySettings __AW_SUFFIXED__(EnumDisplaySettings) -WINUSERAPI BOOL WINAPI EnumDisplaySettingsA (LPCSTR, DWORD, PDEVMODEA); -WINUSERAPI BOOL WINAPI EnumDisplaySettingsW (LPCWSTR, DWORD, PDEVMODEW); - -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K || _WIN32_WINDOWS >= _WIN32_WINDOWS_98 -WINUSERAPI BOOL WINAPI EnumDisplaySettingsExA (LPCSTR, DWORD, LPDEVMODEA, DWORD); -WINUSERAPI BOOL WINAPI EnumDisplaySettingsExW (LPCWSTR, DWORD, LPDEVMODEW, DWORD); -#define EnumDisplaySettingsEx __AW_SUFFIXED__(EnumDisplaySettingsEx) -#endif - -#define EnumDisplayDevices __AW_SUFFIXED__(EnumDisplayDevices) -WINUSERAPI BOOL WINAPI EnumDisplayDevicesA (LPCSTR, DWORD, PDISPLAY_DEVICEA, DWORD); -WINUSERAPI BOOL WINAPI EnumDisplayDevicesW (LPCWSTR, DWORD, PDISPLAY_DEVICEW, DWORD); -#endif /* ! NOGDI */ - #define EnumProps __AW_SUFFIXED__(EnumProps) WINUSERAPI int WINAPI EnumPropsA (HWND, PROPENUMPROCA); WINUSERAPI int WINAPI EnumPropsW (HWND, PROPENUMPROCW); @@ -4128,9 +3724,6 @@ WINUSERAPI HWND WINAPI FindWindowExA (HWND, HWND, LPCSTR, LPCSTR); WINUSERAPI HWND WINAPI FindWindowExW (HWND, HWND, LPCWSTR, LPCWSTR); WINUSERAPI BOOL WINAPI FlashWindow (HWND, BOOL); -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K || _WIN32_WINDOWS >= _WIN32_WINDOWS_98 -WINUSERAPI BOOL WINAPI FlashWindowEx (PFLASHWINFO); -#endif int WINAPI FrameRect (HDC, LPCRECT, HBRUSH); WINUSERAPI BOOL WINAPI FrameRgn (HDC, HRGN, HBRUSH, int, int); @@ -4177,10 +3770,6 @@ WINUSERAPI int WINAPI GetClipboardFormatNameW (UINT, LPWSTR, int); WINUSERAPI HANDLE WINAPI GetClipboardData (UINT); WINUSERAPI HWND WINAPI GetClipboardOwner (void); -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K || _WIN32_WINDOWS >= _WIN32_WINDOWS_98 -WINUSERAPI DWORD WINAPI GetClipboardSequenceNumber (void); -#endif - HWND WINAPI GetClipboardViewer (void); WINUSERAPI BOOL WINAPI GetClipCursor (LPRECT); WINUSERAPI BOOL WINAPI GetCursorPos (LPPOINT); @@ -4199,11 +3788,6 @@ WINUSERAPI UINT WINAPI GetDlgItemTextW (HWND, int, LPWSTR, int); WINUSERAPI UINT WINAPI GetDoubleClickTime (void); WINUSERAPI HWND WINAPI GetFocus (void); WINUSERAPI HWND WINAPI GetForegroundWindow (void); - -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K -WINUSERAPI DWORD WINAPI GetGuiResources (HANDLE, DWORD); -#endif - WINUSERAPI BOOL WINAPI GetIconInfo (HICON, PICONINFO); WINUSERAPI BOOL WINAPI GetInputState (void); WINUSERAPI UINT WINAPI GetKBCodePage (void); @@ -4249,10 +3833,6 @@ WINUSERAPI LONG WINAPI GetMessageExtraInfo (void); WINUSERAPI DWORD WINAPI GetMessagePos (void); WINUSERAPI LONG WINAPI GetMessageTime (void); -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K || _WIN32_WINDOWS >= _WIN32_WINDOWS_ME -WINUSERAPI int WINAPI GetMouseMovePointsEx (UINT, LPMOUSEMOVEPOINT, LPMOUSEMOVEPOINT, int, DWORD); -#endif - WINUSERAPI HWND WINAPI GetNextDlgGroupItem (HWND, HWND, BOOL); WINUSERAPI HWND WINAPI GetNextDlgTabItem (HWND, HWND, BOOL); WINUSERAPI HWND WINAPI GetOpenClipboardWindow (void); @@ -4263,27 +3843,10 @@ WINUSERAPI int WINAPI GetPriorityClipboardFormat (UINT *, int); WINUSERAPI HANDLE WINAPI GetPropA (HWND, LPCSTR); WINUSERAPI HANDLE WINAPI GetPropW (HWND, LPCWSTR); -#if _WIN32_WINNT >= _WIN32_WINNT_WINXP -WINUSERAPI UINT WINAPI GetRawInputBuffer (PRAWINPUT, PUINT, UINT); -WINUSERAPI UINT WINAPI GetRawInputData (HRAWINPUT, UINT, LPVOID, PUINT, UINT); - -#define GetRawInputDeviceInfo __AW_SUFFIXED__(GetRawInputDeviceInfo) -WINUSERAPI UINT WINAPI GetRawInputDeviceInfoA (HANDLE, UINT, LPVOID, PUINT); -WINUSERAPI UINT WINAPI GetRawInputDeviceInfoW (HANDLE, UINT, LPVOID, PUINT); - -WINUSERAPI UINT WINAPI GetRawInputDeviceList (PRAWINPUTDEVICELIST, PUINT, UINT); -WINUSERAPI UINT WINAPI GetRegisteredRawInputDevices (PRAWINPUTDEVICE, PUINT, UINT); -#endif - WINUSERAPI DWORD WINAPI GetQueueStatus (UINT); WINUSERAPI BOOL WINAPI GetScrollInfo (HWND, int, LPSCROLLINFO); WINUSERAPI int WINAPI GetScrollPos (HWND, int); WINUSERAPI BOOL WINAPI GetScrollRange (HWND, int, LPINT, LPINT); - -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K -WINUSERAPI HWND WINAPI GetShellWindow (void); -#endif - WINUSERAPI HMENU WINAPI GetSubMenu (HMENU, int); WINUSERAPI DWORD WINAPI GetSysColor (int); WINUSERAPI HBRUSH WINAPI GetSysColorBrush (int); @@ -4348,19 +3911,11 @@ WINUSERAPI BOOL WINAPI GetAltTabInfoW (HWND, int, PALTTABINFO, LPWSTR, UINT); WINUSERAPI BOOL WINAPI GetComboBoxInfo (HWND, PCOMBOBOXINFO); WINUSERAPI BOOL WINAPI GetCursorInfo (PCURSORINFO); -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K -WINUSERAPI BOOL WINAPI GetGUIThreadInfo (DWORD, LPGUITHREADINFO); -#endif - WINUSERAPI BOOL WINAPI GetLastInputInfo (PLASTINPUTINFO); WINUSERAPI DWORD WINAPI GetListBoxInfo (HWND); WINUSERAPI BOOL WINAPI GetMenuBarInfo (HWND, LONG, LONG, PMENUBARINFO); WINUSERAPI BOOL WINAPI GetMenuInfo (HMENU, LPMENUINFO); -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K -WINUSERAPI BOOL WINAPI GetProcessDefaultLayout (DWORD *); -#endif - #if _WIN32_WINDOWS >= _WIN32_WINDOWS_98 WINUSERAPI BOOL WINAPI GetTitleBarInfo (HWND, PTITLEBARINFO); #endif @@ -4385,10 +3940,6 @@ WINUSERAPI BOOL WINAPI HiliteMenuItem (HWND, HMENU, UINT, UINT); WINUSERAPI BOOL WINAPI InflateRect (LPRECT, int, int); WINUSERAPI BOOL WINAPI InSendMessage (void); -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K || _WIN32_WINDOWS >= _WIN32_WINDOWS_98 -WINUSERAPI DWORD WINAPI InSendMessageEx (LPVOID); -#endif - #define InsertMenu __AW_SUFFIXED__(InsertMenu) WINUSERAPI BOOL WINAPI InsertMenuA (HMENU, UINT, UINT, UINT, LPCSTR); WINUSERAPI BOOL WINAPI InsertMenuW (HMENU, UINT, UINT, UINT, LPCWSTR); @@ -4427,14 +3978,6 @@ WINUSERAPI UINT WINAPI IsDlgButtonChecked (HWND, int); WINUSERAPI BOOL WINAPI IsDialogMessageA (HWND, LPMSG); WINUSERAPI BOOL WINAPI IsDialogMessageW (HWND, LPMSG); -#if _WIN32_WINNT >= _WIN32_WINNT_WINXP -WINUSERAPI BOOL WINAPI IsGUIThread (BOOL); -#endif - -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K -WINUSERAPI BOOL WINAPI IsHungAppWindow (HWND); -#endif - WINUSERAPI BOOL WINAPI IsIconic (HWND); WINUSERAPI BOOL WINAPI IsMenu (HMENU); WINUSERAPI BOOL WINAPI IsRectEmpty (LPCRECT); @@ -4443,10 +3986,6 @@ WINUSERAPI BOOL WINAPI IsWindowEnabled (HWND); WINUSERAPI BOOL WINAPI IsWindowUnicode (HWND); WINUSERAPI BOOL WINAPI IsWindowVisible (HWND); -#if _WIN32_WINNT >= _WIN32_WINNT_WINXP -WINUSERAPI BOOL WINAPI IsWinEventHookInstalled (DWORD); -#endif - WINUSERAPI BOOL WINAPI IsZoomed (HWND); WINUSERAPI VOID WINAPI keybd_event (BYTE, BYTE, DWORD, DWORD); WINUSERAPI BOOL WINAPI KillTimer (HWND, UINT_PTR); @@ -4493,10 +4032,6 @@ WINUSERAPI int WINAPI LoadStringW (HINSTANCE, UINT, LPWSTR, int); WINUSERAPI BOOL WINAPI LockWindowUpdate (HWND); -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K -WINUSERAPI BOOL WINAPI LockWorkStation (void); -#endif - WINUSERAPI int WINAPI LookupIconIdFromDirectory (PBYTE, BOOL); WINUSERAPI int WINAPI LookupIconIdFromDirectoryEx (PBYTE, BOOL, int, int, UINT); WINUSERAPI BOOL WINAPI MapDialogRect (HWND, LPRECT); @@ -4529,21 +4064,11 @@ WINUSERAPI int WINAPI MessageBoxIndirectW (CONST MSGBOXPARAMSW *); WINUSERAPI BOOL WINAPI ModifyMenuA (HMENU, UINT, UINT, UINT, LPCSTR); WINUSERAPI BOOL WINAPI ModifyMenuW (HMENU, UINT, UINT, UINT, LPCWSTR); -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K || _WIN32_WINDOWS >= _WIN32_WINDOWS_98 -WINUSERAPI HMONITOR WINAPI MonitorFromPoint (POINT, DWORD); -WINUSERAPI HMONITOR WINAPI MonitorFromRect (LPCRECT, DWORD); -WINUSERAPI HMONITOR WINAPI MonitorFromWindow (HWND, DWORD); -#endif - WINUSERAPI void WINAPI mouse_event (DWORD, DWORD, DWORD, DWORD, ULONG_PTR); WINUSERAPI BOOL WINAPI MoveWindow (HWND, int, int, int, int, BOOL); WINUSERAPI DWORD WINAPI MsgWaitForMultipleObjects (DWORD, CONST HANDLE *, BOOL, DWORD, DWORD); WINUSERAPI DWORD WINAPI MsgWaitForMultipleObjectsEx (DWORD, CONST HANDLE *, DWORD, DWORD, DWORD); -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K -WINUSERAPI void WINAPI NotifyWinEvent (DWORD, HWND, LONG, LONG); -#endif - WINUSERAPI DWORD WINAPI OemKeyScan (WORD); #define OemToChar __AW_SUFFIXED__(OemToChar) @@ -4588,10 +4113,6 @@ WINUSERAPI BOOL WINAPI PostThreadMessageW (DWORD, UINT, WPARAM, LPARAM); WINUSERAPI void WINAPI PostQuitMessage (int); -#if _WIN32_WINNT >= _WIN32_WINNT_WINXP -WINUSERAPI BOOL WINAPI PrintWindow (HWND, HDC, UINT); -#endif - WINUSERAPI BOOL WINAPI PtInRect (LPCRECT, POINT); WINUSERAPI BOOL WINAPI RedrawWindow (HWND, LPCRECT, HRGN, UINT); WINUSERAPI HWND WINAPI RealChildWindowFromPoint (HWND, POINT); @@ -4612,22 +4133,8 @@ WINUSERAPI ATOM WINAPI RegisterClassExW (CONST WNDCLASSEXW *); WINUSERAPI UINT WINAPI RegisterClipboardFormatA (LPCSTR); WINUSERAPI UINT WINAPI RegisterClipboardFormatW (LPCWSTR); -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K -#define RegisterDeviceNotification __AW_SUFFIXED__(RegisterDeviceNotification) -WINUSERAPI HDEVNOTIFY WINAPI RegisterDeviceNotificationA (HANDLE, LPVOID, DWORD); -WINUSERAPI HDEVNOTIFY WINAPI RegisterDeviceNotificationW (HANDLE, LPVOID, DWORD); -#endif - -#if _WIN32_WINNT >= _WIN32_WINNT_VISTA -WINUSERAPI HPOWERNOTIFY WINAPI RegisterPowerSettingNotification (HANDLE, LPCGUID, DWORD); -#endif - WINUSERAPI BOOL WINAPI RegisterHotKey (HWND, int, UINT, UINT); -#if _WIN32_WINNT >= _WIN32_WINNT_WINXP -WINUSERAPI BOOL WINAPI RegisterRawInputDevices (PCRAWINPUTDEVICE, UINT, UINT); -#endif - #define RegisterWindowMessage __AW_SUFFIXED__(RegisterWindowMessage) WINUSERAPI UINT WINAPI RegisterWindowMessageA (LPCSTR); WINUSERAPI UINT WINAPI RegisterWindowMessageW (LPCWSTR); @@ -4650,14 +4157,6 @@ WINUSERAPI int WINAPI ScrollWindowEx (HWND, int, int, LPCRECT, LPCRECT, HRGN, LP WINUSERAPI LONG WINAPI SendDlgItemMessageA (HWND, int, UINT, WPARAM, LPARAM); WINUSERAPI LONG WINAPI SendDlgItemMessageW (HWND, int, UINT, WPARAM, LPARAM); -#if _WIN32_WINNT >= _WIN32_WINNT_NT4SP3 -WINUSERAPI UINT WINAPI SendInput (UINT, LPINPUT, int); - -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K || _WIN32_WINDOWS >= _WIN32_WINDOWS_98 -BOOL WINAPI BlockInput(BOOL); -#endif -#endif - #define SendMessage __AW_SUFFIXED__(SendMessage) WINUSERAPI LRESULT WINAPI SendMessageA (HWND, UINT, WPARAM, LPARAM); WINUSERAPI LRESULT WINAPI SendMessageW (HWND, UINT, WPARAM, LPARAM); @@ -4722,11 +4221,6 @@ WINUSERAPI BOOL WINAPI SetMenuItemInfoW ( HMENU, UINT, BOOL, LPCMENUITEMINFOW); WINUSERAPI LPARAM WINAPI SetMessageExtraInfo (LPARAM); WINUSERAPI BOOL WINAPI SetMessageQueue (int); WINUSERAPI HWND WINAPI SetParent (HWND, HWND); - -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K -WINUSERAPI BOOL WINAPI SetProcessDefaultLayout (DWORD); -#endif /* >= _WIN32_WINNT_WIN2K */ - WINUSERAPI BOOL WINAPI SetProcessWindowStation (HWINSTA); #define SetProp __AW_SUFFIXED__(SetProp) @@ -4753,11 +4247,6 @@ WINUSERAPI BOOL WINAPI SetUserObjectInformationW (HANDLE, int, PVOID, DWORD); WINUSERAPI BOOL WINAPI SetUserObjectSecurity (HANDLE, PSECURITY_INFORMATION, PSECURITY_DESCRIPTOR); -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K -WINUSERAPI HWINEVENTHOOK WINAPI SetWinEventHook -(UINT, UINT, HMODULE, WINEVENTPROC, DWORD, DWORD, UINT); -#endif - WINUSERAPI BOOL WINAPI SetWindowContextHelpId (HWND, DWORD); #define SetWindowLong __AW_SUFFIXED__(SetWindowLong) @@ -4801,10 +4290,6 @@ WINUSERAPI BOOL WINAPI SubtractRect (LPRECT, LPCRECT, LPCRECT); WINUSERAPI BOOL WINAPI SwapMouseButton (BOOL); WINUSERAPI BOOL WINAPI SwitchDesktop (HDESK); -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K -WINUSERAPI VOID WINAPI SwitchToThisWindow (HWND, BOOL); -#endif /* >= _WIN32_WINNT_WIN2K */ - #define SystemParametersInfo __AW_SUFFIXED__(SystemParametersInfo) WINUSERAPI BOOL WINAPI SystemParametersInfoA (UINT, UINT, PVOID, UINT); WINUSERAPI BOOL WINAPI SystemParametersInfoW (UINT, UINT, PVOID, UINT); @@ -4831,10 +4316,6 @@ WINUSERAPI BOOL WINAPI TranslateMessage (const MSG *); WINUSERAPI BOOL WINAPI UnhookWindowsHook (int, HOOKPROC); WINUSERAPI BOOL WINAPI UnhookWindowsHookEx (HHOOK); -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K -WINUSERAPI BOOL WINAPI UnhookWinEvent (HWINEVENTHOOK); -#endif /* >= _WIN32_WINNT_WIN2K */ - WINUSERAPI BOOL WINAPI UnionRect (LPRECT, LPCRECT, LPCRECT); WINUSERAPI BOOL WINAPI UnloadKeyboardLayout (HKL); @@ -4842,21 +4323,9 @@ WINUSERAPI BOOL WINAPI UnloadKeyboardLayout (HKL); WINUSERAPI BOOL WINAPI UnregisterClassA (LPCSTR, HINSTANCE); WINUSERAPI BOOL WINAPI UnregisterClassW (LPCWSTR, HINSTANCE); -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K || _WIN32_WINDOWS >= _WIN32_WINDOWS_98 -WINUSERAPI BOOL WINAPI UnregisterDeviceNotification (HANDLE); -#endif - -#if _WIN32_WINNT >= _WIN32_WINNT_VISTA -WINUSERAPI BOOL WINAPI UnregisterPowerSettingNotification (HPOWERNOTIFY); -#endif - WINUSERAPI BOOL WINAPI Unregister... [truncated message content] |
From: Keith M. <no...@so...> - 2017-06-12 19:22:02
|
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 16ab58171b55e2959b97866b6fc8e913615c8e03 (commit) from 1cf415906a7b483690ef3db9793c17da5e01da97 (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/16ab58171b55e2959b97866b6fc8e913615c8e03/ commit 16ab58171b55e2959b97866b6fc8e913615c8e03 Author: Keith Marshall <kei...@us...> Date: Mon Jun 5 20:15:12 2017 +0100 Automatically correct obsolete _XOPEN_SOURCE usage. diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog index 2765231..6b604b3 100644 --- a/mingwrt/ChangeLog +++ b/mingwrt/ChangeLog @@ -1,3 +1,12 @@ +2017-06-05 Keith Marshall <kei...@us...> + + Automatically correct obsolete _XOPEN_SOURCE usage. + + * include/_mingw.h.in (__paste, __valueless): New macros; define them. + (_XOPEN_SOURCE) [defined with no value]: Use them to attempt to deduce + this obsolete usage; if detected, redefine it with a default assigned + value of one, emulating -D_XOPEN_SOURCE command line definition. + 2017-05-24 Keith Marshall <kei...@us...> Fix snprintf()/vsnprintf() -Wformat vs. multiple definition issue. diff --git a/mingwrt/include/_mingw.h.in b/mingwrt/include/_mingw.h.in index 5e54a22..1cd2b57 100644 --- a/mingwrt/include/_mingw.h.in +++ b/mingwrt/include/_mingw.h.in @@ -401,6 +401,31 @@ allow GCC to optimize away some EH unwind code, at least in DW2 case. */ # endif #endif +/* Some applications may define _XOPEN_SOURCE, without assigning any + * value to it. Such usage may have been permitted in early SUS, but + * it became obsolete as of SUSv2. Attempt to detect obsolete usage, + * as it makes an effective evaluation of any _XOPEN_SOURCE version + * dependency difficult, (without the use of ugly kludges at EVERY + * point of reference which attempts a version comparison). + */ +#define __paste(prefix,suffix) prefix ## suffix +#define __valueless(token) ((token - 0) == 0) && (__paste(token,10) == 10) + +#if defined _XOPEN_SOURCE && __valueless(_XOPEN_SOURCE) +/* _XOPEN_SOURCE appears to have been defined without its mandatory + * value; diagnose this brain-damaged obsolete usage (verbosely)... + */ +#warning "_XOPEN_SOURCE seems to have been improperly defined." +#warning "Mandatory _XOPEN_SOURCE value assignment appears to be missing." +#warning "Redefining _XOPEN_SOURCE to mitigate obsolete misuse." + +/* ...and redefine, emulating implicit behaviour of -D_XOPEN_SOURCE on + * the GCC command line, (which DOES assign an implied value of one). + */ +#undef _XOPEN_SOURCE +#define _XOPEN_SOURCE 1 +#endif + #ifndef _POSIX_C_SOURCE /* Users may define this, either directly or indirectly, to explicitly * enable a particular level of visibility for the subset of those POSIX ----------------------------------------------------------------------- Summary of changes: mingwrt/ChangeLog | 9 +++++++++ mingwrt/include/_mingw.h.in | 25 +++++++++++++++++++++++++ 2 files changed, 34 insertions(+) hooks/post-receive -- Repository: mingw-org-wsl |
From: Keith M. <no...@so...> - 2017-06-04 19:21:33
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Repository: mingw-org-wsl". The branch, 5.0-active has been updated via 1cf415906a7b483690ef3db9793c17da5e01da97 (commit) via 2d5b0afe52103153fb7de68479bfd1c77cc88349 (commit) from 5a6bfce3a0c3bc1fd523f57ed2f199dd8e1ba9ba (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/1cf415906a7b483690ef3db9793c17da5e01da97/ commit 1cf415906a7b483690ef3db9793c17da5e01da97 Author: Keith Marshall <kei...@us...> Date: Sun Jun 4 18:51:20 2017 +0100 Consolidate <wingdi.h> version specific conditionals. diff --git a/w32api/ChangeLog b/w32api/ChangeLog index 746b174..dac6a9f 100644 --- a/w32api/ChangeLog +++ b/w32api/ChangeLog @@ -1,3 +1,15 @@ +2017-06-04 Keith Marshall <kei...@us...> + + Consolidate <wingdi.h> version specific conditionals. + + * include/wingdi.h: Reorganize file content; group manifest constant + definitions into a single nested collection of conditional blocks, for + those definitions which are common to both Win9x and WinNT, with one + block per Windows version evolution, sorting alphabetically within + each block; do likewise for additional manifest constant definitions + which are specific to WinNT, and also for data type definitions and + function prototypes. + 2017-06-03 Keith Marshall <kei...@us...> Tidy, and make <wingdi.h> header effectively self-contained. diff --git a/w32api/include/wingdi.h b/w32api/include/wingdi.h index 5d34af6..13043b2 100644 --- a/w32api/include/wingdi.h +++ b/w32api/include/wingdi.h @@ -201,11 +201,6 @@ typedef BYTE BCHAR; #define ENHMETA_SIGNATURE 1179469088 #define EPS_SIGNATURE 0x46535045 -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K -#define FR_PRIVATE 0x10 -#define FR_NOT_ENUM 0x20 -#endif /* WINNT >= Win2K */ - #define META_SETBKCOLOR 0x201 #define META_SETBKMODE 0x102 #define META_SETMAPMODE 0x103 @@ -413,10 +408,6 @@ typedef BYTE BCHAR; #define NONANTIALIASED_QUALITY 3 #define ANTIALIASED_QUALITY 4 -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K -#define CLEARTYPE_QUALITY 5 -#endif /* WINNT >= Win2K */ - #define DEFAULT_PITCH 0 #define FIXED_PITCH 1 #define VARIABLE_PITCH 2 @@ -607,24 +598,6 @@ typedef BYTE BCHAR; #define DC_MANUFACTURER 23 #define DC_MODEL 24 -#if WINVER >= _WIN32_WINNT_WIN2K -#define DC_PERSONALITY 25 -#define DC_PRINTRATE 26 -#define DC_PRINTRATEUNIT 27 -#define DC_PRINTERMEM 28 -#define DC_MEDIAREADY 29 -#define DC_STAPLE 30 -#define DC_PRINTRATEPPM 31 -#define DC_COLORDEVICE 32 -#define DC_NUP 33 - -#if WINVER >= _WIN32_WINNT_WINXP -#define DC_MEDIATYPENAMES 34 -#define DC_MEDIATYPES 35 - -#endif /* WINVER >= WinXP */ -#endif /* WINVER >= Win2K */ - #define DCBA_FACEUPNONE 0 #define DCBA_FACEUPCENTER 1 #define DCBA_FACEUPLEFT 2 @@ -642,15 +615,6 @@ typedef BYTE BCHAR; #define ETO_NUMERICSLOCAL 0x0400 #define ETO_RTLREADING 0x0080 -#if _WIN32_WINNT >= _WIN32_WINNT_NT4 -#define ETO_IGNORELANGUAGE 0x1000 - -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K -#define ETO_PDY 0x2000 - -#endif /* WINNT >= Win2K */ -#endif /* WINNT >= WinNT4 */ - #define GDICOMMENT_WINDOWS_METAFILE (-2147483647) #define GDICOMMENT_BEGINGROUP 2 #define GDICOMMENT_ENDGROUP 3 @@ -734,21 +698,6 @@ typedef BYTE BCHAR; #define DESKTOPVERTRES 117 #define BLTALIGNMENT 119 -#if WINVER >= _WIN32_WINNT_WIN2K -#define SHADEBLENDCAPS 120 -#define SB_NONE 0x00 -#define SB_CONST_ALPHA 0x01 -#define SB_PIXEL_ALPHA 0x02 -#define SB_PREMULT_ALPHA 0x04 -#define SB_GRAD_RECT 0x10 -#define SB_GRAD_TRI 0x20 -#define COLORMGMTCAPS 121 -#define CM_NONE 0x00 -#define CM_DEVICE_ICM 0x01 -#define CM_GAMMA_RAMP 0x02 -#define CM_CMYK_COLOR 0x04 -#endif /* WINVER >= Win2K */ - #define RASTERCAPS 38 #define RC_BANDING 2 #define RC_BITBLT 1 @@ -857,10 +806,6 @@ typedef BYTE BCHAR; #define GGO_GRAY8_BITMAP 6 #define GGO_GLYPH_INDEX 128 -#if WINVER >= _WIN32_WINNT_WIN2K -#define GGO_UNHINTED 256 -#endif /* WINVER >= Win2K */ - #define GM_COMPATIBLE 1 #define GM_ADVANCED 2 #define MM_ANISOTROPIC 8 @@ -905,11 +850,6 @@ typedef BYTE BCHAR; #define SYSTEM_FIXED_FONT 16 #define DEFAULT_PALETTE 15 -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K -#define DC_BRUSH 18 -#define DC_PEN 19 -#endif /* WINNT >= Win2K */ - #define SYSPAL_ERROR 0 #define SYSPAL_STATIC 1 #define SYSPAL_NOSTATIC 2 @@ -1126,64 +1066,6 @@ typedef BYTE BCHAR; #define DMPAPER_A3_TRANSVERSE 67 #define DMPAPER_A3_EXTRA_TRANSVERSE 68 -#if WINVER >= _WIN32_WINNT_WIN2K -#define DMPAPER_DBL_JAPANESE_POSTCARD 69 -#define DMPAPER_A6 70 -#define DMPAPER_JENV_KAKU2 71 -#define DMPAPER_JENV_KAKU3 72 -#define DMPAPER_JENV_CHOU3 73 -#define DMPAPER_JENV_CHOU4 74 -#define DMPAPER_LETTER_ROTATED 75 -#define DMPAPER_A3_ROTATED 76 -#define DMPAPER_A4_ROTATED 77 -#define DMPAPER_A5_ROTATED 78 -#define DMPAPER_B4_JIS_ROTATED 79 -#define DMPAPER_B5_JIS_ROTATED 80 -#define DMPAPER_JAPANESE_POSTCARD_ROTATED 81 -#define DMPAPER_DBL_JAPANESE_POSTCARD_ROTATED 82 -#define DMPAPER_A6_ROTATED 83 -#define DMPAPER_JENV_KAKU2_ROTATED 84 -#define DMPAPER_JENV_KAKU3_ROTATED 85 -#define DMPAPER_JENV_CHOU3_ROTATED 86 -#define DMPAPER_JENV_CHOU4_ROTATED 87 -#define DMPAPER_B6_JIS 88 -#define DMPAPER_B6_JIS_ROTATED 89 -#define DMPAPER_12X11 90 -#define DMPAPER_JENV_YOU4 91 -#define DMPAPER_JENV_YOU4_ROTATED 92 -#define DMPAPER_P16K 93 -#define DMPAPER_P32K 94 -#define DMPAPER_P32KBIG 95 -#define DMPAPER_PENV_1 96 -#define DMPAPER_PENV_2 97 -#define DMPAPER_PENV_3 98 -#define DMPAPER_PENV_4 99 -#define DMPAPER_PENV_5 100 -#define DMPAPER_PENV_6 101 -#define DMPAPER_PENV_7 102 -#define DMPAPER_PENV_8 103 -#define DMPAPER_PENV_9 104 -#define DMPAPER_PENV_10 105 -#define DMPAPER_P16K_ROTATED 106 -#define DMPAPER_P32K_ROTATED 107 -#define DMPAPER_P32KBIG_ROTATED 108 -#define DMPAPER_PENV_1_ROTATED 109 -#define DMPAPER_PENV_2_ROTATED 110 -#define DMPAPER_PENV_3_ROTATED 111 -#define DMPAPER_PENV_4_ROTATED 112 -#define DMPAPER_PENV_5_ROTATED 113 -#define DMPAPER_PENV_6_ROTATED 114 -#define DMPAPER_PENV_7_ROTATED 115 -#define DMPAPER_PENV_8_ROTATED 116 -#define DMPAPER_PENV_9_ROTATED 117 -#define DMPAPER_PENV_10_ROTATED 118 -#define DMPAPER_LAST 118 - -#else /* WINVER < Win2K */ -#define DMPAPER_LAST 68 - -#endif /* WINVER < Win2K */ - #define DMPAPER_USER 256 #define DMBIN_FIRST 1 #define DMBIN_UPPER 1 @@ -1254,24 +1136,6 @@ typedef BYTE BCHAR; #define DM_MEDIATYPE 0x02000000 #define DM_DITHERTYPE 0x04000000 -#if WINVER >= _WIN32_WINNT_WIN2K -#define DM_PANNINGWIDTH 0x08000000 -#define DM_PANNINGHEIGHT 0x10000000 - -#if WINVER >= _WIN32_WINNT_WINXP -#define DM_DISPLAYFIXEDOUTPUT 0x20000000 -#define DM_DISPLAYORIENTATION 0x00000080 -#define DMDO_DEFAULT 0x00000000 -#define DMDO_90 0x00000001 -#define DMDO_180 0x00000002 -#define DMDO_270 0x00000003 -#define DMDFO_DEFAULT 0x00000000 -#define DMDFO_STRETCH 0x00000001 -#define DMDFO_CENTER 0x00000002 - -#endif /* WINVER >= WinXP */ -#endif /* WINVER >= Win2K */ - #define DMICMMETHOD_NONE 1 #define DMICMMETHOD_SYSTEM 2 #define DMICMMETHOD_DRIVER 3 @@ -1365,7 +1229,15 @@ typedef BYTE BCHAR; #define LAYOUT_RTL 1 #define LAYOUT_BITMAPORIENTATIONPRESERVED 8 -# if WINVER >= _WIN32_WINNT_NT4 /* also _WIN32_WINDOWS_95 */ +#define DISPLAY_DEVICE_ATTACHED_TO_DESKTOP 0x00000001 +#define DISPLAY_DEVICE_MULTI_DRIVER 0x00000002 +#define DISPLAY_DEVICE_PRIMARY_DEVICE 0x00000004 +#define DISPLAY_DEVICE_MIRRORING_DRIVER 0x00000008 +#define DISPLAY_DEVICE_VGA_COMPATIBLE 0x00000010 +#define DISPLAY_DEVICE_REMOVABLE 0x00000020 +#define DISPLAY_DEVICE_MODESPRUNED 0x08000000 + +#if WINVER >= _WIN32_WINNT_NT4 /* also _WIN32_WINDOWS_95 */ #define CS_ENABLE 0x00000001 #define CS_DISABLE 0x00000002 #define CS_DELETE_TRANSFORM 0x00000003 @@ -1379,18 +1251,117 @@ typedef BYTE BCHAR; #define CREATECOLORSPACE_EMBEDED 0x00000001 #define SETICMPROFILE_EMBEDED 0x00000001 +#define DC_PERSONALITY 25 +#define DC_PRINTRATE 26 +#define DC_PRINTRATEUNIT 27 +#define DC_PRINTERMEM 28 +#define DC_MEDIAREADY 29 +#define DC_STAPLE 30 +#define DC_PRINTRATEPPM 31 +#define DC_COLORDEVICE 32 +#define DC_NUP 33 + +#define SHADEBLENDCAPS 120 +#define SB_NONE 0x00 +#define SB_CONST_ALPHA 0x01 +#define SB_PIXEL_ALPHA 0x02 +#define SB_PREMULT_ALPHA 0x04 +#define SB_GRAD_RECT 0x10 +#define SB_GRAD_TRI 0x20 +#define COLORMGMTCAPS 121 +#define CM_NONE 0x00 +#define CM_DEVICE_ICM 0x01 +#define CM_GAMMA_RAMP 0x02 +#define CM_CMYK_COLOR 0x04 + +#define GGO_UNHINTED 256 + +#define DMPAPER_DBL_JAPANESE_POSTCARD 69 +#define DMPAPER_A6 70 +#define DMPAPER_JENV_KAKU2 71 +#define DMPAPER_JENV_KAKU3 72 +#define DMPAPER_JENV_CHOU3 73 +#define DMPAPER_JENV_CHOU4 74 +#define DMPAPER_LETTER_ROTATED 75 +#define DMPAPER_A3_ROTATED 76 +#define DMPAPER_A4_ROTATED 77 +#define DMPAPER_A5_ROTATED 78 +#define DMPAPER_B4_JIS_ROTATED 79 +#define DMPAPER_B5_JIS_ROTATED 80 +#define DMPAPER_JAPANESE_POSTCARD_ROTATED 81 +#define DMPAPER_DBL_JAPANESE_POSTCARD_ROTATED 82 +#define DMPAPER_A6_ROTATED 83 +#define DMPAPER_JENV_KAKU2_ROTATED 84 +#define DMPAPER_JENV_KAKU3_ROTATED 85 +#define DMPAPER_JENV_CHOU3_ROTATED 86 +#define DMPAPER_JENV_CHOU4_ROTATED 87 +#define DMPAPER_B6_JIS 88 +#define DMPAPER_B6_JIS_ROTATED 89 +#define DMPAPER_12X11 90 +#define DMPAPER_JENV_YOU4 91 +#define DMPAPER_JENV_YOU4_ROTATED 92 +#define DMPAPER_P16K 93 +#define DMPAPER_P32K 94 +#define DMPAPER_P32KBIG 95 +#define DMPAPER_PENV_1 96 +#define DMPAPER_PENV_2 97 +#define DMPAPER_PENV_3 98 +#define DMPAPER_PENV_4 99 +#define DMPAPER_PENV_5 100 +#define DMPAPER_PENV_6 101 +#define DMPAPER_PENV_7 102 +#define DMPAPER_PENV_8 103 +#define DMPAPER_PENV_9 104 +#define DMPAPER_PENV_10 105 +#define DMPAPER_P16K_ROTATED 106 +#define DMPAPER_P32K_ROTATED 107 +#define DMPAPER_P32KBIG_ROTATED 108 +#define DMPAPER_PENV_1_ROTATED 109 +#define DMPAPER_PENV_2_ROTATED 110 +#define DMPAPER_PENV_3_ROTATED 111 +#define DMPAPER_PENV_4_ROTATED 112 +#define DMPAPER_PENV_5_ROTATED 113 +#define DMPAPER_PENV_6_ROTATED 114 +#define DMPAPER_PENV_7_ROTATED 115 +#define DMPAPER_PENV_8_ROTATED 116 +#define DMPAPER_PENV_9_ROTATED 117 +#define DMPAPER_PENV_10_ROTATED 118 +#define DMPAPER_LAST 118 + +#define DM_PANNINGWIDTH 0x08000000 +#define DM_PANNINGHEIGHT 0x10000000 + +#if WINVER >= _WIN32_WINNT_WINXP +#define DC_MEDIATYPENAMES 34 +#define DC_MEDIATYPES 35 + +#define DM_DISPLAYFIXEDOUTPUT 0x20000000 +#define DM_DISPLAYORIENTATION 0x00000080 +#define DMDO_DEFAULT 0x00000000 +#define DMDO_90 0x00000001 +#define DMDO_180 0x00000002 +#define DMDO_270 0x00000003 +#define DMDFO_DEFAULT 0x00000000 +#define DMDFO_STRETCH 0x00000001 +#define DMDFO_CENTER 0x00000002 + +#endif /* WINVER >= WinXP */ #endif /* WINVER >= Win2K */ #endif /* WINVER >= Win95/WinNT4 */ -#define DISPLAY_DEVICE_ATTACHED_TO_DESKTOP 0x00000001 -#define DISPLAY_DEVICE_MULTI_DRIVER 0x00000002 -#define DISPLAY_DEVICE_PRIMARY_DEVICE 0x00000004 -#define DISPLAY_DEVICE_MIRRORING_DRIVER 0x00000008 -#define DISPLAY_DEVICE_VGA_COMPATIBLE 0x00000010 -#define DISPLAY_DEVICE_REMOVABLE 0x00000020 -#define DISPLAY_DEVICE_MODESPRUNED 0x08000000 +#if WINVER < _WIN32_WINNT_WIN2K +#define DMPAPER_LAST 68 +#endif /* WINVER < Win2K */ + +#if _WIN32_WINNT >= _WIN32_WINNT_NT4 +#define ETO_IGNORELANGUAGE 0x1000 #if _WIN32_WINNT >= _WIN32_WINNT_WIN2K +#define ETO_PDY 0x2000 + +#define DC_BRUSH 18 +#define DC_PEN 19 + #define NTM_NONNEGATIVE_AC 0x00010000 #define NTM_PS_OPENTYPE 0x00020000 #define NTM_TT_OPENTYPE 0x00040000 @@ -1399,7 +1370,13 @@ typedef BYTE BCHAR; #define NTM_DSIG 0x00200000 #define GGI_MARK_NONEXISTING_GLYPHS 1 + +#define FR_PRIVATE 0x10 +#define FR_NOT_ENUM 0x20 + +#define CLEARTYPE_QUALITY 5 #endif /* WINNT >= Win2K */ +#endif /* WINNT >= WinNT4 */ #ifndef RC_INVOKED typedef struct _ABC @@ -2549,21 +2526,6 @@ typedef struct _GLYPHMETRICS short gmCellIncY; } GLYPHMETRICS, *LPGLYPHMETRICS; -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K -typedef struct tagWCRANGE -{ WCHAR wcLow; - USHORT cGlyphs; -} WCRANGE, *PWCRANGE, *LPWCRANGE; - -typedef struct tagGLYPHSET -{ DWORD cbThis; - DWORD flAccel; - DWORD cGlyphsSupported; - DWORD cRanges; - WCRANGE ranges[1]; -} GLYPHSET, *PGLYPHSET, *LPGLYPHSET; -#endif /* WINNT >= Win2K */ - typedef struct tagKERNINGPAIR { WORD wFirst; WORD wSecond; @@ -2908,20 +2870,6 @@ typedef struct _DESIGNVECTOR LONG dvValues[MM_MAX_NUMAXES]; } DESIGNVECTOR, *PDESIGNVECTOR, FAR *LPDESIGNVECTOR; -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K -typedef struct tagENUMLOGFONTEXDVA -{ ENUMLOGFONTEXA elfEnumLogfontEx; - DESIGNVECTOR elfDesignVector; -} ENUMLOGFONTEXDVA, *PENUMLOGFONTEXDVA, *LPENUMLOGFONTEXDVA; - -typedef struct tagENUMLOGFONTEXDVW -{ ENUMLOGFONTEXW elfEnumLogfontEx; - DESIGNVECTOR elfDesignVector; -} ENUMLOGFONTEXDVW, *PENUMLOGFONTEXDVW, *LPENUMLOGFONTEXDVW; - -typedef __AW_ALIAS__(ENUMLOGFONTEXDV), *PENUMLOGFONTEXDV, *LPENUMLOGFONTEXDV; -#endif /* WINNT >= Win2K */ - typedef USHORT COLOR16; typedef struct _TRIVERTEX @@ -3022,14 +2970,6 @@ WINGDIAPI BOOL WINAPI AbortPath (HDC); WINGDIAPI int WINAPI AddFontResourceA (LPCSTR); WINGDIAPI int WINAPI AddFontResourceW (LPCWSTR); -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K -WINGDIAPI HANDLE WINAPI AddFontMemResourceEx (PVOID, DWORD, PVOID, DWORD *); - -#define AddFontResourceEx __AW_SUFFIXED__(AddFontResourceEx) -WINGDIAPI int WINAPI AddFontResourceExA (LPCSTR, DWORD, PVOID); -WINGDIAPI int WINAPI AddFontResourceExW (LPCWSTR, DWORD, PVOID); -#endif /* WINNT >= Win2K */ - WINGDIAPI BOOL WINAPI AngleArc (HDC, int, int, DWORD, FLOAT, FLOAT); WINGDIAPI BOOL WINAPI AnimatePalette @@ -3265,11 +3205,6 @@ WINGDIAPI HGDIOBJ WINAPI GetCurrentObject (HDC, UINT); WINGDIAPI BOOL WINAPI GetCurrentPositionEx (HDC, LPPOINT); WINGDIAPI HCURSOR WINAPI GetCursor (void); -#if WINVER >= _WIN32_WINNT_WIN2K -WINGDIAPI COLORREF WINAPI GetDCBrushColor (HDC); -WINGDIAPI COLORREF WINAPI GetDCPenColor (HDC); -#endif /* WINVER >= Win2K */ - WINGDIAPI BOOL WINAPI GetDCOrgEx (HDC, LPPOINT); WINGDIAPI int WINAPI GetDeviceCaps (HDC, int); WINGDIAPI BOOL WINAPI GetDeviceGammaRamp (HDC, PVOID); @@ -3377,12 +3312,6 @@ WINGDIAPI BOOL WINAPI GetTextExtentExPointW WINGDIAPI BOOL WINAPI GetTextExtentPointA (HDC, LPCSTR, int, LPSIZE); WINGDIAPI BOOL WINAPI GetTextExtentPointW (HDC, LPCWSTR, int, LPSIZE); -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K -WINGDIAPI BOOL WINAPI GetTextExtentExPointI -(HDC, LPWORD, int, int, LPINT, LPINT, LPSIZE); - -#endif /* WINNT >= Win2K */ - #define GetTextExtentPoint32 __AW_SUFFIXED__(GetTextExtentPoint32) WINGDIAPI BOOL WINAPI GetTextExtentPoint32A (HDC, LPCSTR, int, LPSIZE); WINGDIAPI BOOL WINAPI GetTextExtentPoint32W (HDC, LPCWSTR, int, LPSIZE); @@ -3460,14 +3389,6 @@ WINGDIAPI BOOL WINAPI RectVisible (HDC, LPCRECT); WINGDIAPI BOOL WINAPI RemoveFontResourceA (LPCSTR); WINGDIAPI BOOL WINAPI RemoveFontResourceW (LPCWSTR); -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K -WINGDIAPI BOOL WINAPI RemoveFontMemResourceEx (HANDLE); - -#define RemoveFontResourceEx __AW_SUFFIXED__(RemoveFontResourceEx) -WINGDIAPI BOOL WINAPI RemoveFontResourceExA (LPCSTR, DWORD, PVOID); -WINGDIAPI BOOL WINAPI RemoveFontResourceExW (LPCWSTR, DWORD, PVOID); -#endif /* WINNT >= Win2K */ - #define ResetDC __AW_SUFFIXED__(ResetDC) WINGDIAPI HDC WINAPI ResetDCA (HDC, const DEVMODEA *); WINGDIAPI HDC WINAPI ResetDCW (HDC, const DEVMODEW *); @@ -3493,11 +3414,6 @@ WINGDIAPI BOOL WINAPI SetBrushOrgEx (HDC, int, int, LPPOINT); WINGDIAPI BOOL WINAPI SetColorAdjustment (HDC, const COLORADJUSTMENT *); WINGDIAPI BOOL WINAPI SetColorSpace (HDC, HCOLORSPACE); -#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K -WINGDIAPI COLORREF WINAPI SetDCBrushColor (HDC, COLORREF); -WINGDIAPI COLORREF WINAPI SetDCPenColor (HDC, COLORREF); -#endif /* WINNT >= Win2K */ - WINGDIAPI BOOL WINAPI SetDeviceGammaRamp (HDC, PVOID); WINGDIAPI UINT WINAPI SetDIBColorTable (HDC, UINT, UINT, const RGBQUAD *); @@ -3623,20 +3539,66 @@ WINGDIAPI BOOL WINAPI GradientFill WINGDIAPI BOOL WINAPI TransparentBlt (HDC, int, int, int, int, HDC, int, int, int, int, UINT); + +#if WINVER >= _WIN32_WINNT_WIN2K +WINGDIAPI DWORD WINAPI GetLayout (HDC); +WINGDIAPI DWORD WINAPI SetLayout (HDC, DWORD); + +WINGDIAPI COLORREF WINAPI GetDCBrushColor (HDC); +WINGDIAPI COLORREF WINAPI GetDCPenColor (HDC); +#endif /* WINVER >= Win2K */ #endif /* WINVER >= Win98/Win2K */ #if _WIN32_WINNT >= _WIN32_WINNT_WIN2K +typedef struct tagWCRANGE +{ WCHAR wcLow; + USHORT cGlyphs; +} WCRANGE, *PWCRANGE, *LPWCRANGE; + +typedef struct tagGLYPHSET +{ DWORD cbThis; + DWORD flAccel; + DWORD cGlyphsSupported; + DWORD cRanges; + WCRANGE ranges[1]; +} GLYPHSET, *PGLYPHSET, *LPGLYPHSET; + +typedef struct tagENUMLOGFONTEXDVA +{ ENUMLOGFONTEXA elfEnumLogfontEx; + DESIGNVECTOR elfDesignVector; +} ENUMLOGFONTEXDVA, *PENUMLOGFONTEXDVA, *LPENUMLOGFONTEXDVA; + +typedef struct tagENUMLOGFONTEXDVW +{ ENUMLOGFONTEXW elfEnumLogfontEx; + DESIGNVECTOR elfDesignVector; +} ENUMLOGFONTEXDVW, *PENUMLOGFONTEXDVW, *LPENUMLOGFONTEXDVW; + +typedef __AW_ALIAS__(ENUMLOGFONTEXDV), *PENUMLOGFONTEXDV, *LPENUMLOGFONTEXDV; + +WINGDIAPI HANDLE WINAPI AddFontMemResourceEx (PVOID, DWORD, PVOID, DWORD *); + +#define AddFontResourceEx __AW_SUFFIXED__(AddFontResourceEx) +WINGDIAPI int WINAPI AddFontResourceExA (LPCSTR, DWORD, PVOID); +WINGDIAPI int WINAPI AddFontResourceExW (LPCWSTR, DWORD, PVOID); + +WINGDIAPI BOOL WINAPI GetTextExtentExPointI +(HDC, LPWORD, int, int, LPINT, LPINT, LPSIZE); + +WINGDIAPI BOOL WINAPI RemoveFontMemResourceEx (HANDLE); + +#define RemoveFontResourceEx __AW_SUFFIXED__(RemoveFontResourceEx) +WINGDIAPI BOOL WINAPI RemoveFontResourceExA (LPCSTR, DWORD, PVOID); +WINGDIAPI BOOL WINAPI RemoveFontResourceExW (LPCWSTR, DWORD, PVOID); + +WINGDIAPI COLORREF WINAPI SetDCBrushColor (HDC, COLORREF); +WINGDIAPI COLORREF WINAPI SetDCPenColor (HDC, COLORREF); + WINGDIAPI DWORD WINAPI GetFontUnicodeRanges (HDC, LPGLYPHSET); #define GetGlyphIndices __AW_SUFFIXED__(GetGlyphIndices) WINGDIAPI DWORD WINAPI GetGlyphIndicesA (HDC, LPCSTR, int, LPWORD, DWORD); WINGDIAPI DWORD WINAPI GetGlyphIndicesW (HDC, LPCWSTR, int, LPWORD, DWORD); #endif /* WINNT >= Win2K */ - -#if WINVER >= _WIN32_WINNT_WIN2K -WINGDIAPI DWORD WINAPI GetLayout (HDC); -WINGDIAPI DWORD WINAPI SetLayout (HDC, DWORD); -#endif /* WINNT >= Win2K */ #endif /* ! RC_INVOKED */ _END_C_DECLS https://sf.net/p/mingw/mingw-org-wsl/ci/2d5b0afe52103153fb7de68479bfd1c77cc88349/ commit 2d5b0afe52103153fb7de68479bfd1c77cc88349 Author: Keith Marshall <kei...@us...> Date: Sat Jun 3 20:09:27 2017 +0100 Tidy, and make <wingdi.h> header effectively self-contained. diff --git a/w32api/ChangeLog b/w32api/ChangeLog index bc79c12..746b174 100644 --- a/w32api/ChangeLog +++ b/w32api/ChangeLog @@ -1,3 +1,36 @@ +2017-06-03 Keith Marshall <kei...@us...> + + Tidy, and make <wingdi.h> header effectively self-contained. + + * include/wingdi.h: Tidy layout; assert copyright. + (windef.h): Include it; this achieves self-containment. + [_BEGIN_C_DECLS, _END_C_DECLS]: Use them. + [UNICODE vs. !UNICODE]: Discriminate generic symbol names, using... + (__AW_ALIAS__): ...this, when defining each of... + (DEVMODE, PDEVMODE, LPDEVMODE, DOCINFO, LPDOCINFO, LOGCOLORSPACE) + (LOGFONT, PLOGFONT, LPLOGFONT, EXTLOGFONT, PEXTLOGFONT, LPEXTLOGFONT) + (LPLOGCOLORSPACE, TEXTMETRIC, PTEXTMETRIC, LPTEXTMETRIC, GCP_RESULTS) + (PPOLYTEXT, LPPOLYTEXT, NEWTEXTMETRIC, PNEWTEXTMETRIC, LPNEWTEXTMETRIC) + (LPENUMLOGFONTEX, ENUMLOGFONTEXDV, PENUMLOGFONTEXDV, LPENUMLOGFONTEXDV) + (OUTLINETEXTMETRIC, POUTLINETEXTMETRIC, LPOUTLINETEXTMETRIC, POLYTEXT) + (LPGCP_RESULTS, DISPLAY_DEVICE, PDISPLAY_DEVICE, LPDISPLAY_DEVICE) + (NEWTEXTMETRICEX, ENUMLOGFONT, LPENUMLOGFONT, ENUMLOGFONTEX): ...these. + (__AW_SUFFIXED__): Similarly, use this when declaring each of... + (FONTENUMPROC, ICMENUMPROC, AddFontResource, AddFontResourceEx, + (CopyEnhMetaFile, CopyMetaFile, CreateColorSpace, CreateEnhMetaFile) + (CreateDC, CreateFont, CreateFontIndirect, CreateIC, CreateMetaFile) + (CreateScalableFontResource, DeviceCapabilities, EnumFontFamilies) + (EnumFontFamiliesEx, EnumFonts, EnumICMProfiles, ExtTextOut) + (GetCharABCWidths, GetCharABCWidthsFloat, GetCharacterPlacement) + (GetCharWidth32, GetCharWidth, GetCharWidthFloat, GetEnhMetaFile) + (GetEnhMetaFileDescription, GetGlyphOutline, GetICMProfile) + (GetKerningPairs, GetLogColorSpace, GetMetaFile, GetObject) + (GetOutlineTextMetrics, GetTextExtentExPoint, GetTextExtentPoint) + (GetTextExtentPoint32, GetTextFace, GetTextMetrics, PolyTextOut, + (RemoveFontResource, RemoveFontResourceEx, ResetDC, SetICMProfile) + (StartDoc, TextOut, UpdateICMRegKey, wglUseFontBitmaps) + (wglUseFontOutlines, GetGlyphIndices): ...these. + 2017-05-31 Keith Marshall <kei...@us...> Declare CONDITION_VARIABLE API, per feature request [#2314] diff --git a/w32api/include/wingdi.h b/w32api/include/wingdi.h index 76b2301..5d34af6 100644 --- a/w32api/include/wingdi.h +++ b/w32api/include/wingdi.h @@ -1,3235 +1,3644 @@ +/* + * wingdi.h + * + * Declarations supporting the Windows Graphical Device Interface API. + * + * $Id$ + * + * Written by Anders Norlander <ano...@he...> + * Copyright (C) 1998-2009, 2011, 2012, 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"), + * 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 _WINGDI_H +#pragma GCC system_header #define _WINGDI_H #define _WINGDI_ -#if __GNUC__ >= 3 -#pragma GCC system_header -#endif -#ifdef __cplusplus -extern "C" { -#endif +/* For effective self-containment, <wingdi.h> is dependent on the core set + * of Windows' custom type definitions... + */ +#include <windef.h> + +_BEGIN_C_DECLS #ifndef WINGDIAPI -#ifdef __W32API_USE_DLLIMPORT__ -#define WINGDIAPI DECLSPEC_IMPORT -#else -#define WINGDIAPI -#endif +# ifdef __W32API_USE_DLLIMPORT__ +# define WINGDIAPI DECLSPEC_IMPORT +# else +# define WINGDIAPI +# endif #endif -#define BI_RGB 0 -#define BI_RLE8 1 -#define BI_RLE4 2 -#define BI_BITFIELDS 3 -#define BI_JPEG 4 -#define BI_PNG 5 -#define LF_FACESIZE 32 -#define LF_FULLFACESIZE 64 -#define CA_NEGATIVE 1 -#define CA_LOG_FILTER 2 -#define ILLUMINANT_DEVICE_DEFAULT 0 -#define ILLUMINANT_A 1 -#define ILLUMINANT_B 2 -#define ILLUMINANT_C 3 -#define ILLUMINANT_D50 4 -#define ILLUMINANT_D55 5 -#define ILLUMINANT_D65 6 -#define ILLUMINANT_D75 7 -#define ILLUMINANT_F2 8 -#define ILLUMINANT_MAX_INDEX ILLUMINANT_F2 -#define ILLUMINANT_TUNGSTEN ILLUMINANT_A -#define ILLUMINANT_DAYLIGHT ILLUMINANT_C -#define ILLUMINANT_FLUORESCENT ILLUMINANT_F2 -#define ILLUMINANT_NTSC ILLUMINANT_C -#define RGB_GAMMA_MIN 2500 -#define RGB_GAMMA_MAX 65000 -#define REFERENCE_WHITE_MIN 6000 -#define REFERENCE_WHITE_MAX 10000 -#define REFERENCE_BLACK_MIN 0 -#define REFERENCE_BLACK_MAX 4000 -#define COLOR_ADJ_MIN (-100) -#define COLOR_ADJ_MAX 100 -#define CCHDEVICENAME 32 -#define CCHFORMNAME 32 -#define DI_COMPAT 4 -#define DI_DEFAULTSIZE 8 -#define DI_IMAGE 2 -#define DI_MASK 1 -#define DI_NORMAL 3 -#define DI_APPBANDING 1 -#define EMR_HEADER 1 -#define EMR_POLYBEZIER 2 -#define EMR_POLYGON 3 -#define EMR_POLYLINE 4 -#define EMR_POLYBEZIERTO 5 -#define EMR_POLYLINETO 6 -#define EMR_POLYPOLYLINE 7 -#define EMR_POLYPOLYGON 8 -#define EMR_SETWINDOWEXTEX 9 -#define EMR_SETWINDOWORGEX 10 -#define EMR_SETVIEWPORTEXTEX 11 -#define EMR_SETVIEWPORTORGEX 12 -#define EMR_SETBRUSHORGEX 13 -#define EMR_EOF 14 -#define EMR_SETPIXELV 15 -#define EMR_SETMAPPERFLAGS 16 -#define EMR_SETMAPMODE 17 -#define EMR_SETBKMODE 18 -#define EMR_SETPOLYFILLMODE 19 -#define EMR_SETROP2 20 -#define EMR_SETSTRETCHBLTMODE 21 -#define EMR_SETTEXTALIGN 22 -#define EMR_SETCOLORADJUSTMENT 23 -#define EMR_SETTEXTCOLOR 24 -#define EMR_SETBKCOLOR 25 -#define EMR_OFFSETCLIPRGN 26 -#define EMR_MOVETOEX 27 -#define EMR_SETMETARGN 28 -#define EMR_EXCLUDECLIPRECT 29 -#define EMR_INTERSECTCLIPRECT 30 -#define EMR_SCALEVIEWPORTEXTEX 31 -#define EMR_SCALEWINDOWEXTEX 32 -#define EMR_SAVEDC 33 -#define EMR_RESTOREDC 34 -#define EMR_SETWORLDTRANSFORM 35 -#define EMR_MODIFYWORLDTRANSFORM 36 -#define EMR_SELECTOBJECT 37 -#define EMR_CREATEPEN 38 -#define EMR_CREATEBRUSHINDIRECT 39 -#define EMR_DELETEOBJECT 40 -#define EMR_ANGLEARC 41 -#define EMR_ELLIPSE 42 -#define EMR_RECTANGLE 43 -#define EMR_ROUNDRECT 44 -#define EMR_ARC 45 -#define EMR_CHORD 46 -#define EMR_PIE 47 -#define EMR_SELECTPALETTE 48 -#define EMR_CREATEPALETTE 49 -#define EMR_SETPALETTEENTRIES 50 -#define EMR_RESIZEPALETTE 51 -#define EMR_REALIZEPALETTE 52 -#define EMR_EXTFLOODFILL 53 -#define EMR_LINETO 54 -#define EMR_ARCTO 55 -#define EMR_POLYDRAW 56 -#define EMR_SETARCDIRECTION 57 -#define EMR_SETMITERLIMIT 58 -#define EMR_BEGINPATH 59 -#define EMR_ENDPATH 60 -#define EMR_CLOSEFIGURE 61 -#define EMR_FILLPATH 62 -#define EMR_STROKEANDFILLPATH 63 -#define EMR_STROKEPATH 64 -#define EMR_FLATTENPATH 65 -#define EMR_WIDENPATH 66 -#define EMR_SELECTCLIPPATH 67 -#define EMR_ABORTPATH 68 -#define EMR_GDICOMMENT 70 -#define EMR_FILLRGN 71 -#define EMR_FRAMERGN 72 -#define EMR_INVERTRGN 73 -#define EMR_PAINTRGN 74 -#define EMR_EXTSELECTCLIPRGN 75 -#define EMR_BITBLT 76 -#define EMR_STRETCHBLT 77 -#define EMR_MASKBLT 78 -#define EMR_PLGBLT 79 -#define EMR_SETDIBITSTODEVICE 80 -#define EMR_STRETCHDIBITS 81 -#define EMR_EXTCREATEFONTINDIRECTW 82 -#define EMR_EXTTEXTOUTA 83 -#define EMR_EXTTEXTOUTW 84 -#define EMR_POLYBEZIER16 85 -#define EMR_POLYGON16 86 -#define EMR_POLYLINE16 87 -#define EMR_POLYBEZIERTO16 88 -#define EMR_POLYLINETO16 89 -#define EMR_POLYPOLYLINE16 90 -#define EMR_POLYPOLYGON16 91 -#define EMR_POLYDRAW16 92 -#define EMR_CREATEMONOBRUSH 93 -#define EMR_CREATEDIBPATTERNBRUSHPT 94 -#define EMR_EXTCREATEPEN 95 -#define EMR_POLYTEXTOUTA 96 -#define EMR_POLYTEXTOUTW 97 -#define EMR_SETICMMODE 98 -#define EMR_CREATECOLORSPACE 99 -#define EMR_SETCOLORSPACE 100 -#define EMR_DELETECOLORSPACE 101 -#define EMR_GLSRECORD 102 -#define EMR_GLSBOUNDEDRECORD 103 -#define EMR_PIXELFORMAT 104 -#define ENHMETA_SIGNATURE 1179469088 -#define EPS_SIGNATURE 0x46535045 -#if (_WIN32_WINNT >= 0x0500) -#define FR_PRIVATE 0x10 -#define FR_NOT_ENUM 0x20 -#endif -#define META_SETBKCOLOR 0x201 -#define META_SETBKMODE 0x102 -#define META_SETMAPMODE 0x103 -#define META_SETROP2 0x104 -#define META_SETRELABS 0x105 -#define META_SETPOLYFILLMODE 0x106 -#define META_SETSTRETCHBLTMODE 0x107 -#define META_SETTEXTCHAREXTRA 0x108 -#define META_SETTEXTCOLOR 0x209 -#define META_SETTEXTJUSTIFICATION 0x20A -#define META_SETWINDOWORG 0x20B -#define META_SETWINDOWEXT 0x20C -#define META_SETVIEWPORTORG 0x20D -#define META_SETVIEWPORTEXT 0x20E -#define META_OFFSETWINDOWORG 0x20F -#define META_SCALEWINDOWEXT 0x410 -#define META_OFFSETVIEWPORTORG 0x211 -#define META_SCALEVIEWPORTEXT 0x412 -#define META_LINETO 0x213 -#define META_MOVETO 0x214 -#define META_EXCLUDECLIPRECT 0x415 -#define META_INTERSECTCLIPRECT 0x416 -#define META_ARC 0x817 -#define META_ELLIPSE 0x418 -#define META_FLOODFILL 0x419 -#define META_PIE 0x81A -#define META_RECTANGLE 0x41B -#define META_ROUNDRECT 0x61C -#define META_PATBLT 0x61D -#define META_SAVEDC 0x1E -#define META_SETPIXEL 0x41F -#define META_OFFSETCLIPRGN 0x220 -#define META_TEXTOUT 0x521 -#define META_BITBLT 0x922 -#define META_STRETCHBLT 0xB23 -#define META_POLYGON 0x324 -#define META_POLYLINE 0x325 -#define META_ESCAPE 0x626 -#define META_RESTOREDC 0x127 -#define META_FILLREGION 0x228 -#define META_FRAMEREGION 0x429 -#define META_INVERTREGION 0x12A -#define META_PAINTREGION 0x12B -#define META_SELECTCLIPREGION 0x12C -#define META_SELECTOBJECT 0x12D -#define META_SETTEXTALIGN 0x12E -#define META_CHORD 0x830 -#define META_SETMAPPERFLAGS 0x231 -#define META_EXTTEXTOUT 0xa32 -#define META_SETDIBTODEV 0xd33 -#define META_SELECTPALETTE 0x234 -#define META_REALIZEPALETTE 0x35 -#define META_ANIMATEPALETTE 0x436 -#define META_SETPALENTRIES 0x37 -#define META_POLYPOLYGON 0x538 -#define META_RESIZEPALETTE 0x139 -#define META_DIBBITBLT 0x940 -#define META_DIBSTRETCHBLT 0xb41 -#define META_DIBCREATEPATTERNBRUSH 0x142 -#define META_STRETCHDIB 0xf43 -#define META_EXTFLOODFILL 0x548 -#define META_DELETEOBJECT 0x1f0 -#define META_CREATEPALETTE 0xf7 -#define META_CREATEPATTERNBRUSH 0x1F9 -#define META_CREATEPENINDIRECT 0x2FA -#define META_CREATEFONTINDIRECT 0x2FB -#define META_CREATEBRUSHINDIRECT 0x2FC -#define META_CREATEREGION 0x6FF -#define PT_MOVETO 6 -#define PT_LINETO 2 -#define PT_BEZIERTO 4 -#define PT_CLOSEFIGURE 1 -#define ELF_VENDOR_SIZE 4 -#define ELF_VERSION 0 -#define ELF_CULTURE_LATIN 0 -#define PFD_TYPE_RGBA 0 -#define PFD_TYPE_COLORINDEX 1 -#define PFD_MAIN_PLANE 0 -#define PFD_OVERLAY_PLANE 1 -#define PFD_UNDERLAY_PLANE (-1) -#define PFD_DOUBLEBUFFER 1 -#define PFD_STEREO 2 -#define PFD_DRAW_TO_WINDOW 4 -#define PFD_DRAW_TO_BITMAP 8 -#define PFD_SUPPORT_GDI 16 -#define PFD_SUPPORT_OPENGL 32 -#define PFD_GENERIC_FORMAT 64 -#define PFD_NEED_PALETTE 128 -#define PFD_NEED_SYSTEM_PALETTE 0x00000100 -#define PFD_SWAP_EXCHANGE 0x00000200 -#define PFD_SWAP_COPY 0x00000400 -#define PFD_SWAP_LAYER_BUFFERS 0x00000800 -#define PFD_GENERIC_ACCELERATED 0x00001000 -#define PFD_DEPTH_DONTCARE 0x20000000 -#define PFD_DOUBLEBUFFER_DONTCARE 0x40000000 -#define PFD_STEREO_DONTCARE 0x80000000 -#define SP_ERROR (-1) -#define SP_OUTOFDISK (-4) -#define SP_OUTOFMEMORY (-5) -#define SP_USERABORT (-3) -#define SP_APPABORT (-2) -#define BLACKNESS 0x00000042 -#define NOTSRCERASE 0x001100A6 -#define NOTSRCCOPY 0x00330008 -#define SRCERASE 0x00440328 -#define DSTINVERT 0x00550009 -#define PATINVERT 0x005A0049 -#define SRCINVERT 0x00660046 -#define SRCAND 0x008800C6 -#define MERGEPAINT 0x00BB0226 -#define MERGECOPY 0x00C000CA -#define SRCCOPY 0x00CC0020 -#define SRCPAINT 0x00EE0086 -#define PATCOPY 0x00F00021 -#define PATPAINT 0x00FB0A09 -#define WHITENESS 0x00FF0062 -#define CAPTUREBLT 0x40000000 -#define NOMIRRORBITMAP 0x80000000 -#define R2_BLACK 1 -#define R2_COPYPEN 13 -#define R2_MASKNOTPEN 3 -#define R2_MASKPEN 9 -#define R2_MASKPENNOT 5 -#define R2_MERGENOTPEN 12 -#define R2_MERGEPEN 15 -#define R2_MERGEPENNOT 14 -#define R2_NOP 11 -#define R2_NOT 6 -#define R2_NOTCOPYPEN 4 -#define R2_NOTMASKPEN 8 -#define R2_NOTMERGEPEN 2 -#define R2_NOTXORPEN 10 -#define R2_WHITE 16 -#define R2_XORPEN 7 -#define CM_OUT_OF_GAMUT 255 -#define CM_IN_GAMUT 0 -#define RGN_AND 1 -#define RGN_COPY 5 -#define RGN_DIFF 4 -#define RGN_OR 2 -#define RGN_XOR 3 -#define NULLREGION 1 -#define SIMPLEREGION 2 -#define COMPLEXREGION 3 -#define ERROR 0 -#define CBM_INIT 4 -#define DIB_PAL_COLORS 1 -#define DIB_RGB_COLORS 0 -#define FW_DONTCARE 0 -#define FW_THIN 100 -#define FW_EXTRALIGHT 200 -#define FW_ULTRALIGHT FW_EXTRALIGHT -#define FW_LIGHT 300 -#define FW_NORMAL 400 -#define FW_REGULAR 400 -#define FW_MEDIUM 500 -#define FW_SEMIBOLD 600 -#define FW_DEMIBOLD FW_SEMIBOLD -#define FW_BOLD 700 -#define FW_EXTRABOLD 800 -#define FW_ULTRABOLD FW_EXTRABOLD -#define FW_HEAVY 900 -#define FW_BLACK FW_HEAVY -#define ANSI_CHARSET 0 -#define DEFAULT_CHARSET 1 -#define SYMBOL_CHARSET 2 -#define SHIFTJIS_CHARSET 128 -#define HANGEUL_CHARSET 129 -#define HANGUL_CHARSET 129 -#define GB2312_CHARSET 134 -#define CHINESEBIG5_CHARSET 136 -#define GREEK_CHARSET 161 -#define TURKISH_CHARSET 162 -#define HEBREW_CHARSET 177 -#define ARABIC_CHARSET 178 -#define BALTIC_CHARSET 186 -#define RUSSIAN_CHARSET 204 -#define THAI_CHARSET 222 -#define EASTEUROPE_CHARSET 238 -#define OEM_CHARSET 255 -#define JOHAB_CHARSET 130 -#define VIETNAMESE_CHARSET 163 -#define MAC_CHARSET 77 -#define OUT_DEFAULT_PRECIS 0 -#define OUT_STRING_PRECIS 1 -#define OUT_CHARACTER_PRECIS 2 -#define OUT_STROKE_PRECIS 3 -#define OUT_TT_PRECIS 4 -#define OUT_DEVICE_PRECIS 5 -#define OUT_RASTER_PRECIS 6 -#define OUT_TT_ONLY_PRECIS 7 -#define OUT_OUTLINE_PRECIS 8 +#ifdef UNICODE +typedef WCHAR BCHAR; +#else /* ! UNICODE */ +typedef BYTE BCHAR; +#endif /* ! UNICODE */ + +#define BI_RGB 0 +#define BI_RLE8 1 +#define BI_RLE4 2 +#define BI_BITFIELDS 3 +#define BI_JPEG 4 +#define BI_PNG 5 +#define LF_FACESIZE 32 +#define LF_FULLFACESIZE 64 +#define CA_NEGATIVE 1 +#define CA_LOG_FILTER 2 +#define ILLUMINANT_DEVICE_DEFAULT 0 +#define ILLUMINANT_A 1 +#define ILLUMINANT_B 2 +#define ILLUMINANT_C 3 +#define ILLUMINANT_D50 4 +#define ILLUMINANT_D55 5 +#define ILLUMINANT_D65 6 +#define ILLUMINANT_D75 7 +#define ILLUMINANT_F2 8 +#define ILLUMINANT_MAX_INDEX ILLUMINANT_F2 +#define ILLUMINANT_TUNGSTEN ILLUMINANT_A +#define ILLUMINANT_DAYLIGHT ILLUMINANT_C +#define ILLUMINANT_FLUORESCENT ILLUMINANT_F2 +#define ILLUMINANT_NTSC ILLUMINANT_C +#define RGB_GAMMA_MIN 2500 +#define RGB_GAMMA_MAX 65000 +#define REFERENCE_WHITE_MIN 6000 +#define REFERENCE_WHITE_MAX 10000 +#define REFERENCE_BLACK_MIN 0 +#define REFERENCE_BLACK_MAX 4000 +#define COLOR_ADJ_MIN (-100) +#define COLOR_ADJ_MAX 100 +#define CCHDEVICENAME 32 +#define CCHFORMNAME 32 +#define DI_COMPAT 4 +#define DI_DEFAULTSIZE 8 +#define DI_IMAGE 2 +#define DI_MASK 1 +#define DI_NORMAL 3 +#define DI_APPBANDING 1 +#define EMR_HEADER 1 +#define EMR_POLYBEZIER 2 +#define EMR_POLYGON 3 +#define EMR_POLYLINE 4 +#define EMR_POLYBEZIERTO 5 +#define EMR_POLYLINETO 6 +#define EMR_POLYPOLYLINE 7 +#define EMR_POLYPOLYGON 8 +#define EMR_SETWINDOWEXTEX 9 +#define EMR_SETWINDOWORGEX 10 +#define EMR_SETVIEWPORTEXTEX 11 +#define EMR_SETVIEWPORTORGEX 12 +#define EMR_SETBRUSHORGEX 13 +#define EMR_EOF 14 +#define EMR_SETPIXELV 15 +#define EMR_SETMAPPERFLAGS 16 +#define EMR_SETMAPMODE 17 +#define EMR_SETBKMODE 18 +#define EMR_SETPOLYFILLMODE 19 +#define EMR_SETROP2 20 +#define EMR_SETSTRETCHBLTMODE 21 +#define EMR_SETTEXTALIGN 22 +#define EMR_SETCOLORADJUSTMENT 23 +#define EMR_SETTEXTCOLOR 24 +#define EMR_SETBKCOLOR 25 +#define EMR_OFFSETCLIPRGN 26 +#define EMR_MOVETOEX 27 +#define EMR_SETMETARGN 28 +#define EMR_EXCLUDECLIPRECT 29 +#define EMR_INTERSECTCLIPRECT 30 +#define EMR_SCALEVIEWPORTEXTEX 31 +#define EMR_SCALEWINDOWEXTEX 32 +#define EMR_SAVEDC 33 +#define EMR_RESTOREDC 34 +#define EMR_SETWORLDTRANSFORM 35 +#define EMR_MODIFYWORLDTRANSFORM 36 +#define EMR_SELECTOBJECT 37 +#define EMR_CREATEPEN 38 +#define EMR_CREATEBRUSHINDIRECT 39 +#define EMR_DELETEOBJECT 40 +#define EMR_ANGLEARC 41 +#define EMR_ELLIPSE 42 +#define EMR_RECTANGLE 43 +#define EMR_ROUNDRECT 44 +#define EMR_ARC 45 +#define EMR_CHORD 46 +#define EMR_PIE 47 +#define EMR_SELECTPALETTE 48 +#define EMR_CREATEPALETTE 49 +#define EMR_SETPALETTEENTRIES 50 +#define EMR_RESIZEPALETTE 51 +#define EMR_REALIZEPALETTE 52 +#define EMR_EXTFLOODFILL 53 +#define EMR_LINETO 54 +#define EMR_ARCTO 55 +#define EMR_POLYDRAW 56 +#define EMR_SETARCDIRECTION 57 +#define EMR_SETMITERLIMIT 58 +#define EMR_BEGINPATH 59 +#define EMR_ENDPATH 60 +#define EMR_CLOSEFIGURE 61 +#define EMR_FILLPATH 62 +#define EMR_STROKEANDFILLPATH 63 +#define EMR_STROKEPATH 64 +#define EMR_FLATTENPATH 65 +#define EMR_WIDENPATH 66 +#define EMR_SELECTCLIPPATH 67 +#define EMR_ABORTPATH 68 +#define EMR_GDICOMMENT 70 +#define EMR_FILLRGN 71 +#define EMR_FRAMERGN 72 +#define EMR_INVERTRGN 73 +#define EMR_PAINTRGN 74 +#define EMR_EXTSELECTCLIPRGN 75 +#define EMR_BITBLT 76 +#define EMR_STRETCHBLT 77 +#define EMR_MASKBLT 78 +#define EMR_PLGBLT 79 +#define EMR_SETDIBITSTODEVICE 80 +#define EMR_STRETCHDIBITS 81 +#define EMR_EXTCREATEFONTINDIRECTW 82 +#define EMR_EXTTEXTOUTA 83 +#define EMR_EXTTEXTOUTW 84 +#define EMR_POLYBEZIER16 85 +#define EMR_POLYGON16 86 +#define EMR_POLYLINE16 87 +#define EMR_POLYBEZIERTO16 88 +#define EMR_POLYLINETO16 89 +#define EMR_POLYPOLYLINE16 90 +#define EMR_POLYPOLYGON16 91 +#define EMR_POLYDRAW16 92 +#define EMR_CREATEMONOBRUSH 93 +#define EMR_CREATEDIBPATTERNBRUSHPT 94 +#define EMR_EXTCREATEPEN 95 +#define EMR_POLYTEXTOUTA 96 +#define EMR_POLYTEXTOUTW 97 +#define EMR_SETICMMODE 98 +#define EMR_CREATECOLORSPACE 99 +#define EMR_SETCOLORSPACE 100 +#define EMR_DELETECOLORSPACE 101 +#define EMR_GLSRECORD 102 +#define EMR_GLSBOUNDEDRECORD 103 +#define EMR_PIXELFORMAT 104 +#define ENHMETA_SIGNATURE 1179469088 +#define EPS_SIGNATURE 0x46535045 + +#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K +#define FR_PRIVATE 0x10 +#define FR_NOT_ENUM 0x20 +#endif /* WINNT >= Win2K */ + +#define META_SETBKCOLOR 0x201 +#define META_SETBKMODE 0x102 +#define META_SETMAPMODE 0x103 +#define META_SETROP2 0x104 +#define META_SETRELABS 0x105 +#define META_SETPOLYFILLMODE 0x106 +#define META_SETSTRETCHBLTMODE 0x107 +#define META_SETTEXTCHAREXTRA 0x108 +#define META_SETTEXTCOLOR 0x209 +#define META_SETTEXTJUSTIFICATION 0x20A +#define META_SETWINDOWORG 0x20B +#define META_SETWINDOWEXT 0x20C +#define META_SETVIEWPORTORG 0x20D +#define META_SETVIEWPORTEXT 0x20E +#define META_OFFSETWINDOWORG 0x20F +#define META_SCALEWINDOWEXT 0x410 +#define META_OFFSETVIEWPORTORG 0x211 +#define META_SCALEVIEWPORTEXT 0x412 +#define META_LINETO 0x213 +#define META_MOVETO 0x214 +#define META_EXCLUDECLIPRECT 0x415 +#define META_INTERSECTCLIPRECT 0x416 +#define META_ARC 0x817 +#define META_ELLIPSE 0x418 +#define META_FLOODFILL 0x419 +#define META_PIE 0x81A +#define META_RECTANGLE 0x41B +#define META_ROUNDRECT 0x61C +#define META_PATBLT 0x61D +#define META_SAVEDC 0x1E +#define META_SETPIXEL 0x41F +#define META_OFFSETCLIPRGN 0x220 +#define META_TEXTOUT 0x521 +#define META_BITBLT 0x922 +#define META_STRETCHBLT 0xB23 +#define META_POLYGON 0x324 +#define META_POLYLINE 0x325 +#define META_ESCAPE 0x626 +#define META_RESTOREDC 0x127 +#define META_FILLREGION 0x228 +#define META_FRAMEREGION 0x429 +#define META_INVERTREGION 0x12A +#define META_PAINTREGION 0x12B +#define META_SELECTCLIPREGION 0x12C +#define META_SELECTOBJECT 0x12D +#define META_SETTEXTALIGN 0x12E +#define META_CHORD 0x830 +#define META_SETMAPPERFLAGS 0x231 +#define META_EXTTEXTOUT 0xA32 +#define META_SETDIBTODEV 0xD33 +#define META_SELECTPALETTE 0x234 +#define META_REALIZEPALETTE 0x35 +#define META_ANIMATEPALETTE 0x436 +#define META_SETPALENTRIES 0x37 +#define META_POLYPOLYGON 0x538 +#define META_RESIZEPALETTE 0x139 +#define META_DIBBITBLT 0x940 +#define META_DIBSTRETCHBLT 0xB41 +#define META_DIBCREATEPATTERNBRUSH 0x142 +#define META_STRETCHDIB 0xF43 +#define META_EXTFLOODFILL 0x548 +#define META_DELETEOBJECT 0x1F0 +#define META_CREATEPALETTE 0xF7 +#define META_CREATEPATTERNBRUSH 0x1F9 +#define META_CREATEPENINDIRECT 0x2FA +#define META_CREATEFONTINDIRECT 0x2FB +#define META_CREATEBRUSHINDIRECT 0x2FC +#define META_CREATEREGION 0x6FF +#define PT_MOVETO 6 +#define PT_LINETO 2 +#define PT_BEZIERTO 4 +#define PT_CLOSEFIGURE 1 +#define ELF_VENDOR_SIZE 4 +#define ELF_VERSION 0 +#define ELF_CULTURE_LATIN 0 +#define PFD_TYPE_RGBA 0 +#define PFD_TYPE_COLORINDEX 1 +#define PFD_MAIN_PLANE 0 +#define PFD_OVERLAY_PLANE 1 +#define PFD_UNDERLAY_PLANE (-1) +#define PFD_DOUBLEBUFFER 1 +#define PFD_STEREO 2 +#define PFD_DRAW_TO_WINDOW 4 +#define PFD_DRAW_TO_BITMAP 8 +#define PFD_SUPPORT_GDI 16 +#define PFD_SUPPORT_OPENGL 32 +#define PFD_GENERIC_FORMAT 64 +#define PFD_NEED_PALETTE 128 +#define PFD_NEED_SYSTEM_PALETTE 0x00000100 +#define PFD_SWAP_EXCHANGE 0x00000200 +#define PFD_SWAP_COPY 0x00000400 +#define PFD_SWAP_LAYER_BUFFERS 0x00000800 +#define PFD_GENERIC_ACCELERATED 0x00001000 +#define PFD_DEPTH_DONTCARE 0x20000000 +#define PFD_DOUBLEBUFFER_DONTCARE 0x40000000 +#define PFD_STEREO_DONTCARE 0x80000000 +#define SP_ERROR (-1) +#define SP_OUTOFDISK (-4) +#define SP_OUTOFMEMORY (-5) +#define SP_USERABORT (-3) +#define SP_APPABORT (-2) +#define BLACKNESS 0x00000042 +#define NOTSRCERASE 0x001100A6 +#define NOTSRCCOPY 0x00330008 +#define SRCERASE 0x00440328 +#define DSTINVERT 0x00550009 +#define PATINVERT 0x005A0049 +#define SRCINVERT 0x00660046 +#define SRCAND 0x008800C6 +#define MERGEPAINT 0x00BB0226 +#define MERGECOPY 0x00C000CA +#define SRCCOPY 0x00CC0020 +#define SRCPAINT 0x00EE0086 +#define PATCOPY 0x00F00021 +#define PATPAINT 0x00FB0A09 +#define WHITENESS 0x00FF0062 +#define CAPTUREBLT 0x40000000 +#define NOMIRRORBITMAP 0x80000000 +#define R2_BLACK 1 +#define R2_COPYPEN 13 +#define R2_MASKNOTPEN 3 +#define R2_MASKPEN 9 +#define R2_MASKPENNOT 5 +#define R2_MERGENOTPEN 12 +#define R2_MERGEPEN 15 +#define R2_MERGEPENNOT 14 +#define R2_NOP 11 +#define R2_NOT 6 +#define R2_NOTCOPYPEN 4 +#define R2_NOTMASKPEN 8 +#define R2_NOTMERGEPEN 2 +#define R2_NOTXORPEN 10 +#define R2_WHITE 16 +#define R2_XORPEN 7 +#define CM_OUT_OF_GAMUT 255 +#define CM_IN_GAMUT 0 +#define RGN_AND 1 +#define RGN_COPY 5 +#define RGN_DIFF 4 +#define RGN_OR 2 +#define RGN_XOR 3 +#define NULLREGION 1 +#define SIMPLEREGION 2 +#define COMPLEXREGION 3 +#define ERROR 0 +#define CBM_INIT 4 +#define DIB_PAL_COLORS 1 +#define DIB_RGB_COLORS 0 +#define FW_DONTCARE 0 +#define FW_THIN 100 +#define FW_EXTRALIGHT 200 +#define FW_ULTRALIGHT FW_EXTRALIGHT +#define FW_LIGHT 300 +#define FW_NORMAL 400 +#define FW_REGULAR 400 +#define FW_MEDIUM 500 +#define FW_SEMIBOLD 600 +#define FW_DEMIBOLD FW_SEMIBOLD +#define FW_BOLD 700 +#define FW_EXTRABOLD 800 +#define FW_ULTRABOLD FW_EXTRABOLD +#define FW_HEAVY 900 +#define FW_BLACK FW_HEAVY +#define ANSI_CHARSET 0 +#define DEFAULT_CHARSET 1 +#define SYMBOL_CHARSET 2 +#define SHIFTJIS_CHARSET 128 +#define HANGEUL_CHARSET 129 +#define HANGUL_CHARSET 129 +#define GB2312_CHARSET 134 +#define CHINESEBIG5_CHARSET 136 +#define GREEK_CHARSET 161 +#define TURKISH_CHARSET 162 +#define HEBREW_CHARSET 177 +#define ARABIC_CHARSET 178 +#define BALTIC_CHARSET 186 +#define RUSSIAN_CHARSET 204 +#define THAI_CHARSET 222 +#define EASTEUROPE_CHARSET 238 +#define OEM_CHARSET 255 +#define JOHAB_CHARSET 130 +#define VIETNAMESE_CHARSET 163 +#define MAC_CHARSET 77 +#define OUT_DEFAULT_PRECIS 0 +#define OUT_STRING_PRECIS 1 +#define OUT_CHARACTER_PRECIS 2 +#define OUT_STROKE_PRECIS 3 +#define OUT_TT_PRECIS 4 +#define OUT_DEVICE_PRECIS 5 +#define OUT_RASTER_PRECIS 6 +#define OUT_TT_ONLY_PRECIS 7 +#define OUT_OUTLINE_PRECIS 8 /* http://www.pinvoke.net/default.aspx/Structures/LOGFONT.html */ -#define OUT_PS_ONLY_PRECIS 10 -#define CLIP_DEFAULT_PRECIS 0 -#define CLIP_CHARACTER_PRECIS 1 -#define CLIP_STROKE_PRECIS 2 -#define CLIP_MASK 15 -#define CLIP_LH_ANGLES 16 -#define CLIP_TT_ALWAYS 32 -#define CLIP_EMBEDDED 128 -#define DEFAULT_QUALITY 0 -#define DRAFT_QUALITY 1 -#define PROOF_QUALITY 2 -#define NONANTIALIASED_QUALITY 3 -#define ANTIALIASED_QUALITY 4 -#if _WIN32_WINNT >= 0x0500 -#define CLEARTYPE_QUALITY 5 -#endif -#define DEFAULT_PITCH 0 -#define FIXED_PITCH 1 -#define VARIABLE_PITCH 2 -#define MONO_FONT 8 -#define FF_DECORATIVE 80 -#define FF_DONTCARE 0 -#define FF_MODERN 48 -#define FF_ROMAN 16 -#define FF_SCRIPT 64 -#define FF_SWISS 32 -#define PANOSE_COUNT 10 -#define PAN_FAMILYTYPE_INDEX 0 -#define PAN_SERIFSTYLE_INDEX 1 -#define PAN_WEIGHT_INDEX 2 -#define PAN_PROPORTION_INDEX 3 -#define PAN_CONTRAST_INDEX 4 -#define PAN_STROKEVARIATION_INDEX 5 -#define PAN_ARMSTYLE_INDEX 6 -#define PAN_LETTERFORM_INDEX 7 -#define PAN_MIDLINE_INDEX 8 -#define PAN_XHEIGHT_INDEX 9 -#define PAN_CULTURE_LATIN 0 -#define PAN_ANY 0 -#define PAN_NO_FIT 1 -#define PAN_FAMILY_TEXT_DISPLAY 2 -#define PAN_FAMILY_SCRIPT 3 -#define PAN_FAMILY_DECORATIVE 4 -#define PAN_FAMILY_PICTORIAL 5 -#define PAN_SERIF_COVE 2 -#define PAN_SERIF_OBTUSE_COVE 3 -#define PAN_SERIF_SQUARE_COVE 4 -#define PAN_SERIF_OBTUSE_SQUARE_COVE 5 -#define PAN_SERIF_SQUARE 6 -#define PAN_SERIF_THIN 7 -#define PAN_SERIF_BONE 8 -#define PAN_SERIF_EXAGGERATED 9 -#define PAN_SERIF_TRIANGLE 10 -#define PAN_SERIF_NORMAL_SANS 11 -#define PAN_SERIF_OBTUSE_SANS 12 -#define PAN_SERIF_PERP_SANS 13 -#define PAN_SERIF_FLARED 14 -#define PAN_SERIF_ROUNDED 15 -#define PAN_WEIGHT_VERY_LIGHT 2 -#define PAN_WEIGHT_LIGHT 3 -#define PAN_WEIGHT_THIN 4 -#define PAN_WEIGHT_BOOK 5 -#define PAN_WEIGHT_MEDIUM 6 -#define PAN_WEIGHT_DEMI 7 -#define PAN_WEIGHT_BOLD 8 -#define PAN_WEIGHT_HEAVY 9 -#define PAN_WEIGHT_BLACK 10 -#define PAN_WEIGHT_NORD 11 -#define PAN_PROP_OLD_STYLE 2 -#define PAN_PROP_MODERN 3 -#define PAN_PROP_EVEN_WIDTH 4 -#define PAN_PROP_EXPANDED 5 -#define PAN_PROP_CONDENSED 6 -#define PAN_PROP_VERY_EXPANDED 7 -#define PAN_PROP_VERY_CONDENSED 8 -#define PAN_PROP_MONOSPACED 9 -#define PAN_CONTRAST_NONE 2 -#define PAN_CONTRAST_VERY_LOW 3 -#define PAN_CONTRAST_LOW 4 -#define PAN_CONTRAST_MEDIUM_LOW 5 -#define PAN_CONTRAST_MEDIUM 6 -#define PAN_CONTRAST_MEDIUM_HIGH 7 -#define PAN_CONTRAST_HIGH 8 -#define PAN_CONTRAST_VERY_HIGH 9 -#define PAN_STROKE_GRADUAL_DIAG 2 -#define PAN_STROKE_GRADUAL_TRAN 3 -#define PAN_STROKE_GRADUAL_VERT 4 -#define PAN_STROKE_GRADUAL_HORZ 5 -#define PAN_STROKE_RAPID_VERT 6 -#define PAN_STROKE_RAPID_HORZ 7 -#define PAN_STROKE_INSTANT_VERT 8 -#define PAN_STRAIGHT_ARMS_HORZ 2 -#define PAN_STRAIGHT_ARMS_WEDGE 3 -#define PAN_STRAIGHT_ARMS_VERT 4 -#define PAN_STRAIGHT_ARMS_SINGLE_SERIF 5 -#define PAN_STRAIGHT_ARMS_DOUBLE_SERIF 6 -#define PAN_BENT_ARMS_HORZ 7 -#define PAN_BENT_ARMS_WEDGE 8 -#define PAN_BENT_ARMS_VERT 9 -#define PAN_BENT_ARMS_SINGLE_SERIF 10 -#define PAN_BENT_ARMS_DOUBLE_SERIF 11 -#define PAN_LETT_NORMAL_CONTACT 2 -#define PAN_LETT_NORMAL_WEIGHTED 3 -#define PAN_LETT_NORMAL_BOXED 4 -#define PAN_LETT_NORMAL_FLATTENED 5 -#define PAN_LETT_NORMAL_ROUNDED 6 -#define PAN_LETT_NORMAL_OFF_CENTER 7 -#define PAN_LETT_NORMAL_SQUARE 8 -#define PAN_LETT_OBLIQUE_CONTACT 9 -#define PAN_LETT_OBLIQUE_WEIGHTED 10 -#define PAN_LETT_OBLIQUE_BOXED 11 -#define PAN_LETT_OBLIQUE_FLATTENED 12 -#define PAN_LETT_OBLIQUE_ROUNDED 13 -#define PAN_LETT_OBLIQUE_OFF_CENTER 14 -#define PAN_LETT_OBLIQUE_SQUARE 15 -#define PAN_MIDLINE_STANDARD_TRIMMED 2 -#define PAN_MIDLINE_STANDARD_POINTED 3 -#define PAN_MIDLINE_STANDARD_SERIFED 4 -#define PAN_MIDLINE_HIGH_TRIMMED 5 -#define PAN_MIDLINE_HIGH_POINTED 6 -#define PAN_MIDLINE_HIGH_SERIFED 7 -#define PAN_MIDLINE_CONSTANT_TRIMMED 8 -#define PAN_MIDLINE_CONSTANT_POINTED 9 -#define PAN_MIDLINE_CONSTANT_SERIFED 10 -#define PAN_MIDLINE_LOW_TRIMMED 11 -#define PAN_MIDLINE_LOW_POINTED 12 -#define PAN_MIDLINE_LOW_SERIFED 13 -#define PAN_XHEIGHT_CONSTANT_SMALL 2 -#define PAN_XHEIGHT_CONSTANT_STD 3 -#define PAN_XHEIGHT_CONSTANT_LARGE 4 -#define PAN_XHEIGHT_DUCKING_SMALL 5 -#define PAN_XHEIGHT_DUCKING_STD 6 -#define PAN_XHEIGHT_DUCKING_LARGE 7 -#define FS_LATIN1 1 -#define FS_LATIN2 2 -#define FS_CYRILLIC 4 -#define FS_GREEK 8 -#define FS_TURKISH 16 -#define FS_HEBREW 32 -#define FS_ARABIC 64 -#define FS_BALTIC 128 -#define FS_THAI 0x10000 -#define FS_JISJAPAN 0x20000 -#define FS_CHINESESIMP 0x40000 -#define FS_WANSUNG 0x80000 -#define FS_CHINESETRAD 0x100000 -#define FS_JOHAB 0x200000 -#define FS_SYMBOL 0x80000000 -#define HS_BDIAGONAL 3 -#define HS_CROSS 4 -#define HS_DIAGCROSS 5 -#define HS_FDIAGONAL 2 -#define HS_HORIZONTAL 0 -#define HS_VERTICAL 1 -#define PS_GEOMETRIC 65536 -#define PS_COSMETIC 0 -#define PS_ALTERNATE 8 -#define PS_SOLID 0 -#define PS_DASH 1 -#define PS_DOT 2 -#define PS_DASHDOT 3 -#define PS_DASHDOTDOT 4 -#define PS_NULL 5 -#define PS_USERSTYLE 7 -#define PS_INSIDEFRAME 6 -#define PS_ENDCAP_ROUND 0 -#define PS_ENDCAP_SQUARE 256 -#define PS_ENDCAP_FLAT 512 -#define PS_JOIN_BEVEL 4096 -#define PS_JOIN_MITER 8192 -#define PS_JOIN_ROUND 0 -#define PS_STYLE_MASK 15 -#define PS_ENDCAP_MASK 3840 -#define PS_TYPE_MASK 983040 -#define ALTERNATE 1 -#define WINDING 2 -#define DC_BINNAMES 12 -#define DC_BINS 6 -#define DC_COPIES 18 -#define DC_DRIVER 11 -#define DC_DATATYPE_PRODUCED 21 -#define DC_DUPLEX 7 -#define DC_EMF_COMPLIANT 20 -#define DC_ENUMRESOLUTIONS 13 -#define DC_EXTRA 9 -#define DC_FIELDS 1 -#define DC_FILEDEPENDENCIES 14 -#define DC_MAXEXTENT 5 -#define DC_MINEXTENT 4 -#define DC_ORIENTATION 17 -#define DC_PAPERNAMES 16 -#define DC_PAPERS 2 -#define DC_PAPERSIZE 3 -#define DC_SIZE 8 -#define DC_TRUETYPE 15 -#define DCTT_BITMAP 1 -#define DCTT_DOWNLOAD 2 -#define DCTT_SUBDEV 4 -#define DCTT_DOWNLOAD_OUTLINE 8 -#define DC_VERSION 10 -#define DC_BINADJUST 19 -#define DC_EMF_COMPLIANT 20 -#define DC_DATATYPE_PRODUCED 21 -#define DC_MANUFACTURER 23 -#define DC_MODEL 24 -#if (WINVER >= 0x0500) -#define DC_PERSONALITY 25 -#define DC_PRINTRATE 26 -#define DC_PRINTRATEUNIT 27 -#define DC_PRINTERMEM 28 -#define DC_MEDIAREADY 29 -#define DC_STAPLE 30 -#define DC_PRINTRATEPPM 31 -#define DC_COLORDEVICE 32 -#define DC_NUP 33 -#endif -#if (WINVER >= 0x0501) -#define DC_MEDIATYPENAMES 34 -#define DC_MEDIATYPES 35 -#endif -#define DCBA_FACEUPNONE 0 -#define DCBA_FACEUPCENTER 1 -#define DCBA_FACEUPLEFT 2 -#define DCBA_FACEUPRIGHT 3 -#define DCBA_FACEDOWNNONE 256 -#define DCBA_FACEDOWNCENTER 257 -#define DCBA_FACEDOWNLEFT 258 -#define DCBA_FACEDOWNRIGHT 259 -#define FLOODFILLBORDER 0 -#define FLOODFILLSURFACE 1 -#define ETO_CLIPPED 0x0004 -#define ETO_GLYPH_INDEX 0x0010 -#define ETO_OPAQUE 0x0002 -#define ETO_NUMERICSLATIN 0x0800 -#define ETO_NUMERICSLOCAL 0x0400 -#define ETO_RTLREADING 0x0080 -#if (_WIN32_WINNT >= 0x0400) -#define ETO_IGNORELANGUAGE 0x1000 -#endif -#if (_WIN32_WINNT >= 0x0500) -#define ETO_PDY 0x2000 -#endif -#define GDICOMMENT_WINDOWS_METAFILE (-2147483647) -#define GDICOMMENT_BEGINGROUP 2 -#define GDICOMMENT_ENDGROUP 3 -#define GDICOMMENT_MULTIFORMATS 1073741828 -#define GDICOMMENT_IDENTIFIER 1128875079 -#define AD_COUNTERCLOCKWISE 1 -#define AD_CLOCKWISE 2 -#define RDH_RECTANGLES 1 -#define GCPCLASS_LATIN 1 -#define GCPCLASS_HEBREW 2 -#define GCPCLASS_ARABIC 2 -#define GCPCLASS_NEUTRAL 3 -#define GCPCLASS_LOCALNUMBER 4 -#define GCPCLASS_LATINNUMBER 5 -#define GCPCLASS_LATINNUMERICTERMINATOR 6 -#define GCPCLASS_LATINNUMERICSEPARATOR 7 -#define GCPCLASS_NUMERICSEPARATOR 8 -#define GCPCLASS_PREBOUNDLTR 128 -#define GCPCLASS_PREBOUNDRTL 64 -#define GCPCLASS_POSTBOUNDLTR 32 -#define GCPCLASS_POSTBOUNDRTL 16 -#define GCPGLYPH_LINKBEFORE 0x8000 -#define GCPGLYPH_LINKAFTER 0x4000 -#define DCB_DISABLE 8 -#define DCB_ENABLE 4 -#define DCB_RESET 1 -#define DCB_SET 3 -#define DCB_ACCUMULATE 2 -#define DCB_DIRTY 2 -#define OBJ_BRUSH 2 -#define OBJ_PEN 1 -#define OBJ_PAL 5 -#define OBJ_FONT 6 -#define OBJ_BITMAP 7 -#define OBJ_EXTPEN 11 -#define OBJ_REGION 8 -#define OBJ_DC 3 -#define OBJ_MEMDC 10 -#define OBJ_METAFILE 9 -#define OBJ_METADC 4 -#define OBJ_ENHMETAFILE 13 -#define OBJ_ENHMETADC 12 -#define DRIVERVERSION 0 -#define TECHNOLOGY 2 -#define DT_PLOTTER 0 -#define DT_RASDISPLAY 1 -#define DT_RASPRINTER 2 -#define DT_RASCAMERA 3 -#define DT_CHARSTREAM 4 -#define DT_METAFILE 5 -#define DT_DISPFILE 6 -#define HORZSIZE 4 -#define VERTSIZE 6 -#define HORZRES 8 -#define VERTRES 10 -#define LOGPIXELSX 88 -#define LOGPIXELSY 90 -#define BITSPIXEL 12 -#define PLANES 14 -#define NUMBRUSHES 16 -#define NUMPENS 18 -#define NUMFONTS 22 -#define NUMCOLORS 24 -#define NUMMARKERS 20 -#define ASPECTX 40 -#define ASPECTY 42 -#define ASPECTXY 44 -#define PDEVICESIZE 26 -#define CLIPCAPS 36 -#define SIZEPALETTE 104 -#define NUMRESERVED 106 -#define COLORRES 108 -#define PHYSICALWIDTH 110 -#define PHYSICALHEIGHT 111 -#define PHYSICALOFFSETX 112 -#define PHYSICALOFFSETY 113 -#define SCALINGFACTORX 114 -#define SCALINGFACTORY 115 -#define VREFRESH 116 -#define DESKTOPHORZRES 118 -#define DESKTOPVERTRES 117 -#define BLTALIGNMENT 119 -#if(WINVER >= 0x0500) -#define SHADEBLENDCAPS 120 -#define SB_NONE 0x00 -#define SB_CONST_ALPHA 0x01 -#define SB_PIXEL_ALPHA 0x02 -#define SB_PREMULT_ALPHA 0x04 -#define SB_GRAD_RECT 0x10 -#define SB_GRAD_TRI 0x20 -#define COLORMGMTCAPS 121 -#define CM_NONE 0x00 -#define CM_DEVICE_ICM 0x01 -#define CM_GAMMA_RAMP 0x02 -#define CM_CMYK_COLOR 0x04 -#endif -#define RASTERCAPS 38 -#define RC_BANDING 2 -#define RC_BITBLT 1 -#define RC_BITMAP64 8 -#define RC_DI_BITMAP 128 -#define RC_DIBTODEV 512 -#define RC_FLOODFILL 4096 -#define RC_GDI20_OUTPUT 16 -#define RC_PALETTE 256 -#define RC_SCALING 4 -#define RC_STRETCHBLT 2048 -#define RC_STRETCHDIB 8192 -#define RC_DEVBITS 0x8000 -#define RC_OP_DX_OUTPUT 0x4000 -#define CURVECAPS 28 -#define CC_NONE 0 -#define CC_CIRCLES 1 -#define CC_PIE 2 -#define CC_CHORD 4 -#define CC_ELLIPSES 8 -#define CC_WIDE 16 -#define CC_STYLED 32 -#define CC_WIDESTYLED 64 -#define CC_INTERIORS 128 -#define CC_ROUNDRECT 256 -#define LINECAPS 30 -#define LC_NONE 0 -#define LC_POLYLINE 2 -#define LC_MARKER 4 -#define LC_POLYMARKER 8 -#define LC_WIDE 16 -#define LC_STYLED 32 -#define LC_WIDESTYLED 64 -#define LC_INTERIORS 128 -#define POLYGONALCAPS 32 -#define RC_BANDING 2 -#define RC_BIGFONT 1024 -#define RC_BITBLT 1 -#define RC_BITMAP64 8 -#define RC_DEVBITS 0x8000 -#define RC_DI_BITMAP 128 -#define RC_GDI20_OUTPUT 16 -#define RC_GDI20_STATE 32 -#define RC_NONE 0 -#define RC_OP_DX_OUTPUT 0x4000 -#define RC_PALETTE 256 -#define RC_SAVEBITMAP 64 -#define RC_SCALING 4 -#define PC_NONE 0 -#define PC_POLYGON 1 -#define PC_POLYPOLYGON 256 -#define PC_PATHS 512 -#define PC_RECTANGLE 2 -#define PC_WINDPOLYGON 4 -#define PC_SCANLINE 8 -#define PC_TRAPEZOID 4 -#define PC_WIDE 16 -#define PC_STYLED 32 -#define PC_WIDESTYLED 64 -#define PC_INTERIORS 128 -#define PC_PATHS 512 -#define TEXTCAPS 34 -#define TC_OP_CHARACTER 1 -#define TC_OP_STROKE 2 -#define TC_CP_STROKE 4 -#define TC_CR_90 8 -#define TC_CR_ANY 16 -#define TC_SF_X_YINDEP 32 -#define TC_SA_DOUBLE 64 -#define TC_SA_INTEGER 128 -#define TC_SA_CONTIN 256 -#define TC_EA_DOUBLE 512 -#define TC_IA_ABLE 1024 -#define TC_UA_ABLE 2048 -#define TC_SO_ABLE 4096 -#define TC_RA_ABLE 8192 -#define TC_VA_ABLE 16384 -#define TC_RESERVED 32768 -#define TC_SCROLLBLT 65536 -#define GCP_DBCS 1 -#define GCP_ERROR 0x8000 -#define GCP_CLASSIN 0x80000 -#define GCP_DIACRITIC 256 -#define GCP_DISPLAYZWG 0x400000 -#define GCP_GLYPHSHAPE 16 -#define GCP_JUSTIFY 0x10000 -#define GCP_JUSTIFYIN 0x200000 -#define GCP_KASHIDA 1024 -#define GCP_LIGATE 32 -#define GCP_MAXEXTENT 0x100000 -#define GCP_NEUTRALOVERRIDE 0x2000000 -#define GCP_NUMERICOVERRIDE 0x1000000 -#define GCP_NUMERICSLATIN 0x4000000 -#define GCP_NUMERICSLOCAL 0x8000000 -#define GCP_REORDER 2 -#define GCP_SYMSWAPOFF 0x800000 -#define GCP_USEKERNING 8 -#define FLI_GLYPHS 0x40000 -#define FLI_MASK 0x103b -#define GGO_METRICS 0 -#define GGO_BITMAP 1 -#define GGO_NATIVE 2 -#define GGO_BEZIER 3 -#define GGO_GRAY2_BITMAP 4 -#define GGO_GRAY4_BITMAP 5 -#define GGO_GRAY8_BITMAP 6 -#define GGO_GLYPH_INDEX 128 -#if (WINVER >= 0x0500) -#define GGO_UNHINTED 256 -#endif -#define GM_COMPATIBLE 1 -#define GM_ADVANCED 2 -#define MM_ANISOTROPIC 8 -#define MM_HIENGLISH 5 -#define MM_HIMETRIC 3 -#define MM_ISOTROPIC 7 -#define MM_LOENGLISH 4 -#define MM_LOMETRIC 2 -#define MM_TEXT 1 -#define MM_TWIPS 6 -#define MM_MAX_FIXEDSCALE MM_TWIPS -#define ABSOLUTE 1 -#define RELATIVE 2 -#define PC_EXPLICIT 2 -#define PC_NOCOLLAPSE 4 -#define PC_RESERVED 1 -#define CLR_NONE 0xffffffff -#define CLR_INVALID CLR_NONE -#define CLR_DEFAULT 0xff000000 -#define PT_MOVETO 6 -#define PT_LINETO 2 -#define PT_BEZIERTO 4 -#define PT_CLOSEFIGURE 1 -#define TT_AVAILABLE 1 -#define TT_ENABLED 2 -#define BLACK_BRUSH 4 -#define DKGRAY_BRUSH 3 -#define GRAY_BRUSH 2 -#define HOLLOW_BRUSH 5 -#define LTGRAY_BRUSH 1 -#define NULL_BRUSH 5 -#define WHITE_BRUSH 0 -#define BLACK_PEN 7 -#define NULL_PEN 8 -#define WHITE_PEN 6 -#define ANSI_FIXED_FONT 11 -#define ANSI_VAR_FONT 12 -#define DEVICE_DEFAULT_FONT 14 -#define DEFAULT_GUI_FONT 17 -#define OEM_FIXED_FONT 10 -#define SYSTEM_FONT 13 -#define SYSTEM_FIXED_FONT 16 -#define DEFAULT_PALETTE 15 -#if (_WIN32_WINNT >= 0x0500) -#define DC_BRUSH 18 -#define DC_PEN 19 -#endif -#define SYSPAL_ERROR 0 -#define SYSPAL_STATIC 1 -#define SYSPAL_NOSTATIC 2 -#define SYSPAL_NOSTATIC256 3 -#define TA_BASELINE 24 -#define TA_BOTTOM 8 -#define TA_TOP 0 -#define TA_CENTER 6 -#define TA_LEFT 0 -#define TA_RIGHT 2 -#define TA_RTLREADING 256 -#define TA_NOUPDATECP 0 -#define TA_UPDATECP 1 -#define TA_MASK (TA_BASELINE+TA_CENTER+TA_UPDATECP+TA_RTLREADING) -#define VTA_BASELINE 24 -#define VTA_CENTER 6 -#define VTA_LEFT TA_BOTTOM -#define VTA_RIGHT TA_TOP -#define VTA_BOTTOM TA_RIGHT -#define VTA_TOP TA_LEFT -#define MWT_IDENTITY 1 -#define MWT_LEFTMULTIPLY 2 -#define MWT_RIGHTMULTIPLY 3 -#define OPAQUE 2 -#define TRANSPARENT 1 -#define BLACKONWHITE 1 -#define WHITEONBLACK 2 -#define COLORONCOLOR 3 -#define HALFTONE 4 -#define MAXSTRETCHBLTMODE 4 -#define STRETCH_ANDSCANS 1 -#define STRETCH_DELETESCANS 3 -#define STRETCH_HALFTONE 4 -#define STRETCH_ORSCANS 2 -#define TCI_SRCCHARSET 1 -#define TCI_SRCCODEPAGE 2 -#define TCI_SRCFONTSIG 3 -#... [truncated message content] |
From: Keith M. <no...@so...> - 2017-06-03 14:15:59
|
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 5a6bfce3a0c3bc1fd523f57ed2f199dd8e1ba9ba (commit) via 94803ef3eacd1eaafd13f1724190939b57ea53e9 (commit) via e0c434133a6e776b8cf200cf3a7820dd87ee6920 (commit) via 5563640f917c70ddf4ef5a9a8f34cf93030025db (commit) via c35550ff566ec74608e17cea3b08ebb21cde10ba (commit) from 40982dff81a3c1dc0572cf2cd0a23156661ae98d (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/5a6bfce3a0c3bc1fd523f57ed2f199dd8e1ba9ba/ commit 5a6bfce3a0c3bc1fd523f57ed2f199dd8e1ba9ba Author: Keith Marshall <kei...@us...> Date: Wed May 31 14:21:20 2017 +0100 Declare CONDITION_VARIABLE API, per feature request [#2314] diff --git a/w32api/ChangeLog b/w32api/ChangeLog index 73022e8..bc79c12 100644 --- a/w32api/ChangeLog +++ b/w32api/ChangeLog @@ -1,3 +1,13 @@ +2017-05-31 Keith Marshall <kei...@us...> + + Declare CONDITION_VARIABLE API, per feature request [#2314] + + * include/winbase.h [_WIN32_WINNT >= _WIN32_WINNT_VISTA] + (CONDITION_VARIABLE, PCONDITION_VARIABLE): Define data types, and... + (InitializeConditionVariable, SleepConditionVariableCS) + (SleepConditionVariableSRW, WakeAllConditionVariable) + (WakeConditionVariable): ...declare prototypes. + 2017-05-29 Keith Marshall <kei...@us...> Declare SRWLOCK API, to support feature request [#2314] diff --git a/w32api/include/winbase.h b/w32api/include/winbase.h index dc541f2..f053cc6 100644 --- a/w32api/include/winbase.h +++ b/w32api/include/winbase.h @@ -3017,6 +3017,18 @@ void WINAPI AcquireSRWLockShared (PSRWLOCK); void WINAPI ReleaseSRWLockExclusive (PSRWLOCK); void WINAPI ReleaseSRWLockShared (PSRWLOCK); +/* https://msdn.microsoft.com/en-us/library/ms682052%28v=vs.85%29.aspx */ +/* Note: once again, MSDN fails to document this, but an opaque generic + * pointer type appears to suffice. + */ +typedef PVOID CONDITION_VARIABLE, *PCONDITION_VARIABLE; + +void WINAPI InitializeConditionVariable (PCONDITION_VARIABLE); +BOOL WINAPI SleepConditionVariableCS (PCONDITION_VARIABLE, PCRITICAL_SECTION, DWORD); +BOOL WINAPI SleepConditionVariableSRW (PCONDITION_VARIABLE, PSRWLOCK, DWORD, ULONG); +void WINAPI WakeAllConditionVariable (PCONDITION_VARIABLE); +void WINAPI WakeConditionVariable (PCONDITION_VARIABLE); + #if _WIN32_WINNT >= _WIN32_WINNT_WIN7 /* Additional features, available only on the WinNT series platforms, from * the release of Windows-7 onwards. https://sf.net/p/mingw/mingw-org-wsl/ci/94803ef3eacd1eaafd13f1724190939b57ea53e9/ commit 94803ef3eacd1eaafd13f1724190939b57ea53e9 Author: Keith Marshall <kei...@us...> Date: Mon May 29 16:39:51 2017 +0100 Declare SRWLOCK API, to support feature request [#2314] diff --git a/w32api/ChangeLog b/w32api/ChangeLog index 50d6a05..73022e8 100644 --- a/w32api/ChangeLog +++ b/w32api/ChangeLog @@ -1,3 +1,14 @@ +2017-05-29 Keith Marshall <kei...@us...> + + Declare SRWLOCK API, to support feature request [#2314] + + * include/winbase.h [_WIN32_WINNT >= _WIN32_WINNT_VISTA] + (SRWLOCK, *PSRWLOCK): Define these data types, and declare... + (InitializeSRWLock, AcquireSRWLockExclusive, AcquireSRWLockShared) + (ReleaseSRWLockExclusive, ReleaseSRWLockShared): ...these prototypes. + [_WIN32_WINNT >= _WIN32_WINNT_WIN7] (TryAcquireSRWLockExclusive) + (TryAcquireSRWLockShared): Declare additional prototypes. + 2017-03-24 Keith Marshall <kei...@us...> Resolve potential <winbase.h> vs. <winerror.h> inconsistency. diff --git a/w32api/include/winbase.h b/w32api/include/winbase.h index b869c6f..dc541f2 100644 --- a/w32api/include/winbase.h +++ b/w32api/include/winbase.h @@ -3004,6 +3004,19 @@ WINBASEAPI DWORD WINAPI GetFinalPathNameByHandleA (HANDLE, LPSTR, DWORD, DWORD); WINBASEAPI DWORD WINAPI GetFinalPathNameByHandleW (HANDLE, LPWSTR, DWORD, DWORD); +/* https://msdn.microsoft.com/en-us/library/aa904937%28v=vs.85%29.aspx */ +/* Note: MSDN does not offer any detail of how SRWLOCK should be defined, + * (other than stating that it is a structure with the size of a pointer); + * an opaque generic pointer type appears to be sufficient. + */ +typedef PVOID SRWLOCK, *PSRWLOCK; + +void WINAPI InitializeSRWLock (PSRWLOCK); +void WINAPI AcquireSRWLockExclusive (PSRWLOCK); +void WINAPI AcquireSRWLockShared (PSRWLOCK); +void WINAPI ReleaseSRWLockExclusive (PSRWLOCK); +void WINAPI ReleaseSRWLockShared (PSRWLOCK); + #if _WIN32_WINNT >= _WIN32_WINNT_WIN7 /* Additional features, available only on the WinNT series platforms, from * the release of Windows-7 onwards. @@ -3013,6 +3026,10 @@ WINBASEAPI DEP_SYSTEM_POLICY_TYPE WINAPI GetSystemDEPPolicy (void); WINBASEAPI BOOL WINAPI SetProcessDEPPolicy (DWORD); +/* https://msdn.microsoft.com/en-us/library/aa904937%28v=vs.85%29.aspx */ +BOOLEAN WINAPI TryAcquireSRWLockExclusive (PSRWLOCK); +BOOLEAN WINAPI TryAcquireSRWLockShared (PSRWLOCK); + #endif /* Win7 and later */ #endif /* Windows Vista and later */ #endif /* Windows Server-2003 and later */ https://sf.net/p/mingw/mingw-org-wsl/ci/e0c434133a6e776b8cf200cf3a7820dd87ee6920/ commit e0c434133a6e776b8cf200cf3a7820dd87ee6920 Author: Keith Marshall <kei...@us...> Date: Fri Mar 24 16:20:52 2017 +0000 Resolve potential <winbase.h> vs. <winerror.h> inconsistency. diff --git a/w32api/ChangeLog b/w32api/ChangeLog index b5dad38..50d6a05 100644 --- a/w32api/ChangeLog +++ b/w32api/ChangeLog @@ -1,5 +1,16 @@ 2017-03-24 Keith Marshall <kei...@us...> + Resolve potential <winbase.h> vs. <winerror.h> inconsistency. + + * include/winerror.h: Tidy layout; assert copyright. + + * include/winbase.h (WAIT_TIMEOUT): Redefine; make it identical to... + * include/winerror.h (WAIT_TIMEOUT): ...this equivalent; remove... + [!defined WAIT_TIMEOUT]: ...this conditional redefinition guard from + both locations; it permitted inconsistency between the two. + +2017-03-24 Keith Marshall <kei...@us...> + Consolidate <winbase.h> version specific conditionals. * include/winbase.h: Reorganize file content; group manifest constant diff --git a/w32api/include/winbase.h b/w32api/include/winbase.h index ff29412..b869c6f 100644 --- a/w32api/include/winbase.h +++ b/w32api/include/winbase.h @@ -493,19 +493,11 @@ _BEGIN_C_DECLS #define WAIT_OBJECT_0 0 #define WAIT_ABANDONED_0 128 -#ifndef WAIT_TIMEOUT -/* FIXME: This guard MUST be removed! Even if WAIT_TIMEOUT is also defined - * in <winerror.h>, the definitions MUST be IDENTICALLY the same; guards such - * as this deny the compiler any opportunity to check this, and thus invite - * inconsistency, broken definitions, and hard-to-locate bugs. +/* WAIT_TIMEOUT is also defined in <winerror.h>. We MUST ensure that the + * definitions are IDENTICALLY the same in BOTH headers; they are defined + * without guards, to give the compiler an opportunity to check this. */ -#define WAIT_TIMEOUT 258 -#else -/* FIXME: Redundant definition, to force compile time check; may be removed, - * when resolving the <winerror.h> duplication issue. - */ -#define WAIT_TIMEOUT 258 -#endif +#define WAIT_TIMEOUT 258L #define WAIT_IO_COMPLETION 0xC0 #define WAIT_ABANDONED 128 diff --git a/w32api/include/winerror.h b/w32api/include/winerror.h index 6b0b173..2ddfbd8 100644 --- a/w32api/include/winerror.h +++ b/w32api/include/winerror.h @@ -1,2282 +1,2341 @@ +/* + * winerror.h + * + * Manifest definitions of Windows system error condition codes. + * + * $Id$ + * + * Written by Anders Norlander <ano...@he...> + * Copyright (C) 1998, 2000-2006, 2008, 2009, 2012, 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"), + * 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 _WINERROR_H #define _WINERROR_H -#if __GNUC__ >=3 #pragma GCC system_header -#endif -#define _HRESULT_TYPEDEF_(_sc) ((HRESULT)_sc) +#define _HRESULT_TYPEDEF_(_sc) ((HRESULT)(_sc)) -#define ERROR_SUCCESS 0L -#define NO_ERROR 0L -#define ERROR_INVALID_FUNCTION 1L -#define ERROR_FILE_NOT_FOUND 2L -#define ERROR_PATH_NOT_FOUND 3L -#define ERROR_TOO_MANY_OPEN_FILES 4L -#define ERROR_ACCESS_DENIED 5L -#define ERROR_INVALID_HANDLE 6L -#define ERROR_ARENA_TRASHED 7L -#define ERROR_NOT_ENOUGH_MEMORY 8L -#define ERROR_INVALID_BLOCK 9L -#define ERROR_BAD_ENVIRONMENT 10L -#define ERROR_BAD_FORMAT 11L -#define ERROR_INVALID_ACCESS 12L -#define ERROR_INVALID_DATA 13L -#define ERROR_OUTOFMEMORY 14L -#define ERROR_INVALID_DRIVE 15L -#define ERROR_CURRENT_DIRECTORY 16L -#define ERROR_NOT_SAME_DEVICE 17L -#define ERROR_NO_MORE_FILES 18L -#define ERROR_WRITE_PROTECT 19L -#define ERROR_BAD_UNIT 20L -#define ERROR_NOT_READY 21L -#define ERROR_BAD_COMMAND 22L -#define ERROR_CRC 23L -#define ERROR_BAD_LENGTH 24L -#define ERROR_SEEK 25L -#define ERROR_NOT_DOS_DISK 26L -#define ERROR_SECTOR_NOT_FOUND 27L -#define ERROR_OUT_OF_PAPER 28L -#define ERROR_WRITE_FAULT 29L -#define ERROR_READ_FAULT 30L -#define ERROR_GEN_FAILURE 31L -#define ERROR_SHARING_VIOLATION 32L -#define ERROR_LOCK_VIOLATION 33L -#define ERROR_WRONG_DISK 34L -#define ERROR_SHARING_BUFFER_EXCEEDED 36L -#define ERROR_HANDLE_EOF 38L -#define ERROR_HANDLE_DISK_FULL 39L -#define ERROR_NOT_SUPPORTED 50L -#define ERROR_REM_NOT_LIST 51L -#define ERROR_DUP_NAME 52L -#define ERROR_BAD_NETPATH 53L -#define ERROR_NETWORK_BUSY 54L -#define ERROR_DEV_NOT_EXIST 55L -#define ERROR_TOO_MANY_CMDS 56L -#define ERROR_ADAP_HDW_ERR 57L -#define ERROR_BAD_NET_RESP 58L -#define ERROR_UNEXP_NET_ERR 59L -#define ERROR_BAD_REM_ADAP 60L -#define ERROR_PRINTQ_FULL 61L -#define ERROR_NO_SPOOL_SPACE 62L -#define ERROR_PRINT_CANCELLED 63L -#define ERROR_NETNAME_DELETED 64L -#define ERROR_NETWORK_ACCESS_DENIED 65L -#define ERROR_BAD_DEV_TYPE 66L -#define ERROR_BAD_NET_NAME 67L -#define ERROR_TOO_MANY_NAMES 68L -#define ERROR_TOO_MANY_SESS 69L -#define ERROR_SHARING_PAUSED 70L -#define ERROR_REQ_NOT_ACCEP 71L -#define ERROR_REDIR_PAUSED 72L -#define ERROR_FILE_EXISTS 80L -#define ERROR_CANNOT_MAKE 82L -#define ERROR_FAIL_I24 83L -#define ERROR_OUT_OF_STRUCTURES 84L -#define ERROR_ALREADY_ASSIGNED 85L -#define ERROR_INVALID_PASSWORD 86L -#define ERROR_INVALID_PARAMETER 87L -#define ERROR_NET_WRITE_FAULT 88L -#define ERROR_NO_PROC_SLOTS 89L -#define ERROR_TOO_MANY_SEMAPHORES 100L -#define ERROR_EXCL_SEM_ALREADY_OWNED 101L -#define ERROR_SEM_IS_SET 102L -#define ERROR_TOO_MANY_SEM_REQUESTS 103L -#define ERROR_INVALID_AT_INTERRUPT_TIME 104L -#define ERROR_SEM_OWNER_DIED 105L -#define ERROR_SEM_USER_LIMIT 106L -#define ERROR_DISK_CHANGE 107L -#define ERROR_DRIVE_LOCKED 108L -#define ERROR_BROKEN_PIPE 109L -#define ERROR_OPEN_FAILED 110L -#define ERROR_BUFFER_OVERFLOW 111L -#define ERROR_DISK_FULL 112L -#define ERROR_NO_MORE_SEARCH_HANDLES 113L -#define ERROR_INVALID_TARGET_HANDLE 114L -#define ERROR_INVALID_CATEGORY 117L -#define ERROR_INVALID_VERIFY_SWITCH 118L -#define ERROR_BAD_DRIVER_LEVEL 119L -#define ERROR_CALL_NOT_IMPLEMENTED 120L -#define ERROR_SEM_TIMEOUT 121L -#define ERROR_INSUFFICIENT_BUFFER 122L -#define ERROR_INVALID_NAME 123L -#define ERROR_INVALID_LEVEL 124L -#define ERROR_NO_VOLUME_LABEL 125L -#define ERROR_MOD_NOT_FOUND 126L -#define ERROR_PROC_NOT_FOUND 127L -#define ERROR_WAIT_NO_CHILDREN 128L -#define ERROR_CHILD_NOT_COMPLETE 129L -#define ERROR_DIRECT_ACCESS_HANDLE 130L -#define ERROR_NEGATIVE_SEEK 131L -#define ERROR_SEEK_ON_DEVICE 132L -#define ERROR_IS_JOIN_TARGET 133L -#define ERROR_IS_JOINED 134L -#define ERROR_IS_SUBSTED 135L -#define ERROR_NOT_JOINED 136L -#define ERROR_NOT_SUBSTED 137L -#define ERROR_JOIN_TO_JOIN 138L -#define ERROR_SUBST_TO_SUBST 139L -#define ERROR_JOIN_TO_SUBST 140L -#define ERROR_SUBST_TO_JOIN 141L -#define ERROR_BUSY_DRIVE 142L -#define ERROR_SAME_DRIVE 143L -#define ERROR_DIR_NOT_ROOT 144L -#define ERROR_DIR_NOT_EMPTY 145L -#define ERROR_IS_SUBST_PATH 146L -#define ERROR_IS_JOIN_PATH 147L -#define ERROR_PATH_BUSY 148L -#define ERROR_IS_SUBST_TARGET 149L -#define ERROR_SYSTEM_TRACE 150L -#define ERROR_INVALID_EVENT_COUNT 151L -#define ERROR_TOO_MANY_MUXWAITERS 152L -#define ERROR_INVALID_LIST_FORMAT 153L -#define ERROR_LABEL_TOO_LONG 154L -#define ERROR_TOO_MANY_TCBS 155L -#define ERROR_SIGNAL_REFUSED 156L -#define ERROR_DISCARDED 157L -#define ERROR_NOT_LOCKED 158L -#define ERROR_BAD_THREADID_ADDR 159L -#define ERROR_BAD_ARGUMENTS 160L -#define ERROR_BAD_PATHNAME 161L -#define ERROR_SIGNAL_PENDING 162L -#define ERROR_MAX_THRDS_REACHED 164L -#define ERROR_LOCK_FAILED 167L -#define ERROR_BUSY 170L -#define ERROR_CANCEL_VIOLATION 173L -#define ERROR_ATOMIC_LOCKS_NOT_SUPPORTED 174L -#define ERROR_INVALID_SEGMENT_NUMBER 180L -#define ERROR_INVALID_ORDINAL 182L -#define ERROR_ALREADY_EXISTS 183L -#define ERROR_INVALID_FLAG_NUMBER 186L -#define ERROR_SEM_NOT_FOUND 187L -#define ERROR_INVALID_STARTING_CODESEG 188L -#define ERROR_INVALID_STACKSEG 189L -#define ERROR_INVALID_MODULETYPE 190L -#define ERROR_INVALID_EXE_SIGNATURE 191L -#define ERROR_EXE_MARKED_INVALID 192L -#define ERROR_BAD_EXE_FORMAT 193L -#define ERROR_ITERATED_DATA_EXCEEDS_64k 194L -#define ERROR_INVALID_MINALLOCSIZE 195L -#define ERROR_DYNLINK_FROM_INVALID_RING 196L -#define ERROR_IOPL_NOT_ENABLED 197L -#define ERROR_INVALID_SEGDPL 198L -#define ERROR_AUTODATASEG_EXCEEDS_64k 199L -#define ERROR_RING2SEG_MUST_BE_MOVABLE 200L -#define ERROR_RELOC_CHAIN_XEEDS_SEGLIM 201L -#define ERROR_INFLOOP_IN_RELOC_CHAIN 202L -#define ERROR_ENVVAR_NOT_FOUND 203L -#define ERROR_NO_SIGNAL_SENT 205L -#define ERROR_FILENAME_EXCED_RANGE 206L -#define ERROR_RING2_STACK_IN_USE 207L -#define ERROR_META_EXPANSION_TOO_LONG 208L -#define ERROR_INVALID_SIGNAL_NUMBER 209L -#define ERROR_THREAD_1_INACTIVE 210L -#define ERROR_LOCKED 212L -#define ERROR_TOO_MANY_MODULES 214L -#define ERROR_NESTING_NOT_ALLOWED 215L -#define ERROR_EXE_MACHINE_TYPE_MISMATCH 216L -#define ERROR_EXE_CANNOT_MODIFY_SIGNED_BINARY 217L -#define ERROR_EXE_CANNOT_MODIFY_STRONG_SIGNED_BINARY 218L -#define ERROR_BAD_PIPE 230L -#define ERROR_PIPE_BUSY 231L -#define ERROR_NO_DATA 232L -#define ERROR_PIPE_NOT_CONNECTED 233L -#define ERROR_MORE_DATA 234L -#define ERROR_VC_DISCONNECTED 240L -#define ERROR_INVALID_EA_NAME 254L -#define ERROR_EA_LIST_INCONSISTENT 255L -#ifndef WAIT_TIMEOUT /* also in winbase.h */ -#define WAIT_TIMEOUT 258L -#endif -#define ERROR_NO_MORE_ITEMS 259L -#define ERROR_CANNOT_COPY 266L -#define ERROR_DIRECTORY 267L -#define ERROR_EAS_DIDNT_FIT 275L -#define ERROR_EA_FILE_CORRUPT 276L -#define ERROR_EA_TABLE_FULL 277L -#define ERROR_INVALID_EA_HANDLE 278L -#define ERROR_EAS_NOT_SUPPORTED 282L -#define ERROR_NOT_OWNER 288L -#define ERROR_TOO_MANY_POSTS 298L -#define ERROR_PARTIAL_COPY 299L -#define ERROR_OPLOCK_NOT_GRANTED 300L -#define ERROR_INVALID_OPLOCK_PROTOCOL 301L -#define ERROR_DISK_TOO_FRAGMENTED 302L -#define ERROR_DELETE_PENDING 303L -#define ERROR_MR_MID_NOT_FOUND 317L -#define ERROR_SCOPE_NOT_FOUND 318L -#define ERROR_INVALID_ADDRESS 487L -#define ERROR_ARITHMETIC_OVERFLOW 534L -#define ERROR_PIPE_CONNECTED 535L -#define ERROR_PIPE_LISTENING 536L -#define ERROR_EA_ACCESS_DENIED 994L -#define ERROR_OPERATION_ABORTED 995L -#define ERROR_IO_INCOMPLETE 996L -#define ERROR_IO_PENDING 997L -#define ERROR_NOACCESS 998L -#define ERROR_SWAPERROR 999L -#define ERROR_STACK_OVERFLOW 1001L -#define ERROR_INVALID_MESSAGE 1002L -#define ERROR_CAN_NOT_COMPLETE 1003L -#define ERROR_INVALID_FLAGS 1004L -#define ERROR_UNRECOGNIZED_VOLUME 1005L -#define ERROR_FILE_INVALID 1006L -#define ERROR_FULLSCREEN_MODE 1007L -#define ERROR_NO_TOKEN 1008L -#define ERROR_BADDB 1009L -#define ERROR_BADKEY 1010L -#define ERROR_CANTOPEN 1011L -#define ERROR_CANTREAD 1012L -#define ERROR_CANTWRITE 1013L -#define ERROR_REGISTRY_RECOVERED 1014L -#define ERROR_REGISTRY_CORRUPT 1015L -#define ERROR_REGISTRY_IO_FAILED 1016L -#define ERROR_NOT_REGISTRY_FILE 1017L -#define ERROR_KEY_DELETED 1018L -#define ERROR_NO_LOG_SPACE 1019L -#define ERROR_KEY_HAS_CHILDREN 1020L -#define ERROR_CHILD_MUST_BE_VOLATILE 1021L -#define ERROR_NOTIFY_ENUM_DIR 1022L -#define ERROR_DEPENDENT_SERVICES_RUNNING 1051L -#define ERROR_INVALID_SERVICE_CONTROL 1052L -#define ERROR_SERVICE_REQUEST_TIMEOUT 1053L -#define ERROR_SERVICE_NO_THREAD 1054L -#define ERROR_SERVICE_DATABASE_LOCKED 1055L -#define ERROR_SERVICE_ALREADY_RUNNING 1056L -#define ERROR_INVALID_SERVICE_ACCOUNT 1057L -#define ERROR_SERVICE_DISABLED 1058L -#define ERROR_CIRCULAR_DEPENDENCY 1059L -#define ERROR_SERVICE_DOES_NOT_EXIST 1060L -#define ERROR_SERVICE_CANNOT_ACCEPT_CTRL 1061L -#define ERROR_SERVICE_NOT_ACTIVE 1062L -#define ERROR_FAILED_SERVICE_CONTROLLER_CONNECT 1063L -#define ERROR_EXCEPTION_IN_SERVICE 1064L -#define ERROR_DATABASE_DOES_NOT_EXIST 1065L -#define ERROR_SERVICE_SPECIFIC_ERROR 1066L -#define ERROR_PROCESS_ABORTED 1067L -#define ERROR_SERVICE_DEPENDENCY_FAIL 1068L -#define ERROR_SERVICE_LOGON_FAILED 1069L -#define ERROR_SERVICE_START_HANG 1070L -#define ERROR_INVALID_SERVICE_LOCK 1071L -#define ERROR_SERVICE_MARKED_FOR_DELETE 1072L -#define ERROR_SERVICE_EXISTS 1073L -#define ERROR_ALREADY_RUNNING_LKG 1074L -#define ERROR_SERVICE_DEPENDENCY_DELETED 1075L -#define ERROR_BOOT_ALREADY_ACCEPTED 1076L -#define ERROR_SERVICE_NEVER_STARTED 1077L -#define ERROR_DUPLICATE_SERVICE_NAME 1078L -#define ERROR_DIFFERENT_SERVICE_ACCOUNT 1079L -#define ERROR_CANNOT_DETECT_DRIVER_FAILURE 1080L -#define ERROR_CANNOT_DETECT_PROCESS_ABORT 1081L -#define ERROR_NO_RECOVERY_PROGRAM 1082L -#define ERROR_SERVICE_NOT_IN_EXE 1083L -#define ERROR_NOT_SAFEBOOT_SERVICE 1084L -#define ERROR_END_OF_MEDIA 1100L -#define ERROR_FILEMARK_DETECTED 1101L -#define ERROR_BEGINNING_OF_MEDIA 1102L -#define ERROR_SETMARK_DETECTED 1103L -#define ERROR_NO_DATA_DETECTED 1104L -#define ERROR_PARTITION_FAILURE 1105L -#define ERROR_INVALID_BLOCK_LENGTH 1106L -#define ERROR_DEVICE_NOT_PARTITIONED 1107L -#define ERROR_UNABLE_TO_LOCK_MEDIA 1108L -#define ERROR_UNABLE_TO_UNLOAD_MEDIA 1109L -#define ERROR_MEDIA_CHANGED 1110L -#define ERROR_BUS_RESET 1111L -#define ERROR_NO_MEDIA_IN_DRIVE 1112L -#define ERROR_NO_UNICODE_TRANSLATION 1113L -#define ERROR_DLL_INIT_FAILED 1114L -#define ERROR_SHUTDOWN_IN_PROGRESS 1115L -#define ERROR_NO_SHUTDOWN_IN_PROGRESS 1116L -#define ERROR_IO_DEVICE 1117L -#define ERROR_SERIAL_NO_DEVICE 1118L -#define ERROR_IRQ_BUSY 1119L -#define ERROR_MORE_WRITES 1120L -#define ERROR_COUNTER_TIMEOUT 1121L -#define ERROR_FLOPPY_ID_MARK_NOT_FOUND 1122L -#define ERROR_FLOPPY_WRONG_CYLINDER 1123L -#define ERROR_FLOPPY_UNKNOWN_ERROR 1124L -#define ERROR_FLOPPY_BAD_REGISTERS 1125L -#define ERROR_DISK_RECALIBRATE_FAILED 1126L -#define ERROR_DISK_OPERATION_FAILED 1127L -#define ERROR_DISK_RESET_FAILED 1128L -#define ERROR_EOM_OVERFLOW 1129L -#define ERROR_NOT_ENOUGH_SERVER_MEMORY 1130L -#define ERROR_POSSIBLE_DEADLOCK 1131L -#define ERROR_MAPPED_ALIGNMENT 1132L -#define ERROR_SET_POWER_STATE_VETOED 1140L -#define ERROR_SET_POWER_STATE_FAILED 1141L -#define ERROR_TOO_MANY_LINKS 1142L -#define ERROR_OLD_WIN_VERSION 1150L -#define ERROR_APP_WRONG_OS 1151L -#define ERROR_SINGLE_INSTANCE_APP 1152L -#define ERROR_RMODE_APP 1153L -#define ERROR_INVALID_DLL 1154L -#define ERROR_NO_ASSOCIATION 1155L -#define ERROR_DDE_FAIL 1156L -#define ERROR_DLL_NOT_FOUND 1157L -#define ERROR_NO_MORE_USER_HANDLES 1158L -#define ERROR_MESSAGE_SYNC_ONLY 1159L -#define ERROR_SOURCE_ELEMENT_EMPTY 1160L -#define ERROR_DESTINATION_ELEMENT_FULL 1161L -#define ERROR_ILLEGAL_ELEMENT_ADDRESS 1162L -#define ERROR_MAGAZINE_NOT_PRESENT 1163L -#define ERROR_DEVICE_REINITIALIZATION_NEEDED 1164L -#define ERROR_DEVICE_REQUIRES_CLEANING 1165L -#define ERROR_DEVICE_DOOR_OPEN 1166L -#define ERROR_DEVICE_NOT_CONNECTED 1167L -#define ERROR_NOT_FOUND 1168L -#define ERROR_NO_MATCH 1169L -#define ERROR_SET_NOT_FOUND 1170L -#define ERROR_POINT_NOT_FOUND 1171L -#define ERROR_NO_TRACKING_SERVICE 1172L -#define ERROR_NO_VOLUME_ID 1173L -#define ERROR_UNABLE_TO_REMOVE_REPLACED 1175L -#define ERROR_UNABLE_TO_MOVE_REPLACEMENT 1176L -#define ERROR_UNABLE_TO_MOVE_REPLACEMENT_2 1177L -#define ERROR_JOURNAL_DELETE_IN_PROGRESS 1178L -#define ERROR_JOURNAL_NOT_ACTIVE 1179L -#define ERROR_POTENTIAL_FILE_FOUND 1180L -#define ERROR_JOURNAL_ENTRY_DELETED 1181L -#define ERROR_BAD_DEVICE 1200L -#define ERROR_CONNECTION_UNAVAIL 1201L -#define ERROR_DEVICE_ALREADY_REMEMBERED 1202L -#define ERROR_NO_NET_OR_BAD_PATH 1203L -#define ERROR_BAD_PROVIDER 1204L -#define ERROR_CANNOT_OPEN_PROFILE 1205L -#define ERROR_BAD_PROFILE 1206L -#define ERROR_NOT_CONTAINER 1207L -#define ERROR_EXTENDED_ERROR 1208L -#define ERROR_INVALID_GROUPNAME 1209L -#define ERROR_INVALID_COMPUTERNAME 1210L -#define ERROR_INVALID_EVENTNAME 1211L -#define ERROR_INVALID_DOMAINNAME 1212L -#define ERROR_INVALID_SERVICENAME 1213L -#define ERROR_INVALID_NETNAME 1214L -#define ERROR_INVALID_SHARENAME 1215L -#define ERROR_INVALID_PASSWORDNAME 1216L -#define ERROR_INVALID_MESSAGENAME 1217L -#define ERROR_INVALID_MESSAGEDEST 1218L -#define ERROR_SESSION_CREDENTIAL_CONFLICT 1219L -#define ERROR_REMOTE_SESSION_LIMIT_EXCEEDED 1220L -#define ERROR_DUP_DOMAINNAME 1221L -#define ERROR_NO_NETWORK 1222L -#define ERROR_CANCELLED 1223L -#define ERROR_USER_MAPPED_FILE 1224L -#define ERROR_CONNECTION_REFUSED 1225L -#define ERROR_GRACEFUL_DISCONNECT 1226L -#define ERROR_ADDRESS_ALREADY_ASSOCIATED 1227L -#define ERROR_ADDRESS_NOT_ASSOCIATED 1228L -#define ERROR_CONNECTION_INVALID 1229L -#define ERROR_CONNECTION_ACTIVE 1230L -#define ERROR_NETWORK_UNREACHABLE 1231L -#define ERROR_HOST_UNREACHABLE 1232L -#define ERROR_PROTOCOL_UNREACHABLE 1233L -#define ERROR_PORT_UNREACHABLE 1234L -#define ERROR_REQUEST_ABORTED 1235L -#define ERROR_CONNECTION_ABORTED 1236L -#define ERROR_RETRY 1237L -#define ERROR_CONNECTION_COUNT_LIMIT 1238L -#define ERROR_LOGIN_TIME_RESTRICTION 1239L -#define ERROR_LOGIN_WKSTA_RESTRICTION 1240L -#define ERROR_INCORRECT_ADDRESS 1241L -#define ERROR_ALREADY_REGISTERED 1242L -#define ERROR_SERVICE_NOT_FOUND 1243L -#define ERROR_NOT_AUTHENTICATED 1244L -#define ERROR_NOT_LOGGED_ON 1245L -#define ERROR_CONTINUE 1246L -#define ERROR_ALREADY_INITIALIZED 1247L -#define ERROR_NO_MORE_DEVICES 1248L -#define ERROR_NO_SUCH_SITE 1249L -#define ERROR_DOMAIN_CONTROLLER_EXISTS 1250L -#define ERROR_ONLY_IF_CONNECTED 1251L -#define ERROR_OVERRIDE_NOCHANGES 1252L -#define ERROR_BAD_USER_PROFILE 1253L -#define ERROR_NOT_SUPPORTED_ON_SBS 1254L -#define ERROR_SERVER_SHUTDOWN_IN_PROGRESS 1255L -#define ERROR_HOST_DOWN 1256L -#define ERROR_NON_ACCOUNT_SID 1257L -#define ERROR_NON_DOMAIN_SID 1258L -#define ERROR_APPHELP_BLOCK 1259L -#define ERROR_ACCESS_DISABLED_BY_POLICY 1260L -#define ERROR_REG_NAT_CONSUMPTION 1261L -#define ERROR_CSCSHARE_OFFLINE 1262L -#define ERROR_PKINIT_FAILURE 1263L -#define ERROR_SMARTCARD_SUBSYSTEM_FAILURE 1264L -#define ERROR_DOWNGRADE_DETECTED 1265L -#define SEC_E_SMARTCARD_CERT_REVOKED 1266L -#define SEC_E_ISSUING_CA_UNTRUSTED 1267L -#define SEC_E_REVOCATION_OFFLINE_C 1268L -#define SEC_E_PKINIT_CLIENT_FAILUR 1269L -#define SEC_E_SMARTCARD_CERT_EXPIRED 1270L -#define ERROR_MACHINE_LOCKED 1271L -#define ERROR_CALLBACK_SUPPLIED_INVALID_DATA 1273L -#define ERROR_SYNC_FOREGROUND_REFRESH_REQUIRED 1274L -#define ERROR_DRIVER_BLOCKED 1275L -#define ERROR_INVALID_IMPORT_OF_NON_DLL 1276L -#define ERROR_ACCESS_DISABLED_WEBBLADE 1277L -#define ERROR_ACCESS_DISABLED_WEBBLADE_TAMPER 1278L -#define ERROR_RECOVERY_FAILURE 1279L -#define ERROR_ALREADY_FIBER 1280L -#define ERROR_ALREADY_THREAD 1281L -#define ERROR_STACK_BUFFER_OVERRUN 1282L -#define ERROR_PARAMETER_QUOTA_EXCEEDED 1283L -#define ERROR_DEBUGGER_INACTIVE 1284L -#define ERROR_NOT_ALL_ASSIGNED 1300L -#define ERROR_SOME_NOT_MAPPED 1301L -#define ERROR_NO_QUOTAS_FOR_ACCOUNT 1302L -#define ERROR_LOCAL_USER_SESSION_KEY 1303L -#define ERROR_NULL_LM_PASSWORD 1304L -#define ERROR_UNKNOWN_REVISION 1305L -#define ERROR_REVISION_MISMATCH 1306L -#define ERROR_INVALID_OWNER 1307L -#define ERROR_INVALID_PRIMARY_GROUP 1308L -#define ERROR_NO_IMPERSONATION_TOKEN 1309L -#define ERROR_CANT_DISABLE_MANDATORY 1310L -#define ERROR_NO_LOGON_SERVERS 1311L -#define ERROR_NO_SUCH_LOGON_SESSION 1312L -#define ERROR_NO_SUCH_PRIVILEGE 1313L -#define ERROR_PRIVILEGE_NOT_HELD 1314L -#define ERROR_INVALID_ACCOUNT_NAME 1315L -#define ERROR_USER_EXISTS 1316L -#define ERROR_NO_SUCH_USER 1317L -#define ERROR_GROUP_EXISTS 1318L -#define ERROR_NO_SUCH_GROUP 1319L -#define ERROR_MEMBER_IN_GROUP 1320L -#define ERROR_MEMBER_NOT_IN_GROUP 1321L -#define ERROR_LAST_ADMIN 1322L -#define ERROR_WRONG_PASSWORD 1323L -#define ERROR_ILL_FORMED_PASSWORD 1324L -#define ERROR_PASSWORD_RESTRICTION 1325L -#define ERROR_LOGON_FAILURE 1326L -#define ERROR_ACCOUNT_RESTRICTION 1327L -#define ERROR_INVALID_LOGON_HOURS 1328L -#define ERROR_INVALID_WORKSTATION 1329L -#define ERROR_PASSWORD_EXPIRED 1330L -#define ERROR_ACCOUNT_DISABLED 1331L -#define ERROR_NONE_MAPPED 1332L -#define ERROR_TOO_MANY_LUIDS_REQUESTED 1333L -#define ERROR_LUIDS_EXHAUSTED 1334L -#define ERROR_INVALID_SUB_AUTHORITY 1335L -#define ERROR_INVALID_ACL 1336L -#define ERROR_INVALID_SID 1337L -#define ERROR_INVALID_SECURITY_DESCR 1338L -#define ERROR_BAD_INHERITANCE_ACL 1340L -#define ERROR_SERVER_DISABLED 1341L -#define ERROR_SERVER_NOT_DISABLED 1342L -#define ERROR_INVALID_ID_AUTHORITY 1343L -#define ERROR_ALLOTTED_SPACE_EXCEEDED 1344L -#define ERROR_INVALID_GROUP_ATTRIBUTES 1345L -#define ERROR_BAD_IMPERSONATION_LEVEL 1346L -#define ERROR_CANT_OPEN_ANONYMOUS 1347L -#define ERROR_BAD_VALIDATION_CLASS 1348L -#define ERROR_BAD_TOKEN_TYPE 1349L -#define ERROR_NO_SECURITY_ON_OBJECT 1350L -#define ERROR_CANT_ACCESS_DOMAIN_INFO 1351L -#define ERROR_INVALID_SERVER_STATE 1352L -#define ERROR_INVALID_DOMAIN_STATE 1353L -#define ERROR_INVALID_DOMAIN_ROLE 1354L -#define ERROR_NO_SUCH_DOMAIN 1355L -#define ERROR_DOMAIN_EXISTS 1356L -#define ERROR_DOMAIN_LIMIT_EXCEEDED 1357L -#define ERROR_INTERNAL_DB_CORRUPTION 1358L -#define ERROR_INTERNAL_ERROR 1359L -#define ERROR_GENERIC_NOT_MAPPED 1360L -#define ERROR_BAD_DESCRIPTOR_FORMAT 1361L -#define ERROR_NOT_LOGON_PROCESS 1362L -#define ERROR_LOGON_SESSION_EXISTS 1363L -#define ERROR_NO_SUCH_PACKAGE 1364L -#define ERROR_BAD_LOGON_SESSION_STATE 1365L -#define ERROR_LOGON_SESSION_COLLISION 1366L -#define ERROR_INVALID_LOGON_TYPE 1367L -#define ERROR_CANNOT_IMPERSONATE 1368L -#define ERROR_RXACT_INVALID_STATE 1369L -#define ERROR_RXACT_COMMIT_FAILURE 1370L -#define ERROR_SPECIAL_ACCOUNT 1371L -#define ERROR_SPECIAL_GROUP 1372L -#define ERROR_SPECIAL_USER 1373L -#define ERROR_MEMBERS_PRIMARY_GROUP 1374L -#define ERROR_TOKEN_ALREADY_IN_USE 1375L -#define ERROR_NO_SUCH_ALIAS 1376L -#define ERROR_MEMBER_NOT_IN_ALIAS 1377L -#define ERROR_MEMBER_IN_ALIAS 1378L -#define ERROR_ALIAS_EXISTS 1379L -#define ERROR_LOGON_NOT_GRANTED 1380L -#define ERROR_TOO_MANY_SECRETS 1381L -#define ERROR_SECRET_TOO_LONG 1382L -#define ERROR_INTERNAL_DB_ERROR 1383L -#define ERROR_TOO_MANY_CONTEXT_IDS 1384L -#define ERROR_LOGON_TYPE_NOT_GRANTED 1385L -#define ERROR_NT_CROSS_ENCRYPTION_REQUIRED 1386L -#define ERROR_NO_SUCH_MEMBER 1387L -#define ERROR_INVALID_MEMBER 1388L -#define ERROR_TOO_MANY_SIDS 1389L -#define ERROR_LM_CROSS_ENCRYPTION_REQUIRED 1390L -#define ERROR_NO_INHERITANCE 1391L -#define ERROR_FILE_CORRUPT 1392L -#define ERROR_DISK_CORRUPT 1393L -#define ERROR_NO_USER_SESSION_KEY 1394L -#define ERROR_LICENSE_QUOTA_EXCEEDED 1395L -#define ERROR_WRONG_TARGET_NAME 1396L -#define ERROR_MUTUAL_AUTH_FAILED 1397L -#define ERROR_TIME_SKEW 1398L -#define ERROR_CURRENT_DOMAIN_NOT_ALLOWED 1399L -#define ERROR_INVALID_WINDOW_HANDLE 1400L -#define ERROR_INVALID_MENU_HANDLE 1401L -#define ERROR_INVALID_CURSOR_HANDLE 1402L -#define ERROR_INVALID_ACCEL_HANDLE 1403L -#define ERROR_INVALID_HOOK_HANDLE 1404L -#define ERROR_INVALID_DWP_HANDLE 1405L -#define ERROR_TLW_WITH_WSCHILD 1406L -#define ERROR_CANNOT_FIND_WND_CLASS 1407L -#define ERROR_WINDOW_OF_OTHER_THREAD 1408L -#define ERROR_HOTKEY_ALREADY_REGISTERED 1409L -#define ERROR_CLASS_ALREADY_EXISTS 1410L -#define ERROR_CLASS_DOES_NOT_EXIST 1411L -#define ERROR_CLASS_HAS_WINDOWS 1412L -#define ERROR_INVALID_INDEX 1413L -#define ERROR_INVALID_ICON_HANDLE 1414L -#define ERROR_PRIVATE_DIALOG_INDEX 1415L -#define ERROR_LISTBOX_ID_NOT_FOUND 1416L -#define ERROR_NO_WILDCARD_CHARACTERS 1417L -#define ERROR_CLIPBOARD_NOT_OPEN 1418L -#define ERROR_HOTKEY_NOT_REGISTERED 1419L -#define ERROR_WINDOW_NOT_DIALOG 1420L -#define ERROR_CONTROL_ID_NOT_FOUND 1421L -#define ERROR_INVALID_COMBOBOX_MESSAGE 1422L -#define ERROR_WINDOW_NOT_COMBOBOX 1423L -#define ERROR_INVALID_EDIT_HEIGHT 1424L -#define ERROR_DC_NOT_FOUND 1425L -#define ERROR_INVALID_HOOK_FILTER 1426L -#define ERROR_INVALID_FILTER_PROC 1427L -#define ERROR_HOOK_NEEDS_HMOD 1428L -#define ERROR_GLOBAL_ONLY_HOOK 1429L -#define ERROR_JOURNAL_HOOK_SET 1430L -#define ERROR_HOOK_NOT_INSTALLED 1431L -#define ERROR_INVALID_LB_MESSAGE 1432L -#define ERROR_SETCOUNT_ON_BAD_LB 1433L -#define ERROR_LB_WITHOUT_TABSTOPS 1434L -#define ERROR_DESTROY_OBJECT_OF_OTHER_THREAD 1435L -#define ERROR_CHILD_WINDOW_MENU 1436L -#define ERROR_NO_SYSTEM_MENU 1437L -#define ERROR_INVALID_MSGBOX_STYLE 1438L -#define ERROR_INVALID_SPI_VALUE 1439L -#define ERROR_SCREEN_ALREADY_LOCKED 1440L -#define ERROR_HWNDS_HAVE_DIFF_PARENT 1441L -#define ERROR_NOT_CHILD_WINDOW 1442L -#define ERROR_INVALID_GW_COMMAND 1443L -#define ERROR_INVALID_THREAD_ID 1444L -#define ERROR_NON_MDICHILD_WINDOW 1445L -#define ERROR_POPUP_ALREADY_ACTIVE 1446L -#define ERROR_NO_SCROLLBARS 1447L -#define ERROR_INVALID_SCROLLBAR_RANGE 1448L -#define ERROR_INVALID_SHOWWIN_COMMAND 1449L -#define ERROR_NO_SYSTEM_RESOURCES 1450L -#define ERROR_NONPAGED_SYSTEM_RESOURCES 1451L -#define ERROR_PAGED_SYSTEM_RESOURCES 1452L -#define ERROR_WORKING_SET_QUOTA 1453L -#define ERROR_PAGEFILE_QUOTA 1454L -#define ERROR_COMMITMENT_LIMIT 1455L -#define ERROR_MENU_ITEM_NOT_FOUND 1456L -#define ERROR_INVALID_KEYBOARD_HANDLE 1457L -#define ERROR_HOOK_TYPE_NOT_ALLOWED 1458L -#define ERROR_REQUIRES_INTERACTIVE_WINDOWSTATION 1459L -#define ERROR_TIMEOUT 1460L -#define ERROR_INVALID_MONITOR_HANDLE 1461L -#define ERROR_EVENTLOG_FILE_CORRUPT 1500L -#define ERROR_EVENTLOG_CANT_START 1501L -#define ERROR_LOG_FILE_FULL 1502L -#define ERROR_EVENTLOG_FILE_CHANGED 1503L -#define ERROR_INSTALL_SERVICE_FAILURE 1601L -#define ERROR_INSTALL_USEREXIT 1602L -#define ERROR_INSTALL_FAILURE 1603L -#define ERROR_INSTALL_SUSPEND 1604L -#define ERROR_UNKNOWN_PRODUCT 1605L -#define ERROR_UNKNOWN_FEATURE 1606L -#define ERROR_UNKNOWN_COMPONENT 1607L -#define ERROR_UNKNOWN_PROPERTY 1608L -#define ERROR_INVALID_HANDLE_STATE 1609L -#define ERROR_BAD_CONFIGURATION 1610L -#define ERROR_INDEX_ABSENT 1611L -#define ERROR_INSTALL_SOURCE_ABSENT 1612L -#define ERROR_INSTALL_PACKAGE_VERSION 1613L -#define ERROR_PRODUCT_UNINSTALLED 1614L -#define ERROR_BAD_QUERY_SYNTAX 1615L -#define ERROR_INVALID_FIELD 1616L -#define ERROR_DEVICE_REMOVED 1617L -#define ERROR_INSTALL_ALREADY_RUNNING 1618L -#define ERROR_INSTALL_PACKAGE_OPEN_FAILED 1619L -#define ERROR_INSTALL_PACKAGE_INVALID 1620L -#define ERROR_INSTALL_UI_FAILURE 1621L -#define ERROR_INSTALL_LOG_FAILURE 1622L -#define ERROR_INSTALL_LANGUAGE_UNSUPPORTED 1623L -#define ERROR_INSTALL_TRANSFORM_FAILURE 1624L -#define ERROR_INSTALL_PACKAGE_REJECTED 1625L -#define ERROR_FUNCTION_NOT_CALLED 1626L -#define ERROR_FUNCTION_FAILED 1627L -#define ERROR_INVALID_TABLE 1628L -#define ERROR_DATATYPE_MISMATCH 1629L -#define ERROR_UNSUPPORTED_TYPE 1630L -#define ERROR_CREATE_FAILED 1631L -#define ERROR_INSTALL_TEMP_UNWRITABLE 1632L -#define ERROR_INSTALL_PLATFORM_UNSUPPORTED 1633L -#define ERROR_INSTALL_NOTUSED 1634L -#define ERROR_PATCH_PACKAGE_OPEN_FAILED 1635L -#define ERROR_PATCH_PACKAGE_INVALID 1636L -#define ERROR_PATCH_PACKAGE_UNSUPPORTED 1637L -#define ERROR_PRODUCT_VERSION 1638L -#define ERROR_INVALID_COMMAND_LINE 1639L -#define ERROR_INSTALL_REMOTE_DISALLOWED 1640L -#define ERROR_SUCCESS_REBOOT_INITIATED 1641L -#define ERROR_PATCH_TARGET_NOT_FOUND 1642L -#define ERROR_PATCH_PACKAGE_REJECTED 1643L -#define ERROR_INSTALL_TRANSFORM_REJECTED 1644L -#define ERROR_INSTALL_REMOTE_PROHIBITED 1645L -#define RPC_S_INVALID_STRING_BINDING 1700L -#define RPC_S_WRONG_KIND_OF_BINDING 1701L -#define RPC_S_INVALID_BINDING 1702L -#define RPC_S_PROTSEQ_NOT_SUPPORTED 1703L -#define RPC_S_INVALID_RPC_PROTSEQ 1704L -#define RPC_S_INVALID_STRING_UUID 1705L -#define RPC_S_INVALID_ENDPOINT_FORMAT 1706L -#define RPC_S_INVALID_NET_ADDR 1707L -#define RPC_S_NO_ENDPOINT_FOUND 1708L -#define RPC_S_INVALID_TIMEOUT 1709L -#define RPC_S_OBJECT_NOT_FOUND 1710L -#define RPC_S_ALREADY_REGISTERED 1711L -#define RPC_S_TYPE_ALREADY_REGISTERED 1712L -#define RPC_S_ALREADY_LISTENING 1713L -#define RPC_S_NO_PROTSEQS_REGISTERED 1714L -#define RPC_S_NOT_LISTENING 1715L -#define RPC_S_UNKNOWN_MGR_TYPE 1716L -#define RPC_S_UNKNOWN_IF 1717L -#define RPC_S_NO_BINDINGS 1718L -#define RPC_S_NO_PROTSEQS 1719L -#define RPC_S_CANT_CREATE_ENDPOINT 1720L -#define RPC_S_OUT_OF_RESOURCES 1721L -#define RPC_S_SERVER_UNAVAILABLE 1722L -#define RPC_S_SERVER_TOO_BUSY 1723L -#define RPC_S_INVALID_NETWORK_OPTIONS 1724L -#define RPC_S_NO_CALL_ACTIVE 1725L -#define RPC_S_CALL_FAILED 1726L -#define RPC_S_CALL_FAILED_DNE 1727L -#define RPC_S_PROTOCOL_ERROR 1728L -#define RPC_S_UNSUPPORTED_TRANS_SYN 1730L -#define RPC_S_UNSUPPORTED_TYPE 1732L -#define RPC_S_INVALID_TAG 1733L -#define RPC_S_INVALID_BOUND 1734L -#define RPC_S_NO_ENTRY_NAME 1735L -#define RPC_S_INVALID_NAME_SYNTAX 1736L -#define RPC_S_UNSUPPORTED_NAME_SYNTAX 1737L -#define RPC_S_UUID_NO_ADDRESS 1739L -#define RPC_S_DUPLICATE_ENDPOINT 1740L -#define RPC_S_UNKNOWN_AUTHN_TYPE 1741L -#define RPC_S_MAX_CALLS_TOO_SMALL 1742L -#define RPC_S_STRING_TOO_LONG 1743L -#define RPC_S_PROTSEQ_NOT_FOUND 1744L -#define RPC_S_PROCNUM_OUT_OF_RANGE 1745L -#define RPC_S_BINDING_HAS_NO_AUTH 1746L -#define RPC_S_UNKNOWN_AUTHN_SERVICE 1747L -#define RPC_S_UNKNOWN_AUTHN_LEVEL 1748L -#define RPC_S_INVALID_AUTH_IDENTITY 1749L -#define RPC_S_UNKNOWN_AUTHZ_SERVICE 1750L -#define EPT_S_INVALID_ENTRY 1751L -#define EPT_S_CANT_PERFORM_OP 1752L -#define EPT_S_NOT_REGISTERED 1753L -#define RPC_S_NOTHING_TO_EXPORT 1754L -#define RPC_S_INCOMPLETE_NAME 1755L -#define RPC_S_INVALID_VERS_OPTION 1756L -#define RPC_S_NO_MORE_MEMBERS 1757L -#define RPC_S_NOT_ALL_OBJS_UNEXPORTED 1758L -#define RPC_S_INTERFACE_NOT_FOUND 1759L -#define RPC_S_ENTRY_ALREADY_EXISTS 1760L -#define RPC_S_ENTRY_NOT_FOUND 1761L -#define RPC_S_NAME_SERVICE_UNAVAILABLE 1762L -#define RPC_S_INVALID_NAF_ID 1763L -#define RPC_S_CANNOT_SUPPORT 1764L -#define RPC_S_NO_CONTEXT_AVAILABLE 1765L -#define RPC_S_INTERNAL_ERROR 1766L -#define RPC_S_ZERO_DIVIDE 1767L -#define RPC_S_ADDRESS_ERROR 1768L -#define RPC_S_FP_DIV_ZERO 1769L -#define RPC_S_FP_UNDERFLOW 1770L -#define RPC_S_FP_OVERFLOW 1771L -#define RPC_X_NO_MORE_ENTRIES 1772L -#define RPC_X_SS_CHAR_TRANS_OPEN_FAIL 1773L -#define RPC_X_SS_CHAR_TRANS_SHORT_FILE 1774L -#define RPC_X_SS_IN_NULL_CONTEXT 1775L -#define RPC_X_SS_CONTEXT_DAMAGED 1777L -#define RPC_X_SS_HANDLES_MISMATCH 1778L -#define RPC_X_SS_CANNOT_GET_CALL_HANDLE 1779L -#define RPC_X_NULL_REF_POINTER 1780L -#define RPC_X_ENUM_VALUE_OUT_OF_RANGE 1781L -#define RPC_X_BYTE_COUNT_TOO_SMALL 1782L -#define RPC_X_BAD_STUB_DATA 1783L -#define ERROR_INVALID_USER_BUFFER 1784L -#define ERROR_UNRECOGNIZED_MEDIA 1785L -#define ERROR_NO_TRUST_LSA_SECRET 1786L -#define ERROR_NO_TRUST_SAM_ACCOUNT 1787L -#define ERROR_TRUSTED_DOMAIN_FAILURE 1788L -#define ERROR_TRUSTED_RELATIONSHIP_FAILURE 1789L -#define ERROR_TRUST_FAILURE 1790L -#define RPC_S_CALL_IN_PROGRESS 1791L -#define ERROR_NETLOGON_NOT_STARTED 1792L -#define ERROR_ACCOUNT_EXPIRED 1793L -#define ERROR_REDIRECTOR_HAS_OPEN_HANDLES 1794L -#define ERROR_PRINTER_DRIVER_ALREADY_INSTALLED 1795L -#define ERROR_UNKNOWN_PORT 1796L -#define ERROR_UNKNOWN_PRINTER_DRIVER 1797L -#define ERROR_UNKNOWN_PRINTPROCESSOR 1798L -#define ERROR_INVALID_SEPARATOR_FILE 1799L -#define ERROR_INVALID_PRIORITY 1800L -#define ERROR_INVALID_PRINTER_NAME 1801L -#define ERROR_PRINTER_ALREADY_EXISTS 1802L -#define ERROR_INVALID_PRINTER_COMMAND 1803L -#define ERROR_INVALID_DATATYPE 1804L -#define ERROR_INVALID_ENVIRONMENT 1805L -#define RPC_S_NO_MORE_BINDINGS 1806L -#define ERROR_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT 1807L -#define ERROR_NOLOGON_WORKSTATION_TRUST_ACCOUNT 1808L -#define ERROR_NOLOGON_SERVER_TRUST_ACCOUNT 1809L -#define ERROR_DOMAIN_TRUST_INCONSISTENT 1810L -#define ERROR_SERVER_HAS_OPEN_HANDLES 1811L -#define ERROR_RESOURCE_DATA_NOT_FOUND 1812L -#define ERROR_RESOURCE_TYPE_NOT_FOUND 1813L -#define ERROR_RESOURCE_NAME_NOT_FOUND 1814L -#define ERROR_RESOURCE_LANG_NOT_FOUND 1815L -#define ERROR_NOT_ENOUGH_QUOTA 1816L -#define RPC_S_NO_INTERFACES 1817L -#define RPC_S_CALL_CANCELLED 1818L -#define RPC_S_BINDING_INCOMPLETE 1819L -#define RPC_S_COMM_FAILURE 1820L -#define RPC_S_UNSUPPORTED_AUTHN_LEVEL 1821L -#define RPC_S_NO_PRINC_NAME 1822L -#define RPC_S_NOT_RPC_ERROR 1823L -#define RPC_S_UUID_LOCAL_ONLY 1824L -#define RPC_S_SEC_PKG_ERROR 1825L -#define RPC_S_NOT_CANCELLED 1826L -#define RPC_X_INVALID_ES_ACTION 1827L -#define RPC_X_WRONG_ES_VERSION 1828L -#define RPC_X_WRONG_STUB_VERSION 1829L -#define RPC_X_INVALID_PIPE_OBJECT 1830L -#define RPC_X_WRONG_PIPE_ORDER 1831L -#define RPC_X_WRONG_PIPE_VERSION 1832L -#define RPC_S_GROUP_MEMBER_NOT_FOUND 1898L -#define EPT_S_CANT_CREATE 1899L -#define RPC_S_INVALID_OBJECT 1900L -#define ERROR_INVALID_TIME 1901L -#define ERROR_INVALID_FORM_NAME 1902L -#define ERROR_INVALID_FORM_SIZE 1903L -#define ERROR_ALREADY_WAITING 1904L -#define ERROR_PRINTER_DELETED 1905L -#define ERROR_INVALID_PRINTER_STATE 1906L -#define ERROR_PASSWORD_MUST_CHANGE 1907L -#define ERROR_DOMAIN_CONTROLLER_NOT_FOUND 1908L -#define ERROR_ACCOUNT_LOCKED_OUT 1909L -#define OR_INVALID_OXID 1910L -#define OR_INVALID_OID 1911L -#define OR_INVALID_SET 1912L -#define RPC_S_SEND_INCOMPLETE 1913L -#define RPC_S_INVALID_ASYNC_HANDLE 1914L -#define RPC_S_INVALID_ASYNC_CALL 1915L -#define RPC_X_PIPE_CLOSED 1916L -#define RPC_X_PIPE_DISCIPLINE_ERROR 1917L -#define RPC_X_PIPE_EMPTY 1918L -#define ERROR_NO_SITENAME 1919L -#define ERROR_CANT_ACCESS_FILE 1920L -#define ERROR_CANT_RESOLVE_FILENAME 1921L -#define RPC_S_ENTRY_TYPE_MISMATCH 1922L -#define RPC_S_NOT_ALL_OBJS_EXPORTED 1923L -#define RPC_S_INTERFACE_NOT_EXPORTED 1924L -#define RPC_S_PROFILE_NOT_ADDED 1925L -#define RPC_S_PRF_ELT_NOT_ADDED 1926L -#define RPC_S_PRF_ELT_NOT_REMOVED 1927L -#define RPC_S_GRP_ELT_NOT_ADDED 1928L -#define RPC_S_GRP_ELT_NOT_REMOVED 1929L -#define ERROR_KM_DRIVER_BLOCKED 1930L -#define ERROR_CONTEXT_EXPIRED 1931L -#define ERROR_PER_USER_TRUST_QUOTA_EXCEEDED 1932L -#define ERROR_ALL_USER_TRUST_QUOTA_EXCEEDED 1933L -#define ERROR_USER_DELETE_TRUST_QUOTA_EXCEEDED 1934L -#define ERROR_INVALID_PIXEL_FORMAT 2000L -#define ERROR_BAD_DRIVER 2001L -#define ERROR_INVALID_WINDOW_STYLE 2002L -#define ERROR_METAFILE_NOT_SUPPORTED 2003L -#define ERROR_TRANSFORM_NOT_SUPPORTED 2004L -#define ERROR_CLIPPING_NOT_SUPPORTED 2005L -#define ERROR_INVALID_CMM 2010L -#define ERROR_INVALID_PROFILE 2011L -#define ERROR_TAG_NOT_FOUND 2012L -#define ERROR_TAG_NOT_PRESENT 2013L -#define ERROR_DUPLICATE_TAG 2014L -#define ERROR_PROFILE_NOT_ASSOCIATED_WITH_DEVICE 2015L -#define ERROR_PROFILE_NOT_FOUND 2016L -#define ERROR_INVALID_COLORSPACE 2017L -#define ERROR_ICM_NOT_ENABLED 2018L -#define ERROR_DELETING_ICM_XFORM 2019L -#define ERROR_INVALID_TRANSFORM 2020L -#define ERROR_COLORSPACE_MISMATCH 2021L -#define ERROR_INVALID_COLORINDEX 2022L -#define ERROR_CONNECTED_OTHER_PASSWORD 2108L -#define ERROR_CONNECTED_OTHER_PASSWORD_DEFAULT 2109L -#define ERROR_BAD_USERNAME 2202L -#define ERROR_NOT_CONNECTED 2250L -#define ERROR_OPEN_FILES 2401L -#define ERROR_ACTIVE_CONNECTIONS 2402L -#define ERROR_DEVICE_IN_USE 2404L -#define ERROR_UNKNOWN_PRINT_MONITOR 3000L -#define ERROR_PRINTER_DRIVER_IN_USE 3001L -#define ERROR_SPOOL_FILE_NOT_FOUND 3002L -#define ERROR_SPL_NO_STARTDOC 3003L -#define ERROR_SPL_NO_ADDJOB 3004L -#define ERROR_PRINT_PROCESSOR_ALREADY_INSTALLED 3005L -#define ERROR_PRINT_MONITOR_ALREADY_INSTALLED 3006L -#define ERROR_INVALID_PRINT_MONITOR 3007L -#define ERROR_PRINT_MONITOR_IN_USE 3008L -#define ERROR_PRINTER_HAS_JOBS_QUEUED 3009L -#define ERROR_SUCCESS_REBOOT_REQUIRED 3010L -#define ERROR_SUCCESS_RESTART_REQUIRED 3011L -#define ERROR_PRINTER_NOT_FOUND 3012L -#define ERROR_PRINTER_DRIVER_WARNED 3013L -#define ERROR_PRINTER_DRIVER_BLOCKED 3014L -#define ERROR_WINS_INTERNAL 4000L -#define ERROR_CAN_NOT_DEL_LOCAL_WINS 4001L -#define ERROR_STATIC_INIT 4002L -#define ERROR_INC_BACKUP 4003L -#define ERROR_FULL_BACKUP 4004L -#define ERROR_REC_NON_EXISTENT 4005L -#define ERROR_RPL_NOT_ALLOWED 4006L -#define ERROR_DHCP_ADDRESS_CONFLICT 4100L -#define ERROR_WMI_GUID_NOT_FOUND 4200L -#define ERROR_WMI_INSTANCE_NOT_FOUND 4201L -#define ERROR_WMI_ITEMID_NOT_FOUND 4202L -#define ERROR_WMI_TRY_AGAIN 4203L -#define ERROR_WMI_DP_NOT_FOUND 4204L -#define ERROR_WMI_UNRESOLVED_INSTANCE_REF 4205L -#define ERROR_WMI_ALREADY_ENABLED 4206L -#define ERROR_WMI_GUID_DISCONNECTED 4207L -#define ERROR_WMI_SERVER_UNAVAILABLE 4208L -#define ERROR_WMI_DP_FAILED 4209L -#define ERROR_WMI_INVALID_MOF 4210L -#define ERROR_WMI_INVALID_REGINFO 4211L -#define ERROR_WMI_ALREADY_DISABLED 4212L -#define ERROR_WMI_READ_ONLY 4213L -#define ERROR_WMI_SET_FAILURE 4214L -#define ERROR_INVALID_MEDIA 4300L -#define ERROR_INVALID_LIBRARY 4301L -#define ERROR_INVALID_MEDIA_POOL 4302L -#define ERROR_DRIVE_MEDIA_MISMATCH 4303L -#define ERROR_MEDIA_OFFLINE 4304L -#define ERROR_LIBRARY_OFFLINE 4305L -#define ERROR_EMPTY 4306L -#define ERROR_NOT_EMPTY 4307L -#define ERROR_MEDIA_UNAVAILABLE 4308L -#define ERROR_RESOURCE_DISABLED 4309L -#define ERROR_INVALID_CLEANER 4310L -#define ERROR_UNABLE_TO_CLEAN 4311L -#define ERROR_OBJECT_NOT_FOUND 4312L -#define ERROR_DATABASE_FAILURE 4313L -#define ERROR_DATABASE_FULL 4314L -#define ERROR_MEDIA_INCOMPATIBLE 4315L -#define ERROR_RESOURCE_NOT_PRESENT 4316L -#define ERROR_INVALID_OPERATION 4317L -#define ERROR_MEDIA_NOT_AVAILABLE 4318L -#define ERROR_DEVICE_NOT_AVAILABLE 4319L -#define ERROR_REQUEST_REFUSED 4320L -#define ERROR_INVALID_DRIVE_OBJECT 4321L -#define ERROR_LIBRARY_FULL 4322L -#define ERROR_MEDIUM_NOT_ACCESSIBLE 4323L -#define ERROR_UNABLE_TO_LOAD_MEDIUM 4324L -#define ERROR_UNABLE_TO_INVENTORY_DRIVE 4325L -#define ERROR_UNABLE_TO_INVENTORY_SLOT 4326L -#define ERROR_UNABLE_TO_INVENTORY_TRANSPORT 4327L -#define ERROR_TRANSPORT_FULL 4328L -#define ERROR_CONTROLLING_IEPORT 4329L -#define ERROR_UNABLE_TO_EJECT_MOUNTED_MEDIA 4330L -#define ERROR_CLEANER_SLOT_SET 4331L -#define ERROR_CLEANER_SLOT_NOT_SET 4332L -#define ERROR_CLEANER_CARTRIDGE_SPENT 4333L -#define ERROR_UNEXPECTED_OMID 4334L -#define ERROR_CANT_DELETE_LAST_ITEM 4335L -#define ERROR_MESSAGE_EXCEEDS_MAX_SIZE 4336L -#define ERROR_VOLUME_CONTAINS_SYS_FILES 4337L -#define ERROR_INDIGENOUS_TYPE 4338L -#define ERROR_NO_SUPPORTING_DRIVES 4339L -#define ERROR_CLEANER_CARTRIDGE_INSTALLED 4340L -#define ERROR_FILE_OFFLINE 4350L -#define ERROR_REMOTE_STORAGE_NOT_ACTIVE 4351L -#define ERROR_REMOTE_STORAGE_MEDIA_ERROR 4352L -#define ERROR_NOT_A_REPARSE_POINT 4390L -#define ERROR_REPARSE_ATTRIBUTE_CONFLICT 4391L -#define ERROR_INVALID_REPARSE_DATA 4392L -#define ERROR_REPARSE_TAG_INVALID 4393L -#define ERROR_REPARSE_TAG_MISMATCH 4394L -#define ERROR_VOLUME_NOT_SIS_ENABLED 4500L -#define ERROR_DEPENDENT_RESOURCE_EXISTS 5001L -#define ERROR_DEPENDENCY_NOT_FOUND 5002L -#define ERROR_DEPENDENCY_ALREADY_EXISTS 5003L -#define ERROR_RESOURCE_NOT_ONLINE 5004L -#define ERROR_HOST_NODE_NOT_AVAILABLE 5005L -#define ERROR_RESOURCE_NOT_AVAILABLE 5006L -#define ERROR_RESOURCE_NOT_FOUND 5007L -#define ERROR_SHUTDOWN_CLUSTER 5008L -#define ERROR_CANT_EVICT_ACTIVE_NODE 5009L -#define ERROR_OBJECT_ALREADY_EXISTS 5010L -#define ERROR_OBJECT_IN_LIST 5011L -#define ERROR_GROUP_NOT_AVAILABLE 5012L -#define ERROR_GROUP_NOT_FOUND 5013L -#define ERROR_GROUP_NOT_ONLINE 5014L -#define ERROR_HOST_NODE_NOT_RESOURCE_OWNER 5015L -#define ERROR_HOST_NODE_NOT_GROUP_OWNER 5016L -#define ERROR_RESMON_CREATE_FAILED 5017L -#define ERROR_RESMON_ONLINE_FAILED 5018L -#define ERROR_RESOURCE_ONLINE 5019L -#define ERROR_QUORUM_RESOURCE 5020L -#define ERROR_NOT_QUORUM_CAPABLE 5021L -#define ERROR_CLUSTER_SHUTTING_DOWN 5022L -#define ERROR_INVALID_STATE 5023L -#define ERROR_RESOURCE_PROPERTIES_STORED 5024L -#define ERROR_NOT_QUORUM_CLASS 5025L -#define ERROR_CORE_RESOURCE 5026L -#define ERROR_QUORUM_RESOURCE_ONLINE_FAILED 5027L -#define ERROR_QUORUMLOG_OPEN_FAILED 5028L -#define ERROR_CLUSTERLOG_CORRUPT 5029L -#define ERROR_CLUSTERLOG_RECORD_EXCEEDS_MAXSIZE 5030L -#define ERROR_CLUSTERLOG_EXCEEDS_MAXSIZE 5031L -#define ERROR_CLUSTERLOG_CHKPOINT_NOT_FOUND 5032L -#define ERROR_CLUSTERLOG_NOT_ENOUGH_SPACE 5033L -#define ERROR_QUORUM_OWNER_ALIVE 5034L -#define ERROR_NETWORK_NOT_AVAILABLE 5035L -#define ERROR_NODE_NOT_AVAILABLE 5036L -#define ERROR_ALL_NODES_NOT_AVAILABLE 5037L -#define ERROR_RESOURCE_FAILED 5038L -#define ERROR_CLUSTER_INVALID_NODE 5039L -#define ERROR_CLUSTER_NODE_EXISTS 5040L -#define ERROR_CLUSTER_JOIN_IN_PROGRESS 5041L -#define ERROR_CLUSTER_NODE_NOT_FOUND 5042L -#define ERROR_CLUSTER_LOCAL_NODE_NOT_FOUND 5043L -#define ERROR_CLUSTER_NETWORK_EXISTS 5044L -#define ERROR_CLUSTER_NETWORK_NOT_FOUND 5045L -#define ERROR_CLUSTER_NETINTERFACE_EXISTS 5046L -#define ERROR_CLUSTER_NETINTERFACE_NOT_FOUND 5047L -#define ERROR_CLUSTER_INVALID_REQUEST 5048L -#define ERROR_CLUSTER_INVALID_NETWORK_PROVIDER 5049L -#define ERROR_CLUSTER_NODE_DOWN 5050L -#define ERROR_CLUSTER_NODE_UNREACHABLE 5051L -#define ERROR_CLUSTER_NODE_NOT_MEMBER 5052L -#define ERROR_CLUSTER_JOIN_NOT_IN_PROGRESS 5053L -#define ERROR_CLUSTER_INVALID_NETWORK 5054L -#define ERROR_CLUSTER_NODE_UP 5056L -#define ERROR_CLUSTER_IPADDR_IN_USE 5057L -#define ERROR_CLUSTER_NODE_NOT_PAUSED 5058L -#define ERROR_CLUSTER_NO_SECURITY_CONTEXT 5059L -#define ERROR_CLUSTER_NETWORK_NOT_INTERNAL 5060L -#define ERROR_CLUSTER_NODE_ALREADY_UP 5061L -#define ERROR_CLUSTER_NODE_ALREADY_DOWN 5062L -#define ERROR_CLUSTER_NETWORK_ALREADY_ONLINE 5063L -#define ERROR_CLUSTER_NETWORK_ALREADY_OFFLINE 5064L -#define ERROR_CLUSTER_NODE_ALREADY_MEMBER 5065L -#define ERROR_CLUSTER_LAST_INTERNAL_NETWORK 5066L -#define ERROR_CLUSTER_NETWORK_HAS_DEPENDENTS 5067L -#define ERROR_INVALID_OPERATION_ON_QUORUM 5068L -#define ERROR_DEPENDENCY_NOT_ALLOWED 5069L -#define ERROR_CLUSTER_NODE_PAUSED 5070L -#define ERROR_NODE_CANT_HOST_RESOURCE 5071L -#define ERROR_CLUSTER_NODE_NOT_READY 5072L -#define ERROR_CLUSTER_NODE_SHUTTING_DOWN 5073L -#define ERROR_CLUSTER_JOIN_ABORTED 5074L -#define ERROR_CLUSTER_INCOMPATIBLE_VERSIONS 5075L -#define ERROR_CLUSTER_MAXNUM_OF_RESOURCES_EXCEEDED 5076L -#define ERROR_CLUSTER_SYSTEM_CONFIG_CHANGED 5077L -#define ERROR_CLUSTER_RESOURCE_TYPE_NOT_FOUND 5078L -#define ERROR_CLUSTER_RESTYPE_NOT_SUPPORTED 5079L -#define ERROR_CLUSTER_RESNAME_NOT_FOUND 5080L -#define ERROR_CLUSTER_NO_RPC_PACKAGES_REGISTERED 5081L -#define ERROR_CLUSTER_OWNER_NOT_IN_PREFLIST 5082L -#define ERROR_CLUSTER_DATABASE_SEQMISMATCH 5083L -#define ERROR_RESMON_INVALID_STATE 5084L -#define ERROR_CLUSTER_GUM_NOT_LOCKER 5085L -#define ERROR_QUORUM_DISK_NOT_FOUND 5086L -#define ERROR_DATABASE_BACKUP_CORRUPT 5087L -#define ERROR_CLUSTER_NODE_ALREADY_HAS_DFS_ROOT 5088L -#define ERROR_RESOURCE_PROPERTY_UNCHANGEABLE 5089L -#define ERROR_CLUSTER_MEMBERSHIP_INVALID_STATE 5890L -#define ERROR_CLUSTER_QUORUMLOG_NOT_FOUND 5891L -#define ERROR_CLUSTER_MEMBERSHIP_HALT 5892L -#define ERROR_CLUSTER_INSTANCE_ID_MISMATCH 5893L -#define ERROR_CLUSTER_NETWORK_NOT_FOUND_FOR_IP 5894L -#define ERROR_CLUSTER_PROPERTY_DATA_TYPE_MISMATCH 5895L -#define ERROR_CLUSTER_EVICT_WITHOUT_CLEANUP 5896L -#define ERROR_CLUSTER_PARAMETER_MISMATCH 5897L -#define ERROR_NODE_CANNOT_BE_CLUSTERED 5898L -#define ERROR_CLUSTER_WRONG_OS_VERSION 5899L -#define ERROR_CLUSTER_CANT_CREATE_DUP_CLUSTER_NAME 5900L -#define ERROR_CLUSCFG_ALREADY_COMMITTED 5901L -#define ERROR_CLUSCFG_ROLLBACK_FAILED 5902L -#define ERROR_CLUSCFG_SYSTEM_DISK_DRIVE_LETTER_CONFLICT 5903L -#define ERROR_CLUSTER_OLD_VERSION 5904L -#define ERROR_CLUSTER_MISMATCHED_COMPUTER_ACCT_NAME 5905L -#define ERROR_ENCRYPTION_FAILED 6000L -#define ERROR_DECRYPTION_FAILED 6001L -#define ERROR_FILE_ENCRYPTED 6002L -#define ERROR_NO_RECOVERY_POLICY 6003L -#define ERROR_NO_EFS 6004L -#define ERROR_WRONG_EFS 6005L -#define ERROR_NO_USER_KEYS 6006L -#define ERROR_FILE_NOT_ENCRYPTED 6007L -#define ERROR_NOT_EXPORT_FORMAT 6008L -#define ERROR_FILE_READ_ONLY 6009L -#define ERROR_DIR_EFS_DISALLOWED 6010L -#define ERROR_EFS_SERVER_NOT_TRUSTED 6011L -#define ERROR_BAD_RECOVERY_POLICY 6012L -#define ERROR_EFS_ALG_BLOB_TOO_BIG 6013L -#define ERROR_VOLUME_NOT_SUPPORT_EFS 6014L -#define ERROR_EFS_DISABLED 6015L -#define ERROR_EFS_VERSION_NOT_SUPPORT 6016L -#define ERROR_NO_BROWSER_SERVERS_FOUND 6118L -#define SCHED_E_SERVICE_NOT_LOCALSYSTEM 6200L +#define ERROR_SUCCESS 0L +#define NO_ERROR 0L -#define ERROR_CTX_WINSTATION_NAME_INVALID 7001L -#define ERROR_CTX_INVALID_PD 7002L -#define ERROR_CTX_PD_NOT_FOUND 7003L -#define ERROR_CTX_WD_NOT_FOUND 7004L -#define ERROR_CTX_CANNOT_MAKE_EVENTLOG_ENTRY 7005L -#define ERROR_CTX_SERVICE_NAME_COLLISION 7006L -#define ERROR_CTX_CLOSE_PENDING 7007L -#define ERROR_CTX_NO_OUTBUF 7008L -#define ERROR_CTX_MODEM_INF_NOT_FOUND 7009L -#define ERROR_CTX_INVALID_MODEMNAME 7010L -#define ERROR_CTX_MODEM_RESPONSE_ERROR 7011L -#define ERROR_CTX_MODEM_RESPONSE_TIMEOUT 7012L -#define ERROR_CTX_MODEM_RESPONSE_NO_CARRIER 7013L -#define ERROR_CTX_MODEM_RESPONSE_NO_DIALTONE 7014L -#define ERROR_CTX_MODEM_RESPONSE_BUSY 7015L -#define ERROR_CTX_MODEM_RESPONSE_VOICE 7016L -#define ERROR_CTX_TD_ERROR 7017L -#define ERROR_CTX_WINSTATION_NOT_FOUND 7022L -#define ERROR_CTX_WINSTATION_ALREADY_EXISTS 7023L -#define ERROR_CTX_WINSTATION_BUSY 7024L -#define ERROR_CTX_BAD_VIDEO_MODE 7025L -#define ERROR_CTX_GRAPHICS_INVALID 7035L -#define ERROR_CTX_LOGON_DISABLED 7037L -#define ERROR_CTX_NOT_CONSOLE 7038L -#define ERROR_CTX_CLIENT_QUERY_TIMEOUT 7040L -#define ERROR_CTX_CONSOLE_DISCONNECT 7041L -#define ERROR_CTX_CONSOLE_CONNECT 7042L -#define ERROR_CTX_SHADOW_DENIED 7044L -#define ERROR_CTX_WINSTATION_ACCESS_DENIED 7045L -#define ERROR_CTX_INVALID_WD 7049L -#define ERROR_CTX_SHADOW_INVALID 7050L -#define ERROR_CTX_SHADOW_DISABLED 7051L -#define ERROR_CTX_CLIENT_LICENSE_IN_USE 7052L -#define ERROR_CTX_CLIENT_LICENSE_NOT_SET 7053L -#define ERROR_CTX_LICENSE_NOT_AVAILABLE 7054L -#define ERROR_CTX_LICENSE_CLIENT_INVALID 7055L -#define ERROR_CTX_LICENSE_EXPIRED 7056L -#define ERROR_CTX_SHADOW_NOT_RUNNING 7057L -#define ERROR_CTX_SHADOW_ENDED_BY_MODE_CHANGE 7058L -#define ERROR_ACTIVATION_COUNT_EXCEEDED 7059L +#define ERROR_INVALID_FUNCTION 1L +#define ERROR_FILE_NOT_FOUND 2L +#define ERROR_PATH_NOT_FOUND 3L +#define ERROR_TOO_MANY_OPEN_FILES 4L +#define ERROR_ACCESS_DENIED 5L +#define ERROR_INVALID_HANDLE 6L +#define ERROR_ARENA_TRASHED 7L +#define ERROR_NOT_ENOUGH_MEMORY 8L +#define ERROR_INVALID_BLOCK 9L +#define ERROR_BAD_ENVIRONMENT 10L +#define ERROR_BAD_FORMAT 11L +#define ERROR_INVALID_ACCESS 12L +#define ERROR_INVALID_DATA 13L +#define ERROR_OUTOFMEMORY 14L +#define ERROR_INVALID_DRIVE 15L +#define ERROR_CURRENT_DIRECTORY 16L +#define ERROR_NOT_SAME_DEVICE 17L +#define ERROR_NO_MORE_FILES 18L +#define ERROR_WRITE_PROTECT 19L +#define ERROR_BAD_UNIT 20L +#define ERROR_NOT_READY 21L +#define ERROR_BAD_COMMAND 22L +#define ERROR_CRC 23L +#define ERROR_BAD_LENGTH 24L +#define ERROR_SEEK 25L +#define ERROR_NOT_DOS_DISK 26L +#define ERROR_SECTOR_NOT_FOUND 27L +#define ERROR_OUT_OF_PAPER 28L +#define ERROR_WRITE_FAULT 29L +#define ERROR_READ_FAULT 30L +#define ERROR_GEN_FAILURE 31L +#define ERROR_SHARING_VIOLATION 32L +#define ERROR_LOCK_VIOLATION 33L +#define ERROR_WRONG_DISK 34L +#define ERROR_SHARING_BUFFER_EXCEEDED 36L +#define ERROR_HANDLE_EOF 38L +#define ERROR_HANDLE_DISK_FULL 39L +#define ERROR_NOT_SUPPORTED 50L +#define ERROR_REM_NOT_LIST 51L +#define ERROR_DUP_NAME 52L +#define ERROR_BAD_NETPATH 53L +#define ERROR_NETWORK_BUSY 54L +#define ERROR_DEV_NOT_EXIST 55L +#define ERROR_TOO_MANY_CMDS 56L +#define ERROR_ADAP_HDW_ERR 57L +#define ERROR_BAD_NET_RESP 58L +#define ERROR_UNEXP_NET_ERR 59L +#define ERROR_BAD_REM_ADAP 60L +#define ERROR_PRINTQ_FULL 61L +#define ERROR_NO_SPOOL_SPACE 62L +#define ERROR_PRINT_CANCELLED 63L +#define ERROR_NETNAME_DELETED 64L +#define ERROR_NETWORK_ACCESS_DENIED 65L +#define ERROR_BAD_DEV_TYPE 66L +#define ERROR_BAD_NET_NAME 67L +#define ERROR_TOO_MANY_NAMES 68L +#define ERROR_TOO_MANY_SESS 69L +#define ERROR_SHARING_PAUSED 70L +#define ERROR_REQ_NOT_ACCEP 71L +#define ERROR_REDIR_PAUSED 72L +#define ERROR_FILE_EXISTS 80L +#define ERROR_CANNOT_MAKE 82L +#define ERROR_FAIL_I24 83L +#define ERROR_OUT_OF_STRUCTURES 84L +#define ERROR_ALREADY_ASSIGNED 85L +#define ERROR_INVALID_PASSWORD 86L +#define ERROR_INVALID_PARAMETER 87L +#define ERROR_NET_WRITE_FAULT 88L +#define ERROR_NO_PROC_SLOTS 89L +#define ERROR_TOO_MANY_SEMAPHORES 100L +#define ERROR_EXCL_SEM_ALREADY_OWNED 101L +#define ERROR_SEM_IS_SET 102L +#define ERROR_TOO_MANY_SEM_REQUESTS 103L +#define ERROR_INVALID_AT_INTERRUPT_TIME 104L +#define ERROR_SEM_OWNER_DIED 105L +#define ERROR_SEM_USER_LIMIT 106L +#define ERROR_DISK_CHANGE 107L +#define ERROR_DRIVE_LOCKED 108L +#define ERROR_BROKEN_PIPE 109L +#define ERROR_OPEN_FAILED 110L +#define ERROR_BUFFER_OVERFLOW 111L +#define ERROR_DISK_FULL 112L +#define ERROR_NO_MORE_SEARCH_HANDLES 113L +#define ERROR_INVALID_TARGET_HANDLE 114L +#define ERROR_INVALID_CATEGORY 117L +#define ERROR_INVALID_VERIFY_SWITCH 118L +#define ERROR_BAD_DRIVER_LEVEL 119L +#define ERROR_CALL_NOT_IMPLEMENTED 120L +#define ERROR_SEM_TIMEOUT 121L +#define ERROR_INSUFFICIENT_BUFFER 122L +#define ERROR_INVALID_NAME 123L +#define ERROR_INVALID_LEVEL 124L +#define ERROR_NO_VOLUME_LABEL 125L +#define ERROR_MOD_NOT_FOUND 126L +#define ERROR_PROC_NOT_FOUND 127L +#define ERROR_WAIT_NO_CHILDREN 128L +#define ERROR_CHILD_NOT_COMPLETE 129L +#define ERROR_DIRECT_ACCESS_HANDLE 130L +#define ERROR_NEGATIVE_SEEK 131L +#define ERROR_SEEK_ON_DEVICE 132L +#define ERROR_IS_JOIN_TARGET 133L +#define ERROR_IS_JOINED 134L +#define ERROR_IS_SUBSTED 135L +#define ERROR_NOT_JOINED 136L +#define ERROR_NOT_SUBSTED 137L +#define ERROR_JOIN_TO_JOIN 138L +#define ERROR_SUBST_TO_SUBST 139L +#define ERROR_JOIN_TO_SUBST 140L +#define ERROR_SUBST_TO_JOIN 141L +#define ERROR_BUSY_DRIVE 142L +#define ERROR_SAME_DRIVE 143L +#define ERROR_DIR_NOT_ROOT 144L +#define ERROR_DIR_NOT_EMPTY 145L +#define ERROR_IS_SUBST_PATH 146L +#define ERROR_IS_JOIN_PATH 147L +#define ERROR_PATH_BUSY 148L +#define ERROR_IS_SUBST_TARGET 149L +#define ERROR_SYSTEM_TRACE 150L +#define ERROR_INVALID_EVENT_COUNT 151L +#define ERROR_TOO_MANY_MUXWAITERS 152L +#define ERROR_INVALID_LIST_FORMAT 153L +#define ERROR_LABEL_TOO_LONG 154L +#define ERROR_TOO_MANY_TCBS 155L +#define ERROR_SIGNAL_REFUSED 156L +#define ERROR_DISCARDED 157L +#define ERROR_NOT_LOCKED 158L +#define ERROR_BAD_THREADID_ADDR 159L +#define ERROR_BAD_ARGUMENTS 160L +#define ERROR_BAD_PATHNAME 161L +#define ERROR_SIGNAL_PENDING 162L +#define ERROR_MAX_THRDS_REACHED 164L +#define ERROR_LOCK_FAILED 167L +#define ERROR_BUSY 170L +#define ERROR_CANCEL_VIOLATION 173L +#define ERROR_ATOMIC_LOCKS_NOT_SUPPORTED 174L +#define ERROR_INVALID_SEGMENT_NUMBER 180L +#define ERROR_INVALID_ORDINAL 182L +#define ERROR_ALREADY_EXISTS 183L +#define ERROR_INVALID_FLAG_NUMBER 186L +#define ERROR_SEM_NOT_FOUND 187L +#define ERROR_INVALID_STARTING_CODESEG 188L +#define ERROR_INVALID_STACKSEG 189L +#define ERROR_INVALID_MODULETYPE 190L +#define ERROR_INVALID_EXE_SIGNATURE 191L +#define ERROR_EXE_MARKED_INVALID 192L +#define ERROR_BAD_EXE_FORMAT 193L +#define ERROR_ITERATED_DATA_EXCEEDS_64k 194L +#define ERROR_INVALID_MINALLOCSIZE 195L +#define ERROR_DYNLINK_FROM_INVALID_RING 196L +#define ERROR_IOPL_NOT_ENABLED 197L +#define ERROR_INVALID_SEGDPL 198L +#define ERROR_AUTODATASEG_EXCEEDS_64k 199L +#define ERROR_RING2SEG_MUST_BE_MOVABLE 200L +#define ERROR_RELOC_CHAIN_XEEDS_SEGLIM 201L +#define ERROR_INFLOOP_IN_RELOC_CHAIN 202L +#define ERROR_ENVVAR_NOT_FOUND 203L +#define ERROR_NO_SIGNAL_SENT 205L +#define ERROR_FILENAME_EXCED_RANGE 206L +#define ERROR_RING2_STACK_IN_USE 207L +#define ERROR_META_EXPANSION_TOO_LONG 208L +#define ERROR_INVALID_SIGNAL_NUMBER 209L +#define ERROR_THREAD_1_INACTIVE 210L +#define ERROR_LOCKED 212L +#define ERROR_TOO_MANY_MODULES 214L +#define ERROR_NESTING_NOT_ALLOWED 215L +#define ERROR_EXE_MACHINE_TYPE_MISMATCH 216L +#define ERROR_EXE_CANNOT_MODIFY_SIGNED_BINARY 217L +#define ERROR_EXE_CANNOT_MODIFY_STRONG_SIGNED_BINARY 218L +#define ERROR_BAD_PIPE 230L +#define ERROR_PIPE_BUSY 231L +#define ERROR_NO_DATA 232L +#define ERROR_PIPE_NOT_CONNECTED 233L +#define ERROR_MORE_DATA 234L +#define ERROR_VC_DISCONNECTED 240L +#define ERROR_INVALID_EA_NAME 254L +#define ERROR_EA_LIST_INCONSISTENT 255L -#define FRS_ERR_INVALID_API_SEQUENCE 8001L -#define FRS_ERR_STARTING_SERVICE 8002L -#define FRS_ERR_STOPPING_SERVICE 8003L -#define FRS_ERR_INTERNAL_API 8004L -#define FRS_ERR_INTERNAL 8005L -#define FRS_ERR_SERVICE_COMM 8006L -#define FRS_ERR_INSUFFICIENT_PRIV 8007L -#define FRS_ERR_AUTHENTICATION 8008L -#define FRS_ERR_PARENT_INSUFFICIENT_PRIV 8009L -#define FRS_ERR_PARENT_AUTHENTICATION 8010L -#define FRS_ERR_CHILD_TO_PARENT_COMM 8011L -#define FRS_ERR_PARENT_TO_CHILD_COMM 8012L -#define FRS_ERR_SYSVOL_POPULATE 8013L -#define FRS_ERR_SYSVOL_POPULATE_TIMEOUT 8014L -#define FRS_ERR_SYSVOL_IS_BUSY 8015L -#define FRS_ERR_SYSVOL_DEMOTE 8016L -#define FRS_ERR_INVALID_SERVICE_PARAMETER 8017L -#define ERROR_DS_NOT_INSTALLED 8200L -#define ERROR_DS_MEMBERSHIP_EVALUATED_LOCALLY 8201L -#define ERROR_DS_NO_ATTRIBUTE_OR_VALUE 8202L -#define ERROR_DS_INVALID_ATTRIBUTE_SYNTAX 8203L -#define ERROR_DS_ATTRIBUTE_TYPE_UNDEFINED 8204L -#define ERROR_DS... [truncated message content] |
From: Keith M. <no...@so...> - 2017-05-24 22:15: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.0-active has been updated via 40982dff81a3c1dc0572cf2cd0a23156661ae98d (commit) via 127b4a136978d1fd30a69fe7dac78a37da0ca667 (commit) via 324d60b72dd9886d75db913335f2fa36fab093c6 (commit) from ddc8f81e4256cd01807ec822b8ec458143473156 (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/40982dff81a3c1dc0572cf2cd0a23156661ae98d/ commit 40982dff81a3c1dc0572cf2cd0a23156661ae98d Author: Keith Marshall <kei...@us...> Date: Wed May 24 23:11:33 2017 +0100 Fix snprintf()/vsnprintf() -Wformat vs. multiple definition issue. diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog index e3f2881..2765231 100644 --- a/mingwrt/ChangeLog +++ b/mingwrt/ChangeLog @@ -1,3 +1,25 @@ +2017-05-24 Keith Marshall <kei...@us...> + + Fix snprintf()/vsnprintf() -Wformat vs. multiple definition issue. + + * include/stdio.h (__mingw_stdio_redirect__): Add reference to... + (__Wformat): ...this new macro; define it, such that it expands via... + (__Wformat_mingw_printf, __Wformat_msvcrt_printf): ...these new macros, + ultimately expanding to an attribute declaration, in terms of... + (__Wformat_ms_vprintf, __Wformat_ms_vfprintf, __Wformat_ms_vsprintf) + (__Wformat_ms_printf, __Wformat_ms_fprintf, __Wformat_ms_sprintf): + ...any one of these; they map to an ms_printf attribute, or... + (__Wformat_vprintf, __Wformat_vfprintf, __Wformat_vsprintf) + (__Wformat_printf, __Wformat_fprintf, __Wformat_sprintf): ...any one + of these; they map conditionally to... + [__GNUC__>=6] (__mingw_printf__): ...this new format attribute, or... + [__GNUC__< 6]: ...nothing. + (snprintf, vsnprintf): Revert 2017-01-30 inline definitions; add... + (__Wformat_snprintf, __Wformat_vsnprintf): ...these attributes; they + are also mapped conditionally, in this case to... + [__GNUC__>=6] (__mingw_printf__): ...this, or... + [__GNUC__< 6] (__gnu_printf__): ...this. + 2017-03-14 Keith Marshall <kei...@us...> Refactor mingwrt and w32api common makefile content. diff --git a/mingwrt/include/stdio.h b/mingwrt/include/stdio.h index e17afa0..ab03057 100644 --- a/mingwrt/include/stdio.h +++ b/mingwrt/include/stdio.h @@ -298,10 +298,46 @@ _CRTIMP __cdecl __MINGW_NOTHROW void setbuf (FILE *, char *); /* Formatted Output * * MSVCRT implementations are not ANSI C99 conformant... - * we offer these conforming alternatives from libmingwex.a + * we offer conforming alternatives from libmingwex.a */ #undef __mingw_stdio_redirect__ -#define __mingw_stdio_redirect__(F) __cdecl __MINGW_NOTHROW __mingw_##F +#define __mingw_stdio_redirect__(F) __cdecl __MINGW_NOTHROW __Wformat(F) +#define __Wformat_mingw_printf(F,A) __attribute__((__format__(__mingw_printf__,F,A))) + +#if __GNUC__ >= 6 +/* From GCC-6 onwards, we will provide customized -Wformat + * handling, via our own mingw_printf format category... + */ +#define __Wformat(F) __Wformat_##F __mingw_##F + +#else /* __GNUC__ < 6 */ +/* ...whereas, for earlier GCC, we preserve the status quo, + * offering no -Wformat checking for those functions which + * replace the MSVCRT.DLL versions... + */ +#define __Wformat(F) __mingw_##F +/* + * ...while degrading to gnu_printf checking for snprintf() + * and vsnprintf(), (which are ALWAYS MinGW.org variants). + */ +#define __mingw_printf__ __gnu_printf__ +#endif + +/* The following convenience macros specify the appropriate + * -Wformat checking for MSVCRT.DLL replacement functions... + */ +#define __Wformat_printf __Wformat_mingw_printf(1,2) +#define __Wformat_fprintf __Wformat_mingw_printf(2,3) +#define __Wformat_sprintf __Wformat_mingw_printf(2,3) +#define __Wformat_vprintf __Wformat_mingw_printf(1,0) +#define __Wformat_vfprintf __Wformat_mingw_printf(2,0) +#define __Wformat_vsprintf __Wformat_mingw_printf(2,0) +/* + * ...while this pair are specific to the two MinGW.org + * only functions. + */ +#define __Wformat_snprintf __Wformat_mingw_printf(3,4) +#define __Wformat_vsnprintf __Wformat_mingw_printf(3,0) extern int __mingw_stdio_redirect__(fprintf)(FILE*, const char*, ...); extern int __mingw_stdio_redirect__(printf)(const char*, ...); @@ -394,16 +430,6 @@ int sprintf (char *__stream, const char *__format, ...) } __mingw_stdio_redirect__ -int snprintf (char *__stream, size_t __len, const char *__format, ...) -{ - register int __retval; - __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format ); - __retval = __mingw_vsnprintf( __stream, __len, __format, __local_argv ); - __builtin_va_end( __local_argv ); - return __retval; -} - -__mingw_stdio_redirect__ int vfprintf (FILE *__stream, const char *__format, __VALIST __local_argv) { return __mingw_vfprintf( __stream, __format, __local_argv ); @@ -421,13 +447,7 @@ int vsprintf (char *__stream, const char *__format, __VALIST __local_argv) return __mingw_vsprintf( __stream, __format, __local_argv ); } -__mingw_stdio_redirect__ -int vsnprintf (char *__stream, size_t __len, const char *__format, __VALIST __local_argv) -{ - return __mingw_vsnprintf( __stream, __len, __format, __local_argv ); -} - -#else +#else /* !__USE_MINGW_ANSI_STDIO */ /* Default configuration: simply direct all calls to MSVCRT... */ _CRTIMP __cdecl __MINGW_NOTHROW int fprintf (FILE *, const char *, ...); @@ -439,10 +459,21 @@ _CRTIMP __cdecl __MINGW_NOTHROW int vsprintf (char *, const char *, __VALIST); #endif /* Regardless of user preference, always offer these alternative - * entry points, for direct access to the MSVCRT implementations. + * entry points, for direct access to the MSVCRT implementations, + * with ms_printf -Wformat checking in each case. */ +#undef __Wformat #undef __mingw_stdio_redirect__ -#define __mingw_stdio_redirect__(F) __cdecl __MINGW_NOTHROW __msvcrt_##F +#define __mingw_stdio_redirect__(F) __cdecl __MINGW_NOTHROW __Wformat(F) +#define __Wformat_msvcrt_printf(F,A) __attribute__((__format__(__ms_printf__,F,A))) +#define __Wformat(F) __Wformat_ms_##F __msvcrt_##F + +#define __Wformat_ms_printf __Wformat_msvcrt_printf(1,2) +#define __Wformat_ms_fprintf __Wformat_msvcrt_printf(2,3) +#define __Wformat_ms_sprintf __Wformat_msvcrt_printf(2,3) +#define __Wformat_ms_vprintf __Wformat_msvcrt_printf(1,0) +#define __Wformat_ms_vfprintf __Wformat_msvcrt_printf(2,0) +#define __Wformat_ms_vsprintf __Wformat_msvcrt_printf(2,0) _CRTIMP int __mingw_stdio_redirect__(fprintf)(FILE *, const char *, ...); _CRTIMP int __mingw_stdio_redirect__(printf)(const char *, ...); @@ -452,6 +483,7 @@ _CRTIMP int __mingw_stdio_redirect__(vprintf)(const char *, __VALIST); _CRTIMP int __mingw_stdio_redirect__(vsprintf)(char *, const char *, __VALIST); #undef __mingw_stdio_redirect__ +#undef __Wformat /* The following three ALWAYS refer to the MSVCRT implementations... */ @@ -466,10 +498,14 @@ _CRTIMP __cdecl __MINGW_NOTHROW int _vscprintf (const char *, __VALIST); * NOT compatible with C99, but the following are; if you want the * MSVCRT behaviour, you MUST use the Microsoft "uglified" names. */ -__cdecl __MINGW_NOTHROW int snprintf (char *, size_t, const char *, ...); -__cdecl __MINGW_NOTHROW int vsnprintf (char *, size_t, const char *, __VALIST); +__cdecl __MINGW_NOTHROW __Wformat_snprintf +int snprintf (char *, size_t, const char *, ...); + +__cdecl __MINGW_NOTHROW __Wformat_vsnprintf +int vsnprintf (char *, size_t, const char *, __VALIST); -__cdecl __MINGW_NOTHROW int vscanf (const char * __restrict__, __VALIST); +__cdecl __MINGW_NOTHROW +int vscanf (const char * __restrict__, __VALIST); __cdecl __MINGW_NOTHROW int vfscanf (FILE * __restrict__, const char * __restrict__, __VALIST); https://sf.net/p/mingw/mingw-org-wsl/ci/127b4a136978d1fd30a69fe7dac78a37da0ca667/ commit 127b4a136978d1fd30a69fe7dac78a37da0ca667 Author: Keith Marshall <kei...@us...> Date: Tue Mar 14 16:24:00 2017 +0000 Refactor mingwrt and w32api common makefile content. diff --git a/ChangeLog b/ChangeLog index ccc46c0..1c4bdc3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2017-03-14 Keith Marshall <kei...@us...> + + Refactor mingwrt and w32api common makefile content. + + * Makefile.comm: New file. + (COMMON_MAKEFILE): New macro; define it to identify this file. + (%-srcdist-common-files): New generic build rule; implement it. + (configure, config.status, Makefile, config.status.missing, _mingw.h) + (w32api.h, PACKAGE_VERSION_SCRIPT, PACKAGE_VERSION_FORMAT): Reproduce + the original common content, which has been factored out from... + * mingwrt/Makefile.in w32api/Makefile.in: ...here. + 2017-03-09 Keith Marshall <kei...@us...> MinGW.org WSL-5.0 released; update repository version. diff --git a/Makefile.comm b/Makefile.comm new file mode 100644 index 0000000..af83ded --- /dev/null +++ b/Makefile.comm @@ -0,0 +1,106 @@ +# Makefile.comm +# +# Common elements, shared by the subpackage makefiles for each of the +# MinGW.org Runtime Library and Windows-32 API packages. +# +# $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. + + +# Note whence we are reading this makefile fragment, so that we may +# access it again, for inclusion in source distributions. +# +COMMON_MAKEFILE := $(lastword $(MAKEFILE_LIST)) + +# Configuration +# ------------- +# +# Keep the configuration in a consistent state. Note that we assume +# that configure has been run initially, (otherwise we wouldn't have +# a Makefile to begin with); since this also creates config.status, +# we may normally assume that it is already available ... +# +vpath configure ${top_srcdir} +config.status: configure + $(SHELL) config.status --recheck + +# ... in which case, updating Makefile should be a simple matter of +# running config.status ... +# +vpath Makefile.in ${top_srcdir} +requires_existing = $(if $(wildcard $1),$1,$1.missing) +Makefile: Makefile.in configure $(call requires_existing,config.status) + $(SHELL) config.status + $(RM) Makefile.stub + +.PHONY: config.status.missing +# ... but, in the event that this may be missing, (e.g. because it +# has been manually removed, or removed by "make distclean"), suggest +# running configure, and bail out. +# +config.status.missing: + $(warning *** cannot execute config.status) + $(error please run ${top_srcdir}/configure to regenerate it.) + +# If configure itself needs to be updated, we must run autoconf in the +# respective top level source directory. +# +vpath configure.ac ${top_srcdir} +vpath %.m4 ${top_srcdir}/.. ${top_srcdir} +configure: configure.ac aclocal.m4 VERSION.m4 + cd ${top_srcdir}; autoconf -I .. + +# Propagate package version, as configured, consistently throughout +# the package build; in particular, we must generate the _mingw.h and +# w32api.h header files, from their respective templates with each of +# the package version macro definitions completed. +# +vpath %.h.in ${mingwrt_srcdir}/include ${w32api_srcdir}/include + +_mingw.h w32api.h: %.h: %.h.in VERSION.m4 + $(PACKAGE_VERSION_SCRIPT) $< > $@ + +PACKAGE_VERSION_SCRIPT = sed \ + -e s"`$(call PACKAGE_VERSION_FORMAT,LONG,%d,$$3+1000*($$2+1000*$$1))`" \ + -e s"`$(call PACKAGE_VERSION_FORMAT,MAJOR,%7d,$$1)`" \ + -e s"`$(call PACKAGE_VERSION_FORMAT,MINOR,%7d,$$2)`" \ + -e s"`$(call PACKAGE_VERSION_FORMAT,PATCH,%7d,$$3)`" + +PACKAGE_VERSION_FORMAT = echo $(PACKAGE_VERSION).0.0 | awk -F. '{ \ + printf ",%%PACKAGE_VERSION_$1%%,$2,", $3; \ +}' + + +# Distribution +# ------------ +# +# Propagate common source files to individual subpackage source +# distribution tarballs. +# +vpath install-sh ${top_srcdir}/.. ${top_srcdir} +%-srcdist-common-files: $(COMMON_MAKEFILE) VERSION.m4 aclocal.m4 install-sh + cp -p $^ dist/$(PACKAGE_TARNAME)-$(PACKAGE_VERSION) + +# $RCSfile$: end of file diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog index 2051e3c..e3f2881 100644 --- a/mingwrt/ChangeLog +++ b/mingwrt/ChangeLog @@ -1,3 +1,15 @@ +2017-03-14 Keith Marshall <kei...@us...> + + Refactor mingwrt and w32api common makefile content. + + * Makefile.in (mingwrt-srcdist-config-files): Rename it... + (mingwrt-srcdist-common-files): ...as this phoney build rule. + (shared_include_file): New macro; define it, and include named file. + (configure, config.status, Makefile, config.status.missing, _mingw.h) + (w32api.h, PACKAGE_VERSION_SCRIPT, PACKAGE_VERSION_FORMAT): Factor + out; relocate them to new file in common parent directory... + * ../Makefile.comm: ...here. + 2017-03-09 Keith Marshall <kei...@us...> Fix generated header file dependencies. diff --git a/mingwrt/Makefile.in b/mingwrt/Makefile.in index e9bcee2..7e2be61 100644 --- a/mingwrt/Makefile.in +++ b/mingwrt/Makefile.in @@ -107,59 +107,13 @@ INSTALL_DATA = @INSTALL_DATA@ $1 $2 mkinstalldirs = @MKDIR_P@ $(addprefix $1,$2) LN_S = @LN_S@ -# Keep the configuration in a consistent state. Note that we assume -# that configure has been run initially, (otherwise we wouldn't have -# a Makefile to begin with); since this also creates config.status, -# we may normally assume that it is already available ... +# Include the makefile content which is common to both the mingwrt, +# and the w32api packages; this may be included within the top level +# source directory for each package individually, but we must also +# be prepared to find it in their common parent directory. # -vpath configure ${top_srcdir} -config.status: configure - $(SHELL) config.status --recheck - -# ... in which case, updating Makefile should be a simple matter of -# running config.status ... -# -vpath Makefile.in ${top_srcdir} -requires_existing = $(if $(wildcard $1),$1,$1.missing) -Makefile: Makefile.in configure $(call requires_existing,config.status) - $(SHELL) config.status - $(RM) Makefile.stub - -.PHONY: config.status.missing -# ... but, in the event that this may be missing, (e.g. because it -# has been manually removed, or removed by "make distclean"), suggest -# running configure, and bail out. -# -config.status.missing: - $(warning *** cannot execute config.status) - $(error please run ${top_srcdir}/configure to regenerate it.) - -# If configure itself needs to be updated, we must run autoconf in the -# top level source directory. -# -vpath configure.ac ${top_srcdir} -vpath %.m4 ${top_srcdir}/.. ${top_srcdir} -configure: configure.ac aclocal.m4 VERSION.m4 - cd ${top_srcdir}; autoconf -I .. - -# Propagate package version, as configured, consistently throughout -# the package build. -# -vpath _mingw.h.in ${top_srcdir}/include -vpath w32api.h.in ${w32api_srcdir}/include - -_mingw.h w32api.h: %.h: %.h.in VERSION.m4 - $(PACKAGE_VERSION_SCRIPT) $< > $@ - -PACKAGE_VERSION_SCRIPT = sed \ - -e s"`$(call PACKAGE_VERSION_FORMAT,LONG,%d,$$3+1000*($$2+1000*$$1))`" \ - -e s"`$(call PACKAGE_VERSION_FORMAT,MAJOR,%7d,$$1)`" \ - -e s"`$(call PACKAGE_VERSION_FORMAT,MINOR,%7d,$$2)`" \ - -e s"`$(call PACKAGE_VERSION_FORMAT,PATCH,%7d,$$3)`" - -PACKAGE_VERSION_FORMAT = echo $(PACKAGE_VERSION).0.0 | awk -F. '{ \ - printf ",%%PACKAGE_VERSION_$1%%,$2,", $3; \ -}' +shared_include_file = $1$(if $(wildcard $1/$2),,/..)/$2 +include $(call shared_include_file,${top_srcdir},Makefile.comm) # Capture dependencies conveyed within source files, ensuring that # header files are taken from our working source tree, and not from @@ -986,14 +940,10 @@ mingwrt-srcdist-dir: $(RM) -r dist/$(PACKAGE_TARNAME)-$(PACKAGE_VERSION) $(call mkinstalldirs,,dist/$(PACKAGE_TARNAME)-$(PACKAGE_VERSION)) -mingwrt-srcdist-files: mingwrt-srcdist-config-files +mingwrt-srcdist-files: mingwrt-srcdist-common-files mingwrt-srcdist-files: mingwrt-srcdist-testsuite-files mingwrt-srcdist-files: mingwrt-srcdist-package-files -vpath install-sh ${top_srcdir}/.. ${top_srcdir} -mingwrt-srcdist-config-files: aclocal.m4 VERSION.m4 install-sh - cp -p $^ dist/$(PACKAGE_TARNAME)-$(PACKAGE_VERSION) - mingwrt-srcdist-package-files: (cd ${mingwrt_srcdir} && tar chf - --hard-dereference $(notdir $^)) | \ (cd dist/$(PACKAGE_TARNAME)-$(PACKAGE_VERSION) && tar xf -) diff --git a/w32api/ChangeLog b/w32api/ChangeLog index 1c7976d..888d825 100644 --- a/w32api/ChangeLog +++ b/w32api/ChangeLog @@ -1,3 +1,15 @@ +2017-03-14 Keith Marshall <kei...@us...> + + Refactor mingwrt and w32api common makefile content. + + * Makefile.in (w32api-srcdist-config-files): Rename it... + (w32api-srcdist-common-files): ...as this phoney build rule. + (shared_include_file): New macro; define it, and include named file. + (configure, config.status, Makefile, config.status.missing, _mingw.h) + (w32api.h, PACKAGE_VERSION_SCRIPT, PACKAGE_VERSION_FORMAT): Factor + out; relocate them to new file in common parent directory... + * ../Makefile.comm: ...here. + 2017-03-12 Keith Marshall <kei...@us...> Correct a copyright notice update omission. diff --git a/w32api/Makefile.in b/w32api/Makefile.in index 2ee7204..ba39f7b 100644 --- a/w32api/Makefile.in +++ b/w32api/Makefile.in @@ -80,57 +80,13 @@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ $1 $2 LN_S = @LN_S@ -# Keep the configuration in a consistent state. Note that we assume -# that configure has been run initially, (otherwise we wouldn't have -# a Makefile to begin with); since this also creates config.status, -# we may normally assume that it is already available ... +# Include the makefile content which is common to both the mingwrt, +# and the w32api packages; this may be included within the top level +# source directory for each package individually, but we must also +# be prepared to find it in their common parent directory. # -vpath configure ${top_srcdir} -config.status: configure - $(SHELL) config.status --recheck - -# ... in which case, updating Makefile should be a simple matter of -# running config.status ... -# -vpath Makefile.in ${top_srcdir} -requires_existing = $(if $(wildcard $1),$1,$1.missing) -Makefile: Makefile.in configure $(call requires_existing,config.status) - $(SHELL) config.status - -.PHONY: config.status.missing -# ... but, in the event that this may be missing, (e.g. because it -# has been manually removed, or removed by "make distclean"), suggest -# running configure, and bail out. -# -config.status.missing: - $(warning *** cannot execute config.status) - $(error please run ${top_srcdir}/configure to regenerate it.) - -# If configure itself needs to be updated, we must run autoconf in the -# top level source directory. -# -vpath configure.ac ${top_srcdir} -vpath %.m4 ${top_srcdir}/.. ${top_srcdir} -configure: configure.ac aclocal.m4 VERSION.m4 - cd ${top_srcdir}; autoconf -I .. - -# Propagate package version, as configured, consistently throughout -# the package build. -# -vpath %.h.in ${top_srcdir}/include ${mingwrt_srcdir}/include - -w32api.h _mingw.h: %.h: %.h.in VERSION.m4 - $(PACKAGE_VERSION_SCRIPT) $< > $@ - -PACKAGE_VERSION_SCRIPT = sed \ - -e s"`$(call PACKAGE_VERSION_FORMAT,LONG,%d,$$3+1000*($$2+1000*$$1))`" \ - -e s"`$(call PACKAGE_VERSION_FORMAT,MAJOR,%7d,$$1)`" \ - -e s"`$(call PACKAGE_VERSION_FORMAT,MINOR,%7d,$$2)`" \ - -e s"`$(call PACKAGE_VERSION_FORMAT,PATCH,%7d,$$3)`" - -PACKAGE_VERSION_FORMAT = echo $(PACKAGE_VERSION).0.0 | awk -F. '{ \ - printf ",%%PACKAGE_VERSION_$1%%,$2,", $3; \ -}' +shared_include_file = $1$(if $(wildcard $1/$2),,/..)/$2 +include $(call shared_include_file,${top_srcdir},Makefile.comm) # Capture dependencies conveyed within source files, ensuring that # header files are taken from our working source tree, and not from @@ -362,14 +318,10 @@ mingwrt-srcdist-dir w32api-srcdist-dir: %-srcdist-dir: $(RM) -r dist/$*-$(PACKAGE_VERSION) $(call mkinstalldirs,,dist/$*-$(PACKAGE_VERSION)) -w32api-srcdist-files: w32api-srcdist-config-files +w32api-srcdist-files: w32api-srcdist-common-files w32api-srcdist-files: w32api-srcdist-testsuite-files w32api-srcdist-files: w32api-srcdist-package-files -vpath install-sh ${top_srcdir}/.. ${top_srcdir} -%-srcdist-config-files: aclocal.m4 VERSION.m4 install-sh - cp -p $^ dist/$*-$(PACKAGE_VERSION) - %-srcdist-package-files: (cd ${$*_srcdir} && tar chf - --hard-dereference $(notdir $^)) | \ (cd dist/$*-$(PACKAGE_VERSION) && tar xf -) https://sf.net/p/mingw/mingw-org-wsl/ci/324d60b72dd9886d75db913335f2fa36fab093c6/ commit 324d60b72dd9886d75db913335f2fa36fab093c6 Author: Keith Marshall <kei...@us...> Date: Sun Mar 12 09:23:34 2017 +0000 Correct a copyright notice update omission. diff --git a/w32api/ChangeLog b/w32api/ChangeLog index fd2bc27..1c7976d 100644 --- a/w32api/ChangeLog +++ b/w32api/ChangeLog @@ -1,3 +1,10 @@ +2017-03-12 Keith Marshall <kei...@us...> + + Correct a copyright notice update omission. + + * configure.ac: Extend copyright date range to include 2017. Also + clean up superfluous trailing whitespace. + 2017-03-09 Keith Marshall <kei...@us...> Fix generated header file dependencies. diff --git a/w32api/configure.ac b/w32api/configure.ac index 2dac7bd..c7c5315 100644 --- a/w32api/configure.ac +++ b/w32api/configure.ac @@ -6,7 +6,7 @@ # $Id$ # # Written by Keith Marshall <kei...@us...> -# Copyright (C) 2015, 2016, MinGW.org Project +# Copyright (C) 2015-2017, MinGW.org Project # # # Permission is hereby granted, free of charge, to any person obtaining a @@ -15,11 +15,11 @@ # 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 ----------------------------------------------------------------------- Summary of changes: ChangeLog | 12 +++++++ Makefile.in => Makefile.comm | 82 +++++++++++++++++------------------------- mingwrt/ChangeLog | 34 ++++++++++++++++++ mingwrt/Makefile.in | 64 ++++----------------------------- mingwrt/include/stdio.h | 84 +++++++++++++++++++++++++++++++------------- w32api/ChangeLog | 19 ++++++++++ w32api/Makefile.in | 62 ++++---------------------------- w32api/configure.ac | 6 ++-- 8 files changed, 175 insertions(+), 188 deletions(-) copy Makefile.in => Makefile.comm (60%) hooks/post-receive -- Repository: mingw-org-wsl |
From: Keith M. <no...@so...> - 2017-03-09 21:58:12
|
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 ddc8f81e4256cd01807ec822b8ec458143473156 (commit) via a94ded612ec67b5e83958133350dd35f6249f461 (commit) via bf92cdedba8242b72ad479d10cc6041c449d43a8 (commit) from 9c8d6c73fbb29b52062b1dcdaf104a615980ef00 (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/ddc8f81e4256cd01807ec822b8ec458143473156/ commit ddc8f81e4256cd01807ec822b8ec458143473156 Author: Keith Marshall <kei...@us...> Date: Thu Mar 9 21:19:05 2017 +0000 Fix generated header file version dependencies. diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog index b8ee2a7..2051e3c 100644 --- a/mingwrt/ChangeLog +++ b/mingwrt/ChangeLog @@ -1,5 +1,14 @@ 2017-03-09 Keith Marshall <kei...@us...> + Fix generated header file dependencies. + + * Makefile.in (_mingw.h, w32api): Make them depend on changes in... + [VERSION.m4]: ...this; package version changes are no longer made... + [configure.ac]: ...here; delete associated prerequisite reference. + (distclean-local): Delete them. + +2017-03-09 Keith Marshall <kei...@us...> + Strip optional DLLs, when staging for distribution. * Makefile.in (mingwrt-%-optist): Recursively make... diff --git a/mingwrt/Makefile.in b/mingwrt/Makefile.in index eef0dbc..e9bcee2 100644 --- a/mingwrt/Makefile.in +++ b/mingwrt/Makefile.in @@ -148,7 +148,8 @@ configure: configure.ac aclocal.m4 VERSION.m4 vpath _mingw.h.in ${top_srcdir}/include vpath w32api.h.in ${w32api_srcdir}/include -_mingw.h w32api.h: configure.ac +_mingw.h w32api.h: %.h: %.h.in VERSION.m4 + $(PACKAGE_VERSION_SCRIPT) $< > $@ PACKAGE_VERSION_SCRIPT = sed \ -e s"`$(call PACKAGE_VERSION_FORMAT,LONG,%d,$$3+1000*($$2+1000*$$1))`" \ @@ -160,9 +161,6 @@ PACKAGE_VERSION_FORMAT = echo $(PACKAGE_VERSION).0.0 | awk -F. '{ \ printf ",%%PACKAGE_VERSION_$1%%,$2,", $3; \ }' -_mingw.h w32api.h: %.h: %.h.in - $(PACKAGE_VERSION_SCRIPT) $< > $@ - # Capture dependencies conveyed within source files, ensuring that # header files are taken from our working source tree, and not from # the build-time compiler's installation path. (Note: we use -MD, @@ -1045,7 +1043,7 @@ mostlyclean-local: $(RM) *.d *.$(OBJEXT) Makefile.stub *.libimpl distclean-local: clean-local - $(RM) config.log config.status libm_dummy.c + $(RM) config.log config.status libm_dummy.c _mingw.h w32api.h maintainer-clean-warning: $(warning $(MAKE) $(@:%-warning=%)) diff --git a/w32api/ChangeLog b/w32api/ChangeLog index 718daa7..fd2bc27 100644 --- a/w32api/ChangeLog +++ b/w32api/ChangeLog @@ -1,3 +1,12 @@ +2017-03-09 Keith Marshall <kei...@us...> + + Fix generated header file dependencies. + + * Makefile.in (_mingw.h, w32api): Make them depend on changes in... + [VERSION.m4]: ...this; package version changes are no longer made... + [configure.ac]: ...here; delete associated prerequisite reference. + (distclean-local): Delete them. + 2017-03-08 Keith Marshall <kei...@us...> Prepare and tag for release of w32api-5.0 package set. diff --git a/w32api/Makefile.in b/w32api/Makefile.in index b6d7b83..2ee7204 100644 --- a/w32api/Makefile.in +++ b/w32api/Makefile.in @@ -119,7 +119,8 @@ configure: configure.ac aclocal.m4 VERSION.m4 # vpath %.h.in ${top_srcdir}/include ${mingwrt_srcdir}/include -w32api.h _mingw.h: configure.ac +w32api.h _mingw.h: %.h: %.h.in VERSION.m4 + $(PACKAGE_VERSION_SCRIPT) $< > $@ PACKAGE_VERSION_SCRIPT = sed \ -e s"`$(call PACKAGE_VERSION_FORMAT,LONG,%d,$$3+1000*($$2+1000*$$1))`" \ @@ -131,9 +132,6 @@ PACKAGE_VERSION_FORMAT = echo $(PACKAGE_VERSION).0.0 | awk -F. '{ \ printf ",%%PACKAGE_VERSION_$1%%,$2,", $3; \ }' -w32api.h _mingw.h: %.h: %.h.in - $(PACKAGE_VERSION_SCRIPT) $< > $@ - # Capture dependencies conveyed within source files, ensuring that # header files are taken from our working source tree, and not from # the build-time compiler's installation path. (Note: we use -MD, @@ -395,7 +393,7 @@ mostlyclean-local: $(RM) *.d *.$(OBJEXT) distclean-local: clean-local - $(RM) config.log config.status + $(RM) config.log config.status _mingw.h w32api.h maintainer-clean-warning: $(warning $(MAKE) $(@:%-warning=%)) https://sf.net/p/mingw/mingw-org-wsl/ci/a94ded612ec67b5e83958133350dd35f6249f461/ commit a94ded612ec67b5e83958133350dd35f6249f461 Author: Keith Marshall <kei...@us...> Date: Thu Mar 9 09:46:34 2017 +0000 Strip optional DLLs, when staging for distribution. diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog index b3e201b..b8ee2a7 100644 --- a/mingwrt/ChangeLog +++ b/mingwrt/ChangeLog @@ -1,3 +1,11 @@ +2017-03-09 Keith Marshall <kei...@us...> + + Strip optional DLLs, when staging for distribution. + + * Makefile.in (mingwrt-%-optist): Recursively make... + (install-strip-$*-optional-dll): ...this internal target, not... + (install-$*-optional-dll): ...this. + 2017-03-08 Keith Marshall <kei...@us...> Prepare and tag for release of mingwrt-5.0 package set. diff --git a/mingwrt/Makefile.in b/mingwrt/Makefile.in index c6ad956..eef0dbc 100644 --- a/mingwrt/Makefile.in +++ b/mingwrt/Makefile.in @@ -971,7 +971,7 @@ optional_dll_package = $(shell echo '$2' | sed s,^[^:]*,mingwrt-$1-optdist) mingwrt-%-optdist: $(RM) -r tmp - $(MAKE) --no-print-directory prefix=`pwd`/tmp install-$*-optional-dll + $(MAKE) --no-print-directory prefix=`pwd`/tmp install-strip-$*-optional-dll cd tmp && tar chf - --hard-dereference bin | \ xz -c > ../dist/$*-$(PACKAGE_RELEASE_TAG)-dll-$(dllsuffix).tar.xz cd tmp && tar chf - --hard-dereference lib | \ https://sf.net/p/mingw/mingw-org-wsl/ci/bf92cdedba8242b72ad479d10cc6041c449d43a8/ commit bf92cdedba8242b72ad479d10cc6041c449d43a8 Author: Keith Marshall <kei...@us...> Date: Thu Mar 9 09:26:38 2017 +0000 MinGW.org WSL-5.0 released; update repository version. diff --git a/ChangeLog b/ChangeLog index 55f1f6b..ccc46c0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2017-03-09 Keith Marshall <kei...@us...> + + MinGW.org WSL-5.0 released; update repository version. + + * VERSION.m4 (__VERSION__): Increment it to 5.0.1, anticipating a + possible patch release prior to WSL-5.1 + 2017-03-08 Keith Marshall <kei...@us...> Prepare and tag for release of MinGW.org WSL-5.0 diff --git a/VERSION.m4 b/VERSION.m4 index 4e412b8..98c127a 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]) +m4_define([__VERSION__],[5.0.1]) # This is also a convenient place to specify the import library # associations, and DLLVERSION information for each DLL which may ----------------------------------------------------------------------- Summary of changes: ChangeLog | 7 +++++++ VERSION.m4 | 2 +- mingwrt/ChangeLog | 17 +++++++++++++++++ mingwrt/Makefile.in | 10 ++++------ w32api/ChangeLog | 9 +++++++++ w32api/Makefile.in | 8 +++----- 6 files changed, 41 insertions(+), 12 deletions(-) hooks/post-receive -- Repository: mingw-org-wsl |
From: Keith M. <no...@so...> - 2017-03-09 08:53:02
|
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 c55eb69c8e69e02a29d30025c14eb74e60af5105 (commit) from 3f4a279eddd6d02bf00ff3a8bfc106124809b43a (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/c55eb69c8e69e02a29d30025c14eb74e60af5105/ commit c55eb69c8e69e02a29d30025c14eb74e60af5105 Author: Keith Marshall <kei...@us...> Date: Thu Mar 9 08:51:46 2017 +0000 Publish MinGW.org WSL-5.0 package set. diff --git a/ChangeLog b/ChangeLog index fd4b931..1d01e05 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2017-03-09 Keith Marshall <kei...@us...> + + Publish MinGW.org WSL-5.0 package set. + + * mingw32/mingw32-runtime.xml (mingwrt-5.0-dev, mingwrt-5.0-dll) + (mingwrt-5.0-lic, mingwrt-5.0-man, w32api-5.0-dev): Add references. + (libmingwex): New subpackage; define it, and add references for... + (libmingwex-5.0-dev, libmingwex-5.0-dll-0): ...these components. + * common/issue.log mingw32/issue.log: Update accordingly. + 2016-12-12 Keith Marshall <kei...@us...> Replace potentially malformed GCC-5 package set. diff --git a/common/issue.log b/common/issue.log index 0aed70e..dd86cde 100644 --- a/common/issue.log +++ b/common/issue.log @@ -23,6 +23,6 @@ # MinGW Project, accept liability for any damages, however caused, # arising from the use of this software. # - c6a9068e183254c0b930ac6e1a70fd81743dc212 2016121200 package-list.xml + c6a9068e183254c0b930ac6e1a70fd81743dc212 2017030900 package-list.xml # # $RCSfile$: end of file diff --git a/mingw32/issue.log b/mingw32/issue.log index 48fb314..195db2a 100644 --- a/mingw32/issue.log +++ b/mingw32/issue.log @@ -50,11 +50,11 @@ cd33ad74b608bce33ea297801253e6efbafce27c 2012073100 mingw32-mingw-utils.xml 8d3a7125499a85916b53efb4c897ac907e2490ab 2015082000 mingw32-mpc.xml 8a11de23e7a89fd11436bdf162ef90712f30101b 2013102300 mingw32-mpfr.xml - 56f4032058328cacfabe64fa46706d72c2fa931e 2016121200 mingw32-package-list.xml + 56f4032058328cacfabe64fa46706d72c2fa931e 2017030900 mingw32-package-list.xml 1f15439ee5f66ec22321c7aa853559b6f8f7172f 2015090800 mingw32-pexports.xml cdb2a4dbedfc9f2cdfc92340f6f9b12da061c0d9 2012073100 mingw32-popt.xml 6032af6ff68aa4821cf51938781fd9e75f05de5f 2016082200 mingw32-pthreads-w32.xml - d6cc7b2a314cccd9488032f8eb9e811580a6e12e 2016101700 mingw32-runtime.xml + 03ddf8b80072f182e069250d91957d90dec73f2d 2017030900 mingw32-runtime.xml 12acb32f80e49c893167cfae82e448dd766d49bb 2013070100 mingw32-wsl-candidate.xml 247a02890f109a5fe4996fde4af9d576dca3cd1e 2012073100 mingw32-xz.xml c223ecd7389eb02948b54f8959d595cf608306a7 2013101200 mingw32-zlib.xml diff --git a/mingw32/mingw32-runtime.xml b/mingw32/mingw32-runtime.xml index a7993c1..0abcd8d 100644 --- a/mingw32/mingw32-runtime.xml +++ b/mingw32/mingw32-runtime.xml @@ -29,6 +29,7 @@ <component class="dev"> <requires eq="mingwrt-%-mingw32-dll.tar" /> + <release tarname="mingwrt-5.0-mingw32-dev.tar.xz" /> <release tarname="mingwrt-3.22-mingw32-dev.tar.xz" /> <release tarname="mingwrt-3.22.1-mingw32-dev.tar.xz" /> <release tarname="mingwrt-3.22.2-mingw32-dev.tar.xz" /> @@ -55,6 +56,7 @@ </component> <component class="dll"> + <release tarname="mingwrt-5.0-mingw32-dll.tar.xz" /> <release tarname="mingwrt-3.22-mingw32-dll.tar.xz" /> <release tarname="mingwrt-3.22.1-mingw32-dll.tar.xz" /> <release tarname="mingwrt-3.22.2-mingw32-dll.tar.xz" /> @@ -69,6 +71,7 @@ </component> <component class="lic"> + <release tarname="mingwrt-5.0-mingw32-lic.tar.xz" /> <release tarname="mingwrt-3.22-mingw32-lic.tar.xz" /> <release tarname="mingwrt-3.22.1-mingw32-lic.tar.xz" /> <release tarname="mingwrt-3.22.2-mingw32-lic.tar.xz" /> @@ -95,6 +98,7 @@ </component> <component class="man"> + <release tarname="mingwrt-5.0-mingw32-man.tar.xz" /> <release tarname="mingwrt-3.22-mingw32-man.tar.xz" /> <release tarname="mingwrt-3.22.1-mingw32-man.tar.xz" /> <release tarname="mingwrt-3.22.2-mingw32-man.tar.xz" /> @@ -121,6 +125,35 @@ </component> </package> + <package name="mingw32-libmingwex" alias="libmingwex" > + <affiliate group="MinGW Compiler Suite" /> + <affiliate group="MinGW Standard Libraries" /> + <description lang="en" title="The MinGW Runtime Library API"> + <paragraph> + This package provides an alternative implementation of the + MinGW libraries, to support dynamic linking of the principal + non-Microsoft components of the MinGW Runtime API. + </paragraph> + <paragraph> + This is an optional component of the MinGW Compiler Suite. + </paragraph> + </description> + + <source tarname="mingwrt-%-mingw32-src.tar.%" /> + <licence tarname="mingwrt-%-mingw32-lic.tar.%" /> + + <component class="dev"> + <release tarname="libmingwex-5.0-mingw32-dev.tar.xz"> + <requires eq="libmingwex-%-mingw32-dll-0.tar" /> + </release> + <requires eq="mingwrt-%-mingw32-dev.tar" /> + </component> + + <component class="dll"> + <release tarname="libmingwex-5.0-mingw32-dll-0.tar.xz" /> + </component> + </package> + <package name="mingw32-w32api" alias="w32api"> <affiliate group="MinGW Compiler Suite" /> <affiliate group="MinGW Standard Libraries" /> @@ -140,6 +173,7 @@ <licence tarname="w32api-%-mingw32-dev.tar.%" /> <component class="dev"> + <release tarname="w32api-5.0-mingw32-dev.tar.xz" /> <release tarname="w32api-3.18.2-mingw32-dev.tar.xz" /> <release tarname="w32api-3.18.1-mingw32-dev.tar.xz" /> <release tarname="w32api-3.18-mingw32-dev.tar.xz" /> ----------------------------------------------------------------------- Summary of changes: ChangeLog | 10 ++++++++++ common/issue.log | 2 +- mingw32/issue.log | 4 ++-- mingw32/mingw32-runtime.xml | 34 ++++++++++++++++++++++++++++++++++ 4 files changed, 47 insertions(+), 3 deletions(-) hooks/post-receive -- Repository: mingw-dist |
From: Keith M. <no...@so...> - 2017-03-08 20:15:05
|
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 9c8d6c73fbb29b52062b1dcdaf104a615980ef00 (commit) via 51857907fe346397d854999e2e710080e5c57df0 (commit) from c6d25f0ee9cf628134918f0d3a2bc82aeb09c458 (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/9c8d6c73fbb29b52062b1dcdaf104a615980ef00/ commit 9c8d6c73fbb29b52062b1dcdaf104a615980ef00 Author: Keith Marshall <kei...@us...> Date: Wed Mar 8 20:12:08 2017 +0000 Added tag wsl-5.0-release for changeset 44bf2b16d285 diff --git a/.hgtags b/.hgtags index f99181d..1b1cc19 100644 --- a/.hgtags +++ b/.hgtags @@ -8,3 +8,4 @@ c42986e81e9ce0a5fcf8f09012f9d0f038032bac mingwrt-3.22.1-release cd725d6ae238714355b000ae9d7c6f3ace34317d w32api-3.18.2-release 9db085b7464425de03f96232b5e6f48d119d8713 mingwrt-3.22.3-release e92b7e85ef0890284b99d2c8243519f77457e2be mingwrt-3.22.4-release +44bf2b16d28510dd0857ac5a949171d33360973f wsl-5.0-release https://sf.net/p/mingw/mingw-org-wsl/ci/51857907fe346397d854999e2e710080e5c57df0/ commit 51857907fe346397d854999e2e710080e5c57df0 Author: Keith Marshall <kei...@us...> Date: Wed Mar 8 20:01:07 2017 +0000 Prepare and tag for release of MinGW.org WSL-5.0 * All files (wsl-5.0-release): Tag assigned. diff --git a/ChangeLog b/ChangeLog index 81bd016..55f1f6b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2017-03-08 Keith Marshall <kei...@us...> + + Prepare and tag for release of MinGW.org WSL-5.0 + + * All files (wsl-5.0-release): Tag assigned. + 2017-02-21 Keith Marshall <kei...@us...> Extend basic test suite infrastructure to w32api. diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog index e7dbe78..b3e201b 100644 --- a/mingwrt/ChangeLog +++ b/mingwrt/ChangeLog @@ -1,3 +1,9 @@ +2017-03-08 Keith Marshall <kei...@us...> + + Prepare and tag for release of mingwrt-5.0 package set. + + * All files (wsl-5.0-release): Tag assigned. + 2017-03-07 Keith Marshall <kei...@us...> Avoid -shared-libgcc dependencies in optional DLLs. diff --git a/w32api/ChangeLog b/w32api/ChangeLog index d027a81..718daa7 100644 --- a/w32api/ChangeLog +++ b/w32api/ChangeLog @@ -1,3 +1,9 @@ +2017-03-08 Keith Marshall <kei...@us...> + + Prepare and tag for release of w32api-5.0 package set. + + * All files (wsl-5.0-release): Tag assigned. + 2017-02-21 Keith Marshall <kei...@us...> Implement basic test suite infrastructure. ----------------------------------------------------------------------- Summary of changes: .hgtags | 1 + ChangeLog | 6 ++++++ mingwrt/ChangeLog | 6 ++++++ w32api/ChangeLog | 6 ++++++ 4 files changed, 19 insertions(+) hooks/post-receive -- Repository: mingw-org-wsl |
From: Keith M. <no...@so...> - 2017-03-08 20:15:03
|
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-release has been created at 51857907fe346397d854999e2e710080e5c57df0 (commit) - Log ----------------------------------------------------------------- commit 51857907fe346397d854999e2e710080e5c57df0 Author: Keith Marshall <kei...@us...> Date: Wed Mar 8 20:01:07 2017 +0000 Prepare and tag for release of MinGW.org WSL-5.0 * All files (wsl-5.0-release): Tag assigned. ----------------------------------------------------------------------- hooks/post-receive -- Repository: mingw-org-wsl |
From: Keith M. <no...@so...> - 2017-03-07 22:21:28
|
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 c6d25f0ee9cf628134918f0d3a2bc82aeb09c458 (commit) from 122714615d0f216f375443d44bbf8fb6b2cb5997 (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/c6d25f0ee9cf628134918f0d3a2bc82aeb09c458/ commit c6d25f0ee9cf628134918f0d3a2bc82aeb09c458 Author: Keith Marshall <kei...@us...> Date: Tue Mar 7 22:17:57 2017 +0000 Avoid -shared-libgcc dependencies in optional DLLs. diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog index ca0f260..e7dbe78 100644 --- a/mingwrt/ChangeLog +++ b/mingwrt/ChangeLog @@ -1,3 +1,11 @@ +2017-03-07 Keith Marshall <kei...@us...> + + Avoid -shared-libgcc dependencies in optional DLLs. + + * Makefile.in (dllname): Qualify it, by addition of... + (LIBGCC_LINK_OPTION): ...this DLL name specific linking option macro. + (libmingwex.dll.a): Force it to use -static-libgcc for associated DLL. + 2017-02-27 Keith Marshall <kei...@us...> Support optional DLL builds from static libraries. diff --git a/mingwrt/Makefile.in b/mingwrt/Makefile.in index 1b379a1..c6ad956 100644 --- a/mingwrt/Makefile.in +++ b/mingwrt/Makefile.in @@ -719,13 +719,18 @@ DLLVERSION = "0:0:0" $(CC) $(call a2dll,tmp$<,$(call dllname,$*)) -L. -Wl,--out-implib=$@ $(RM) tmp$< -dllname = $1-$(dllsuffix).dll +dllname = $1-$(dllsuffix).dll $(LIBGCC_LINK_OPTION) a2dll = -shared -o $2 -Wl,--whole-archive $1 -Wl,--no-whole-archive dllsuffix = `echo $(DLLVERSION) | awk -F: '{printf "%d",$$1-$$3}'` all-optional-dlls: all-mingwrt-optional-dlls all-mingwrt-optional-dlls: libmingwex.dll.a +# In most optional DLL build cases, we should avoid creating any +# unnecessary dependency on (known to be broken) -shared-libgcc +# +libmingwex.dll.a: LIBGCC_LINK_OPTION = -static-libgcc + # Installation Rules # ------------------ ----------------------------------------------------------------------- Summary of changes: mingwrt/ChangeLog | 8 ++++++++ mingwrt/Makefile.in | 7 ++++++- 2 files changed, 14 insertions(+), 1 deletion(-) hooks/post-receive -- Repository: mingw-org-wsl |
From: Keith M. <no...@so...> - 2017-02-27 18:07:35
|
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 122714615d0f216f375443d44bbf8fb6b2cb5997 (commit) via 571d98ec8e36bff2636531788d61fe2c3ac490ae (commit) from 8c8b937be7a3a95b2651ebc3f1eb10d03ef621c9 (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/122714615d0f216f375443d44bbf8fb6b2cb5997/ commit 122714615d0f216f375443d44bbf8fb6b2cb5997 Author: Keith Marshall <kei...@us...> Date: Mon Feb 27 17:59:26 2017 +0000 Support optional DLL builds from static libraries. diff --git a/VERSION.m4 b/VERSION.m4 index 872bc33..4e412b8 100644 --- a/VERSION.m4 +++ b/VERSION.m4 @@ -5,7 +5,25 @@ # Non-copyrightable material; adjust the following definition, to # assign a common version number to each of the mingwrt and w32api # MinGW System Library sub-packages. - +# m4_define([__VERSION__],[5.0]) +# This is also a convenient place to specify the import library +# associations, and DLLVERSION information for each DLL which may +# be delivered by this package; each specification record takes +# the form of three data fields, comprising: +# +# 1) A tag field, which maps the assignment to a makefile variable +# substitution reference of the form @MAP_[TAG]_A_DLLVERSION@. +# +# 2) The name of the import library associated with the mapping. +# +# 3) The DLLVERSION for the corresponding DLL; this must be in the +# libtool current:revision:age notation, and should be updated, +# as required, in accordance with libtool conventions. +# +m4_define([MINGW_AC_ENUMERATE_DLLVERSION_SPECS],dnl +[MINGW_AC_SET_DLLVERSION([LIBMINGWEX], [libmingwex.dll.a], [0:0:0])dnl +]) + # $RCSfile$: end of file diff --git a/aclocal.m4 b/aclocal.m4 index acdf9fa..caff4d4 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -5,7 +5,7 @@ ## $Id$ ## ## Written by Keith Marshall <kei...@us...> -## Copyright (C) 2014, 2016, MinGW.org Project +## Copyright (C) 2014, 2016, 2017, MinGW.org Project ## ## m4_include([VERSION.m4]) @@ -166,4 +166,14 @@ AC_DEFUN([MINGW_AC_PROG_COMPILE_SX], }dnl ]) +# MINGW_AC_SET_DLLVERSION( TAG, IMPLIB, DLLVERSION ) +# -------------------------------------------------- +# Create a configuration time substitution for MAP_[TAG]_A_DLLVERSION, +# such that it will define a target specific makefile variable assignment +# for target IMPLIB, with specified value assigned to DLLVERSION. +# +AC_DEFUN([MINGW_AC_SET_DLLVERSION],dnl +[AC_SUBST([MAP_][$1][_A_DLLVERSION],['$2: DLLVERSION = "$3"'])dnl +]) + # $RCSfile$: end of file diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog index 5dfed08..ca0f260 100644 --- a/mingwrt/ChangeLog +++ b/mingwrt/ChangeLog @@ -1,3 +1,30 @@ +2017-02-27 Keith Marshall <kei...@us...> + + Support optional DLL builds from static libraries. + + * aclocal.m4 (MINGW_AC_SET_DLLVERSION): New macro; define it, and... + * VERSION.m4: ...use it here, to enumerate the specifcations for... + (MINGW_AC_ENUMERATE_DLLVERSION_SPECS): ...this collection of DLL + version identification records. + + * Makefile.in (DLLVERSION): New macro; define default, and capture + library specific variants, as generated by AC_SUBST output from... + (MINGW_AC_ENUMERATE_DLLVERSION_SPECS): ...this configuration macro. + (a2dll, dllname, dllsuffix): New macros; define them, together with + new pattern rule using them, to create DLLs and import libraries from + existing static object libraries; augment these with... + (optional_dll_version): ...this further new macro, used by... + (install-optional-dlls, install-mingwrt-optional-dlls) + (install-libmingwex-optional-dll): ...these new installation rules... + (uninstall-optional-dlls, uninstall-mingwrt-optional-dlls): ...and + counterpart rules, to uninstall all such optional DLL files. + (optional_dll_package): Further new macro; it is required by... + (optdist, mingwrt-optdist, mingwrt-libmingwex-optdist): ...these new + distribution rules; they create packages for optional DLLs. + (dist): Add optdist. + + * configure.ac (MINGW_AC_ENUMERATE_DLLVERSION_SPECS): Invoke it. + 2017-02-24 Keith Marshall <kei...@us...> Make floating point environment more robust. diff --git a/mingwrt/Makefile.in b/mingwrt/Makefile.in index 3eb6abd..1b379a1 100644 --- a/mingwrt/Makefile.in +++ b/mingwrt/Makefile.in @@ -677,6 +677,56 @@ all-mingwrt-libs install-mingwrt-libs: libgmon.a libgmon.a: $(addsuffix .$(OBJEXT), gmon mcount profil) +# Optional DLL Generation Rules +# ----------------------------- +# +# The following rules are provided to accommodate optional delivery +# of certain of the static libraries, generated as components of this +# package, in the alternative form of DLLs, each with an accompanying +# import library. Each such DLL should be versioned, ideally with an +# explicitly specified version number, but we provide this fall back +# as a catch-all default for any which is not so specified; (all such +# version specifications should be in the "current:revision:age" form, +# conforming to the GNU-libtool convention). +# +DLLVERSION = "0:0:0" + +# Generally, we should prefer to have explicit version specifications, +# relating individually to each DLL; these are specified in VERSION.m4, +# and propagated here via configure time substitution. +# +@MAP_LIBMINGWEX_A_DLLVERSION@ + +# For convenience, we implement the DLL build rule in the form of a +# generic pattern rule, invoked in the form of a request to build any +# version-agnostic import library; the versioned DLL is then built as +# a side effect of building the import library. +# +# Note that, in addition to the obvious dependency on the originating +# static library, we also make this depend on configure; this ensures +# that DLL version changes, specified in VERSION.m4, are propagated. +# +# Further note that we use an alternatively named reference link to +# the originating static library, as code source for the DLL, rather +# than the original name; this is to work around a limitation of the +# handling of --whole-archive, by GNU-ld, which suppresses creation +# of an exports table, in the event that the same static library is +# named among GCC's implicit default libraries, after reverting to +# --no-whole-archive operation. +# +%.dll.a: %.a configure + $(LN_S) -f $< tmp$< + $(CC) $(call a2dll,tmp$<,$(call dllname,$*)) -L. -Wl,--out-implib=$@ + $(RM) tmp$< + +dllname = $1-$(dllsuffix).dll +a2dll = -shared -o $2 -Wl,--whole-archive $1 -Wl,--no-whole-archive +dllsuffix = `echo $(DLLVERSION) | awk -F: '{printf "%d",$$1-$$3}'` + +all-optional-dlls: all-mingwrt-optional-dlls +all-mingwrt-optional-dlls: libmingwex.dll.a + + # Installation Rules # ------------------ # @@ -793,6 +843,17 @@ install-%-dll-files: $(call INSTALL_DATA,$^,${bindir}) $(if $(STRIP_DLL),$(call STRIP_DLL,$^)) +$(call optional_dll_version,libmingwex,@MAP_LIBMINGWEX_A_DLLVERSION@) +optional_dll_version = $(shell echo '$2' | sed s,^[^:]*,install-$1-optional-dll,) + +install-optional-dlls: install-mingwrt-optional-dlls +install-mingwrt-optional-dlls: install-libmingwex-optional-dll +install-%-optional-dll: %.dll.a bindir libdir + $(call INSTALL_DATA,$<,${libdir}) + $(call INSTALL_DATA,$(call dllname,$*),${bindir}) + $(if $(STRIP_DLL),$(call STRIP_DLL,$(call dllname,$*))) + $(if $(STRIP_DATA),$(call STRIP_DATA,$<)) + # Install manpages. # @@ -830,6 +891,7 @@ getdelim.$(man3ext): %: %.mancopy-recursive # uninstall: uninstall-mingwrt uninstall-bin uninstall-dll uninstall-mingwrt: uninstall-mingwrt-dll +uninstall-optional-dlls uninstall-mingwrt: uninstall-mingwrt-optional-dlls uninstall-mingwrt: uninstall-mingwrt-headers uninstall-mingwrt-libdir-libs uninstall-mingwrt: uninstall-mingwrt-libdir-objects @@ -843,7 +905,7 @@ uninstall-mingwrt-headers: done $(call REMOVE_HEADERS,${includedir},${mingwrt_srcdir}/profile/*.h) -uninstall-mingwrt-dll \ +uninstall-mingwrt-dll uninstall-mingwrt-optional-dlls \ uninstall-mingwrt-libdir-objects uninstall-mingwrt-libdir-libs: un%: $(MAKE) --no-print-directory mkinstalldirs= \ INSTALL_DATA='cd $$2 && $(RM) $$1' $* @@ -862,7 +924,7 @@ check-recursive: # ------------ # .PHONY: dist -dist: devdist dlldist licdist mandist srcdist +dist: devdist dlldist licdist mandist optdist srcdist $(RM) -r dist/mingwrt dist/w32api mingwrt-dist-staged w32api-dist-staged: %-dist-staged: @@ -896,6 +958,21 @@ mingwrt-mandist: %-mandist: xz -c > ../dist/$*-$(PACKAGE_RELEASE_TAG)-man.tar.xz $(RM) -r tmp +optdist: mingwrt-optdist +mingwrt-optdist: mingwrt-libmingwex-optdist + +$(call optional_dll_package,libmingwex,@MAP_LIBMINGWEX_A_DLLVERSION@) +optional_dll_package = $(shell echo '$2' | sed s,^[^:]*,mingwrt-$1-optdist) + +mingwrt-%-optdist: + $(RM) -r tmp + $(MAKE) --no-print-directory prefix=`pwd`/tmp install-$*-optional-dll + cd tmp && tar chf - --hard-dereference bin | \ + xz -c > ../dist/$*-$(PACKAGE_RELEASE_TAG)-dll-$(dllsuffix).tar.xz + cd tmp && tar chf - --hard-dereference lib | \ + xz -c > ../dist/$*-$(PACKAGE_RELEASE_TAG)-dev.tar.xz + $(RM) -r tmp + srcdist: mingwrt-srcdist mingwrt-srcdist: mingwrt-srcdist-dir mingwrt-srcdist-files cd dist && tar chf - $(PACKAGE_TARNAME)-$(PACKAGE_VERSION) | \ diff --git a/mingwrt/configure.ac b/mingwrt/configure.ac index 158465d..117b3e4 100644 --- a/mingwrt/configure.ac +++ b/mingwrt/configure.ac @@ -6,7 +6,7 @@ # $Id$ # # Written by Keith Marshall <kei...@us...> -# Copyright (C) 2014-2016, MinGW.org Project +# Copyright (C) 2014-2017, MinGW.org Project # # # Permission is hereby granted, free of charge, to any person obtaining a @@ -31,6 +31,8 @@ AC_PREREQ([2.64]) AC_INIT([MinGW C Runtime],[__VERSION__],[__BUG_REPORT_URL__],[mingwrt]) + MINGW_AC_ENUMERATE_DLLVERSION_SPECS + AC_PREFIX_DEFAULT([/mingw]) AC_CONFIG_SRCDIR([include/_mingw.h.in]) MINGW_AC_CONFIG_EXTRA_SRCDIR([w32api],[include/w32api.h.in]) https://sf.net/p/mingw/mingw-org-wsl/ci/571d98ec8e36bff2636531788d61fe2c3ac490ae/ commit 571d98ec8e36bff2636531788d61fe2c3ac490ae Author: Keith Marshall <kei...@us...> Date: Mon Feb 27 17:46:27 2017 +0000 Make floating point environment more robust. diff --git a/mingwrt/CRT_fenv.c b/mingwrt/CRT_fenv.c new file mode 100644 index 0000000..ac7dfbc --- /dev/null +++ b/mingwrt/CRT_fenv.c @@ -0,0 +1,63 @@ +/* + * CRT_fenv.c + * + * Specifies the default FPU configuration, in terms of one of the + * predefined floating point environments defined in <fenv.h>, via + * a global variable assignment, whence the specified selection will + * be copied to FE_DFL_ENV at application start-up. + * + * $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, this permission notice, and the following + * disclaimer shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OF OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * + * This file replaces the two original files CRT_fp8.c, and CRT_fp10.c; + * compile it using each of the two commands: + * + * gcc -c -D_CRT_FE_DFL_ENV=8 CRT_fenv.c -o CRT_fp8.o + * gcc -c -D_CRT_FE_DFL_ENV=10 CRT_fenv.c -o CRT_fp10.o + * + * to create the complementary pair of object files, reproducing the + * intended effect of the original similarly named object file pair. + * + */ +#include <fenv.h> + +#ifndef _CRT_FE_DFL_ENV +/* If the user neglects to specify this, assume that the intention is + * to reproduce, in FE_DFL_ENV, the effect of the original CRT_fp10.o + * object file. + */ +# define _CRT_FE_DFL_ENV 10 +#endif + +/* Initialize the "_CRT_fenv" global variable, based on compile time + * selection, to map FE_DFL_ENV to FE_PC53_env, (precision configured + * to 53-bits), or to FE_PC64_ENV, (precision configured to 64-bits), + * via initial FPU configuration to FE_PD53_ENV, (precision default + * 53-bits), or FE_PD64_ENV, (precision default 64-bits). + */ +const fenv_t *_CRT_fenv = (_CRT_FE_DFL_ENV == 8) ? FE_PD53_ENV : FE_PD64_ENV; + +/* $RCSfile$: end of file */ diff --git a/mingwrt/CRT_fp10.c b/mingwrt/CRT_fp10.c deleted file mode 100644 index 516c86c..0000000 --- a/mingwrt/CRT_fp10.c +++ /dev/null @@ -1,20 +0,0 @@ -/* - * CRT_FP10.c - * - * This defines _fpreset as asm ("fnint"). Calls to _fpreset - * will set default floating point precesion to 64-bit mantissa - * at app startup. - * - * Linking in CRT_FP10.o before libmingw.a will override the definition - * set in CRT_FP8.o. - */ - -/* Override library _fpreset() with asm fninit */ -void _fpreset (void) - { __asm__ ( "fninit" ) ;} - -#if defined(__PCC__) -void _Pragma("alias _fpreset") fpreset(void); -#else -void __attribute__ ((alias ("_fpreset"))) fpreset(void); -#endif diff --git a/mingwrt/CRT_fp8.c b/mingwrt/CRT_fp8.c deleted file mode 100644 index 78f4b7e..0000000 --- a/mingwrt/CRT_fp8.c +++ /dev/null @@ -1,22 +0,0 @@ -/* - * CRT_FP8.c - * - * This forces calls of _fpreset to the MSVCRT function - * exported from dll. Effectively it make default - * precison same as apps built with MSVC (53-bit mantissa). - - * - * To change to 64-bit mantissa, link in CRT_FP10.o before libmingw.a. - */ - -/* Link against the _fpreset visible in import lib */ - -extern void (*_imp___fpreset)(void) ; -void _fpreset (void) -{ (*_imp___fpreset)(); } - -#if defined(__PCC__) -void _Pragma("alias _fpreset") fpreset(void); -#else -void __attribute__ ((alias ("_fpreset"))) fpreset(void); -#endif diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog index ec6c8f5..5dfed08 100644 --- a/mingwrt/ChangeLog +++ b/mingwrt/ChangeLog @@ -1,3 +1,51 @@ +2017-02-24 Keith Marshall <kei...@us...> + + Make floating point environment more robust. + + * CRT_fp8.c CRT_fp10.c: Delete them; both are replaced by... + * CRT_fenv.c: ...this new common source file; it implements... + (_CRT_fenv): ...this new global variable, with alternative definitions + evaluated during application start-up, to assign one or other of... + [FE_PC53_ENV, FE_PC64_ENV]: ...these, as the preferred default... + [FE_DFL_ENV]: ...represented by this; replacement linkage for... + (_fpreset): ...this MSVCRT.DLL function is no longer supported. + + * Makefile.in: Add new static pattern rule, for compiling... + (CRT_fp8.$OBJEXT, CRT_fp10.$OBJEXT): ...each of these, from CRT_env.c + + * crt1.c (_gnu_exception_handler, __mingw_CRTStartup): Do not call... + (_fpreset): ...this; its linkage was non-deterministically ambiguous. + (fesetenv): Use this, unambiguously, instead; initially configure the + floating point environment to the predefined state, as assigned to... + [_CRT_fenv]: ...this new global variable; thereafter, reset to... + [FE_DFL_ENV]: ...this ISO-C99 mandatory configuration. + + * include/float.h: Assert copyright; tidy layout. + [_MINGW_FLOAT_H_]: Retain, but replace in guard macro usage by... + [_MINGW_FLOAT_H]: ...this, conforming to preferred naming convention. + [_BEGIN_C_DECLS, _END_C_DECLS]: Use them, as appropriate. + (_fpreset): Add _CRTIMP attribute; it is resolved by MSVCRT.DLL + (fpreset): Deprecate it; provide inline __LIBIMPL__ fall-back. + + * include/fenv.h: Assert copyright; tidy layout. + [_FENV_H_]: Rename multiple inclusion guard macro, adopting... + [_FENV_H]: ...this preferred stylistic naming convention. + [_BEGIN_C_DECLS, _END_C_DECLS]: Use them, as appropriate. + (FE_INVALID, FE_DENORMAL, FE_DIVBYZERO, FE_OVERFLOW, FE_UNDERFLOW) + (FE_INEXACT, FE_ALL_EXCEPT, FE_TONEAREST, FE_DOWNWARD, FE_UPWARD) + (FE_TOWARDZERO): Redefine them, in terms of enumerated bit positions. + (FE_PD53_ENV, FE_PD64_ENV): New predefined environment selectors; they + serve as initialization-time aliases, causing redefinition of... + [FE_DFL_ENV]: ...this, as run-time alias for one or other of... + [FE_PC53_ENV, FE_PC64_ENV]: ...these, respectively. + + * mingwex/fesetenv.c: Assert copyright; tidy layout. + (fesetenv) [FE_PD53_ENV || FE_PD64_ENV]: Handle them, assigning to... + (FE_DFL_ENV): ...this ISO-C99 mandatory configuration, representing... + (fenv_default): ...the value of this new static variable. + (_fpreset): Call it directly; now always resolved by MSVCRT.DLL, so... + (*_imp__fpreset): ...this indirection becomes unnecessary. + 2017-02-21 Keith Marshall <kei...@us...> Make mingwrt and w32api test suites consistent. diff --git a/mingwrt/Makefile.in b/mingwrt/Makefile.in index a830b63..3eb6abd 100644 --- a/mingwrt/Makefile.in +++ b/mingwrt/Makefile.in @@ -236,11 +236,18 @@ $(addsuffix .$(OBJEXT), crt1 dllcrt1): %.$(OBJEXT): %.c $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) -D__CRTDLL__ -o $@ $< # ...while, for the current build case, we need an explicit mapping -# to identify the disparately named source file. +# to identify the disparately named source file... # $(addsuffix .$(OBJEXT), crt2 dllcrt2): %2.$(OBJEXT): %1.c $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) -o $@ $< +# ...and for the pair of default FPU configuration selectors, we +# need to pass the configuration specification to the compiler, when +# compiling the common source for each of the two cases. +# +CRT_fp8.$(OBJEXT) CRT_fp10.$(OBJEXT): CRT_fp%.$(OBJEXT): CRT_fenv.c + $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) -D_CRT_FE_DFL_ENV=$* -o $@ $< + # The initialization hook for profiling code is inherited from Cygwin, # where it is built as gcrt0.$(OBJEXT); we build it, unmodified, as each # of gcrt1.$(OBJEXT) and gcrt2.$(OBJEXT), to satisfy the differing GCC diff --git a/mingwrt/crt1.c b/mingwrt/crt1.c index c207702..439f9e8 100644 --- a/mingwrt/crt1.c +++ b/mingwrt/crt1.c @@ -1,23 +1,46 @@ /* * crt1.c - * This file has no copyright assigned and is placed in the Public Domain. - * This file is a part of the mingw-runtime package. - * No warranty is given; refer to the file DISCLAIMER within the package. * - * Source code for the startup proceedures used by all programs. This code - * is compiled to make crt1.o, which should be located in the library path. + * Source code for the startup procedures used by all programs. This + * code is compiled to crt1.o, which is located in the library path. + * + * $Id$ + * + * Written by Colin Peters <co...@bi...> + * Copyright (C) 1997, 1999, 2002-2007, 2009, 2010, 2014, 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"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice, this permission notice, and the following + * disclaimer shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OF OR OTHER + * DEALINGS IN THE SOFTWARE. * - */ - -/* Hide the declaration of _fmode with dllimport attribute in stdlib.h to - * avoid problems with older GCC. */ #define __IN_MINGW_RUNTIME +/* Hide the declaration of _fmode(), with its dllimport attribute in + * <stdlib.h>, to avoid problems with older GCC. + */ #include <stdlib.h> #include <stdio.h> #include <io.h> #include <process.h> -#include <float.h> +#include <fenv.h> + #define WIN32_LEAN_AND_MEAN #include <windows.h> #include <signal.h> @@ -83,8 +106,7 @@ extern void __GetMainArgs( int *, char ***, char ***, int ); #endif void _mingw32_init_mainargs() -{ - /* This is the old start-up mechanism, in which we use a start-up +{ /* This is the old start-up mechanism, in which we use a start-up * hook provided by Microsoft's runtime library to initialize the * argument and environment vectors. * @@ -98,17 +120,17 @@ void _mingw32_init_mainargs() # define _CRT_GLOB_OPT _CRT_glob & __CRT_GLOB_USE_MSVCRT__ # ifdef __MSVCRT__ - /* The MSVCRT.DLL start-up hook requires this invocation - * protocol... - */ - _startupinfo start_info = { 0 }; - __getmainargs( &_argc, &_argv, &dummy_envp, _CRT_GLOB_OPT, &start_info ); + /* The MSVCRT.DLL start-up hook requires this invocation + * protocol... + */ + _startupinfo start_info = { 0 }; + __getmainargs( &_argc, &_argv, &dummy_envp, _CRT_GLOB_OPT, &start_info ); # else - /* ...while a somewhat simpler protocol is applicable, in - * the case of the CRTDLL.DLL version. - */ - __GetMainArgs( &_argc, &_argv, &dummy_envp, _CRT_GLOB_OPT ); + /* ...while a somewhat simpler protocol is applicable, in + * the case of the CRTDLL.DLL version. + */ + __GetMainArgs( &_argc, &_argv, &dummy_envp, _CRT_GLOB_OPT ); # endif } @@ -138,16 +160,15 @@ extern int _fmode; extern int* __p__fmode(void); /* To access the dll _fmode */ #endif -/* - * Setup the default file handles to have the _CRT_fmode mode, as well as - * any new files created by the user. +/* Setup the default file handles to have the _CRT_fmode mode, + * as well as any new files created by the user. */ extern int _CRT_fmode; static void _mingw32_init_fmode (void) -{ - /* Don't set the std file mode if the user hasn't set any value for it. +{ /* Don't set the std file mode if the user hasn't set any + * value for it. */ if (_CRT_fmode) { @@ -167,9 +188,9 @@ _mingw32_init_fmode (void) /* Now sync the dll _fmode to the one for this .exe. */ # ifdef __MSVCRT__ - *__p__fmode() = _fmode; + *__p__fmode() = _fmode; # else - *_imp___fmode_dll = _fmode; + *_imp___fmode_dll = _fmode; # endif } @@ -184,42 +205,46 @@ _gnu_exception_handler (EXCEPTION_POINTERS * exception_data) int reset_fpu = 0; switch (exception_data->ExceptionRecord->ExceptionCode) - { + { case EXCEPTION_ACCESS_VIOLATION: - /* test if the user has set SIGSEGV */ + /* Test if the user has set SIGSEGV + */ old_handler = signal (SIGSEGV, SIG_DFL); if (old_handler == SIG_IGN) - { - /* this is undefined if the signal was raised by anything other - than raise (). */ - signal (SIGSEGV, SIG_IGN); - action = EXCEPTION_CONTINUE_EXECUTION; - } + { /* This is undefined if the signal was raised by + * anything other than raise() + */ + signal (SIGSEGV, SIG_IGN); + action = EXCEPTION_CONTINUE_EXECUTION; + } else if (old_handler != SIG_DFL) - { - /* This means 'old' is a user defined function. Call it */ - (*old_handler) (SIGSEGV); - action = EXCEPTION_CONTINUE_EXECUTION; - } + { /* This means 'old_handler' is a user defined + * function. Call it + */ + (*old_handler) (SIGSEGV); + action = EXCEPTION_CONTINUE_EXECUTION; + } break; case EXCEPTION_ILLEGAL_INSTRUCTION: case EXCEPTION_PRIV_INSTRUCTION: - /* test if the user has set SIGILL */ + /* Test if the user has set SIGILL + */ old_handler = signal (SIGILL, SIG_DFL); if (old_handler == SIG_IGN) - { - /* this is undefined if the signal was raised by anything other - than raise (). */ - signal (SIGILL, SIG_IGN); - action = EXCEPTION_CONTINUE_EXECUTION; - } + { /* This is undefined if the signal was raised by + * anything other than raise() + */ + signal (SIGILL, SIG_IGN); + action = EXCEPTION_CONTINUE_EXECUTION; + } else if (old_handler != SIG_DFL) - { - /* This means 'old' is a user defined function. Call it */ - (*old_handler) (SIGILL); - action = EXCEPTION_CONTINUE_EXECUTION; - } + { /* This means 'old_handler' is a user defined + * function. Call it + */ + (*old_handler) (SIGILL); + action = EXCEPTION_CONTINUE_EXECUTION; + } break; case EXCEPTION_FLT_INVALID_OPERATION: @@ -232,33 +257,57 @@ _gnu_exception_handler (EXCEPTION_POINTERS * exception_data) /* fall through. */ case EXCEPTION_INT_DIVIDE_BY_ZERO: - /* test if the user has set SIGFPE */ + /* Test if the user has set SIGFPE + */ old_handler = signal (SIGFPE, SIG_DFL); if (old_handler == SIG_IGN) - { - signal (SIGFPE, SIG_IGN); - if (reset_fpu) - _fpreset (); - action = EXCEPTION_CONTINUE_EXECUTION; - } + { + signal (SIGFPE, SIG_IGN); + if (reset_fpu) + fesetenv (FE_DFL_ENV); + action = EXCEPTION_CONTINUE_EXECUTION; + } else if (old_handler != SIG_DFL) - { - /* This means 'old' is a user defined function. Call it */ - (*old_handler) (SIGFPE); - action = EXCEPTION_CONTINUE_EXECUTION; - } - break; - - default: - break; - } + { /* This means 'old_handler' is a user defined + * function. Call it + */ + (*old_handler) (SIGFPE); + action = EXCEPTION_CONTINUE_EXECUTION; + } + } return action; } -/* The function mainCRTStartup is the entry point for all console programs. +/* During application start-up, we establish the default configuration + * for the FPU. MSVCRT.DLL provides the _fpreset() function to perform + * the appropriate initialization, but it sets the default operation to + * be in IEEE-754 8-byte mode, whereas we prefer IEEE-754 10-byte mode, + * to better support GCC's 10-byte long doubles; nevertheless, we offer + * the option, via the _CRT_fenv global variable, to establish either + * one of these modes as initial default, it should be set to either + * FE_PD64_ENV, (defined in <fenv.h>, reflecting the 64-bit precision + * of the 10-byte mode, and established as default for _CRT_fenv within + * the runtime library), or overridden by a setting of FE_PD53_ENV, in + * user code, like this: + * + * #include <fenv.h> + * const fenv_t *_CRT_fenv = FE_PD53_ENV; + * + * (or by linking with CRT_fp8.o), to select the 53-bit precision of + * the 8-byte mode. + * + * Whichever of these assignments, i.e. FE_PD64_ENV or FE_PD53_ENV, is + * in effect when the following __mingw_CRTStartup() function is invoked, + * will cause FE_DFL_ENV to be mapped to one or other of the predefined + * environments, FE_PC64_ENV or FE_PC53_ENV, respectively. + */ +extern const fenv_t *_CRT_fenv; + +/* The function mainCRTStartup(), (defined below), is the entry point + * for all console programs, it is, primarily, a wrapper around the + * following __mingw_CRTStartup() helper function. */ -static void __MINGW_ATTRIB_NORETURN -__mingw_CRTStartup (void) +static __MINGW_ATTRIB_NORETURN void __mingw_CRTStartup (void) { int nRet; @@ -274,19 +323,18 @@ __mingw_CRTStartup (void) */ SetUnhandledExceptionFilter (_gnu_exception_handler); - /* Initialize floating point unit. + /* Initialize the floating point unit. */ - __cpu_features_init (); /* Do we have SSE, etc.*/ - _fpreset (); /* Supplied by the runtime library. */ + __cpu_features_init (); /* Do we have SSE, etc. */ + fesetenv (_CRT_fenv); /* Supplied by the runtime library. */ /* Set up __argc, __argv and _environ. */ _setargv (); - /* Sets the default file mode. - * If _CRT_fmode is set, also set mode for stdin, stdout - * and stderr, as well - * NOTE: DLLs don't do this because that would be rude! + /* Set the default file mode. If _CRT_fmode is set, also set mode + * for stdin, stdout and stderr, as well. NOTE: DLLs don't do this + * because that would be rude! */ _mingw32_init_fmode (); @@ -299,31 +347,32 @@ __mingw_CRTStartup (void) */ asm __volatile__ ("andl $-16, %%esp" : : : "%esp"); - /* From libgcc.a, __main calls global class constructors via - __do_global_ctors, This in turn registers __do_global_dtors - as the first entry of the app's atexit table. We do this - explicitly at app startup rather than rely on gcc to generate - the call in main's prologue, since main may be imported from a dll - which has its own __do_global_ctors. */ - __main (); + /* From libgcc.a, __main() calls global class constructors via + * __do_global_ctors(); this in turn registers __do_global_dtors() + * as the first entry of the application's atexit() table. We do + * this explicitly at application startup rather than rely on GCC + * to generate the call in main()'s prologue, since main() may be + * imported from a DLL which has its own __do_global_ctors() + */ + __main (); - /* Call the main function. If the user does not supply one + /* Call the main() function. If the user does not supply one * the one in the 'libmingw32.a' library will be linked in, and - * that one calls WinMain. See main.c in the 'lib' dir + * that one calls WinMain(). See main.c in the 'lib' directory * for more details. */ nRet = main (_argc, _argv, environ); - /* Perform exit processing for the C library. This means - * flushing output and calling 'atexit' registered functions. + /* Perform exit processing for the C library. This means flushing + * output and calling atexit() registered functions. */ _cexit (); ExitProcess (nRet); } -/* - * The function mainCRTStartup is the entry point for all console programs. +/* The function mainCRTStartup() is the entry point for all console + * programs. */ void mainCRTStartup (void) @@ -334,8 +383,7 @@ mainCRTStartup (void) __mingw_CRTStartup (); } -/* - * For now the GUI startup function is the same as the console one. +/* For now the GUI startup function is the same as the console one. * This simply gets rid of the annoying warning about not being able * to find WinMainCRTStartup when linking GUI applications. */ @@ -348,20 +396,15 @@ WinMainCRTStartup (void) __mingw_CRTStartup (); } -/* - * We force use of library version of atexit, which is only - * visible in import lib as _imp__atexit +/* We force use of library version of atexit(), which is only + * visible in import lib as _imp__atexit */ extern int (*_imp__atexit)(void (*)(void)); -int atexit (void (* pfn )(void) ) -{ - return ( (*_imp__atexit)(pfn)); -} +int atexit (void (* pfn )(void)){ return (*_imp__atexit)(pfn); } -/* Likewise for non-ANSI _onexit */ +/* Likewise for non-ANSI _onexit() + */ extern _onexit_t (*_imp___onexit)(_onexit_t); -_onexit_t -_onexit (_onexit_t pfn ) -{ - return (*_imp___onexit)(pfn); -} +_onexit_t _onexit (_onexit_t pfn){ return (*_imp___onexit)(pfn); } + +/* $RCSfile$: end of file */ diff --git a/mingwrt/include/fenv.h b/mingwrt/include/fenv.h index 9b3cec3..58e470a 100644 --- a/mingwrt/include/fenv.h +++ b/mingwrt/include/fenv.h @@ -1,107 +1,197 @@ -#ifndef _FENV_H_ -#define _FENV_H_ - +/* + * fenv.h + * + * Structures and constants defining, and functions for management of, + * the floating point environment. + * + * $Id$ + * + * Written by Danny Smith <dan...@us...> + * Copyright (C) 2002, 2003, 2005-2007, 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, this permission notice, and the following + * disclaimer shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OF OR OTHER + * DEALINGS IN THE SOFTWARE. + * + */ +#ifndef _FENV_H +#pragma GCC system_header +#define _FENV_H + +/* All MinGW headers are required to include <_mingw.h> + */ #include <_mingw.h> -/* FPU status word exception flags */ -#define FE_INVALID 0x01 -#define FE_DENORMAL 0x02 -#define FE_DIVBYZERO 0x04 -#define FE_OVERFLOW 0x08 -#define FE_UNDERFLOW 0x10 -#define FE_INEXACT 0x20 -#define FE_ALL_EXCEPT (FE_INVALID | FE_DENORMAL | FE_DIVBYZERO \ - | FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT) - -/* FPU control word rounding flags */ -#define FE_TONEAREST 0x0000 -#define FE_DOWNWARD 0x0400 -#define FE_UPWARD 0x0800 -#define FE_TOWARDZERO 0x0c00 - -/* The MXCSR exception flags are the same as the - FE flags. */ -#define __MXCSR_EXCEPT_FLAG_SHIFT 0 - -/* How much to shift FE status word exception flags - to get the MXCSR exeptions masks, */ -#define __MXCSR_EXCEPT_MASK_SHIFT 7 - -/* How much to shift FE control word rounding flags - to get MXCSR rounding flags, */ -#define __MXCSR_ROUND_FLAG_SHIFT 3 +/* FPU status word flags indicating exceptions. Each is represented + * by a single bit, sequentially and contiguously assigned to the low + * order bits of the status word, enumerated from lowest: + */ +enum +{ __FE_INVALID_EXCEPT_FLAG_SHIFT, + __FE_DENORMAL_EXCEPT_FLAG_SHIFT, + __FE_DIVBYZERO_EXCEPT_FLAG_SHIFT, + __FE_OVERFLOW_EXCEPT_FLAG_SHIFT, + __FE_UNDERFLOW_EXCEPT_FLAG_SHIFT, + __FE_INEXACT_EXCEPT_FLAG_SHIFT, + + /* The final entry in the shift enumeration represents the order + * of the rightmost bit which does NOT represent an exception flag; + * we use it as a high water mark, for generation of the aggregate + * mask for ALL exception flags; arithmetically, this becomes the + * numeric value of a pseudo-flag placed at the high water mark, + * less one. + */ + __FE_ALL_EXCEPT_HWM_SHIFT +# define FE_ALL_EXCEPT ((0x01 << __FE_ALL_EXCEPT_HWM_SHIFT) - 1) +}; + +#define __FE_EXCEPT(__NAME__) (0x01 << __FE_##__NAME__##_EXCEPT_FLAG_SHIFT) + +#define FE_INVALID __FE_EXCEPT(INVALID) +#define FE_DENORMAL __FE_EXCEPT(DENORMAL) +#define FE_DIVBYZERO __FE_EXCEPT(DIVBYZERO) +#define FE_OVERFLOW __FE_EXCEPT(OVERFLOW) +#define FE_UNDERFLOW __FE_EXCEPT(UNDERFLOW) +#define FE_INEXACT __FE_EXCEPT(INEXACT) + +/* FPU control word flags to specify rounding mode; this may be + * represented as a selection from a four-way enumeration... + */ +enum +{ __FE_ROUND_TONEAREST, + __FE_ROUND_DOWNWARD, + __FE_ROUND_UPWARD, + __FE_ROUND_TOWARDZERO +}; +/* ...with the actual flag bits offset 10-bits from the rightmost + * bit in the control word; hence, the rounding mode macros become: + */ +#define __FE_ROUND(__MODE__) (__FE_ROUND_##__MODE__ << 10) + +#define FE_TONEAREST __FE_ROUND(TONEAREST) +#define FE_DOWNWARD __FE_ROUND(DOWNWARD) +#define FE_UPWARD __FE_ROUND(UPWARD) +#define FE_TOWARDZERO __FE_ROUND(TOWARDZERO) + +/* The MXCSR exception flags are the same as those for the FPU... + */ +#define __MXCSR_EXCEPT_FLAG_SHIFT 0 + +/* ...and the corresponding mask bits are offset by a further 7-bit + * shift to the left... + */ +#define __MXCSR_EXCEPT_MASK_SHIFT 7 + +/* ...while the MXCSR rounding mode flags adopt the same enumeration, + * but are offset a further 3-bits to the left of those representing + * the FPU rounding mode selection flags. + */ +#define __MXCSR_ROUND_FLAG_SHIFT 3 #ifndef RC_INVOKED -/* - For now, support only for the basic abstraction of flags that are - either set or clear. fexcept_t could be structure that holds more - info about the fp environment. -*/ +/* For now, support only for the basic abstraction of flags that are + * either set or clear; fexcept_t could be a structure that holds more + * info about the fp environment. + */ typedef unsigned short fexcept_t; -/* This 32-byte struct represents the entire floating point - environment as stored by fnstenv or fstenv, augmented by - the contents of the MXCSR register, as stored by stmxcsr - (if CPU supports it). */ -typedef struct -{ - unsigned short __control_word; - unsigned short __unused0; - unsigned short __status_word; - unsigned short __unused1; - unsigned short __tag_word; - unsigned short __unused2; - unsigned int __ip_offset; /* instruction pointer offset */ - unsigned short __ip_selector; - unsigned short __opcode; - unsigned int __data_offset; - unsigned short __data_selector; - unsigned short __unused3; - unsigned int __mxcsr; /* contents of the MXCSR register */ +typedef struct __fenv_t +{ /* This 28-byte structure represents the entire floating point + * environment of the FPU, as stored by either the "fnstenv", or + * the "fstenv" instruction. + */ + unsigned short __control_word; + unsigned short __unused0; + unsigned short __status_word; + unsigned short __unused1; + unsigned short __tag_word; + unsigned short __unused2; + unsigned int __ip_offset; /* instruction pointer offset */ + unsigned short __ip_selector; + unsigned short __opcode; + unsigned int __data_offset; + unsigned short __data_selector; + unsigned short __unused3; + + /* The structure is extended, beyond the 28 byte requirement to + * store the FPU state, by 4 additional bytes, which then makes it + * sufficient to also store the contents of the MXCSR register, as + * stored by the "stmxcsr" instruction, (if the CPU supports it). + */ + unsigned int __mxcsr; /* content of the MXCSR register */ } fenv_t; - -/*The C99 standard (7.6.9) allows us to define implementation-specific macros for - different fp environments */ - -/* The default Intel x87 floating point environment (64-bit mantissa) */ -#define FE_PC64_ENV ((const fenv_t *)-1) - -/* The floating point environment set by MSVCRT _fpreset (53-bit mantissa) */ -#define FE_PC53_ENV ((const fenv_t *)-2) - -/* The FE_DFL_ENV macro is required by standard. - fesetenv will use the environment set at app startup.*/ -#define FE_DFL_ENV ((const fenv_t *) 0) - -#ifdef __cplusplus -extern "C" { -#endif +/* The ISO-C99 standard, section 7.6 paragraph 8 requires us to define + * the FE_DFL_ENV macro; it specifies restoration of the FPU environment + * to its default state, as established at application start-up. + */ +#define FE_DFL_ENV ((const fenv_t *)(0)) + +/* Paragraph 9 of the same section of ISO-C99 provides for the definition + * of implementation-specific macros to identify alternative predefined + * FPU environment configuration; we exploit this licence to offer: + * + * FP_PC64_ENV -- Intel standard 80-bit (64-bit precision); this is + * consistent with IEEE-754 extended precision, and + * the configuration preferred by MinGW, because it + * matches the format of GCC's 80-bit long doubles. + * + * FP_PC53_ENV -- IEEE-754 64-bit (53-bit precision); consistent + * with Microsoft's preferred FPU configuration; + * (they offer no better than 64-bit long doubles). + */ +#define FE_PC64_ENV ((const fenv_t *)(-1)) +#define FE_PC53_ENV ((const fenv_t *)(-2)) + +/* The following pair of additional predefined environment macros serve + * as aliases for the preceding pair, respectively, with the added side + * effect that, when passed to fesetenv(), each causes its respective + * alias to become associated with FE_DFL_ENV in subsequent calls. + */ +#define FE_PD64_ENV ((const fenv_t *)(-3)) +#define FE_PD53_ENV ((const fenv_t *)(-4)) + +_BEGIN_C_DECLS /*TODO: Some of these could be inlined */ -/* 7.6.2 Exception */ - -extern int __cdecl __MINGW_NOTHROW feclearexcept (int); -extern int __cdecl __MINGW_NOTHROW fegetexceptflag (fexcept_t * flagp, int excepts); -extern int __cdecl __MINGW_NOTHROW feraiseexcept (int excepts ); -extern int __cdecl __MINGW_NOTHROW fesetexceptflag (const fexcept_t *, int); -extern int __cdecl __MINGW_NOTHROW fetestexcept (int excepts); - -/* 7.6.3 Rounding */ - -extern int __cdecl __MINGW_NOTHROW fegetround (void); -extern int __cdecl __MINGW_NOTHROW fesetround (int mode); - -/* 7.6.4 Environment */ - -extern int __cdecl __MINGW_NOTHROW fegetenv (fenv_t * envp); -extern int __cdecl __MINGW_NOTHROW fesetenv (const fenv_t * ); -extern int __cdecl __MINGW_NOTHROW feupdateenv (const fenv_t *); -extern int __cdecl __MINGW_NOTHROW feholdexcept (fenv_t *); - -#ifdef __cplusplus -} -#endif -#endif /* Not RC_INVOKED */ -#endif /* ndef _FENV_H */ +/* ISO-C99 section 7.6.2 -- Floating Point Exception Handling + */ +extern __cdecl __MINGW_NOTHROW int feclearexcept (int); +extern __cdecl __MINGW_NOTHROW int fegetexceptflag (fexcept_t *, int); +extern __cdecl __MINGW_NOTHROW int feraiseexcept (int); +extern __cdecl __MINGW_NOTHROW int fesetexceptflag (const fexcept_t *, int); +extern __cdecl __MINGW_NOTHROW int fetestexcept (int); + +/* ISO-C99 section 7.6.3 -- Floating Point Rounding Mode Control + */ +extern __cdecl __MINGW_NOTHROW int fegetround (void); +extern __cdecl __MINGW_NOTHROW int fesetround (int); + +/* ISO-C99 section 7.6.4 -- Floating Point Environment Configuration + */ +extern __cdecl __MINGW_NOTHROW int fegetenv (fenv_t *); +extern __cdecl __MINGW_NOTHROW int fesetenv (const fenv_t *); +extern __cdecl __MINGW_NOTHROW int feupdateenv (const fenv_t *); +extern __cdecl __MINGW_NOTHROW int feholdexcept (fenv_t *); + +_END_C_DECLS + +#endif /* ! RC_INVOKED */ +#endif /* !_FENV_H: $RCSfile$: end of file */ diff --git a/mingwrt/include/float.h b/mingwrt/include/float.h index 74ae1ca..ac5e77b 100644 --- a/mingwrt/include/float.h +++ b/mingwrt/include/float.h @@ -1,18 +1,38 @@ -#ifndef _MINGW_FLOAT_H_ /* * float.h * - * This file has no copyright assigned and is placed in the Public Domain. - * This file is a part of the mingw-runtime package. - * No warranty is given; refer to the file DISCLAIMER within the package. + * Constants related to floating point arithmetic. Also included here are + * some non-ANSI mechanisms for accessing the floating point controller. * - * Constants related to floating point arithmetic. + * $Id$ * - * Also included here are some non-ANSI bits for accessing the floating - * point controller. + * Written by Colin Peters <co...@bi...> + * Copyright (C) 1997, 1999-2005, 2007, 2010, 2011, 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, this permission notice, and the following + * disclaimer shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OF OR OTHER + * DEALINGS IN THE SOFTWARE. * */ -#define _MINGW_FLOAT_H_ +#ifndef _MINGW_FLOAT_H +#pragma GCC system_header +#define _MINGW_FLOAT_H /* * NOTE: * @@ -23,147 +43,185 @@ * In a MinGW standard Win32 hosted environment, this should be the float.h * found by a system include path search, but this can't be guaranteed; for * a cross-compiler setup, the GCC-supplied header, which is guarded by the - * _FLOAT_H___ macro, may be found first, thus... + * _FLOAT_H___ macro, may be found first, thus, except when compiling any + * __LIBIMPL__ stub... * */ #if !defined(_FLOAT_H___) && !defined(__FLOAT_H) - - /* - * ...when we didn't find the GCC-supplied header first, we want to pull + /* ...when we didn't find the GCC-supplied header first, we want to pull * it in now; include_next should achieve this, (and we must rely on the * GCC header maintainers to extend us the same courtesy, to get this one * pulled in, when the GCC-supplied header is found first). - * */ -# include_next <float.h> +# define _MINGW_FLOAT_H_ 1 /* GCC's <float.h> needs to see this */ +# include_next <float.h> /* !__CRT_ALIAS __LIBIMPL__( FUNCTION = fpreset ) */ #endif -/* All the headers include this file. */ +/* All MinGW headers are required to include <_mingw.h> + */ #include <_mingw.h> -/* - * Functions and definitions for controlling the FPU. +/* Functions and definitions for controlling the FPU. */ -#ifndef __STRICT_ANSI__ +#ifndef __STRICT_ANSI__ /* TODO: These constants are only valid for x86 machines */ -/* Control word masks for unMask */ -#define _MCW_EM 0x0008001F /* Error masks */ -#define _MCW_IC 0x00040000 /* Infinity */ -#define _MCW_RC 0x00000300 /* Rounding */ -#define _MCW_PC 0x00030000 /* Precision */ - -/* Control word values for unNew (use with related unMask above) */ -#define _EM_INVALID 0x00000010 -#define _EM_DENORMAL 0x00080000 -#define _EM_ZERODIVIDE 0x00000008 -#define _EM_OVERFLOW 0x00000004 -#define _EM_UNDERFLOW 0x00000002 -#define _EM_INEXACT 0x00000001 -#define _IC_AFFINE 0x00040000 -#define _IC_PROJECTIVE 0x00000000 -#define _RC_CHOP 0x00000300 -#define _RC_UP 0x00000200 -#define _RC_DOWN 0x00000100 -#define _RC_NEAR 0x00000000 -#define _PC_24 0x00020000 -#define _PC_53 0x00010000 -#define _PC_64 0x00000000 - -/* These are also defined in Mingw math.h, needed to work around - GCC build issues. */ -/* Return values for fpclass. */ +/* Control word masks for unMask + */ +#define _MCW_EM 0x0008001F /* Error masks */ +#define _MCW_IC 0x00040000 /* Infinity */ +#define _MCW_RC 0x00000300 /* Rounding */ +#define _MCW_PC 0x00030000 /* Precision */ + +/* Control word values for unNew (use with related unMask above) + */ +#define _EM_INVALID 0x00000010 +#define _EM_DENORMAL 0x00080000 +#define _EM_ZERODIVIDE 0x00000008 +#define _EM_OVERFLOW 0x00000004 +#define _EM_UNDERFLOW 0x00000002 +#define _EM_INEXACT 0x00000001 +#define _IC_AFFINE 0x00040000 +#define _IC_PROJECTIVE 0x00000000 +#define _RC_CHOP 0x00000300 +#define _RC_UP 0x00000200 +#define _RC_DOWN 0x00000100 +#define _RC_NEAR 0x00000000 +#define _PC_24 0x00020000 +#define _PC_53 0x00010000 +#define _PC_64 0x00000000 + #ifndef __MINGW_FPCLASS_DEFINED -#define __MINGW_FPCLASS_DEFINED 1 -#define _FPCLASS_SNAN 0x0001 /* Signaling "Not a Number" */ -#define _FPCLASS_QNAN 0x0002 /* Quiet "Not a Number" */ -#define _FPCLASS_NINF 0x0004 /* Negative Infinity */ -#define _FPCLASS_NN 0x0008 /* Negative Normal */ -#define _FPCLASS_ND 0x0010 /* Negative Denormal */ -#define _FPCLASS_NZ 0x0020 /* Negative Zero */ -#define _FPCLASS_PZ 0x0040 /* Positive Zero */ -#define _FPCLASS_PD 0x0080 /* Positive Denormal */ -#define _FPCLASS_PN 0x0100 /* Positive Normal */ -#define _FPCLASS_PINF 0x0200 /* Positive Infinity */ +#define __MINGW_FPCLASS_DEFINED 1 +/* These are also defined in MinGW <math.h>; these duplicates are + * needed here, to work around GCC build issues. FIXME: we should + * be able to factor this, at least to avoid any potential for the + * introduction of inconsistent definitions. + * + * + * Return values for fpclass. + */ +#define _FPCLASS_SNAN 0x0001 /* Signaling "Not a Number" */ +#define _FPCLASS_QNAN 0x0002 /* Quiet "Not a Number" */ +#define _FPCLASS_NINF 0x0004 /* Negative Infinity */ +#define _FPCLASS_NN 0x0008 /* Negative Normal */ +#define _FPCLASS_ND 0x0010 /* Negative Denormal */ +#define _FPCLASS_NZ 0x0020 /* Negative Zero */ +#define _FPCLASS_PZ 0x0040 /* Positive Zero */ +#define _FPCLASS_PD 0x0080 /* Positive Denormal */ +#define _FPCLASS_PN 0x0100 /* Positive Normal */ +#define _FPCLASS_PINF 0x0200 /* Positive Infinity */ + #endif /* __MINGW_FPCLASS_DEFINED */ -/* invalid subconditions (_SW_INVALID also set) */ -#define _SW_UNEMULATED 0x0040 /* unemulated instruction */ -#define _SW_SQRTNEG 0x0080 /* square root of a neg number */ -#define _SW_STACKOVERFLOW 0x0200 /* FP stack overflow */ -#define _SW_STACKUNDERFLOW 0x0400 /* FP stack underflow */ - -/* Floating point error signals and return codes */ -#define _FPE_INVALID 0x81 -#define _FPE_DENORMAL 0x82 -#define _FPE_ZERODIVIDE 0x83 -#define _FPE_OVERFLOW 0x84 -#define _FPE_UNDERFLOW 0x85 -#define _FPE_INEXACT 0x86 -#define _FPE_UNEMULATED 0x87 -#define _FPE_SQRTNEG 0x88 -#define _FPE_STACKOVERFLOW 0x8a -#define _FPE_STACKUNDERFLOW 0x8b -#define _FPE_EXPLICITGEN 0x8c /* raise( SIGFPE ); */ +/* Invalid subconditions (_SW_INVALID also set) + */ +#define _SW_UNEMULATED 0x0040 /* unemulated instruction */ +#define _SW_SQRTNEG 0x0080 /* square root of a neg number */ +#define _SW_STACKOVERFLOW 0x0200 /* FP stack overflow */ +#define _SW_STACKUNDERFLOW 0x0400 /* FP stack underflow */ + +/* Floating point error signals and return codes + */ +#define _FPE_INVALID 0x81 +#define _FPE_DENORMAL 0x82 +#define _FPE_ZERODIVIDE 0x83 +#define _FPE_OVERFLOW 0x84 +#define _FPE_UNDERFLOW 0x85 +#define _FPE_INEXACT 0x86 +#define _FPE_UNEMULATED 0x87 +#define _FPE_SQRTNEG 0x88 +#define _FPE_STACKOVERFLOW 0x8A +#define _FPE_STACKUNDERFLOW 0x8B +#define _FPE_EXPLICITGEN 0x8C /* raise SIGFPE */ #ifndef RC_INVOKED -#ifdef __cplusplus -extern "C" { -#endif +_BEGIN_C_DECLS /* Set the FPU control word as cw = (cw & ~unMask) | (unNew & unMask), * i.e. change the bits in unMask to have the values they have in unNew, - * leaving other bits unchanged. */ -_CRTIMP unsigned int __cdecl __MINGW_NOTHROW _controlfp (unsigned int unNew, unsigned int unMask); -_CRTIMP unsigned int __cdecl __MINGW_NOTHROW _control87 (unsigned int unNew, unsigned int unMask); - + * leaving other bits unchanged. + */ +_CRTIMP __cdecl __MINGW_NOTHROW unsigned int _controlfp (unsigned int unNew, unsigned int unMask); +_CRTIMP __cdecl __MINGW_NOTHROW unsigned int _control87 (unsigned int unNew, unsigned int unMask); -_CRTIMP unsigned int __cdecl __MINGW_NOTHROW _clearfp (void); /* Clear the FPU status word */ -_CRTIMP unsigned int __cdecl __MINGW_NOTHROW _statusfp (void); /* Report the FPU status word */ -#define _clear87 _clearfp -#define _status87 _statusfp +#define _clear87 _clearfp +#define _status87 _statusfp +_CRTIMP __cdecl __MINGW_NOTHROW unsigned int _clearfp (void); /* Clear the FPU status word */ +_CRTIMP __cdecl __MINGW_NOTHROW unsigned int _statusfp (void); /* Report the FPU status word */ -/* - MSVCRT.dll _fpreset initializes the control register to 0x27f, - the status register to zero and the tag word to 0FFFFh. - This differs from asm instruction finit/fninit which set control - word to 0x37f (64 bit mantissa precison rather than 53 bit). - By default, the mingw version of _fpreset sets fp control as - per fninit. To use the MSVCRT.dll _fpreset, include CRT_fp8.o when - building your application. -*/ -void __cdecl __MINGW_NOTHROW _fpreset (void); -void __cdecl __MINGW_NOTHROW fpreset (void); - -/* Global 'variable' for the current floating point error code. */ -_CRTIMP int * __cdecl __MINGW_NOTHROW __fpecode(void); -#define _fpecode (*(__fpecode())) -/* - * IEEE recommended functions. MS puts them in float.h - * but they really belong in math.h. +/* MSVCRT.DLL provides _fpreset() to initialize the FPU; it initializes + * the control register to 0x27F, (thus selecting 53-bit precision), the + * status register to zero and the tag word to 0FFFFh. This differs from + * Intel's default configuration, (as established by the asm instructions + * "finit" and "fninit"), which set the control word to 0x37F, (yielding + * 64-bit precison rather than 53-bit). + * + * Nominally, MinGW prefers to configure the FPU for 64-bit precision, as + * that is a better fit for support of GCC's 10-byte long doubles. This + * was formerly achieved by provision of an alternative implementation of + * _fpreset(), intended to be statically linked into MinGW applications, + * (with variants enabling 64-bit precision by default, or alternatively, + * when the application is explicitly linked with CRT_fp8.o, providing + * 53-bit precision instead). Unfortunately, this linking strategy may + * lead to non-deterministic ambiguity over which _fpreset() variant is + * called, in the event of the call originating in any user implemented, + * or third party DLL. Consequently, support for this strategy has been + * withdrawn. _fpreset() now ALWAYS refers to the MSVCRT.DLL function, + * (and thus ALWAYS selects 53-bit precision); MinGW applications should + * now use the ISO-C99 standard fesetenv() function to configure the FPU, + * (as the start-up code now does, to enable 64-bit precision by default, + * but continuing to support linking with CRT_fp8.o, to initialize the + * configuration to 53-bit precision). */ +_CRTIMP __cdecl __MINGW_NOTHROW void _fpreset (void); -_CRTIMP double __cdecl __MINGW_NOTHROW _chgsign (double); -_CRTIMP double __cdecl __MINGW_NOTHROW _copysign (double, double); -_CRTIMP double __cdecl __MINGW_NOTHROW _logb (double); -_CRTIMP double __cdecl __MINGW_NOTHROW _nextafter (double, double); -_CRTIMP double __cdecl __MINGW_NOTHROW _scalb (double, long); +/* Former MinGW releases also provided fpreset(), implemented as an alias + * for _fpreset(), (in whichever guise it was deployed); deprecate this, + * but retain the association for backward compatibility, (noting that it + * will now redirect the call to fesetenv(), as recommended above, with + * the configuration selection set to FE_DFL_ENV). + */ +__cdecl __MINGW_NOTHROW void fpreset (void) __MINGW_ATTRIB_DEPRECATED; -_CRTIMP int __cdecl __MINGW_NOTHROW _finite (double); -_CRTIMP int __cdecl __MINGW_NOTHROW _fpclass (double); -_CRTIMP int __cdecl __MINGW_NOTHROW _isnan (double); +#ifndef __NO_INLINE__ +/* Provide the implementation of fpreset() as an inline stub; for this, + * we need to expose a minimal opaque subset of <fenv.h>, and we assume + * that FE_DFL_ENV is equivalent to (const fenv_t *)(0), (as it is, in + * the MinGW implementation of <fenv.h>). + */ +typedef struct __fenv_t fenv_t; +__cdecl __MINGW_NOTHROW int fesetenv (const fenv_t *); -#ifdef __cplusplus -} +__CRT_ALIAS __LIBIMPL__( FUNCTION = fpreset ) +void fpreset (void){ fesetenv ((const fenv_t *)(0)); } #endif -#endif /* Not RC_INVOKED */ +/* Global 'variable' for the current floating point error code. + */ +#define _fpecode (*(__fpecode())) +_CRTIMP __cdecl __MINGW_NOTHROW int *__fpecode (void); + +/* IEEE recommended functions. Microsoft puts them in <float.h>, + * but they really belong in math.h. + */ +_CRTIMP __cdecl __MINGW_NOTHROW double _chgsign (double); +_CRTIMP __cdecl __MINGW_NOTHROW double _copysign (double, double); +_CRTIMP __cdecl __MINGW_NOTHROW double _logb (double); +_CRTIMP __cdecl __MINGW_NOTHROW double _nextafter (double, double); +_CRTIMP __cdecl __MINGW_NOTHROW double _scalb (double, long); + +_CRTIMP __cdecl __MINGW_NOTHROW int _finite (double); +_CRTIMP __cdecl __MINGW_NOTHROW int _fpclass (double); +_CRTIMP __cdecl __MINGW_NOTHROW int _isnan (double); -#endif /* Not __STRICT_ANSI__ */ +_END_C_DECLS -#endif /* _MINGW_FLOAT_H_ */ +#endif /* ! RC_INVOKED */ +#endif /* !__STRICT_ANSI__ */ +#endif /* _MINGW_FLOAT_H: $RCSfile$: end of file */ diff --git a/mingwrt/mingwex/fesetenv.c b/mingwrt/mingwex/fesetenv.c index 4a5e633..a209aa8 100644 --- a/mingwrt/mingwex/fesetenv.c +++ b/mingwrt/mingwex/fesetenv.c @@ -1,57 +1,130 @@ +/* + * fesetenv.c + * + * Implements the fesetenv(3) function, per ISO-C99 section 7.6.4.3 + * + * $Id$ + * + * Written by Danny Smith <dan...@us...> + * Copyright (C) 2002, 2005, 2006, 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, this permission notice, and the following + * disclaimer shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OF OR OTHER + * DEALINGS IN THE SOFTWARE. + * + */ +#define __USE_CRTIMP + #include <fenv.h> #include <float.h> #include "cpu_features.h" -/* 7.6.4.3 - The fesetenv function establishes the floating-point environment - represented by the object pointed to by envp. The argument envp - points to an object set by a call to fegetenv or feholdexcept, or - equal the macro FE_DFL_ENV or an implementation-defined environment - macro. Note that fesetenv merely installs the state of the exception - flags represented through its argument, and does not raise these - exceptions. - */ +int fesetenv( const fenv_t *fenvp ) +{ + /* Specified by ISO-C99 section 7.6.4.3 + * + * The fesetenv() function establishes the floating-point environment + * represented by the object pointed to by "envp". The argument "envp" + * points to an object set by a call to fegetenv() or feholdexcept(), or + * equals the macro, FE_DFL_ENV, or an implementation-defined environment + * macro. Note that fesetenv() merely sets the state of the exception + * flags represented through its argument; it does not raise these + * exceptions. + * + * + * The following static variable stores the predefined environment + * which is associated with FE_DFL_ENV; initialize it to represent + * the Intel X87 default configuration. + */ + static const fenv_t *fenv_default = FE_PC64_ENV; -extern void (*_imp___fpreset)( void ) ; + /* Before anything else, establish a default exception handling + * policy for SSE instructions, to be used in conjunction with the + * predefined FPU state macros, (establishing an effective default + * MXCSR status value of 0x1F80, so masking all exceptions, while + * leaving all other bits as zero), in the event that SSE support + * is available. + */ + unsigned fenv_mxcsr = FE_ALL_EXCEPT << __MXCSR_EXCEPT_MASK_SHIFT; -int... [truncated message content] |
From: Keith M. <no...@so...> - 2017-02-24 13:54:34
|
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 8c8b937be7a3a95b2651ebc3f1eb10d03ef621c9 (commit) from 617f15b16863cb5d542d1134e44e8fbd72739ad4 (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/8c8b937be7a3a95b2651ebc3f1eb10d03ef621c9/ commit 8c8b937be7a3a95b2651ebc3f1eb10d03ef621c9 Author: Keith Marshall <kei...@us...> Date: Fri Feb 24 12:54:20 2017 +0000 Extend basic test suite infrastructure to w32api. diff --git a/ChangeLog b/ChangeLog index a33f5aa..81bd016 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2017-02-21 Keith Marshall <kei...@us...> + + Extend basic test suite infrastructure to w32api. + + * Makefile.in (check test tests): New rules; all are synonymous. + (check-recursive): New rule; invoked by each of the preceding three + synonyms, applying the common effect in nominated subdirectories. + 2016-10-14 Keith Marshall <kei...@us...> Make package installation prefix consistent throughout. diff --git a/Makefile.in b/Makefile.in index 0f1feaa..07a23ee 100644 --- a/Makefile.in +++ b/Makefile.in @@ -85,6 +85,14 @@ subdirs = @subdirs@ %-subdirs:; $(foreach dir,${subdirs},$(MAKE) -C ${dir} $*;) +# Test Suite +# ---------- +# +.PHONY: check-recursive +check test tests: check-recursive +check-recursive: %: %-subdirs + + # Distribution # ------------ # diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog index 03e10a5..ec6c8f5 100644 --- a/mingwrt/ChangeLog +++ b/mingwrt/ChangeLog @@ -1,3 +1,10 @@ +2017-02-21 Keith Marshall <kei...@us...> + + Make mingwrt and w32api test suites consistent. + + * Makefile.in (test): New rule; define it as a synonym for... + (check tests): ...these, so maintaining consistency with w32api. + 2017-02-16 Keith Marshall <kei...@us...> Work around GCC bug; force C++11 to support std::wcstof(). diff --git a/mingwrt/Makefile.in b/mingwrt/Makefile.in index 5db46ea..a830b63 100644 --- a/mingwrt/Makefile.in +++ b/mingwrt/Makefile.in @@ -842,6 +842,15 @@ uninstall-mingwrt-libdir-objects uninstall-mingwrt-libdir-libs: un%: INSTALL_DATA='cd $$2 && $(RM) $$1' $* +# Test Suite +# ---------- +# +.PHONY: check-recursive +check test tests: check-recursive +check-recursive: + $(MAKE) -C tests $@ + + # Distribution # ------------ # @@ -959,12 +968,4 @@ maintainer-clean-local: maintainer-clean-warning distclean-local clean mostlyclean distclean maintainer-clean: %clean: %clean-local -# Testsuite -# --------- -# -.PHONY: check-recursive -check tests: check-recursive -check-recursive: - $(MAKE) -C tests $@ - # $RCSfile$: end of file diff --git a/w32api/ChangeLog b/w32api/ChangeLog index 6540dfe..d027a81 100644 --- a/w32api/ChangeLog +++ b/w32api/ChangeLog @@ -1,3 +1,23 @@ +2017-02-21 Keith Marshall <kei...@us...> + + Implement basic test suite infrastructure. + + * tests: New subdirectory; it hosts... + * tests/Makefile.in tests/testsuite.at.in tests/atlocal.in + * tests/headers.at: ...these new files; they implement the basic test + suite infrastructure, initially comprising header integrity checks. + + * configure.ac (AC_PROG_CXX): Check it. + (AC_CONFIG_TESTDIR): Configure tests subdirectory. + (AC_CHECK_PROG): Check for autom4te; configure fall back if missing. + (AC_CONFIG_FILES): Generate tests/atlocal, tests/testsuite.at.tmp, and + tests/Makefile. + + * Makefile.in (check test tests): New rules; all are synonymous. + (check-recursive): New rule; invoked by each of the preceding three. + (w32api-srcdist-testsuite-files): New rule; implement and use it... + (w32api-srcdist-files): ...here. + 2017-02-14 Alexander Krisak <ak...@us...> Add missing constant definition, per issue [#2249]. diff --git a/w32api/Makefile.in b/w32api/Makefile.in index 0737012..b6d7b83 100644 --- a/w32api/Makefile.in +++ b/w32api/Makefile.in @@ -317,6 +317,16 @@ uninstall-w32api-libs: un%: $(MAKE) --no-print-directory mkinstalldirs= \ INSTALL_DATA='cd $$2 && rm -f $$1' $* + +# Test Suite +# ---------- +# +.PHONY: check-recursive +check test tests: check-recursive +check-recursive: + $(MAKE) -C tests $@ + + # Distribution # ------------ # @@ -345,11 +355,17 @@ mingwrt-srcdist w32api-srcdist: %-srcdist: %-srcdist-dir %-srcdist-files xz -c > $*-$(PACKAGE_RELEASE_TAG)-src.tar.xz $(RM) -r dist/$*-$(PACKAGE_VERSION) +w32api-srcdist-testsuite-files: $(wildcard ${w32api_srcdir}/tests/*.at) +w32api-srcdist-testsuite-files: $(wildcard ${w32api_srcdir}/tests/*.in) + (cd ${w32api_srcdir} && tar chf - $(addprefix tests/,$(notdir $^))) | \ + (cd dist/$(PACKAGE_TARNAME)-$(PACKAGE_VERSION) && tar xf -) + mingwrt-srcdist-dir w32api-srcdist-dir: %-srcdist-dir: $(RM) -r dist/$*-$(PACKAGE_VERSION) $(call mkinstalldirs,,dist/$*-$(PACKAGE_VERSION)) w32api-srcdist-files: w32api-srcdist-config-files +w32api-srcdist-files: w32api-srcdist-testsuite-files w32api-srcdist-files: w32api-srcdist-package-files vpath install-sh ${top_srcdir}/.. ${top_srcdir} diff --git a/w32api/configure.ac b/w32api/configure.ac index 6dc4a17..2dac7bd 100644 --- a/w32api/configure.ac +++ b/w32api/configure.ac @@ -50,6 +50,12 @@ AC_PROG_MKDIR_P AC_PROG_LN_S + AC_CONFIG_TESTDIR([tests]) + AC_CONFIG_FILES([tests/testsuite.at.tmp:tests/testsuite.at.in]) + AC_CHECK_PROG([AUTOTEST_COMPILE],[autom4te],[command],[missing]) + AC_CONFIG_FILES([tests/atlocal tests/Makefile]) + AC_PROG_CXX + AC_CONFIG_FILES([Makefile]) AC_OUTPUT # diff --git a/w32api/tests/Makefile.in b/w32api/tests/Makefile.in new file mode 100644 index 0000000..39da276 --- /dev/null +++ b/w32api/tests/Makefile.in @@ -0,0 +1,151 @@ +# @configure_input@ +# +# Makefile template for MinGW.org Win32 API testsuite +# +# $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. + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +top_builddir = @top_builddir@ + +# The default rule is "check"; it is a synonym for the "check-recursive" +# request, from the parent directory's make process, which initiates the +# installation of the package components to be tested, then prepares the +# testsuite itself, compiling it if necessary, and finally, runs it. +# +check check-recursive: check-install check-pretest check-local + +check-local: testsuite + $(SHELL) $^ $(TESTSUITEFLAGS) + +check-install: testsuite.install +check-pretest: testsuite.pretest headers.at.pretest + +vpath Makefile.in ${srcdir} +vpath config.status ${top_builddir} +Makefile: %: %.in config.status + cd ${top_builddir}; ./config.status $(notdir ${CURDIR})/$@ + +LN_S = @LN_S@ + +# Favour any copy of the testsuite which already exists in the build +# directory, but fall back to any which may have been distributed with +# the source package. +# +testsuite.pretest: %.pretest: %.at.pretest + test -r $* || if test -r ${srcdir}/$*; then \ + $(LN_S) ${srcdir}/$* $*; fi + +# The primary testsuite.at source is nominally generated, when the +# package is configured, but is then distributed within the release +# tarball; update it as a side effect of running the testsuite, but +# only if its content differs from any distributed copy, to ensure +# that users building from a release tarball can do so, without a +# requirement to install autom4te. +# +vpath %.at ${srcdir} +vpath %.at.in ${srcdir} +testsuite.at.pretest: %.pretest: %.tmp + test -r $* || if test -r ${srcdir}/$*; then \ + $(LN_S) ${srcdir}/$* $*; else touch $*; fi + sed '1s,tests/$<,$*,' $< > $@ + cmp -s $@ $* || cp -f $@ $* + $(RM) $@ $< + +testsuite.at.tmp: %.tmp: ../config.status %.in + cd ..; ./config.status tests/$@ + +# The enumerated list of headers, which are to be tested, is also a +# candidate for dynamic update; in this case, we prefer to update the +# list in place, within the testsuite source tree. +# +headers.at.pretest: W32API_AT_ENUM := W32API_AT_PACKAGE_HEADERS +headers.at.pretest: %.pretest: + sed '/^m4_define(\[$(W32API_AT_ENUM)],/q' ${srcdir}/$* > $@ + $(call enum_headers,hdr,${top_srcdir}/include, dnl >> $@;) + $(call enum_header_subdirs,${top_srcdir}/include,$(HEADER_SUBDIRS),$@;) + sed -n '/^])# $(W32API_AT_ENUM)/,$$p' ${srcdir}/$* >> $@ + cmp -s $@ ${srcdir}/$* || cp -f $@ ${srcdir}/$* + $(RM) $@ + +enum_headers = $(foreach $1,$(notdir $(wildcard $2/*.h)),echo $(4:%=%/)$($1)$3) +enum_header_subdirs = $(foreach d,$2,$(call enum_headers,h,$1/$d, dnl >> $3,$d)) + +# Compile the testsuite, from autotest sources. +# +AUTOTEST_COMPILE = $(autotest_@AUTOTEST_COMPILE@) +autotest_command = autom4te --language autotest --include ${srcdir} +autotest_missing = $(call missing,autom4te,Unable to compile the testsuite) + +testsuite: %: %.at + $(AUTOTEST_COMPILE) -o $* $< + +testsuite: headers.at + +# Display a diagnostic message, explaining that any specified program +# is required, but has not been installed. +# +define missing +$(warning The program '$1' does not appear to be installed.) +$(call $1_description)$(error $2) +endef + +# Describe the circumstances under which the autom4te program may be +# required for building the testsuite, as an adjunct to the diagnostic +# notification that it may need to be installed. +# +define autom4te_description +$(info ) +$(info This program is used to compile the testsuite driver script, from) +$(info original autotest source files. You need it when you are building) +$(info the testsuite from a checked-out clone of the source code repository;) +$(info otherwise, you should need it only if you have modified any of those) +$(info testsuite source files, or you have changed the package content in) +$(info any way which may cause any of these files to be regenerated.) +$(info ) +$(info If you do need it, you may obtain it by installing GNU autoconf.) +$(info ) +endef + +# Install a local copy of the package components to be tested; we need +# the full w32api package, and also the mingwrt headers, to ensure that +# we are testing what we've built, and not those which were installed +# with whatever compiler we are using for the build. +# +testsuite.install: install-w32api install-mingwrt-headers + +install-w32api: + $(MAKE) -C .. --no-print-directory prefix=${CURDIR} $@ + +chkconfig = ($1/config.status --version | grep $2) 2>&1 > /dev/null +install-mingwrt-headers: + @for dir in ../../mingwrt*; do \ + if $(call chkconfig,$$dir,'MinGW C Runtime'); then \ + $(MAKE) -C $$dir --no-print-directory prefix=${CURDIR} $@; break; \ + fi; \ + done + +# $RCSfile$: end of file diff --git a/w32api/configure.ac b/w32api/tests/atlocal.in similarity index 56% copy from w32api/configure.ac copy to w32api/tests/atlocal.in index 6dc4a17..3cb716d 100644 --- a/w32api/configure.ac +++ b/w32api/tests/atlocal.in @@ -1,12 +1,11 @@ -# configure.ac -*- Autoconf -*- vim: filetype=config +# @configure_input@ # -# Process this file with autoconf, to create a configure script for -# the MinGW.org 32-bit MS-Windows API package. +# Autotest configuration template for MinGW.org Runtime Library Package # # $Id$ # # Written by Keith Marshall <kei...@us...> -# Copyright (C) 2015, 2016, MinGW.org Project +# Copyright (C) 2017, MinGW.org Project # # # Permission is hereby granted, free of charge, to any person obtaining a @@ -15,11 +14,11 @@ # 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 @@ -28,29 +27,19 @@ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. # - AC_PREREQ([2.64]) - AC_INIT([MinGW Win32 API],[__VERSION__],[__BUG_REPORT_URL__],[w32api]) - - AC_PREFIX_DEFAULT([/mingw]) - AC_CONFIG_SRCDIR([include/w32api.h.in]) - MINGW_AC_CONFIG_EXTRA_SRCDIR([mingwrt],[include/_mingw.h.in]) - - MINGW_AC_PROG_CC_COMPILE_ONLY - - AC_CHECK_TOOL([AS],[as],[as]) - AC_CHECK_TOOL([DLLTOOL],[dlltool],[dlltool]) - AC_CHECK_TOOL([STRIP],[strip],[strip]) - - AC_CHECK_TOOL([AR],[ar],[ar]) - AC_ARG_VAR([ARFLAGS],[ar mode flags for creation of archive libraries [rcs]]) - AC_SUBST([ARFLAGS],[${ARFLAGS-"rcs"}]) - AC_PROG_RANLIB - - AC_PROG_INSTALL - AC_PROG_MKDIR_P - AC_PROG_LN_S +# +# Options we need to pass to the GCC compilers, to ensure that we will be +# testing locally installed copies of our system headers and libraries, in +# the testsuite directory, rather than those associated with the compilers +# themselves. +# +at_compiler_config="-nostdinc -iwithprefixbefore include" +at_package_includes="-I $at_top_build_prefix/../include" - AC_CONFIG_FILES([Makefile]) - AC_OUTPUT +# Commands to invoke the C and C++ compilers, as identified during package +# configuration. # -# $RCSfile$: end of file +at_compiler_cc="@CC@ $at_compiler_config $at_package_includes" +at_compiler_cxx="@CXX@ $at_compiler_config $at_package_includes" + +# $RCSfile$: vim: set filetype=config: end of file diff --git a/w32api/tests/headers.at b/w32api/tests/headers.at new file mode 100644 index 0000000..9069693 --- /dev/null +++ b/w32api/tests/headers.at @@ -0,0 +1,326 @@ +# headers.at +# +# Autotest module for checking integrity of MinGW runtime headers. +# Each header is first individually compiled, to ensure that it is +# both valid and self contained; all are then compiled together, to +# verify mutual consistency. +# +# $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. +# +# +# W32API_AT_PACKAGE_HEADERS +# ------------------------- +# Specify the gamut of package headers to be tested. This list is updated +# dynamically, when running "make check"; there is no need to edit it. +# +m4_define([W32API_AT_PACKAGE_HEADERS],[dnl +accctrl.h dnl +aclapi.h dnl +aclui.h dnl +adsprop.h dnl +afxres.h dnl +amaudio.h dnl +amvideo.h dnl +audevcod.h dnl +aviriff.h dnl +aygshell.h dnl +basetsd.h dnl +basetyps.h dnl +bdatypes.h dnl +cderr.h dnl +cguid.h dnl +cmnquery.h dnl +comcat.h dnl +commctrl.h dnl +commdlg.h dnl +control.h dnl +cplext.h dnl +cpl.h dnl +custcntl.h dnl +dbt.h dnl +dde.h dnl +ddeml.h dnl +devguid.h dnl +dhcpcsdk.h dnl +dlgs.h dnl +docobj.h dnl +dsadmin.h dnl +dsclient.h dnl +dsgetdc.h dnl +dshow.h dnl +dsquery.h dnl +dsrole.h dnl +dvdevcod.h dnl +dvdmedia.h dnl +edevdefs.h dnl +errorrep.h dnl +errors.h dnl +evcode.h dnl +exdisp.h dnl +exdispid.h dnl +fltdefs.h dnl +gdiplus.h dnl +httpext.h dnl +icm.h dnl +idispids.h dnl +il21dec.h dnl +imagehlp.h dnl +imm.h dnl +initguid.h dnl +intshcut.h dnl +ipexport.h dnl +iphlpapi.h dnl +ipifcons.h dnl +ipinfoid.h dnl +iprtrmib.h dnl +iptypes.h dnl +ipxconst.h dnl +ipxrtdef.h dnl +ipxtfflt.h dnl +isguids.h dnl +ks.h dnl +ksmedia.h dnl +largeint.h dnl +lmaccess.h dnl +lmalert.h dnl +lmapibuf.h dnl +lmat.h dnl +lmaudit.h dnl +lmbrowsr.h dnl +lmchdev.h dnl +lmconfig.h dnl +lmcons.h dnl +lmerr.h dnl +lmerrlog.h dnl +lm.h dnl +lmmsg.h dnl +lmremutl.h dnl +lmrepl.h dnl +lmserver.h dnl +lmshare.h dnl +lmsname.h dnl +lmstats.h dnl +lmsvc.h dnl +lmuseflg.h dnl +lmuse.h dnl +lmwksta.h dnl +lzexpand.h dnl +mapi.h dnl +mciavi.h dnl +mcx.h dnl +mgm.h dnl +mgmtapi.h dnl +mlang.h dnl +mmreg.h dnl +mmsystem.h dnl +mpegtype.h dnl +mprapi.h dnl +mq.h dnl +msacm.h dnl +mshtml.h dnl +mswsock.h dnl +nb30.h dnl +nddeapi.h dnl +nspapi.h dnl +ntdef.h dnl +ntdll.h dnl +ntdsapi.h dnl +ntdsbcli.h dnl +ntldap.h dnl +ntsecapi.h dnl +ntsecpkg.h dnl +oaidl.h dnl +objbase.h dnl +objfwd.h dnl +objidl.h dnl +objsafe.h dnl +objsel.h dnl +ocidl.h dnl +odbcinst.h dnl +ole2.h dnl +ole2ver.h dnl +oleacc.h dnl +oleauto.h dnl +olectl.h dnl +olectlid.h dnl +oledlg.h dnl +ole.h dnl +oleidl.h dnl +poppack.h dnl +powrprof.h dnl +prsht.h dnl +psapi.h dnl +pshpack1.h dnl +pshpack2.h dnl +pshpack4.h dnl +pshpack8.h dnl +qedit.h dnl +rapi.h dnl +rasdlg.h dnl +raserror.h dnl +ras.h dnl +rassapi.h dnl +reason.h dnl +regstr.h dnl +richedit.h dnl +richole.h dnl +routprot.h dnl +rpcdce2.h dnl +rpcdce.h dnl +rpcdcep.h dnl +rpc.h dnl +rpcndr.h dnl +rpcnsi.h dnl +rpcnsip.h dnl +rpcnterr.h dnl +rpcproxy.h dnl +rtutils.h dnl +schannel.h dnl +schnlsp.h dnl +scrnsave.h dnl +sddl.h dnl +sdkddkver.h dnl +secext.h dnl +security.h dnl +servprov.h dnl +setupapi.h dnl +shellapi.h dnl +shldisp.h dnl +shlguid.h dnl +shlobj.h dnl +shlwapi.h dnl +shobjidl.h dnl +snmp.h dnl +specstrings.h dnl +sqlext.h dnl +sql.h dnl +sqltypes.h dnl +sqlucode.h dnl +sspi.h dnl +stm.h dnl +strmif.h dnl +subauth.h dnl +svcguid.h dnl +tlhelp32.h dnl +tmschema.h dnl +unknwn.h dnl +userenv.h dnl +usp10.h dnl +uxtheme.h dnl +vfw.h dnl +vidcap.h dnl +vmr9.h dnl +vptype.h dnl +winbase.h dnl +winber.h dnl +wincon.h dnl +wincrypt.h dnl +windef.h dnl +windns.h dnl +windows.h dnl +windowsx.h dnl +winerror.h dnl +wingdi.h dnl +wininet.h dnl +winioctl.h dnl +winldap.h dnl +winnetwk.h dnl +winnls.h dnl +winnt.h dnl +winperf.h dnl +winreg.h dnl +winresrc.h dnl +winsnmp.h dnl +winsock2.h dnl +winsock.h dnl +winspool.h dnl +winsvc.h dnl +winuser.h dnl +winver.h dnl +ws2spi.h dnl +ws2tcpip.h dnl +wsahelp.h dnl +wsipx.h dnl +wsnetbs.h dnl +wtsapi32.h dnl +wtypes.h dnl +xprtdefs.h dnl +zmouse.h dnl +])# W32API_AT_PACKAGE_HEADERS + +# W32API_AT_HASH_INCLUDE( HEADER ) +# -------------------------------- +# Emit a single "#include <HEADER>" statement into a generated +# program language source file. +# +m4_define([W32API_AT_HASH_INCLUDE],dnl +[[#include <$1> +]])# W32API_AT_HASH_INCLUDE + +# W32API_AT_CHECK_HEADERS_STANDALONE( LANG ) +# ------------------------------------------ +# Check compilability and self-containment of all package headers, +# when each is compiled individually, using the LANG compiler. +# +m4_define([W32API_AT_CHECK_HEADERS_STANDALONE],[MINGW_AT_LANG([$1])dnl +AT_BANNER([Header integrity checks: stand-alone compile; language = $1.]) +m4_foreach_w([HEADER],W32API_AT_PACKAGE_HEADERS,[dnl +AT_SETUP([#include <]HEADER[>])AT_KEYWORDS([$1 $1-headers]) +AS_VAR_APPEND([CPPFLAGS],[" -Wall -Wextra -Wsystem-headers"]) +MINGW_AT_CHECK_COMPILE([dnl +#define __IN_W32API_TESTSUITE__ 1 +W32API_AT_HASH_INCLUDE(HEADER)dnl +int main(){ return 0; }]) +AT_CLEANUP +])])# W32API_AT_CHECK_HEADERS_STANDALONE +# +# Run it, for each of LANG = C and LANG = C++ +# +m4_foreach([LANG],[C,C++],[W32API_AT_CHECK_HEADERS_STANDALONE(LANG)]) + +# W32API_AT_CHECK_HEADERS_COMBINED( LANG ) +# ---------------------------------------- +# Check compilability of package headers, when all are included within +# a single translation unit, and compiled using the LANG compiler. +# +m4_define([W32API_AT_CHECK_HEADERS_COMBINED],[MINGW_AT_LANG([$1])dnl +AT_SETUP([#include all; language = $1])AT_KEYWORDS([$1 $1-headers]) +AS_VAR_APPEND([CPPFLAGS],[" -Wall -Wextra -Wsystem-headers"]) +m4_if([$1],[C],AS_VAR_APPEND([CPPFLAGS],[" -Wno-deprecated-declarations"])) +MINGW_AT_CHECK_COMPILE([dnl +m4_foreach_w([HEADER],W32API_AT_PACKAGE_HEADERS,[dnl +W32API_AT_HASH_INCLUDE(HEADER)]) +int main(){ return __W32API_MAJOR_VERSION; }]) +AT_CLEANUP +])# W32API_AT_CHECK_HEADERS_COMBINED +# +# Run it, for each of LANG = C and LANG = C++ +# +AT_BANNER([Header consistency checks: composite compile.]) +m4_foreach([LANG],[C,C++],[W32API_AT_CHECK_HEADERS_COMBINED(LANG)]) + +# vim: filetype=config formatoptions=croql +# $RCSfile$: end of file diff --git a/w32api/tests/testsuite.at.in b/w32api/tests/testsuite.at.in new file mode 100644 index 0000000..2eccbcc --- /dev/null +++ b/w32api/tests/testsuite.at.in @@ -0,0 +1,92 @@ +# @configure_input@ +# +# Top level autotest module for instantiation of the mingwrt testsuite. +# +m4_define([AT_PACKAGE_STRING],[@PACKAGE_STRING@]) +m4_define([AT_PACKAGE_BUGREPORT],[@PACKAGE_BUGREPORT@]) +# +# $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. + + +# MINGW_AT_LANG( [LANGUAGE = C] ) +# ------------------------------- +# Select to programming language compiler which is to be used +# when compiling subsequent program fragments, as specified in +# MINGW_AT_CHECK_COMPILE or MINGW_AT_CHECK_RUN tests. +# +m4_define([MINGW_AT_LANG],[m4_if([$1],[C++],dnl +[m4_define([at_lang_compile],[$at_compiler_cxx $CPPFLAGS $CFLAGS])]dnl +[m4_define([at_lang_source],[at_source.cpp])],dnl +[m4_define([at_lang_compile],[$at_compiler_cc $CPPFLAGS $CFLAGS])]dnl +[m4_define([at_lang_source],[at_source.c])])dnl +])# MINGW_AT_LANG + +# MINGW_AT_CHECK_COMPILE( SOURCE ) +# -------------------------------- +# Check that the SOURCE program fragment is compilable, using the +# compiler appropriate to the currently selected source language; +# the compiler is expected to complete with zero exit status, and +# to have written nothing to either STDOUT or STDERR. +# +m4_define([MINGW_AT_CHECK_COMPILE],[AT_DATA([at_lang_source],$1 +) AT_CHECK([at_lang_compile -c at_lang_source -o /dev/null]) +])# MINGW_AT_CHECK_COMPILE + +# MINGW_AT_CHECK_RUN( SOURCE, [STATUS = 0], [STDOUT], [STDERR] ) +# -------------------------------------------------------------- +# Check that the SOURCE program fragment is both compilable, using +# the compiler appropriate to the currently selected source language, +# and may then be executed to exit with STATUS, and with output as +# specified to each of STDOUT and STDERR. +# +m4_define([MINGW_AT_CHECK_RUN],[AT_DATA([at_lang_source],$1 +) AT_CHECK([at_lang_compile at_lang_source -o at_prog.exe -L../../lib]) +AT_CHECK([./at_prog.exe],[$2],[$3],[$4]) +])# MINGW_AT_CHECK_RUN + +# MINGW_AT_DATA_CRLF( FILENAME, TEXT ) +# ------------------------------------ +# Construct reference data file FILENAME, with content as specified +# by TEXT, (which may comprise multiple lines), ensuring that each +# line of TEXT is terminated according to the CRLF convention. +# +m4_define([MINGW_AT_DATA_CRLF],[AT_DATA([$1],[$2]) +AT_CHECK([awk '{sub("\r$",""); printf "%s\r\n", $][0}' $1],,[stdout]) +m4_if([$1],[stdout],,AT_CHECK([mv stdout $1]))dnl +])# MINGW_AT_DATA_CRLF + +# Initialize autotest, and select C as default programming language. +# +AT_INIT +MINGW_AT_LANG([C]) + +# Individual test groups are specified separately, via the following +# collection of autotest M4 include files. +# +m4_include([headers.at]) + +# vim: filetype=config formatoptions=croql +# $RCSfile$: end of file ----------------------------------------------------------------------- Summary of changes: ChangeLog | 8 + Makefile.in | 8 + mingwrt/ChangeLog | 7 + mingwrt/Makefile.in | 17 +- w32api/ChangeLog | 20 ++ w32api/Makefile.in | 16 ++ w32api/configure.ac | 6 + {mingwrt => w32api}/tests/Makefile.in | 27 +-- {mingwrt => w32api}/tests/atlocal.in | 2 +- w32api/tests/headers.at | 326 ++++++++++++++++++++++++++++++ {mingwrt => w32api}/tests/testsuite.at.in | 5 +- 11 files changed, 416 insertions(+), 26 deletions(-) copy {mingwrt => w32api}/tests/Makefile.in (87%) copy {mingwrt => w32api}/tests/atlocal.in (97%) create mode 100644 w32api/tests/headers.at copy {mingwrt => w32api}/tests/testsuite.at.in (96%) hooks/post-receive -- Repository: mingw-org-wsl |
From: Keith M. <no...@so...> - 2017-02-21 08:36:40
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Repository: mingw-org-wsl". The branch, 5.0-active has been updated via 617f15b16863cb5d542d1134e44e8fbd72739ad4 (commit) from b0798df545a3b6411558eb4798798db187b49430 (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/617f15b16863cb5d542d1134e44e8fbd72739ad4/ commit 617f15b16863cb5d542d1134e44e8fbd72739ad4 Author: Keith Marshall <kei...@us...> Date: Thu Feb 16 22:07:56 2017 +0000 Work around GCC bug; force C++11 to support std::wcstof(). diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog index e3ffe46..03e10a5 100644 --- a/mingwrt/ChangeLog +++ b/mingwrt/ChangeLog @@ -1,3 +1,12 @@ +2017-02-16 Keith Marshall <kei...@us...> + + Work around GCC bug; force C++11 to support std::wcstof(). + + * include/_mingw.h [_ISOC99_SOURCE && __cplusplus >= 201103L] + [__GNUC__ < 6] (_GLIBCXX_HAVE_WCSTOF): Define it to 1; it is required + because, prior to GCC-6, GCC's configuration process fails to specify + it correctly, and so invalidates its own <string> header file. + 2017-02-12 Keith Marshall <kei...@us...> Support brace expansion in globbing patterns. diff --git a/mingwrt/include/_mingw.h.in b/mingwrt/include/_mingw.h.in index da4ea87..5e54a22 100644 --- a/mingwrt/include/_mingw.h.in +++ b/mingwrt/include/_mingw.h.in @@ -504,9 +504,10 @@ allow GCC to optimize away some EH unwind code, at least in DW2 case. */ /* Due to a configuration defect in GCC versions prior to GCC-6, when * compiling C++11 code, the ISO-C99 functions may not be incorporated * into the appropriate namespace(s); we may be able to mitigate this, - * by ensuring that this GCC configuration macro is defined. + * by ensuring that these GCC configuration macros are defined. */ -# define _GLIBCXX_USE_C99 1 +# define _GLIBCXX_USE_C99 1 +# define _GLIBCXX_HAVE_WCSTOF 1 #endif #if ! defined _MINGW32_SOURCE_EXTENDED && ! defined __STRICT_ANSI__ ----------------------------------------------------------------------- Summary of changes: mingwrt/ChangeLog | 9 +++++++++ mingwrt/include/_mingw.h.in | 5 +++-- 2 files changed, 12 insertions(+), 2 deletions(-) hooks/post-receive -- Repository: mingw-org-wsl |
From: Keith M. <no...@so...> - 2017-02-14 14:30: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.0-active has been updated via b0798df545a3b6411558eb4798798db187b49430 (commit) from 1559fe3708515b7c61a0e7d2672102ec5ea1f1fa (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/b0798df545a3b6411558eb4798798db187b49430/ commit b0798df545a3b6411558eb4798798db187b49430 Author: Alexander Krisak <ak...@us...> Date: Tue Feb 14 14:18:34 2017 +0000 Add missing constant definition, per issue [#2249]. diff --git a/w32api/ChangeLog b/w32api/ChangeLog index 2d72906..6540dfe 100644 --- a/w32api/ChangeLog +++ b/w32api/ChangeLog @@ -1,3 +1,9 @@ +2017-02-14 Alexander Krisak <ak...@us...> + + Add missing constant definition, per issue [#2249]. + + * include/winnt.h (JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE): Define it. + 2017-02-10 Keith Marshall <kei...@us...> Avoid unnecessary duplication of configuration files. diff --git a/w32api/include/winnt.h b/w32api/include/winnt.h index 809933b..4dc1101 100644 --- a/w32api/include/winnt.h +++ b/w32api/include/winnt.h @@ -6,7 +6,7 @@ * $Id$ * * Written by Anders Norlander <ano...@he...> - * Copyright (C) 1998-2011, 2016, MinGW.org Project + * Copyright (C) 1998-2011, 2016, 2017, MinGW.org Project * * * Permission is hereby granted, free of charge, to any person obtaining a @@ -3620,7 +3620,9 @@ typedef union _FILE_SEGMENT_ELEMENT ULONGLONG Alignment; } FILE_SEGMENT_ELEMENT, *PFILE_SEGMENT_ELEMENT; -/* JOBOBJECT_BASIC_LIMIT_INFORMATION.LimitFlags constants */ +/* JOBOBJECT_BASIC_LIMIT_INFORMATION.LimitFlags constants: + * https://msdn.microsoft.com/en-us/library/windows/desktop/ms684147(v=vs.85).aspx + */ #define JOB_OBJECT_LIMIT_WORKINGSET 0x0001 #define JOB_OBJECT_LIMIT_PROCESS_TIME 0x0002 #define JOB_OBJECT_LIMIT_JOB_TIME 0x0004 @@ -3634,6 +3636,7 @@ typedef union _FILE_SEGMENT_ELEMENT #define JOB_OBJECT_LIMIT_DIE_ON_UNHANDLED_EXCEPTION 0x0400 #define JOB_OBJECT_LIMIT_BREAKAWAY_OK 0x0800 #define JOB_OBJECT_LIMIT_SILENT_BREAKAWAY_OK 0x1000 +#define JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE 0x2000 /* Wrong definitions, but keep for backward compatibility. */ #define JOB_OBJECT_BREAKAWAY_OK JOB_OBJECT_LIMIT_BREAKAWAY_OK ----------------------------------------------------------------------- Summary of changes: w32api/ChangeLog | 6 ++++++ w32api/include/winnt.h | 7 +++++-- 2 files changed, 11 insertions(+), 2 deletions(-) hooks/post-receive -- Repository: mingw-org-wsl |
From: Keith M. <no...@so...> - 2017-02-12 16:34:41
|
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 1559fe3708515b7c61a0e7d2672102ec5ea1f1fa (commit) via f034c6d7403650f81e872f025913fb6d46bba894 (commit) from f6247c6eec6e8bd16880df5f9bdcecb6deff196c (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/1559fe3708515b7c61a0e7d2672102ec5ea1f1fa/ commit 1559fe3708515b7c61a0e7d2672102ec5ea1f1fa Author: Keith Marshall <kei...@us...> Date: Sun Feb 12 10:12:06 2017 +0000 Support brace expansion in globbing patterns. diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog index 322c564..e3ffe46 100644 --- a/mingwrt/ChangeLog +++ b/mingwrt/ChangeLog @@ -1,3 +1,23 @@ +2017-02-12 Keith Marshall <kei...@us...> + + Support brace expansion in globbing patterns. + + * include/glob.h (GLOB_BRACE): New manifest constant; define it... + (__GLOB_FLAG__): ...in terms of this macro. + + * mingwex/glob.c (glob_match): Reindent, with preamble invoking... + (glob_brace_expand): ...this new static inline function; implement it. + (GLOB_INIT, GLOB_FREE): Redefine them, relating them to... + (__GLOB_FLAG_OFFSET_HIGH_WATER_MARK): ...this. + + * setargv.c (__mingw32_setargv) [_CRT_glob]: Check if it includes... + [GLOB_CASEMATCH | GLOB_BRACE]: either of these; remove check for... + [__CRT_GLOB_CASE_SENSITIVE__]: ...this defunct option. + + * include/_mingw.h.in (GLOB_BRACE): Note its use in _CRT_glob. + (GLOB_CASEMATCH): Likewise; this replaces all former usage of... + (__CRT_GLOB_CASE_SENSITIVE__): ...this; delete definition. + 2017-02-11 Keith Marshall <kei...@us...> Refactor <getopt.h> and <unistd.h> shared declarations. diff --git a/mingwrt/include/_mingw.h.in b/mingwrt/include/_mingw.h.in index fd99590..da4ea87 100644 --- a/mingwrt/include/_mingw.h.in +++ b/mingwrt/include/_mingw.h.in @@ -132,7 +132,10 @@ * character which is either included * in, or excluded from the group. * - * __CRT_GLOB_CASE_SENSITIVE__ enable case sensitive matching for + * The following options, which may also be specified within _CRT_glob, + * are specified in terms of their glob() flags, as defined in <glob.h> + * + * GLOB_CASEMATCH enable case sensitive matching for * globbing patterns; this is default * behaviour for POSIX, but because of * the case insensitive nature of the @@ -140,10 +143,13 @@ * appropriate to use case insensitive * globbing as the MinGW default. * + * GLOB_BRACE enable expansion of GNU style brace + * delimited expression groups within + * the globbing pattern. + * */ #define __CRT_GLOB_USE_SINGLE_QUOTE__ 0x0010 #define __CRT_GLOB_BRACKET_GROUPS__ 0x0020 -#define __CRT_GLOB_CASE_SENSITIVE__ 0x0040 /* The MinGW globbing algorithm uses the ASCII DEL control code as a marker * for globbing characters which were embedded within quoted arguments; (the diff --git a/mingwrt/include/glob.h b/mingwrt/include/glob.h index 45e1c9a..b73302a 100644 --- a/mingwrt/include/glob.h +++ b/mingwrt/include/glob.h @@ -32,12 +32,15 @@ * */ #define _GLOB_H 1 -#include <_mingw.h> #pragma GCC system_header +/* All MinGW.org system headers are required to include <_mingw.h>. + */ +#include <_mingw.h> + #ifndef RC_INVOKED /* POSIX requires glob.h to define the size_t type; we need to - * get this from GCC, just as sys/types.h does. + * get this from GCC's <stddef.h>, just as <sys/types.h> does. */ #define __need_size_t #include <stddef.h> @@ -73,8 +76,8 @@ enum { * GNU's implementation of glob() supports a supplementary set of * options, none of which are required by POSIX. We include these * for reference, and to reserve the flag identities for a possible - * future implementation; the current MinGW implementation does not - * support them. + * future implementation; of these extensions, the current MinGW + * implementation supports only GLOB_BRACE. */ __GLOB_TILDE_OFFSET, __GLOB_TILDE_CHECK_OFFSET, @@ -115,6 +118,11 @@ enum { #define GLOB_NOESCAPE __GLOB_FLAG__(NOESCAPE) #define GLOB_NOSORT __GLOB_FLAG__(NOSORT) +/* Flag definitions for those GNU extensions, as listed above, for which + * we provide support; (i.e. GLOB_BRACE only, at present). + */ +#define GLOB_BRACE __GLOB_FLAG__(BRACE) + /* Additional flags definitions, for MinGW specific extensions. */ #define GLOB_CASEMATCH __GLOB_FLAG__(CASEMATCH) @@ -155,4 +163,4 @@ _END_C_DECLS #define GLOB_NOSPACE (3) #endif /* ! RC_INVOKED */ -#endif /* ! defined _GLOB_H */ +#endif /* !_GLOB_H: $RCSfile$: end of file */ diff --git a/mingwrt/mingwex/glob.c b/mingwrt/mingwex/glob.c index 1f064e1..b51fdf0 100644 --- a/mingwrt/mingwex/glob.c +++ b/mingwrt/mingwex/glob.c @@ -728,6 +728,132 @@ accept_glob_nocheck_match( const char *pattern, int flags ) return (flags & GLOB_NOCHECK) && (is_glob_pattern( pattern, flags ) == 0); } +GLOB_INLINE int +glob_brace_expand( char *dest, const char *src, const char **resume ) +{ + /* Helper to iteratively expand the first substitution field within + * a glob brace expression, while recursively collecting the set of + * individual globbing patterns to be processed by glob_match(), when + * GLOB_BRACE is specified, and the original pattern includes a brace + * expression. (Notice that this does not guarantee to fully expand + * the pattern in a single pass; recursion within glob_match() will + * ensure that this is achieved, before attempting to match each + * possible expansion of the original pattern). + * + * Returns zero on a successful (possibly partial) expansion; > zero + * indicates unmatched opening braces, (an error condition). + */ + char c; int level = 1; + do { /* Copy characters one by one, from the start of the current + * substitution field within the original glob pattern, to the + * appropriate location in the pattern which will be presented + * to glob_match(). The initial part of this copy represents + * the substitution for the outermost level of brace bounded + * expression, terminating at either the closing brace or at + * any intervening comma at this level; however... + */ + if( (c = *++src) == glob_escape_char ) + { /* ...any escaped character must be copied verbatim, without + * being considered as a possible substitution terminator... + */ + *dest++ = c; *dest++ = c = *++src; + /* ...while taking care not to overrun the ultimate string + * terminator of the original pattern. + */ + if( c != '\0' ) c = *++src; + } + /* Provided it has not been escaped, any closing brace, or a + * comma separator at the outer level only, results in closure + * of a brace nesting level... + */ + if( (c == '}') || ((c == ',') && (level == 1)) ) --level; + /* + * ...while an opening brace creates a new (inner) level. + */ + else if( c == '{' ) ++level; + + /* Provided we have not closed the outermost brace expression + * level, complete the copy of the current character within + * the substitution... + */ + if( level > 0 ) *dest++ = c; + /* ...continuing to the next character, until the outermost + * level has been reached, or the original pattern string + * has been exhausted. + */ + } while( (level > 0) && (c != '\0') ); + + /* Save a reference to the point, within the original pattern, + * where the current substitution ended, and thus where the next + * iteration (if any) is to begin. + */ + *resume = src; + + /* Complete construction of a candidate pattern, to be passed + * to glob_match(), by copying any characters which follow the + * closing brace of the initial brace bounded expression within + * the original pattern; thus... + */ + if( c != '\0' ) + { /* ...when any characters are present, beyond the current + * resume point... + */ + if( c == ',' ) + { /* ...and when any of these represent a substitution which + * is to be made in a subsequent iteration... + */ + level = 1; + do { /* ...we simply skip over all characters, up to and + * including the closing brace at the outermost level + * of expression, (while once again taking care not + * to overrun the string terminator)... + */ + if( c != '\0' ) ++src; + /* ...and once again, honouring escapes which may be + * intended to force literal interpretation of '{'... + */ + while( (*src == glob_escape_char) && (*++src != '\0') ) ++src; + /* + * ...and simply ignoring any nested (inner) brace + * bounded expression... + */ + if( *src == '{' ) ++level; else if( *src == '}' ) --level; + /* + * ...we continue skipping, until we find the closing + * brace at the outermost level of the expression, or + * we have have exhausted the original pattern. + */ + } while( ((c = *src) != '\0') && (level > 0) ); + } + /* Finally... + */ + if( level == 0 ) + { /* ...when we've skipped to the closing brace ... (checking + * that we didn't exhaust the original pattern is belt and + * braces here, because *src should be '}') ... we now skip + * past it... + */ + if( c != '\0' ) ++src; + /* ...we simply copy all further characters from the original + * pattern, without consideration that there may be any further + * possible expansion; (this will be picked up by recursion). + */ + do { *dest++ = *src; } while( *src++ != '\0' ); + } + else + /* Alternatively, when the closing brace has not been found, + * (which implies exhaustion of the original pattern), we + * must ensure that the expanded copy is terminated. + */ + *dest = '\0'; + } + /* Regardless, we return the residual brace expansion level; zero + * indicates successful expansion; > zero is an error, indicating + * one (or more) unmatched opening braces. + */ + return level; +} + static int glob_match( const char *pattern, int flags, int (*errfn)(), glob_t *gl_buf ) { @@ -735,230 +861,339 @@ glob_match( const char *pattern, int flags, int (*errfn)(), glob_t *gl_buf ) * implementation, recursively decomposing the pattern into separate * globbable path components, to collect the union of all possible * matches to the pattern, in all possible matching directories. + * + * At the outset, assume that this will succeed. */ - glob_t local_gl_buf; int status = GLOB_SUCCESS; - /* Begin by separating out any path prefix from the glob pattern. + /* To handle the GNU specific GLOB_BRACE option, we need a + * recursive preamble to the bare glob_match() strategy; when + * GLOB_BRACE expansion is specified... */ - char dirbuf[1 + strlen( pattern )]; - const char *dir = dirname( memcpy( dirbuf, pattern, sizeof( dirbuf )) ); - char **dirp, preferred_dirsep = GLOB_DIRSEP; + int brace_option; + if( (brace_option = flags & GLOB_BRACE) == GLOB_BRACE ) + { + /* ...we recursively parse the original pattern, so as to + * decompose it into a series of substitute patterns, each + * of which represents one pattern expansion to which glob + * matching is applied in turn, such that the aggregate of + * matches for the series represents all possible matches + * for all possible expansions of the original pattern. + */ + const char *src = pattern; + char c, sub_pattern[1 + strlen( pattern )], *dest = sub_pattern; - /* Initialise a temporary local glob_t structure, to capture the - * intermediate results at the current level of recursion... - */ - local_gl_buf.gl_offs = 0; - if( (status = glob_initialise( &local_gl_buf )) != GLOB_SUCCESS ) - /* - * ...bailing out if unsuccessful. + /* We begin by initialising the prefix portion which is + * common to all substitute patterns... + */ + do { /* ...by copying characters one at a time, from the + * original pattern to the substitute pattern buffer... + */ + while( *src == glob_escape_char ) + { + /* ...ensuring that all escaped characters are + * copied verbatim, without consideration as a + * possible brace expression initiator... + */ + *dest++ = *src++; + /* + * ...but taking care that we don't overrun the + * original pattern's string terminator... + */ + if( *src != '\0') *dest++ = *src++; + } + /* ...copying every character up to but excluding the + * opening brace of the first brace bounded expression + * (if any), or up to and including the NUL terminator + * otherwise... + */ + if( (c = *src) != '{' ) *dest++ = *src++; + /* + * ...repeating until we either exhaust the original + * pattern, or we find an opening brace. + */ + } while( (c != '\0') && (c != '{') ); + + /* After copying the prefix, (which may represent the entire + * pattern)... */ - return status; + if( c == '{' ) + /* ...when there is a brace bounded expression to expand... + */ + do { /* ...iterate to construct each of its expansions in + * turn, (together with any common suffix), and... + */ + if( glob_brace_expand( dest, src, &src ) == 0 ) + { + /* ...on success, note that there may be further + * embedded brace bounded sub-expressions; recurse + * to achieve full expansion... + */ + status = glob_match( sub_pattern, flags, errfn, gl_buf ); + /* + * ...and ensure that matches to all expansions + * after the first, will be appended. + */ + flags |= GLOB_APPEND; + } + else + { /* Brace expansion failed, (which implies an opening + * brace with no matching closing brace); bail out. + * + * FIXME: if errfn is specified (not NULL), perhaps we + * should invoke it (but how best? POSIX says it is to + * be invoked when pattern resolves to a directory which + * cannot be opened, or cannot be read; maybe pass the + * original failing pattern, with errno = EINVAL?). + */ + status = GLOB_ABORTED; + } + /* Repeat iteration until all specified substitutions + * for the current expression have been processed, (or + * aborted). + */ + } while( (status != GLOB_ABORTED) && (*src == ',') ); + + else + /* The current brace expression has been reduced to its final + * form, (with no further expansion pending); release it for + * fall-through glob matching. + */ + brace_option = 0; + } - /* Check if there are any globbing tokens in the path prefix... + /* On falling through brace expansion, (if any)... */ - if( is_glob_pattern( dir, flags ) ) - /* - * ...and recurse to identify all possible matching prefixes, - * as may be necessary... + if( brace_option == 0 ) + { + /* ...we have exactly one pattern, with no possible expansions + * of brace expressions, to be globbed; (alternate expansions of + * any brace expressions are processed in alternative recursive + * invocations of this function). */ - status = glob_match( dir, flags | GLOB_DIRONLY, errfn, &local_gl_buf ); + glob_t local_gl_buf; - else - /* ...or simply store the current prefix, if not. + /* Begin by separating out any path prefix from the glob pattern. */ - status = glob_store_entry( glob_strdup( dir ), &local_gl_buf ); + char dirbuf[1 + strlen( pattern )]; + const char *dir = dirname( memcpy( dirbuf, pattern, sizeof( dirbuf )) ); + char **dirp, preferred_dirsep = GLOB_DIRSEP; - /* Check nothing has gone wrong, so far... - */ - if( status != GLOB_SUCCESS ) - /* - * ...and bail out if necessary. - */ - return status; - - /* The original "pattern" argument may have included a path name - * prefix, which we used "dirname()" to isolate. If there was no - * such prefix, then "dirname()" would have reported an effective - * prefix which is identically equal to "."; however, this would - * also be the case if the prefix was "./" (or ".\\" in the case - * of a WIN32 host). Thus, we may deduce that... - */ - if( glob_is_dirsep( pattern[1] ) || (strcmp( dir, "." ) != 0) ) - { - /* ...when the prefix is not reported as ".", or even if it is - * but the original pattern had "./" (or ".\\") as the prefix, - * then we must adjust to identify the effective pattern with - * its original prefix stripped away... + /* Initialise a temporary local glob_t structure, to capture the + * intermediate results at the current level of recursion... */ - const char *tail = pattern + strlen( dir ); - while( (tail > pattern) && ! glob_is_dirsep( *tail ) ) - --tail; - while( glob_is_dirsep( *tail ) ) - preferred_dirsep = *tail++; - pattern = tail; - } + local_gl_buf.gl_offs = 0; + if( (status = glob_initialise( &local_gl_buf )) != GLOB_SUCCESS ) + /* + * ...bailing out if unsuccessful. + */ + return status; - else - /* ...otherwise, we simply note that there was no prefix. + /* Check if there are any globbing tokens in the path prefix... */ - dir = NULL; + if( is_glob_pattern( dir, flags ) ) + /* + * ...and recurse to identify all possible matching prefixes, + * as may be necessary... + */ + status = glob_match( dir, flags | GLOB_DIRONLY, errfn, &local_gl_buf ); - /* We now have a globbed list of prefix directories, returned from - * recursive processing, in local_gl_buf.gl_pathv, and we also have - * a separate pattern which we may attempt to match in each of them; - * at the outset, we have yet to match this pattern to anything. - */ - status = GLOB_NOMATCH; + else + /* ...or simply store the current prefix, if not. + */ + status = glob_store_entry( glob_strdup( dir ), &local_gl_buf ); - /* When the caller has enabled the GLOB_NOCHECK option, then in the - * case of any pattern with no prefix, and which contains no explicit - * globbing token... - */ - if( (dir == NULL) && accept_glob_nocheck_match( pattern, flags ) ) - { - /* ...we prefer to store it as is, without any attempt to find - * a glob match, (which could also induce a case transliteration - * on MS-Windows' case-insensitive file system)... + /* Check nothing has gone wrong, so far... */ - glob_store_entry( glob_strdup( pattern ), gl_buf ); - status = GLOB_SUCCESS; - } - /* ...otherwise we initiate glob matching, to find all possible - * file system matches for the designated pattern, within each of - * the identified prefix directory paths. - */ - else for( dirp = local_gl_buf.gl_pathv; *dirp != NULL; free( *dirp++ ) ) - { - /* Provided an earlier cycle hasn't scheduled an abort... + if( status != GLOB_SUCCESS ) + /* + * ...and bail out if necessary. + */ + return status; + + /* The original "pattern" argument may have included a path name + * prefix, which we used "dirname()" to isolate. If there was no + * such prefix, then "dirname()" would have reported an effective + * prefix which is identically equal to "."; however, this would + * also be the case if the prefix was "./" (or ".\\" in the case + * of a WIN32 host). Thus, we may deduce that... */ - if( status != GLOB_ABORTED ) + if( glob_is_dirsep( pattern[1] ) || (strcmp( dir, "." ) != 0) ) { - /* ...take each candidate directory in turn, and prepare - * to collate any matched entities within it... + /* ...when the prefix is not reported as ".", or even if it is + * but the original pattern had "./" (or ".\\") as the prefix, + * then we must adjust to identify the effective pattern with + * its original prefix stripped away... + */ + const char *tail = pattern + strlen( dir ); + while( (tail > pattern) && ! glob_is_dirsep( *tail ) ) + --tail; + while( glob_is_dirsep( *tail ) ) + preferred_dirsep = *tail++; + pattern = tail; + } + + else + /* ...otherwise, we simply note that there was no prefix. */ - struct glob_collator *collator = NULL; + dir = NULL; - /* ...attempt to open the current candidate directory... + /* We now have a globbed list of prefix directories, returned from + * recursive processing, in local_gl_buf.gl_pathv, and we also have + * a separate pattern which we may attempt to match in each of them; + * at the outset, we have yet to match this pattern to anything. + */ + status = GLOB_NOMATCH; + + /* When the caller has enabled the GLOB_NOCHECK option, then in the + * case of any pattern with no prefix, and which contains no explicit + * globbing token... + */ + if( (dir == NULL) && accept_glob_nocheck_match( pattern, flags ) ) + { + /* ...we prefer to store it as is, without any attempt to find + * a glob match, (which could also induce a case transliteration + * on MS-Windows' case-insensitive file system)... + */ + glob_store_entry( glob_strdup( pattern ), gl_buf ); + status = GLOB_SUCCESS; + } + /* ...otherwise we initiate glob matching, to find all possible + * file system matches for the designated pattern, within each of + * the identified prefix directory paths. + */ + else for( dirp = local_gl_buf.gl_pathv; *dirp != NULL; free( *dirp++ ) ) + { + /* Provided an earlier cycle hasn't scheduled an abort... */ - DIR *dp; - if( (dp = opendir( *dirp )) != NULL ) + if( status != GLOB_ABORTED ) { - /* ...and when successful, instantiate a dirent structure... + /* ...take each candidate directory in turn, and prepare + * to collate any matched entities within it... + */ + struct glob_collator *collator = NULL; + + /* ...attempt to open the current candidate directory... */ - struct dirent *entry; - size_t dirlen = (dir == NULL) ? 0 : strlen( *dirp ); - while( (entry = readdir( dp )) != NULL ) + DIR *dp; + if( (dp = opendir( *dirp )) != NULL ) { - /* ...into which we read each entry from the candidate - * directory, in turn, then... - */ - if( (((flags & GLOB_DIRONLY) == 0) || GLOB_ISDIR( entry )) - /* - * ...provided we don't require it to be a subdirectory, - * or it actually is one... - */ - && (glob_strcmp( pattern, entry->d_name, flags ) == 0) ) + /* ...and when successful, instantiate a dirent structure... + */ + struct dirent *entry; + size_t dirlen = (dir == NULL) ? 0 : strlen( *dirp ); + while( (entry = readdir( dp )) != NULL ) { - /* ...and it is a globbed match for the pattern, then - * we allocate a temporary local buffer of sufficient - * size to assemble the matching path name... + /* ...into which we read each entry from the candidate + * directory, in turn, then... */ - char *found; - size_t prefix; - size_t matchlen = D_NAMLEN( entry ); - char matchpath[2 + dirlen + matchlen]; - if( (prefix = dirlen) > 0 ) + if( (((flags & GLOB_DIRONLY) == 0) || GLOB_ISDIR( entry )) + /* + * ...provided we don't require it to be a subdirectory, + * or it actually is one... + */ + && (glob_strcmp( pattern, entry->d_name, flags ) == 0) ) { - /* ...first copying the prefix, if any, - * followed by a directory name separator... + /* ...and it is a globbed match for the pattern, then + * we allocate a temporary local buffer of sufficient + * size to assemble the matching path name... */ - memcpy( matchpath, *dirp, dirlen ); - if( ! glob_is_dirsep( matchpath[prefix - 1] ) ) - matchpath[prefix++] = preferred_dirsep; - } - /* ...and append the matching dirent entry. - */ - memcpy( matchpath + prefix, entry->d_name, matchlen + 1 ); - - /* Duplicate the content of the temporary buffer to - * the heap, for assignment into gl_buf->gl_pathv... - */ - if( (found = glob_strdup( matchpath )) == NULL ) - /* - * ...setting the appropriate error code, in the - * event that the heap memory has been exhausted. + char *found; + size_t prefix; + size_t matchlen = D_NAMLEN( entry ); + char matchpath[2 + dirlen + matchlen]; + if( (prefix = dirlen) > 0 ) + { + /* ...first copying the prefix, if any, + * followed by a directory name separator... + */ + memcpy( matchpath, *dirp, dirlen ); + if( ! glob_is_dirsep( matchpath[prefix - 1] ) ) + matchpath[prefix++] = preferred_dirsep; + } + /* ...and append the matching dirent entry. */ - status = GLOB_NOSPACE; + memcpy( matchpath + prefix, entry->d_name, matchlen + 1 ); - else - { /* This glob match has been successfully recorded on - * the heap, ready for assignment to gl_buf->gl_pathv; - * if this is the first match assigned to this gl_buf, - * and we haven't trapped any prior error... + /* Duplicate the content of the temporary buffer to + * the heap, for assignment into gl_buf->gl_pathv... */ - if( status == GLOB_NOMATCH ) + if( (found = glob_strdup( matchpath )) == NULL ) /* - * ...then record this successful match. + * ...setting the appropriate error code, in the + * event that the heap memory has been exhausted. */ - status = GLOB_SUCCESS; + status = GLOB_NOSPACE; - if( (flags & GLOB_NOSORT) == 0 ) - { - /* The results of this glob are to be sorted in - * collating sequence order; divert the current - * match into the collator. - */ - collator = glob_collate_entry( collator, found, flags ); - } else - { /* Sorting has been suppressed for this glob; - * just add the current match directly into the - * result vector at gl_buf->gl_pathv. + { /* This glob match has been successfully recorded on + * the heap, ready for assignment to gl_buf->gl_pathv; + * if this is the first match assigned to this gl_buf, + * and we haven't trapped any prior error... */ - glob_store_entry( found, gl_buf ); + if( status == GLOB_NOMATCH ) + /* + * ...then record this successful match. + */ + status = GLOB_SUCCESS; + + if( (flags & GLOB_NOSORT) == 0 ) + { + /* The results of this glob are to be sorted in + * collating sequence order; divert the current + * match into the collator. + */ + collator = glob_collate_entry( collator, found, flags ); + } + else + { /* Sorting has been suppressed for this glob; + * just add the current match directly into the + * result vector at gl_buf->gl_pathv. + */ + glob_store_entry( found, gl_buf ); + } } } } + /* When we've processed all of the entries in the current + * prefix directory, we may close it. + */ + closedir( dp ); } - /* When we've processed all of the entries in the current - * prefix directory, we may close it. - */ - closedir( dp ); - } - /* In the event of failure to open the candidate prefix directory... - */ - else if( (flags & GLOB_ERR) || ((errfn != NULL) && errfn( *dirp, errno )) ) - /* - * ...and when the caller has set the GLOB_ERR flag, or has provided - * an error handler which returns non-zero for the failure condition, - * then we schedule an abort. + /* In the event of failure to open the candidate prefix directory... */ - status = GLOB_ABORTED; + else if( (flags & GLOB_ERR) || ((errfn != NULL) && errfn(*dirp, errno)) ) + /* + * ...and when the caller has set the GLOB_ERR flag, or has provided + * an error handler which returns non-zero for the failure condition, + * then we schedule an abort. + */ + status = GLOB_ABORTED; - /* When we diverted the glob results for collation... - */ - if( collator != NULL ) - /* - * ...then we redirect them to gl_buf->gl_pathv now, before we - * begin a new cycle, to process any further prefix directories - * which may have been identified; note that we do this even if - * we scheduled an abort, so that we may return any results we - * may have already collected before the error occurred. + /* When we diverted the glob results for collation... */ - glob_store_collated_entries( collator, gl_buf ); + if( collator != NULL ) + /* + * ...then we redirect them to gl_buf->gl_pathv now, before we + * begin a new cycle, to process any further prefix directories + * which may have been identified; note that we do this even if + * we scheduled an abort, so that we may return any results we + * may have already collected before the error occurred. + */ + glob_store_collated_entries( collator, gl_buf ); + } } + /* Finally, free the memory block allocated for the results vector + * in the internal glob buffer, to avoid leaking memory, before we + * return the resultant status code. + */ + free( local_gl_buf.gl_pathv ); } - /* Finally, free the memory block allocated for the results vector - * in the internal glob buffer, to avoid leaking memory, before we - * return the resultant status code. - */ - free( local_gl_buf.gl_pathv ); return status; } -#define GLOB_INIT (0x100 << 0) -#define GLOB_FREE (0x100 << 1) +#define GLOB_INIT (1 << __GLOB_FLAG_OFFSET_HIGH_WATER_MARK) +#define GLOB_FREE (2 << __GLOB_FLAG_OFFSET_HIGH_WATER_MARK) GLOB_INLINE int glob_signed( const char *check, const char *magic ) { diff --git a/mingwrt/setargv.c b/mingwrt/setargv.c index 36aaab7..1b57f85 100644 --- a/mingwrt/setargv.c +++ b/mingwrt/setargv.c @@ -101,9 +101,7 @@ void __mingw32_setargv( const char *cmdline ) /* Capture any non-default globbing options, which the user may have * specified via a custom setting for _CRT_glob. */ - int gl_opts = GLOB_NOCHECK; - if( _CRT_glob & __CRT_GLOB_CASE_SENSITIVE__ ) - gl_opts |= GLOB_CASEMATCH; + int gl_opts = GLOB_NOCHECK | (_CRT_glob & (GLOB_CASEMATCH | GLOB_BRACE)); /* We explicitly DO NOT use the GLOB_DOOFFS capability; ensure that * the associated field, in the glob_t structure, is initialized to https://sf.net/p/mingw/mingw-org-wsl/ci/f034c6d7403650f81e872f025913fb6d46bba894/ commit f034c6d7403650f81e872f025913fb6d46bba894 Author: Keith Marshall <kei...@us...> Date: Sat Feb 11 12:35:12 2017 +0000 Refactor <getopt.h> and <unistd.h> shared declarations. diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog index e316cf1..322c564 100644 --- a/mingwrt/ChangeLog +++ b/mingwrt/ChangeLog @@ -1,3 +1,21 @@ +2017-02-11 Keith Marshall <kei...@us...> + + Refactor <getopt.h> and <unistd.h> shared declarations. + + * include/getopt.h: Assert copyright. + (_BEGIN_C_DECLS, _END_C_DECLS): Use as appropriate. + (__GETOPT_H__, __GETOPT_LONG_H__): Delete them; replace them with... + (_GETOPT_H): This new macro; it guards the entire file, except when... + [__UNISTD_H_SOURCED__]: ...do not activate it; hence when... + [!_GETOPT_H]: ...do not expose API declarations for... + (getopt_long, getopt_long_only): ...these functions. + [_GETOPT_H && _UNISTD_H]: Skip second pass API declarations for... + (getopt): ...this function. + + * include/unistd.h: Use the #include "..." form when including... + (io.h, process.h, getopt.h): ...these, to ensure correct association. + (ftruncate): Map it directly to MSVCRT.DLL's _chsize() entry point. + 2017-02-10 Keith Marshall <kei...@us...> Avoid unnecessary duplication of configuration files. diff --git a/mingwrt/include/getopt.h b/mingwrt/include/getopt.h index 45a8afb..28f02d4 100644 --- a/mingwrt/include/getopt.h +++ b/mingwrt/include/getopt.h @@ -1,41 +1,62 @@ -#ifndef __GETOPT_H__ /* * getopt.h * - * $Id$ - * * Defines constants and function prototypes required to implement - * the `getopt', `getopt_long' and `getopt_long_only' APIs. - * - * This file is part of the MinGW32 package set. + * the getopt(), getopt_long() and getopt_long_only() APIs. * - * Contributed by Keith Marshall <kei...@us...> + * $Id$ * + * Written by Keith Marshall <kei...@us...> + * Copyright (C) 2003, 2008, 2009, 2017, MinGW.org Project. * - * THIS SOFTWARE IS NOT COPYRIGHTED * - * This source code is offered for use in the public domain. You may - * use, modify or distribute it freely. + * 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: * - * This code is distributed in the hope that it will be useful but - * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY - * DISCLAIMED. This includes but is not limited to warranties of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * The above copyright notice, this permission notice, and the following + * disclaimer shall be included in all copies or substantial portions of + * the Software. * - * $Revision$ - * $Author$ - * $Date$ + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OF OR OTHER + * DEALINGS IN THE SOFTWARE. * */ -#define __GETOPT_H__ +#ifndef _GETOPT_H +#pragma GCC system_header -/* All the headers include this file. */ -#include <_mingw.h> +#ifndef __UNISTD_H_SOURCED__ +/* POSIX requires the getopt() API to be specified in <unistd.h>; thus, + * <unistd.h> includes <getopt.h>. However, we do not want to expose the + * getopt_long() or getopt_long_only() APIs, when included in this manner. + * Thus, we process only part of <getopt.h> when __UNISTD_H_SOURCED__ has + * been defined, and activate the _GETOPT_H repeat inclusion guard macro + * only when it has not. + */ +#define _GETOPT_H -#ifdef __cplusplus -extern "C" { +/* All MinGW headers are required to include <_mingw.h>, before anything + * else; however, when sourced by <unistd.h>, this has been done already. + */ +#include <_mingw.h> #endif +_BEGIN_C_DECLS + +#if ! (defined _GETOPT_H && defined _UNISTD_H) +/* This section of <getopt.h> is always to be processed, but it doesn't + * need to be processed twice; if both _GETOPT_H and _UNISTD_H have been + * defined, when we get to here, then we have reached this point for the + * second time, so we may safely skip this section. + */ extern int optind; /* index of first non-option in argv */ extern int optopt; /* single option character, as parsed */ extern int opterr; /* flag to enable built-in diagnostics... */ @@ -46,66 +67,41 @@ extern char *optarg; /* pointer to argument of current option */ extern int getopt( int, char * const [], const char * ); #ifdef _BSD_SOURCE -/* - * BSD adds the non-standard `optreset' feature, for reinitialisation - * of `getopt' parsing. We support this feature, for applications which +/* BSD adds the non-standard "optreset" feature, for reinitialization + * of getopt() parsing. We support this feature, for applications which * proclaim their BSD heritage, before including this header; however, * to maintain portability, developers are advised to avoid it. */ # define optreset __mingw_optreset extern int optreset; -#endif -#ifdef __cplusplus -} -#endif -/* - * POSIX requires the `getopt' API to be specified in `unistd.h'; - * thus, `unistd.h' includes this header. However, we do not want - * to expose the `getopt_long' or `getopt_long_only' APIs, when - * included in this manner. Thus, close the standard __GETOPT_H__ - * declarations block, and open an additional __GETOPT_LONG_H__ - * specific block, only when *not* __UNISTD_H_SOURCED__, in which - * to declare the extended API. - */ -#endif /* !defined(__GETOPT_H__) */ -#if !defined(__UNISTD_H_SOURCED__) && !defined(__GETOPT_LONG_H__) -#define __GETOPT_LONG_H__ -#ifdef __cplusplus -extern "C" { -#endif +#endif /* _BSD_SOURCE */ +#endif /* !(_GETOPT_H && _UNISTD_H) */ +#ifdef _GETOPT_H +/* This is the section of <getopt.h> which declares the getopt_long() + * and getopt_long_only() APIs; it is processed only when <getopt.h> + * is included directly. + */ struct option /* specification for a long form option... */ -{ - const char *name; /* option name, without leading hyphens */ +{ const char *name; /* option name, without leading hyphens */ int has_arg; /* does it take an argument? */ int *flag; /* where to save its status, or NULL */ int val; /* its associated status value */ }; -enum /* permitted values for its `has_arg' field... */ -{ - no_argument = 0, /* option never takes an argument */ +enum /* permitted values for its "has_arg" field... */ +{ no_argument = 0, /* option never takes an argument */ required_argument, /* option always requires an argument */ optional_argument /* option may take an argument */ }; extern int getopt_long( int, char * const [], const char *, const struct option *, int * ); extern int getopt_long_only( int, char * const [], const char *, const struct option *, int * ); -/* - * Previous MinGW implementation had... - */ -#ifndef HAVE_DECL_GETOPT -/* - * ...for the long form API only; keep this for compatibility. - */ -# define HAVE_DECL_GETOPT 1 -#endif -#ifdef __cplusplus -} -#endif +#endif /* _GETOPT_H */ + +_END_C_DECLS -#endif /* !defined(__UNISTD_H_SOURCED__) && !defined(__GETOPT_LONG_H__) */ -/* $RCSfile$$Revision$: end of file */ +#endif /* !_GETOPT_H: $RCSfile$: end of file */ diff --git a/mingwrt/include/unistd.h b/mingwrt/include/unistd.h index 495f3af..4080ab5 100644 --- a/mingwrt/include/unistd.h +++ b/mingwrt/include/unistd.h @@ -11,7 +11,7 @@ * Ramiro Polla <ra...@li...> * Gregory McGarry <gre...@us...> * Keith Marshall <kei...@us...> - * Copyright (C) 1997, 1999, 2002-2004, 2007-2009, 2014-2016, + * Copyright (C) 1997, 1999, 2002-2004, 2007-2009, 2014-2017, * MinGW.org Project. * * @@ -50,9 +50,12 @@ */ #define __UNISTD_H_SOURCED__ 1 -#include <io.h> -#include <process.h> -#include <getopt.h> +/* Use "..." inclusion here, to ensure that we get our own headers, which + * are designed to interoperate with the __UNISTD_H_SOURCED__ filter. + */ +#include "io.h" +#include "process.h" +#include "getopt.h" /* These are defined in stdio.h. POSIX also requires that they * are to be consistently defined here; don't guard against prior @@ -125,7 +128,7 @@ unsigned sleep( unsigned period ){ return __mingw_sleep( period, 0 ); } int __cdecl ftruncate( int, off_t ); #ifndef __NO_INLINE__ -__CRT_INLINE __JMPSTUB__(( FUNCTION = ftruncate, REMAPPED = _chsize )) +__CRT_INLINE __JMPSTUB__(( FUNCTION = ftruncate, DLLENTRY = _chsize )) int ftruncate( int __fd, off_t __length ){ return _chsize( __fd, __length ); } #endif @@ -134,4 +137,4 @@ _END_C_DECLS #endif /* _POSIX_C_SOURCE */ #undef __UNISTD_H_SOURCED__ -#endif /* ! _UNISTD_H: $RCSfile$: end of file */ +#endif /* !_UNISTD_H: $RCSfile$: end of file */ ----------------------------------------------------------------------- Summary of changes: mingwrt/ChangeLog | 38 +++ mingwrt/include/_mingw.h.in | 10 +- mingwrt/include/getopt.h | 122 +++++---- mingwrt/include/glob.h | 18 +- mingwrt/include/unistd.h | 15 +- mingwrt/mingwex/glob.c | 583 +++++++++++++++++++++++++++++++------------- mingwrt/setargv.c | 4 +- 7 files changed, 537 insertions(+), 253 deletions(-) hooks/post-receive -- Repository: mingw-org-wsl |
From: Keith M. <no...@so...> - 2017-02-10 21:54:25
|
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 f6247c6eec6e8bd16880df5f9bdcecb6deff196c (commit) from 8dbfc3da207efa274b88d4540f8be78fbda59254 (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/f6247c6eec6e8bd16880df5f9bdcecb6deff196c/ commit f6247c6eec6e8bd16880df5f9bdcecb6deff196c Author: Keith Marshall <kei...@us...> Date: Fri Feb 10 21:30:23 2017 +0000 Avoid unnecessary duplication of configuration files. diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog index d022d2d..e316cf1 100644 --- a/mingwrt/ChangeLog +++ b/mingwrt/ChangeLog @@ -1,3 +1,17 @@ +2017-02-10 Keith Marshall <kei...@us...> + + Avoid unnecessary duplication of configuration files. + + * Makefile.in (vpath install-sh): Define it; it matches... + (vpath %.m4): ...this; add $top_srcdir/..; search it first; delete + rule for creating duplicate file reference links in $top_srcdir. + (configure): Add '-I ..' option, when running autoconf. + (mingwrt-srcdist-package-files): Remove dependencies on... + (aclocal.m4 VERSION.m4 install-sh): ...these; reinstate them in... + (mingwrt-srcdist-config-files): ...this new distributable files + enumeration goal; add it as a new prerequisite of... + (mingwrt-srcdist-files): ...this. + 2017-02-07 Keith Marshall <kei...@us...> Ensure selective inclusion of the correct <strings.h> diff --git a/mingwrt/Makefile.in b/mingwrt/Makefile.in index 7593cca..5db46ea 100644 --- a/mingwrt/Makefile.in +++ b/mingwrt/Makefile.in @@ -7,7 +7,7 @@ PACKAGE_TARNAME := @PACKAGE_TARNAME@ PACKAGE_VERSION := @PACKAGE_VERSION@ # Written by Keith Marshall <kei...@us...> -# Copyright (C) 2014-2016, MinGW.org Project +# Copyright (C) 2014-2017, MinGW.org Project # # # Permission is hereby granted, free of charge, to any person obtaining a @@ -137,13 +137,10 @@ config.status.missing: # If configure itself needs to be updated, we must run autoconf in the # top level source directory. # -vpath %.m4 ${top_srcdir} vpath configure.ac ${top_srcdir} +vpath %.m4 ${top_srcdir}/.. ${top_srcdir} configure: configure.ac aclocal.m4 VERSION.m4 - cd ${top_srcdir}; autoconf - -${top_srcdir}/%: ${top_srcdir}/../% - cd $(dir $@) && $(LN_S) -f ../$* . + cd ${top_srcdir}; autoconf -I .. # Propagate package version, as configured, consistently throughout # the package build. @@ -893,8 +890,13 @@ mingwrt-srcdist-dir: $(RM) -r dist/$(PACKAGE_TARNAME)-$(PACKAGE_VERSION) $(call mkinstalldirs,,dist/$(PACKAGE_TARNAME)-$(PACKAGE_VERSION)) -mingwrt-srcdist-files: mingwrt-srcdist-package-files +mingwrt-srcdist-files: mingwrt-srcdist-config-files mingwrt-srcdist-files: mingwrt-srcdist-testsuite-files +mingwrt-srcdist-files: mingwrt-srcdist-package-files + +vpath install-sh ${top_srcdir}/.. ${top_srcdir} +mingwrt-srcdist-config-files: aclocal.m4 VERSION.m4 install-sh + cp -p $^ dist/$(PACKAGE_TARNAME)-$(PACKAGE_VERSION) mingwrt-srcdist-package-files: (cd ${mingwrt_srcdir} && tar chf - --hard-dereference $(notdir $^)) | \ @@ -903,9 +905,8 @@ mingwrt-srcdist-package-files: mingwrt-srcdist-package-files: $(wildcard ${mingwrt_srcdir}/*.[chs]) \ $(addprefix ${mingwrt_srcdir}/,ChangeLog CONTRIBUTORS DISCLAIMER README) \ $(wildcard ${mingwrt_srcdir}/*.def.in) $(wildcard ${mingwrt_srcdir}/config*) \ - $(addprefix ${mingwrt_srcdir}/,aclocal.m4 VERSION.m4 install-sh Makefile.in) \ - $(addprefix ${mingwrt_srcdir}/,TODO include man mingwex profile) \ - $(addprefix ${mingwrt_srcdir}/,msvcrt-xref crtdll.def) \ + $(addprefix ${mingwrt_srcdir}/,include man mingwex msvcrt-xref profile) \ + $(addprefix ${mingwrt_srcdir}/,TODO Makefile.in crtdll.def) \ $(wildcard ${mingwrt_srcdir}/*.txt) mingwrt-srcdist-testsuite-files: $(wildcard ${mingwrt_srcdir}/tests/*.at) diff --git a/w32api/ChangeLog b/w32api/ChangeLog index 4e8e4e5..2d72906 100644 --- a/w32api/ChangeLog +++ b/w32api/ChangeLog @@ -1,3 +1,20 @@ +2017-02-10 Keith Marshall <kei...@us...> + + Avoid unnecessary duplication of configuration files. + + * Makefile.in (vpath install-sh): Define it; it matches... + (vpath %.m4): ...this; add $top_srcdir/..; search it first; delete + rule for creating duplicate file reference links in $top_srcdir. + (configure): Add '-I ..' option, when running autoconf. + (w32api-srcdist-files): Rename it as... + (w32api-srcdist-package-files): ...this; remove dependencies on... + (aclocal.m4 VERSION.m4 install-sh): ...these; reinstate them in... + (w32api-srcdist-config-files): ...this new distributable files + enumeration goal; add it as one new prerequisite of... + (w32api-srcdist-files): ...this repurposed goal; also depends on... + (w32api-srcdist-package-files): ...this; populate it using... + (SRCDIST_ADD): ...this macro; redefine it accordingly. + 2016-12-08 Jerzy Tarasiuk <jz...@us...> Correct typo in <ddk/ntdddisk.h>; fix bug [#2323] diff --git a/w32api/Makefile.in b/w32api/Makefile.in index da832cc..0737012 100644 --- a/w32api/Makefile.in +++ b/w32api/Makefile.in @@ -7,7 +7,7 @@ PACKAGE_TARNAME := @PACKAGE_TARNAME@ PACKAGE_VERSION := @PACKAGE_VERSION@ # Written by Keith Marshall <kei...@us...> -# Copyright (C) 2014-2016, MinGW.org Project +# Copyright (C) 2014-2017, MinGW.org Project # # # Permission is hereby granted, free of charge, to any person obtaining a @@ -109,13 +109,10 @@ config.status.missing: # If configure itself needs to be updated, we must run autoconf in the # top level source directory. # -vpath %.m4 ${top_srcdir} vpath configure.ac ${top_srcdir} +vpath %.m4 ${top_srcdir}/.. ${top_srcdir} configure: configure.ac aclocal.m4 VERSION.m4 - cd ${top_srcdir}; autoconf - -${top_srcdir}/%: ${top_srcdir}/../% - cd $(dir $@) && $(LN_S) -f ../$* . + cd ${top_srcdir}; autoconf -I .. # Propagate package version, as configured, consistently throughout # the package build. @@ -352,7 +349,14 @@ mingwrt-srcdist-dir w32api-srcdist-dir: %-srcdist-dir: $(RM) -r dist/$*-$(PACKAGE_VERSION) $(call mkinstalldirs,,dist/$*-$(PACKAGE_VERSION)) -mingwrt-srcdist-files w32api-srcdist-files: %-srcdist-files: +w32api-srcdist-files: w32api-srcdist-config-files +w32api-srcdist-files: w32api-srcdist-package-files + +vpath install-sh ${top_srcdir}/.. ${top_srcdir} +%-srcdist-config-files: aclocal.m4 VERSION.m4 install-sh + cp -p $^ dist/$*-$(PACKAGE_VERSION) + +%-srcdist-package-files: (cd ${$*_srcdir} && tar chf - --hard-dereference $(notdir $^)) | \ (cd dist/$*-$(PACKAGE_VERSION) && tar xf -) @@ -360,11 +364,10 @@ mingwrt-devdist w32api-devdist: %-devdist: %-dist-staged cd dist/$* && tar chf - --hard-dereference include lib | \ xz -c > ../$*-$(PACKAGE_RELEASE_TAG)-dev.tar.xz -SRCDIST_ADD = $1-srcdist-files: $(addprefix ${$1_srcdir}/,$2) +SRCDIST_ADD = $1-srcdist-package-files: $(addprefix ${$1_srcdir}/,$2) $(call SRCDIST_ADD,w32api,ChangeLog CONTRIBUTIONS README.w32api TODO) -$(call SRCDIST_ADD,w32api,configure configure.ac aclocal.m4 VERSION.m4) -$(call SRCDIST_ADD,w32api,Makefile.in install-sh include lib) +$(call SRCDIST_ADD,w32api,configure configure.ac Makefile.in include lib) # Clean-up Rules # -------------- ----------------------------------------------------------------------- Summary of changes: mingwrt/ChangeLog | 14 ++++++++++++++ mingwrt/Makefile.in | 21 +++++++++++---------- w32api/ChangeLog | 17 +++++++++++++++++ w32api/Makefile.in | 23 +++++++++++++---------- 4 files changed, 55 insertions(+), 20 deletions(-) hooks/post-receive -- Repository: mingw-org-wsl |
From: Keith M. <no...@so...> - 2017-02-07 11:27:35
|
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 8dbfc3da207efa274b88d4540f8be78fbda59254 (commit) via 425e1c3b3cd7fd2dda8ec36d6bfd0063db3160d2 (commit) from e52d64b7f86888d5f318fae98fec0536653093d3 (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/8dbfc3da207efa274b88d4540f8be78fbda59254/ commit 8dbfc3da207efa274b88d4540f8be78fbda59254 Author: Keith Marshall <kei...@us...> Date: Tue Feb 7 11:20:05 2017 +0000 Ensure selective inclusion of the correct <strings.h> diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog index 9f99b73..d022d2d 100644 --- a/mingwrt/ChangeLog +++ b/mingwrt/ChangeLog @@ -1,3 +1,12 @@ +2017-02-07 Keith Marshall <kei...@us...> + + Ensure selective inclusion of the correct <strings.h> + + * include/string.h: Use "..." form for selective inclusion of ... + (strings.h): ...this, to ensure that we get our own version, avoiding + any inappropriate alternative which may have been insinuated into the + system header include path. + 2017-02-04 Keith Marshall <kei...@us...> Resolve a global variable naming inconsistency. diff --git a/mingwrt/include/string.h b/mingwrt/include/string.h index ef80f37..288aedc 100644 --- a/mingwrt/include/string.h +++ b/mingwrt/include/string.h @@ -92,8 +92,7 @@ _CRTIMP __cdecl __MINGW_NOTHROW char *strtok (char *, const char *); _CRTIMP __cdecl __MINGW_NOTHROW size_t strxfrm (char *, const char *, size_t); #ifndef __STRICT_ANSI__ -/* - * Extra non-ANSI functions provided by the CRTDLL library +/* Extra non-ANSI functions provided by the CRTDLL library */ _CRTIMP __cdecl __MINGW_NOTHROW char *_strerror (const char *); _CRTIMP __cdecl __MINGW_NOTHROW void *_memccpy (void *, const void *, int, size_t); @@ -108,14 +107,16 @@ _CRTIMP __cdecl __MINGW_NOTHROW char *_strset (char *, int); _CRTIMP __cdecl __MINGW_NOTHROW char *_strupr (char *); _CRTIMP __cdecl __MINGW_NOTHROW void _swab (const char *, char *, size_t); +#if !_EMULATE_GLIBC /* MSVC's non-ANSI _stricmp() and _strnicmp() functions must also be * prototyped here, but we need to share them with <strings.h>, where * we declare their POSIX strcasecmp() and strncasecmp() equivalents; * get the requisite prototypes by selective <strings.h> inclusion, - * (noting that we've already done so, if emulating glibc). + * (noting that we've already done so, if emulating glibc, but if not, + * we use quoted inclusion now, to ensure that we get our "strings.h", + * which is equipped to support __STRING_H_SOURCED__ filtering). */ -#if !_EMULATE_GLIBC -#include <strings.h> +#include "strings.h" #endif # ifdef __MSVCRT__ https://sf.net/p/mingw/mingw-org-wsl/ci/425e1c3b3cd7fd2dda8ec36d6bfd0063db3160d2/ commit 425e1c3b3cd7fd2dda8ec36d6bfd0063db3160d2 Author: Keith Marshall <kei...@us...> Date: Sat Feb 4 21:33:50 2017 +0000 Resolve a global variable naming inconsistency. diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog index 1862aa4..9f99b73 100644 --- a/mingwrt/ChangeLog +++ b/mingwrt/ChangeLog @@ -1,3 +1,14 @@ +2017-02-04 Keith Marshall <kei...@us...> + + Resolve a global variable naming inconsistency. + + * mingwex/ofmt.c (__mingw_output_format_flag): Rename it as... + (__mingw_output_format_flags): ...this, at point of definition, and + update all references, to maintain consistency with usage... + * mingwex/ofmtctl.c (__mingw_output_format_flags): ...here. + + * mingwex/stdio/pformat.c: Update references. + 2017-01-30 Keith Marshall <kei...@us...> Implement strerror_r()/strerror_s() API. diff --git a/mingwrt/mingwex/ofmt.c b/mingwrt/mingwex/ofmt.c index 9d7543e..01b8096 100644 --- a/mingwrt/mingwex/ofmt.c +++ b/mingwrt/mingwex/ofmt.c @@ -8,7 +8,7 @@ * $Id$ * * Written by Keith Marshall <kei...@us...> - * Copyright (C) 2014, 2015, MinGW.org Project + * Copyright (C) 2014, 2015, 2017, MinGW.org Project * * * Permission is hereby granted, free of charge, to any person obtaining a @@ -84,25 +84,23 @@ * declared; users should NEVER access this, other than via our two * accessor functions. */ -extern unsigned int __mingw_output_format_flag; +extern unsigned int __mingw_output_format_flags; static __inline__ __attribute__((__always_inline__)) -unsigned int update_output_format_flag( unsigned int style ) -{ return (__mingw_output_format_flag & ~_EXPONENT_DIGIT_MASK) | style; } +unsigned int update_output_format_flags( unsigned int style ) +{ return (__mingw_output_format_flags & ~_EXPONENT_DIGIT_MASK) | style; } #if defined __varofmt__ -/* - * Here, we actually allocate the storage for recording the preferred +/* Here, we actually allocate the storage for recording the preferred * formatting style; although POSIX might lead us to prefer an initial * default of _TWO_DIGIT_EXPONENT, we choose to assign a default which * is consistent with Microsoft's preference. */ -unsigned int __mingw_output_format_flag = _THREE_DIGIT_EXPONENT; +unsigned int __mingw_output_format_flags = _THREE_DIGIT_EXPONENT; #elif defined __crtofmt__ -/* - * Here we implement the common part of the fallback API, retrieving - * the value stored in __mingw_output_format_flag. Note that this is +/* Here we implement the common part of the fallback API, retrieving + * the value stored in __mingw_output_format_flags. Note that this is * sufficient for both _get_output_format() and _set_output_format(), * with the set action being completed in the calling wrapper. */ @@ -112,7 +110,7 @@ unsigned int __mingw_get_output_format_fallback( void ) /* Our replacement function simply returns the current setting of * the assigned formatting style... */ - return __mingw_output_format_flag & _EXPONENT_DIGIT_MASK; + return __mingw_output_format_flags & _EXPONENT_DIGIT_MASK; } /* ...and, in the case of _set_output_format(), we simply map the * requisite name to the common function implementation. @@ -121,8 +119,7 @@ extern unsigned int __mingw_set_output_format_fallback( unsigned int ) __attribute__((__alias__("__mingw_get_output_format_fallback"))); #elif defined __crtnfmt__ -/* - * Here, we implement a generic fallback hook, suitable for use as the +/* Here, we implement a generic fallback hook, suitable for use as the * fallback for _get_printf_count_output()/_set_printf_count_output(). */ int __mingw_get_printf_count_output_fallback( void ) @@ -139,8 +136,7 @@ int __mingw_set_printf_count_output_fallback( int mode ) * _set_output_format() compilation options first. */ #if defined __setnfmt__ -/* - * Here, we are wrapping the _set_printf_count_output() function... +/* Here, we are wrapping the _set_printf_count_output() function... */ # define RTNTYPE int # define FUNCTION _set_printf_count_output @@ -150,8 +146,7 @@ int __mingw_set_printf_count_output_fallback( int mode ) extern int __mingw_set_printf_count_output_fallback( int ); #elif defined __getnfmt__ -/* - * ...while here, it is _get_printf_count_output(). +/* ...while here, it is _get_printf_count_output(). */ # define RTNTYPE int # define FUNCTION _get_printf_count_output @@ -161,8 +156,7 @@ extern int __mingw_set_printf_count_output_fallback( int ); extern int __mingw_get_printf_count_output_fallback( void ); #elif defined __setofmt__ -/* - * This is our implementation for the _set_output_format() function, +/* This is our implementation for the _set_output_format() function, * which will be called when there is no MSVCRT implementation. */ # define RTNTYPE unsigned int @@ -183,7 +177,7 @@ api_invoke( unsigned int (*api_helper)(unsigned int), unsigned int style ) * to use a handler in common with _get_output_format()... */ unsigned int retval = api_helper( style &= _EXPONENT_DIGIT_MASK ); - __mingw_output_format_flag = update_output_format_flag( style ); + __mingw_output_format_flags = update_output_format_flags( style ); return retval; } /* ...while declaring its formal prototype as external. @@ -204,7 +198,7 @@ static __inline__ __attribute__((__always_inline__)) unsigned int api_invoke( unsigned int (*api_helper)( void ) ) { unsigned int retval = api_helper(); - __mingw_output_format_flag = update_output_format_flag( retval ); + __mingw_output_format_flags = update_output_format_flags( retval ); return retval; } diff --git a/mingwrt/mingwex/stdio/pformat.c b/mingwrt/mingwex/stdio/pformat.c index 9543f99..11d0153 100644 --- a/mingwrt/mingwex/stdio/pformat.c +++ b/mingwrt/mingwex/stdio/pformat.c @@ -8,7 +8,7 @@ * to support Microsoft's non-standard format specifications. * * Written by Keith Marshall <kei...@us...> - * Copyright (C) 2008, 2009, 2011, 2014-2016, MinGW.org Project + * Copyright (C) 2008, 2009, 2011, 2014-2017, MinGW.org Project * * * Permission is hereby granted, free of charge, to any person obtaining a @@ -187,10 +187,10 @@ * 2) Emulation of _set_output_format(), through the use of inline * functions defined in stdio.h, and supported regardless of the * availability of the API within MSVCRT.DLL; this emulated API - * maintains state in the global `__mingw_output_format_flag' + * maintains state in the global `__mingw_output_format_flags' * variable, (which users should consider to be private). */ -extern unsigned int __mingw_output_format_flag; +extern unsigned int __mingw_output_format_flags; static __pformat_inline__ int __pformat_exponent_digits( void ) @@ -200,7 +200,7 @@ int __pformat_exponent_digits( void ) */ char *exponent_digits = getenv( "PRINTF_EXPONENT_DIGITS" ); return ((exponent_digits != NULL) && ((unsigned)(*exponent_digits - '0') < 3)) - || (__mingw_output_format_flag & _TWO_DIGIT_EXPONENT) + || (__mingw_output_format_flags & _TWO_DIGIT_EXPONENT) ? 2 : 3 ; } #else @@ -2199,7 +2199,7 @@ int __pformat_is_alt_ldouble_modifier( int length ) * to be treated as equivalent to 'L', as it is in MSVCRT.DLL's * implementation of the printf() functions. */ - return (__mingw_output_format_flag & _MSVC_PRINTF_QUIRKS) + return (__mingw_output_format_flags & _MSVC_PRINTF_QUIRKS) ? (length == PFORMAT_LENGTH_LONG) : 0; } #else ----------------------------------------------------------------------- Summary of changes: mingwrt/ChangeLog | 20 ++++++++++++++++++++ mingwrt/include/string.h | 11 ++++++----- mingwrt/mingwex/ofmt.c | 36 +++++++++++++++--------------------- mingwrt/mingwex/stdio/pformat.c | 10 +++++----- 4 files changed, 46 insertions(+), 31 deletions(-) hooks/post-receive -- Repository: mingw-org-wsl |
From: Keith M. <no...@so...> - 2017-01-30 15:15:47
|
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 e52d64b7f86888d5f318fae98fec0536653093d3 (commit) via c0372a60e6918ffd944670ba8502a0d99fa69044 (commit) via 7428c55ab13b7f25c68e0248269bbca64f2906b2 (commit) from 58fece31502adede9300337c67d4f4e0f04ba01c (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/e52d64b7f86888d5f318fae98fec0536653093d3/ commit e52d64b7f86888d5f318fae98fec0536653093d3 Author: Keith Marshall <kei...@us...> Date: Mon Jan 30 15:12:46 2017 +0000 Implement strerror_r()/strerror_s() API. diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog index 8064858..1862aa4 100644 --- a/mingwrt/ChangeLog +++ b/mingwrt/ChangeLog @@ -1,5 +1,19 @@ 2017-01-30 Keith Marshall <kei...@us...> + Implement strerror_r()/strerror_s() API. + + * mingwex/strerror_r.c: New file; it implements... + (strerror_r): ...this new POSIX.1-2001 conforming function. + + * include/string.h (strerror_s): Add function prototype, subject to... + [_MSVCR80_DLL || _WIN32_WINNT_VISTA]: ...this DLL version dependency; + otherwise implement an inline wrapper function to emulate it, using... + [_POSIX_C_SOURCE > 200112L] (strerror_r): ...this; add prototype. + + * Makefile.in (libmingwex.a): Add strerror_r.$OBJEXT + +2017-01-30 Keith Marshall <kei...@us...> + Avoid -Wformat noise from snprintf() and vsnprintf() * include/stdio.h (snprintf, vsnprintf): Add inline implementations; diff --git a/mingwrt/Makefile.in b/mingwrt/Makefile.in index 20fd2c5..7593cca 100644 --- a/mingwrt/Makefile.in +++ b/mingwrt/Makefile.in @@ -494,9 +494,8 @@ libmingwex.a: $(addsuffix .$(OBJEXT), glob getopt basename dirname nsleep) 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), getdelim gettimeofday) -libmingwex.a: $(addsuffix .$(OBJEXT), dirent wdirent dlfcn) vpath %.s ${mingwrt_srcdir}/mingwex vpath %.sx ${mingwrt_srcdir}/mingwex diff --git a/mingwrt/include/string.h b/mingwrt/include/string.h index a53a71a..ef80f37 100644 --- a/mingwrt/include/string.h +++ b/mingwrt/include/string.h @@ -198,6 +198,35 @@ __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 >= 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 + * volatile) system supplied storage. Although inherently thread-safe, + * Microsoft's strerror() also uses a potentially volatile buffer, (in + * the sense that it is overwritten by successive calls within a single + * thread); thus, we provide our own implementation of POSIX.1-2001's + * strerror_r() function, to facilitate the return of non-volatile + * copies of strerror()'s message text. + */ +extern int strerror_r (int, char *, size_t); +#endif + +#if __MSVCRT_VERSION__>=__MSVCR80_DLL || _WIN32_WINNT >= _WIN32_WINNT_VISTA +/* MSVCR80.DLL introduced a safer, (erroneously so called "more secure"), + * alternative to strerror(), named strerror_s(); it was later retrofitted + * to MSVCRT.DLL, from the release of Windows-Vista onwards. + */ +_CRTIMP __cdecl __MINGW_NOTHROW int strerror_s (char *, size_t, int); + +#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 + * strerror_r() function. + */ +__CRT_ALIAS int strerror_s (char *__buf, size_t __len, int __err) +{ return strerror_r (__err, __buf, __len); } +#endif + #undef __STRING_H_SOURCED__ _END_C_DECLS diff --git a/mingwrt/mingwex/strerror_r.c b/mingwrt/mingwex/strerror_r.c new file mode 100644 index 0000000..4194357 --- /dev/null +++ b/mingwrt/mingwex/strerror_r.c @@ -0,0 +1,89 @@ +/* + * strerror_r.c + * + * Implementation of POSIX standard IEEE 1003.1-2001 strerror_r() function. + * + * $Id$ + * + * Written by Keith Marshall <kei...@us...> + * Copyright (C) 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"), + * 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 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. + * + */ +#define _POSIX_C_SOURCE 200112L + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <errno.h> + +int strerror_r( int errnum, char *buf, size_t len ) +{ + /* Copy the error message, as retrieved by strerror(), to the user + * supplied buffer, so protecting it from subsequent overwrite by a + * future call to strerror(); returns zero on success, otherwise sets + * errno to, and returns, EINVAL if the user specified errnum doesn't + * refer to a valid message, or ERANGE if the associated message, and + * its terminating NUL, will not fit within the specified buffer. + * + * Note that Microsoft's strerror() DOES appear to be thread-safe, + * but it uses a single static buffer per thread; thus, within any + * one thread, successive calls will overwrite the previous contents + * of this buffer; use of strerror_r() allows the user to save a copy + * of strerror()'s buffer contents, following each call, where they + * are not subject to overwriting by a subsequent strerror() call. + */ + if( buf == NULL ) + /* POSIX does not recommend any handling for the case of a NULL + * return buffer argument; rather than segfault, we will treat it + * as a zero-length buffer, into which we can fit no message text + * at all, and so we simply return, setting errno to ERANGE. + */ + return errno = ERANGE; + + /* The buffer pointer isn't NULL; assume it is valid, (we will fail + * on segfault if it isn't), and proceed to validate errnum. + */ + if( ((unsigned)(errnum)) >= sys_nerr ) + { /* Note that we check errnum as unsigned; this will also catch a + * negative value, since it will appear to be within the positive + * range INT_MAX < errnum <= UINT_MAX, while sys_nerr is expected + * to be less than INT_MAX. + */ + snprintf( buf, len, "Unknown error: %d", errnum ); + return errno = EINVAL; + } + /* errnum appears to be valid; copy the associated message, while + * checking that its entire text is copied... + */ + if( snprintf( buf, len, "%s", strerror( errnum )) >= len ) + /* + * ...otherwise, set errno on truncation. + */ + return errno = ERANGE; + + /* If we get to here, return zero, indicating success; (DO NOT + * modify errno, in this case). + */ + return 0; +} + +/* $RCSfile$: end of file */ https://sf.net/p/mingw/mingw-org-wsl/ci/c0372a60e6918ffd944670ba8502a0d99fa69044/ commit c0372a60e6918ffd944670ba8502a0d99fa69044 Author: Keith Marshall <kei...@us...> Date: Mon Jan 30 13:33:51 2017 +0000 Avoid -Wformat noise from snprintf() and vsnprintf() diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog index a1ffb6e..8064858 100644 --- a/mingwrt/ChangeLog +++ b/mingwrt/ChangeLog @@ -1,5 +1,13 @@ 2017-01-30 Keith Marshall <kei...@us...> + Avoid -Wformat noise from snprintf() and vsnprintf() + + * include/stdio.h (snprintf, vsnprintf): Add inline implementations; + they redirect to "__mingw_" prefixed alternatives, so suppressing the + effect of automatic format attribute recognition. + +2017-01-30 Keith Marshall <kei...@us...> + Remove duplicate libmingwex.a entries. * mingwex/jmpstub.sx (DLLENTRY): Interpret it. diff --git a/mingwrt/include/stdio.h b/mingwrt/include/stdio.h index 9e2ccab..e17afa0 100644 --- a/mingwrt/include/stdio.h +++ b/mingwrt/include/stdio.h @@ -394,6 +394,16 @@ int sprintf (char *__stream, const char *__format, ...) } __mingw_stdio_redirect__ +int snprintf (char *__stream, size_t __len, const char *__format, ...) +{ + register int __retval; + __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format ); + __retval = __mingw_vsnprintf( __stream, __len, __format, __local_argv ); + __builtin_va_end( __local_argv ); + return __retval; +} + +__mingw_stdio_redirect__ int vfprintf (FILE *__stream, const char *__format, __VALIST __local_argv) { return __mingw_vfprintf( __stream, __format, __local_argv ); @@ -411,6 +421,12 @@ int vsprintf (char *__stream, const char *__format, __VALIST __local_argv) return __mingw_vsprintf( __stream, __format, __local_argv ); } +__mingw_stdio_redirect__ +int vsnprintf (char *__stream, size_t __len, const char *__format, __VALIST __local_argv) +{ + return __mingw_vsnprintf( __stream, __len, __format, __local_argv ); +} + #else /* Default configuration: simply direct all calls to MSVCRT... */ https://sf.net/p/mingw/mingw-org-wsl/ci/7428c55ab13b7f25c68e0248269bbca64f2906b2/ commit 7428c55ab13b7f25c68e0248269bbca64f2906b2 Author: Keith Marshall <kei...@us...> Date: Mon Jan 30 10:53:24 2017 +0000 Remove duplicate libmingwex.a entries. diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog index 19d884c..a1ffb6e 100644 --- a/mingwrt/ChangeLog +++ b/mingwrt/ChangeLog @@ -1,3 +1,20 @@ +2017-01-30 Keith Marshall <kei...@us...> + + Remove duplicate libmingwex.a entries. + + * mingwex/jmpstub.sx (DLLENTRY): Interpret it. + + * Makefile.in (jmpstub_awk_script): Handle DLLENTRY. + (libmingwex.a): Remove explicit object file references to... + (snwprintf, vsnwprintf): ...these. + + * include/stdio.h (snwprintf, vsnwprintf): Map them as __JMPSTUB__ + references to MSVCRT.DLL entry points, via DLLENTRY references to... + (_snwprintf, _vsnwprintf): ...these, respectively. + + * mingwex/snwprintf.c: Redundant file; delete it. + * mingwex/vsnwprintf.c: Likewise. + 2017-01-29 Keith Marshall <kei...@us...> Clean up <limits.h> header file. diff --git a/mingwrt/Makefile.in b/mingwrt/Makefile.in index 6b7afca..20fd2c5 100644 --- a/mingwrt/Makefile.in +++ b/mingwrt/Makefile.in @@ -469,8 +469,8 @@ libmingwex.a: $(addsuffix .$(OBJEXT), cosf cosl acosf acosl sinf sinl asinf \ # vpath %.c ${mingwrt_srcdir}/mingwex/stdio libmingwex.a: $(addsuffix .$(OBJEXT), btowc fprintf fseeko64 ofmtctl pformat \ - printf snprintf snwprintf sprintf vfprintf vfscanf vfwscanf vprintf vscanf \ - vsnprintf vsnwprintf vsprintf vsscanf vswscanf vwscanf) + printf snprintf sprintf vfprintf vfscanf vfwscanf vprintf vscanf vsnprintf \ + vsprintf vsscanf vswscanf vwscanf) # pformat.$(OBJEXT) needs an explicit build rule, since we need to # specify an additional header file path. @@ -583,7 +583,9 @@ jmpstub_awk_script = test -z "$1" || awk '\ LIB = match( $$0, ".*[ ,(:]LIB *= *"symbol, altlib ) ? altlib[1] : "mingwex"; \ OBJNAME = gensub( "_*(.*)_*", "\\1", 1, FUNCTION )".jmpstub.$$(OBJEXT)"; \ OBJNAME_CFLAGS = "-D FUNCTION="FUNCTION; \ - if( match( $$0, ".*[ ,(:]REMAPPED *= *"symbol, alias ) ) \ + if( match( $$0, ".*[ ,(:]DLLENTRY *= *"symbol, alias ) ) \ + OBJNAME_CFLAGS = OBJNAME_CFLAGS" -D DLLENTRY="alias[1]; \ + else if( match( $$0, ".*[ ,(:]REMAPPED *= *"symbol, alias ) ) \ OBJNAME_CFLAGS = OBJNAME_CFLAGS" -D REMAPPED="alias[1]; \ printf fmt, LIB, OBJNAME, OBJNAME, OBJNAME_CFLAGS; \ } \ diff --git a/mingwrt/include/stdio.h b/mingwrt/include/stdio.h index 252c210..9e2ccab 100644 --- a/mingwrt/include/stdio.h +++ b/mingwrt/include/stdio.h @@ -7,7 +7,7 @@ * $Id$ * * Written by Colin Peters <co...@bi...> - * Copyright (C) 1997-2005, 2007-2010, 2014-2016, MinGW.org Project. + * Copyright (C) 1997-2005, 2007-2010, 2014-2017, MinGW.org Project. * * * Permission is hereby granted, free of charge, to any person obtaining a @@ -950,12 +950,13 @@ _CRTIMP __cdecl __MINGW_NOTHROW FILE * _wpopen (const wchar_t *, const wchar #endif /* __MSVCRT__ */ #ifdef _ISOC99_SOURCE +__JMPSTUB__(( FUNCTION = snwprintf, DLLENTRY = _snwprintf )) __cdecl __MINGW_NOTHROW int snwprintf (wchar_t *, size_t, const wchar_t *, ...); __cdecl __MINGW_NOTHROW int vsnwprintf (wchar_t *, size_t, const wchar_t *, __VALIST); #ifndef __NO_INLINE__ __CRT_INLINE __cdecl __MINGW_NOTHROW -__JMPSTUB__(( FUNCTION = vsnwprintf, REMAPPED = _vsnwprintf )) +__JMPSTUB__(( FUNCTION = vsnwprintf, DLLENTRY = _vsnwprintf )) int vsnwprintf (wchar_t *__s, size_t __n, const wchar_t *__fmt, __VALIST __arg) { return _vsnwprintf ( __s, __n, __fmt, __arg); } #endif diff --git a/mingwrt/mingwex/jmpstub.sx b/mingwrt/mingwex/jmpstub.sx index aa57975..200a120 100644 --- a/mingwrt/mingwex/jmpstub.sx +++ b/mingwrt/mingwex/jmpstub.sx @@ -7,7 +7,7 @@ * $Id$ * * Written by Keith Marshall <kei...@us...> - * Copyright (C) 2013, 2014, MinGW.org Project + * Copyright (C) 2013, 2014, 2017, MinGW.org Project * * * Permission is hereby granted, free of charge, to any person obtaining a @@ -46,20 +46,48 @@ * an additional "-D REMAPPED=entryname" option, resulting in redirection * of "funcname()" calls to the "entryname()" function entry point. * + * Alternatively, calls to "funcname()" may be redirected to a DLL entry point, + * via its importable name within the DLL's export table, by specification of + * the "-D DLLENTRY=entryname" option, instead of "-D REMAPPED=entryname". + * */ #define __entry__(__suffix__) __label__(_,__suffix__) #define __label__(__prefix__,__suffix__) __prefix__##__suffix__ -#ifndef REMAPPED -# define __mingw__(__suffix__) __label__(__mingw_,__suffix__) -# define REMAPPED __mingw__(FUNCTION) +#if defined LLENTRY && ! defined DLLENTRY +/* This is a convenience for users; it allows specification of a DLLENTRY + * option as simply "-DLLENTRY=entryname", as an alternative to specifying + * it fully, as "-D DLLENTRY=entryname". + */ +#define DLLENTRY LLENTRY #endif .text +#ifdef DLLENTRY + /* This represents the case of redirection to a function implementation + * residing within a DLL... + */ +# define __dllentry__(__suffix__) __label__(__imp__,__suffix__) +# define __redirect__ *__dllentry__(DLLENTRY) + +#else + /* ...whereas this redirection to an alternative static library function, + * or to a DLL implementation accessed via an import library trampoline. + */ +# ifndef REMAPPED + /* No explicit entry point redirection specified; use the default entry + * point name, within the "__mingw_" pseudo-namespace. + */ +# define __mingw__(__suffix__) __label__(__mingw_,__suffix__) +# define REMAPPED __mingw__(FUNCTION) +# endif +# define __redirect__ __entry__(REMAPPED) +.def __entry__(REMAPPED); .scl 2; .type 32; .endef +#endif + .global __entry__(FUNCTION) .def __entry__(FUNCTION); .scl 2; .type 32; .endef -.def __entry__(REMAPPED); .scl 2; .type 32; .endef -__entry__(FUNCTION): jmp __entry__(REMAPPED) +__entry__(FUNCTION): jmp __redirect__ /* $RCSfile$: end of file */ diff --git a/mingwrt/mingwex/stdio/snwprintf.c b/mingwrt/mingwex/stdio/snwprintf.c deleted file mode 100644 index d69892e..0000000 --- a/mingwrt/mingwex/stdio/snwprintf.c +++ /dev/null @@ -1,13 +0,0 @@ -#include <stdarg.h> -#include <wchar.h> - -int snwprintf(wchar_t* buffer, size_t n, const wchar_t* format, ...) -{ - int retval; - va_list argptr; - - va_start( argptr, format ); - retval = _vsnwprintf( buffer, n, format, argptr ); - va_end( argptr ); - return retval; -} diff --git a/mingwrt/mingwex/stdio/vsnwprintf.c b/mingwrt/mingwex/stdio/vsnwprintf.c deleted file mode 100644 index 1b59a07..0000000 --- a/mingwrt/mingwex/stdio/vsnwprintf.c +++ /dev/null @@ -1,5 +0,0 @@ -#include <stdarg.h> -#include <wchar.h> - -int vsnwprintf(wchar_t *buffer, size_t n, const wchar_t * format, va_list argptr) - { return _vsnwprintf( buffer, n, format, argptr );} ----------------------------------------------------------------------- Summary of changes: mingwrt/ChangeLog | 39 ++++++++++++++++ mingwrt/Makefile.in | 11 ++-- mingwrt/include/stdio.h | 21 ++++++++- mingwrt/include/string.h | 29 ++++++++++++ mingwrt/mingwex/jmpstub.sx | 40 ++++++++++++++-- mingwrt/mingwex/stdio/snwprintf.c | 13 ----- mingwrt/mingwex/stdio/vsnwprintf.c | 5 -- mingwrt/mingwex/strerror_r.c | 89 ++++++++++++++++++++++++++++++++++++ 8 files changed, 216 insertions(+), 31 deletions(-) delete mode 100644 mingwrt/mingwex/stdio/snwprintf.c delete mode 100644 mingwrt/mingwex/stdio/vsnwprintf.c create mode 100644 mingwrt/mingwex/strerror_r.c hooks/post-receive -- Repository: mingw-org-wsl |
From: Keith M. <no...@so...> - 2017-01-29 14:25:13
|
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 58fece31502adede9300337c67d4f4e0f04ba01c (commit) via f186d677f9cb6eb23ecaaaf60e35a69a42c6a82e (commit) from d7c921ed3389436e65fc83c91b873a764c94ac51 (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/58fece31502adede9300337c67d4f4e0f04ba01c/ commit 58fece31502adede9300337c67d4f4e0f04ba01c Author: Keith Marshall <kei...@us...> Date: Sun Jan 29 14:24:00 2017 +0000 Clean up <limits.h> header file. diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog index ebc7c4c..19d884c 100644 --- a/mingwrt/ChangeLog +++ b/mingwrt/ChangeLog @@ -1,5 +1,16 @@ 2017-01-29 Keith Marshall <kei...@us...> + Clean up <limits.h> header file. + + * include/limits.h: Tidy layout; assert copyright. + (#pragma GCC system_header): Declare it as being such. + (_LIMITS_H_): Rename this multiple inclusion guard macro... + (_LIMITS_H): ...to adopt this preferred form. + [__STDC_VERSION__ >= 199901L]: Infer it... + [_ISOC99_SOURCE]: ...from this. + +2017-01-29 Keith Marshall <kei...@us...> + Expose C99 features required by C++11; fix issue [#2335] * include/_mingw.h.in (_ISOC99_SOURCE): Ensure it is defined for... diff --git a/mingwrt/include/limits.h b/mingwrt/include/limits.h index c67118c..49f7698 100644 --- a/mingwrt/include/limits.h +++ b/mingwrt/include/limits.h @@ -1,42 +1,60 @@ /* * limits.h - * This file has no copyright assigned and is placed in the Public Domain. - * This file is a part of the mingw-runtime package. - * No warranty is given; refer to the file DISCLAIMER within the package. * - * Functions for manipulating paths and directories (included from io.h) - * plus functions for setting the current drive. + * Manifest constants defining the sizes of integral types. * - * Defines constants for the sizes of integral types. + * $Id$ * - * NOTE: GCC should supply a version of this header and it should be safe to - * use that version instead of this one (maybe safer). + * Written by Colin Peters <co...@bi...> + * Copyright (C) 1997, 1999-2001, 2004, 2005, 2010, 2012, 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, this permission notice, and the following + * disclaimer shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OF OR OTHER + * DEALINGS IN THE SOFTWARE. * */ +#ifndef _LIMITS_H +#pragma GCC system_header +#define _LIMITS_H -#ifndef _LIMITS_H_ -#define _LIMITS_H_ - -/* All the headers include this file. */ +/* All MinGW headers are required to include <_mingw.h> + */ #include <_mingw.h> -/* - * File system limits +/* File system limits + * + * TODO (REVIEW): Are NAME_MAX and OPEN_MAX file system limits, or not? + * Are they the same as FILENAME_MAX and FOPEN_MAX from <stdio.h>? * - * TODO: NAME_MAX and OPEN_MAX are file system limits or not? Are they the - * same as FILENAME_MAX and FOPEN_MAX from stdio.h? - * NOTE: PATH_MAX is the POSIX equivalent for Microsoft's MAX_PATH; the two - * are semantically identical, with a limit of 259 characters for the - * path name, plus one for a terminating NUL, for a total of 260. + * NOTE: PATH_MAX is the POSIX equivalent for Microsoft's MAX_PATH; the + * two are semantically identical, with a limit of 259 characters for the + * path name, plus one for a terminating NUL, making a total of 260. */ #ifndef __STRICT_ANSI__ # define PATH_MAX 260 #endif -/* - * Characteristics of the char data type. +/* Characteristics of the char data type. * - * TODO: Is MB_LEN_MAX correct? + * FIXME: Is MB_LEN_MAX correct? Probably yes, for Microsoft MBCS, which + * effectively seem to all be DBCS. */ #define CHAR_BIT 8 #define MB_LEN_MAX 2 @@ -46,70 +64,69 @@ #define UCHAR_MAX 255 -/* TODO: Is this safe? I think it might just be testing the preprocessor, - * not the compiler itself... */ -#if ('\x80' < 0) -#define CHAR_MIN SCHAR_MIN -#define CHAR_MAX SCHAR_MAX +#if '\x80' < 0 +/* FIXME: is this safe? I think it might just be testing + * the preprocessor, not the compiler itself. + */ +# define CHAR_MIN SCHAR_MIN +# define CHAR_MAX SCHAR_MAX #else -#define CHAR_MIN 0 -#define CHAR_MAX UCHAR_MAX +# define CHAR_MIN 0 +# define CHAR_MAX UCHAR_MAX #endif -/* - * Maximum and minimum values for ints. +/* Maximum and minimum values for ints. */ #define INT_MAX 2147483647 #define INT_MIN (-INT_MAX-1) -#define UINT_MAX 0xffffffff +#define UINT_MAX 0xFFFFFFFF -/* - * Maximum and minimum values for shorts. +/* Maximum and minimum values for shorts. */ #define SHRT_MAX 32767 #define SHRT_MIN (-SHRT_MAX-1) -#define USHRT_MAX 0xffff +#define USHRT_MAX 0xFFFF -/* - * Maximum and minimum values for longs and unsigned longs. - * - * TODO: This is not correct for Alphas, which have 64 bit longs. +/* Maximum and minimum values for longs and unsigned longs; + * this isn't correct for Alphas, which have 64 bit longs, but + * that is probably no longer a concern. */ #define LONG_MAX 2147483647L #define LONG_MIN (-LONG_MAX-1) -#define ULONG_MAX 0xffffffffUL +#define ULONG_MAX 0xFFFFFFFFUL #ifndef __STRICT_ANSI__ -/* POSIX wants this. */ -#define SSIZE_MAX LONG_MAX +/* POSIX wants this. + */ +#define SSIZE_MAX LONG_MAX #endif -#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \ - || !defined(__STRICT_ANSI__) -/* ISO C9x macro names */ -#define LLONG_MAX 9223372036854775807LL -#define LLONG_MIN (-LLONG_MAX - 1) -#define ULLONG_MAX (2ULL * LLONG_MAX + 1) +#if _ISOC99_SOURCE +/* Implicitly defined in <_mingw.h>, (or explicitly defined by + * the user), for C99, C++, or POSIX.1-2001; make these ISO-C99 + * macro names available. + */ +#define LLONG_MAX 9223372036854775807LL +#define LLONG_MIN (-LLONG_MAX - 1) +#define ULLONG_MAX (2ULL * LLONG_MAX + 1) #endif -/* - * The GNU C compiler also allows 'long long int' +#if defined __GNUC__ && ! defined __STRICT_ANSI__ +/* The GNU C compiler also allows 'long long int', but we don't + * want that capability polluting the strict ANSI namespace. */ -#if !defined(__STRICT_ANSI__) && defined(__GNUC__) - #define LONG_LONG_MAX 9223372036854775807LL #define LONG_LONG_MIN (-LONG_LONG_MAX-1) #define ULONG_LONG_MAX (2ULL * LONG_LONG_MAX + 1) -/* MSVC compatibility */ -#define _I64_MIN LONG_LONG_MIN -#define _I64_MAX LONG_LONG_MAX -#define _UI64_MAX ULONG_LONG_MAX - -#endif /* Not Strict ANSI and GNU C compiler */ - +/* MSVC compatibility + */ +#define _I64_MIN LONG_LONG_MIN +#define _I64_MAX LONG_LONG_MAX +#define _UI64_MAX ULONG_LONG_MAX -#endif /* not _LIMITS_H_ */ +#endif /* __GNUC__ && !__STRICT_ANSI__ */ +#endif /* !_LIMITS_H: $RCSfile$: end of file */ https://sf.net/p/mingw/mingw-org-wsl/ci/f186d677f9cb6eb23ecaaaf60e35a69a42c6a82e/ commit f186d677f9cb6eb23ecaaaf60e35a69a42c6a82e Author: Keith Marshall <kei...@us...> Date: Sun Jan 29 10:09:49 2017 +0000 Expose C99 features required by C++11; fix issue [#2335] diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog index 59beea4..ebc7c4c 100644 --- a/mingwrt/ChangeLog +++ b/mingwrt/ChangeLog @@ -1,3 +1,20 @@ +2017-01-29 Keith Marshall <kei...@us...> + + Expose C99 features required by C++11; fix issue [#2335] + + * include/_mingw.h.in (_ISOC99_SOURCE): Ensure it is defined for... + [__cplusplus >= 201103L]: ...this conformance level, in addition to... + [__STDC_VERSION__>= 199901L || _POSIX_C_SOURCE >= 200112L]: ...these. + [_GLIBCXX_USE_C99]: Force it for -std=c++11, subject to... + [__GNUC__ < 6]: ...this. + + * include/ctype.h (isblank): Declare it only if... + [_ISOC99_SOURCE]: ...this, thus simplifying declarative condition. + * include/wctype.h (iswblank) [_ISOC99_SOURCE]: Likewise. + * include/inttypes.h (SCNd8, SCNdLEAST8, SCNdFAST8, SCNi8, SCNiLEAST8) + (SCNiFAST8, SCNo8, SCNoLEAST8, SCNoFAST8, SCNx8, SCNxLEAST8, SCNxFAST8) + (SCNu8, SCNuLEAST8, SCNuFAST8) [_ISOC99_SOURCE]: Likewise. + 2017-01-28 Keith Marshall <kei...@us...> Make strnlen() and wcsnlen() declaratively consistent. diff --git a/mingwrt/include/_mingw.h.in b/mingwrt/include/_mingw.h.in index 57fc0cc..fd99590 100644 --- a/mingwrt/include/_mingw.h.in +++ b/mingwrt/include/_mingw.h.in @@ -8,7 +8,7 @@ * $Id$ * * Written by Mumit Khan <kh...@xr...> - * Copyright (C) 1999, 2001-2011, 2014-2016, MinGW.org Project + * Copyright (C) 1999, 2001-2011, 2014-2017, MinGW.org Project * * * Permission is hereby granted, free of charge, to any person obtaining a @@ -451,18 +451,62 @@ allow GCC to optimize away some EH unwind code, at least in DW2 case. */ /* libmingwex.a provides free-standing implementations for many of the * functions which were introduced in C99; MinGW headers do not expose * prototypes for these, unless this feature test macro is defined, by - * the user, or implied by other standards... + * the user, or implied by other standards. We will use a bit-mapped + * representation, comprising the bit-wise sum of: + * + * 0x08 user declared + * 0x04 required by C compiler, supporting ISO-C99 + * 0x02 required by C++ compiler, supporting ISO-C++11 + * 0x01 required to support recent POSIX.1 features + * + * to ensure that we can identify the reason for implicit declaration, + * (in the event that we may need to discriminate). */ -# if __STDC_VERSION__ >= 199901L || _POSIX_C_SOURCE >= 200112L -# define _ISOC99_SOURCE 1 +# if __STDC_VERSION__ >= 199901L + /* This represents a compiler supporting ISO-C99; enable all potential + * use of ISO-C99 features, (to the maximum extent supportable), which + * presumably also covers all C++11 and POSIX.1 usage. + */ +# define _ISOC99_SOURCE 0x07 + +# elif __cplusplus >= 201103L + /* C++11 also incorporates many (if not all) of the ISO-C99 features, + * which we have guarded by _ISOC99_SOURCE; enable such features, to + * the required extent, (which is likely also sufficient to support + * any POSIX.1 dependencies). + */ +# define _ISOC99_SOURCE 0x03 + +# elif _POSIX_C_SOURCE >= 200112L + /* This represents the minimum level of ISO-C99 support, which may be + * required by POSIX.1, (and which may be no less than full support). + */ +# define _ISOC99_SOURCE 0x01 # endif + +#else + /* The the user has explicitly declared a source level dependency on + * ISO-C99 features; regardless of how it was declared, redefine it to + * ensure that any plausible dependency is covered. + */ +# undef _ISOC99_SOURCE +# define _ISOC99_SOURCE 0x0F + +#endif /* _ISOC99_SOURCE */ + +#if _ISOC99_SOURCE && __cplusplus >= 201103L && __GNUC__ < 6 + /* Due to a configuration defect in GCC versions prior to GCC-6, when + * compiling C++11 code, the ISO-C99 functions may not be incorporated + * into the appropriate namespace(s); we may be able to mitigate this, + * by ensuring that this GCC configuration macro is defined. + */ +# define _GLIBCXX_USE_C99 1 #endif #if ! defined _MINGW32_SOURCE_EXTENDED && ! defined __STRICT_ANSI__ -/* - * Enable mingw32 extensions by default, except when __STRICT_ANSI__ - * conformity mode has been enabled. - */ + /* Enable mingw32 extensions by default, except when __STRICT_ANSI__ + * conformity mode has been enabled. + */ # define _MINGW32_SOURCE_EXTENDED 1 #endif diff --git a/mingwrt/include/ctype.h b/mingwrt/include/ctype.h index 7ff41a0..58fb2fd 100644 --- a/mingwrt/include/ctype.h +++ b/mingwrt/include/ctype.h @@ -80,7 +80,7 @@ _CRTIMP __cdecl __MINGW_NOTHROW int isspace(int); _CRTIMP __cdecl __MINGW_NOTHROW int isupper(int); _CRTIMP __cdecl __MINGW_NOTHROW int isxdigit(int); -#if __STDC_VERSION__ >= 199901L || !defined __STRICT_ANSI__ +#if _ISOC99_SOURCE __cdecl __MINGW_NOTHROW int isblank (int); #endif @@ -217,7 +217,7 @@ __CRT_INLINE __cdecl __MINGW_NOTHROW int isupper (int c) __CRT_INLINE __cdecl __MINGW_NOTHROW int isxdigit (int c) { return __ISCTYPE(c, _HEX); } -#if __STDC_VERSION__ >= 199901L || !defined __STRICT_ANSI__ +#if _ISOC99_SOURCE __CRT_INLINE __cdecl __MINGW_NOTHROW int isblank (int c) { return (__ISCTYPE(c, _BLANK) || c == '\t'); } #endif diff --git a/mingwrt/include/inttypes.h b/mingwrt/include/inttypes.h index e5e5d5b..6da1d97 100644 --- a/mingwrt/include/inttypes.h +++ b/mingwrt/include/inttypes.h @@ -222,10 +222,12 @@ typedef struct { #define SCNuMAX "I64u" #define SCNuPTR "u" -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L -/* - * no length modifier for char types prior to C9x - * MS runtime scanf appears to treat "hh" as "h" +#if _ISOC99_SOURCE +/* Defined by the user, or implicitly in <_mingw.h>, indicating that + * we are compiling for C99, C++11, or POSIX.1-2001 (or later); no char + * type length modifiers are supported prior to C99. Further note that + * Microsoft's scanf() appears to treat the ISO-C99/POSIX.1 "hh" length + * modifier as if it were just "h". */ /* signed char */ @@ -249,7 +251,7 @@ typedef struct { #define SCNu8 "hhu" #define SCNuLEAST8 "hhu" #define SCNuFAST8 "hhu" -#endif /* __STDC_VERSION__ >= 199901 */ +#endif /* _ISOC99_SOURCE */ #endif /* !defined(__cplusplus) || defined(__STDC_FORMAT_MACROS) */ diff --git a/mingwrt/include/wctype.h b/mingwrt/include/wctype.h index 492f2f0..7b7ed20 100644 --- a/mingwrt/include/wctype.h +++ b/mingwrt/include/wctype.h @@ -6,7 +6,7 @@ * $Id$ * * Written by Mumit Khan <kh...@xr...> - * Copyright (C) 1999-2003, 2005-2007, 2016, MinGW.org Project + * Copyright (C) 1999-2003, 2005-2007, 2016, 2017, MinGW.org Project * * * Permission is hereby granted, free of charge, to any person obtaining a @@ -119,7 +119,7 @@ __MINGW_ATTRIB_DEPRECATED */ _CRTIMP __cdecl __MINGW_NOTHROW int is_wctype (wint_t, wctype_t); -#if __STDC_VERSION__>=199901L || !defined __STRICT_ANSI__ || defined __cplusplus +#if _ISOC99_SOURCE __cdecl __MINGW_NOTHROW int iswblank (wint_t); #endif @@ -173,7 +173,7 @@ __CRT_INLINE __cdecl __MINGW_NOTHROW int iswupper (wint_t wc) __CRT_INLINE __cdecl __MINGW_NOTHROW int iswxdigit (wint_t wc) { return (iswctype (wc, _HEX)); } -#if __STDC_VERSION__>=199901L || !defined __STRICT_ANSI__ || defined __cplusplus +#if _ISOC99_SOURCE __CRT_INLINE __cdecl __MINGW_NOTHROW int iswblank (wint_t wc) { return (iswctype (wc, _BLANK) || wc == L'\t'); } #endif ----------------------------------------------------------------------- Summary of changes: mingwrt/ChangeLog | 28 +++++++++ mingwrt/include/_mingw.h.in | 60 ++++++++++++++++--- mingwrt/include/ctype.h | 4 +- mingwrt/include/inttypes.h | 12 ++-- mingwrt/include/limits.h | 137 ++++++++++++++++++++++++------------------- mingwrt/include/wctype.h | 6 +- 6 files changed, 169 insertions(+), 78 deletions(-) hooks/post-receive -- Repository: mingw-org-wsl |
From: Keith M. <no...@so...> - 2017-01-28 17:50:44
|
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 d7c921ed3389436e65fc83c91b873a764c94ac51 (commit) via a0d99fbf0a207c3644a17cfaea0943ac2022517d (commit) from cc2f1a7a56d95bfb20b97f022f0a1dc7f8250387 (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/d7c921ed3389436e65fc83c91b873a764c94ac51/ commit d7c921ed3389436e65fc83c91b873a764c94ac51 Author: Keith Marshall <kei...@us...> Date: Sat Jan 28 17:46:36 2017 +0000 Make strnlen() and wcsnlen() declaratively consistent. diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog index 7bbe88c..59beea4 100644 --- a/mingwrt/ChangeLog +++ b/mingwrt/ChangeLog @@ -1,5 +1,12 @@ 2017-01-28 Keith Marshall <kei...@us...> + Make strnlen() and wcsnlen() declaratively consistent. + + * include/string.h (strnlen): Do not expose its declaration, unless... + [_POSIX_C_SOURCE >= 200809L]: ...this feature test is enabled. + +2017-01-28 Keith Marshall <kei...@us...> + Implement wcsnlen() API per feature request [#2332]. * mingwex/strnlen.s: Rename it as... diff --git a/mingwrt/include/string.h b/mingwrt/include/string.h index 6cc4f88..a53a71a 100644 --- a/mingwrt/include/string.h +++ b/mingwrt/include/string.h @@ -170,6 +170,7 @@ _CRTIMP __cdecl __MINGW_NOTHROW void swab (const char *, char *, size_t); #endif /* ! __STRICT_ANSI__ */ +#if _POSIX_C_SOURCE >= 200809L #if __MSVCRT_VERSION__ >= __MSVCR80_DLL /* MSVCR80.DLL adds a (mostly) POSIX.1-2008 conforming strnlen(); (it's * also available in MSVCRT.DLL from _WIN32_WINNT_VISTA onwards, but we @@ -179,7 +180,7 @@ _CRTIMP __cdecl __MINGW_NOTHROW void swab (const char *, char *, size_t); */ _CRTIMP __cdecl __MINGW_NOTHROW char *strnlen (const char *, size_t); -#elif _POSIX_C_SOURCE >= 200809L +#else /* MSVCRT.DLL || pre-MSVCR80.DLL */ /* Emulation, to support recent POSIX.1; we prefer this for ALL versions * of MSVCRT.DLL, (even those which already provide strnlen()); to avoid * the GCC breakage noted above. (Note that we implement strnlen() with @@ -194,6 +195,7 @@ __JMPSTUB__(( LIB=coldname; FUNCTION=strnlen )) __CRT_ALIAS size_t strnlen (const char *__text, size_t __maxlen) { return __mingw_strnlen (__text, __maxlen); } +#endif /* MSVCRT.DLL || pre-MSVCR80.DLL */ #endif /* _POSIX_C_SOURCE >= 200809L */ #undef __STRING_H_SOURCED__ https://sf.net/p/mingw/mingw-org-wsl/ci/a0d99fbf0a207c3644a17cfaea0943ac2022517d/ commit a0d99fbf0a207c3644a17cfaea0943ac2022517d Author: Keith Marshall <kei...@us...> Date: Sat Jan 28 16:20:51 2017 +0000 Implement wcsnlen() API per feature request [#2332]. --HG-- rename : mingwrt/mingwex/strnlen.s => mingwrt/mingwex/strnlen.sx diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog index 41a6e08..7bbe88c 100644 --- a/mingwrt/ChangeLog +++ b/mingwrt/ChangeLog @@ -1,3 +1,28 @@ +2017-01-28 Keith Marshall <kei...@us...> + + Implement wcsnlen() API per feature request [#2332]. + + * mingwex/strnlen.s: Rename it as... + * mingwex/strnlen.sx: ...this; use C preprocessor logic to adapt... + (__mingw_strnlen): ...this existing function implementation for use... + [_UNICODE] (__mingw_wcsnlen): ...as this. + + * include/wchar.h [_POSIX_C_SOURCE >= 200809L] (wcsnlen): Declare... + [__MSVCRT_VERSION__>=__MSVCR80_DLL]: ...using MS DLL implementation... + [!__MSVCRT_VERSION__>=__MSVCR80_DLL] (__mingw_wcsnlen): ...otherwise, + declare this, with inline __JMPSTUB__ implementation, providing... + (wcsnlen): ...this. + + * Makefile.in (wcsnlen.$OBJEXT): New build rule. + (libmingwex.a): Add wcsnlen.$OBJEXT as new prerequisite. + (libmoldname.a, libmoldnamed.a): Add __JMPSTUB__ wrappers. + (libmoldname70.a, libmoldname70d.a): Likewise. + (libmoldname71.a, libmoldname71d.a): Likewise. + + for all other MSVC non-free associated oldname import libraries. + (vpath): Add $srcdir/mingwex for %.sx; hence mapping for... + (jmpstub.sx): ...this becomes redundant; delete it. + 2017-01-26 Jason Hood <ja...@ya...> Honour GLOB_CASEMATCH for globbing sets; cf. issue [#2327]. diff --git a/mingwrt/Makefile.in b/mingwrt/Makefile.in index 0a3e5c3..6b7afca 100644 --- a/mingwrt/Makefile.in +++ b/mingwrt/Makefile.in @@ -388,7 +388,7 @@ $(foreach name,coldname $(all_moldname),lib$(name).a): $(addsuffix .$(OBJEXT), \ # $(foreach name,moldname $(addprefix moldname,70 71),lib$(name).a) \ $(foreach name,moldname $(addprefix moldname,70 71),lib$(name)d.a): \ - strnlen.jmpstub.$(OBJEXT) + strnlen.jmpstub.$(OBJEXT) wcsnlen.jmpstub.$(OBJEXT) coldname.def: %.def: ${mingwrt_srcdir}/moldname.def.in $(CC) -C -E -P -D__FILENAME__=$@ -D__CRTDLL__ -xc-header $< > $@ @@ -499,10 +499,16 @@ libmingwex.a: $(addsuffix .$(OBJEXT), getdelim gettimeofday) libmingwex.a: $(addsuffix .$(OBJEXT), dirent wdirent dlfcn) vpath %.s ${mingwrt_srcdir}/mingwex +vpath %.sx ${mingwrt_srcdir}/mingwex libmingwex.a: $(addsuffix .$(OBJEXT), fwide mbrtowc mbsinit strnlen wcrtomb \ - wcstof wcstold wctob wmemchr wmemcmp wmemcpy wmemmove wmemset) + wcsnlen wcstof wcstold wctob wctrans wctype wmemchr wmemcmp wmemcpy wmemmove \ + wmemset) -libmingwex.a: $(addsuffix .$(OBJEXT), wctrans wctype) +# The wcsnlen() function, enumerated above, is an adaptation of strnlen(); +# we need a specific rule to compile it, from shared source. +# +wcsnlen.$(OBJEXT): strnlen.sx + $(COMPILE.sx) -D_UNICODE $^ -o $@ # For the math sources, we support the convention that a single # quux_generic.c source file will produce three objects: quux.o, @@ -553,7 +559,6 @@ libm_dummy.c: Makefile # entry points as stubs in libmingwex.a, via the following rules: # sinclude Makefile.stub -vpath jmpstub.sx ${mingwrt_srcdir}/mingwex libstub_refnames = grep -lr '__$1.*FUNCTION *=' ${mingwrt_srcdir} jmpstub_prerequisites := $(shell $(call libstub_refnames,JMPSTUB)/include) libimpl_prerequisites := $(shell $(call libstub_refnames,LIBIMPL)/include) diff --git a/mingwrt/include/wchar.h b/mingwrt/include/wchar.h index e4edd52..a10fb20 100644 --- a/mingwrt/include/wchar.h +++ b/mingwrt/include/wchar.h @@ -467,6 +467,36 @@ _CRTIMP __cdecl __MINGW_NOTHROW wchar_t *wcsupr (wchar_t *); #endif /* !_NO_OLDNAMES */ #endif /* !__STRICT_ANSI__ */ +#if _POSIX_C_SOURCE >= 200809L +#if __MSVCRT_VERSION__ >= __MSVCR80_DLL +/* MSVCR80.DLL adds a (mostly) POSIX.1-2008 conforming wcsnlen(); (it's + * also available in MSVCRT.DLL from _WIN32_WINNT_VISTA onwards, but we + * pretend otherwise, since recent GCC will try to use the function when + * it can be found in libmsvcrt.a, so breaking it for use on WinXP and + * earlier). + */ +#ifndef __STRICT_ANSI__ /* N.B.: this is not an ISO-C function */ +_CRTIMP __cdecl __MINGW_NOTHROW char *wcsnlen (const wchar_t *, size_t); +#endif + +#else /* MSVCRT.DLL || pre-MSVCR80.DLL */ +/* Emulation, to support recent POSIX.1; we prefer this for ALL versions + * of MSVCRT.DLL, (even those which already provide wcsnlen()); to avoid + * the GCC breakage noted above. (Note that we implement wcsnlen() with + * the alternative external name, __mingw_wcsnlen() in libmingwex.a, to + * avoid possible link time collision with MSVCR80.DLL's implementation, + * then map this to wcsnlen() via a __CRT_ALIAS, with stubs designated + * for linking from within the appropriate oldname libraries. + */ +extern size_t __mingw_wcsnlen (const wchar_t *, size_t); + +__JMPSTUB__(( LIB=coldname; FUNCTION=wcsnlen )) +__CRT_ALIAS size_t wcsnlen (const wchar_t *__text, size_t __maxlen) +{ return __mingw_wcsnlen (__text, __maxlen); } + +#endif /* MSVCRT.DLL || pre-MSVCR80.DLL */ +#endif /* _POSIX_C_SOURCE >= 200809L */ + /* This completes the set of declarations which are to be duplicated by * inclusion of <string.h>; revert the declarative condition, to make it * specific to <wchar.h> alone. diff --git a/mingwrt/mingwex/strnlen.s b/mingwrt/mingwex/strnlen.sx similarity index 74% rename from mingwrt/mingwex/strnlen.s rename to mingwrt/mingwex/strnlen.sx index 66d7b49..463afb0 100644 --- a/mingwrt/mingwex/strnlen.s +++ b/mingwrt/mingwex/strnlen.sx @@ -1,5 +1,5 @@ /* - * strnlen.s + * strnlen.sx * * Implementation of POSIX.1-2008 conforming strnlen(), and a wrapper * extending it to conform with ISO-C11 TR-24731-1 strnlen_s(). @@ -7,7 +7,7 @@ * $Id$ * * Written by Keith Marshall <kei...@us...> - * Copyright (C) 2016, MinGW.org Project + * Copyright (C) 2016, 2017, MinGW.org Project * * * Permission is hereby granted, free of charge, to any person obtaining a @@ -52,10 +52,26 @@ * sharing of common code between two distinct entry points, with subtly * differing behaviours, while avoiding the overhead of an extra function * call to invoke such shared code; this also allows the code to exploit - * the CUP's string scanning instructions, (which GCC does not), and so + * the CPU's string scanning instructions, (which GCC does not), and so * achieves a more compact, (and likely more efficient), implementation. * */ +#if defined UNICODE || defined _UNICODE +/* The algorithm defined herein is effectively the same as that required + * as a substitute for wcsnlen()/wcsnlen_s(); map entry point names to the + * appropriate alternatives for scanning wchar_t *, (rather than char *), + * strings, (i.e. Microsoft's so-called UNICODE strings). + */ +# define ___mingw_strnlen ___mingw_wcsnlen +# define ___mingw_strnlen_s ___mingw_wcsnlen_s + +/* The fundamental change required to scan whcar_t * strings, rather than + * char * strings, is that we must use the scasw instruction in place of + * the scasb instruction; map it accordingly. + */ +# define scasb scasw +#endif + .text .align 4 .globl ___mingw_strnlen @@ -84,8 +100,22 @@ ___mingw_strnlen: decl %eax /* NUL found and counted; discount it */ .L3: sub %edx, %eax /* compute effective count to return */ -.L4: - popl %edi /* restore saved register ... */ + +#if defined UNICODE || defined _UNICODE +/* By the time we get to here, the EAX register contains the effective + * length of the scanned string in bytes; this is the correct value to be + * returned, in the case of char * strings, but it is twice the correct + * length for wchar_t * strings, (possibly with one odd residual byte, + * left over from a partially discounted NUL wchar_t); we may adjust this, + * for the wchar_t * case, by a simple logical right shift, effectively + * dividing the even extent of the (unsigned) count by two, extracting + * the full wchar_t count, leaving any odd byte residual as remainder + * in the carry flag, where we may simply (and safely) ignore it. + */ + shrl %eax /* convert byte count to wchar_t count */ +#endif + +.L4: popl %edi /* restore saved register ... */ ret /* and we're done */ .align 4 ----------------------------------------------------------------------- Summary of changes: mingwrt/ChangeLog | 32 +++++++++++++++++++++++ mingwrt/Makefile.in | 13 ++++++--- mingwrt/include/string.h | 4 ++- mingwrt/include/wchar.h | 30 +++++++++++++++++++++ mingwrt/mingwex/{strnlen.s => strnlen.sx} | 40 +++++++++++++++++++++++++--- 5 files changed, 109 insertions(+), 10 deletions(-) rename mingwrt/mingwex/{strnlen.s => strnlen.sx} (74%) hooks/post-receive -- Repository: mingw-org-wsl |
From: Keith M. <no...@so...> - 2017-01-26 20:41:04
|
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 cc2f1a7a56d95bfb20b97f022f0a1dc7f8250387 (commit) via df96caa682ec8abb3faf6caa181205b2de028fb5 (commit) via 597dadeab7bb2070d5bd5a5c06e4b4b98493b1aa (commit) from 490e36035f4e6d99a01faaee73c297b7f385f3a3 (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/cc2f1a7a56d95bfb20b97f022f0a1dc7f8250387/ commit cc2f1a7a56d95bfb20b97f022f0a1dc7f8250387 Author: Jason Hood <ja...@ya...> Date: Thu Jan 26 20:34:13 2017 +0000 Honour GLOB_CASEMATCH for globbing sets; cf. issue [#2327]. diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog index 67091e8..41a6e08 100644 --- a/mingwrt/ChangeLog +++ b/mingwrt/ChangeLog @@ -1,3 +1,11 @@ +2017-01-26 Jason Hood <ja...@ya...> + + Honour GLOB_CASEMATCH for globbing sets; cf. issue [#2327]. + + * include/glob.h (GLOB_CASEMATCH): Update comment. + * mingwex/glob.c (glob_case_match): Move before, and use it in... + (glob_in_set): ...this function, to test characters in the set. + 2017-01-26 Keith Marshall <kei...@us...> Avoid snprintf() overhead in directory stream functions. diff --git a/mingwrt/include/glob.h b/mingwrt/include/glob.h index 9cfa169..45e1c9a 100644 --- a/mingwrt/include/glob.h +++ b/mingwrt/include/glob.h @@ -8,7 +8,7 @@ * $Id$ * * Written by Keith Marshall <kei...@us...> - * Copyright (C) 2011, 2012, 2014, 2016, MinGW.org Project. + * Copyright (C) 2011, 2012, 2014, 2016, 2017, MinGW.org Project. * * * Permission is hereby granted, free of charge, to any person obtaining a @@ -94,10 +94,7 @@ enum { * but to better support the MS-Windows * file system, the MinGW implementation * of glob() performs a CASE INSENSITIVE - * character match by default, (except - * when matching within character group - * patterns, which are ALWAYS assumed to - * require CASE SENSITIVE matching). + * character match by default. */ __GLOB_CASEMATCH_OFFSET, /* diff --git a/mingwrt/mingwex/glob.c b/mingwrt/mingwex/glob.c index 8b5332a..1f064e1 100644 --- a/mingwrt/mingwex/glob.c +++ b/mingwrt/mingwex/glob.c @@ -7,7 +7,7 @@ * $Id$ * * Written by Keith Marshall <kei...@us...> - * Copyright (C) 2011-2014, MinGW.org Project. + * Copyright (C) 2011-2014, 2017, MinGW.org Project. * * * Permission is hereby granted, free of charge, to any person obtaining a @@ -227,6 +227,15 @@ static const char *glob_set_adjusted( const char *pattern, int flags ) return ++p; } +GLOB_INLINE int glob_case_match( int flags, int check, int match ) +{ + /* Local helper function, used to facilitate the case insensitive + * glob character matching appropriate for MS-Windows systems. + */ + return (flags & GLOB_CASEMATCH) ? check - match + : tolower( check ) - tolower( match ); +} + static const char *glob_in_set( const char *set, int test, int flags ) { /* Check if the single character "test" is present in the set @@ -283,7 +292,7 @@ static const char *glob_in_set( const char *set, int test, int flags ) /* ...in incremental collating sequence order, to the next * character following the '-'... */ - if( lastc++ == test ) + if( glob_case_match( flags, lastc++, test ) == 0 ) /* * ...returning immediately on a successful match... */ @@ -295,7 +304,7 @@ static const char *glob_in_set( const char *set, int test, int flags ) * range may have been specified in decrementing collating * sequence order... */ - if( lastc-- == test ) + if( glob_case_match( flags, lastc--, test ) == 0 ) /* * ...once again, return immediately on a successful match. */ @@ -316,7 +325,7 @@ static const char *glob_in_set( const char *set, int test, int flags ) */ return NULL; - if( c == test ) + if( glob_case_match( flags, c, test ) == 0 ) /* * We found the test character within the set; adjust the pattern * reference, to resume after the end of the set, and return the @@ -337,15 +346,6 @@ static const char *glob_in_set( const char *set, int test, int flags ) return NULL; } -GLOB_INLINE int glob_case_match( int flags, int check, int match ) -{ - /* Local helper function, used to facilitate the case insensitive - * glob character matching appropriate for MS-Windows systems. - */ - return (flags & GLOB_CASEMATCH) ? check - match - : tolower( check ) - tolower( match ); -} - static int glob_strcmp( const char *pattern, const char *text, int flags ) { /* Compare "text" to a specified globbing "pattern" using semantics https://sf.net/p/mingw/mingw-org-wsl/ci/df96caa682ec8abb3faf6caa181205b2de028fb5/ commit df96caa682ec8abb3faf6caa181205b2de028fb5 Author: Keith Marshall <kei...@us...> Date: Thu Jan 26 18:56:27 2017 +0000 Avoid snprintf() overhead in directory stream functions. diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog index b90c04e..67091e8 100644 --- a/mingwrt/ChangeLog +++ b/mingwrt/ChangeLog @@ -1,5 +1,16 @@ 2017-01-26 Keith Marshall <kei...@us...> + Avoid snprintf() overhead in directory stream functions. + + * mingwex/dirent.c (dirent_update): Do not use either snprintf() or + snwprintf() functions when updating dd->d_name and dd->d_namlen data; + emulate them instead, using a lightweight inline char-by-char counted + copy loop, operating on char or wchar_t data as appropriate. + (DIRENT_ASSIGN_NAME): Macro no longer required; delete it. + (NUL): New manifest constant; define it. + +2017-01-26 Keith Marshall <kei...@us...> + Avoid #include_next misbehaviour; cf. MinGW-Bug [#2330] * include/ctype.h (wctype.h): Use "..." form of #include, rather than diff --git a/mingwrt/mingwex/dirent.c b/mingwrt/mingwex/dirent.c index e6813c1..10a2ac7 100644 --- a/mingwrt/mingwex/dirent.c +++ b/mingwrt/mingwex/dirent.c @@ -1,24 +1,46 @@ /* * dirent.c * - * This file has no copyright assigned and is placed in the Public Domain. + * $Id$ + * + * Provides emulation of POSIX "directory stream" manipulation functions, + * in terms of the MS-Windows FindFile API. * - * This file is a part of the mingw-runtime package. - * No warranty is given; refer to the file DISCLAIMER within the package. * * Derived from DIRLIB.C by Matt J. Weinstein - * This note appears in the DIRLIB.H + * This note appears in the associated DIRLIB.H header file: * DIRLIB.H by M. J. Weinstein Released to public domain 1-Jan-89 * * Updated by Jeremy Bettis <je...@hk...> * Significantly revised and rewinddir, seekdir and telldir added * by Colin Peters <co...@fu...> + * * Further significantly revised for improved memory utilisation, * efficiency in operation, and better POSIX standards compliance * by Keith Marshall <kei...@us...> + * Copyright (C) 1997, 2001-2006, 2014, 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, this permission notice, and the following + * disclaimer shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OF OR OTHER + * DEALINGS IN THE SOFTWARE. * */ -#include <stdio.h> #include <stdlib.h> #include <errno.h> #include <string.h> @@ -28,23 +50,6 @@ #include <windows.h> #include <tchar.h> -#ifdef _UNICODE - /* In a Unicode build, the path name within the _wdirent struct is - * represented by a wchar_t string; we use the snwprintf() function - * to simultaneously assign the d_name and d_namlen fields, copying - * from a temporary WIN32_FIND_DATA struct on the stack... - */ -# include <wchar.h> -# define DIRENT_ASSIGN_NAME snwprintf - -#else - /* ...while for a non-Unicode build, the corresponding data within - * the dirent structure is represented by a normal char string, and - * the assignments are made by the snprintf() function. - */ -# define DIRENT_ASSIGN_NAME snprintf -#endif - /* This implementation applies a "__mingw_" pseudo-namespace prefix to * the standard POSIX function names, for each each function it defines; * the following pair of macros facilitates this. @@ -150,16 +155,33 @@ struct __wdirstream_t */ #define DT_VALID_BITS ~(DT_IGNORED | 0x0080) +/* For convenience, we identify the NUL "character" which terminates any + * file or directory name, appropriately typed, using this macro: + */ +#define NUL ((_TCHAR)(0)) + static void dirent_update( struct _tdirent *dd, WIN32_FIND_DATA *fd ) { /* Helper function, used by dirent_findfirst() and dirent_findnext(), * to transfer all relevant data from their respective WIN32_FIND_DATA - * buffers to the specified dirent structure. + * buffers to the specified dirent structure; in the case of the d_name + * field, we want the effect of a snprintf() string transfer, but to + * avoid the (perceptually significant) overhead of format parsing, + * we simulate it with an inline character-by-character counted + * string copy loop... + */ + _TCHAR *d_name = dd->d_name; + for( dd->d_namlen = 0; (*d_name = fd->cFileName[dd->d_namlen]) != NUL; ) + /* + * ...continuing to count input characters, until the terminal NUL, + * but declining to store any character beyond the physical end of + * the d_name field buffer. + */ + if( ++dd->d_namlen < FILENAME_MAX ) ++d_name; + + /* Store only those file attribute bits which are valid for d_type. */ - dd->d_namlen = DIRENT_ASSIGN_NAME( dd->d_name, FILENAME_MAX, - _T("%s"), fd->cFileName - ); if( (dd->d_type = fd->dwFileAttributes & DT_VALID_BITS) > DT_DIR ) dd->d_type = DT_UNKNOWN; } https://sf.net/p/mingw/mingw-org-wsl/ci/597dadeab7bb2070d5bd5a5c06e4b4b98493b1aa/ commit 597dadeab7bb2070d5bd5a5c06e4b4b98493b1aa Author: Keith Marshall <kei...@us...> Date: Thu Jan 26 16:14:43 2017 +0000 Avoid #include_next misbehaviour; cf. MinGW-Bug [#2330] diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog index aed25b8..b90c04e 100644 --- a/mingwrt/ChangeLog +++ b/mingwrt/ChangeLog @@ -1,3 +1,14 @@ +2017-01-26 Keith Marshall <kei...@us...> + + Avoid #include_next misbehaviour; cf. MinGW-Bug [#2330] + + * include/ctype.h (wctype.h): Use "..." form of #include, rather than + the <...> form; we must include our own corresponding mingwrt version + of this subsidiary header, and avoid any bogus alternative which may + have been insinuated earlier in the system header path. + + * include/string.h (wchar.h): Likewise. + 2017-01-25 Jason Hood <ja...@ya...> Correct quoted backslash handling, per bug [#2328]. diff --git a/mingwrt/include/ctype.h b/mingwrt/include/ctype.h index 5c4ef43..7ff41a0 100644 --- a/mingwrt/include/ctype.h +++ b/mingwrt/include/ctype.h @@ -6,7 +6,7 @@ * $Id$ * * Written by Colin Peters <co...@bi...> - * Copyright (C) 1997-2008, 2016, MinGW.org Project + * Copyright (C) 1997-2008, 2016, 2017, MinGW.org Project * * * Permission is hereby granted, free of charge, to any person obtaining a @@ -42,17 +42,21 @@ * properly declared here, this file should also declare elements of the * wide classification API, which is properly declared in <wctype.h> * - * To avoid the burden of maintaining duplicate declarations, in two + * To avoid the burden of maintaining duplicate declarations in two * locations, we keep the wide character declarations where ISO-C and * POSIX say they belong, in <wctype.h>, while accommodating Microsoft * compatibility by providing for selective inclusion of the relevant * elements of it here. (Note that we must do this early, because to * avoid duplication, we delegate the definition of common character * classification macros, with the exception of _LEADBYTE, which is - * not required in both headers, to <wctype.h>). + * not required in both headers, to <wctype.h>; we use the quoted + * form of inclusion here, to ensure that we get our own "wctype.h", + * and not any predecessor which may have been insinuated into the + * system include path, and which may interfere with our mechanism + * for partial inclusion of shared header content). */ #define __CTYPE_H_SOURCED__ -#include <wctype.h> +#include "wctype.h" /* This is the one character classification macro, for which definition * is NOT delegated to <wctype.h> diff --git a/mingwrt/include/string.h b/mingwrt/include/string.h index 720c85a..6cc4f88 100644 --- a/mingwrt/include/string.h +++ b/mingwrt/include/string.h @@ -6,7 +6,7 @@ * $Id$ * * Written by Colin Peters <co...@bi...> - * Copyright (C) 1997-2000, 2002-2004, 2007, 2009, 2015, 2016, + * Copyright (C) 1997-2000, 2002-2004, 2007, 2009, 2015-2017, * MinGW.org Project. * * @@ -160,9 +160,13 @@ _CRTIMP __cdecl __MINGW_NOTHROW void swab (const char *, char *, size_t); * scope, will selectively expose the required function prototypes; * however, strictly ISO-C conforming applications should include * <wchar.h> directly; they should not rely on this MSVC specific - * anomalous behaviour. + * anomalous behaviour. (We use the quoted form of inclusion here, + * to ensure that we get our own "wchar.h", and not any predecessor + * which may have been insinuated into the system include path, and + * so could interfere with our mechanism for partial inclusion of + * shared header content). */ -#include <wchar.h> +#include "wchar.h" #endif /* ! __STRICT_ANSI__ */ ----------------------------------------------------------------------- Summary of changes: mingwrt/ChangeLog | 30 ++++++++++++++++++ mingwrt/include/ctype.h | 12 +++++-- mingwrt/include/glob.h | 7 +--- mingwrt/include/string.h | 10 ++++-- mingwrt/mingwex/dirent.c | 74 +++++++++++++++++++++++++++++---------------- mingwrt/mingwex/glob.c | 26 ++++++++-------- 6 files changed, 108 insertions(+), 51 deletions(-) hooks/post-receive -- Repository: mingw-org-wsl |