This list is closed, nobody may subscribe to it.
| 2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(12) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2001 |
Jan
(13) |
Feb
(2) |
Mar
(1) |
Apr
(1) |
May
|
Jun
(38) |
Jul
(10) |
Aug
(70) |
Sep
(63) |
Oct
(61) |
Nov
(41) |
Dec
(28) |
| 2002 |
Jan
(43) |
Feb
(11) |
Mar
(9) |
Apr
(2) |
May
(97) |
Jun
(94) |
Jul
(13) |
Aug
(49) |
Sep
(41) |
Oct
(24) |
Nov
(55) |
Dec
(126) |
| 2003 |
Jan
(90) |
Feb
(75) |
Mar
(32) |
Apr
(24) |
May
(54) |
Jun
(54) |
Jul
(22) |
Aug
(4) |
Sep
(16) |
Oct
(8) |
Nov
(6) |
Dec
(13) |
| 2004 |
Jan
|
Feb
(17) |
Mar
(60) |
Apr
(21) |
May
(12) |
Jun
|
Jul
(13) |
Aug
|
Sep
(29) |
Oct
|
Nov
|
Dec
(2) |
| 2005 |
Jan
(22) |
Feb
(3) |
Mar
(2) |
Apr
(13) |
May
(82) |
Jun
(18) |
Jul
(30) |
Aug
(17) |
Sep
(3) |
Oct
(19) |
Nov
(4) |
Dec
(8) |
| 2006 |
Jan
(1) |
Feb
(6) |
Mar
(2) |
Apr
(40) |
May
|
Jun
(21) |
Jul
(1) |
Aug
(410) |
Sep
(3) |
Oct
|
Nov
(56) |
Dec
(7) |
| 2007 |
Jan
(19) |
Feb
|
Mar
(4) |
Apr
(8) |
May
(19) |
Jun
(6) |
Jul
(4) |
Aug
(6) |
Sep
|
Oct
(4) |
Nov
(3) |
Dec
(2) |
| 2008 |
Jan
(13) |
Feb
(18) |
Mar
(12) |
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2009 |
Jan
|
Feb
(6) |
Mar
(8) |
Apr
(2) |
May
(2) |
Jun
|
Jul
|
Aug
(2) |
Sep
(11) |
Oct
(13) |
Nov
(17) |
Dec
(6) |
| 2010 |
Jan
(24) |
Feb
(10) |
Mar
(27) |
Apr
(20) |
May
(108) |
Jun
(8) |
Jul
(23) |
Aug
(38) |
Sep
(49) |
Oct
(17) |
Nov
(12) |
Dec
(14) |
| 2011 |
Jan
(17) |
Feb
(7) |
Mar
(28) |
Apr
(8) |
May
(20) |
Jun
(11) |
Jul
(7) |
Aug
(12) |
Sep
(4) |
Oct
(20) |
Nov
(19) |
Dec
(2) |
| 2012 |
Jan
(2) |
Feb
(6) |
Mar
(5) |
Apr
(24) |
May
(5) |
Jun
(4) |
Jul
(6) |
Aug
(18) |
Sep
(38) |
Oct
(26) |
Nov
(12) |
Dec
(6) |
| 2013 |
Jan
(19) |
Feb
(18) |
Mar
(44) |
Apr
(35) |
May
(18) |
Jun
(21) |
Jul
(10) |
Aug
(19) |
Sep
(44) |
Oct
(25) |
Nov
(1) |
Dec
(2) |
| 2014 |
Jan
(8) |
Feb
|
Mar
|
Apr
(5) |
May
(1) |
Jun
(3) |
Jul
|
Aug
(3) |
Sep
|
Oct
(4) |
Nov
(4) |
Dec
(7) |
| 2015 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
(2) |
Jun
(4) |
Jul
(6) |
Aug
(2) |
Sep
(8) |
Oct
(2) |
Nov
(1) |
Dec
(3) |
| 2016 |
Jan
(7) |
Feb
(9) |
Mar
(5) |
Apr
(5) |
May
(9) |
Jun
(4) |
Jul
(20) |
Aug
(4) |
Sep
(7) |
Oct
(6) |
Nov
(9) |
Dec
(2) |
| 2017 |
Jan
(7) |
Feb
(7) |
Mar
(5) |
Apr
|
May
(1) |
Jun
(4) |
Jul
(12) |
Aug
(4) |
Sep
(1) |
Oct
(4) |
Nov
(11) |
Dec
(14) |
| 2018 |
Jan
(3) |
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
|
|
|
1
|
|
2
|
3
|
4
(1) |
5
(2) |
6
|
7
(1) |
8
|
|
9
|
10
|
11
|
12
|
13
(1) |
14
(1) |
15
|
|
16
(2) |
17
(1) |
18
|
19
(2) |
20
(1) |
21
(2) |
22
|
|
23
|
24
(1) |
25
(1) |
26
|
27
(3) |
28
(2) |
29
|
|
30
|
|
|
|
|
|
|
|
From: Keith M. <no...@so...> - 2013-06-28 20:45:50
|
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-get".
The branch, master has been updated
via 3b4940a9b9c272fb76e32c22eb6909d1ba949ba5 (commit)
from 7e933e48cf5a720db978449eaa8b910c83dc93cf (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-get/ci/3b4940a9b9c272fb76e32c22eb6909d1ba949ba5/
commit 3b4940a9b9c272fb76e32c22eb6909d1ba949ba5
Author: Keith Marshall <kei...@us...>
Date: Fri Jun 28 10:01:06 2013 +0100
Avoid inadvertent overwrite of existing files.
diff --git a/ChangeLog b/ChangeLog
index 3409db7..09c85c4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2013-06-28 Keith Marshall <kei...@us...>
+
+ Avoid inadvertent overwrite of existing files.
+
+ * src/mkpath.c (_O_NEWFILE): Conditionally specify attributes...
+ [IMPLEMENTATION_LEVEL == SETUP_TOOL_COMPONENT]: ...as they were...
+ [IMPLEMENTATION_LEVEL != SETUP_TOOL_COMPONENT]: ...else, include
+ _O_EXCL in the specified set; exclude _O_TRUNC.
+
+ * src/tarproc.cpp (dmh_notify_extraction_failed): New static inline
+ function; it encapsulates the diagnostic message factored out from...
+ (pkgArchiveProcessor::ExtractFile): ...here, whence use it.
+ (create_output_stream): Also used in this new static inline function;
+ it adds an appropriate diagnostic wrapper around set_output_stream(),
+ when _O_EXCL prevents overwrite of an existing file.
+ (pkgArchiveProcessor::SetOutputStream): Use it.
+
2013-06-27 Keith Marshall <kei...@us...>
Improve diagnostics for tar archive processing faults.
diff --git a/src/mkpath.c b/src/mkpath.c
index d03e6f6..4e43bf7 100644
--- a/src/mkpath.c
+++ b/src/mkpath.c
@@ -4,7 +4,7 @@
* $Id$
*
* Written by Keith Marshall <kei...@us...>
- * Copyright (C) 2009, 2011, MinGW Project
+ * Copyright (C) 2009, 2011, 2013, MinGW.org Project
*
*
* Helper functions for constructing path names, creating directory
@@ -27,6 +27,7 @@
*
*/
#include "mkpath.h"
+#include "pkgimpl.h"
#include <stdio.h>
#include <stdlib.h>
@@ -46,9 +47,18 @@
/*
* MS-Windows _O_BINARY vs. _O_TEXT discrimination can't be explicitly
* resolved in a simple `creat()' call; instead, we will use `_open()',
- * with the following explicit attribute set...
+ * with one of the following explicit attribute sets...
*/
-# define _O_NEWFILE _O_RDWR | _O_CREAT | _O_TRUNC | _O_BINARY
+# if IMPLEMENTATION_LEVEL == SETUP_TOOL_COMPONENT
+ /*
+ * ...allowing overwrite in the setup tool implementation...
+ */
+# define _O_NEWFILE _O_RDWR | _O_CREAT | _O_TRUNC | _O_BINARY
+# else
+ /* ...but not in the standard mingw-get implementation...
+ */
+# define _O_NEWFILE _O_RDWR | _O_CREAT | _O_EXCL | _O_BINARY
+# endif
# define creat(P,M) _open( P, _O_NEWFILE, _map_posix_mode(M) )
/* Furthermore, MS-Windows protection modes are naive, in comparison
diff --git a/src/tarproc.cpp b/src/tarproc.cpp
index 800d94f..a31a117 100644
--- a/src/tarproc.cpp
+++ b/src/tarproc.cpp
@@ -68,6 +68,13 @@ int pkgArchiveProcessor::CreateExtractionDirectory( const char *pathname )
return status;
}
+static inline int dmh_notify_extraction_failed( const char *name )
+{
+ /* Helper function to emit archive "extraction failed" diagnostics.
+ */
+ return dmh_notify( DMH_ERROR, "%s: extraction failed\n", name );
+}
+
static inline int dmh_notify_archive_data_exhausted( const char *context )
{
/* Helper function to emit "premature end of archive" diagnostics.
@@ -77,13 +84,30 @@ static inline int dmh_notify_archive_data_exhausted( const char *context )
);
}
+static int create_output_stream( const char *name, int mode )
+{
+ /* Wrapper encapsulating the set_output_stream() function, while
+ * protecting against inadvertently overwriting any unexpectedly
+ * pre-existing file.
+ */
+ int fd = set_output_stream( name, mode );
+ if( (fd == -1) && ((errno == EEXIST) || (errno == EACCES)) )
+ {
+ /* Overwrite prevention was triggered; diagnose.
+ */
+ dmh_notify_extraction_failed( name );
+ dmh_notify( DMH_ERROR, "cannot replace existing file\n" );
+ }
+ return fd;
+}
+
inline int pkgArchiveProcessor::SetOutputStream( const char *name, int mode )
{
/* Wrapper method to facilitate the set up of output streams
* for writing extracted content to disk, except in the special
* case where saving of files has been disabled.
*/
- return save_on_extract ? set_output_stream( name, mode ) : -2;
+ return save_on_extract ? create_output_stream( name, mode ) : -2;
}
int pkgArchiveProcessor::ExtractFile( int fd, const char *pathname, int status )
@@ -106,7 +130,7 @@ int pkgArchiveProcessor::ExtractFile( int fd, const char *pathname, int status )
* written; discard it, and diagnose failure.
*/
unlink( pathname );
- dmh_notify( DMH_ERROR, "%s: extraction failed\n", pathname );
+ dmh_notify_extraction_failed( pathname );
switch( status )
{
case TAR_ARCHIVE_DATA_READ_ERROR:
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 17 +++++++++++++++++
src/mkpath.c | 16 +++++++++++++---
src/tarproc.cpp | 28 ++++++++++++++++++++++++++--
3 files changed, 56 insertions(+), 5 deletions(-)
hooks/post-receive
--
Repository: mingw-get
|
|
From: Earnie B. <no...@so...> - 2013-06-28 12:41:58
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Repository: mingw-org-wsl".
The branch, 4.0-dev has been updated
via e1b06ae715fd7eefa1cf4465c89c4fb660b44bff (commit)
from c9d5bae977ba38c1e93801ec4e6d91276161f7f5 (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/e1b06ae715fd7eefa1cf4465c89c4fb660b44bff/
commit e1b06ae715fd7eefa1cf4465c89c4fb660b44bff
Author: Earnie Boyd <ea...@us...>
Date: Fri Jun 28 08:41:06 2013 -0400
Add missing _tcsclen define to tchar.h.
diff --git a/ChangeLog b/ChangeLog
index 67bb146..0e4caac 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2013-06-28 Earnie Boyd <ea...@us...>
+
+ * include/tchar.h (_tcsclen): Add missing define.
+
2013-06-27 Earnie Boyd <ea...@us...>
* include/wchar.h: Resolve issue to define all components of
diff --git a/include/tchar.h b/include/tchar.h
index 1ca0fdc..1c0a8e1 100644
--- a/include/tchar.h
+++ b/include/tchar.h
@@ -128,6 +128,7 @@ typedef wchar_t _TCHAR;
#define _tcscpy wcscpy
#define _tcscspn wcscspn
#define _tcslen wcslen
+#define _tcsclen wcslen
#define _tcsncat wcsncat
#define _tcsncmp wcsncmp
#define _tcsncpy wcsncpy
@@ -342,6 +343,7 @@ typedef char _TCHAR;
#define _tcscpy strcpy
#define _tcscspn strcspn
#define _tcslen strlen
+#define _tcsclen strlen
#define _tcsncat strncat
#define _tcsncmp strncmp
#define _tcsncpy strncpy
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 4 ++++
include/tchar.h | 2 ++
2 files changed, 6 insertions(+), 0 deletions(-)
hooks/post-receive
--
Repository: mingw-org-wsl
|
|
From: Keith M. <no...@so...> - 2013-06-27 20:06: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-get".
The branch, master has been updated
via 7e933e48cf5a720db978449eaa8b910c83dc93cf (commit)
from b4e3507baed9e13b5aab6a682251c922aab3b99f (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-get/ci/7e933e48cf5a720db978449eaa8b910c83dc93cf/
commit 7e933e48cf5a720db978449eaa8b910c83dc93cf
Author: Keith Marshall <kei...@us...>
Date: Thu Jun 27 16:50:26 2013 +0100
Improve diagnostics for tar archive processing faults.
diff --git a/ChangeLog b/ChangeLog
index 1372d29..3409db7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
+2013-06-27 Keith Marshall <kei...@us...>
+
+ Improve diagnostics for tar archive processing faults.
+
+ * src/pkgproc.h (TAR_ARCHIVE_FORMAT_ERROR): New constant; define it.
+ (TAR_ARCHIVE_DATA_READ_ERROR, TAR_ARCHIVE_DATA_WRITE_ERROR): Likewise.
+
+ * src/tarproc.cpp (dmh_notify_archive_data_exhausted): New static
+ inline function; implement it.
+ (pkgTarArchiveProcessor::GetArchiveEntry) [short header]: Use it.
+ (pkgArchiveProcessor::ExtractFile) [TAR_ARCHIVE_DATA_READ_ERROR]:
+ Likewise, use it here; also explicitlycheck for, and diagnose...
+ [TAR_ARCHIVE_DATA_WRITE_ERROR]: ...this; also add a further catch all
+ case, to diagnose any other unexpected condition.
+ (pkgTarArchiveProcessor::GetArchiveEntry) [bad checksum]: Diagnose it.
+ (pkgTarArchiveProcessor::Process): Return appropriate status codes.
+ (pkgTarArchiveProcessor::ProcessEntityData): Likewise.
+
2013-06-24 Keith Marshall <kei...@us...>
Facilitate version synchronisation for mingw-get-setup.
diff --git a/src/pkgproc.h b/src/pkgproc.h
index 9d104ad..964d8d7 100644
--- a/src/pkgproc.h
+++ b/src/pkgproc.h
@@ -137,7 +137,7 @@ union tar_archive_header
*/
#define TAR_ENTITY_TYPE_FILE '0'
#define TAR_ENTITY_TYPE_LINK '1'
-#define TAR_ENTITY_TYPE_SYMLINK '2'
+#define TAR_ENTITY_TYPE_SYMLINK '2'
#define TAR_ENTITY_TYPE_CHRDEV '3'
#define TAR_ENTITY_TYPE_BLKDEV '4'
#define TAR_ENTITY_TYPE_DIRECTORY '5'
@@ -146,7 +146,13 @@ union tar_archive_header
/* Some older style tar archives may use '\0' as an alternative to '0',
* to identify an archive entry representing a regular file.
*/
-#define TAR_ENTITY_TYPE_ALTFILE '\0'
+#define TAR_ENTITY_TYPE_ALTFILE '\0'
+
+/* Specify classification codes for tar archive processing errors.
+ */
+#define TAR_ARCHIVE_DATA_READ_ERROR -1
+#define TAR_ARCHIVE_DATA_WRITE_ERROR -2
+#define TAR_ARCHIVE_FORMAT_ERROR -3
class pkgTarArchiveProcessor : public pkgArchiveProcessor
{
diff --git a/src/tarproc.cpp b/src/tarproc.cpp
index eef9e3a..800d94f 100644
--- a/src/tarproc.cpp
+++ b/src/tarproc.cpp
@@ -68,6 +68,15 @@ int pkgArchiveProcessor::CreateExtractionDirectory( const char *pathname )
return status;
}
+static inline int dmh_notify_archive_data_exhausted( const char *context )
+{
+ /* Helper function to emit "premature end of archive" diagnostics.
+ */
+ return dmh_notify( DMH_ERROR,
+ "unexpected end of archive reading %s record\n", context
+ );
+}
+
inline int pkgArchiveProcessor::SetOutputStream( const char *name, int mode )
{
/* Wrapper method to facilitate the set up of output streams
@@ -98,6 +107,19 @@ int pkgArchiveProcessor::ExtractFile( int fd, const char *pathname, int status )
*/
unlink( pathname );
dmh_notify( DMH_ERROR, "%s: extraction failed\n", pathname );
+ switch( status )
+ {
+ case TAR_ARCHIVE_DATA_READ_ERROR:
+ dmh_notify_archive_data_exhausted( "content" );
+ break;
+
+ case TAR_ARCHIVE_DATA_WRITE_ERROR:
+ dmh_notify( DMH_ERROR, "write error extracting file content\n" );
+ break;
+
+ default:
+ dmh_notify( DMH_ERROR, "unexpected fault; status = %d\n", status );
+ }
}
}
/* Finally, we pass the original status value back to the caller.
@@ -249,9 +271,10 @@ int pkgTarArchiveProcessor::GetArchiveEntry()
if( count < sizeof( header ) )
{
- /* Failed to read a complete header; return error code.
+ /* Failed to read a complete header; diagnose and return error code.
*/
- return -1;
+ dmh_notify_archive_data_exhausted( "header" );
+ return TAR_ARCHIVE_DATA_READ_ERROR;
}
while( count-- )
@@ -280,9 +303,16 @@ int pkgTarArchiveProcessor::GetArchiveEntry()
}
/* After computing the checksum for a non-zero header,
* verify it against the value recorded in the checksum field;
- * return +1 for a successful match, or -2 for failure.
+ * return +1 for a successful match...
+ */
+ if( sum == octval( header.field.chksum ) )
+ return 1;
+
+ /* ...otherwise diagnose checksum validation failure, and
+ * return the fault status.
*/
- return (sum == octval( header.field.chksum )) ? 1 : -2;
+ dmh_notify( DMH_ERROR, "checksum validation failed\n" );
+ return TAR_ARCHIVE_FORMAT_ERROR;
}
/* If we get to here, then the inner loop was never entered;
@@ -297,7 +327,8 @@ int pkgTarArchiveProcessor::Process()
/* Generic method for reading tar archives, and extracting their
* content; loops over each archive entry in turn...
*/
- while( GetArchiveEntry() > 0 )
+ int status;
+ while( (status = GetArchiveEntry()) > 0 )
{
char *prefix = *header.field.prefix ? header.field.prefix : NULL;
char *name = header.field.name;
@@ -312,14 +343,19 @@ int pkgTarArchiveProcessor::Process()
{
/* Extract the full pathname from the data of this entry.
*/
- longname = EntityDataAsString();
- if( !longname )
+ if( (longname = EntityDataAsString()) == NULL )
+ {
dmh_notify( DMH_ERROR, "Unable to read a long name entry\n" );
+ return TAR_ARCHIVE_FORMAT_ERROR;
+ }
/* Read the entry for which this long name is intended.
*/
if( GetArchiveEntry() <= 0 )
+ {
dmh_notify( DMH_ERROR, "Expected a new entry after a long name entry\n" );
+ return TAR_ARCHIVE_FORMAT_ERROR;
+ }
/* Use the previously determined long name as the pathname for this entry.
*/
@@ -448,7 +484,7 @@ int pkgTarArchiveProcessor::ProcessEntityData( int fd )
* Failure to fully populate the transfer buffer, (i.e. a short
* read), indicates a corrupt archive; bail out immediately.
*/
- return -1;
+ return TAR_ARCHIVE_DATA_READ_ERROR;
/* When the number of actual data bytes expected is fewer than the
* total number of bytes in the transfer buffer...
@@ -470,7 +506,7 @@ int pkgTarArchiveProcessor::ProcessEntityData( int fd )
* An extraction error occurred; set the status code to
* indicate failure.
*/
- status = -2;
+ status = TAR_ARCHIVE_DATA_WRITE_ERROR;
/* Adjust the count of remaining unprocessed data bytes, and begin
* a new processing cycle, to capture any which may be present.
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 18 ++++++++++++++++++
src/pkgproc.h | 10 ++++++++--
src/tarproc.cpp | 54 +++++++++++++++++++++++++++++++++++++++++++++---------
3 files changed, 71 insertions(+), 11 deletions(-)
hooks/post-receive
--
Repository: mingw-get
|
|
From: Earnie B. <no...@so...> - 2013-06-27 16:04:27
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Repository: mingw-org-wsl".
The branch, 4.0-dev has been updated
via c9d5bae977ba38c1e93801ec4e6d91276161f7f5 (commit)
from 2e1e5c90e5078ebcfa6c51271706e49b934b9a86 (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/c9d5bae977ba38c1e93801ec4e6d91276161f7f5/
commit c9d5bae977ba38c1e93801ec4e6d91276161f7f5
Author: Earnie Boyd <ea...@us...>
Date: Thu Jun 27 12:03:28 2013 -0400
Change string to mingw_org_wsl for package name consistency and to be repository name nescient.
diff --git a/ChangeLog b/ChangeLog
index 55ffc75..67bb146 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,9 @@
* include/wchar.h: Resolve issue to define all components of
_STAT_DEFINED
+ * Makefile.in (mingw.org-wsl): Change string to mingw_org_wsl for
+ package name consistency and to be repository name nescient.
+ * README (mingw.org-wsl): Ditto
2013-06-25 Keith Marshall <kei...@us...>
diff --git a/Makefile.in b/Makefile.in
index 4356628..0314737 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1072,8 +1072,8 @@ endif
dist-mingwrt-src:
ifeq ($(RELEASE_STATUS),prod)
- cp -af $(top_srcdir) $(DESTDIR)$(prefix)/mingw.org-wsl
- cd $(DESTDIR)$(prefix)/mingw.org-wsl ; \
+ cp -af $(top_srcdir) $(DESTDIR)$(prefix)/mingw_org_wsl
+ cd $(DESTDIR)$(prefix)/mingw_org_wsl ; \
rm -rf .git autom4te.cache ; \
rm -f config.log config.status config.cache config.h ; \
rm -f .gitignore core a.out Makefile ; \
@@ -1083,11 +1083,11 @@ ifeq ($(RELEASE_STATUS),prod)
find . -type f -name .\*.swp -delete ; \
cd .. ; \
rm -rf mingwrt-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-src ; \
- mv mingw.org-wsl mingwrt-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-src ; \
+ mv mingw_org_wsl mingwrt-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-src ; \
tar acf ../packages/mingwrt-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-src.tar.lzma mingwrt-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-src
else
- cp -af $(top_srcdir) $(DESTDIR)$(prefix)/mingw.org-wsl
- cd $(DESTDIR)$(prefix)/mingw.org-wsl ; \
+ cp -af $(top_srcdir) $(DESTDIR)$(prefix)/mingw_org_wsl
+ cd $(DESTDIR)$(prefix)/mingw_org_wsl ; \
rm -rf .git autom4te.cache ; \
rm -f config.log config.status config.cache config.h ; \
rm -f .gitignore core a.out Makefile ; \
@@ -1097,7 +1097,7 @@ else
find . -type f -name .\*.swp -delete ; \
cd .. ; \
rm -rf mingwrt-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-$(RELEASE_STATUS)-$(RELEASE_REFERENCE)-src ; \
- mv mingw.org-wsl mingwrt-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-$(RELEASE_STATUS)-$(RELEASE_REFERENCE)-src ; \
+ mv mingw_org_wsl mingwrt-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-$(RELEASE_STATUS)-$(RELEASE_REFERENCE)-src ; \
tar acf ../packages/mingwrt-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-$(RELEASE_STATUS)-$(RELEASE_REFERENCE)-src.tar.lzma mingwrt-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-$(RELEASE_STATUS)-$(RELEASE_REFERENCE)-src
endif
@@ -1270,8 +1270,8 @@ endif
dist-w32api-src:
ifeq ($(RELEASE_STATUS),prod)
- cp -af $(top_srcdir) $(DESTDIR)$(prefix)/mingw.org-wsl
- cd $(DESTDIR)$(prefix)/mingw.org-wsl ; \
+ cp -af $(top_srcdir) $(DESTDIR)$(prefix)/mingw_org_wsl
+ cd $(DESTDIR)$(prefix)/mingw_org_wsl ; \
rm -rf .git autom4te.cache ; \
rm -f config.log config.status config.cache config.h ; \
rm -f .gitignore core a.out Makefile ; \
@@ -1281,11 +1281,11 @@ ifeq ($(RELEASE_STATUS),prod)
find . -type f -name .\*.swp -delete ; \
cd .. ; \
rm -rf w32api-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-src ; \
- mv mingw.org-wsl w32api-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-src ; \
+ mv mingw_org_wsl w32api-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-src ; \
tar acf ../packages/w32api-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-src.tar.lzma w32api-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-src
else
- cp -af $(top_srcdir) $(DESTDIR)$(prefix)/mingw.org-wsl
- cd $(DESTDIR)$(prefix)/mingw.org-wsl ; \
+ cp -af $(top_srcdir) $(DESTDIR)$(prefix)/mingw_org_wsl
+ cd $(DESTDIR)$(prefix)/mingw_org_wsl ; \
rm -rf .git autom4te.cache ; \
rm -f config.log config.status config.cache config.h ; \
rm -f .gitignore core a.out Makefile ; \
@@ -1295,7 +1295,7 @@ else
find . -type f -name .\*.swp -delete ; \
cd .. ; \
rm -rf w32api-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-$(RELEASE_STATUS)-$(RELEASE_REFERENCE)-src ; \
- mv mingw.org-wsl w32api-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-$(RELEASE_STATUS)-$(RELEASE_REFERENCE)-src ; \
+ mv mingw_org_wsl w32api-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-$(RELEASE_STATUS)-$(RELEASE_REFERENCE)-src ; \
tar acf ../packages/w32api-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-$(RELEASE_STATUS)-$(RELEASE_REFERENCE)-src.tar.lzma w32api-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-$(RELEASE_STATUS)-$(RELEASE_REFERENCE)-src
endif
@@ -1359,43 +1359,43 @@ dist-wsl-install: all dist-wsl-mkdir
dist-wsl-dll: dist-wsl-install
ifeq ($(RELEASE_STATUS),prod)
cd ./dist/wsl/installed ; \
- tar acf ../packages/mingw.org-wsl-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-dll.tar.lzma bin/*.dll ;
+ tar acf ../packages/mingw_org_wsl-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-dll.tar.lzma bin/*.dll ;
else
cd ./dist/wsl/installed ; \
- tar acf ../packages/$(RELEASE_STATUS)_mingw.org-wsl-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-$(RELEASE_STATUS)-$(RELEASE_REFERENCE)-dll.tar.lzma bin/*.dll ;
+ tar acf ../packages/$(RELEASE_STATUS)_mingw_org_wsl-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-$(RELEASE_STATUS)-$(RELEASE_REFERENCE)-dll.tar.lzma bin/*.dll ;
endif
dist-wsl-dev: dist-wsl-install
ifeq ($(RELEASE_STATUS),prod)
cd ./dist/wsl/installed ; \
- tar acf ../packages/$(RELEASE_STATUS)_mingw.org-wsl-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-dev.tar.lzma include/ lib/
+ tar acf ../packages/$(RELEASE_STATUS)_mingw_org_wsl-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-dev.tar.lzma include/ lib/
else
cd ./dist/wsl/installed ; \
- tar acf ../packages/$(RELEASE_STATUS)_mingw.org-wsl-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-$(RELEASE_STATUS)-$(RELEASE_REFERENCE)-dev.tar.lzma include/ lib/
+ tar acf ../packages/$(RELEASE_STATUS)_mingw_org_wsl-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-$(RELEASE_STATUS)-$(RELEASE_REFERENCE)-dev.tar.lzma include/ lib/
endif
dist-wsl-lic: dist-wsl-install
ifeq ($(RELEASE_STATUS),prod)
cd ./dist/wsl/installed ; \
- tar acf ../packages/mingw.org-wsl-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-lic.tar.lzma share/doc/mingw.org-wsl/LICENSE
+ tar acf ../packages/mingw_org_wsl-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-lic.tar.lzma share/doc/mingw_org_wsl/LICENSE
else
cd ./dist/wsl/installed ; \
- tar acf ../packages/$(RELEASE_STATUS)_mingw.org-wsl-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-$(RELEASE_STATUS)-$(RELEASE_REFERENCE)-lic.tar.lzma share/doc/mingw.org-wsl/LICENSE
+ tar acf ../packages/$(RELEASE_STATUS)_mingw_org_wsl-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-$(RELEASE_STATUS)-$(RELEASE_REFERENCE)-lic.tar.lzma share/doc/mingw_org_wsl/LICENSE
endif
dist-wsl-doc: dist-wsl-install
ifeq ($(RELEASE_STATUS),prod)
cd ./dist/wsl/installed ; \
- tar acf ../packages/mingw.org-wsl-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-doc.tar.lzma share/doc/mingw.org-wsl/README
+ tar acf ../packages/mingw_org_wsl-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-doc.tar.lzma share/doc/mingw_org_wsl/README
else
cd ./dist/wsl/installed ; \
- tar acf ../packages/$(RELEASE_STATUS)_mingw.org-wsl-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-$(RELEASE_STATUS)-$(RELEASE_REFERENCE)-doc.tar.lzma share/doc/mingw.org-wsl/README
+ tar acf ../packages/$(RELEASE_STATUS)_mingw_org_wsl-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-$(RELEASE_STATUS)-$(RELEASE_REFERENCE)-doc.tar.lzma share/doc/mingw_org_wsl/README
endif
dist-wsl-src: dist-wsl-install
ifeq ($(RELEASE_STATUS),prod)
- cp -af $(top_srcdir) $(DESTDIR)$(prefix)/mingw.org-wsl
- cd $(DESTDIR)$(prefix)/mingw.org-wsl ; \
+ cp -af $(top_srcdir) $(DESTDIR)$(prefix)/mingw_org_wsl
+ cd $(DESTDIR)$(prefix)/mingw_org_wsl ; \
rm -rf .git autom4te.cache ; \
rm -f config.log config.status config.cache config.h ; \
rm -f .gitignore core a.out Makefile ; \
@@ -1404,12 +1404,12 @@ ifeq ($(RELEASE_STATUS),prod)
find . -type f -name \*.bak -delete ; \
find . -type f -name .\*.swp -delete ; \
cd .. ; \
- rm -rf mingw.org-wsl-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-src ; \
- mv mingw.org-wsl mingw.org-wsl-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-src ; \
- tar acf ../packages/mingw.org-wsl-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-src.tar.lzma mingw.org-wsl-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-src
+ rm -rf mingw_org_wsl-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-src ; \
+ mv mingw_org_wsl mingw_org_wsl-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-src ; \
+ tar acf ../packages/mingw_org_wsl-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-src.tar.lzma mingw_org_wsl-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-src
else
- cp -af $(top_srcdir) $(DESTDIR)$(prefix)/mingw.org-wsl
- cd $(DESTDIR)$(prefix)/mingw.org-wsl ; \
+ cp -af $(top_srcdir) $(DESTDIR)$(prefix)/mingw_org_wsl
+ cd $(DESTDIR)$(prefix)/mingw_org_wsl ; \
rm -rf .git autom4te.cache ; \
rm -f config.log config.status config.cache config.h ; \
rm -f .gitignore core a.out Makefile ; \
@@ -1418,9 +1418,9 @@ else
find . -type f -name \*.bak -delete ; \
find . -type f -name .\*.swp -delete ; \
cd .. ; \
- rm -rf $(RELEASE_STATUS)_mingw.org-wsl-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-$(RELEASE_STATUS)-$(RELEASE_REFERENCE)-src ; \
- mv mingw.org-wsl $(RELEASE_STATUS)_mingw.org-wsl-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-$(RELEASE_STATUS)-$(RELEASE_REFERENCE)-src ; \
- tar acf ../packages/$(RELEASE_STATUS)_mingw.org-wsl-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-$(RELEASE_STATUS)-$(RELEASE_REFERENCE)-src.tar.lzma $(RELEASE_STATUS)_mingw.org-wsl-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-$(RELEASE_STATUS)-$(RELEASE_REFERENCE)-src
+ rm -rf $(RELEASE_STATUS)_mingw_org_wsl-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-$(RELEASE_STATUS)-$(RELEASE_REFERENCE)-src ; \
+ mv mingw_org_wsl $(RELEASE_STATUS)_mingw_org_wsl-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-$(RELEASE_STATUS)-$(RELEASE_REFERENCE)-src ; \
+ tar acf ../packages/$(RELEASE_STATUS)_mingw_org_wsl-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-$(RELEASE_STATUS)-$(RELEASE_REFERENCE)-src.tar.lzma $(RELEASE_STATUS)_mingw_org_wsl-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-$(RELEASE_STATUS)-$(RELEASE_REFERENCE)-src
endif
clean-dist: clean-dist-mingwrt clean-dist-w32api clean-dist-wsl
diff --git a/README b/README
index ab54b01..d89d0ff 100644
--- a/README
+++ b/README
@@ -21,7 +21,7 @@
; FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
; DEALINGS IN THE SOFTWARE.
;;
-mingw.org-wsl (Windows System Libraries):
+mingw-org-wsl (Windows System Libraries):
=====
This package contains both the C Runtime (libcrt) and the Windows API (winapi)
definitions as provided by the MinGW.org team. These libraries can be used
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 3 ++
Makefile.in | 60 +++++++++++++++++++++++++++++-----------------------------
README | 2 +-
3 files changed, 34 insertions(+), 31 deletions(-)
hooks/post-receive
--
Repository: mingw-org-wsl
|
|
From: Earnie B. <no...@so...> - 2013-06-27 12:08:30
|
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 2e1e5c90e5078ebcfa6c51271706e49b934b9a86 (commit)
via 2e52c40a3bf2b76d8b23d14901feadc3fe9c3181 (commit)
from 22068f31e7e2118d462387e1f27c806eba76ac5f (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/2e1e5c90e5078ebcfa6c51271706e49b934b9a86/
commit 2e1e5c90e5078ebcfa6c51271706e49b934b9a86
Merge: 2e52c40 22068f3
Author: Earnie Boyd <ea...@us...>
Date: Thu Jun 27 08:06:58 2013 -0400
Resolve issue to define all components of _STAT_DEFINED.
diff --cc ChangeLog
index f5d9b28,857a157..55ffc75
--- a/ChangeLog
+++ b/ChangeLog
@@@ -1,7 -1,9 +1,14 @@@
+2013-06-27 Earnie Boyd <ea...@us...>
+
+ * include/wchar.h: Resolve issue to define all components of
- _STAT_DEFINED.
++ _STAT_DEFINED
++
+ 2013-06-25 Keith Marshall <kei...@us...>
+
+ Correct ill advised use of non-standard shell syntax.
+
+ * Makefile.in (lib%.a): Remove bash/ksh/csh style logic construct;
+ replace it using standard Bourne shell "test" command syntax.
2013-06-21 Mark Brand <ma...@ma...>
https://sf.net/p/mingw/mingw-org-wsl/ci/2e52c40a3bf2b76d8b23d14901feadc3fe9c3181/
commit 2e52c40a3bf2b76d8b23d14901feadc3fe9c3181
Author: Earnie Boyd <ea...@us...>
Date: Thu Jun 27 08:03:15 2013 -0400
Resolve issue to define all components of _STAT_DEFINED.
diff --git a/ChangeLog b/ChangeLog
index 7bee564..f5d9b28 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-06-27 Earnie Boyd <ea...@us...>
+
+ * include/wchar.h: Resolve issue to define all components of
+ _STAT_DEFINED.
+
2013-06-21 Mark Brand <ma...@ma...>
* include/time.h: Correct typecasts throughout.
diff --git a/include/wchar.h b/include/wchar.h
index 1a1c461..87b8d84 100644
--- a/include/wchar.h
+++ b/include/wchar.h
@@ -598,6 +598,7 @@ _CRTIMP int __cdecl __MINGW_NOTHROW _wrmdir (const wchar_t*);
#define _WDIRECT_DEFINED
#endif /* _WDIRECT_DEFINED */
+/* @TODO: Use sys/stat.h to define these instead of duplicated code. */
#ifndef _STAT_DEFINED
/*
* The structure manipulated and returned by stat and fstat.
@@ -624,30 +625,30 @@ struct _stat32
#ifndef __STRICT_ANSI__
struct stat {
- _dev_t st_dev; /* Equivalent to drive number 0=A 1=B ... */
- _ino_t st_ino; /* Always zero ? */
- _mode_t st_mode; /* See above constants */
- short st_nlink; /* Number of links. */
- short st_uid; /* User: Maybe significant on NT ? */
- short st_gid; /* Group: Ditto */
- _dev_t st_rdev; /* Seems useless (not even filled in) */
- _off_t st_size; /* File size in bytes */
- time_t st_atime; /* Accessed date (always 00:00 hrs local
- * on FAT) */
- time_t st_mtime; /* Modified time */
- time_t st_ctime; /* Creation time */
-} ;
+ _dev_t st_dev; /* Equivalent to drive number 0=A 1=B ... */
+ _ino_t st_ino; /* Always zero ? */
+ _mode_t st_mode; /* See above constants */
+ short st_nlink; /* Number of links. */
+ short st_uid; /* User: Maybe significant on NT ? */
+ short st_gid; /* Group: Ditto */
+ _dev_t st_rdev; /* Seems useless (not even filled in) */
+ _off_t st_size; /* File size in bytes */
+ time_t st_atime; /* Accessed date (always 00:00 hrs local
+ * on FAT) */
+ time_t st_mtime; /* Modified time */
+ time_t st_ctime; /* Creation time */
+};
#endif /* __STRICT_ANSI__ */
struct _stat64 {
- dev_t st_dev; /* Equivalent to drive number 0=A 1=B ... */
- ino_t st_ino; /* Always zero ? */
- mode_t st_mode; /* See above constants */
- short st_nlink; /* Number of links. */
- short st_uid; /* User: Maybe significant on NT ? */
- short st_gid; /* Group: Ditto */
- dev_t st_rdev; /* Seems useless (not even filled in) */
- _off64_t st_size; /* File size in bytes */
+ dev_t st_dev; /* Equivalent to drive number 0=A 1=B ... */
+ ino_t st_ino; /* Always zero ? */
+ mode_t st_mode; /* See above constants */
+ short st_nlink; /* Number of links. */
+ short st_uid; /* User: Maybe significant on NT ? */
+ short st_gid; /* Group: Ditto */
+ dev_t st_rdev; /* Seems useless (not even filled in) */
+ _off64_t st_size; /* File size in bytes */
__time64_t st_atime; /* Accessed date (always 00:00 hrs local
* on FAT) */
__time64_t st_mtime; /* Modified time */
@@ -666,7 +667,7 @@ struct _stat32i64 {
__time32_t st_atime;
__time32_t st_mtime;
__time32_t st_ctime;
-} ;
+};
struct _stat64i32 {
_dev_t st_dev;
@@ -682,20 +683,124 @@ struct _stat64i32 {
__time64_t st_ctime;
};
+/* _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 _stat64 (const char*, struct _stat64*);
+int __cdecl __MINGW_NOTHROW _stat32i64 (const char*, struct _stat32i64*);
+int __cdecl __MINGW_NOTHROW _stat64i32 (const char*, struct _stat64i32*);
+
+/* _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*);
+int __cdecl __MINGW_NOTHROW _fstat32i64 (int, struct _stat32i64*);
+int __cdecl __MINGW_NOTHROW _fstat64i32 (int, struct _stat64i32*);
+
+__CRT_MAYBE_INLINE int __cdecl _fstat64i32(int desc, struct _stat64i32 *_stat) {
+ struct _stat64 st;
+ int ret = _fstat64(desc, &st);
+ if (ret == -1) {
+ memset(_stat, 0, sizeof(struct _stat64i32));
+ 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_MAYBE_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_MAYBE_INLINE int __cdecl _stat64i32(const char *fname, struct _stat64i32 *_stat) {
+ struct _stat64 st;
+ int ret = _stat64(fname, &st);
+ if (ret == -1) {
+ memset(_stat, 0, sizeof(struct _stat64i32));
+ 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_MAYBE_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;
+}
+
#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 */
+
+#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 */
+
+#endif /* _STAT_DEFINED */
#if !defined ( _WSTAT_DEFINED) /* also declared in sys/stat.h */
/* _wstat32 does not exist in MSVCRT.DLL */
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 5 ++
include/wchar.h | 153 ++++++++++++++++++++++++++++++++++++++++++++++---------
2 files changed, 134 insertions(+), 24 deletions(-)
hooks/post-receive
--
Repository: mingw-org-wsl
|
|
From: Keith M. <no...@so...> - 2013-06-25 20:37:00
|
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 22068f31e7e2118d462387e1f27c806eba76ac5f (commit)
from f67fa09f32d01c6776511836206330b855178fff (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/22068f31e7e2118d462387e1f27c806eba76ac5f/
commit 22068f31e7e2118d462387e1f27c806eba76ac5f
Author: Keith Marshall <kei...@us...>
Date: Tue Jun 25 21:36:44 2013 +0100
Correct ill advised use of non-standard shell syntax.
diff --git a/ChangeLog b/ChangeLog
index 7bee564..857a157 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2013-06-25 Keith Marshall <kei...@us...>
+
+ Correct ill advised use of non-standard shell syntax.
+
+ * Makefile.in (lib%.a): Remove bash/ksh/csh style logic construct;
+ replace it using standard Bourne shell "test" command syntax.
+
2013-06-21 Mark Brand <ma...@ma...>
* include/time.h: Correct typecasts throughout.
diff --git a/Makefile.in b/Makefile.in
index bde26c3..4356628 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -724,12 +724,12 @@ lib%.a: %.def
V=`echo $@ | sed -e 's|lib\([a-z]*\)\([0-9]*\).*|\2|'`; \
DLLNAME="$${N}$${V}.dll"; \
$(DLLTOOL) $(DLLTOOL_FLAGS) $${DLLNAME} --def $< --output-lib $@ ; \
- if [[ $${DLLNAME} = msvcrt.dll || \
- $${DLLNAME} = msvcrtd.dll || \
- $${DLLNAME} = msvcr70.dll || \
- $${DLLNAME} = msvcr70d.dll || \
- $${DLLNAME} = msvcr71.dll || \
- $${DLLNAME} = msvcr71d.dll ]]; then \
+ if test $${DLLNAME} = msvcrt.dll \
+ -o $${DLLNAME} = msvcrtd.dll \
+ -o $${DLLNAME} = msvcr70.dll \
+ -o $${DLLNAME} = msvcr70d.dll \
+ -o $${DLLNAME} = msvcr71.dll \
+ -o $${DLLNAME} = msvcr71d.dll; then \
$(AR) rc $@ src/libcrt/crt/ofmt_stub.o; \
fi
$(RANLIB) $@
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 7 +++++++
Makefile.in | 12 ++++++------
2 files changed, 13 insertions(+), 6 deletions(-)
hooks/post-receive
--
Repository: mingw-org-wsl
|
|
From: Keith M. <no...@so...> - 2013-06-24 21:21: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-get".
The branch, master has been updated
via b4e3507baed9e13b5aab6a682251c922aab3b99f (commit)
from 360d7f996802046f38941c12e4158a87bdf7567e (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-get/ci/b4e3507baed9e13b5aab6a682251c922aab3b99f/
commit b4e3507baed9e13b5aab6a682251c922aab3b99f
Author: Keith Marshall <kei...@us...>
Date: Mon Jun 24 22:19:50 2013 +0100
Facilitate version synchronisation for mingw-get-setup.
diff --git a/ChangeLog b/ChangeLog
index 98d5889..1372d29 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2013-06-24 Keith Marshall <kei...@us...>
+
+ Facilitate version synchronisation for mingw-get-setup.
+
+ * VERSION.m4: New file.
+ * configure.ac: Include it, and...
+ (AC_INIT): ...use it.
+
2013-06-21 Keith Marshall <kei...@us...>
Keep version strings clean when release class is unspecified.
diff --git a/VERSION.m4 b/VERSION.m4
new file mode 100644
index 0000000..822b420
--- /dev/null
+++ b/VERSION.m4
@@ -0,0 +1,31 @@
+# VERSION.m4 -*- autoconf -*- vim: filetype=config
+#
+# $Id$
+#
+# Written by Keith Marshall <kei...@us...>
+# Copyright (C) 2013, MinGW.org Project
+#
+#
+# Configuration script version specification for mingw-get
+#
+#
+# This is free software. Permission is granted to copy, modify and
+# redistribute this software, under the provisions of the GNU General
+# Public License, Version 3, (or, at your option, any later version),
+# as published by the Free Software Foundation; see the file COPYING
+# for licensing details.
+#
+# Note, in particular, that this software is provided "as is", in the
+# hope that it may prove useful, but WITHOUT WARRANTY OF ANY KIND; not
+# even an implied WARRANTY OF MERCHANTABILITY, nor of FITNESS FOR ANY
+# PARTICULAR PURPOSE. Under no circumstances will the author, or the
+# MinGW.org Project, accept liability for any damages, however caused,
+# arising from the use of this software.
+#
+ m4_define([VERSION_MAJOR], [0])
+ m4_define([VERSION_MINOR], [6])
+ m4_define([VERSION_PATCH], [0])
+
+ m4_define([__VERSION__], [VERSION_MAJOR.VERSION_MINOR.VERSION_PATCH])
+
+# $RCSfile$: end of file
diff --git a/configure.ac b/configure.ac
index 2c3b2fc..d660076 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,8 @@
# MinGW.org Project, accept liability for any damages, however caused,
# arising from the use of this software.
#
- AC_INIT([mingw-get],[0.6.0],[http://mingw.org/Reporting_Bugs])
+ m4_include([VERSION.m4])
+ AC_INIT([mingw-get],__VERSION__,[http://mingw.org/Reporting_Bugs])
AC_SUBST([COPYRIGHT_HOLDER],["MinGW.org Project"])
AC_SUBST([YEARS_OF_ISSUE],["2009-2013"])
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 8 ++++++++
VERSION.m4 | 31 +++++++++++++++++++++++++++++++
configure.ac | 3 ++-
3 files changed, 41 insertions(+), 1 deletions(-)
create mode 100644 VERSION.m4
hooks/post-receive
--
Repository: mingw-get
|
|
From: Keith M. <no...@so...> - 2013-06-21 20:05: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-get".
The branch, master has been updated
via 360d7f996802046f38941c12e4158a87bdf7567e (commit)
from 779318fc5ce4778670261a3b9ca22e285c0bd0ca (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-get/ci/360d7f996802046f38941c12e4158a87bdf7567e/
commit 360d7f996802046f38941c12e4158a87bdf7567e
Author: Keith Marshall <kei...@us...>
Date: Fri Jun 21 10:34:10 2013 +0100
Keep version strings clean when release class is unspecified.
diff --git a/ChangeLog b/ChangeLog
index 8539bbd..98d5889 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2013-06-21 Keith Marshall <kei...@us...>
+
+ Keep version strings clean when release class is unspecified.
+
+ * Makefile.in (RC_SCRIPT, VERSION_SCRIPT): Simplify; assign specified
+ release class to local variable; delegate release tag generation to...
+ (TAG_SCRIPT): ...this; check release class variable is not an empty
+ string, before inserting it into the generated release tag.
+
2013-06-20 Keith Marshall <kei...@us...>
Rework defective assignment of product version resources.
diff --git a/Makefile.in b/Makefile.in
index ac2e67a..78a3133 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -119,20 +119,21 @@ AWK_PRINT_LINE_BUFFER = print linebuf;
# specific package meta-data into compiled resource modules.
#
RC = @RC@
-RC_SCRIPT = tag=$(BUILD_TAG); \
- test "x$$tag" != x && tag="-$(GUI_RELEASE_CLASS)-$$tag"; \
+RC_SCRIPT = tag_class=$(GUI_RELEASE_CLASS) \
$(TAG_SCRIPT)
-VERSION_SCRIPT = tag=$(BUILD_TAG); \
- test "x$$tag" != x && tag="-$(CLI_RELEASE_CLASS)-$$tag"; \
+VERSION_SCRIPT = tag_class=$(CLI_RELEASE_CLASS) \
$(TAG_SCRIPT)
-TAG_SCRIPT = sed \
- -e "s!%PACKAGE_NAME%!$(PACKAGE_TARNAME)!g" \
- -e "s!%PACKAGE_VERSION%!$(PACKAGE_VERSION)$$tag!g" \
- -e "s!%PACKAGE_VERINFO_PRODUCT_VERSION%!`$(PACKAGE_VERINFO_SCRIPT)`!g" \
- -e "s!%COPYRIGHT_HOLDER%!@COPYRIGHT_HOLDER@!g" \
- -e "s!%YEARS_OF_ISSUE%!@YEARS_OF_ISSUE@!g"
+TAG_SCRIPT = tag=$(BUILD_TAG); \
+ test "x$$tag_class" != x && test "x$$tag" != x && tag="$$tag_class-$$tag"; \
+ test "x$$tag" != x && tag="-$$tag"; \
+ sed \
+ -e "s!%PACKAGE_NAME%!$(PACKAGE_TARNAME)!g" \
+ -e "s!%PACKAGE_VERSION%!$(PACKAGE_VERSION)$$tag!g" \
+ -e "s!%PACKAGE_VERINFO_PRODUCT_VERSION%!`$(PACKAGE_VERINFO_SCRIPT)`!g" \
+ -e "s!%COPYRIGHT_HOLDER%!@COPYRIGHT_HOLDER@!g" \
+ -e "s!%YEARS_OF_ISSUE%!@YEARS_OF_ISSUE@!g"
PACKAGE_VERINFO_SCRIPT = \
echo $(PACKAGE_VERSION) | awk -F. '{ \
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 9 +++++++++
Makefile.in | 21 +++++++++++----------
2 files changed, 20 insertions(+), 10 deletions(-)
hooks/post-receive
--
Repository: mingw-get
|
|
From: Earnie B. <no...@so...> - 2013-06-21 15:46: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, 4.0-dev has been updated
via f67fa09f32d01c6776511836206330b855178fff (commit)
from 38a1ac5068ce24f16e15f1e166a86d3c9cdcadfe (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/f67fa09f32d01c6776511836206330b855178fff/
commit f67fa09f32d01c6776511836206330b855178fff
Author: Earnie Boyd <ea...@us...>
Date: Fri Jun 21 11:46:12 2013 -0400
Resolve incorrect type casts in time.h.
diff --git a/ChangeLog b/ChangeLog
index 36ad7f3..7bee564 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2013-06-21 Mark Brand <ma...@ma...>
+
+ * include/time.h: Correct typecasts throughout.
+
2013-06-18 Earnie Boyd <ea...@us...>
* include/io.h (_findfirst*, _findnext*): Remove the __NO_INLINE__
diff --git a/include/time.h b/include/time.h
index ca55701..1a24d1d 100644
--- a/include/time.h
+++ b/include/time.h
@@ -157,7 +157,7 @@ _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));
+ 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));
@@ -166,13 +166,13 @@ _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));
+ return (ctime((time_t*)_v1));
}
_CRTALIAS struct tm* __cdecl __MINGW_NOTHROW _gmtime32(const __time32_t* _v1) {
- return (gmtime((time_t)_v1));
+ return (gmtime((time_t*)_v1));
}
_CRTALIAS struct tm* __cdecl __MINGW_NOTHROW _localtime32(const __time32_t* _v1) {
- return (localtime((time_t)_v1));
+ return (localtime((time_t*)_v1));
}
#endif /* MSVCRT_VERSION >= 800 */
@@ -253,7 +253,7 @@ _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wctime32(const __time32_t*);
#else
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wctime(const time_t*);
_CRTALIAS wchar_t* __cdecl __MINGW_NOTHROW _wctime32(const __time32_t* _v) {
- return(_wctime((time_t)_v));
+ return(_wctime((time_t*)_v));
}
#endif /* MSVCRT_VERSION >= 800 */
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 4 ++++
include/time.h | 10 +++++-----
2 files changed, 9 insertions(+), 5 deletions(-)
hooks/post-receive
--
Repository: mingw-org-wsl
|
|
From: Keith M. <no...@so...> - 2013-06-20 19:19: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-get".
The branch, master has been updated
via 779318fc5ce4778670261a3b9ca22e285c0bd0ca (commit)
via 621b9cc54d673ac2a8b6075d474ad8261f50946c (commit)
from 95a4ee4e769f5ca3981a56911e2a7d35e4e0f3e1 (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-get/ci/779318fc5ce4778670261a3b9ca22e285c0bd0ca/
commit 779318fc5ce4778670261a3b9ca22e285c0bd0ca
Author: Keith Marshall <kei...@us...>
Date: Thu Jun 20 16:25:16 2013 +0100
Rework defective assignment of product version resources.
diff --git a/ChangeLog b/ChangeLog
index 63da559..8539bbd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2013-06-20 Keith Marshall <kei...@us...>
+
+ Rework defective assignment of product version resources.
+
+ * Makefile.in (BUILD_TAG): Avoid creating an empty build.tag file.
+ (PACKAGE_VERINFO_SCRIPT): Ensure that the build tag is generated as a
+ string of non-zero length. Do not assume that it comprises only two
+ elements; extract the final two, as the third and fourth elements
+ of the product version meta-data record.
+
2013-06-19 Keith Marshall <kei...@us...>
Rework defective package build time-stamping logic.
diff --git a/Makefile.in b/Makefile.in
index cf757d0..ac2e67a 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -30,7 +30,7 @@ PACKAGE_SUBSYSTEM = @host_os@
CLI_RELEASE_CLASS = @CLI_RELEASE_CLASS@
GUI_RELEASE_CLASS = @GUI_RELEASE_CLASS@
-BUILD_TAG = `>> build.tag; cat build.tag`
+BUILD_TAG = `test -f build.tag && cat build.tag`
DEBUGLEVEL = @DEBUGLEVEL@
# Establish the appropriate mechanism for invoking 'make' recursively,
@@ -116,7 +116,7 @@ AWK_PRINT_LINE_BUFFER = print linebuf;
# Identify an appropriate resource compiler, for GUI builds,
# and define a set of script macros to propagate the build-time
-# specific package meta-data into the compile resource modules.
+# specific package meta-data into compiled resource modules.
#
RC = @RC@
RC_SCRIPT = tag=$(BUILD_TAG); \
@@ -137,11 +137,9 @@ TAG_SCRIPT = sed \
PACKAGE_VERINFO_SCRIPT = \
echo $(PACKAGE_VERSION) | awk -F. '{ \
printf "%d, %d, ", $$1, $$2 * 100 + $$3 \
- }'; \
- (test -f build.tag && cat build.tag || date +%Y%m%d-0) | awk -F- '{ \
- printf "%d, %d", (( substr( $$1, 1, 4 ) - 1970 ) * 16 \
- + substr( $$1, 5, 2 )) * 32 + substr( $$1, 7, 2 ), \
- $$2 \
+ }'; (test "x$$tag" = x && date +%Y%m%d-0 || echo $$tag) | awk -F- '{ \
+ DF = NF - 1; printf "%d, %d", (( substr( $$DF, 1, 4 ) - 1970 ) * 16 \
+ + substr( $$DF, 5, 2 )) * 32 + substr( $$DF, 7, 2 ), $$NF \
}'
RC_INCLUDES = -I . -I ${srcdir}/src -I ${srcdir}/icons
https://sf.net/p/mingw/mingw-get/ci/621b9cc54d673ac2a8b6075d474ad8261f50946c/
commit 621b9cc54d673ac2a8b6075d474ad8261f50946c
Author: Keith Marshall <kei...@us...>
Date: Wed Jun 19 15:35:53 2013 +0100
Rework defective package build time-stamping logic.
diff --git a/ChangeLog b/ChangeLog
index 14bfb06..63da559 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2013-06-19 Keith Marshall <kei...@us...>
+
+ Rework defective package build time-stamping logic.
+
+ * Makefile.in (%.time): Make it explicitly touch its target; the
+ 2013-05-15 changes, to reduce redundancy, didn't work as expected.
+ (%.tag): Add a side effect; make it also explicitly touch %.time.
+ (%.tagged.time): This is now redundant; remove it.
+
2013-06-14 Keith Marshall <kei...@us...>
Collect distributable package files in user specified directory.
diff --git a/Makefile.in b/Makefile.in
index c30d14d..cf757d0 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -249,20 +249,21 @@ sinclude *.d
%.$(OBJEXT): %.ico
echo $* ICON $*.ico | $(RC) -I ${srcdir}/icons -o $@
-# Release tagging...
+# Release tagging; note that, whereas %.time is nominally updated as
+# a side effect of %.tag, we also must provide an explicit rule which
+# will update it directly. This ensures that we may INDIRECTLY force
+# a dependency on the TIME when %.tag is updated, WITHOUT creating an
+# explicit dependency on %.tag itself.
#
time-stamp:
-%.tagged.time: time-stamp
- > $*.time
-
-%.time: %.tagged.time
-
-%.tag: %.tagged.time
+%.time:; > $@
+%.tag: time-stamp
>> $@; tag=`date +%Y%m%d`; \
tag=`awk -F- -v today=$$tag ' \
BEGIN { tag = 1 } $$1 == today { tag += $$2 } \
END { print today "-" tag }' $@`; \
echo $$tag > $@
+ > $*.time
%.c: %.c.in
$(VERSION_SCRIPT) $< > $@
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 19 +++++++++++++++++++
Makefile.in | 27 +++++++++++++--------------
2 files changed, 32 insertions(+), 14 deletions(-)
hooks/post-receive
--
Repository: mingw-get
|
|
From: Earnie B. <no...@so...> - 2013-06-19 19:30:42
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Repository: mingw-dist".
The branch, master has been updated
via a1406a3200b691e10bceaa8e704798c32c1537bd (commit)
from e0b404737a39ee35d0e21388ff0d60138ceedf28 (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/a1406a3200b691e10bceaa8e704798c32c1537bd/
commit a1406a3200b691e10bceaa8e704798c32c1537bd
Author: Earnie Boyd <ea...@us...>
Date: Wed Jun 19 15:30:15 2013 -0400
Update for wsl-4.0 release candidate 3.
diff --git a/ChangeLog b/ChangeLog
index 37f3b2a..520ebce 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2013-06-19 Earnie Boyd <ea...@us...>
+
+ * mingw32/mingw32-wsl-candidate.xml: Add wsl_rc-4.0-1-mingw32-rc-3.
+ * package-list.xml.lzma mingw32-package-list.xml.lzma: Regenerated.
+ * common/issue.log mingw32/issue.log: Update accordingly.
+
2013-05-30 Keith Marshall <kei...@us...>
Update and publish pexports.
diff --git a/common/issue.log b/common/issue.log
index e19be2b..c25830e 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 2013053000 package-list.xml
+ 75fc52dde8d408d798c0be51070d5d02f4c63085 2013061800 package-list.xml
#
# $RCSfile$: end of file
diff --git a/mingw32/issue.log b/mingw32/issue.log
index 10c52f9..f80eaf1 100644
--- a/mingw32/issue.log
+++ b/mingw32/issue.log
@@ -50,12 +50,12 @@
cd33ad74b608bce33ea297801253e6efbafce27c 2012073100 mingw32-mingw-utils.xml
d31c39c6584fde6d4b9ddafbca913509b32a1dfc 2012073100 mingw32-mpc.xml
99995a8e17659b6514f71ae2b17bbbcd8eb4c0a9 2012073100 mingw32-mpfr.xml
- 983af8ad24a6f97da867784dfeeecc6661d54d88 2013053000 mingw32-package-list.xml
+ 983af8ad24a6f97da867784dfeeecc6661d54d88 2013061800 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
- dc644d5fcefc44cd546d7ab4bc11d47ac52f2236 2013041000 mingw32-wsl-candidate.xml
+ 8111d853ffb3cfd3f4ec62324b17d9a9403ff0fe 2013061800 mingw32-wsl-candidate.xml
247a02890f109a5fe4996fde4af9d576dca3cd1e 2012073100 mingw32-xz.xml
4a2e1515655331483b8ddc898b2405fb89401d73 2012073100 mingw32-zlib.xml
#
diff --git a/mingw32/mingw32-wsl-candidate.xml b/mingw32/mingw32-wsl-candidate.xml
index 22ad801..42a7a4c 100644
--- a/mingw32/mingw32-wsl-candidate.xml
+++ b/mingw32/mingw32-wsl-candidate.xml
@@ -63,6 +63,7 @@
<package name="mingw32-wsl_rc">
<component class="meta">
+ <release tarname="wsl_rc-4.0-1-mingw32-rc-3-meta.tar.lzma" />
<release tarname="wsl_rc-4.0-1-mingw32-rc-2-meta.tar.lzma" />
<release tarname="wsl_rc-4.0-1-mingw32-rc-1-meta.tar.lzma" />
<action class="pre-install">
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 6 ++++++
common/issue.log | 2 +-
mingw32/issue.log | 4 ++--
mingw32/mingw32-wsl-candidate.xml | 1 +
4 files changed, 10 insertions(+), 3 deletions(-)
hooks/post-receive
--
Repository: mingw-dist
|
|
From: Earnie B. <no...@so...> - 2013-06-19 18:07: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, 4.0-dev has been updated
via 38a1ac5068ce24f16e15f1e166a86d3c9cdcadfe (commit)
from 16281c42c1f0351fb4cdd2c14307894d1e106fa1 (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/38a1ac5068ce24f16e15f1e166a86d3c9cdcadfe/
commit 38a1ac5068ce24f16e15f1e166a86d3c9cdcadfe
Author: Earnie Boyd <ea...@us...>
Date: Wed Jun 19 11:21:41 2013 -0400
Remove time_t definition from wchar.h and change _findfrist* and _findnext* to __CRT_MAYBE_INLINE.
diff --git a/ChangeLog b/ChangeLog
index 265696e..36ad7f3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2013-06-18 Earnie Boyd <ea...@us...>
+
+ * include/io.h (_findfirst*, _findnext*): Remove the __NO_INLINE__
+ filter and change the signature to __CRT_MAYBE_INLINE.
+ * include/wchar.h (time_t): Remove definition.
+ * include/sys/types.h: Add comment for time_t indicating other files
+ where time_t is defined.
+
2013-06-17 Earnie Boyd <ea...@us...>
* include/_mingw.h (__CRT_MAYBE_INLINE): When __NO_INLINE__ defined we
diff --git a/include/io.h b/include/io.h
index 3f32528..271d928 100644
--- a/include/io.h
+++ b/include/io.h
@@ -232,9 +232,8 @@ _CRTIMP int __cdecl __MINGW_NOTHROW _findnext64(intptr_t, struct __finddata64_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) {
+__CRT_MAYBE_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) {
@@ -250,7 +249,7 @@ __CRT_INLINE __cdecl __MINGW_NOTHROW intptr_t _findfirst32i64(const char* _filen
return ret;
}
-__CRT_INLINE __cdecl __MINGW_NOTHROW intptr_t _findfirst64i32(const char* _filename, struct _finddata64i32_t* _fdata) {
+__CRT_MAYBE_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) {
@@ -266,7 +265,7 @@ __CRT_INLINE __cdecl __MINGW_NOTHROW intptr_t _findfirst64i32(const char* _filen
return ret;
}
-__CRT_INLINE __cdecl __MINGW_NOTHROW intptr_t _findnext32i64(intptr_t _fp, struct _finddata32i64_t* _fdata) {
+__CRT_MAYBE_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) {
@@ -282,7 +281,7 @@ __CRT_INLINE __cdecl __MINGW_NOTHROW intptr_t _findnext32i64(intptr_t _fp, struc
return ret;
}
-__CRT_INLINE __cdecl __MINGW_NOTHROW intptr_t _findnext64i32(intptr_t _fp, struct _finddata64i32_t* _fdata) {
+__CRT_MAYBE_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) {
@@ -297,12 +296,6 @@ __CRT_INLINE __cdecl __MINGW_NOTHROW intptr_t _findnext64i32(intptr_t _fp, struc
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);
diff --git a/include/sys/types.h b/include/sys/types.h
index 1c16260..9c7fcf9 100644
--- a/include/sys/types.h
+++ b/include/sys/types.h
@@ -35,6 +35,11 @@
#ifndef RC_INVOKED
+/*
+ * A type for storing the current time and date. This is the number of
+ * seconds since midnight Jan 1, 1970.
+ * NOTE: This is also defined in time.h.
+ */
#ifndef _TIME32_T_DEFINED
typedef __int32 __time32_t;
#define _TIME32_T_DEFINED
diff --git a/include/wchar.h b/include/wchar.h
index 233941c..1a1c461 100644
--- a/include/wchar.h
+++ b/include/wchar.h
@@ -84,11 +84,6 @@ typedef struct _iobuf
} FILE;
#endif /* Not _FILE_DEFINED */
-#ifndef _TIME_T_DEFINED /* Also in time.h */
-typedef long time_t;
-#define _TIME_T_DEFINED
-#endif
-
#ifndef _TM_DEFINED /* Also in time.h */
struct tm {
int tm_sec; /* seconds after the minute - [0,59] */
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 8 ++++++++
include/io.h | 15 ++++-----------
include/sys/types.h | 5 +++++
include/wchar.h | 5 -----
4 files changed, 17 insertions(+), 16 deletions(-)
hooks/post-receive
--
Repository: mingw-org-wsl
|
|
From: Earnie B. <no...@so...> - 2013-06-17 17: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-org-wsl".
The branch, 4.0-dev has been updated
via 16281c42c1f0351fb4cdd2c14307894d1e106fa1 (commit)
from 8614d1f4afc8f7e8d15abbf71ebc0243253c014a (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/16281c42c1f0351fb4cdd2c14307894d1e106fa1/
commit 16281c42c1f0351fb4cdd2c14307894d1e106fa1
Author: Earnie Boyd <ea...@us...>
Date: Mon Jun 17 13:33:54 2013 -0400
Further corrections for _wfindfirst* and _wfindnext*. Work around issue for __CRT_MAYBE_INLINE when __NO_INLINE__ defined.
diff --git a/ChangeLog b/ChangeLog
index 2b7abc9..265696e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2013-06-17 Earnie Boyd <ea...@us...>
+
+ * include/_mingw.h (__CRT_MAYBE_INLINE): When __NO_INLINE__ defined we
+ need to make it _CRTALIAS to avoid auto export issues.
+ * include/io.h (_wfindfirst*, _wfindnext*): Remove the __NO_INLINE__
+ filter and use __CRT_MAYBE_INLINE definitions.
+ * include/wchar.h (_wfindfirst*, _wfindnext*): Correct the declarations.
+ (_wfindfirst32i64, _wfindfirst64i32, _wfindnext32i64, _wfindnext64i32):
+ Define as __CRT_MAYBE_INLINE.
+
2013-06-16 Earnie Boyd <ea...@us...>
* NEWS: Add text for MSVCRT_VERSION and for the _CRTALIAS 32bit time_t
diff --git a/include/_mingw.h b/include/_mingw.h
index eb7c41f..765c60e 100644
--- a/include/_mingw.h
+++ b/include/_mingw.h
@@ -210,7 +210,7 @@
#ifndef __NO_INLINE__
#define __CRT_MAYBE_INLINE __CRT_INLINE
#else /* def __NO_INLINE__ */
-#define __CRT_MAYBE_INLINE
+#define __CRT_MAYBE_INLINE _CRTALIAS /* We need to inline to stop auto-export */
#endif /* ndef __NO_INLINE__ */
#ifdef __cplusplus
diff --git a/include/io.h b/include/io.h
index 6581094..3f32528 100644
--- a/include/io.h
+++ b/include/io.h
@@ -428,9 +428,8 @@ _CRTIMP int __cdecl __MINGW_NOTHROW _wfindnext64(intptr_t, struct _wfinddata64_t
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) {
+__CRT_MAYBE_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) {
@@ -446,7 +445,7 @@ __CRT_INLINE __cdecl __MINGW_NOTHROW intptr_t _wfindfirst32i64(const wchar_t* _f
return ret;
}
-__CRT_INLINE __cdecl __MINGW_NOTHROW intptr_t _wfindfirst64i32(const wchar_t* _filename, struct _wfinddata64i32_t* _fdata) {
+__CRT_MAYBE_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) {
@@ -462,7 +461,7 @@ __CRT_INLINE __cdecl __MINGW_NOTHROW intptr_t _wfindfirst64i32(const wchar_t* _f
return ret;
}
-__CRT_INLINE __cdecl __MINGW_NOTHROW intptr_t _wfindnext32i64(intptr_t _fp, struct _wfinddata32i64_t* _fdata) {
+__CRT_MAYBE_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) {
@@ -478,7 +477,7 @@ __CRT_INLINE __cdecl __MINGW_NOTHROW intptr_t _wfindnext32i64(intptr_t _fp, stru
return ret;
}
-__CRT_INLINE __cdecl __MINGW_NOTHROW intptr_t _wfindnext64i32(intptr_t _fp, struct _wfinddata64i32_t* _fdata) {
+__CRT_MAYBE_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) {
@@ -494,22 +493,6 @@ __CRT_INLINE __cdecl __MINGW_NOTHROW intptr_t _wfindnext64i32(intptr_t _fp, stru
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
diff --git a/include/wchar.h b/include/wchar.h
index 0efaedc..233941c 100644
--- a/include/wchar.h
+++ b/include/wchar.h
@@ -489,25 +489,90 @@ _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 long __cdecl __MINGW_NOTHROW _wfindfirsti64 (const wchar_t*, struct _wfinddatai64_t*);
+_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wfindfirst (const wchar_t*, struct _wfinddata32_t*);
+_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wfindfirsti64 (const wchar_t*, struct _wfinddatai64_t*);
_CRTIMP int __cdecl __MINGW_NOTHROW _wfindnexti64 (long, struct _wfinddatai64_t*);
-_CRTIMP long __cdecl __MINGW_NOTHROW _wfindfirst32i64 (const wchar_t*, struct _wfinddata32i64_t*);
-_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*);
+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 _wfindnext (intptr_t, struct _wfinddata32_t*);
+int __cdecl __MINGW_NOTHROW _wfindnext32i64 (intptr_t, struct _wfinddata32i64_t*);
+int __cdecl __MINGW_NOTHROW _wfindnext64i32 (intptr_t, 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*);
/* _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);
}
+#include <string.h>
+__CRT_MAYBE_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_MAYBE_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_MAYBE_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_MAYBE_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;
+}
+
#if defined(_USE_32BIT_TIME_T)
#define _wfinddata_t _wfinddata32_t
#define _wfinddatai64_t _wfinddata32i64_t
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 10 +++++++
include/_mingw.h | 2 +-
include/io.h | 25 +++--------------
include/wchar.h | 79 +++++++++++++++++++++++++++++++++++++++++++++++++-----
4 files changed, 87 insertions(+), 29 deletions(-)
hooks/post-receive
--
Repository: mingw-org-wsl
|
|
From: Earnie B. <no...@so...> - 2013-06-16 19:08:23
|
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 8614d1f4afc8f7e8d15abbf71ebc0243253c014a (commit)
from d4a74a9c3f2752d7cf6c35180f3672501f6b91a2 (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/8614d1f4afc8f7e8d15abbf71ebc0243253c014a/
commit 8614d1f4afc8f7e8d15abbf71ebc0243253c014a
Author: Earnie Boyd <ea...@us...>
Date: Sun Jun 16 15:07:56 2013 -0400
Update NEWS for MSVCRT_VERSION and _CRTALIAS of time functions.
diff --git a/ChangeLog b/ChangeLog
index 91c6818..2b7abc9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
2013-06-16 Earnie Boyd <ea...@us...>
+ * NEWS: Add text for MSVCRT_VERSION and for the _CRTALIAS 32bit time_t
+ definitions.
* include/_mingw.h (GCC system_header): Add a __CRT_TESTING__ filter.
* include/string.h (GCC system_header): Ditto.
* include/sys/stat.h (GCC system_header): Ditto.
diff --git a/NEWS b/NEWS
index f9aab6c..410f633 100644
--- a/NEWS
+++ b/NEWS
@@ -49,6 +49,15 @@ during the link step or during runtime. However, this also removes the
inconsistency between a Microsoft build and the MinGW build in that you do not
need to define __MSVCRT_VERSION__ correctly.
+We now have a MSVCRT_VERSION which is aimed to contain a value which represents
+the version of the MSVCRT.DLL on a Windows OS. For instance XP has a version
+of 710, Vista has a value of 800 and Win7 has a value of 910. These values are
+based on the (MajorLinkerVersion * 100) + MinorLinkerVersion as returned from
+objdump -x MSVCRT.DLL. The default value will be determined by the value of
+_WIN32_WINNT within the _mingw.h file unless the user has defined it already.
+This allows the code builder to not need to worry with the value of
+MSVCRT_VERSION since it should have the correct value for the targeted OS.
+
We now assume that GCC is the only compiler used with the MinGW.org WSL
(Windows System Libraries) and that the minimum supported version of GCC is
3.5.4. This allowed for futher code refactoring reducing the number of lines
@@ -69,7 +78,12 @@ use 32bit time_t with msvcrt.dll but it would be slightly slower. Note, I
have discovered that the SysWOW64/msvcrt.dll contains the 32bit time_t functions
but we do not deliver libmsvcrt.a with these imports as this is not available on
all systems. However, you could possibly (needs testing) use the msvcrt.dll
-directly to link against and define _HAVE_32BIT_TIME_T during the compile.
+directly to link against and define _HAVE_32BIT_TIME_T during the compile. In
+many cases we create a _CRTALIAS for the functions in the header files. This
+allows an application to use 32bit time_t structures and 32bit time functions
+regardless of the MSVCRT.DLL on the system. If the MSVCRT.DLL contains the
+function for the targeted MSVCRT_VERSION value then the function is imported
+instead of an alias being defined.
We have an ABI incompatibility due to a reworking of the dirent.c which provides
opendir() and friends. You will need to rebuild all libraries to that use
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 2 ++
NEWS | 16 +++++++++++++++-
2 files changed, 17 insertions(+), 1 deletions(-)
hooks/post-receive
--
Repository: mingw-org-wsl
|
|
From: Earnie B. <no...@so...> - 2013-06-16 18:24:55
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Repository: mingw-org-wsl".
The branch, 4.0-dev has been updated
via d4a74a9c3f2752d7cf6c35180f3672501f6b91a2 (commit)
from aae1b310df39d2d33a3b42dcc8e159ec933f6f3d (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/d4a74a9c3f2752d7cf6c35180f3672501f6b91a2/
commit d4a74a9c3f2752d7cf6c35180f3672501f6b91a2
Author: Earnie Boyd <ea...@us...>
Date: Sun Jun 16 14:23:18 2013 -0400
Correct malformations and missed definitions to finish _USE_32BIT_TIME_T coding.
diff --git a/ChangeLog b/ChangeLog
index 96e0515..91c6818 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,28 @@
+2013-06-16 Earnie Boyd <ea...@us...>
+
+ * include/_mingw.h (GCC system_header): Add a __CRT_TESTING__ filter.
+ * include/string.h (GCC system_header): Ditto.
+ * include/sys/stat.h (GCC system_header): Ditto.
+ (string.h): Move the include toward the top of the file.
+ (extern "C" {): Move above the filters so that it is not incorrectly
+ conditional.
+ Correct some comments and move the opening brace to the function
+ definition line throughout.
+ * include/sys/utime.h (utime): Move declaration to after the declaration
+ of _utime64(). Create a _CRTALIAS when _USE_32BIT_TIME_T is undefined.
+ Add datatype specifiers within the _CRTALIAS definitions throughout.
+ * include/wchar.h (GCC system_header): Add a __CRT_TESTING__ filter.
+ (FILENAME_MAX): Define macro if not already defined.
+ Correct comments throughout.
+ Correct #if...#endif misaligned pair.
+ (wcsicmp): Use _CRTALIAS instead of __CRT_INLINE since it is a one line
+ function definition.
+ (*wfinddata*): Use FILENAME_MAX throughout.
+ (_wstat32): Make a _CRTALIAS rather than a _CRTIMP.
+ (_wstat64i32): Use __CRT_MAYBE_INLINE instead of __CRT_INLINE.
+ (_wstat32i64): Define.
+ (_wstat, _wstati64): Remove the MSVCRT_VERSION >= 800 filter.
+
2013-06-07 Earnie Boyd <ea...@us...>
* include/_mingw.h (_CRTALIAS): Add comments explaining its purpose.
diff --git a/include/_mingw.h b/include/_mingw.h
index f038fdf..eb7c41f 100644
--- a/include/_mingw.h
+++ b/include/_mingw.h
@@ -29,7 +29,9 @@
*/
#ifndef __MINGW_H
#define __MINGW_H
+#ifndef __CRT_TESTING__
#pragma GCC system_header
+#endif
#include <sdkddkver.h>
#define __MINGW_VERSION 4.0
diff --git a/include/string.h b/include/string.h
index 11f6601..65ba493 100644
--- a/include/string.h
+++ b/include/string.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
@@ -23,7 +23,9 @@
*/
#ifndef _STRING_H
#define _STRING_H
+#ifndef __CRT_TESTING__
#pragma GCC system_header
+#endif
#include <_mingw.h>
/*
diff --git a/include/sys/stat.h b/include/sys/stat.h
index 36198f0..43047ba 100644
--- a/include/sys/stat.h
+++ b/include/sys/stat.h
@@ -23,7 +23,9 @@
*/
#ifndef _STAT_H_
#define _STAT_H_
+#ifndef __CRT_TESTING__
#pragma GCC system_header
+#endif
#include <_mingw.h>
#define __need_size_t
@@ -33,6 +35,7 @@
#endif /* Not RC_INVOKED */
#include <sys/types.h>
+#include <string.h> /* Need memset declaration */
/*
* Constants for the stat st_mode member.
@@ -86,6 +89,10 @@
#ifndef RC_INVOKED
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#ifndef _STAT_DEFINED
/*
* The structure manipulated and returned by stat and fstat.
@@ -170,10 +177,6 @@ struct _stat64i32 {
__time64_t st_ctime;
};
-#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) {
@@ -193,7 +196,7 @@ _CRTALIAS int __cdecl __MINGW_NOTHROW _fstat32 (int _v1, struct _stat32* _v2) {
_CRTIMP int __cdecl __MINGW_NOTHROW _fstat64 (int, struct _stat64*);
int __cdecl __MINGW_NOTHROW _fstat32i64 (int, struct _stat32i64*);
int __cdecl __MINGW_NOTHROW _fstat64i32 (int, struct _stat64i32*);
-#include <string.h> /* Need memset declaration */
+
__CRT_MAYBE_INLINE int __cdecl _fstat64i32(int desc, struct _stat64i32 *_stat) {
struct _stat64 st;
int ret = _fstat64(desc, &st);
@@ -214,8 +217,7 @@ __CRT_MAYBE_INLINE int __cdecl _fstat64i32(int desc, struct _stat64i32 *_stat) {
_stat->st_ctime = st.st_ctime;
return ret;
}
-__CRT_MAYBE_INLINE int __cdecl _fstat32i64(int desc, struct _stat32i64 *_stat)
-{
+__CRT_MAYBE_INLINE int __cdecl _fstat32i64(int desc, struct _stat32i64 *_stat) {
struct _stat32 st;
int ret = _fstat32(desc, &st);
if (ret == -1) {
@@ -235,8 +237,7 @@ __CRT_MAYBE_INLINE int __cdecl _fstat32i64(int desc, struct _stat32i64 *_stat)
_stat->st_ctime = st.st_ctime;
return ret;
}
-__CRT_MAYBE_INLINE int __cdecl _stat64i32(const char *fname, struct _stat64i32 *_stat)
-{
+__CRT_MAYBE_INLINE int __cdecl _stat64i32(const char *fname, struct _stat64i32 *_stat) {
struct _stat64 st;
int ret = _stat64(fname, &st);
if (ret == -1) {
@@ -256,8 +257,7 @@ __CRT_MAYBE_INLINE int __cdecl _stat64i32(const char *fname, struct _stat64i32 *
_stat->st_ctime = st.st_ctime;
return ret;
}
-__CRT_MAYBE_INLINE int __cdecl _stat32i64(const char *fname, struct _stat32i64 *_stat)
-{
+__CRT_MAYBE_INLINE int __cdecl _stat32i64(const char *fname, struct _stat32i64 *_stat) {
struct _stat32 st;
int ret = _stat32(fname, &st);
if (ret == -1) {
@@ -303,17 +303,15 @@ __CRT_MAYBE_INLINE int __cdecl _stat32i64(const char *fname, struct _stat32i64 *
#if !defined ( _WSTAT_DEFINED) /* also declared in wchar.h */
/* _wstat32 does not exist in MSVCRT.DLL */
+_CRTIMP int __cdecl __MINGW_NOTHROW _wstat (const wchar_t*, struct _stat32*);
_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*);
-#include <string.h> /* Need memset declaration */
-__CRT_MAYBE_INLINE int __cdecl _wstat64i32(const wchar_t *fname, struct _stat64i32 *_stat)
-{
+__CRT_MAYBE_INLINE int __cdecl _wstat64i32(const wchar_t *fname, struct _stat64i32 *_stat) {
struct _stat64 st;
int ret = _wstat64(fname, &st);
if (ret == -1) {
@@ -333,8 +331,7 @@ __CRT_MAYBE_INLINE int __cdecl _wstat64i32(const wchar_t *fname, struct _stat64i
_stat->st_ctime = st.st_ctime;
return ret;
}
-__CRT_MAYBE_INLINE int __cdecl _wstat32i64(const wchar_t *fname, struct _stat32i64 *_stat)
-{
+__CRT_MAYBE_INLINE int __cdecl _wstat32i64(const wchar_t *fname, struct _stat32i64 *_stat) {
struct _stat32 st;
int ret = _wstat32(fname, &st);
if (ret == -1) {
@@ -359,14 +356,15 @@ __CRT_MAYBE_INLINE int __cdecl _wstat32i64(const wchar_t *fname, struct _stat32i
#define _wstat _wstat32
#define _wstati64 _wstat32i64
-#else /* !_USE_32BIT_TIME_T */
+#else /* ! _USE_32BIT_TIME_T */
#define _wstat _wstat64i32
#define _wstati64 _wstat64
#endif /* _USE_32BIT_TIME_T */
#define _WSTAT_DEFINED
-#endif /* _WSTAT_DEFIND */
+#endif /* ! _WSTAT_DEFIND */
+
#ifdef __cplusplus
}
diff --git a/include/sys/utime.h b/include/sys/utime.h
index 9d5db74..afcb7e3 100644
--- a/include/sys/utime.h
+++ b/include/sys/utime.h
@@ -74,14 +74,6 @@ struct utimbuf32
extern "C" {
#endif
-#ifndef _NO_OLDNAMES
-#ifdef _USE_32BIT_TIME_T
-_CRTIMP int __cdecl __MINGW_NOTHROW utime (const char*, struct utimbuf*);
-#else
-#define utime _utime
-#endif
-#endif /* Not _NO_OLDNAMES */
-
_CRTIMP int __cdecl __MINGW_NOTHROW _utime64 (const char*, struct __utimbuf64*);
_CRTIMP int __cdecl __MINGW_NOTHROW _futime64 (int, struct __utimbuf64*);
@@ -92,16 +84,27 @@ _CRTIMP int __cdecl __MINGW_NOTHROW _futime32 (int, struct __utimbuf32*);
#else
_CRTIMP int __cdecl __MINGW_NOTHROW _utime (const char*, struct _utimbuf*);
_CRTALIAS int __cdecl __MINGW_NOTHROW _utime32 (const char* _v1, struct __utimbuf32* _v2) {
- return _utime(_v1, _v2);
+ return _utime(_v1, (struct _utimbuf*)_v2);
}
_CRTIMP int __cdecl __MINGW_NOTHROW _futime (int, struct _utimbuf*);
_CRTALIAS int __cdecl __MINGW_NOTHROW _futime32 (int _v1, struct __utimbuf32* _v2) {
- return _futime(_v1, _v2);
+ return _futime(_v1, (struct _utimbuf*)_v2);
}
#endif
+#ifndef _NO_OLDNAMES
+#ifdef _USE_32BIT_TIME_T
+_CRTIMP int __cdecl __MINGW_NOTHROW utime (const char*, struct utimbuf*);
+#else
+int __cdecl __MINGW_NOTHROW utime (const char*, struct utimbuf*);
+_CRTALIAS int __cdecl __MINGW_NOTHROW utime (const char* _v1, struct utimbuf* _v2) {
+ return _utime64(_v1, (struct __utimbuf64*)_v2);
+}
+#endif
+#endif /* Not _NO_OLDNAMES */
+
#ifndef _USE_32BIT_TIME_T
_CRTALIAS int __cdecl __MINGW_NOTHROW _utime (const char* _v1, struct _utimbuf* _v2) {
return(_utime64 (_v1,(struct __utimbuf64*)_v2));
@@ -130,7 +133,7 @@ _CRTIMP int __cdecl __MINGW_NOTHROW _wutime32 (const wchar_t*, struct __utimbuf3
#else /* MSVCRT_VERSION < 800 */
_CRTIMP int __cdecl __MINGW_NOTHROW _wutime (const wchar_t*, struct _utimbuf*);
_CRTALIAS int __cdecl __MINGW_NOTHROW _wutime32 (const wchar_t* _v1, struct __utimbuf32* _v2) {
- return _wutime(_v1, _v2);
+ return _wutime(_v1, (struct _utimbuf*)_v2);
}
#endif /* MSVCRT_VERSION >= 800 */
diff --git a/include/wchar.h b/include/wchar.h
index 7066839..0efaedc 100644
--- a/include/wchar.h
+++ b/include/wchar.h
@@ -23,7 +23,9 @@
*/
#ifndef _WCHAR_H_
#define _WCHAR_H_
+#ifndef __CRT_TESTING__
#pragma GCC system_header
+#endif
#include <_mingw.h>
#ifndef RC_INVOKED
@@ -38,7 +40,7 @@
#define __need___va_list
#include <stdarg.h>
#define __VALIST __builtin_va_list
-#endif
+#endif /* ndef __VALIST */
#endif /* Not RC_INVOKED */
@@ -57,6 +59,10 @@
#define WEOF (wchar_t)(0xFFFF)
#endif
+#ifndef FILENAME_MAX
+#define FILENAME_MAX 260
+#endif
+
#ifndef RC_INVOKED
#ifdef __cplusplus
@@ -243,13 +249,12 @@ _CRTALIAS wchar_t* __cdecl __MINGW_NOTHROW _wctime32 (const __time32_t* _v1) {
#endif /* MSVCRT_VERSION >= 800 */
#if MSVCRT_VERSION >= 800
-#if defined(_USE_32BIT_TIME_T)
+#ifdef _USE_32BIT_TIME_T
_CRTALIAS wchar_t* __cdecl __MINGW_NOTHROW _wctime (const time_t* _v) { return(_wctime32 (_v)); }
-#else /* MSVCRT_VERSION < 800 */
+#else /* ! _USE_32BIT_TIME_T */
_CRTALIAS wchar_t* __cdecl __MINGW_NOTHROW _wctime (const time_t* _v) { return(_wctime64 (_v)); }
-#endif /* defined(_USE_32BIT_TIME_T) */
-#endif /* MSVCRT_VERSION >= 800 */
+#endif /* _USE_32BIT_TIME_T */
#else /* MSVCRT_VERSION < 800 */
#ifdef _USE_32BIT_TIME_T
@@ -272,7 +277,7 @@ _CRTIMP int __cdecl __MINGW_NOTHROW _wutime32 (const wchar_t*, struct __utimbuf3
#else /* MSVCRT_VERSION < 800 */
_CRTIMP int __cdecl __MINGW_NOTHROW _wutime (const wchar_t*, struct _utimbuf*);
_CRTALIAS int __cdecl __MINGW_NOTHROW _wutime32 (const wchar_t* _v1, struct __utimbuf32* _v2) {
- return _wutime(_v1, _v2);
+ return _wutime(_v1, (struct _utimbuf *)_v2);
}
#endif /* MSVCRT_VERSION >= 800 */
@@ -341,11 +346,9 @@ _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW __wcserror(const wchar_t*);
#ifndef _NO_OLDNAMES
/* NOTE: There is no _wcscmpi, but this is for compatibility. */
int __cdecl __MINGW_NOTHROW wcscmpi (const wchar_t *, const wchar_t *);
-#ifndef __NO_INLINE__
-__CRT_INLINE int __cdecl __MINGW_NOTHROW
+_CRTALIAS int __cdecl __MINGW_NOTHROW
wcscmpi (const wchar_t * __ws1, const wchar_t * __ws2)
{return _wcsicmp (__ws1, __ws2);}
-#endif
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsdup (const wchar_t*);
_CRTIMP int __cdecl __MINGW_NOTHROW wcsicmp (const wchar_t*, const wchar_t*);
_CRTIMP int __cdecl __MINGW_NOTHROW wcsicoll (const wchar_t*, const wchar_t*);
@@ -427,7 +430,7 @@ struct _wfinddata_t {
time_t time_access; /* -1 for FAT file systems */
time_t time_write;
_fsize_t size;
- wchar_t name[260]; /* may include spaces. */
+ wchar_t name[FILENAME_MAX]; /* may include spaces. */
};
struct _wfinddatai64_t {
unsigned attrib;
@@ -435,7 +438,7 @@ struct _wfinddatai64_t {
time_t time_access;
time_t time_write;
__int64 size;
- wchar_t name[260];
+ wchar_t name[FILENAME_MAX];
};
struct _wfinddata64_t {
unsigned attrib;
@@ -444,9 +447,8 @@ struct _wfinddata64_t {
__time64_t time_write;
/* 8 bytes are returned so it can't be _fsize_t */
__int64 size;
- wchar_t name[260];
+ wchar_t name[FILENAME_MAX];
};
-#include <stdio.h>
struct _wfinddata32_t {
unsigned attrib;
__time32_t time_create;
@@ -514,7 +516,7 @@ _CRTALIAS int __cdecl __MINGW_NOTHROW _wfindnext32 (intptr_t _v1, struct _wfind
#define _wfindfirsti64 _wfindfirst32i64
#define _wfindnexti64 _wfindnext32i64
-#else /* !defined(_USE_32BIT_TIME_T)
+#else /* !defined(_USE_32BIT_TIME_T) */
#define _wfinddata_t _wfinddata64i32_t
#define _wfinddatai64_t _wfinddata64_t
#define _wfindfirst _wfindfirst64i32
@@ -621,28 +623,32 @@ struct _stat64i32 {
};
#define __stat64 _stat64
-#if defined(_USE_32BIT_TIME_T) && MSVCRT_VERSION >= 800
+#if defined(_USE_32BIT_TIME_T)
#define _fstat _fstat32
#define _fstati64 _fstat32i64
#define _stat _stat32
#define _stati64 _stat32i64
-#else /* !_USE_32BIT_TIME_T */
+#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 */
+#endif /* ! _STAT_DEFINED */
#if !defined ( _WSTAT_DEFINED) /* also declared in sys/stat.h */
-_CRTIMP int __cdecl __MINGW_NOTHROW _wstat32 (const wchar_t*, struct _stat32*);
+/* _wstat32 does not exist in MSVCRT.DLL */
+_CRTIMP int __cdecl __MINGW_NOTHROW _wstat (const wchar_t*, struct _stat32*);
+_CRTALIAS int __cdecl __MINGW_NOTHROW _wstat32 (const wchar_t* _v1, struct _stat32* _v2) {
+ 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*);
-#ifndef __NO_INLINE__
#include <string.h> /* Need memset declaration. */
- __CRT_INLINE int __cdecl _wstat64i32(const wchar_t *fname, struct _stat64i32 *_stat)
+__CRT_MAYBE_INLINE int __cdecl _wstat64i32(const wchar_t *fname, struct _stat64i32 *_stat)
{
struct _stat64 st;
int ret = _wstat64(fname, &st);
@@ -662,16 +668,33 @@ int __cdecl __MINGW_NOTHROW _wstat64i32 (const wchar_t*, struct _stat64i32*);
_stat->st_mtime = st.st_mtime;
_stat->st_ctime = st.st_ctime;
return ret;
+}
+__CRT_MAYBE_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;
}
-#else
-#define _wstat64i32 _wstat64
-#endif
+ _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;
+}
-#if defined(_USE_32BIT_TIME_T) && MSVCRT_VERSION >= 800
+#if defined(_USE_32BIT_TIME_T)
#define _wstat _wstat32
#define _wstati64 _wstat32i64
-#else
+#else /* ! _USE_32BIT_TIME_T */
#define _wstat _wstat64i32
#define _wstati64 _wstat64
#endif /* _USE_32BIT_TIME_T */
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 25 +++++++++++++++++
include/_mingw.h | 2 +
include/string.h | 6 +++-
include/sys/stat.h | 36 ++++++++++++-------------
include/sys/utime.h | 25 ++++++++++-------
include/wchar.h | 73 +++++++++++++++++++++++++++++++++-----------------
6 files changed, 110 insertions(+), 57 deletions(-)
hooks/post-receive
--
Repository: mingw-org-wsl
|
|
From: Keith M. <no...@so...> - 2013-06-14 21:12:17
|
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-get".
The branch, master has been updated
via 95a4ee4e769f5ca3981a56911e2a7d35e4e0f3e1 (commit)
via b3039fff2a5877d5dd92c5b40dc0b630c61510ef (commit)
via 27a07bf2a2755c82f6a5aa29d84895b6876e8e6e (commit)
from 653459a1b65bfc2f13383b37ed3fd31220d2d3e9 (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-get/ci/95a4ee4e769f5ca3981a56911e2a7d35e4e0f3e1/
commit 95a4ee4e769f5ca3981a56911e2a7d35e4e0f3e1
Author: Keith Marshall <kei...@us...>
Date: Fri Jun 14 22:08:52 2013 +0100
Collect distributable package files in user specified directory.
diff --git a/ChangeLog b/ChangeLog
index c191eab..14bfb06 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
2013-06-14 Keith Marshall <kei...@us...>
+ Collect distributable package files in user specified directory.
+
+ * Makefile.in (distdir): New macro; define default as abs_builddir.
+ (srcdist, bindist, licdist): Use it; direct generated tarballs to it.
+ (%.txt.dist): New pattern rule; define, and use it to make a copy...
+ (readme.txt): ...of this, in distdir, when processing...
+ (dist): ...this build objective.
+
+2013-06-14 Keith Marshall <kei...@us...>
+
Handle Microsoft's 32-bit vs. 64-bit time_t ambiguity.
* src/apihook.c: New file; it provides...
diff --git a/Makefile.in b/Makefile.in
index 3d6ef43..c30d14d 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -361,7 +361,17 @@ PACKAGE_DISTVERSION = `echo $(PACKAGE_VERSION)-$(PACKAGE_SUBSYSTEM) | sed \
-e 's,-$(PACKAGE_SUBSYSTEM),$(SNAPSHOT)&,'`
PACKAGE_DISTNAME = $(PACKAGE_TARNAME)-$(PACKAGE_DISTVERSION)
-dist: srcdist bindist readme.txt
+dist: srcdist bindist readme.txt.dist
+
+# Specify where distributable files should be collected; by default,
+# we will simply use the current build directory.
+#
+distdir = @abs_builddir@
+
+# "Install" distributable text files into the distribution directory.
+#
+%.txt.dist: %.txt
+ cmp -s $< ${distdir}/$(<F) 2>/dev/null || $(INSTALL_DATA) $< ${distdir}
# Specify default compression command, and associated file name extension,
# for creation and identification of packaged tar archives.
@@ -379,32 +389,34 @@ GCMTAG = `>> $(BLDTAG); cat $(BLDTAG) | sed 's,.,-$(GUI_RELEASE_CLASS)-&,'`
bindist: all licdist
rm -rf staged
+ $(mkinstalldirs) ${distdir}
$(MAKE) --no-print-directory prefix=`pwd`/staged install-strip
cd staged; tar chf - bin/pkginfo$(EXEEXT) | $(TARZIP) -c > \
- ../pkginfo-$(PACKAGE_DISTVERSION)$(SCMTAG)-bin.$(TAREXT)
+ ${distdir}/pkginfo-$(PACKAGE_DISTVERSION)$(SCMTAG)-bin.$(TAREXT)
rm staged/bin/pkginfo$(EXEEXT)
cd staged; tar chf - libexec/mingw-get/guimain$(EXEEXT) | \
- $(TARZIP) -c > ../$(PACKAGE_DISTNAME)$(GCMTAG)-gui.$(TAREXT)
+ $(TARZIP) -c > ${distdir}/$(PACKAGE_DISTNAME)$(GCMTAG)-gui.$(TAREXT)
rm staged/libexec/mingw-get/guimain$(EXEEXT)
cd staged; tar chf - * | $(TARZIP) -c > \
- ../$(PACKAGE_DISTNAME)$(SCMTAG)-bin.$(TAREXT)
- cd staged; zip -r ../$(PACKAGE_DISTNAME)$(SCMTAG)-bin.zip *
+ ${distdir}/$(PACKAGE_DISTNAME)$(SCMTAG)-bin.$(TAREXT)
+ cd staged; zip -r ${distdir}/$(PACKAGE_DISTNAME)$(SCMTAG)-bin.zip *
rm -rf staged
licdist:
rm -rf share
- $(mkinstalldirs) ./share/doc/${PACKAGE_TARNAME}
+ $(mkinstalldirs) ${distdir} ./share/doc/${PACKAGE_TARNAME}
cd ./share/doc/${PACKAGE_TARNAME}; for file in $(LICENCE_FILES); \
do test -f ${abs_top_srcdir}/$$file \
&& $(LN_S) ${abs_top_srcdir}/$$file . \
|| $(LN_S) ${CURDIR}/$$file .; \
done
tar chf - share | $(TARZIP) -c > \
- $(PACKAGE_DISTNAME)$(SCMTAG)-lic.$(TAREXT)
+ ${distdir}/$(PACKAGE_DISTNAME)$(SCMTAG)-lic.$(TAREXT)
rm -rf share
srcdist: srcdist-doc pkginfo.c
- rm -rf ${PACKAGE_DISTROOT} && mkdir ${PACKAGE_DISTROOT}
+ rm -rf ${PACKAGE_DISTROOT}
+ $(mkinstalldirs) ${distdir} ${PACKAGE_DISTROOT}
cd ${PACKAGE_DISTROOT}; for file in $(SRCDIST_FILES); do \
test -f ${abs_top_srcdir}/$$file \
&& $(LN_S) ${abs_top_srcdir}/$$file . \
@@ -430,7 +442,7 @@ srcdist: srcdist-doc pkginfo.c
cd ${CURDIR}; done
cd ${PACKAGE_DISTROOT}/src/pkginfo; $(LN_S) ${CURDIR}/pkginfo.c .
tar chf - ${PACKAGE_DISTROOT} | $(TARZIP) -c > \
- $(PACKAGE_DISTNAME)$(SCMTAG)-src.$(TAREXT)
+ ${distdir}/$(PACKAGE_DISTNAME)$(SCMTAG)-src.$(TAREXT)
rm -rf ${PACKAGE_DISTROOT}
# README, INSTALL and NEWS files to be included in the source distribution
https://sf.net/p/mingw/mingw-get/ci/b3039fff2a5877d5dd92c5b40dc0b630c61510ef/
commit b3039fff2a5877d5dd92c5b40dc0b630c61510ef
Author: Keith Marshall <kei...@us...>
Date: Fri Jun 14 20:58:21 2013 +0100
Handle Microsoft's 32-bit vs. 64-bit time_t ambiguity.
diff --git a/ChangeLog b/ChangeLog
index 71bc23c..c191eab 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2013-06-14 Keith Marshall <kei...@us...>
+
+ Handle Microsoft's 32-bit vs. 64-bit time_t ambiguity.
+
+ * src/apihook.c: New file; it provides...
+ (have_api): ...this helper; it checks for availability of any specific
+ API function, within a specific system DLL, (MSVCRT.DLL by default).
+
+ * src/tarproc.cpp (have_utime64_api): New inline function; it wraps...
+ (have_api): ...this, to check whether MSVCRT.DLL provides...
+ (commit_saved_entity) [_utime64]: ...this; use if available, else...
+ (commit_saved_entity) [!_utime64]: ...fall back to using...
+ (utime): ...this.
+
+ * Makefile.in (CORE_DLL_OBJECTS): Add apihook.$OBJEXT
+
2013-06-13 Keith Marshall <kei...@us...>
Facilitate package extraction and registration at setup time.
diff --git a/Makefile.in b/Makefile.in
index 9eefd43..3d6ef43 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -165,7 +165,7 @@ CORE_DLL_OBJECTS = climain.$(OBJEXT) pkgshow.$(OBJEXT) dmhcore.$(OBJEXT) \
pkgdeps.$(OBJEXT) pkgreqs.$(OBJEXT) pkginst.$(OBJEXT) pkgunst.$(OBJEXT) \
tarproc.$(OBJEXT) xmlfile.$(OBJEXT) keyword.$(OBJEXT) vercmp.$(OBJEXT) \
tinyxml.$(OBJEXT) tinystr.$(OBJEXT) tinyxmlparser.$(OBJEXT) \
- mkpath.$(OBJEXT) tinyxmlerror.$(OBJEXT)
+ apihook.$(OBJEXT) mkpath.$(OBJEXT) tinyxmlerror.$(OBJEXT)
CLI_EXE_OBJECTS = \
clistub.$(OBJEXT) version.$(OBJEXT) approot.$(OBJEXT) getopt.$(OBJEXT)
diff --git a/src/apihook.c b/src/apihook.c
new file mode 100644
index 0000000..cda8ce2
--- /dev/null
+++ b/src/apihook.c
@@ -0,0 +1,61 @@
+/*
+ * apihook.c
+ *
+ * $Id$
+ *
+ * Written by Keith Marshall <kei...@us...>
+ * Copyright (C) 2013, MinGW.org Project
+ *
+ *
+ * Implementation of a utility function to check for availabiliity of
+ * a specified API function within a specified DLL.
+ *
+ *
+ * This is free software. Permission is granted to copy, modify and
+ * redistribute this software, under the provisions of the GNU General
+ * Public License, Version 3, (or, at your option, any later version),
+ * as published by the Free Software Foundation; see the file COPYING
+ * for licensing details.
+ *
+ * Note, in particular, that this software is provided "as is", in the
+ * hope that it may prove useful, but WITHOUT WARRANTY OF ANY KIND; not
+ * even an implied WARRANTY OF MERCHANTABILITY, nor of FITNESS FOR ANY
+ * PARTICULAR PURPOSE. Under no circumstances will the author, or the
+ * MinGW Project, accept liability for any damages, however caused,
+ * arising from the use of this software.
+ *
+ */
+#define WIN32_LEAN_AND_MEAN
+
+#include <windows.h>
+
+int have_api( const char *entry, const char *dll )
+{
+ /* Initially assuming that the specified API is "unsupported",
+ * attempt to get a handle for the nominated provider DLL.
+ */
+ HMODULE provider;
+ enum { API_UNSUPPORTED = 0, API_SUPPORTED } status = API_UNSUPPORTED;
+ if( (provider = LoadLibrary( dll == NULL ? "msvcrt.dll" : dll )) != NULL )
+ {
+ /* When we have a valid DLL handle, look up the entry point
+ * address, within it, for the specified API function...
+ */
+ if( GetProcAddress( provider, entry ) != NULL )
+ /*
+ * ...and, provided this returns a valid entry address,
+ * mark the API as "supported".
+ */
+ status = API_SUPPORTED;
+
+ /* Release the handle we acquired above, for the provider DLL,
+ * so that we maintain a balanced reference count.
+ */
+ FreeLibrary( provider );
+ }
+ /* Finally, return the support state for the API, as determined.
+ */
+ return (int)(status);
+}
+
+/* $RCSfile$: end of file */
diff --git a/src/tarproc.cpp b/src/tarproc.cpp
index 61f25ee..eef9e3a 100644
--- a/src/tarproc.cpp
+++ b/src/tarproc.cpp
@@ -532,16 +532,62 @@ char *pkgTarArchiveProcessor::EntityDataAsString()
*/
#include <utime.h>
-static int commit_saved_entity( const char *pathname, time_t mtime )
+EXTERN_C int have_api( const char *, const char * = NULL );
+
+static inline int have_utime64_api( void )
+{
+ /* Local helper function to check and record the availability of
+ * the _utime64() API function, within the particular version of
+ * MSVCRT.DLL which is installed on the host platform.
+ */
+ enum { API_UNSUPPORTED = 0, API_SUPPORTED, API_UNTESTED };
+
+ /* On first call, we don't know; initialise accordingly.
+ */
+ static int status = (int)(API_UNTESTED);
+
+ return (status == (int)(API_UNTESTED))
+ /*
+ * Must be first time of calling; check, record, and return
+ * the appropriate availability status.
+ */
+ ? status = have_api( "_utime64" )
+ /*
+ * On second and subsequent calls, we've already checked, so
+ * we know the availability status; simply return it.
+ */
+ : status;
+}
+
+static int commit_saved_entity( const char *pathname, __time64_t mtime )
{
/* Helper to set the access and modification times for a file,
* after extraction from an archive, to match the specified "mtime";
* (typically "mtime" is as recorded within the archive).
*/
- struct utimbuf timestamp;
+ if( have_utime64_api() )
+ {
+ /* When the _utime64() API function is available...
+ */
+ struct __utimbuf64 timestamp;
- timestamp.actime = timestamp.modtime = mtime;
- return utime( pathname, ×tamp );
+ /* ...we prefer to use it...
+ */
+ timestamp.actime = timestamp.modtime = mtime;
+ return _utime64( pathname, ×tamp );
+ }
+ else
+ {
+ /* ...otherwise, we assume that this is a legacy system,
+ * and the utime() function is based on 32-bit time_t...
+ */
+ struct __utimbuf32 timestamp;
+
+ /* ...so fall back to using that.
+ */
+ timestamp.actime = timestamp.modtime = mtime;
+ return utime( pathname, (utimbuf *)(×tamp) );
+ }
}
pkgTarArchiveExtractor::pkgTarArchiveExtractor( const char *fn, const char *dir )
https://sf.net/p/mingw/mingw-get/ci/27a07bf2a2755c82f6a5aa29d84895b6876e8e6e/
commit 27a07bf2a2755c82f6a5aa29d84895b6876e8e6e
Author: Keith Marshall <kei...@us...>
Date: Thu Jun 13 23:11:36 2013 +0100
Facilitate package extraction and registration at setup time.
diff --git a/ChangeLog b/ChangeLog
index 5c7e6f4..71bc23c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,21 @@
2013-06-13 Keith Marshall <kei...@us...>
+ Facilitate package extraction and registration at setup time.
+
+ * src/pkgproc.h (IMPLEMENTATION_LEVEL): Add filters to facilitate
+ implementation of distinct setup time archive processing behaviour.
+ (pkgArchiveProcessor::save_on_extract): New property; declare it.
+ (pkgArchiveProcessor::SaveExtractedFiles): New method; implement it.
+ (pkgArchiveProcessor::SetOutputStream): New method; declare it.
+
+ * src/tarproc.cpp (IMPLEMENTATION_LEVEL): Add filters to implement
+ distinct setup time specific archive processing behaviour.
+ (pkgArchiveProcessor::SetOutputStream): Implement it.
+ (pkgTarArchiveExtractor::ProcessDataStream): Use it.
+ (pkgTarArchiveInstaller::ProcessDataStream): Likewise.
+
+2013-06-13 Keith Marshall <kei...@us...>
+
Implement some GUI progress metering dialogue enhancements.
* src/pkgbase.h (pkgProgressMeter): Don't pre-empt private features
diff --git a/src/pkgproc.h b/src/pkgproc.h
index 5235d3c..9d104ad 100644
--- a/src/pkgproc.h
+++ b/src/pkgproc.h
@@ -5,7 +5,7 @@
* $Id$
*
* Written by Keith Marshall <kei...@us...>
- * Copyright (C) 2009, 2010, 2011, MinGW Project
+ * Copyright (C) 2009, 2010, 2011, 2013, MinGW.org Project
*
*
* Specifications for the internal architecture of package archives,
@@ -32,6 +32,8 @@
#include "pkgbase.h"
#include "pkgstrm.h"
+#if IMPLEMENTATION_LEVEL == PACKAGE_BASE_COMPONENT
+
EXTERN_C void pkgInstall( pkgActionItem* );
EXTERN_C void pkgRegister( pkgXmlNode*, pkgXmlNode*, const char*, const char* );
EXTERN_C void pkgRemove( pkgActionItem* );
@@ -57,18 +59,23 @@ class pkgManifest
pkgXmlNode *inventory;
};
+#endif /* PACKAGE_BASE_COMPONENT */
+
class pkgArchiveProcessor
{
/* A minimal generic abstract base class, from which we derive
* processing tools for handling arbitrary package architectures.
*/
public:
- pkgArchiveProcessor(){}
+ pkgArchiveProcessor():save_on_extract(true){}
virtual ~pkgArchiveProcessor(){}
virtual bool IsOk() = 0;
virtual int Process() = 0;
+ inline void SaveExtractedFiles( bool mode ){ save_on_extract = mode; }
+ inline int SetOutputStream( const char *, int );
+
protected:
int sysroot_len;
@@ -87,6 +94,8 @@ class pkgArchiveProcessor
virtual int CreateExtractionDirectory( const char* );
virtual int ExtractFile( int, const char*, int );
+
+ bool save_on_extract;
};
/* Our standard package format specifies the use of tar archives;
@@ -197,6 +206,8 @@ class pkgTarArchiveExtractor : public pkgTarArchiveProcessor
virtual int ProcessDataStream( const char* );
};
+#if IMPLEMENTATION_LEVEL == PACKAGE_BASE_COMPONENT
+
class pkgTarArchiveInstaller : public pkgTarArchiveProcessor
{
/* Worker class for extraction of package tar archive content
@@ -236,4 +247,5 @@ class pkgTarArchiveUninstaller : public pkgTarArchiveProcessor
virtual int ProcessDataStream( const char* );
};
+#endif /* PACKAGE_BASE_COMPONENT */
#endif /* PKGPROC_H: $RCSfile$: end of file */
diff --git a/src/tarproc.cpp b/src/tarproc.cpp
index 4584389..61f25ee 100644
--- a/src/tarproc.cpp
+++ b/src/tarproc.cpp
@@ -4,7 +4,7 @@
* $Id$
*
* Written by Keith Marshall <kei...@us...>
- * Copyright (C) 2009, 2010, 2011, 2012, MinGW.org Project
+ * Copyright (C) 2009, 2010, 2011, 2012, 2013, MinGW.org Project
*
*
* Implementation of package archive processing methods, for reading
@@ -27,6 +27,8 @@
* arising from the use of this software.
*
*/
+#include "pkgimpl.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -36,15 +38,20 @@
#include <fcntl.h>
#include <errno.h>
+#if IMPLEMENTATION_LEVEL == PACKAGE_BASE_COMPONENT
+
#include "dmh.h"
#include "debug.h"
#include "mkpath.h"
#include "pkginfo.h"
#include "pkgkeys.h"
-#include "pkgproc.h"
#include "pkgstat.h"
+#endif /* PACKAGE_BASE_COMPONENT */
+
+#include "pkgproc.h"
+
/*******************
*
* Class Implementation: pkgArchiveProcessor
@@ -55,18 +62,27 @@ int pkgArchiveProcessor::CreateExtractionDirectory( const char *pathname )
/* Helper method for creation of the directory infrastructure
* into which archived file entities are to be extracted.
*/
- int status;
- if( (status = mkdir_recursive( pathname, 0755 )) != 0 )
+ int status = 0;
+ if( save_on_extract && ((status = mkdir_recursive( pathname, 0755 )) != 0) )
dmh_notify( DMH_ERROR, "cannot create directory `%s'\n", pathname );
return status;
}
+inline int pkgArchiveProcessor::SetOutputStream( const char *name, int mode )
+{
+ /* Wrapper method to facilitate the set up of output streams
+ * for writing extracted content to disk, except in the special
+ * case where saving of files has been disabled.
+ */
+ return save_on_extract ? set_output_stream( name, mode ) : -2;
+}
+
int pkgArchiveProcessor::ExtractFile( int fd, const char *pathname, int status )
{
/* Helper method to finalise extraction of archived file entities;
* called by the ProcessDataStream() method of the extractor class,
* where "fd" is the file descriptor for the extraction data stream,
- * "pathname" is the corresponding path wher the data is extracted,
+ * "pathname" is the corresponding path where the data is extracted,
* and "status" is the result of calling the ProcessEntityData()
* method of the extractor class on "fd".
*/
@@ -94,6 +110,11 @@ int pkgArchiveProcessor::ExtractFile( int fd, const char *pathname, int status )
* Class Implementation: pkgTarArchiveProcessor
*
*/
+#if IMPLEMENTATION_LEVEL == PACKAGE_BASE_COMPONENT
+/*
+ * The GUI setup tool will provide a simplified substitute for
+ * this constructor.
+ */
pkgTarArchiveProcessor::pkgTarArchiveProcessor( pkgXmlNode *pkg )
{
/* Constructor to associate a package tar archive with its
@@ -171,6 +192,8 @@ pkgTarArchiveProcessor::~pkgTarArchiveProcessor()
delete stream;
}
+#endif /* PACKAGE_BASE_COMPONENT */
+
int pkgTarArchiveProcessor::ProcessLinkedEntity( const char *pathname )
{
/* FIXME: Win32 links need special handling; for hard links, we
@@ -554,7 +577,6 @@ pkgTarArchiveExtractor::pkgTarArchiveExtractor( const char *fn, const char *dir
sysroot_len = mkpath( NULL, template_text, "", NULL ) - 1;
sysroot_path = strdup( template_text );
}
-
/* Finally, open the specified archive using the appropriate
* stream type, and invoke the extraction Process() method.
*/
@@ -578,18 +600,21 @@ int pkgTarArchiveExtractor::ProcessDataStream( const char *pathname )
* processing on behalf of the base class ExtractFile() method..
*/
int status;
- int fd = set_output_stream( pathname, octval( header.field.mode ) );
+ int fd = SetOutputStream( pathname, octval( header.field.mode ) );
if( (status = ExtractFile( fd, pathname, ProcessEntityData( fd ))) == 0 )
- /*
- * ...and commit the file after successful extraction...
- */
- commit_saved_entity( pathname, octval( header.field.mtime ) );
+ if( save_on_extract )
+ /*
+ * ...and commit the file after successful extraction...
+ */
+ commit_saved_entity( pathname, octval( header.field.mtime ) );
/* ...ultimately returning the extraction status code.
*/
return status;
}
+#if IMPLEMENTATION_LEVEL == PACKAGE_BASE_COMPONENT
+
/*******************
*
* Class Implementation: pkgTarArchiveInstaller
@@ -691,28 +716,31 @@ int pkgTarArchiveInstaller::ProcessDataStream( const char *pathname )
/* Establish an output file stream, extract the entity data,
* writing it to this stream...
*/
- int fd = set_output_stream( pathname, octval( header.field.mode ) );
+ int fd = SetOutputStream( pathname, octval( header.field.mode ) );
if( (status = ExtractFile( fd, pathname, ProcessEntityData( fd ))) == 0 )
{
- /* ...and on successful completion, commit the file
- * and record it in the installation database.
- */
+ /* ...and on successful completion, commit the file
+ * and record it in the installation database.
+ */
+ if( save_on_extract )
commit_saved_entity( pathname, octval( header.field.mtime ) );
- installed->AddEntry( filename_key, pathname + sysroot_len );
+ installed->AddEntry( filename_key, pathname + sysroot_len );
- /* Additionally, when the appropriate level of debug
- * tracing has been enabled, report the installation of
- * this file to the diagnostic log.
- *
- * FIXME: this would be a good place to add reporting
- * of installation, in verbose execution mode.
- */
- DEBUG_INVOKE_IF( DEBUG_REQUEST( DEBUG_TRACE_TRANSACTIONS ),
- dmh_printf( " %s\n", pathname )
- );
+ /* Additionally, when the appropriate level of debug
+ * tracing has been enabled, report the installation of
+ * this file to the diagnostic log.
+ *
+ * FIXME: this would be a good place to add reporting
+ * of installation, in verbose execution mode.
+ */
+ DEBUG_INVOKE_IF( DEBUG_REQUEST( DEBUG_TRACE_TRANSACTIONS ),
+ dmh_printf( " %s\n", pathname )
+ );
}
return status;
}
}
+#endif /* PACKAGE_BASE_COMPONENT */
+
/* $RCSfile$: end of file */
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 42 +++++++++++++++++
Makefile.in | 32 +++++++++----
src/apihook.c | 61 +++++++++++++++++++++++++
src/pkgproc.h | 16 ++++++-
src/tarproc.cpp | 134 ++++++++++++++++++++++++++++++++++++++++++------------
5 files changed, 243 insertions(+), 42 deletions(-)
create mode 100644 src/apihook.c
hooks/post-receive
--
Repository: mingw-get
|
|
From: Keith M. <no...@so...> - 2013-06-13 19:12:17
|
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-get".
The branch, master has been updated
via 653459a1b65bfc2f13383b37ed3fd31220d2d3e9 (commit)
via 3af854087dc5e5aad5eb58e6ce309d8e79e57bb3 (commit)
from 890c15fc8f65c5aa65070c52fe84768fa16642b3 (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-get/ci/653459a1b65bfc2f13383b37ed3fd31220d2d3e9/
commit 653459a1b65bfc2f13383b37ed3fd31220d2d3e9
Author: Keith Marshall <kei...@us...>
Date: Thu Jun 13 16:55:23 2013 +0100
Implement some GUI progress metering dialogue enhancements.
diff --git a/ChangeLog b/ChangeLog
index 899ad0a..5c7e6f4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,31 @@
+2013-06-13 Keith Marshall <kei...@us...>
+
+ Implement some GUI progress metering dialogue enhancements.
+
+ * src/pkgbase.h (pkgProgressMeter): Don't pre-empt private features
+ of derived progress metering classes; hence, we no longer need this...
+ (AppWindowMaker): ...as a forward class declaration; delete it.
+
+ * src/guimain.rc (IDD_REPO_UPDATE): Resize, and adjust layout.
+ (IDD_PROGRESS_VAL, IDD_PROGRESS_MAX, IDD_PROGRESS_PCT): Add these
+ dialogue box progress counter display elements.
+
+ * src/pkgbind.cpp (pkgRepository::GetPackageList): Adjust style of
+ progress status messages, to suit reporting via GUI dialogue box or
+ CLI console, as appropriate.
+
+ * src/guiexec.cpp (ProgressMeterMaker): Redefine class, in terms of...
+ (PROGRESS_METER_CLASS): ...this new generic class name macro.
+ Reimplement private members, previously inherited from base class;
+ adjust class constructor to ensure that they are initialised.
+ Delete explicit destructor; a default destructor is now sufficient.
+ (ProgressMeterMaker::SetRange, ProgressMeterMaker::SetValue):
+ (ProgressMeterMaker::Annotate): Factor out; reimplement them...
+
+ * src/pmihook.cpp: ...in this new file, as generalised methods of...
+ (PROGRESS_METER_CLASS): ...the class named by this macro.
+ (PROGRESS_METER_CLASS::PutVal): New private method; implement it.
+
2013-05-31 Keith Marshall <kei...@us...>
Avoid a potential macro definition conflict.
diff --git a/src/guiexec.cpp b/src/guiexec.cpp
index 1313c74..32cef95 100644
--- a/src/guiexec.cpp
+++ b/src/guiexec.cpp
@@ -43,20 +43,26 @@
*/
EXTERN_C void dmh_setpty( HWND );
-class ProgressMeterMaker: public pkgProgressMeter
+#define PROGRESS_METER_CLASS ProgressMeterMaker
+
+class PROGRESS_METER_CLASS: public pkgProgressMeter
{
/* A locally defined class, supporting progress metering
* for package catalogue update and load operations.
*/
public:
- ProgressMeterMaker( HWND, HWND, AppWindowMaker * );
+ PROGRESS_METER_CLASS( HWND, AppWindowMaker * );
+ ~PROGRESS_METER_CLASS(){ referrer->DetachProgressMeter( this ); }
virtual int Annotate( const char *, ... );
virtual void SetRange( int, int );
virtual void SetValue( int );
- protected:
- HWND message_line, progress_bar;
+ private:
+ AppWindowMaker *referrer;
+ HWND annotation, count, lim, frac, progress_bar;
+ void PutVal( HWND, const char *, ... );
+ int total;
};
inline
@@ -82,55 +88,23 @@ inline void AppWindowMaker::DetachProgressMeter( pkgProgressMeter *meter )
}
}
-/* We need to provide a destructor for the abstract base class, from which
- * our progress meters are derived; here is as good a place as any.
- */
-pkgProgressMeter::~pkgProgressMeter(){ referrer->DetachProgressMeter( this ); }
-
/* We must also provide the implementation of our local progress meter class.
*/
-ProgressMeterMaker::ProgressMeterMaker
-( HWND annotation, HWND indicator, AppWindowMaker *owner ):
-pkgProgressMeter( owner ), message_line( annotation ), progress_bar( indicator )
+#define IDD( DLG, ITEM ) GetDlgItem( DLG, IDD_PROGRESS_##ITEM )
+PROGRESS_METER_CLASS::PROGRESS_METER_CLASS( HWND dlg, AppWindowMaker *owner ):
+referrer( owner ), annotation( IDD( dlg, MSG ) ), progress_bar( IDD( dlg, BAR ) ),
+count( IDD( dlg, VAL ) ), lim( IDD( dlg, MAX ) ), frac( IDD( dlg, PCT ) )
{
/* Constructor creates an instance of the progress meter class, attaching it
* to the main application window, with an initial metering range of 0..100%,
* and a starting indicated completion state of 0%.
*/
owner->AttachProgressMeter( this );
- SetRange( 0, 100 );
+ SetRange( 0, 1 ); SetValue( 0 );
SetValue( 0 );
}
-int ProgressMeterMaker::Annotate( const char *fmt, ... )
-{
- /* Method to add a printf() style annotation to the progress meter dialogue.
- */
- va_list argv;
- va_start( argv, fmt );
- char annotation[1 + vsnprintf( NULL, 0, fmt, argv )];
- int len = vsnprintf( annotation, sizeof( annotation ), fmt, argv );
- va_end( argv );
-
- SendMessage( message_line, WM_SETTEXT, 0, (LPARAM)(annotation) );
- return len;
-}
-
-void ProgressMeterMaker::SetRange( int min, int max )
-{
- /* Method to adjust the range of the progress meter, to represent any
- * arbitrary range of discrete values, rather than percentage units.
- */
- SendMessage( progress_bar, PBM_SETRANGE, 0, MAKELPARAM( min, max ) );
-}
-
-void ProgressMeterMaker::SetValue( int value )
-{
- /* Method to update the indicated completion state of a progress meter,
- * to represent any arbitrary value within its assigned metering range.
- */
- SendMessage( progress_bar, PBM_SETPOS, value, 0 );
-}
+#include "pmihook.cpp"
/* Implementation of service routines, for loading the package catalogue
* from its defining collection of XML files.
@@ -215,20 +189,18 @@ static void pkgInvokeInitDataLoad( void *window )
* we subject it to progress metering, to ensure that the user is
* not left staring at an apparently hung, blank window.
*/
- HWND msg = GetDlgItem( (HWND)(window), IDD_PROGRESS_MSG );
- HWND dlg = GetDlgItem( (HWND)(window), IDD_PROGRESS_BAR );
AppWindowMaker *app = GetAppWindow( GetParent( (HWND)(window) ));
SendMessage( (HWND)(window),
WM_SETTEXT, 0, (LPARAM)("Loading Package Catalogue")
);
- ProgressMeterMaker ui( msg, dlg, app );
+ ProgressMeterMaker ui( (HWND)(window), app );
/* For this activity, we request automatic dismissal of the dialogue,
* when loading has been completed; the user will have an opportunity
* to countermand this choice, if loading is delayed by the required
* download of any missing local catalogue file.
*/
- dlg = GetDlgItem( (HWND)(window), IDD_AUTO_CLOSE_OPTION );
+ HWND dlg = GetDlgItem( (HWND)(window), IDD_AUTO_CLOSE_OPTION );
SendMessage( dlg, WM_SETTEXT, 0,
(LPARAM)("Close dialogue automatically, when loading is complete.")
);
@@ -267,10 +239,8 @@ static void pkgInvokeUpdate( void *window )
* subject it to progress metering, to ensure that the user is
* not left staring at an apparently hung, blank window.
*/
- HWND msg = GetDlgItem( (HWND)(window), IDD_PROGRESS_MSG );
- HWND dlg = GetDlgItem( (HWND)(window), IDD_PROGRESS_BAR );
AppWindowMaker *app = GetAppWindow( GetParent( (HWND)(window) ));
- ProgressMeterMaker ui( msg, dlg, app );
+ ProgressMeterMaker ui( (HWND)(window), app );
/* After setting up the progress meter, we clear out any data
* which was previously loaded into the package list, reload it
@@ -292,8 +262,8 @@ static void pkgInvokeUpdate( void *window )
else
{ /* ...otherwise, we activate the manual dismissal button...
*/
- if( (dlg = GetDlgItem( (HWND)(window), IDOK )) != NULL )
- EnableWindow( dlg, TRUE );
+ HWND dlg = GetDlgItem( (HWND)(window), IDOK );
+ if( dlg != NULL ) EnableWindow( dlg, TRUE );
/* ...and notify the user that it must be clicked to continue.
*/
diff --git a/src/guimain.rc b/src/guimain.rc
index 104975f..b40d745 100644
--- a/src/guimain.rc
+++ b/src/guimain.rc
@@ -151,25 +151,30 @@ ID_PKGSTATE_BROKEN ICON DISCARDABLE "state11.ico"
ID_PKGSTATE_REMOVE ICON DISCARDABLE "state12.ico"
ID_PKGSTATE_PURGE ICON DISCARDABLE "state13.ico"
+#define SS_CTEXTBOX SS_SUNKEN | SS_CENTER
+#define ES_VT100 ES_LEFT | ES_READONLY | ES_MULTILINE | ES_AUTOVSCROLL
+
/* Template for progress meter dialogue box.
*/
-IDD_REPO_UPDATE DIALOG DISCARDABLE 10, 20, 270, 60
+IDD_REPO_UPDATE DIALOG DISCARDABLE 10, 20, 270, 78
CAPTION "Update Package Catalogue"
STYLE DS_MODALFRAME | DS_SETFONT | WS_POPUP | WS_CAPTION | WS_DLGFRAME
FONT 10, "Verdana"
BEGIN
- GROUPBOX "Actions", IDD_CLOSE_OPTIONS, 5, 31, 260, 25
- DEFPUSHBUTTON "Close", IDOK, 219, 39, 40, 12, WS_GROUP | WS_DISABLED
+ GROUPBOX "Actions", IDD_CLOSE_OPTIONS, 5, 48, 260, 25
+ DEFPUSHBUTTON "Close", IDOK, 219, 56, 40, 12, WS_GROUP | WS_DISABLED
AUTOCHECKBOX "Close dialogue automatically, when update is complete.", \
- IDD_AUTO_CLOSE_OPTION, 10, 41, 200, 11
+ IDD_AUTO_CLOSE_OPTION, 10, 58, 200, 11
+ CONTROL "", IDD_PROGRESS_VAL, "STATIC", SS_CTEXTBOX, 6, 19, 96, 10
+ CTEXT "of", IDD_PROGRESS_TXT, 102, 19, 18, 10
+ CONTROL "", IDD_PROGRESS_MAX, "STATIC", SS_CTEXTBOX, 120, 19, 96, 10
+ CTEXT ":", IDD_PROGRESS_TXT, 213, 19, 10, 10
+ CONTROL "", IDD_PROGRESS_PCT, "STATIC", SS_CTEXTBOX, 223, 19, 41, 10
CONTROL "", IDD_PROGRESS_BAR, PROGRESS_CLASS, WS_CHILD \
- | PBS_SMOOTH, 6, 20, 258, 10
+ | PBS_SMOOTH, 6, 34, 258, 10
LTEXT "", IDD_PROGRESS_MSG, 7, 6, 256, 12
END
-#define SS_CTEXTBOX SS_SUNKEN | SS_CENTER
-#define ES_VT100 ES_LEFT | ES_READONLY | ES_MULTILINE | ES_AUTOVSCROLL
-
/* Template for dialogue requesting user confirmation of intent
* to proceed with scheduled change actions.
*/
diff --git a/src/pkgbase.h b/src/pkgbase.h
index 9a48507..a801467 100644
--- a/src/pkgbase.h
+++ b/src/pkgbase.h
@@ -50,10 +50,6 @@ EXTERN_C int pkgPutEnv( int, char* );
class pkgSpecs;
class pkgDirectory;
-#ifndef GUIMAIN_H
-class AppWindowMaker;
-#endif
-
class pkgProgressMeter
{
/* An abstract base class, from which the controller class
@@ -63,11 +59,6 @@ class pkgProgressMeter
virtual void SetValue( int ) = 0;
virtual void SetRange( int, int ) = 0;
virtual int Annotate( const char *, ... ) = 0;
-
- protected:
- AppWindowMaker *referrer;
- pkgProgressMeter( AppWindowMaker *ref = NULL ): referrer( ref ){}
- ~pkgProgressMeter();
};
class pkgXmlNode : public TiXmlElement
diff --git a/src/pkgbind.cpp b/src/pkgbind.cpp
index a6de809..b6559c6 100644
--- a/src/pkgbind.cpp
+++ b/src/pkgbind.cpp
@@ -104,8 +104,10 @@ void pkgRepository::GetPackageList( const char *dname )
/* Set up diagnostics for reporting catalogue loading progress.
*/
- const char *mode = force_update ? "Retaining" : "Loading";
- const char *fmt = "%s catalogue: %s.xml; (item %d of %d)\n";
+ const char *mode = force_update ? "Checking" : "Loading";
+ const char *fmt = (owner->ProgressMeter() == NULL)
+ ? "%s catalogue: %s.xml; (item %d of %d)\n"
+ : "%s catalogue: %s.xml\n";
/* Check for a locally cached copy of the "package-list" file...
*/
diff --git a/src/pmihook.cpp b/src/pmihook.cpp
new file mode 100644
index 0000000..0f1ca59
--- /dev/null
+++ b/src/pmihook.cpp
@@ -0,0 +1,78 @@
+/*
+ * pmihook.cpp
+ *
+ * $Id$
+ *
+ * Written by Keith Marshall <kei...@us...>
+ * Copyright (C) 2013, MinGW.org Project
+ *
+ *
+ * Implementation of the generic methods required by an "item counting"
+ * progress meter, such as used by the setup tool and GUI installer, when
+ * synchronising local catalogue files with the repository. This file is
+ * compiled by inclusion at point of use, after PROGRESS_METER_CLASS has
+ * been defined to appropriately identify the name of the class with
+ * which these methods are to be associated.
+ *
+ *
+ * This is free software. Permission is granted to copy, modify and
+ * redistribute this software, under the provisions of the GNU General
+ * Public License, Version 3, (or, at your option, any later version),
+ * as published by the Free Software Foundation; see the file COPYING
+ * for licensing details.
+ *
+ * Note, in particular, that this software is provided "as is", in the
+ * hope that it may prove useful, but WITHOUT WARRANTY OF ANY KIND; not
+ * even an implied WARRANTY OF MERCHANTABILITY, nor of FITNESS FOR ANY
+ * PARTICULAR PURPOSE. Under no circumstances will the author, or the
+ * MinGW Project, accept liability for any damages, however caused,
+ * arising from the use of this software.
+ *
+ */
+void PROGRESS_METER_CLASS::SetRange( int min, int max )
+{
+ /* Method to adjust the range of the progress meter, to represent any
+ * arbitrary range of discrete values, rather than percentage units.
+ */
+ SendMessage( progress_bar, PBM_SETRANGE, 0, MAKELPARAM( min, total = max ) );
+}
+
+void PROGRESS_METER_CLASS::SetValue( int value )
+{
+ /* Method to update the indicated completion state of a progress meter,
+ * to represent any arbitrary value within its assigned metering range.
+ */
+ const char *plural = "s";
+ if( total == 1 ) ++plural;
+ PutVal( count, "Processed %d", value );
+ PutVal( lim, "%d item%s", total, plural );
+ SendMessage( progress_bar, PBM_SETPOS, value, 0 );
+ PutVal( frac, "%d %%", (value * 100UL) / total );
+}
+
+int PROGRESS_METER_CLASS::Annotate( const char *fmt, ... )
+{
+ /* Method to add a printf() style annotation to the progress meter dialogue.
+ */
+ va_list argv;
+ va_start( argv, fmt );
+ char text[1 + vsnprintf( NULL, 0, fmt, argv )];
+ int len = vsnprintf( text, sizeof( text ), fmt, argv );
+ va_end( argv );
+
+ SendMessage( annotation, WM_SETTEXT, 0, (LPARAM)(text) );
+ return len;
+};
+
+void PROGRESS_METER_CLASS::PutVal( HWND viewport, const char *fmt, ... )
+{
+ /* Private method, called by SetValue(), to display the numeric values
+ * of the progress counters, in their appropriate viewports.
+ */
+ va_list argv; va_start( argv, fmt );
+ char text[1 + vsnprintf( NULL, 0, fmt, argv )]; vsprintf( text, fmt, argv );
+ SendMessage( viewport, WM_SETTEXT, 0, (LPARAM)(text) );
+ va_end( argv );
+}
+
+/* $RCSfile$: end of file */
https://sf.net/p/mingw/mingw-get/ci/3af854087dc5e5aad5eb58e6ce309d8e79e57bb3/
commit 3af854087dc5e5aad5eb58e6ce309d8e79e57bb3
Author: Keith Marshall <kei...@us...>
Date: Fri May 31 13:26:50 2013 +0100
Avoid a potential macro definition conflict.
diff --git a/ChangeLog b/ChangeLog
index 8a6217b..899ad0a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2013-05-31 Keith Marshall <kei...@us...>
+
+ Avoid a potential macro definition conflict.
+
+ * src/pkgbase.h (strcasecmp) [__MINGW32__]: Use string.h definition.
+
2013-05-15 Keith Marshall <kei...@us...>
Streamline build-time dependency tracking procedures.
diff --git a/src/pkgbase.h b/src/pkgbase.h
index 696d691..9a48507 100644
--- a/src/pkgbase.h
+++ b/src/pkgbase.h
@@ -527,10 +527,14 @@ bool safe_strcmp( strcmp_function strcmp, const char *value, const char *proto )
# ifndef CASE_INSENSITIVE_FILESYSTEM
# define CASE_INSENSITIVE_FILESYSTEM 1
# endif
+# ifndef __MINGW32__
/* The preferred name for MS-Windows' case insensitive string
- * matching function, equivalent to POSIX strcasecmp().
+ * matching function, equivalent to POSIX strcasecmp(); MinGW's
+ * string.h will have established this mapping already, so we
+ * don't introduce a (possibly incompatible) redefinition.
*/
-# define strcasecmp stricmp
+# define strcasecmp _stricmp
+# endif
#else
/* On other systems, we prefer to adopt case sensitive matching
* strategies for subsystem and file names.
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 34 ++++++++++++++++++++++++
src/guiexec.cpp | 72 +++++++++++++++------------------------------------
src/guimain.rc | 21 +++++++++-----
src/pkgbase.h | 17 ++++--------
src/pkgbind.cpp | 6 +++-
src/pmihook.cpp | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
6 files changed, 156 insertions(+), 72 deletions(-)
create mode 100644 src/pmihook.cpp
hooks/post-receive
--
Repository: mingw-get
|
|
From: Earnie B. <no...@so...> - 2013-06-07 23:19: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, 4.0-dev has been updated
via aae1b310df39d2d33a3b42dcc8e159ec933f6f3d (commit)
via aba8deb8b99df5cd66497e292856e63b66aada61 (commit)
via c2693c327b019dde40d2331c330ec7a1de20a2b6 (commit)
from 0928206595b51b94e5c291fe7164f01c88d5e64c (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/aae1b310df39d2d33a3b42dcc8e159ec933f6f3d/
commit aae1b310df39d2d33a3b42dcc8e159ec933f6f3d
Merge: aba8deb 0928206
Author: Earnie Boyd <ea...@us...>
Date: Fri Jun 7 19:18:37 2013 -0400
Merge changes from repository.
diff --cc ChangeLog
index 72c221f,e54c7e1..96e0515
--- a/ChangeLog
+++ b/ChangeLog
@@@ -1,24 -1,18 +1,38 @@@
+2013-06-07 Earnie Boyd <ea...@us...>
+
+ * include/_mingw.h (_CRTALIAS): Add comments explaining its purpose.
+ (__CRT_MAYBE_INLINE): New macro that may be defined as __CRT_INLINE or
+ empty depending on __NO_INLINE__.
+ * include/stat.h (_fstat64i32(), _fstat32i64(), _stat64i32(),
+ _stat32i64(), _wstat64i32(), _wstat32i64()): Use __CRT_MAYBE_INLINE
+ instead of guarding with __NO_INLINE__ since the functions need to be
+ always created.
+ * include/wchar.h (_utimbuf, _utimbuf32, _utimbuf64, _wutime(),
+ _wutime32(), _wutime64()): MSDN declares these can be declared/defined
+ by including wchar.h.
+ * include/utime.h: Care for _USE_32BIT_TIME_T in same fashion as time.h.
+
+
+2013-06-07 Jan Nijtmans <nij...@us...>
+
+ * include/time.h: Correct typos. Add MSVCRT_VERSION >= 800 guard for
+ _CRTALIAS of _wctime.
+
+ 2013-06-05 Keith Marshall <kei...@us...>
+
+ Provide more robust inverse hyperbolic sine functions.
+
+ * src/libcrt/math/asinh.c: Rewritten; it now provides a generic
+ implementation for asinh(), asinhf(), and asinhl() functions; thus...
+ * src/libcrt/math/asinhf.c src/libcrt/math/asinhl.c: ...are obsolete;
+ delete them.
+
+ * Makefile.in (math_SOURCES): Remove references for asinh[fl].c
+ (libmingwex_a_OBJECTS): Add explicit references to create associated
+ object files, from the common generic source, together with build
+ rules to compile them.
+
-2013-06-05 Mark Brand <ma...@us...>
+2013-06-05 Mark <ma...@us...>
* include/shlobj.h (SHGetFolderPath): Correct typo for UNICODE define.
https://sf.net/p/mingw/mingw-org-wsl/ci/aba8deb8b99df5cd66497e292856e63b66aada61/
commit aba8deb8b99df5cd66497e292856e63b66aada61
Author: Earnie Boyd <ea...@us...>
Date: Fri Jun 7 19:06:19 2013 -0400
Miscellaneous changes toward finalizing the _USE_32BIT_TIME_T debacle.
diff --git a/ChangeLog b/ChangeLog
index 991f94c..72c221f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2013-06-07 Earnie Boyd <ea...@us...>
+
+ * include/_mingw.h (_CRTALIAS): Add comments explaining its purpose.
+ (__CRT_MAYBE_INLINE): New macro that may be defined as __CRT_INLINE or
+ empty depending on __NO_INLINE__.
+ * include/stat.h (_fstat64i32(), _fstat32i64(), _stat64i32(),
+ _stat32i64(), _wstat64i32(), _wstat32i64()): Use __CRT_MAYBE_INLINE
+ instead of guarding with __NO_INLINE__ since the functions need to be
+ always created.
+ * include/wchar.h (_utimbuf, _utimbuf32, _utimbuf64, _wutime(),
+ _wutime32(), _wutime64()): MSDN declares these can be declared/defined
+ by including wchar.h.
+ * include/utime.h: Care for _USE_32BIT_TIME_T in same fashion as time.h.
+
+
2013-06-07 Jan Nijtmans <nij...@us...>
* include/time.h: Correct typos. Add MSVCRT_VERSION >= 800 guard for
diff --git a/include/_mingw.h b/include/_mingw.h
index 4706ddb..f038fdf 100644
--- a/include/_mingw.h
+++ b/include/_mingw.h
@@ -195,8 +195,22 @@
# endif
#endif
+/* _CRTALIAS will be used when we have a function whose purpose is to return
+ * the value of a similar function. This alias function will contain one line
+ * of code.
+ */
#define _CRTALIAS __CRT_INLINE __attribute__ ((__always_inline__))
+/* __CRT_MAYBE_INLINE is to be used when we provide functions in the headers
+ * to provide compatibility between differing versions of MSVCRT.DLL for
+ * differing OS versions. See stat.h for examples.
+ */
+#ifndef __NO_INLINE__
+#define __CRT_MAYBE_INLINE __CRT_INLINE
+#else /* def __NO_INLINE__ */
+#define __CRT_MAYBE_INLINE
+#endif /* ndef __NO_INLINE__ */
+
#ifdef __cplusplus
# define BEGIN_C_DECLS extern "C" {
# define __UNUSED_PARAM(x)
diff --git a/include/sys/stat.h b/include/sys/stat.h
index 35b4023..36198f0 100644
--- a/include/sys/stat.h
+++ b/include/sys/stat.h
@@ -193,98 +193,90 @@ _CRTALIAS int __cdecl __MINGW_NOTHROW _fstat32 (int _v1, struct _stat32* _v2) {
_CRTIMP int __cdecl __MINGW_NOTHROW _fstat64 (int, struct _stat64*);
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 */
- __CRT_INLINE int __cdecl _fstat64i32(int desc, struct _stat64i32 *_stat)
- {
- struct _stat64 st;
- int ret = _fstat64(desc, &st);
- if (ret == -1) {
- memset(_stat, 0, sizeof(struct _stat64i32));
- 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_MAYBE_INLINE int __cdecl _fstat64i32(int desc, struct _stat64i32 *_stat) {
+ struct _stat64 st;
+ int ret = _fstat64(desc, &st);
+ if (ret == -1) {
+ memset(_stat, 0, sizeof(struct _stat64i32));
+ return -1;
}
- __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;
+ _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_MAYBE_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;
}
- __CRT_INLINE int __cdecl _stat64i32(const char *fname, struct _stat64i32 *_stat)
- {
- struct _stat64 st;
- int ret = _stat64(fname, &st);
- if (ret == -1) {
- memset(_stat, 0, sizeof(struct _stat64i32));
- 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;
+ _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_MAYBE_INLINE int __cdecl _stat64i32(const char *fname, struct _stat64i32 *_stat)
+{
+ struct _stat64 st;
+ int ret = _stat64(fname, &st);
+ if (ret == -1) {
+ memset(_stat, 0, sizeof(struct _stat64i32));
+ return -1;
}
- __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;
+ _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_MAYBE_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;
}
-#else
-#define _stat32i64 _stat32
-#define _fstat32i64 _fstat32
-#define _stat64i32 _stat64
-#define _fstat64i32 _fstat64
-#endif
+ _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;
+}
#define __stat64 _stat64
#if defined(_USE_32BIT_TIME_T)
@@ -292,13 +284,16 @@ int __cdecl __MINGW_NOTHROW _fstat64i32 (int, struct _stat64i32*);
#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__)
@@ -316,62 +311,58 @@ _CRTALIAS int __cdecl __MINGW_NOTHROW _wstat32 (const wchar_t* _v1, struct _stat
_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*);
-#ifndef __NO_INLINE__
#include <string.h> /* Need memset declaration */
- __CRT_INLINE int __cdecl _wstat64i32(const wchar_t *fname, struct _stat64i32 *_stat)
- {
- struct _stat64 st;
- int ret = _wstat64(fname, &st);
- if (ret == -1) {
- memset(_stat, 0, sizeof(struct _stat64i32));
- 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_MAYBE_INLINE int __cdecl _wstat64i32(const wchar_t *fname, struct _stat64i32 *_stat)
+{
+ struct _stat64 st;
+ int ret = _wstat64(fname, &st);
+ if (ret == -1) {
+ memset(_stat, 0, sizeof(struct _stat64i32));
+ return -1;
}
- __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;
+ _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_MAYBE_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;
}
-#else
-#define _wstat32i64 _wstat32
-#define _wstat64i32 _wstat64
-#endif
+ _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;
+}
#if defined(_USE_32BIT_TIME_T)
#define _wstat _wstat32
#define _wstati64 _wstat32i64
-#else /* !_USE_32BIT_TIME_T */
+#else /* !_USE_32BIT_TIME_T */
#define _wstat _wstat64i32
#define _wstati64 _wstat64
+
#endif /* _USE_32BIT_TIME_T */
#define _WSTAT_DEFINED
diff --git a/include/sys/utime.h b/include/sys/utime.h
index e8e5a9c..9d5db74 100644
--- a/include/sys/utime.h
+++ b/include/sys/utime.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
@@ -36,6 +36,7 @@
/*
* Structure used by _utime function.
*/
+#ifndef _UTIMBUF_DEFINED
struct _utimbuf
{
time_t actime; /* Access time */
@@ -46,6 +47,11 @@ struct __utimbuf32
__time32_t actime;
__time32_t modtime;
};
+struct __utimbuf64
+{
+ __time64_t actime;
+ __time64_t modtime;
+};
#ifndef _NO_OLDNAMES
@@ -55,54 +61,99 @@ struct utimbuf
time_t actime;
time_t modtime;
};
+struct utimbuf32
+{
+ __time32_t actime;
+ __time32_t modtime;
+};
#endif /* Not _NO_OLDNAMES */
+#define _UTIMBUF_DEFINED
+#endif /* ndef _UTIMBUF_DEFINED */
#ifdef __cplusplus
extern "C" {
#endif
-_CRTIMP int __cdecl __MINGW_NOTHROW _utime (const char*, struct _utimbuf*);
-
#ifndef _NO_OLDNAMES
+#ifdef _USE_32BIT_TIME_T
_CRTIMP int __cdecl __MINGW_NOTHROW utime (const char*, struct utimbuf*);
+#else
+#define utime _utime
+#endif
#endif /* Not _NO_OLDNAMES */
-_CRTIMP int __cdecl __MINGW_NOTHROW _futime (int, struct _utimbuf*);
-
-/* The wide character version, only available for MSVCRT versions of the
- * C runtime library. */
-_CRTIMP int __cdecl __MINGW_NOTHROW _wutime (const wchar_t*, struct _utimbuf*);
-
-/* These require newer versions of msvcrt.dll (6.10 or higher). */
-struct __utimbuf64
-{
- __time64_t actime;
- __time64_t modtime;
-};
-
_CRTIMP int __cdecl __MINGW_NOTHROW _utime64 (const char*, struct __utimbuf64*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _wutime64 (const wchar_t*, struct __utimbuf64*);
_CRTIMP int __cdecl __MINGW_NOTHROW _futime64 (int, struct __utimbuf64*);
+#if MSVCRT_VERSION >= 800
_CRTIMP int __cdecl __MINGW_NOTHROW _utime32 (const char*, struct __utimbuf32*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _wutime32 (const wchar_t*, struct __utimbuf32*);
_CRTIMP int __cdecl __MINGW_NOTHROW _futime32 (int, struct __utimbuf32*);
-#ifndef _USE_32BIT_TIME_T
-_CRTALIAS int __cdecl __MINGW_NOTHROW _utime (const char* _v1, struct _utimbuf* _v2) { return(_utime64 (_v1,(struct __utimbuf64*)_v2)); }
-_CRTALIAS int __cdecl __MINGW_NOTHROW _wutime (const wchar_t* _v1, struct _utimbuf* _v2) { return(_wutime64 (_v1,(struct __utimbuf64*)_v2)); }
-_CRTALIAS int __cdecl __MINGW_NOTHROW _futime (int _v1, struct _utimbuf* _v2) { return(_futime64 (_v1,(struct __utimbuf64*)_v2)); }
#else
+_CRTIMP int __cdecl __MINGW_NOTHROW _utime (const char*, struct _utimbuf*);
+_CRTALIAS int __cdecl __MINGW_NOTHROW _utime32 (const char* _v1, struct __utimbuf32* _v2) {
+ return _utime(_v1, _v2);
+}
+
+_CRTIMP int __cdecl __MINGW_NOTHROW _futime (int, struct _utimbuf*);
+_CRTALIAS int __cdecl __MINGW_NOTHROW _futime32 (int _v1, struct __utimbuf32* _v2) {
+ return _futime(_v1, _v2);
+}
-_CRTALIAS int __cdecl __MINGW_NOTHROW _utime (const char* _v1, struct _utimbuf* _v2) { return(_utime32 (_v1,(struct __utimbuf32*)_v2)); }
-_CRTALIAS int __cdecl __MINGW_NOTHROW _wutime (const wchar_t* _v1, struct _utimbuf* _v2) { return(_wutime32 (_v1,(struct __utimbuf32*)_v2)); }
-_CRTALIAS int __cdecl __MINGW_NOTHROW _futime (int _v1, struct _utimbuf* _v2) { return(_futime32 (_v1,(struct __utimbuf32*)_v2)); }
#endif
+#ifndef _USE_32BIT_TIME_T
+_CRTALIAS int __cdecl __MINGW_NOTHROW _utime (const char* _v1, struct _utimbuf* _v2) {
+ return(_utime64 (_v1,(struct __utimbuf64*)_v2));
+}
+_CRTALIAS int __cdecl __MINGW_NOTHROW _futime (int _v1, struct _utimbuf* _v2) {
+ return(_futime64 (_v1,(struct __utimbuf64*)_v2));
+}
+
+#else /* def _USE_32BIT_TIME_T */
+#if MSVCRT_VERSION >= 800
+_CRTALIAS int __cdecl __MINGW_NOTHROW _utime (const char* _v1, struct _utimbuf* _v2) {
+ return(_utime32 (_v1,(struct __utimbuf32*)_v2));
+}
+_CRTALIAS int __cdecl __MINGW_NOTHROW _futime (int _v1, struct _utimbuf* _v2) {
+ return(_futime32 (_v1,(struct __utimbuf32*)_v2));
+}
+#endif /* MSVCRT_VERSION >= 800 */
+
+#endif /* ndef _USE_32BIT_TIME_T */
+
+#ifndef _WUTIME_DEFINED
+_CRTIMP int __cdecl __MINGW_NOTHROW _wutime64 (const wchar_t*, struct __utimbuf64*);
+#if MSVCRT_VERSION >= 800
+_CRTIMP int __cdecl __MINGW_NOTHROW _wutime32 (const wchar_t*, struct __utimbuf32*);
+
+#else /* MSVCRT_VERSION < 800 */
+_CRTIMP int __cdecl __MINGW_NOTHROW _wutime (const wchar_t*, struct _utimbuf*);
+_CRTALIAS int __cdecl __MINGW_NOTHROW _wutime32 (const wchar_t* _v1, struct __utimbuf32* _v2) {
+ return _wutime(_v1, _v2);
+}
+
+#endif /* MSVCRT_VERSION >= 800 */
+#ifdef _USE_32BIT_TIME_T
+#if MSVCRT_VERSION >= 800
+_CRTALIAS int __cdecl __MINGW_NOTHROW _wutime (const wchar_t* _v1, struct _utimbuf* _v2) {
+ return(_wutime32 (_v1,(struct __utimbuf32*)_v2));
+}
+#endif /* MSVCRT_VERSION >= 800 */
+
+#else /* ndef _USE_32BIT_TIME_T */
+_CRTALIAS int __cdecl __MINGW_NOTHROW _wutime (const wchar_t* _v1, struct _utimbuf* _v2) {
+ return(_wutime64 (_v1,(struct __utimbuf64*)_v2));
+}
+
+#endif /* def _USE_32BIT_TIME_T */
+#define _WUTIME_DEFINED
+#endif /* ndef _WUTIME_DEFINED */
+
#ifdef __cplusplus
}
#endif
#endif /* Not RC_INVOKED */
-#endif /* Not _UTIME_H_ */
+#endif /* Not _UTIME_H_ */
\ No newline at end of file
diff --git a/include/wchar.h b/include/wchar.h
index 4bd32da..7066839 100644
--- a/include/wchar.h
+++ b/include/wchar.h
@@ -98,6 +98,43 @@ struct tm {
#define _TM_DEFINED
#endif
+/*
+ * Structure used by _utime function.
+ */
+#ifndef _UTIMBUF_DEFINED
+struct _utimbuf
+{
+ time_t actime; /* Access time */
+ time_t modtime; /* Modification time */
+};
+struct __utimbuf32
+{
+ __time32_t actime;
+ __time32_t modtime;
+};
+struct __utimbuf64
+{
+ __time64_t actime;
+ __time64_t modtime;
+};
+
+
+#ifndef _NO_OLDNAMES
+/* NOTE: Must be the same as _utimbuf above. */
+struct utimbuf
+{
+ time_t actime;
+ time_t modtime;
+};
+struct utimbuf32
+{
+ __time32_t actime;
+ __time32_t modtime;
+};
+#endif /* Not _NO_OLDNAMES */
+#define _UTIMBUF_DEFINED
+#endif /* ndef _UTIMBUF_DEFINED */
+
#ifndef _WSTDIO_DEFINED
/* Also in stdio.h - keep in sync */
_CRTIMP int __cdecl __MINGW_NOTHROW fwprintf (FILE*, const wchar_t*, ...);
@@ -226,6 +263,35 @@ _CRTALIAS wchar_t* __cdecl __MINGW_NOTHROW _wctime (const time_t* _v) { return(_
#endif /* __STRICT_ANSI__ */
_CRTIMP size_t __cdecl __MINGW_NOTHROW wcsftime (wchar_t*, size_t, const wchar_t*, const struct tm*);
+
+#ifndef _WUTIME_DEFINED
+_CRTIMP int __cdecl __MINGW_NOTHROW _wutime64 (const wchar_t*, struct __utimbuf64*);
+#if MSVCRT_VERSION >= 800
+_CRTIMP int __cdecl __MINGW_NOTHROW _wutime32 (const wchar_t*, struct __utimbuf32*);
+
+#else /* MSVCRT_VERSION < 800 */
+_CRTIMP int __cdecl __MINGW_NOTHROW _wutime (const wchar_t*, struct _utimbuf*);
+_CRTALIAS int __cdecl __MINGW_NOTHROW _wutime32 (const wchar_t* _v1, struct __utimbuf32* _v2) {
+ return _wutime(_v1, _v2);
+}
+
+#endif /* MSVCRT_VERSION >= 800 */
+#ifdef _USE_32BIT_TIME_T
+#if MSVCRT_VERSION >= 800
+_CRTALIAS int __cdecl __MINGW_NOTHROW _wutime (const wchar_t* _v1, struct _utimbuf* _v2) {
+ return(_wutime32 (_v1,(struct __utimbuf32*)_v2));
+}
+#endif /* MSVCRT_VERSION >= 800 */
+
+#else /* ndef _USE_32BIT_TIME_T */
+_CRTALIAS int __cdecl __MINGW_NOTHROW _wutime (const wchar_t* _v1, struct _utimbuf* _v2) {
+ return(_wutime64 (_v1,(struct __utimbuf64*)_v2));
+}
+
+#endif /* def _USE_32BIT_TIME_T */
+#define _WUTIME_DEFINED
+#endif /* ndef _WUTIME_DEFINED */
+
#define _WTIME_DEFINED
#endif /* _WTIME_DEFINED */
https://sf.net/p/mingw/mingw-org-wsl/ci/c2693c327b019dde40d2331c330ec7a1de20a2b6/
commit c2693c327b019dde40d2331c330ec7a1de20a2b6
Author: Jan Nitjmans <nij...@us...>
Date: Fri Jun 7 18:47:09 2013 -0400
include/time.h: Correct typos. Add MSVCRT_VERSION >= 800 guard for _CRTALIAS of _wctime.
diff --git a/ChangeLog b/ChangeLog
index 99b72f0..991f94c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-06-07 Jan Nijtmans <nij...@us...>
+
+ * include/time.h: Correct typos. Add MSVCRT_VERSION >= 800 guard for
+ _CRTALIAS of _wctime.
+
2013-06-05 Mark <ma...@us...>
* include/shlobj.h (SHGetFolderPath): Correct typo for UNICODE define.
diff --git a/include/time.h b/include/time.h
index 5578518..ca55701 100644
--- a/include/time.h
+++ b/include/time.h
@@ -247,21 +247,27 @@ __MINGW_IMPORT char *tzname[2];
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wasctime(const struct tm*);
_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*);
+_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wctime64(const __time64_t*);
+#if MSVCRT_VERSION >= 800
+_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wctime32(const __time32_t*);
#else
-_CRTALIAS whcar_t* __cdecl __MINGW_NOTHROW _wctime32 (const __time32_t* _v) {
+_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wctime(const time_t*);
+_CRTALIAS wchar_t* __cdecl __MINGW_NOTHROW _wctime32(const __time32_t* _v) {
return(_wctime((time_t)_v));
}
#endif /* 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)); }
+#if MSVCRT_VERSION >= 800
+_CRTALIAS wchar_t* __cdecl __MINGW_NOTHROW _wctime (const time_t* _v) {
+ return(_wctime32 (_v));
+}
#endif
+#else /* ndef _USE_32BIT_TIME_T */
+_CRTALIAS wchar_t* __cdecl __MINGW_NOTHROW _wctime (const time_t* _v) {
+ return(_wctime64 (_v));
+}
+#endif /* def _USE_32BIT_TIME_T */
#endif /* __STRICT_ANSI__ */
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 22 ++++-
include/_mingw.h | 14 +++
include/sys/stat.h | 257 +++++++++++++++++++++++++--------------------------
include/sys/utime.h | 105 ++++++++++++++++------
include/time.h | 22 +++--
include/wchar.h | 66 +++++++++++++
6 files changed, 317 insertions(+), 169 deletions(-)
hooks/post-receive
--
Repository: mingw-org-wsl
|
|
From: Keith M. <no...@so...> - 2013-06-05 22:07:14
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Repository: mingw-org-wsl".
The branch, 4.0-dev has been updated
via 0928206595b51b94e5c291fe7164f01c88d5e64c (commit)
from a6f8202737338809c241e13f8c674d4661c251a4 (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/0928206595b51b94e5c291fe7164f01c88d5e64c/
commit 0928206595b51b94e5c291fe7164f01c88d5e64c
Author: Keith Marshall <kei...@us...>
Date: Wed Jun 5 22:57:16 2013 +0100
Provide more robust inverse hyperbolic sine functions.
diff --git a/ChangeLog b/ChangeLog
index 99b72f0..e54c7e1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,18 @@
-2013-06-05 Mark <ma...@us...>
+2013-06-05 Keith Marshall <kei...@us...>
+
+ Provide more robust inverse hyperbolic sine functions.
+
+ * src/libcrt/math/asinh.c: Rewritten; it now provides a generic
+ implementation for asinh(), asinhf(), and asinhl() functions; thus...
+ * src/libcrt/math/asinhf.c src/libcrt/math/asinhl.c: ...are obsolete;
+ delete them.
+
+ * Makefile.in (math_SOURCES): Remove references for asinh[fl].c
+ (libmingwex_a_OBJECTS): Add explicit references to create associated
+ object files, from the common generic source, together with build
+ rules to compile them.
+
+2013-06-05 Mark Brand <ma...@us...>
* include/shlobj.h (SHGetFolderPath): Correct typo for UNICODE define.
diff --git a/Makefile.in b/Makefile.in
index 4e012d4..bde26c3 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -365,8 +365,6 @@ math_SOURCES := \
$(SRCDIR)/acosl.c \
$(SRCDIR)/asinf.c \
$(SRCDIR)/asinh.c \
- $(SRCDIR)/asinhf.c \
- $(SRCDIR)/asinhl.c \
$(SRCDIR)/asinl.c \
$(SRCDIR)/atan2f.c \
$(SRCDIR)/atan2l.c \
@@ -624,6 +622,10 @@ libmingwex_a_SOURCES := \
libmingwex_a_OBJECTS := $(libmingwex_a_SOURCES:.c=.o)
libmingwex_a_OBJECTS := $(libmingwex_a_OBJECTS:.S=.o)
+SRCDIR := src/libcrt/math
+libmingwex_a_OBJECTS := $(libmingwex_a_OBJECTS) $(SRCDIR)/asinhl.o
+libmingwex_a_OBJECTS := $(libmingwex_a_OBJECTS) $(SRCDIR)/asinhf.o
+
SRCDIR := misc/src/libdinput
libdinput_a_SOURCES := \
$(SRCDIR)/dinput_joy.c \
@@ -745,6 +747,15 @@ lib%.a: src/lib%/%.o
$(MKDIR_P) $(@D)
$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) -o $@ $<
+SRCDIR := src/libcrt/math
+$(SRCDIR)/%f.o: $(SRCDIR)/%.c
+ $(MKDIR_P) $(@D)
+ $(CC) -c -D FUNCTION=$(@F:.o=) $(CPPFLAGS) $(ALL_CFLAGS) -o $@ $<
+
+$(SRCDIR)/%l.o: $(SRCDIR)/%.c
+ $(MKDIR_P) $(@D)
+ $(CC) -c -D FUNCTION=$(@F:.o=) $(CPPFLAGS) $(ALL_CFLAGS) -o $@ $<
+
SRCDIR := src/libcrt/crt
$(SRCDIR)/crt2.o $(SRCDIR)/dllcrt2.o:
$(MKDIR_P) $(@D)
@@ -1422,4 +1433,4 @@ clean-dist-w32api:
rm -rf dist/w32api/
clean-dist-wsl:
- rm -rf dist/wsl/
\ No newline at end of file
+ rm -rf dist/wsl/
diff --git a/src/libcrt/math/asinh.c b/src/libcrt/math/asinh.c
index d823a6a..cffc318 100644
--- a/src/libcrt/math/asinh.c
+++ b/src/libcrt/math/asinh.c
@@ -20,32 +20,127 @@
* 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.
+ *
+ *
+ * Implemented 2013 by Keith Marshall <kei...@us...>
+ * Copyright assigned by the author to the MinGW.org project.
+ *
+ * This is a generic implementation for all of the asinh(), asinhl(),
+ * and asinhf() functions; each is to be compiled separately, i.e.
+ *
+ * gcc -D FUNCTION=asinh -o asinh.o asinh.c
+ * gcc -D FUNCTION=asinhl -o asinhl.o asinh.c
+ * gcc -D FUNCTION=asinhf -o asinhf.o asinh.c
+ *
*/
#include <math.h>
-#include <errno.h>
-#include "fastmath.h"
- /* asinh(x) = copysign(log(fabs(x) + sqrt(x * x + 1.0)), x) */
-double asinh(double x)
-{
- double z;
- if (!isfinite (x))
- return x;
- z = fabs (x);
-
- /* Avoid setting FPU underflow exception flag in x * x. */
-#if 0
- if ( z < 0x1p-32)
- return x;
+#ifndef FUNCTION
+/* If user neglected to specify it, the default compilation is for
+ * the asinh() function.
+ */
+# define FUNCTION asinh
#endif
- /* Use log1p to avoid cancellation with small x. Put
- x * x in denom, so overflow is harmless.
- asinh(x) = log1p (x + sqrt (x * x + 1.0) - 1.0)
- = log1p (x + x * x / (sqrt (x * x + 1.0) + 1.0)) */
+#define argtype_asinh double
+#define argtype_asinhl long double
+#define argtype_asinhf float
- z = __fast_log1p (z + z * z / (__fast_sqrt (z * z + 1.0) + 1.0));
+#define PASTE(PREFIX,SUFFIX) PREFIX##SUFFIX
+#define mapname(PREFIX,SUFFIX) PASTE(PREFIX,SUFFIX)
- return ( x > 0.0 ? z : -z);
-}
+#define ARGTYPE(FUNCTION) PASTE(argtype_,FUNCTION)
+#define ARGCAST(VALUE) mapname(argcast_,FUNCTION)(VALUE)
+
+#define argcast_asinh(VALUE) VALUE
+#define argcast_asinhl(VALUE) PASTE(VALUE,L)
+#define argcast_asinhf(VALUE) PASTE(VALUE,F)
+#define mapfunc(NAME) mapname(mapfunc_,FUNCTION)(NAME)
+
+#define mapfunc_asinh(NAME) NAME
+#define mapfunc_asinhl(NAME) PASTE(NAME,l)
+#define mapfunc_asinhf(NAME) PASTE(NAME,f)
+
+/* Prefer fast versions of mathematical functions.
+ */
+#include "fastmath.h"
+
+#define log __fast_log
+#define log1p __fast_log1p
+#define sqrt __fast_sqrt
+
+/* Define the generic function implementation.
+ */
+ARGTYPE(FUNCTION) FUNCTION( ARGTYPE(FUNCTION) x )
+{
+ if( isfinite(x) )
+ {
+ /* For all finite values of x, we may compute asinh(x) in terms of
+ * the magnitude of x...
+ */
+ ARGTYPE(FUNCTION) h, z;
+ if( (z = mapfunc(fabs)( x )) > ARGCAST(1.0) )
+ {
+ /* When z is greater than 1.0, there is a possibility of overflow
+ * in the computation of z * z; this would propagate to the result
+ * of computing sqrt( 1.0 + z * z ), even when the ultimate result
+ * should be representable. Thus, we adopt a transformation based
+ * on hypot(), which cannot overflow, viz.:
+ *
+ * sqrt( 1.0 + z * z )
+ *
+ * is equivalent to
+ *
+ * z * sqrt( 1.0 + (1.0 / z) * (1.0 / z) )
+ */
+ h = ARGCAST(1.0) / z;
+ h = z * mapfunc(sqrt)( ARGCAST(1.0) + h * h );
+ }
+ else
+ { /* z is less that 1.0: we may safely compute z * z without fear of
+ * overflow; it may underflow to zero, in which case we may simply
+ * ignore the effect, as it is insignificant.
+ */
+ h = mapfunc(sqrt)( ARGCAST(1.0) + z * z );
+ }
+
+ /* Now, we may compute the absolute value of the inverse hyperbolic
+ * sine function, according to its analytical definition:
+ *
+ * arsinh( z ) = log( z + sqrt( 1.0 + z * z ) )
+ *
+ * or, since we've already computed h = sqrt( 1.0 + z * z ):
+ *
+ * arsinh( z ) = log( z + h )
+ *
+ * We may note that, in spite of our efforts to avoid overflow in the
+ * computation of h, this expression for arsinh(z) remains vulnerable to
+ * overflow as z approaches the representable limit of finite floating
+ * point values, even when the ultimate result is both representable and
+ * computable. We may further note that h >= z is always true, with h
+ * approaching an asymptotic minimum of 1.0, as z becomes vanishingly
+ * small, while h becomes approximately equal to z as z becomes very
+ * large; thus we may transform the expression to:
+ *
+ * arsinh( z ) = log( z / h + 1.0 ) + log( h )
+ *
+ * or its equivalent representation:
+ *
+ * arsinh( z ) = log1p( z / h ) + log( h )
+ *
+ * which is computable, without overflow, for all finite values of z
+ * with corresponding finite values of h for which the logarithm is
+ * computable.
+ *
+ * Finally, we note that the ultimate result has the same sign as the
+ * original value of x, with magnitude as computed by the preceding
+ * expression; thus...
+ */
+ return mapfunc(copysign)( mapfunc(log1p)( z / h ) + mapfunc(log)( h ), x );
+ }
+ /* If we get to here, x was infinite; we can do no more than return an
+ * equivalent infinite result.
+ */
+ return x;
+}
diff --git a/src/libcrt/math/asinhf.c b/src/libcrt/math/asinhf.c
deleted file mode 100644
index 5e71069..0000000
--- a/src/libcrt/math/asinhf.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * @file asinhf.c
- * Copyright 2012, 2013 MinGW.org project
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- */
-#include <math.h>
-#include <errno.h>
-#include "fastmath.h"
-
- /* asinh(x) = copysign(log(fabs(x) + sqrt(x * x + 1.0)), x) */
-float asinhf(float x)
-{
- float z;
- if (!isfinite (x))
- return x;
- z = fabsf (x);
-
- /* Avoid setting FPU underflow exception flag in x * x. */
-#if 0
- if ( z < 0x1p-32)
- return x;
-#endif
-
-
- /* Use log1p to avoid cancellation with small x. Put
- x * x in denom, so overflow is harmless.
- asinh(x) = log1p (x + sqrt (x * x + 1.0) - 1.0)
- = log1p (x + x * x / (sqrt (x * x + 1.0) + 1.0)) */
-
- z = __fast_log1p (z + z * z / (__fast_sqrt (z * z + 1.0) + 1.0));
-
- return ( x > 0.0 ? z : -z);
-}
diff --git a/src/libcrt/math/asinhl.c b/src/libcrt/math/asinhl.c
deleted file mode 100644
index b3f5063..0000000
--- a/src/libcrt/math/asinhl.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * @file asinhl.c
- * Copyright 2012, 2013 MinGW.org project
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- */
-#include <math.h>
-#include <errno.h>
-#include "fastmath.h"
-
- /* asinh(x) = copysign(log(fabs(x) + sqrt(x * x + 1.0)), x) */
-long double asinhl(long double x)
-{
- long double z;
- if (!isfinite (x))
- return x;
-
- z = fabsl (x);
-
- /* Avoid setting FPU underflow exception flag in x * x. */
-#if 0
- if ( z < 0x1p-32)
- return x;
-#endif
-
- /* Use log1p to avoid cancellation with small x. Put
- x * x in denom, so overflow is harmless.
- asinh(x) = log1p (x + sqrt (x * x + 1.0) - 1.0)
- = log1p (x + x * x / (sqrt (x * x + 1.0) + 1.0)) */
-
- z = __fast_log1pl (z + z * z / (__fast_sqrtl (z * z + 1.0L) + 1.0L));
-
- return ( x > 0.0 ? z : -z);
-}
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 16 +++++-
Makefile.in | 17 +++++-
src/libcrt/math/asinh.c | 137 +++++++++++++++++++++++++++++++++++++++-------
src/libcrt/math/asinhf.c | 51 -----------------
src/libcrt/math/asinhl.c | 51 -----------------
5 files changed, 145 insertions(+), 127 deletions(-)
delete mode 100644 src/libcrt/math/asinhf.c
delete mode 100644 src/libcrt/math/asinhl.c
hooks/post-receive
--
Repository: mingw-org-wsl
|
|
From: Earnie B. <no...@so...> - 2013-06-05 18:13: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, 4.0-dev has been updated
via a6f8202737338809c241e13f8c674d4661c251a4 (commit)
via 400ab10708b0c4c39cc0930369f406b14d5f7441 (commit)
from da60fde74476b9b27760f4b62898334cb54a92a1 (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/a6f8202737338809c241e13f8c674d4661c251a4/
commit a6f8202737338809c241e13f8c674d4661c251a4
Author: Earnie Boyd <ea...@us...>
Date: Wed Jun 5 13:55:49 2013 -0400
Correct typo for UNICODE define of SHGetFolderPath.
diff --git a/ChangeLog b/ChangeLog
index e550c27..99b72f0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,8 @@
-2013-06-07 Earnie Boyd <ea...@us...>
+2013-06-05 Mark <ma...@us...>
+
+ * include/shlobj.h (SHGetFolderPath): Correct typo for UNICODE define.
+
+2013-06-05 Earnie Boyd <ea...@us...>
* Makefile.in (libshell32.a): We needed to add src/libshell32/shell32.o
object to the library.
diff --git a/include/shlobj.h b/include/shlobj.h
index 0f3e12b..d3cb63d 100644
--- a/include/shlobj.h
+++ b/include/shlobj.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
@@ -1141,7 +1141,7 @@ typedef __AW(BROWSEINFO) BROWSEINFO,*PBROWSEINFO,*LPBROWSEINFO;
#define SHBrowseForFolder __AW(SHBrowseForFolder)
#define SHGetDataFromIDList __AW(SHGetDataFromIDList)
#define SHGetPathFromIDList __AW(SHGetPathFromIDList)
-#define SHGetFolderPath __AW(SHGetFolderPathW)
+#define SHGetFolderPath __AW(SHGetFolderPath)
#define FILEDESCRIPTOR __AW(FILEDESCRIPTOR)
#define LPFILEDESCRIPTOR __AW(LPFILEDESCRIPTOR)
#define FILEGROUPDESCRIPTOR __AW(FILEGROUPDESCRIPTOR)
@@ -1204,7 +1204,7 @@ typedef struct
typedef const SHCOLUMNID *LPCSHCOLUMNID;
typedef struct _SHELLDETAILS
{
- int fmt;
+ int fmt;
int cxChar;
STRRET str;
} SHELLDETAILS, *LPSHELLDETAILS;
https://sf.net/p/mingw/mingw-org-wsl/ci/400ab10708b0c4c39cc0930369f406b14d5f7441/
commit 400ab10708b0c4c39cc0930369f406b14d5f7441
Author: Earnie Boyd <ea...@us...>
Date: Wed Jun 5 13:46:50 2013 -0400
Add lib/libshell32/shell32.o to the libshell32.a library.
diff --git a/ChangeLog b/ChangeLog
index 7ad82cf..e550c27 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2013-06-07 Earnie Boyd <ea...@us...>
+
+ * Makefile.in (libshell32.a): We needed to add src/libshell32/shell32.o
+ object to the library.
+ (lib/libshell32/shell32.o): Added a target to create this file.
+
2013-06-04 Earnie Boyd <ea...@us...>
* include/_mingw.h (MSVCRT_VERSION): Determine a value based on the
diff --git a/Makefile.in b/Makefile.in
index 9d4e4e5..4e012d4 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -185,6 +185,10 @@ libscrnsavw_a_SOURCES := src/libscrnsave/scrnsave.c
libscrnsavw_a_OBJECTS := src/libscrnsave/scrnsavw.o
scrnsavw_o_CFLAGS := -DUNICODE
+libshell32_a_SOURCES := src/libshell32/shell32.c
+libshell32_a_OBJECTS := src/libshell32/shell32.o
+shell32_o_CFLAGS := -DUNICODE
+
liblargeint_a_SOURCES := src/liblargeint/largeint.c
liblargeint_a_OBJECTS := $(liblargeint_a_SOURCES:.c=.o)
@@ -758,6 +762,11 @@ $(libscrnsavw_a_OBJECTS): $(libscrnsavw_a_SOURCES)
$(MKDIR_P) $(@D)
$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $(scrnsavw_o_CFLAGS) -o $@ $<
+SRCDIR := src/libshell32
+$(libshell32_a_OBJECTS): $(libshell32_a_SOURCES)
+ $(MKDIR_P) $(@D)
+ $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $(shell32_o_CFLAGS) -o $@ $<
+
SRCDIR := misc/gpl/profile
$(SRCDIR)/gcrt2.o:
mkdir -p $(@D)
@@ -844,6 +853,14 @@ libws2_32.a: lib/lib32/ws2_32.def $(libws2_32_a_OBJECTS)
$(AR) rc $@ $(libws2_32_a_OBJECTS)
$(RANLIB) $@
+# Note this target will override the previous global rules and give a warning
+# from the make process. It is needed due to the extra shell32.o object file.
+libshell32.a: lib/lib32/shell32.def $(libshell32_a_OBJECTS)
+ @echo Making library $@ from $(subst lib,,$(@:.a=.def)).
+ $(DLLTOOL) $(DLLTOOL_FLAGS) $(subst lib,,$(@:.a=.dll)) --def $(addprefix $(top_srcdir)/lib/lib32/,$(subst lib,,$(@:.a=.def))) --output-lib $@
+ $(AR) rc $@ $(libshell32_a_OBJECTS)
+ $(RANLIB) $@
+
_libm_dummy.c:
@echo "static int __mingw_libm_dummy;" > _libm_dummy.c
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 10 ++++++++++
Makefile.in | 17 +++++++++++++++++
include/shlobj.h | 8 ++++----
3 files changed, 31 insertions(+), 4 deletions(-)
hooks/post-receive
--
Repository: mingw-org-wsl
|
|
From: Earnie B. <no...@so...> - 2013-06-04 21:21:51
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Repository: mingw-org-wsl".
The branch, 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 <ea...@us...>
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 <ea...@us...>
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 <ea...@us...>
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 <ea...@us...>
+
+ * 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 <ea...@us...>
* 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
|