[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mingw-cvs
Subject:    MinGW-cvs Digest, Vol 62, Issue 1
From:       mingw-cvs-request () lists ! sourceforge ! net
Date:       2013-06-04 21:21:52
Message-ID: mailman.32185.1370380912.12996.mingw-cvs () lists ! sourceforge ! net
[Download RAW message or body]

Send MinGW-cvs mailing list submissions to
	mingw-cvs@lists.sourceforge.net

To subscribe or unsubscribe via the World Wide Web, visit
	https://lists.sourceforge.net/lists/listinfo/mingw-cvs
or, via email, send a message with subject or body 'help' to
	mingw-cvs-request@lists.sourceforge.net

You can reach the person managing the list at
	mingw-cvs-owner@lists.sourceforge.net

When replying, please edit your Subject line so it is more specific
than "Re: Contents of MinGW-cvs digest..."


This list will notify you of updates to the code stored in CVS.  Typically only \
developers with access to update the CVS are interested in this list.  However, this \
list can be beneficial to see what is happening with your changes.  If you wish to \
unsubscribe please do so at https://lists.sourceforge.net/lists/listinfo/mingw-cvs.

Today's Topics:

   1. [git push pexports]Repository: pexports branch, master,
      updated. v0_44-13-g47e0c86 (Keith Marshall)
   2. [git push pexports]Repository: pexports tag, v0_45,	created.
      v0_44-2-g59648a7 (Keith Marshall)
   3. [git push pexports]Repository: pexports tag, v0_46,	created.
      v0_44-12-g6595f89 (Keith Marshall)
   4. [git push mingw-dist]Repository: mingw-dist branch,	master,
      updated. e0b404737a39ee35d0e21388ff0d60138ceedf28 (Keith Marshall)
   5. [git push mingw-org-wsl]Repository: mingw-org-wsl	branch,
      4.0-dev, updated. da60fde74476b9b27760f4b62898334cb54a92a1
      (Earnie Boyd)


----------------------------------------------------------------------

Message: 1
Date: Thu, 30 May 2013 20:18:29 +0000
From: "Keith Marshall" <noreply@sourceforge.net>
Subject: [MinGW-cvs] [git push pexports]Repository: pexports branch,
	master,	updated. v0_44-13-g47e0c86
To: mingw-cvs@lists.sourceforge.net
Message-ID:
	<mailman.32186.1370380912.12996.mingw-cvs@lists.sourceforge.net>

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Repository: pexports".

The branch, master has been updated
       via  47e0c86a4ac5ce100649ea75334c16a64ca82586 (commit)
       via  6595f896f2e6e7783a39108ad37055d31e2410a7 (commit)
       via  06429d0f083c146cf13a46327668746635900590 (commit)
       via  4888aed797c9b7afd63c14c74f8599c228608997 (commit)
      from  d2c308679351b87a0496e2b49985bfdbdd07b1b8 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sf.net/p/mingw/pexports/ci/47e0c86a4ac5ce100649ea75334c16a64ca82586/

commit 47e0c86a4ac5ce100649ea75334c16a64ca82586
Author: Keith Marshall <keithmarshall@users.sourceforge.net>
Date:   Thu May 30 21:15:48 2013 +0100

    Prepare, tag, and publish 0.46 release.

diff --git a/.hgtags b/.hgtags
index 5598d21..e1925c4 100644
--- a/.hgtags
+++ b/.hgtags
@@ -1 +1,2 @@
 6dd98480346eeb4f94a16696d652412374917b07 v0_45
+cb0995437e4a3989b42b49409b3b743341e54f31 v0_46

https://sf.net/p/mingw/pexports/ci/6595f896f2e6e7783a39108ad37055d31e2410a7/

commit 6595f896f2e6e7783a39108ad37055d31e2410a7
Author: Keith Marshall <keithmarshall@users.sourceforge.net>
Date:   Thu May 30 21:15:16 2013 +0100

    Prepare, tag, and publish 0.46 release.

diff --git a/ChangeLog b/ChangeLog
index 07dbadd..a508e55 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2013-05-30  Keith Marshall  <keithmarshall@users.sourceforge.net>
 
+	Prepare, tag, and publish 0.46 release.
+
+	* README: Add release notes.
+	* All files: Tagged "v0_46" for release.
+
+2013-05-30  Keith Marshall  <keithmarshall@users.sourceforge.net>
+
 	Assemble licence and documentation tarballs for distribution.
 
 	* Makefile.in (dist): Add dependencies on...
diff --git a/README b/README
index 6bce0ec..05f1d8f 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-PEXPORTS 0.44 README
+PEXPORTS 0.46 README
 ============================================
 
 Anders Norlander <anorland@hem2.passagen.se>
@@ -20,7 +20,7 @@ convention. GCC is used to do the preprocessing so it must be in \
your  path.
 
 Note that the Windows version uses ';' as path separator,
-while if built for Cygwin it uses ':'.
+while if built for Cygwin (or *nix) it uses ':'.
 
 Command line options:
 =====================
@@ -41,9 +41,19 @@ C parser, there are probably many conditions when it will fail
 (especially complex parameter types), although I it works fine for me.
 Please do not report bugs, but feel free to send patches.
 
+RELEASE 0.46
+=================
+* Corrects two potential segmentation fault bugs.
+* Now supports building "out-of-source", to facilitate parallel builds
+  for differing hosts; (verified for mingw32, 32-bit and 64-bit linux).
+* Now uses the GNU (autoconf managed) build procedure; run configure
+  before make, when building, ("in-source" or "out-of-source").
+
 RELEASE 0.45
 =================
 * Incorporate patches from 0.44-1-mingw32 release
+* Reinstate binary distribution for mingw32 host only;
+  (distributed source is host-agnostic).
 
 RELEASE 0.44
 =================

https://sf.net/p/mingw/pexports/ci/06429d0f083c146cf13a46327668746635900590/

commit 06429d0f083c146cf13a46327668746635900590
Author: Keith Marshall <keithmarshall@users.sourceforge.net>
Date:   Thu May 30 21:07:47 2013 +0100

    Assemble licence and documentation tarballs for distribution.

diff --git a/ChangeLog b/ChangeLog
index 00a4633..07dbadd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2013-05-30  Keith Marshall  <keithmarshall@users.sourceforge.net>
+
+	Assemble licence and documentation tarballs for distribution.
+
+	* Makefile.in (dist): Add dependencies on...
+	(licdist, docdist): ...these new build goals; specify them based on...
+	(LIC_DISTFILES, DOC_DISTFILES): ...these new macros; define them as
+	the respective list of files to include in each tarball.
+
 2013-05-29  Keith Marshall  <keithmarshall@users.sourceforge.net>
 
 	Force a remake, on package version updates.
diff --git a/Makefile.in b/Makefile.in
index 4b06680..138fcd0 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -63,6 +63,14 @@ AUX_DISTFILES = \
 #
 BIN_DISTFILES = pexports$(EXEEXT)
 
+# Files to be included in a documentation tarball.
+#
+DOC_DISTFILES = README ChangeLog
+
+# Files to be included in a licence tarball.
+#
+LIC_DISTFILES = COPYING
+
 OBJECT_FILES = \
   hlex.$(OBJEXT) hparse.$(OBJEXT) pexports.$(OBJEXT) str_tree.$(OBJEXT)
 
@@ -119,7 +127,7 @@ uninstall:
 
 # Distribution.
 #
-dist: srcdist bindist
+dist: srcdist bindist docdist licdist
 
 abs_top_srcdir = @abs_top_srcdir@
 
@@ -149,6 +157,26 @@ bindist: $(BIN_DISTFILES)
 	cd tmp && tar -chof - bin | xz > ../$(PACKAGE_DISTNAME)-bin.tar.xz
 	$(RM) -r tmp
 
+docdist:
+	$(RM) -r tmp
+	$(MKDIR_P) tmp/share/doc/$(PACKAGE_TARNAME)/$(PACKAGE_VERSION)
+	cd tmp/share/doc/$(PACKAGE_TARNAME)/$(PACKAGE_VERSION) && \
+	for file in $(DOC_DISTFILES); \
+	  do $(LN_S) ${abs_top_srcdir}/$$file .; \
+	  done
+	cd tmp && tar -chof - share | xz > ../$(PACKAGE_DISTNAME)-doc.tar.xz
+	$(RM) -r tmp
+
+licdist:
+	$(RM) -r tmp
+	$(MKDIR_P) tmp/share/doc/$(PACKAGE_TARNAME)/$(PACKAGE_VERSION)
+	cd tmp/share/doc/$(PACKAGE_TARNAME)/$(PACKAGE_VERSION) && \
+	for file in $(LIC_DISTFILES); \
+	  do $(LN_S) ${abs_top_srcdir}/$$file .; \
+	  done
+	cd tmp && tar -chof - share | xz > ../$(PACKAGE_DISTNAME)-lic.tar.xz
+	$(RM) -r tmp
+
 # Clean-up.
 #
 mostlyclean clean:

https://sf.net/p/mingw/pexports/ci/4888aed797c9b7afd63c14c74f8599c228608997/

commit 4888aed797c9b7afd63c14c74f8599c228608997
Author: Keith Marshall <keithmarshall@users.sourceforge.net>
Date:   Tue Sep 15 06:06:00 2009 +0100

    Unpublished release.

diff --git a/.hgtags b/.hgtags
new file mode 100644
index 0000000..5598d21
--- /dev/null
+++ b/.hgtags
@@ -0,0 +1 @@
+6dd98480346eeb4f94a16696d652412374917b07 v0_45

-----------------------------------------------------------------------

Summary of changes:
 .hgtags     |    2 ++
 ChangeLog   |   16 ++++++++++++++++
 Makefile.in |   30 +++++++++++++++++++++++++++++-
 README      |   14 ++++++++++++--
 4 files changed, 59 insertions(+), 3 deletions(-)
 create mode 100644 .hgtags


hooks/post-receive
-- 
Repository: pexports



------------------------------

Message: 2
Date: Thu, 30 May 2013 20:18:31 +0000
From: "Keith Marshall" <noreply@sourceforge.net>
Subject: [MinGW-cvs] [git push pexports]Repository: pexports tag,
	v0_45,	created. v0_44-2-g59648a7
To: mingw-cvs@lists.sourceforge.net
Message-ID:
	<mailman.32187.1370380912.12996.mingw-cvs@lists.sourceforge.net>

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Repository: pexports".

The tag, v0_45 has been created
        at  59648a78f4d8b6e11a914a426368484eb33ac7de (commit)

- Log -----------------------------------------------------------------
commit 59648a78f4d8b6e11a914a426368484eb33ac7de
Author: Charles Wilson <cwilso11@users.sourceforge.net>
Date:   Tue Sep 15 06:05:46 2009 +0000

    Slight build improvements
-----------------------------------------------------------------------


hooks/post-receive
-- 
Repository: pexports



------------------------------

Message: 3
Date: Thu, 30 May 2013 20:18:34 +0000
From: "Keith Marshall" <noreply@sourceforge.net>
Subject: [MinGW-cvs] [git push pexports]Repository: pexports tag,
	v0_46,	created. v0_44-12-g6595f89
To: mingw-cvs@lists.sourceforge.net
Message-ID:
	<mailman.32188.1370380912.12996.mingw-cvs@lists.sourceforge.net>

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Repository: pexports".

The tag, v0_46 has been created
        at  6595f896f2e6e7783a39108ad37055d31e2410a7 (commit)

- Log -----------------------------------------------------------------
commit 6595f896f2e6e7783a39108ad37055d31e2410a7
Author: Keith Marshall <keithmarshall@users.sourceforge.net>
Date:   Thu May 30 21:15:16 2013 +0100

    Prepare, tag, and publish 0.46 release.
-----------------------------------------------------------------------


hooks/post-receive
-- 
Repository: pexports



------------------------------

Message: 4
Date: Thu, 30 May 2013 22:07:46 +0000
From: "Keith Marshall" <noreply@sourceforge.net>
Subject: [MinGW-cvs] [git push mingw-dist]Repository: mingw-dist
	branch,	master, updated. e0b404737a39ee35d0e21388ff0d60138ceedf28
To: mingw-cvs@lists.sourceforge.net
Message-ID:
	<mailman.32189.1370380912.12996.mingw-cvs@lists.sourceforge.net>

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  e0b404737a39ee35d0e21388ff0d60138ceedf28 (commit)
      from  61cb86cd6e438bd4065005d4a2bc9a3c500b0d54 (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/e0b404737a39ee35d0e21388ff0d60138ceedf28/

commit e0b404737a39ee35d0e21388ff0d60138ceedf28
Author: Keith Marshall <keithmarshall@users.sourceforge.net>
Date:   Thu May 30 23:07:34 2013 +0100

    Update and publish pexports.

diff --git a/ChangeLog b/ChangeLog
index 06b5d4d..37f3b2a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2013-05-30  Keith Marshall  <keithmarshall@users.sourceforge.net>
+
+	Update and publish pexports.
+
+	* mingw32/mingw32-pexports.xml: Add references for release 0.46.
+	* package-list.xml.lzma mingw32-package-list.xml.lzma: Regenerated.
+	* common/issue.log mingw32/issue.log: Updated accordingly.
+
 2013-04-21  Keith Marshall  <keithmarshall@users.sourceforge.net>
 
 	Add issue number references to all package lists.
diff --git a/common/issue.log b/common/issue.log
index 82463a0..e19be2b 100644
--- a/common/issue.log
+++ b/common/issue.log
@@ -23,6 +23,6 @@
 # MinGW Project, accept liability for any damages, however caused,
 # arising from the use of this software.
 #
-  75fc52dde8d408d798c0be51070d5d02f4c63085 2013042101 package-list.xml
+  75fc52dde8d408d798c0be51070d5d02f4c63085 2013053000 package-list.xml
 #
 # $RCSfile$: end of file
diff --git a/mingw32/issue.log b/mingw32/issue.log
index 7a4f79b..10c52f9 100644
--- a/mingw32/issue.log
+++ b/mingw32/issue.log
@@ -50,8 +50,8 @@
   cd33ad74b608bce33ea297801253e6efbafce27c 2012073100 mingw32-mingw-utils.xml
   d31c39c6584fde6d4b9ddafbca913509b32a1dfc 2012073100 mingw32-mpc.xml
   99995a8e17659b6514f71ae2b17bbbcd8eb4c0a9 2012073100 mingw32-mpfr.xml
-  983af8ad24a6f97da867784dfeeecc6661d54d88 2013042100 mingw32-package-list.xml
-  40c94ac07003ac8f36558a8c33581a748ec03e3a 2012073100 mingw32-pexports.xml
+  983af8ad24a6f97da867784dfeeecc6661d54d88 2013053000 mingw32-package-list.xml
+  bad22da9b9ec9bcea1d539e29ee2976cc88d9fc2 2013053000 mingw32-pexports.xml
   cdb2a4dbedfc9f2cdfc92340f6f9b12da061c0d9 2012073100 mingw32-popt.xml
   9399cb6c2efd8fd907c42a278a6f41bbde9e440c 2011091400 mingw32-pthreads-w32.xml
   428964289b3509293a13c9394199b5e2d4887c3e 2012063001 mingw32-runtime.xml
diff --git a/mingw32/mingw32-pexports.xml b/mingw32/mingw32-pexports.xml
index d759471..2a1a774 100644
--- a/mingw32/mingw32-pexports.xml
+++ b/mingw32/mingw32-pexports.xml
@@ -32,17 +32,20 @@
       <source tarname="pexports-%-mingw32-%-src.tar.%" />
 
       <component class="bin">
+        <release tarname="pexports-0.46-mingw32-bin.tar.xz" />
+        <release tarname="pexports-0.44-1-mingw32-bin.tar.lzma" />
         <requires eq="mingw32-gcc-core-*-mingw32-*-bin.tar" />
         <requires eq="mingw32-mingwrt-*-mingw32-*-dev.tar" />
         <requires eq="mingw32-w32api-*-mingw32-*-dev.tar" />
-        <release tarname="pexports-0.44-1-mingw32-bin.tar.lzma" />
       </component>
 
       <component class="doc">
+        <release tarname="pexports-0.46-mingw32-doc.tar.xz" />
         <release tarname="pexports-0.44-1-mingw32-doc.tar.lzma" />
       </component>
 
       <component class="lic">
+        <release tarname="pexports-0.46-mingw32-lic.tar.xz" />
         <release tarname="pexports-0.44-1-mingw32-lic.tar.lzma" />
       </component>
     </package>

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                    |    8 ++++++++
 common/issue.log             |    2 +-
 mingw32/issue.log            |    4 ++--
 mingw32/mingw32-pexports.xml |    5 ++++-
 4 files changed, 15 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
Repository: mingw-dist



------------------------------

Message: 5
Date: Tue,  4 Jun 2013 21:21:49 +0000
From: "Earnie Boyd" <noreply@sourceforge.net>
Subject: [MinGW-cvs] [git push mingw-org-wsl]Repository: mingw-org-wsl
	branch, 4.0-dev, updated. da60fde74476b9b27760f4b62898334cb54a92a1
To: mingw-cvs@lists.sourceforge.net
Message-ID:
	<mailman.32190.1370380912.12996.mingw-cvs@lists.sourceforge.net>

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, 4.0-dev has been updated
       via  da60fde74476b9b27760f4b62898334cb54a92a1 (commit)
       via  f908a898ecd5286ac1bd056a0633ab63fa33cec4 (commit)
      from  88b527ac9d701fc36f8357a58d10279ff6fc0175 (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/da60fde74476b9b27760f4b62898334cb54a92a1/

commit da60fde74476b9b27760f4b62898334cb54a92a1
Author: Earnie Boyd <earnie@users.sourceforge.net>
Date:   Tue Jun 4 16:55:39 2013 -0400

    Header file dependencies required inclusions to be above the file guard.

diff --git a/ChangeLog b/ChangeLog
index fe71f0f..7ad82cf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -31,6 +31,9 @@
 	* include/wchar.h (_wctime32): Create _CRTALIAS when MSVCRT_VERSION
 	< 800.
 	(_wfindfirst32, _wfindnext32): Create _CRTALIAS.
+	* include/objdump.h: Move include of rpc.h and rpcndr.h due to
+	dependencies.
+	* include/rpc.h: Move include of windows.h due to dependencies.
 
 2013-05-28  Earnie Boyd  <earnie@users.sourceforge.net>
 
diff --git a/include/objbase.h b/include/objbase.h
index 0d94117..6b89d48 100644
--- a/include/objbase.h
+++ b/include/objbase.h
@@ -8,11 +8,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
@@ -21,16 +21,16 @@
  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  * DEALINGS IN THE SOFTWARE.
  */
+/* Include here to prevent circular dependencies if windows.h not already
+ * included. ** DO NOT MOVE TO GUARD ** */
+#include <rpc.h>
+#include <rpcndr.h>
+
 #ifndef _OBJBASE_H
 #define _OBJBASE_H
 #pragma GCC system_header
 #include <_mingw.h>
 
-/* Include here to prevent circular dependencies if windows.h
-   not already included */
-#include <rpc.h>
-#include <rpcndr.h>
-
 #include <stdlib.h>
 #pragma pack(push,8)
 #include <basetyps.h>
@@ -74,9 +74,9 @@
 #define COM_RIGHTS_SAFE_FOR_SCRIPTING 2
 #define STGOPTIONS_VERSION 2
 typedef enum tagSTGFMT {
-	STGFMT_STORAGE = 0, 
-	STGFMT_FILE = 3, 
-	STGFMT_ANY = 4, 
+	STGFMT_STORAGE = 0,
+	STGFMT_FILE = 3,
+	STGFMT_ANY = 4,
 	STGFMT_DOCFILE = 5
 } STGFMT;
 typedef struct tagSTGOPTIONS {
diff --git a/include/rpc.h b/include/rpc.h
index b963fdd..e7a5637 100644
--- a/include/rpc.h
+++ b/include/rpc.h
@@ -8,11 +8,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
@@ -21,15 +21,17 @@
  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  * DEALINGS IN THE SOFTWARE.
  */
+/* Include here to prevent circular dependencies if windows.h not already
+ * included. ** DO NOT MOVE TO GUARD ** */
+#ifndef RPC_NO_WINDOWS_H
+#include <windows.h>
+#endif
+
 #ifndef _RPC_H
 #define _RPC_H
 #pragma GCC system_header
 #include <_mingw.h>
 
-#ifndef RPC_NO_WINDOWS_H
-#include <windows.h>
-#endif
-
 #ifdef __cplusplus
 extern "C" {
 #endif

https://sf.net/p/mingw/mingw-org-wsl/ci/f908a898ecd5286ac1bd056a0633ab63fa33cec4/

commit f908a898ecd5286ac1bd056a0633ab63fa33cec4
Author: Earnie Boyd <earnie@users.sourceforge.net>
Date:   Tue Jun 4 15:50:27 2013 -0400

    Modifications for _USE_32BIT_TIME_T issue.

diff --git a/ChangeLog b/ChangeLog
index 90e68b5..fe71f0f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,37 @@
+2013-06-04  Earnie Boyd  <earnie@users.sourceforge.net>
+
+	* include/_mingw.h (MSVCRT_VERSION): Determine a value based on the
+	_WIN32_WINNT value. Add a TODO for check to see if the older
+	__MSVCRT_VERSION__ macro is defined and use it as the value for
+	MSVCRT_VERSION.  Give an error if both MSVCRT_VERSION and
+	__MSVCRT_VERSION__ are defined and the values do not match.
+	Remove warnings for value when _USE_32BIT_TIME_T is defined.
+	* include/io.h (_wfindfirst32, _wfindfirst64): Correct declaration of
+	parameter data type. Create _CRTALIAS rather than declaring _CRTIMP.
+	(_findfirst32(), _findnext32()): Create _CRTALIAS rather than declaring
+	a _CRTIMP.
+	(_findfirst64i32, _findfirst32i64, _findnext64i32, _findnext32i64):
+	Remove the _CRTIMP from the declaration, these become inline functions.
+	Also guard for __NO_INLINE__ and make appropriate defined alternatives.
+	(_wfindfirst64i32, _wfindfirst32i64, _wfindnext64i32, _wfindnext32i64):
+	Ditto.
+	* include/sdkddkver.h (_WIN32_WINNT_WIN8): Add definition.
+	* include/sys/stat.h (_stat32, _fstat32, _wstat32): Define as a
+	_CRTALIAS.
+	(_fstat32i64, _stat32i64, _wstat32i64): Add as __CRT_INLINE functions
+	and make appropriate alternative macros for __NO_INLINE__ use.
+	* include/sys/timeb.h (_time32): Create _CRTALIAS when MSVCRT_VERSION
+	< 800.
+	* include/sys/types.h (MSVCRT_VERSION): Remove guard for >= 800 with
+	_USE_32BIT_TIME_T.
+	* include/time.h (_time32, _difftime32, _mktime32, _ctime32, _gmtime32,
+	_localtime32, _wctime32): Create _CRTALIAS when MSVCRT_VERSION < 800.
+	(_difftime64, _mkgtime64): Guard declaration for MSVCRT_VERSION > 800.
+	These functions do not exist in MSVCRT.DLL before Vista.
+	* include/wchar.h (_wctime32): Create _CRTALIAS when MSVCRT_VERSION
+	< 800.
+	(_wfindfirst32, _wfindnext32): Create _CRTALIAS.
+
 2013-05-28  Earnie Boyd  <earnie@users.sourceforge.net>
 
 	* include/time.h: Correct use of MSVCRT_VERSION.
diff --git a/include/_mingw.h b/include/_mingw.h
index 4d58f57..4706ddb 100644
--- a/include/_mingw.h
+++ b/include/_mingw.h
@@ -243,6 +243,21 @@
 # endif
 #endif
 
+/* @TODO: Need to convert __MSVCRT_VERSION__ value to MSVCRT_VERSION value.
+ * HEX to DECIMAL will not work. */
+#if 0
+#ifdef __MSVCRT_VERSION__
+#ifdef MSVCRT_VERSION
+#if MSVCRT_VERSION != __MSVCRT_VERSION__
+#error You have specified __MSVCRT_VERSION__ and MSVCRT_VERSION and they are \
+not equal.
+#endif /* MSVCRT_VERSION != __MSVCRT_VERSION__ */
+#else /* ndef MSVCRT_VERSION */
+#define MSVCRT_VERSION __MSVCRT_VERSION__
+#endif /* MSVCRT_VERSION */
+#endif /* __MSVCRT_VERSION__ */
+#endif /* 0 */
+
 /*
  * We need to set a default MSVCRT_VERSION which describes the MSVCRT.DLL on
  * the users system.  We are defaulting to XP but we recommend the user define
@@ -255,16 +270,22 @@
  * WIN8 = 1010
  */
 #ifndef MSVCRT_VERSION
+#if _WIN32_WINNT >= _WIN32_WINNT_WIN8
+#define MSVCRT_VERSION 1010
+#elif _WIN32_WINNT >= _WIN32_WINNT_WIN7
+#define MSVCRT_VERSION 900
+#elif _WIN32_WINNT >= _WIN32_WINNT_VISTA
+#define MSVCRT_VERSION 800
+#elif _WIN32_WINNT >= _WIN32_WINNT_WINXP
 #define MSVCRT_VERSION 710
-#endif
-
-#ifdef _USE_32BIT_TIME_T
-#if MSVCRT_VERSION < 800
-#warning Your MSVCRT_VERSION does not support the use of _USE_32BIT_TIME_T.
-#warning You should define MSVCRT_VERSION based on your MSVCRT.DLL version.
-#warning ME = 600, XP = 710, VISTA = 800, WIN7 = 900 and WIN8 = 1010.
-#endif /* MSVCRT_VERSION < 800 */
-#endif /* _USE_32BIT_TIME_T */
+#elif _WIN32_WINNT >= _WIN32_WINNT_WIN2K
+#define MSVCRT_VERSION 700
+#elif _WIN32_WINNT >= _WIN32_WINNT_WINME
+#define MSVCRT_VERSION 600
+#else
+#define MSVCRT_VERSION 700
+#endif /* _WIN32_WINNT >= _WIN32_WINNT_WINME */
+#endif /* ndef MSVCRT_VERSION */
 
 struct threadlocalinfostruct;
 struct threadmbinfostruct;
diff --git a/include/io.h b/include/io.h
index f86f883..6581094 100644
--- a/include/io.h
+++ b/include/io.h
@@ -8,11 +8,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
@@ -109,26 +109,7 @@ struct _finddata64i32_t {
 	_fsize_t	size;
 	char		name[FILENAME_MAX];
 };
-#if defined(_HAVE_32BIT_TIME_T)
-#if defined(_USE_32BIT_TIME_T)
-#define _finddata_t _finddata32_t
-#define _finddatai64_t _finddata32i64_t
-#define _findfirst _findfirst32
-#define _findnext _findnext32
-#define _findfirsti64 _findfirst32i64
-#define _findnexti64 _findnext32i64
-#else /* !_USE_32BIT_TIME_T */
-#define _finddata_t _finddata64i32_t
-#define _finddatai64_t __finddata64_t
-#define _findfirst _findfirst64i32
-#define _findnext _findnext64i32
-#define _findfirsti64 _findfirst64
-#define _findnexti64 _findnext64
-#endif /* _USE_32BIT_TIME_T */
-#else /* !_HAVE_32BIT_TIME_T */
-#define _finddata_t _finddata64i32_t
-#define _finddatai64_t __finddata64_t
-#endif /* _HAVE_32BIT_TIME_T */
+
 #define _FINDDATA_T_DEFINED
 #endif /* !_FINDDATA_T_DEFINED */
 
@@ -169,26 +150,6 @@ struct _wfinddata64i32_t {
 	__int32		size;
 	wchar_t		name[FILENAME_MAX];
 };
-#if defined(_HAVE_32BIT_TIME_T)
-#if defined(_USE_32BIT_TIME_T)
-#define _wfinddata_t _wfinddata32_t
-#define _wfinddatai64_t _wfinddata32i64_t
-#define _wfindfirst _wfindfirst32
-#define _wfindnext _wfindnext32
-#define _wfindfirsti64 _wfindfirst32i64
-#define _wfindnexti64 _wfindnext32i64
-#else /* ! _USE_32BIT_TIME_T */
-#define _wfinddata_t _wfinddata64i32_t
-#define _wfinddatai64_t _wfinddata64_t
-#define _wfindfirst _wfindfirst64i32
-#define _wfindnext _wfindnext64i32
-#define _wfindfirsti64 _wfindfirst64
-#define _wfindnexti64 _wfindnext64
-#endif /* _USE_32BIT_TIME_T */
-#else /* ! _HAVE_32BIT_TIME_T */
-#define _wfinddata_t _wfinddata64i32_t
-#define _wfinddatai64_t _wfinddata64_t
-#endif /* _HAVE_32BIT_TIME_T */
 #define _WFINDDATA_T_DEFINED
 #endif /* ! _WFINDDATA_T_DEFINED */
 
@@ -211,8 +172,8 @@ intptr_t _findfirst32i64 (const char *filespec,struct \
_finddata32i64_t *fileinfo  intptr_t _findfirst64i32 (const char *filespec,struct \
_finddata64i32_t *fileinfo);  
 intptr_t _wfindfirst     (const wchar_t *filespec,struct _wfinddata_t *fileinfo);
-intptr_t _wfindfirst32   (const wchar_t *filespec,struct __wfinddata32_t *fileinfo);
-intptr_t _wfindfirst64   (const wchar_t *filespec, struct __wfinddata64_t   \
*fileinfo); +intptr_t _wfindfirst32   (const wchar_t *filespec,struct _wfinddata32_t \
*fileinfo); +intptr_t _wfindfirst64   (const wchar_t *filespec, struct _wfinddata64_t \
*fileinfo);  intptr_t _wfindfirsti64  (const wchar_t *filespec, struct \
_wfinddatai64_t   *fileinfo);  intptr_t _wfindfirst32i64(const wchar_t *filespec, \
struct _wfinddata32i64_t *fileinfo);  intptr_t _wfindfirst64i32(const wchar_t \
*filespec, struct _wfinddata64i32_t *fileinfo); @@ -243,8 +204,16 @@ \
                _wfindfirst64i32	definition
 */
 
 _CRTIMP int __cdecl __MINGW_NOTHROW _findclose (intptr_t);
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _findfirst32 (const char*, struct \
                _finddata32_t*);
-_CRTIMP int  __cdecl __MINGW_NOTHROW	_findnext32 (intptr_t, struct _finddata32_t*);
+
+/* _findfirst32 and _findnext32 do not exist in MSVCRT.DLL */
+_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _findfirst (const char*, struct \
_finddata32_t*); +_CRTALIAS intptr_t __cdecl __MINGW_NOTHROW _findfirst32 (const \
char* _v1, struct _finddata32_t* _v2) { +    return _findfirst(_v1, _v2);
+}
+_CRTIMP int  __cdecl __MINGW_NOTHROW _findnext (intptr_t, struct _finddata32_t*);
+_CRTALIAS int  __cdecl __MINGW_NOTHROW	_findnext32 (intptr_t _v1, struct \
_finddata32_t* _v2) { +    return _findnext(_v1, _v2);
+}
 
 _CRTIMP int __cdecl __MINGW_NOTHROW _chdir (const char*);
 _CRTIMP char* __cdecl __MINGW_NOTHROW _getcwd (char*, int);
@@ -257,16 +226,87 @@ _CRTIMP int __cdecl __MINGW_NOTHROW _findnexti64(intptr_t, \
struct _finddatai64_t  _CRTIMP __int64 __cdecl __MINGW_NOTHROW _lseeki64(int, \
__int64, int);  _CRTIMP __int64 __cdecl __MINGW_NOTHROW _telli64(int);
 _CRTIMP intptr_t __cdecl __MINGW_NOTHROW _findfirst64(const char*, struct \
                __finddata64_t*);
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _findfirst32i64(const char*, struct \
                _finddata32i64_t*);
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _findfirst64i32(const char*, struct \
_finddata64i32_t*); +intptr_t __cdecl __MINGW_NOTHROW _findfirst32i64(const char*, \
struct _finddata32i64_t*); +intptr_t __cdecl __MINGW_NOTHROW _findfirst64i32(const \
char*, struct _finddata64i32_t*);  _CRTIMP int __cdecl __MINGW_NOTHROW \
                _findnext64(intptr_t, struct __finddata64_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _findnext32i64(intptr_t, struct \
                _finddata32i64_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _findnext64i32(intptr_t, struct \
_finddata64i32_t*); +int __cdecl __MINGW_NOTHROW _findnext32i64(intptr_t, struct \
_finddata32i64_t*); +int __cdecl __MINGW_NOTHROW _findnext64i32(intptr_t, struct \
_finddata64i32_t*); +
+#ifndef __NO_INLINE__
+#include <string.h>
+__CRT_INLINE __cdecl __MINGW_NOTHROW intptr_t _findfirst32i64(const char* _filename, \
struct _finddata32i64_t* _fdata) { +    struct __finddata64_t fd;
+    intptr_t ret = _findfirst64(_filename, &fd);
+    if (ret == -1) {
+        memset(_fdata, 0, sizeof(struct __finddata64_t));
+        return ret;
+    }
+    _fdata->attrib = fd.attrib;
+    _fdata->time_create = (__time32_t)fd.time_create;
+    _fdata->time_access = (__time32_t)fd.time_access;
+    _fdata->time_write  = (__time32_t)fd.time_write;
+    _fdata->size        = fd.size;
+    strncpy(_fdata->name, fd.name, FILENAME_MAX);
+    return ret;
+}
+
+__CRT_INLINE __cdecl __MINGW_NOTHROW intptr_t _findfirst64i32(const char* _filename, \
struct _finddata64i32_t* _fdata) { +    struct _finddata32_t fd;
+    intptr_t ret = _findfirst32(_filename, &fd);
+    if (ret == -1) {
+        memset(_fdata, 0, sizeof(struct _finddata32_t));
+        return ret;
+    }
+    _fdata->attrib = fd.attrib;
+    _fdata->time_create = (__time64_t)fd.time_create;
+    _fdata->time_access = (__time64_t)fd.time_access;
+    _fdata->time_write  = (__time64_t)fd.time_write;
+    _fdata->size        = fd.size;
+    strncpy(_fdata->name, fd.name, FILENAME_MAX);
+    return ret;
+}
+
+__CRT_INLINE __cdecl __MINGW_NOTHROW intptr_t _findnext32i64(intptr_t _fp, struct \
_finddata32i64_t* _fdata) { +    struct __finddata64_t fd;
+    int ret = _findnext64(_fp,&fd);
+    if (ret == -1) {
+      memset(_fdata, 0, sizeof(struct _finddata32i64_t));
+      return ret;
+    }
+    _fdata->attrib = fd.attrib;
+    _fdata->time_create = (__time32_t)fd.time_create;
+    _fdata->time_access = (__time32_t)fd.time_access;
+    _fdata->time_write  = (__time32_t)fd.time_write;
+    _fdata->size        = fd.size;
+    strncpy(_fdata->name, fd.name, FILENAME_MAX);
+    return ret;
+}
+
+__CRT_INLINE __cdecl __MINGW_NOTHROW intptr_t _findnext64i32(intptr_t _fp, struct \
_finddata64i32_t* _fdata) { +    struct _finddata32_t fd;
+    int ret = _findnext32(_fp, &fd);
+    if (ret == -1) {
+      memset(_fdata, 0, sizeof(struct _finddata64i32_t));
+      return ret;
+    }
+    _fdata->attrib = fd.attrib;
+    _fdata->time_create = (__time64_t)fd.time_create;
+    _fdata->time_access = (__time64_t)fd.time_access;
+    _fdata->time_write  = (__time64_t)fd.time_write;
+    _fdata->size        = fd.size;
+    strncpy(_fdata->name, fd.name, FILENAME_MAX);
+    return ret;
+}
+#else /* def __NO_INLINE__ */
+#define _findfirst64i32 _findfirst64
+#define _findfirst32i64 _findfirst32
+#define _findnext64i32 _findnext64
+#define _findnext32i64 _findnext32
+#endif /* ndef __NO_INLINE__ */
 
 #ifndef __NO_MINGW_LFS
 __CRT_INLINE off64_t lseek64 (int, off64_t, int);
-__CRT_INLINE off64_t lseek64 (int fd, off64_t offset, int whence)
-{
+__CRT_INLINE off64_t lseek64 (int fd, off64_t offset, int whence) {
   return _lseeki64(fd, (__int64) offset, whence);
 }
 #endif
@@ -296,7 +336,7 @@ _CRTIMP int __cdecl __MINGW_NOTHROW chmod (const char*, int);
  * it doesn't seem to hurt to add them). */
 #define	F_OK	0	/* Check for file existence */
 /* Well maybe it does hurt.  On newer versions of MSVCRT, an access mode
-   of 1 causes invalid parameter error. */   
+   of 1 causes invalid parameter error. */
 #define	X_OK	1	/* MS access() doesn't check for execute permission. */
 #define	W_OK	2	/* Check for write permission */
 #define	R_OK	4	/* Check for read permission */
@@ -360,22 +400,116 @@ _CRTIMP int __cdecl __MINGW_NOTHROW _write (int, const void*, \
unsigned int);  
 /* Wide character versions. Also declared in wchar.h. */
 #if !defined (_WIO_DEFINED)
+#define _WIO_DEFINED
 _CRTIMP int __cdecl __MINGW_NOTHROW _waccess(const wchar_t*, int);
 _CRTIMP int __cdecl __MINGW_NOTHROW _wchmod(const wchar_t*, int);
 _CRTIMP int __cdecl __MINGW_NOTHROW _wcreat(const wchar_t*, int);
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wfindfirst32 (const wchar_t*, struct \
                __wfinddata32_t*);
-_CRTIMP int  __cdecl __MINGW_NOTHROW	_wfindnext32 (intptr_t, struct \
__wfinddata32_t*); +
+/* _wfindfirst32 and _wfindnext32 do not exist in MSVCRT.DLL */
+_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wfindfirst (const wchar_t*, struct \
_wfinddata32_t*); +intptr_t __cdecl __MINGW_NOTHROW _wfindfirst32 (const wchar_t*, \
struct _wfinddata32_t*); +_CRTALIAS intptr_t __cdecl __MINGW_NOTHROW _wfindfirst32 \
(const wchar_t* _v1, struct _wfinddata32_t* _v2) { +    return _wfindfirst(_v1, _v2);
+}
+_CRTIMP int  __cdecl __MINGW_NOTHROW _wfindnext (intptr_t, struct _wfinddata32_t*);
+int  __cdecl __MINGW_NOTHROW	_wfindnext32 (intptr_t, struct _wfinddata32_t*);
+_CRTALIAS int  __cdecl __MINGW_NOTHROW	_wfindnext32 (intptr_t _v1, struct \
_wfinddata32_t* _v2) { +    return _wfindnext(_v1, _v2);
+}
+
 _CRTIMP int __cdecl __MINGW_NOTHROW _wunlink(const wchar_t*);
 _CRTIMP int __cdecl __MINGW_NOTHROW _wopen(const wchar_t*, int, ...);
 _CRTIMP int __cdecl __MINGW_NOTHROW _wsopen(const wchar_t*, int, int, ...);
 _CRTIMP wchar_t * __cdecl __MINGW_NOTHROW _wmktemp(wchar_t*);
 _CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wfindfirst64(const wchar_t*, struct \
                _wfinddata64_t*);
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wfindfirst32i64 (const wchar_t*, struct \
                _wfinddata32i64_t*);
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wfindfirst64i32 (const wchar_t*, struct \
_wfinddata64i32_t*); +intptr_t __cdecl __MINGW_NOTHROW _wfindfirst32i64 (const \
wchar_t*, struct _wfinddata32i64_t*); +intptr_t __cdecl __MINGW_NOTHROW \
_wfindfirst64i32 (const wchar_t*, struct _wfinddata64i32_t*);  _CRTIMP int __cdecl \
                __MINGW_NOTHROW _wfindnext64(intptr_t, struct _wfinddata64_t*);
-_CRTIMP int  __cdecl __MINGW_NOTHROW	_wfindnext32i64 (intptr_t, struct \
                _wfinddata32i64_t*);
-_CRTIMP int  __cdecl __MINGW_NOTHROW	_wfindnext64i32 (intptr_t, struct \
                _wfinddata64i32_t*);
-#define _WIO_DEFINED
+int  __cdecl __MINGW_NOTHROW	_wfindnext32i64 (intptr_t, struct _wfinddata32i64_t*);
+int  __cdecl __MINGW_NOTHROW	_wfindnext64i32 (intptr_t, struct _wfinddata64i32_t*);
+
+#ifndef __NO_INLINE__
+#include <string.h>
+__CRT_INLINE __cdecl __MINGW_NOTHROW intptr_t _wfindfirst32i64(const wchar_t* \
_filename, struct _wfinddata32i64_t* _fdata) { +    struct _wfinddata64_t fd;
+    intptr_t ret = _wfindfirst64(_filename, &fd);
+    if (ret == -1) {
+        memset(_fdata, 0, sizeof(struct _wfinddata64_t));
+        return ret;
+    }
+    _fdata->attrib = fd.attrib;
+    _fdata->time_create = (__time32_t)fd.time_create;
+    _fdata->time_access = (__time32_t)fd.time_access;
+    _fdata->time_write  = (__time32_t)fd.time_write;
+    _fdata->size        = fd.size;
+    wcsncpy(_fdata->name, fd.name, FILENAME_MAX);
+    return ret;
+}
+
+__CRT_INLINE __cdecl __MINGW_NOTHROW intptr_t _wfindfirst64i32(const wchar_t* \
_filename, struct _wfinddata64i32_t* _fdata) { +    struct _wfinddata32_t fd;
+    intptr_t ret = _wfindfirst32(_filename, &fd);
+    if (ret == -1) {
+        memset(_fdata, 0, sizeof(struct _wfinddata32_t));
+        return ret;
+    }
+    _fdata->attrib = fd.attrib;
+    _fdata->time_create = (__time64_t)fd.time_create;
+    _fdata->time_access = (__time64_t)fd.time_access;
+    _fdata->time_write  = (__time64_t)fd.time_write;
+    _fdata->size        = fd.size;
+    wcsncpy(_fdata->name, fd.name, FILENAME_MAX);
+    return ret;
+}
+
+__CRT_INLINE __cdecl __MINGW_NOTHROW intptr_t _wfindnext32i64(intptr_t _fp, struct \
_wfinddata32i64_t* _fdata) { +    struct _wfinddata64_t fd;
+    int ret = _wfindnext64(_fp,&fd);
+    if (ret == -1) {
+      memset(_fdata, 0, sizeof(struct _wfinddata32i64_t));
+      return ret;
+    }
+    _fdata->attrib = fd.attrib;
+    _fdata->time_create = (__time32_t)fd.time_create;
+    _fdata->time_access = (__time32_t)fd.time_access;
+    _fdata->time_write  = (__time32_t)fd.time_write;
+    _fdata->size        = fd.size;
+    wcsncpy(_fdata->name, fd.name, FILENAME_MAX);
+    return ret;
+}
+
+__CRT_INLINE __cdecl __MINGW_NOTHROW intptr_t _wfindnext64i32(intptr_t _fp, struct \
_wfinddata64i32_t* _fdata) { +    struct _wfinddata32_t fd;
+    int ret = _wfindnext32(_fp, &fd);
+    if (ret == -1) {
+      memset(_fdata, 0, sizeof(struct _wfinddata64i32_t));
+      return ret;
+    }
+    _fdata->attrib = fd.attrib;
+    _fdata->time_create = (__time64_t)fd.time_create;
+    _fdata->time_access = (__time64_t)fd.time_access;
+    _fdata->time_write  = (__time64_t)fd.time_write;
+    _fdata->size        = fd.size;
+    wcsncpy(_fdata->name, fd.name, FILENAME_MAX);
+    return ret;
+}
+
+#else /* def __NO_INLINE__ */
+#define _findfirst64i32 _findfirst64
+#define _finddata64i32_t __finddata64_t
+#define _findfirst32i64 _findfirst32
+#define _finddata32i64_t _finddata32_t
+#define _findnext64i32 _findnext64
+#define _findnext32i64 _findnext32
+
+#define _wfindfirst64i32 _wfindfirst64
+#define _wfindnext64i32 _wfindnext64
+#define _wfinddata64i32_t _wfinddata64_t
+#define _wfindfirst32i64 _wfindfirst32
+#define _wfindnext32i64 _wfindnext32
+#define _wfinddata32i64_t _wfinddata32_t
+#endif /* ndef __NO_INLINE__ */
+
 #endif /* _WIO_DEFINED */
 
 #ifndef	_NO_OLDNAMES
@@ -433,6 +567,37 @@ wchar_t * 	wmktemp(wchar_t *);
 }
 #endif
 
+#if defined(_USE_32BIT_TIME_T)
+#define _finddata_t _finddata32_t
+#define _finddatai64_t _finddata32i64_t
+#define _findfirst _findfirst32
+#define _findnext _findnext32
+#define _findfirsti64 _findfirst32i64
+#define _findnexti64 _findnext32i64
+#define _wfinddata_t _wfinddata32_t
+#define _wfinddatai64_t _wfinddata32i64_t
+#define _wfindfirst _wfindfirst32
+#define _wfindnext _wfindnext32
+#define _wfindfirsti64 _wfindfirst32i64
+#define _wfindnexti64 _wfindnext32i64
+
+#else /* !_USE_32BIT_TIME_T */
+#define _finddata_t _finddata64i32_t
+#define _finddatai64_t __finddata64_t
+#define _findfirst _findfirst64i32
+#define _findnext _findnext64i32
+#define _findfirsti64 _findfirst64
+#define _findnexti64 _findnext64
+#define _wfinddata_t _wfinddata64i32_t
+#define _wfinddatai64_t _wfinddata64_t
+#define _wfindfirst _wfindfirst64i32
+#define _wfindnext _wfindnext64i32
+#define _wfindfirsti64 _wfindfirst64
+#define _wfindnexti64 _wfindnext64
+
+#endif /* _USE_32BIT_TIME_T */
+
+
 #endif	/* Not RC_INVOKED */
 
 #endif	/* _IO_H_ not defined */
diff --git a/include/sdkddkver.h b/include/sdkddkver.h
index f674460..7040a5c 100644
--- a/include/sdkddkver.h
+++ b/include/sdkddkver.h
@@ -8,11 +8,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
@@ -57,10 +57,10 @@
  * http://msdn.microsoft.com/en-us/library/windows/desktop/aa383745(v=vs.85).aspx
  */
 #define _WIN32_WINNT_NT4          0x0400
-#define _WIN32_WINNT_NT4E	  0x0401
-#define _WIN32_WINNT_WIN95	  0x0400
-#define _WIN32_WINNT_WIN98	  0x0410
-#define _WIN32_WINNT_WINME	  0x0490
+#define _WIN32_WINNT_NT4E         0x0401
+#define _WIN32_WINNT_WIN95        0x0400
+#define _WIN32_WINNT_WIN98        0x0410
+#define _WIN32_WINNT_WINME        0x0490
 #define _WIN32_WINNT_WIN2K        0x0500
 #define _WIN32_WINNT_WINXP        0x0501
 #define _WIN32_WINNT_WS03         0x0502
@@ -69,6 +69,7 @@
 #define _WIN32_WINNT_WS08         0x0600
 #define _WIN32_WINNT_LONGORN      0x0600
 #define _WIN32_WINNT_WIN7         0x0601
+#define _WIN32_WINNT_WIN8         0x0602
 
 /**
  * Version constants defining _WIN32_IE versions.
diff --git a/include/sys/stat.h b/include/sys/stat.h
index e8b85ab..35b4023 100644
--- a/include/sys/stat.h
+++ b/include/sys/stat.h
@@ -170,33 +170,28 @@ struct _stat64i32 {
 	__time64_t	st_ctime;
 };
 
-#define __stat64 _stat64
-#if defined(_USE_32BIT_TIME_T) && MSVCRT_VERSION >= 800
-#define _fstat      _fstat32
-#define _fstati64   _fstat32i64
-#define _stat       _stat32
-#define _stati64    _stat32i64
-#else  /* !_USE_32BIT_TIME_T */
-#define _fstat      _fstat64i32
-#define _fstati64   _fstat64
-#define _stat       _stat64i32
-#define _stati64    _stat64
-#endif /* _USE_32BIT_TIME_T */
-#define _STAT_DEFINED
-#endif /* _STAT_DEFINED */
-
 #ifdef	__cplusplus
 extern "C" {
 #endif
 
+/* _stat32 does not exist in MSVCRT.DLL */
+_CRTIMP int __cdecl __MINGW_NOTHROW _stat (const char*, struct _stat32*);
+_CRTALIAS int __cdecl __MINGW_NOTHROW _stat32 (const char* _v1, struct _stat32* _v2) \
{ +  return _stat(_v1, _v2);
+}
 
-_CRTIMP int __cdecl __MINGW_NOTHROW _stat32 (const char*, struct _stat32*);
 _CRTIMP int __cdecl __MINGW_NOTHROW _stat64 (const char*, struct _stat64*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _stat32i64 (const char*, struct _stat32i64*);
+int __cdecl __MINGW_NOTHROW _stat32i64 (const char*, struct _stat32i64*);
 int __cdecl __MINGW_NOTHROW _stat64i32 (const char*, struct _stat64i32*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _fstat32 (int, struct _stat32*);
+
+/* _fstat32 does not exist in MSVCRT.DLL */
+_CRTIMP int __cdecl __MINGW_NOTHROW _fstat (int, struct _stat32*);
+_CRTALIAS int __cdecl __MINGW_NOTHROW _fstat32 (int _v1, struct _stat32* _v2) {
+    return _fstat(_v1, _v2);
+}
+
 _CRTIMP int __cdecl __MINGW_NOTHROW _fstat64 (int, struct _stat64*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _fstat32i64 (int, struct _stat32i64*);
+int __cdecl __MINGW_NOTHROW _fstat32i64 (int, struct _stat32i64*);
 int __cdecl __MINGW_NOTHROW _fstat64i32 (int, struct _stat64i32*);
 #ifndef __NO_INLINE__
 #include <string.h> /* Need memset declaration */
@@ -221,6 +216,27 @@ int __cdecl __MINGW_NOTHROW _fstat64i32 (int, struct \
_stat64i32*);  _stat->st_ctime = st.st_ctime;
     return ret;
   }
+  __CRT_INLINE int __cdecl _fstat32i64(int desc, struct _stat32i64 *_stat)
+  {
+    struct _stat32 st;
+    int ret = _fstat32(desc, &st);
+    if (ret == -1) {
+      memset(_stat, 0, sizeof(struct _stat32i64));
+      return -1;
+    }
+    _stat->st_dev = st.st_dev;
+    _stat->st_ino = st.st_ino;
+    _stat->st_mode = st.st_mode;
+    _stat->st_nlink = st.st_nlink;
+    _stat->st_uid = st.st_uid;
+    _stat->st_gid = st.st_gid;
+    _stat->st_rdev = st.st_rdev;
+    _stat->st_size = (_off_t) st.st_size;
+    _stat->st_atime = st.st_atime;
+    _stat->st_mtime = st.st_mtime;
+    _stat->st_ctime = st.st_ctime;
+    return ret;
+  }
   __CRT_INLINE int __cdecl _stat64i32(const char *fname, struct _stat64i32 *_stat)
   {
     struct _stat64 st;
@@ -242,18 +258,61 @@ int __cdecl __MINGW_NOTHROW _fstat64i32 (int, struct \
_stat64i32*);  _stat->st_ctime = st.st_ctime;
     return ret;
   }
+  __CRT_INLINE int __cdecl _stat32i64(const char *fname, struct _stat32i64 *_stat)
+  {
+    struct _stat32 st;
+    int ret = _stat32(fname, &st);
+    if (ret == -1) {
+      memset(_stat, 0, sizeof(struct _stat32i64));
+      return -1;
+    }
+    _stat->st_dev = st.st_dev;
+    _stat->st_ino = st.st_ino;
+    _stat->st_mode = st.st_mode;
+    _stat->st_nlink = st.st_nlink;
+    _stat->st_uid = st.st_uid;
+    _stat->st_gid = st.st_gid;
+    _stat->st_rdev = st.st_rdev;
+    _stat->st_size = (_off_t) st.st_size;
+    _stat->st_atime = st.st_atime;
+    _stat->st_mtime = st.st_mtime;
+    _stat->st_ctime = st.st_ctime;
+    return ret;
+  }
 #else
+#define _stat32i64 _stat32
+#define _fstat32i64 _fstat32
 #define _stat64i32 _stat64
 #define _fstat64i32 _fstat64
 #endif
 
+#define __stat64 _stat64
+#if defined(_USE_32BIT_TIME_T)
+#define _fstat      _fstat32
+#define _fstati64   _fstat32i64
+#define _stat       _stat32
+#define _stati64    _stat32i64
+#else  /* !_USE_32BIT_TIME_T */
+#define _fstat      _fstat64i32
+#define _fstati64   _fstat64
+#define _stat       _stat64i32
+#define _stati64    _stat64
+#endif /* _USE_32BIT_TIME_T */
+#define _STAT_DEFINED
+#endif /* _STAT_DEFINED */
+
 #if !defined(_NO_OLDNAMES) && !defined(__STRICT_ANSI__)
 #define stat _stat
 #define fstat _fstat
 #endif /* !defined(_NO_OLDNAMES) && !defined(__STRICT_ANSI__) */
 
 #if !defined ( _WSTAT_DEFINED) /* also declared in wchar.h */
-_CRTIMP int __cdecl __MINGW_NOTHROW _wstat32 (const wchar_t*, struct _stat32*);
+/* _wstat32 does not exist in MSVCRT.DLL */
+_CRTALIAS int __cdecl __MINGW_NOTHROW _wstat32 (const wchar_t* _v1, struct _stat32* \
_v2) { +    _CRTIMP int __cdecl __MINGW_NOTHROW _wstat (const wchar_t*, struct \
_stat32*); +    return _wstat(_v1, _v2);
+}
+
 _CRTIMP int __cdecl __MINGW_NOTHROW _wstat64 (const wchar_t*, struct _stat64*);
 _CRTIMP int __cdecl __MINGW_NOTHROW _wstat32i64 (const wchar_t*, struct \
_stat32i64*);  int __cdecl __MINGW_NOTHROW _wstat64i32 (const wchar_t*, struct \
_stat64i32*); @@ -280,11 +339,33 @@ int __cdecl __MINGW_NOTHROW _wstat64i32 (const \
wchar_t*, struct _stat64i32*);  _stat->st_ctime = st.st_ctime;
     return ret;
   }
+  __CRT_INLINE int __cdecl _wstat32i64(const wchar_t *fname, struct _stat32i64 \
*_stat) +  {
+    struct _stat32 st;
+    int ret = _wstat32(fname, &st);
+    if (ret == -1) {
+      memset(_stat, 0, sizeof(struct _stat32i64));
+      return -1;
+    }
+    _stat->st_dev = st.st_dev;
+    _stat->st_ino = st.st_ino;
+    _stat->st_mode = st.st_mode;
+    _stat->st_nlink = st.st_nlink;
+    _stat->st_uid = st.st_uid;
+    _stat->st_gid = st.st_gid;
+    _stat->st_rdev = st.st_rdev;
+    _stat->st_size = (_off_t) st.st_size;
+    _stat->st_atime = st.st_atime;
+    _stat->st_mtime = st.st_mtime;
+    _stat->st_ctime = st.st_ctime;
+    return ret;
+  }
 #else
+#define _wstat32i64 _wstat32
 #define _wstat64i32 _wstat64
 #endif
 
-#if defined(_USE_32BIT_TIME_T) && MSVCRT_VERSION >= 800
+#if defined(_USE_32BIT_TIME_T)
 #define _wstat      _wstat32
 #define _wstati64   _wstat32i64
 #else /* !_USE_32BIT_TIME_T */
diff --git a/include/sys/timeb.h b/include/sys/timeb.h
index c6e02f0..17a73bc 100644
--- a/include/sys/timeb.h
+++ b/include/sys/timeb.h
@@ -34,16 +34,9 @@
 
 #ifndef	RC_INVOKED
 
-/*
- * TODO: Structure not tested.
- */
-struct _timeb
-{
-	time_t	time;
-	short	millitm;
-	short	timezone;
-	short	dstflag;
-};
+#ifdef	__cplusplus
+extern "C" {
+#endif
 
 /*
  * TODO: Structure not tested.
@@ -56,30 +49,6 @@ struct __timeb32
 	short	dstflag;
 };
 
-#ifndef	_NO_OLDNAMES
-/*
- * TODO: Structure not tested.
- */
-struct timeb
-{
-	time_t	time;
-	short	millitm;
-	short	timezone;
-	short	dstflag;
-};
-#endif
-
-#ifdef	__cplusplus
-extern "C" {
-#endif
-
-/* TODO: Not tested. */
-_CRTIMP void __cdecl __MINGW_NOTHROW	_ftime (struct _timeb*);
-
-#ifndef	_NO_OLDNAMES
-_CRTIMP void __cdecl __MINGW_NOTHROW	ftime (struct timeb*);
-#endif	/* Not _NO_OLDNAMES */
-
 /* This requires newer versions of msvcrt.dll (6.10 or higher).  */
 struct __timeb64
 {
@@ -89,17 +58,35 @@ struct __timeb64
   short dstflag;
 };
 
+#ifdef _USE_32BIT_TIME_T
+#define _timeb __timeb32
+#else
+#define _timeb __timeb64
+#endif
+
+_CRTIMP void __cdecl __MINGW_NOTHROW	_ftime (struct _timeb*);
 _CRTIMP void __cdecl __MINGW_NOTHROW	_ftime64 (struct __timeb64*);
 
+#if MSVCRT_VERSION >= 800
 _CRTIMP void __cdecl __MINGW_NOTHROW	_ftime32 (struct __timeb32*);
-
-#if defined(_USE_32BIT_TIME_T) && MSVCRT_VERSION >= 800
-_CRTALIAS void __cdecl __MINGW_NOTHROW	_ftime (struct _timeb* _v) { return(_ftime32 \
((struct __timeb32*)_v)); }  #else
+_CRTALIAS void __cdecl __MINGW_NOTHROW  _ftime32 (struct __timeb32* _v1) {
+    return _ftime((struct _timeb *)_v1);
+}
+#endif
 
-_CRTALIAS void __cdecl __MINGW_NOTHROW	_ftime (struct _timeb* _v) { return(_ftime64 \
((struct __timeb64*)_v)); } +#if defined(_USE_32BIT_TIME_T)
+#define _ftime _ftime32
+
+#else
+#define _ftime _ftime64
 #endif
 
+#ifndef	_NO_OLDNAMES
+#define ftime _ftime
+#define timeb _timeb
+#endif	/* Not _NO_OLDNAMES */
+
 #ifdef	__cplusplus
 }
 #endif
diff --git a/include/sys/types.h b/include/sys/types.h
index 06ed622..1c16260 100644
--- a/include/sys/types.h
+++ b/include/sys/types.h
@@ -48,7 +48,7 @@ typedef __int64 __time64_t;
 #ifndef _TIME_T_DEFINED
 /* FIXME __STRICT_ANSI__ ! */
 
-#if defined(_USE_32BIT_TIME_T) && MSVCRT_VERSION >= 800
+#if defined(_USE_32BIT_TIME_T)
 typedef	__time32_t time_t;
 #else
 
diff --git a/include/time.h b/include/time.h
index 1161a04..5578518 100644
--- a/include/time.h
+++ b/include/time.h
@@ -61,7 +61,7 @@ typedef __int64 __time64_t;
 #endif
 
 #ifndef _TIME_T_DEFINED
-# if defined(_USE_32BIT_TIME_T) && MSVCRT_VERSION >= 800
+# if defined(_USE_32BIT_TIME_T)
    typedef	__time32_t time_t;
 # else
    typedef	__time64_t time_t;
@@ -103,9 +103,6 @@ extern "C" {
 #endif
 
 _CRTIMP clock_t __cdecl __MINGW_NOTHROW	clock (void);
-_CRTIMP time_t __cdecl __MINGW_NOTHROW	time (time_t*);
-_CRTIMP double __cdecl __MINGW_NOTHROW	difftime (time_t, time_t);
-_CRTIMP time_t __cdecl __MINGW_NOTHROW	mktime (struct tm*);
 
 /*
  * These functions write to and return pointers to static buffers that may
@@ -117,19 +114,24 @@ _CRTIMP time_t __cdecl __MINGW_NOTHROW	mktime (struct tm*);
  * Fault and crap out your program. Guess how I know. Hint: stat called on
  * a directory gives 'invalid' times in st_atime etc...
  */
-_CRTIMP char* __cdecl __MINGW_NOTHROW		asctime (const struct tm*);
-_CRTIMP char* __cdecl __MINGW_NOTHROW		ctime (const time_t*);
-_CRTIMP struct tm*  __cdecl __MINGW_NOTHROW	gmtime (const time_t*);
-_CRTIMP struct tm*  __cdecl __MINGW_NOTHROW	localtime (const time_t*);
+_CRTIMP char*       __cdecl __MINGW_NOTHROW asctime (const struct tm*);
+_CRTIMP size_t	   __cdecl __MINGW_NOTHROW strftime (char*, size_t, const char*, \
const struct tm*); +#if MSVCRT_VERSION < 800
+_CRTIMP char*	    __cdecl __MINGW_NOTHROW ctime (const time_t*);
+_CRTIMP struct tm*  __cdecl __MINGW_NOTHROW gmtime (const time_t*);
+_CRTIMP struct tm*  __cdecl __MINGW_NOTHROW localtime (const time_t*);
 
-_CRTIMP size_t __cdecl __MINGW_NOTHROW		strftime (char*, size_t, const char*, const \
struct tm*); +_CRTIMP time_t     __cdecl __MINGW_NOTHROW time       (time_t*);
+_CRTIMP double     __cdecl __MINGW_NOTHROW difftime   (time_t, time_t);
+_CRTIMP time_t     __cdecl __MINGW_NOTHROW mktime     (struct tm*);
+#endif
 
 #ifndef __STRICT_ANSI__
 
-extern _CRTIMP void __cdecl __MINGW_NOTHROW	_tzset (void);
+extern _CRTIMP void __cdecl __MINGW_NOTHROW _tzset (void);
 
 #ifndef _NO_OLDNAMES
-extern _CRTIMP void __cdecl __MINGW_NOTHROW	tzset (void);
+extern _CRTIMP void __cdecl __MINGW_NOTHROW tzset (void);
 #endif
 
 _CRTIMP char* __cdecl __MINGW_NOTHROW	_strdate(char*);
@@ -153,32 +155,58 @@ _CRTIMP __time64_t __cdecl __MINGW_NOTHROW	_mkgmtime64 (struct \
tm*);  _CRTIMP char*	   __cdecl __MINGW_NOTHROW	_ctime32    (const __time32_t*);
 _CRTIMP struct tm* __cdecl __MINGW_NOTHROW	_gmtime32   (const __time32_t*);
 _CRTIMP struct tm* __cdecl __MINGW_NOTHROW	_localtime32(const __time32_t*);
+#else /* MSVCRT_VERSION < 800 */
+_CRTALIAS __time32_t __cdecl __MINGW_NOTHROW _time32  (__time32_t *_v) {
+    return ((__time32_t)time((time_t)_v));
+}
+_CRTALIAS double __cdecl __MINGW_NOTHROW _difftime32 (__time32_t _v1, __time32_t \
_v2) { +    return (difftime((time_t)_v1, (time_t)_v2));
+}
+_CRTALIAS __time32_t __cdecl __MINGW_NOTHROW _mktime32(struct tm* _v1) {
+    return ((__time32_t)mktime(_v1));
+}
+_CRTALIAS char* __cdecl __MINGW_NOTHROW _ctime32(const __time32_t* _v1) {
+    return (ctime((time_t)_v1));
+}
+_CRTALIAS struct tm* __cdecl __MINGW_NOTHROW _gmtime32(const __time32_t* _v1) {
+    return (gmtime((time_t)_v1));
+}
+_CRTALIAS struct tm* __cdecl __MINGW_NOTHROW _localtime32(const __time32_t* _v1) {
+    return (localtime((time_t)_v1));
+}
+#endif /* MSVCRT_VERSION >= 800 */
 
 #if defined(_USE_32BIT_TIME_T)
-_CRTALIAS time_t	   __cdecl __MINGW_NOTHROW	time (time_t* _v)
+/* Prevent circular recursion. */
+#if MSVCRT_VERSION >= 800
+_CRTALIAS time_t     __cdecl __MINGW_NOTHROW	time (time_t* _v)
     { return(_time32 (_v)); }
-_CRTALIAS double	   __cdecl __MINGW_NOTHROW	difftime(time_t _v1, time_t _v2)
+_CRTALIAS double     __cdecl __MINGW_NOTHROW	difftime(time_t _v1, time_t _v2)
     { return(_difftime32 (_v1,_v2)); }
-_CRTALIAS time_t	   __cdecl __MINGW_NOTHROW	mktime (struct tm* _v)
+_CRTALIAS time_t     __cdecl __MINGW_NOTHROW	mktime (struct tm* _v)
     { return(_mktime32 (_v)); }
-_CRTALIAS time_t	   __cdecl __MINGW_NOTHROW	_mkgmtime (struct tm* _v)
+_CRTALIAS time_t     __cdecl __MINGW_NOTHROW	_mkgmtime (struct tm* _v)
     { return(_mkgmtime32 (_v)); }
-_CRTALIAS char*		   __cdecl __MINGW_NOTHROW	ctime (const time_t* _v)
+_CRTALIAS char*	     __cdecl __MINGW_NOTHROW	ctime (const time_t* _v)
     { return(_ctime32 (_v)); }
-_CRTALIAS struct tm*   __cdecl __MINGW_NOTHROW	gmtime (const time_t* _v)
+_CRTALIAS struct tm* __cdecl __MINGW_NOTHROW	gmtime (const time_t* _v)
     { return(_gmtime32 (_v)); }
-_CRTALIAS struct tm*   __cdecl __MINGW_NOTHROW	localtime (const time_t* _v)
+_CRTALIAS struct tm* __cdecl __MINGW_NOTHROW	localtime (const time_t* _v)
     { return(_localtime32 (_v)); }
+#endif /* MSVCRT_VERSION >= 800 */
 
-#else
-_CRTALIAS time_t	   __cdecl __MINGW_NOTHROW	time (time_t* _v)
-    { return(_time64 (_v)); }
+#else /* !defined(_USE_32BIT_TIME_T) */
+/* _difftime64 and _mkgmtime64 are missing from MSVCRT.DLL pre Vista. */
+#if MSVCRT_VERSION >= 800
 _CRTALIAS double	   __cdecl __MINGW_NOTHROW	difftime(time_t _v1, time_t _v2)
     { return(_difftime64 (_v1,_v2)); }
-_CRTALIAS time_t	   __cdecl __MINGW_NOTHROW	mktime (struct tm* _v)
-    { return(_mktime64 (_v)); }
 _CRTALIAS time_t	   __cdecl __MINGW_NOTHROW	_mkgmtime (struct tm* _v)
     { return(_mkgmtime64 (_v)); }
+#endif /* MSVCRT_VERSION >= 800 */
+_CRTALIAS time_t	   __cdecl __MINGW_NOTHROW	time (time_t* _v)
+    { return(_time64 (_v)); }
+_CRTALIAS time_t	   __cdecl __MINGW_NOTHROW	mktime (struct tm* _v)
+    { return(_mktime64 (_v)); }
 _CRTALIAS char*		   __cdecl __MINGW_NOTHROW	ctime (const time_t* _v)
     { return(_ctime64 (_v)); }
 _CRTALIAS struct tm*   __cdecl __MINGW_NOTHROW	gmtime (const time_t* _v)
@@ -187,15 +215,6 @@ _CRTALIAS struct tm*   __cdecl __MINGW_NOTHROW	localtime (const \
time_t* _v)  { return(_localtime64 (_v)); }
 #endif /* _USE_32BIT_TIME_T */
 
-#else /* MSVCRT_VERSION < 800 */
-_CRTIMP time_t     __cdecl __MINGW_NOTHROW time       (time_t*);
-_CRTIMP double     __cdecl __MINGW_NOTHROW difftime   (time_t, time_t);
-_CRTIMP time_t     __cdecl __MINGW_NOTHROW mktime     (struct tm*);
-_CRTIMP char*      __cdecl __MINGW_NOTHROW ctime      (const time_t*);
-_CRTIMP struct tm* __cdecl __MINGW_NOTHROW gmtime     (const time_t*);
-_CRTIMP struct tm* __cdecl __MINGW_NOTHROW localtime  (const time_t*);
-#endif /* MSVCRT_VERSION >= 800 */
-
 /*
  * _daylight: non zero if daylight savings time is used.
  * _timezone: difference in seconds between GMT and local time.
@@ -226,15 +245,19 @@ __MINGW_IMPORT char 	*tzname[2];
 
 #ifndef __STRICT_ANSI__
 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW	_wasctime(const struct tm*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW	_wctime(const time_t*);
 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW	_wstrdate(wchar_t*);
 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW	_wstrtime(wchar_t*);
+_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW        _wctime(const time_t*);
 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW	_wctime64 (const __time64_t*);
 #ifdef MSVCRT_VERSION >= 800
 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW	_wctime32 (const __time32_t*);
-#endif
+#else
+_CRTALIAS whcar_t* __cdecl __MINGW_NOTHROW  _wctime32 (const __time32_t* _v) {
+    return(_wctime((time_t)_v));
+}
+#endif /* MSVCRT_VERSION >= 800 */
 
-#ifdef _USE_32BIT_TIME_T && MSVCRT_VERSION >= 800
+#ifdef _USE_32BIT_TIME_T
 _CRTALIAS wchar_t* __cdecl __MINGW_NOTHROW	_wctime (const time_t* _v) { \
return(_wctime32 (_v)); }  #else
 _CRTALIAS wchar_t* __cdecl __MINGW_NOTHROW	_wctime (const time_t* _v) { \
                return(_wctime64 (_v)); }
diff --git a/include/wchar.h b/include/wchar.h
index 38224e4..4bd32da 100644
--- a/include/wchar.h
+++ b/include/wchar.h
@@ -118,7 +118,7 @@ _CRTIMP wint_t __cdecl __MINGW_NOTHROW	ungetwc (wchar_t, FILE*);
 #ifndef __STRICT_ANSI__
 _CRTIMP int __cdecl __MINGW_NOTHROW	swprintf (wchar_t*, const wchar_t*, ...);
 _CRTIMP int __cdecl __MINGW_NOTHROW	vswprintf (wchar_t*, const wchar_t*, __VALIST);
-#endif
+#endif /* ndef __STRICT_ANSI__ */
 
 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW fgetws (wchar_t*, int, FILE*);
 _CRTIMP int __cdecl __MINGW_NOTHROW	fputws (const wchar_t*, FILE*);
@@ -157,7 +157,7 @@ int __cdecl __MINGW_NOTHROW vfwscanf (FILE * __restrict__,
 		       const wchar_t * __restrict__, __VALIST);
 int __cdecl __MINGW_NOTHROW vswscanf (const wchar_t * __restrict__,
 		       const wchar_t * __restrict__, __VALIST);
-#endif
+#endif /* ndef __NO_ISOCEXT__ */
 
 #define _WSTDIO_DEFINED
 #endif /* _WSTDIO_DEFINED */
@@ -190,19 +190,39 @@ _CRTIMP unsigned __int64 __cdecl _wcstoui64_l(const wchar_t *, \
wchar_t **, int,  #ifndef __STRICT_ANSI__
 /* wide function prototypes, also declared in time.h */
 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW	_wasctime (const struct tm*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW	_wctime (const time_t*);
 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW	_wstrdate (wchar_t*);
 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW	_wstrtime (wchar_t*);
 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW	_wctime64 (const __time64_t*);
+
+/* MSVCRT.DLL may not have _wctime32 depending on OS version */
+#if MSVCRT_VERSION >= 800
 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW	_wctime32 (const __time32_t*);
 
-#if defined(_USE_32BIT_TIME_T) && MSVCRT_VERSION >= 800
+#else /* MSVCRT_VERSION < 800 */
+_CRTALIAS wchar_t* __cdecl __MINGW_NOTHROW  _wctime32 (const __time32_t* _v1) {
+    _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wctime (const __time32_t*);
+    return _wctime(_v1);
+}
+#endif /* MSVCRT_VERSION >= 800 */
+
+#if MSVCRT_VERSION >= 800
+#if defined(_USE_32BIT_TIME_T)
 _CRTALIAS wchar_t* __cdecl __MINGW_NOTHROW	_wctime (const time_t* _v)	{ \
                return(_wctime32 (_v)); }
-#else
 
+#else /* MSVCRT_VERSION < 800 */
 _CRTALIAS wchar_t* __cdecl __MINGW_NOTHROW	_wctime (const time_t* _v)	{ \
                return(_wctime64 (_v)); }
-#endif
+#endif /* defined(_USE_32BIT_TIME_T) */
+#endif /* MSVCRT_VERSION >= 800 */
+
+#else /* MSVCRT_VERSION < 800 */
+#ifdef _USE_32BIT_TIME_T
+#define _wctime _wctime32
 
+#else /* ndef _USE_32BIT_TIME_T */
+#define _wctime _wctime64
+
+#endif /* def _USE_32BIT_TIME_T */
+#endif /* MSVCRT_VERSION >= 800 */
 #endif /* __STRICT_ANSI__ */
 
 _CRTIMP size_t __cdecl __MINGW_NOTHROW	wcsftime (wchar_t*, size_t, const wchar_t*, \
const struct tm*); @@ -351,7 +371,7 @@ struct _wfinddatai64_t {
 	__int64     size;
 	wchar_t     name[260];
 };
-struct __wfinddata64_t {
+struct _wfinddata64_t {
         unsigned    attrib;
         __time64_t  time_create;
         __time64_t  time_access;
@@ -361,7 +381,7 @@ struct __wfinddata64_t {
         wchar_t     name[260];
 };
 #include <stdio.h>
-struct __wfinddata32_t {
+struct _wfinddata32_t {
 	unsigned	attrib;
 	__time32_t	time_create;
 	__time32_t	time_access;
@@ -392,12 +412,11 @@ struct _wfinddata64i32_t {
 
 /* Wide character versions. Also defined in io.h. */
 #if !defined (_WIO_DEFINED)
+#define _WIO_DEFINED
 #include <stdint.h>  /* For intptr_t.  */
 _CRTIMP int __cdecl __MINGW_NOTHROW	_waccess (const wchar_t*, int);
 _CRTIMP int __cdecl __MINGW_NOTHROW	_wchmod (const wchar_t*, int);
 _CRTIMP int __cdecl __MINGW_NOTHROW	_wcreat (const wchar_t*, int);
-_CRTIMP long __cdecl __MINGW_NOTHROW	_wfindfirst (const wchar_t*, struct \
                _wfinddata_t *);
-_CRTIMP int __cdecl __MINGW_NOTHROW	_wfindnext (long, struct _wfinddata_t *);
 _CRTIMP int __cdecl __MINGW_NOTHROW	_wunlink (const wchar_t*);
 _CRTIMP int __cdecl __MINGW_NOTHROW	_wopen (const wchar_t*, int, ...);
 _CRTIMP int __cdecl __MINGW_NOTHROW	_wsopen (const wchar_t*, int, int, ...);
@@ -408,25 +427,37 @@ _CRTIMP long __cdecl __MINGW_NOTHROW	_wfindfirst32i64 (const \
wchar_t*, struct _w  _CRTIMP long __cdecl __MINGW_NOTHROW	_wfindfirst64i32 (const \
wchar_t*, struct _wfinddata64i32_t*);  _CRTIMP int  __cdecl \
__MINGW_NOTHROW	_wfindnext32i64 (long, struct _wfinddata32i64_t*);  _CRTIMP int  \
                __cdecl __MINGW_NOTHROW	_wfindnext64i32 (long, struct \
                _wfinddata64i32_t*);
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wfindfirst64(const wchar_t*, struct \
                __wfinddata64_t*);
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wfindnext64(intptr_t, struct \
                __wfinddata64_t*);
-_CRTIMP long __cdecl __MINGW_NOTHROW	_wfindfirst32 (const wchar_t*, struct \
                __wfinddata32_t*);
-_CRTIMP int  __cdecl __MINGW_NOTHROW	_wfindnext32 (long, struct __wfinddata32_t*);
+_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wfindfirst64(const wchar_t*, struct \
_wfinddata64_t*); +_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wfindnext64(intptr_t, \
struct _wfinddata64_t*); +
+/* _wfindfirst32 and _wfindnext32 do not exist in MSVCRT.DLL */
+_CRTALIAS intptr_t __cdecl __MINGW_NOTHROW _wfindfirst32 (const wchar_t* _v1, struct \
_wfinddata32_t* _v2) { +    _CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wfindfirst \
(const wchar_t*, struct _wfinddata32_t*); +    return _wfindfirst(_v1, _v2);
+}
+_CRTALIAS int  __cdecl __MINGW_NOTHROW	_wfindnext32 (intptr_t _v1, struct \
_wfinddata32_t* _v2) { +    _CRTIMP int  __cdecl __MINGW_NOTHROW _wfindnext \
(intptr_t, struct _wfinddata32_t*); +    return _wfindnext(_v1, _v2);
+}
+
+#if defined(_USE_32BIT_TIME_T)
+#define _wfinddata_t _wfinddata32_t
+#define _wfinddatai64_t _wfinddata32i64_t
+#define _wfindfirst _wfindfirst32
+#define _wfindnext _wfindnext32
+#define _wfindfirsti64 _wfindfirst32i64
+#define _wfindnexti64 _wfindnext32i64
+
+#else /* !defined(_USE_32BIT_TIME_T)
+#define _wfinddata_t _wfinddata64i32_t
+#define _wfinddatai64_t _wfinddata64_t
+#define _wfindfirst _wfindfirst64i32
+#define _wfindnext _wfindnext64i32
+#define _wfindfirsti64 _wfindfirst64
+#define _wfindnexti64 _wfindnext64
+
+#endif /* defined(_USE_32BIT_TIME_T) */
 
-#if defined(_USE_32BIT_TIME_T) && MSVCRT_VERSION >= 800
-_CRTALIAS long __cdecl __MINGW_NOTHROW	_wfindfirst (const wchar_t* _v1, struct \
                _wfinddata_t* _v2)	 { return(_wfindfirst32 (_v1,(struct \
                __wfinddata32_t*)_v2)); }
-_CRTALIAS int  __cdecl __MINGW_NOTHROW	_wfindnext (long _v1, struct _wfinddata_t* \
                _v2)			 { return(_wfindnext32  (_v1,(struct __wfinddata32_t*)_v2)); }
-_CRTALIAS long __cdecl __MINGW_NOTHROW	_wfindfirsti64 (const wchar_t* _v1, struct \
_wfinddatai64_t* _v2) { return(_wfindfirst32i64 (_v1,(struct \
                _wfinddata32i64_t*)_v2)); }
-_CRTALIAS int  __cdecl __MINGW_NOTHROW	_wfindnexti64 (long _v1, struct \
_wfinddatai64_t* _v2)		 { return(_wfindnext32i64  (_v1,(struct \
                _wfinddata32i64_t*)_v2)); }
-#else
-
-_CRTALIAS long __cdecl __MINGW_NOTHROW	_wfindfirst (const wchar_t* _v1, struct \
_wfinddata_t* _v2)	 { return(_wfindfirst64i32 (_v1,(struct _wfinddata64i32_t*)_v2)); \
                }
-_CRTALIAS int  __cdecl __MINGW_NOTHROW	_wfindnext (long _v1, struct _wfinddata_t* \
                _v2)			 { return(_wfindnext64i32  (_v1,(struct \
                _wfinddata64i32_t*)_v2)); }
-_CRTALIAS long __cdecl __MINGW_NOTHROW	_wfindfirsti64 (const wchar_t* _v1, struct \
                _wfinddatai64_t* _v2) { return(_wfindfirst64 (_v1,(struct \
                __wfinddata64_t*)_v2)); }
-_CRTALIAS int  __cdecl __MINGW_NOTHROW	_wfindnexti64 (long _v1, struct \
                _wfinddatai64_t* _v2)		 { return(_wfindnext64  (_v1,(struct \
                __wfinddata64_t*)_v2)); }
-#endif /* !_USE_32BIT_TIME_T*/
-
-#define _WIO_DEFINED
 #endif /* _WIO_DEFINED */
 
 #ifndef _WDIRECT_DEFINED

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog           |   37 +++++++
 include/_mingw.h    |   39 ++++++--
 include/io.h        |  285 ++++++++++++++++++++++++++++++++++++++++-----------
 include/objbase.h   |   20 ++--
 include/rpc.h       |   14 ++-
 include/sdkddkver.h |   13 ++-
 include/sys/stat.h  |  123 ++++++++++++++++++----
 include/sys/timeb.h |   63 +++++-------
 include/sys/types.h |    2 +-
 include/time.h      |   93 +++++++++++------
 include/wchar.h     |   87 +++++++++++-----
 11 files changed, 562 insertions(+), 214 deletions(-)


hooks/post-receive
-- 
Repository: mingw-org-wsl



------------------------------

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j

------------------------------

_______________________________________________
MinGW-cvs mailing list
MinGW-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-cvs


End of MinGW-cvs Digest, Vol 62, Issue 1
****************************************


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic