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
|
5
|
6
|
7
|
|
8
|
9
|
10
|
11
|
12
|
13
|
14
|
|
15
|
16
|
17
|
18
|
19
|
20
|
21
|
|
22
|
23
|
24
(1) |
25
(2) |
26
(1) |
27
|
28
(1) |
|
29
(1) |
30
(1) |
31
|
|
|
|
|
|
From: Keith M. <no...@so...> - 2017-01-30 15:15:47
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Repository: mingw-org-wsl".
The branch, 5.0-active has been updated
via e52d64b7f86888d5f318fae98fec0536653093d3 (commit)
via c0372a60e6918ffd944670ba8502a0d99fa69044 (commit)
via 7428c55ab13b7f25c68e0248269bbca64f2906b2 (commit)
from 58fece31502adede9300337c67d4f4e0f04ba01c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://sf.net/p/mingw/mingw-org-wsl/ci/e52d64b7f86888d5f318fae98fec0536653093d3/
commit e52d64b7f86888d5f318fae98fec0536653093d3
Author: Keith Marshall <kei...@us...>
Date: Mon Jan 30 15:12:46 2017 +0000
Implement strerror_r()/strerror_s() API.
diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog
index 8064858..1862aa4 100644
--- a/mingwrt/ChangeLog
+++ b/mingwrt/ChangeLog
@@ -1,5 +1,19 @@
2017-01-30 Keith Marshall <kei...@us...>
+ Implement strerror_r()/strerror_s() API.
+
+ * mingwex/strerror_r.c: New file; it implements...
+ (strerror_r): ...this new POSIX.1-2001 conforming function.
+
+ * include/string.h (strerror_s): Add function prototype, subject to...
+ [_MSVCR80_DLL || _WIN32_WINNT_VISTA]: ...this DLL version dependency;
+ otherwise implement an inline wrapper function to emulate it, using...
+ [_POSIX_C_SOURCE > 200112L] (strerror_r): ...this; add prototype.
+
+ * Makefile.in (libmingwex.a): Add strerror_r.$OBJEXT
+
+2017-01-30 Keith Marshall <kei...@us...>
+
Avoid -Wformat noise from snprintf() and vsnprintf()
* include/stdio.h (snprintf, vsnprintf): Add inline implementations;
diff --git a/mingwrt/Makefile.in b/mingwrt/Makefile.in
index 20fd2c5..7593cca 100644
--- a/mingwrt/Makefile.in
+++ b/mingwrt/Makefile.in
@@ -494,9 +494,8 @@ libmingwex.a: $(addsuffix .$(OBJEXT), glob getopt basename dirname nsleep)
libmingwex.a: $(addsuffix .$(OBJEXT), mkstemp mkdtemp cryptnam setenv)
libmingwex.a: $(addsuffix .$(OBJEXT), tdelete tfind tsearch twalk)
-
+libmingwex.a: $(addsuffix .$(OBJEXT), dirent wdirent dlfcn strerror_r)
libmingwex.a: $(addsuffix .$(OBJEXT), getdelim gettimeofday)
-libmingwex.a: $(addsuffix .$(OBJEXT), dirent wdirent dlfcn)
vpath %.s ${mingwrt_srcdir}/mingwex
vpath %.sx ${mingwrt_srcdir}/mingwex
diff --git a/mingwrt/include/string.h b/mingwrt/include/string.h
index a53a71a..ef80f37 100644
--- a/mingwrt/include/string.h
+++ b/mingwrt/include/string.h
@@ -198,6 +198,35 @@ __CRT_ALIAS size_t strnlen (const char *__text, size_t __maxlen)
#endif /* MSVCRT.DLL || pre-MSVCR80.DLL */
#endif /* _POSIX_C_SOURCE >= 200809L */
+#if _POSIX_C_SOURCE >= 200112L
+/* POSIX.1-2001 added a re-entrant variant of strerror(), which stores
+ * the message text in a user supplied buffer, rather than in (possibly
+ * volatile) system supplied storage. Although inherently thread-safe,
+ * Microsoft's strerror() also uses a potentially volatile buffer, (in
+ * the sense that it is overwritten by successive calls within a single
+ * thread); thus, we provide our own implementation of POSIX.1-2001's
+ * strerror_r() function, to facilitate the return of non-volatile
+ * copies of strerror()'s message text.
+ */
+extern int strerror_r (int, char *, size_t);
+#endif
+
+#if __MSVCRT_VERSION__>=__MSVCR80_DLL || _WIN32_WINNT >= _WIN32_WINNT_VISTA
+/* MSVCR80.DLL introduced a safer, (erroneously so called "more secure"),
+ * alternative to strerror(), named strerror_s(); it was later retrofitted
+ * to MSVCRT.DLL, from the release of Windows-Vista onwards.
+ */
+_CRTIMP __cdecl __MINGW_NOTHROW int strerror_s (char *, size_t, int);
+
+#elif _POSIX_C_SOURCE >= 200112L
+/* For the benefit of pre-Vista MSVCRT.DLL users, we provide an approximate
+ * emulation of strerror_s(), in terms of inline referral to POSIX.1-2001's
+ * strerror_r() function.
+ */
+__CRT_ALIAS int strerror_s (char *__buf, size_t __len, int __err)
+{ return strerror_r (__err, __buf, __len); }
+#endif
+
#undef __STRING_H_SOURCED__
_END_C_DECLS
diff --git a/mingwrt/mingwex/strerror_r.c b/mingwrt/mingwex/strerror_r.c
new file mode 100644
index 0000000..4194357
--- /dev/null
+++ b/mingwrt/mingwex/strerror_r.c
@@ -0,0 +1,89 @@
+/*
+ * strerror_r.c
+ *
+ * Implementation of POSIX standard IEEE 1003.1-2001 strerror_r() function.
+ *
+ * $Id$
+ *
+ * Written by Keith Marshall <kei...@us...>
+ * Copyright (C) 2016, 2017, MinGW.org Project
+ *
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ */
+#define _POSIX_C_SOURCE 200112L
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+
+int strerror_r( int errnum, char *buf, size_t len )
+{
+ /* Copy the error message, as retrieved by strerror(), to the user
+ * supplied buffer, so protecting it from subsequent overwrite by a
+ * future call to strerror(); returns zero on success, otherwise sets
+ * errno to, and returns, EINVAL if the user specified errnum doesn't
+ * refer to a valid message, or ERANGE if the associated message, and
+ * its terminating NUL, will not fit within the specified buffer.
+ *
+ * Note that Microsoft's strerror() DOES appear to be thread-safe,
+ * but it uses a single static buffer per thread; thus, within any
+ * one thread, successive calls will overwrite the previous contents
+ * of this buffer; use of strerror_r() allows the user to save a copy
+ * of strerror()'s buffer contents, following each call, where they
+ * are not subject to overwriting by a subsequent strerror() call.
+ */
+ if( buf == NULL )
+ /* POSIX does not recommend any handling for the case of a NULL
+ * return buffer argument; rather than segfault, we will treat it
+ * as a zero-length buffer, into which we can fit no message text
+ * at all, and so we simply return, setting errno to ERANGE.
+ */
+ return errno = ERANGE;
+
+ /* The buffer pointer isn't NULL; assume it is valid, (we will fail
+ * on segfault if it isn't), and proceed to validate errnum.
+ */
+ if( ((unsigned)(errnum)) >= sys_nerr )
+ { /* Note that we check errnum as unsigned; this will also catch a
+ * negative value, since it will appear to be within the positive
+ * range INT_MAX < errnum <= UINT_MAX, while sys_nerr is expected
+ * to be less than INT_MAX.
+ */
+ snprintf( buf, len, "Unknown error: %d", errnum );
+ return errno = EINVAL;
+ }
+ /* errnum appears to be valid; copy the associated message, while
+ * checking that its entire text is copied...
+ */
+ if( snprintf( buf, len, "%s", strerror( errnum )) >= len )
+ /*
+ * ...otherwise, set errno on truncation.
+ */
+ return errno = ERANGE;
+
+ /* If we get to here, return zero, indicating success; (DO NOT
+ * modify errno, in this case).
+ */
+ return 0;
+}
+
+/* $RCSfile$: end of file */
https://sf.net/p/mingw/mingw-org-wsl/ci/c0372a60e6918ffd944670ba8502a0d99fa69044/
commit c0372a60e6918ffd944670ba8502a0d99fa69044
Author: Keith Marshall <kei...@us...>
Date: Mon Jan 30 13:33:51 2017 +0000
Avoid -Wformat noise from snprintf() and vsnprintf()
diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog
index a1ffb6e..8064858 100644
--- a/mingwrt/ChangeLog
+++ b/mingwrt/ChangeLog
@@ -1,5 +1,13 @@
2017-01-30 Keith Marshall <kei...@us...>
+ Avoid -Wformat noise from snprintf() and vsnprintf()
+
+ * include/stdio.h (snprintf, vsnprintf): Add inline implementations;
+ they redirect to "__mingw_" prefixed alternatives, so suppressing the
+ effect of automatic format attribute recognition.
+
+2017-01-30 Keith Marshall <kei...@us...>
+
Remove duplicate libmingwex.a entries.
* mingwex/jmpstub.sx (DLLENTRY): Interpret it.
diff --git a/mingwrt/include/stdio.h b/mingwrt/include/stdio.h
index 9e2ccab..e17afa0 100644
--- a/mingwrt/include/stdio.h
+++ b/mingwrt/include/stdio.h
@@ -394,6 +394,16 @@ int sprintf (char *__stream, const char *__format, ...)
}
__mingw_stdio_redirect__
+int snprintf (char *__stream, size_t __len, const char *__format, ...)
+{
+ register int __retval;
+ __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format );
+ __retval = __mingw_vsnprintf( __stream, __len, __format, __local_argv );
+ __builtin_va_end( __local_argv );
+ return __retval;
+}
+
+__mingw_stdio_redirect__
int vfprintf (FILE *__stream, const char *__format, __VALIST __local_argv)
{
return __mingw_vfprintf( __stream, __format, __local_argv );
@@ -411,6 +421,12 @@ int vsprintf (char *__stream, const char *__format, __VALIST __local_argv)
return __mingw_vsprintf( __stream, __format, __local_argv );
}
+__mingw_stdio_redirect__
+int vsnprintf (char *__stream, size_t __len, const char *__format, __VALIST __local_argv)
+{
+ return __mingw_vsnprintf( __stream, __len, __format, __local_argv );
+}
+
#else
/* Default configuration: simply direct all calls to MSVCRT...
*/
https://sf.net/p/mingw/mingw-org-wsl/ci/7428c55ab13b7f25c68e0248269bbca64f2906b2/
commit 7428c55ab13b7f25c68e0248269bbca64f2906b2
Author: Keith Marshall <kei...@us...>
Date: Mon Jan 30 10:53:24 2017 +0000
Remove duplicate libmingwex.a entries.
diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog
index 19d884c..a1ffb6e 100644
--- a/mingwrt/ChangeLog
+++ b/mingwrt/ChangeLog
@@ -1,3 +1,20 @@
+2017-01-30 Keith Marshall <kei...@us...>
+
+ Remove duplicate libmingwex.a entries.
+
+ * mingwex/jmpstub.sx (DLLENTRY): Interpret it.
+
+ * Makefile.in (jmpstub_awk_script): Handle DLLENTRY.
+ (libmingwex.a): Remove explicit object file references to...
+ (snwprintf, vsnwprintf): ...these.
+
+ * include/stdio.h (snwprintf, vsnwprintf): Map them as __JMPSTUB__
+ references to MSVCRT.DLL entry points, via DLLENTRY references to...
+ (_snwprintf, _vsnwprintf): ...these, respectively.
+
+ * mingwex/snwprintf.c: Redundant file; delete it.
+ * mingwex/vsnwprintf.c: Likewise.
+
2017-01-29 Keith Marshall <kei...@us...>
Clean up <limits.h> header file.
diff --git a/mingwrt/Makefile.in b/mingwrt/Makefile.in
index 6b7afca..20fd2c5 100644
--- a/mingwrt/Makefile.in
+++ b/mingwrt/Makefile.in
@@ -469,8 +469,8 @@ libmingwex.a: $(addsuffix .$(OBJEXT), cosf cosl acosf acosl sinf sinl asinf \
#
vpath %.c ${mingwrt_srcdir}/mingwex/stdio
libmingwex.a: $(addsuffix .$(OBJEXT), btowc fprintf fseeko64 ofmtctl pformat \
- printf snprintf snwprintf sprintf vfprintf vfscanf vfwscanf vprintf vscanf \
- vsnprintf vsnwprintf vsprintf vsscanf vswscanf vwscanf)
+ printf snprintf sprintf vfprintf vfscanf vfwscanf vprintf vscanf vsnprintf \
+ vsprintf vsscanf vswscanf vwscanf)
# pformat.$(OBJEXT) needs an explicit build rule, since we need to
# specify an additional header file path.
@@ -583,7 +583,9 @@ jmpstub_awk_script = test -z "$1" || awk '\
LIB = match( $$0, ".*[ ,(:]LIB *= *"symbol, altlib ) ? altlib[1] : "mingwex"; \
OBJNAME = gensub( "_*(.*)_*", "\\1", 1, FUNCTION )".jmpstub.$$(OBJEXT)"; \
OBJNAME_CFLAGS = "-D FUNCTION="FUNCTION; \
- if( match( $$0, ".*[ ,(:]REMAPPED *= *"symbol, alias ) ) \
+ if( match( $$0, ".*[ ,(:]DLLENTRY *= *"symbol, alias ) ) \
+ OBJNAME_CFLAGS = OBJNAME_CFLAGS" -D DLLENTRY="alias[1]; \
+ else if( match( $$0, ".*[ ,(:]REMAPPED *= *"symbol, alias ) ) \
OBJNAME_CFLAGS = OBJNAME_CFLAGS" -D REMAPPED="alias[1]; \
printf fmt, LIB, OBJNAME, OBJNAME, OBJNAME_CFLAGS; \
} \
diff --git a/mingwrt/include/stdio.h b/mingwrt/include/stdio.h
index 252c210..9e2ccab 100644
--- a/mingwrt/include/stdio.h
+++ b/mingwrt/include/stdio.h
@@ -7,7 +7,7 @@
* $Id$
*
* Written by Colin Peters <co...@bi...>
- * Copyright (C) 1997-2005, 2007-2010, 2014-2016, MinGW.org Project.
+ * Copyright (C) 1997-2005, 2007-2010, 2014-2017, MinGW.org Project.
*
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -950,12 +950,13 @@ _CRTIMP __cdecl __MINGW_NOTHROW FILE * _wpopen (const wchar_t *, const wchar
#endif /* __MSVCRT__ */
#ifdef _ISOC99_SOURCE
+__JMPSTUB__(( FUNCTION = snwprintf, DLLENTRY = _snwprintf ))
__cdecl __MINGW_NOTHROW int snwprintf (wchar_t *, size_t, const wchar_t *, ...);
__cdecl __MINGW_NOTHROW int vsnwprintf (wchar_t *, size_t, const wchar_t *, __VALIST);
#ifndef __NO_INLINE__
__CRT_INLINE __cdecl __MINGW_NOTHROW
-__JMPSTUB__(( FUNCTION = vsnwprintf, REMAPPED = _vsnwprintf ))
+__JMPSTUB__(( FUNCTION = vsnwprintf, DLLENTRY = _vsnwprintf ))
int vsnwprintf (wchar_t *__s, size_t __n, const wchar_t *__fmt, __VALIST __arg)
{ return _vsnwprintf ( __s, __n, __fmt, __arg); }
#endif
diff --git a/mingwrt/mingwex/jmpstub.sx b/mingwrt/mingwex/jmpstub.sx
index aa57975..200a120 100644
--- a/mingwrt/mingwex/jmpstub.sx
+++ b/mingwrt/mingwex/jmpstub.sx
@@ -7,7 +7,7 @@
* $Id$
*
* Written by Keith Marshall <kei...@us...>
- * Copyright (C) 2013, 2014, MinGW.org Project
+ * Copyright (C) 2013, 2014, 2017, MinGW.org Project
*
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -46,20 +46,48 @@
* an additional "-D REMAPPED=entryname" option, resulting in redirection
* of "funcname()" calls to the "entryname()" function entry point.
*
+ * Alternatively, calls to "funcname()" may be redirected to a DLL entry point,
+ * via its importable name within the DLL's export table, by specification of
+ * the "-D DLLENTRY=entryname" option, instead of "-D REMAPPED=entryname".
+ *
*/
#define __entry__(__suffix__) __label__(_,__suffix__)
#define __label__(__prefix__,__suffix__) __prefix__##__suffix__
-#ifndef REMAPPED
-# define __mingw__(__suffix__) __label__(__mingw_,__suffix__)
-# define REMAPPED __mingw__(FUNCTION)
+#if defined LLENTRY && ! defined DLLENTRY
+/* This is a convenience for users; it allows specification of a DLLENTRY
+ * option as simply "-DLLENTRY=entryname", as an alternative to specifying
+ * it fully, as "-D DLLENTRY=entryname".
+ */
+#define DLLENTRY LLENTRY
#endif
.text
+#ifdef DLLENTRY
+ /* This represents the case of redirection to a function implementation
+ * residing within a DLL...
+ */
+# define __dllentry__(__suffix__) __label__(__imp__,__suffix__)
+# define __redirect__ *__dllentry__(DLLENTRY)
+
+#else
+ /* ...whereas this redirection to an alternative static library function,
+ * or to a DLL implementation accessed via an import library trampoline.
+ */
+# ifndef REMAPPED
+ /* No explicit entry point redirection specified; use the default entry
+ * point name, within the "__mingw_" pseudo-namespace.
+ */
+# define __mingw__(__suffix__) __label__(__mingw_,__suffix__)
+# define REMAPPED __mingw__(FUNCTION)
+# endif
+# define __redirect__ __entry__(REMAPPED)
+.def __entry__(REMAPPED); .scl 2; .type 32; .endef
+#endif
+
.global __entry__(FUNCTION)
.def __entry__(FUNCTION); .scl 2; .type 32; .endef
-.def __entry__(REMAPPED); .scl 2; .type 32; .endef
-__entry__(FUNCTION): jmp __entry__(REMAPPED)
+__entry__(FUNCTION): jmp __redirect__
/* $RCSfile$: end of file */
diff --git a/mingwrt/mingwex/stdio/snwprintf.c b/mingwrt/mingwex/stdio/snwprintf.c
deleted file mode 100644
index d69892e..0000000
--- a/mingwrt/mingwex/stdio/snwprintf.c
+++ /dev/null
@@ -1,13 +0,0 @@
-#include <stdarg.h>
-#include <wchar.h>
-
-int snwprintf(wchar_t* buffer, size_t n, const wchar_t* format, ...)
-{
- int retval;
- va_list argptr;
-
- va_start( argptr, format );
- retval = _vsnwprintf( buffer, n, format, argptr );
- va_end( argptr );
- return retval;
-}
diff --git a/mingwrt/mingwex/stdio/vsnwprintf.c b/mingwrt/mingwex/stdio/vsnwprintf.c
deleted file mode 100644
index 1b59a07..0000000
--- a/mingwrt/mingwex/stdio/vsnwprintf.c
+++ /dev/null
@@ -1,5 +0,0 @@
-#include <stdarg.h>
-#include <wchar.h>
-
-int vsnwprintf(wchar_t *buffer, size_t n, const wchar_t * format, va_list argptr)
- { return _vsnwprintf( buffer, n, format, argptr );}
-----------------------------------------------------------------------
Summary of changes:
mingwrt/ChangeLog | 39 ++++++++++++++++
mingwrt/Makefile.in | 11 ++--
mingwrt/include/stdio.h | 21 ++++++++-
mingwrt/include/string.h | 29 ++++++++++++
mingwrt/mingwex/jmpstub.sx | 40 ++++++++++++++--
mingwrt/mingwex/stdio/snwprintf.c | 13 -----
mingwrt/mingwex/stdio/vsnwprintf.c | 5 --
mingwrt/mingwex/strerror_r.c | 89 ++++++++++++++++++++++++++++++++++++
8 files changed, 216 insertions(+), 31 deletions(-)
delete mode 100644 mingwrt/mingwex/stdio/snwprintf.c
delete mode 100644 mingwrt/mingwex/stdio/vsnwprintf.c
create mode 100644 mingwrt/mingwex/strerror_r.c
hooks/post-receive
--
Repository: mingw-org-wsl
|
|
From: Keith M. <no...@so...> - 2017-01-29 14:25:13
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Repository: mingw-org-wsl".
The branch, 5.0-active has been updated
via 58fece31502adede9300337c67d4f4e0f04ba01c (commit)
via f186d677f9cb6eb23ecaaaf60e35a69a42c6a82e (commit)
from d7c921ed3389436e65fc83c91b873a764c94ac51 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://sf.net/p/mingw/mingw-org-wsl/ci/58fece31502adede9300337c67d4f4e0f04ba01c/
commit 58fece31502adede9300337c67d4f4e0f04ba01c
Author: Keith Marshall <kei...@us...>
Date: Sun Jan 29 14:24:00 2017 +0000
Clean up <limits.h> header file.
diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog
index ebc7c4c..19d884c 100644
--- a/mingwrt/ChangeLog
+++ b/mingwrt/ChangeLog
@@ -1,5 +1,16 @@
2017-01-29 Keith Marshall <kei...@us...>
+ Clean up <limits.h> header file.
+
+ * include/limits.h: Tidy layout; assert copyright.
+ (#pragma GCC system_header): Declare it as being such.
+ (_LIMITS_H_): Rename this multiple inclusion guard macro...
+ (_LIMITS_H): ...to adopt this preferred form.
+ [__STDC_VERSION__ >= 199901L]: Infer it...
+ [_ISOC99_SOURCE]: ...from this.
+
+2017-01-29 Keith Marshall <kei...@us...>
+
Expose C99 features required by C++11; fix issue [#2335]
* include/_mingw.h.in (_ISOC99_SOURCE): Ensure it is defined for...
diff --git a/mingwrt/include/limits.h b/mingwrt/include/limits.h
index c67118c..49f7698 100644
--- a/mingwrt/include/limits.h
+++ b/mingwrt/include/limits.h
@@ -1,42 +1,60 @@
/*
* limits.h
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is a part of the mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within the package.
*
- * Functions for manipulating paths and directories (included from io.h)
- * plus functions for setting the current drive.
+ * Manifest constants defining the sizes of integral types.
*
- * Defines constants for the sizes of integral types.
+ * $Id$
*
- * NOTE: GCC should supply a version of this header and it should be safe to
- * use that version instead of this one (maybe safer).
+ * Written by Colin Peters <co...@bi...>
+ * Copyright (C) 1997, 1999-2001, 2004, 2005, 2010, 2012, 2017,
+ * MinGW.org Project
+ *
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice, this permission notice, and the following
+ * disclaimer shall be included in all copies or substantial portions of
+ * the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OF OR OTHER
+ * DEALINGS IN THE SOFTWARE.
*
*/
+#ifndef _LIMITS_H
+#pragma GCC system_header
+#define _LIMITS_H
-#ifndef _LIMITS_H_
-#define _LIMITS_H_
-
-/* All the headers include this file. */
+/* All MinGW headers are required to include <_mingw.h>
+ */
#include <_mingw.h>
-/*
- * File system limits
+/* File system limits
+ *
+ * TODO (REVIEW): Are NAME_MAX and OPEN_MAX file system limits, or not?
+ * Are they the same as FILENAME_MAX and FOPEN_MAX from <stdio.h>?
*
- * TODO: NAME_MAX and OPEN_MAX are file system limits or not? Are they the
- * same as FILENAME_MAX and FOPEN_MAX from stdio.h?
- * NOTE: PATH_MAX is the POSIX equivalent for Microsoft's MAX_PATH; the two
- * are semantically identical, with a limit of 259 characters for the
- * path name, plus one for a terminating NUL, for a total of 260.
+ * NOTE: PATH_MAX is the POSIX equivalent for Microsoft's MAX_PATH; the
+ * two are semantically identical, with a limit of 259 characters for the
+ * path name, plus one for a terminating NUL, making a total of 260.
*/
#ifndef __STRICT_ANSI__
# define PATH_MAX 260
#endif
-/*
- * Characteristics of the char data type.
+/* Characteristics of the char data type.
*
- * TODO: Is MB_LEN_MAX correct?
+ * FIXME: Is MB_LEN_MAX correct? Probably yes, for Microsoft MBCS, which
+ * effectively seem to all be DBCS.
*/
#define CHAR_BIT 8
#define MB_LEN_MAX 2
@@ -46,70 +64,69 @@
#define UCHAR_MAX 255
-/* TODO: Is this safe? I think it might just be testing the preprocessor,
- * not the compiler itself... */
-#if ('\x80' < 0)
-#define CHAR_MIN SCHAR_MIN
-#define CHAR_MAX SCHAR_MAX
+#if '\x80' < 0
+/* FIXME: is this safe? I think it might just be testing
+ * the preprocessor, not the compiler itself.
+ */
+# define CHAR_MIN SCHAR_MIN
+# define CHAR_MAX SCHAR_MAX
#else
-#define CHAR_MIN 0
-#define CHAR_MAX UCHAR_MAX
+# define CHAR_MIN 0
+# define CHAR_MAX UCHAR_MAX
#endif
-/*
- * Maximum and minimum values for ints.
+/* Maximum and minimum values for ints.
*/
#define INT_MAX 2147483647
#define INT_MIN (-INT_MAX-1)
-#define UINT_MAX 0xffffffff
+#define UINT_MAX 0xFFFFFFFF
-/*
- * Maximum and minimum values for shorts.
+/* Maximum and minimum values for shorts.
*/
#define SHRT_MAX 32767
#define SHRT_MIN (-SHRT_MAX-1)
-#define USHRT_MAX 0xffff
+#define USHRT_MAX 0xFFFF
-/*
- * Maximum and minimum values for longs and unsigned longs.
- *
- * TODO: This is not correct for Alphas, which have 64 bit longs.
+/* Maximum and minimum values for longs and unsigned longs;
+ * this isn't correct for Alphas, which have 64 bit longs, but
+ * that is probably no longer a concern.
*/
#define LONG_MAX 2147483647L
#define LONG_MIN (-LONG_MAX-1)
-#define ULONG_MAX 0xffffffffUL
+#define ULONG_MAX 0xFFFFFFFFUL
#ifndef __STRICT_ANSI__
-/* POSIX wants this. */
-#define SSIZE_MAX LONG_MAX
+/* POSIX wants this.
+ */
+#define SSIZE_MAX LONG_MAX
#endif
-#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \
- || !defined(__STRICT_ANSI__)
-/* ISO C9x macro names */
-#define LLONG_MAX 9223372036854775807LL
-#define LLONG_MIN (-LLONG_MAX - 1)
-#define ULLONG_MAX (2ULL * LLONG_MAX + 1)
+#if _ISOC99_SOURCE
+/* Implicitly defined in <_mingw.h>, (or explicitly defined by
+ * the user), for C99, C++, or POSIX.1-2001; make these ISO-C99
+ * macro names available.
+ */
+#define LLONG_MAX 9223372036854775807LL
+#define LLONG_MIN (-LLONG_MAX - 1)
+#define ULLONG_MAX (2ULL * LLONG_MAX + 1)
#endif
-/*
- * The GNU C compiler also allows 'long long int'
+#if defined __GNUC__ && ! defined __STRICT_ANSI__
+/* The GNU C compiler also allows 'long long int', but we don't
+ * want that capability polluting the strict ANSI namespace.
*/
-#if !defined(__STRICT_ANSI__) && defined(__GNUC__)
-
#define LONG_LONG_MAX 9223372036854775807LL
#define LONG_LONG_MIN (-LONG_LONG_MAX-1)
#define ULONG_LONG_MAX (2ULL * LONG_LONG_MAX + 1)
-/* MSVC compatibility */
-#define _I64_MIN LONG_LONG_MIN
-#define _I64_MAX LONG_LONG_MAX
-#define _UI64_MAX ULONG_LONG_MAX
-
-#endif /* Not Strict ANSI and GNU C compiler */
-
+/* MSVC compatibility
+ */
+#define _I64_MIN LONG_LONG_MIN
+#define _I64_MAX LONG_LONG_MAX
+#define _UI64_MAX ULONG_LONG_MAX
-#endif /* not _LIMITS_H_ */
+#endif /* __GNUC__ && !__STRICT_ANSI__ */
+#endif /* !_LIMITS_H: $RCSfile$: end of file */
https://sf.net/p/mingw/mingw-org-wsl/ci/f186d677f9cb6eb23ecaaaf60e35a69a42c6a82e/
commit f186d677f9cb6eb23ecaaaf60e35a69a42c6a82e
Author: Keith Marshall <kei...@us...>
Date: Sun Jan 29 10:09:49 2017 +0000
Expose C99 features required by C++11; fix issue [#2335]
diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog
index 59beea4..ebc7c4c 100644
--- a/mingwrt/ChangeLog
+++ b/mingwrt/ChangeLog
@@ -1,3 +1,20 @@
+2017-01-29 Keith Marshall <kei...@us...>
+
+ Expose C99 features required by C++11; fix issue [#2335]
+
+ * include/_mingw.h.in (_ISOC99_SOURCE): Ensure it is defined for...
+ [__cplusplus >= 201103L]: ...this conformance level, in addition to...
+ [__STDC_VERSION__>= 199901L || _POSIX_C_SOURCE >= 200112L]: ...these.
+ [_GLIBCXX_USE_C99]: Force it for -std=c++11, subject to...
+ [__GNUC__ < 6]: ...this.
+
+ * include/ctype.h (isblank): Declare it only if...
+ [_ISOC99_SOURCE]: ...this, thus simplifying declarative condition.
+ * include/wctype.h (iswblank) [_ISOC99_SOURCE]: Likewise.
+ * include/inttypes.h (SCNd8, SCNdLEAST8, SCNdFAST8, SCNi8, SCNiLEAST8)
+ (SCNiFAST8, SCNo8, SCNoLEAST8, SCNoFAST8, SCNx8, SCNxLEAST8, SCNxFAST8)
+ (SCNu8, SCNuLEAST8, SCNuFAST8) [_ISOC99_SOURCE]: Likewise.
+
2017-01-28 Keith Marshall <kei...@us...>
Make strnlen() and wcsnlen() declaratively consistent.
diff --git a/mingwrt/include/_mingw.h.in b/mingwrt/include/_mingw.h.in
index 57fc0cc..fd99590 100644
--- a/mingwrt/include/_mingw.h.in
+++ b/mingwrt/include/_mingw.h.in
@@ -8,7 +8,7 @@
* $Id$
*
* Written by Mumit Khan <kh...@xr...>
- * Copyright (C) 1999, 2001-2011, 2014-2016, MinGW.org Project
+ * Copyright (C) 1999, 2001-2011, 2014-2017, MinGW.org Project
*
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -451,18 +451,62 @@ allow GCC to optimize away some EH unwind code, at least in DW2 case. */
/* libmingwex.a provides free-standing implementations for many of the
* functions which were introduced in C99; MinGW headers do not expose
* prototypes for these, unless this feature test macro is defined, by
- * the user, or implied by other standards...
+ * the user, or implied by other standards. We will use a bit-mapped
+ * representation, comprising the bit-wise sum of:
+ *
+ * 0x08 user declared
+ * 0x04 required by C compiler, supporting ISO-C99
+ * 0x02 required by C++ compiler, supporting ISO-C++11
+ * 0x01 required to support recent POSIX.1 features
+ *
+ * to ensure that we can identify the reason for implicit declaration,
+ * (in the event that we may need to discriminate).
*/
-# if __STDC_VERSION__ >= 199901L || _POSIX_C_SOURCE >= 200112L
-# define _ISOC99_SOURCE 1
+# if __STDC_VERSION__ >= 199901L
+ /* This represents a compiler supporting ISO-C99; enable all potential
+ * use of ISO-C99 features, (to the maximum extent supportable), which
+ * presumably also covers all C++11 and POSIX.1 usage.
+ */
+# define _ISOC99_SOURCE 0x07
+
+# elif __cplusplus >= 201103L
+ /* C++11 also incorporates many (if not all) of the ISO-C99 features,
+ * which we have guarded by _ISOC99_SOURCE; enable such features, to
+ * the required extent, (which is likely also sufficient to support
+ * any POSIX.1 dependencies).
+ */
+# define _ISOC99_SOURCE 0x03
+
+# elif _POSIX_C_SOURCE >= 200112L
+ /* This represents the minimum level of ISO-C99 support, which may be
+ * required by POSIX.1, (and which may be no less than full support).
+ */
+# define _ISOC99_SOURCE 0x01
# endif
+
+#else
+ /* The the user has explicitly declared a source level dependency on
+ * ISO-C99 features; regardless of how it was declared, redefine it to
+ * ensure that any plausible dependency is covered.
+ */
+# undef _ISOC99_SOURCE
+# define _ISOC99_SOURCE 0x0F
+
+#endif /* _ISOC99_SOURCE */
+
+#if _ISOC99_SOURCE && __cplusplus >= 201103L && __GNUC__ < 6
+ /* Due to a configuration defect in GCC versions prior to GCC-6, when
+ * compiling C++11 code, the ISO-C99 functions may not be incorporated
+ * into the appropriate namespace(s); we may be able to mitigate this,
+ * by ensuring that this GCC configuration macro is defined.
+ */
+# define _GLIBCXX_USE_C99 1
#endif
#if ! defined _MINGW32_SOURCE_EXTENDED && ! defined __STRICT_ANSI__
-/*
- * Enable mingw32 extensions by default, except when __STRICT_ANSI__
- * conformity mode has been enabled.
- */
+ /* Enable mingw32 extensions by default, except when __STRICT_ANSI__
+ * conformity mode has been enabled.
+ */
# define _MINGW32_SOURCE_EXTENDED 1
#endif
diff --git a/mingwrt/include/ctype.h b/mingwrt/include/ctype.h
index 7ff41a0..58fb2fd 100644
--- a/mingwrt/include/ctype.h
+++ b/mingwrt/include/ctype.h
@@ -80,7 +80,7 @@ _CRTIMP __cdecl __MINGW_NOTHROW int isspace(int);
_CRTIMP __cdecl __MINGW_NOTHROW int isupper(int);
_CRTIMP __cdecl __MINGW_NOTHROW int isxdigit(int);
-#if __STDC_VERSION__ >= 199901L || !defined __STRICT_ANSI__
+#if _ISOC99_SOURCE
__cdecl __MINGW_NOTHROW int isblank (int);
#endif
@@ -217,7 +217,7 @@ __CRT_INLINE __cdecl __MINGW_NOTHROW int isupper (int c)
__CRT_INLINE __cdecl __MINGW_NOTHROW int isxdigit (int c)
{ return __ISCTYPE(c, _HEX); }
-#if __STDC_VERSION__ >= 199901L || !defined __STRICT_ANSI__
+#if _ISOC99_SOURCE
__CRT_INLINE __cdecl __MINGW_NOTHROW int isblank (int c)
{ return (__ISCTYPE(c, _BLANK) || c == '\t'); }
#endif
diff --git a/mingwrt/include/inttypes.h b/mingwrt/include/inttypes.h
index e5e5d5b..6da1d97 100644
--- a/mingwrt/include/inttypes.h
+++ b/mingwrt/include/inttypes.h
@@ -222,10 +222,12 @@ typedef struct {
#define SCNuMAX "I64u"
#define SCNuPTR "u"
-#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
-/*
- * no length modifier for char types prior to C9x
- * MS runtime scanf appears to treat "hh" as "h"
+#if _ISOC99_SOURCE
+/* Defined by the user, or implicitly in <_mingw.h>, indicating that
+ * we are compiling for C99, C++11, or POSIX.1-2001 (or later); no char
+ * type length modifiers are supported prior to C99. Further note that
+ * Microsoft's scanf() appears to treat the ISO-C99/POSIX.1 "hh" length
+ * modifier as if it were just "h".
*/
/* signed char */
@@ -249,7 +251,7 @@ typedef struct {
#define SCNu8 "hhu"
#define SCNuLEAST8 "hhu"
#define SCNuFAST8 "hhu"
-#endif /* __STDC_VERSION__ >= 199901 */
+#endif /* _ISOC99_SOURCE */
#endif /* !defined(__cplusplus) || defined(__STDC_FORMAT_MACROS) */
diff --git a/mingwrt/include/wctype.h b/mingwrt/include/wctype.h
index 492f2f0..7b7ed20 100644
--- a/mingwrt/include/wctype.h
+++ b/mingwrt/include/wctype.h
@@ -6,7 +6,7 @@
* $Id$
*
* Written by Mumit Khan <kh...@xr...>
- * Copyright (C) 1999-2003, 2005-2007, 2016, MinGW.org Project
+ * Copyright (C) 1999-2003, 2005-2007, 2016, 2017, MinGW.org Project
*
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -119,7 +119,7 @@ __MINGW_ATTRIB_DEPRECATED
*/
_CRTIMP __cdecl __MINGW_NOTHROW int is_wctype (wint_t, wctype_t);
-#if __STDC_VERSION__>=199901L || !defined __STRICT_ANSI__ || defined __cplusplus
+#if _ISOC99_SOURCE
__cdecl __MINGW_NOTHROW int iswblank (wint_t);
#endif
@@ -173,7 +173,7 @@ __CRT_INLINE __cdecl __MINGW_NOTHROW int iswupper (wint_t wc)
__CRT_INLINE __cdecl __MINGW_NOTHROW int iswxdigit (wint_t wc)
{ return (iswctype (wc, _HEX)); }
-#if __STDC_VERSION__>=199901L || !defined __STRICT_ANSI__ || defined __cplusplus
+#if _ISOC99_SOURCE
__CRT_INLINE __cdecl __MINGW_NOTHROW int iswblank (wint_t wc)
{ return (iswctype (wc, _BLANK) || wc == L'\t'); }
#endif
-----------------------------------------------------------------------
Summary of changes:
mingwrt/ChangeLog | 28 +++++++++
mingwrt/include/_mingw.h.in | 60 ++++++++++++++++---
mingwrt/include/ctype.h | 4 +-
mingwrt/include/inttypes.h | 12 ++--
mingwrt/include/limits.h | 137 ++++++++++++++++++++++++-------------------
mingwrt/include/wctype.h | 6 +-
6 files changed, 169 insertions(+), 78 deletions(-)
hooks/post-receive
--
Repository: mingw-org-wsl
|
|
From: Keith M. <no...@so...> - 2017-01-28 17:50:44
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Repository: mingw-org-wsl".
The branch, 5.0-active has been updated
via d7c921ed3389436e65fc83c91b873a764c94ac51 (commit)
via a0d99fbf0a207c3644a17cfaea0943ac2022517d (commit)
from cc2f1a7a56d95bfb20b97f022f0a1dc7f8250387 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://sf.net/p/mingw/mingw-org-wsl/ci/d7c921ed3389436e65fc83c91b873a764c94ac51/
commit d7c921ed3389436e65fc83c91b873a764c94ac51
Author: Keith Marshall <kei...@us...>
Date: Sat Jan 28 17:46:36 2017 +0000
Make strnlen() and wcsnlen() declaratively consistent.
diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog
index 7bbe88c..59beea4 100644
--- a/mingwrt/ChangeLog
+++ b/mingwrt/ChangeLog
@@ -1,5 +1,12 @@
2017-01-28 Keith Marshall <kei...@us...>
+ Make strnlen() and wcsnlen() declaratively consistent.
+
+ * include/string.h (strnlen): Do not expose its declaration, unless...
+ [_POSIX_C_SOURCE >= 200809L]: ...this feature test is enabled.
+
+2017-01-28 Keith Marshall <kei...@us...>
+
Implement wcsnlen() API per feature request [#2332].
* mingwex/strnlen.s: Rename it as...
diff --git a/mingwrt/include/string.h b/mingwrt/include/string.h
index 6cc4f88..a53a71a 100644
--- a/mingwrt/include/string.h
+++ b/mingwrt/include/string.h
@@ -170,6 +170,7 @@ _CRTIMP __cdecl __MINGW_NOTHROW void swab (const char *, char *, size_t);
#endif /* ! __STRICT_ANSI__ */
+#if _POSIX_C_SOURCE >= 200809L
#if __MSVCRT_VERSION__ >= __MSVCR80_DLL
/* MSVCR80.DLL adds a (mostly) POSIX.1-2008 conforming strnlen(); (it's
* also available in MSVCRT.DLL from _WIN32_WINNT_VISTA onwards, but we
@@ -179,7 +180,7 @@ _CRTIMP __cdecl __MINGW_NOTHROW void swab (const char *, char *, size_t);
*/
_CRTIMP __cdecl __MINGW_NOTHROW char *strnlen (const char *, size_t);
-#elif _POSIX_C_SOURCE >= 200809L
+#else /* MSVCRT.DLL || pre-MSVCR80.DLL */
/* Emulation, to support recent POSIX.1; we prefer this for ALL versions
* of MSVCRT.DLL, (even those which already provide strnlen()); to avoid
* the GCC breakage noted above. (Note that we implement strnlen() with
@@ -194,6 +195,7 @@ __JMPSTUB__(( LIB=coldname; FUNCTION=strnlen ))
__CRT_ALIAS size_t strnlen (const char *__text, size_t __maxlen)
{ return __mingw_strnlen (__text, __maxlen); }
+#endif /* MSVCRT.DLL || pre-MSVCR80.DLL */
#endif /* _POSIX_C_SOURCE >= 200809L */
#undef __STRING_H_SOURCED__
https://sf.net/p/mingw/mingw-org-wsl/ci/a0d99fbf0a207c3644a17cfaea0943ac2022517d/
commit a0d99fbf0a207c3644a17cfaea0943ac2022517d
Author: Keith Marshall <kei...@us...>
Date: Sat Jan 28 16:20:51 2017 +0000
Implement wcsnlen() API per feature request [#2332].
--HG--
rename : mingwrt/mingwex/strnlen.s => mingwrt/mingwex/strnlen.sx
diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog
index 41a6e08..7bbe88c 100644
--- a/mingwrt/ChangeLog
+++ b/mingwrt/ChangeLog
@@ -1,3 +1,28 @@
+2017-01-28 Keith Marshall <kei...@us...>
+
+ Implement wcsnlen() API per feature request [#2332].
+
+ * mingwex/strnlen.s: Rename it as...
+ * mingwex/strnlen.sx: ...this; use C preprocessor logic to adapt...
+ (__mingw_strnlen): ...this existing function implementation for use...
+ [_UNICODE] (__mingw_wcsnlen): ...as this.
+
+ * include/wchar.h [_POSIX_C_SOURCE >= 200809L] (wcsnlen): Declare...
+ [__MSVCRT_VERSION__>=__MSVCR80_DLL]: ...using MS DLL implementation...
+ [!__MSVCRT_VERSION__>=__MSVCR80_DLL] (__mingw_wcsnlen): ...otherwise,
+ declare this, with inline __JMPSTUB__ implementation, providing...
+ (wcsnlen): ...this.
+
+ * Makefile.in (wcsnlen.$OBJEXT): New build rule.
+ (libmingwex.a): Add wcsnlen.$OBJEXT as new prerequisite.
+ (libmoldname.a, libmoldnamed.a): Add __JMPSTUB__ wrappers.
+ (libmoldname70.a, libmoldname70d.a): Likewise.
+ (libmoldname71.a, libmoldname71d.a): Likewise.
+
+ for all other MSVC non-free associated oldname import libraries.
+ (vpath): Add $srcdir/mingwex for %.sx; hence mapping for...
+ (jmpstub.sx): ...this becomes redundant; delete it.
+
2017-01-26 Jason Hood <ja...@ya...>
Honour GLOB_CASEMATCH for globbing sets; cf. issue [#2327].
diff --git a/mingwrt/Makefile.in b/mingwrt/Makefile.in
index 0a3e5c3..6b7afca 100644
--- a/mingwrt/Makefile.in
+++ b/mingwrt/Makefile.in
@@ -388,7 +388,7 @@ $(foreach name,coldname $(all_moldname),lib$(name).a): $(addsuffix .$(OBJEXT), \
#
$(foreach name,moldname $(addprefix moldname,70 71),lib$(name).a) \
$(foreach name,moldname $(addprefix moldname,70 71),lib$(name)d.a): \
- strnlen.jmpstub.$(OBJEXT)
+ strnlen.jmpstub.$(OBJEXT) wcsnlen.jmpstub.$(OBJEXT)
coldname.def: %.def: ${mingwrt_srcdir}/moldname.def.in
$(CC) -C -E -P -D__FILENAME__=$@ -D__CRTDLL__ -xc-header $< > $@
@@ -499,10 +499,16 @@ libmingwex.a: $(addsuffix .$(OBJEXT), getdelim gettimeofday)
libmingwex.a: $(addsuffix .$(OBJEXT), dirent wdirent dlfcn)
vpath %.s ${mingwrt_srcdir}/mingwex
+vpath %.sx ${mingwrt_srcdir}/mingwex
libmingwex.a: $(addsuffix .$(OBJEXT), fwide mbrtowc mbsinit strnlen wcrtomb \
- wcstof wcstold wctob wmemchr wmemcmp wmemcpy wmemmove wmemset)
+ wcsnlen wcstof wcstold wctob wctrans wctype wmemchr wmemcmp wmemcpy wmemmove \
+ wmemset)
-libmingwex.a: $(addsuffix .$(OBJEXT), wctrans wctype)
+# The wcsnlen() function, enumerated above, is an adaptation of strnlen();
+# we need a specific rule to compile it, from shared source.
+#
+wcsnlen.$(OBJEXT): strnlen.sx
+ $(COMPILE.sx) -D_UNICODE $^ -o $@
# For the math sources, we support the convention that a single
# quux_generic.c source file will produce three objects: quux.o,
@@ -553,7 +559,6 @@ libm_dummy.c: Makefile
# entry points as stubs in libmingwex.a, via the following rules:
#
sinclude Makefile.stub
-vpath jmpstub.sx ${mingwrt_srcdir}/mingwex
libstub_refnames = grep -lr '__$1.*FUNCTION *=' ${mingwrt_srcdir}
jmpstub_prerequisites := $(shell $(call libstub_refnames,JMPSTUB)/include)
libimpl_prerequisites := $(shell $(call libstub_refnames,LIBIMPL)/include)
diff --git a/mingwrt/include/wchar.h b/mingwrt/include/wchar.h
index e4edd52..a10fb20 100644
--- a/mingwrt/include/wchar.h
+++ b/mingwrt/include/wchar.h
@@ -467,6 +467,36 @@ _CRTIMP __cdecl __MINGW_NOTHROW wchar_t *wcsupr (wchar_t *);
#endif /* !_NO_OLDNAMES */
#endif /* !__STRICT_ANSI__ */
+#if _POSIX_C_SOURCE >= 200809L
+#if __MSVCRT_VERSION__ >= __MSVCR80_DLL
+/* MSVCR80.DLL adds a (mostly) POSIX.1-2008 conforming wcsnlen(); (it's
+ * also available in MSVCRT.DLL from _WIN32_WINNT_VISTA onwards, but we
+ * pretend otherwise, since recent GCC will try to use the function when
+ * it can be found in libmsvcrt.a, so breaking it for use on WinXP and
+ * earlier).
+ */
+#ifndef __STRICT_ANSI__ /* N.B.: this is not an ISO-C function */
+_CRTIMP __cdecl __MINGW_NOTHROW char *wcsnlen (const wchar_t *, size_t);
+#endif
+
+#else /* MSVCRT.DLL || pre-MSVCR80.DLL */
+/* Emulation, to support recent POSIX.1; we prefer this for ALL versions
+ * of MSVCRT.DLL, (even those which already provide wcsnlen()); to avoid
+ * the GCC breakage noted above. (Note that we implement wcsnlen() with
+ * the alternative external name, __mingw_wcsnlen() in libmingwex.a, to
+ * avoid possible link time collision with MSVCR80.DLL's implementation,
+ * then map this to wcsnlen() via a __CRT_ALIAS, with stubs designated
+ * for linking from within the appropriate oldname libraries.
+ */
+extern size_t __mingw_wcsnlen (const wchar_t *, size_t);
+
+__JMPSTUB__(( LIB=coldname; FUNCTION=wcsnlen ))
+__CRT_ALIAS size_t wcsnlen (const wchar_t *__text, size_t __maxlen)
+{ return __mingw_wcsnlen (__text, __maxlen); }
+
+#endif /* MSVCRT.DLL || pre-MSVCR80.DLL */
+#endif /* _POSIX_C_SOURCE >= 200809L */
+
/* This completes the set of declarations which are to be duplicated by
* inclusion of <string.h>; revert the declarative condition, to make it
* specific to <wchar.h> alone.
diff --git a/mingwrt/mingwex/strnlen.s b/mingwrt/mingwex/strnlen.sx
similarity index 74%
rename from mingwrt/mingwex/strnlen.s
rename to mingwrt/mingwex/strnlen.sx
index 66d7b49..463afb0 100644
--- a/mingwrt/mingwex/strnlen.s
+++ b/mingwrt/mingwex/strnlen.sx
@@ -1,5 +1,5 @@
/*
- * strnlen.s
+ * strnlen.sx
*
* Implementation of POSIX.1-2008 conforming strnlen(), and a wrapper
* extending it to conform with ISO-C11 TR-24731-1 strnlen_s().
@@ -7,7 +7,7 @@
* $Id$
*
* Written by Keith Marshall <kei...@us...>
- * Copyright (C) 2016, MinGW.org Project
+ * Copyright (C) 2016, 2017, MinGW.org Project
*
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -52,10 +52,26 @@
* sharing of common code between two distinct entry points, with subtly
* differing behaviours, while avoiding the overhead of an extra function
* call to invoke such shared code; this also allows the code to exploit
- * the CUP's string scanning instructions, (which GCC does not), and so
+ * the CPU's string scanning instructions, (which GCC does not), and so
* achieves a more compact, (and likely more efficient), implementation.
*
*/
+#if defined UNICODE || defined _UNICODE
+/* The algorithm defined herein is effectively the same as that required
+ * as a substitute for wcsnlen()/wcsnlen_s(); map entry point names to the
+ * appropriate alternatives for scanning wchar_t *, (rather than char *),
+ * strings, (i.e. Microsoft's so-called UNICODE strings).
+ */
+# define ___mingw_strnlen ___mingw_wcsnlen
+# define ___mingw_strnlen_s ___mingw_wcsnlen_s
+
+/* The fundamental change required to scan whcar_t * strings, rather than
+ * char * strings, is that we must use the scasw instruction in place of
+ * the scasb instruction; map it accordingly.
+ */
+# define scasb scasw
+#endif
+
.text
.align 4
.globl ___mingw_strnlen
@@ -84,8 +100,22 @@ ___mingw_strnlen:
decl %eax /* NUL found and counted; discount it */
.L3:
sub %edx, %eax /* compute effective count to return */
-.L4:
- popl %edi /* restore saved register ... */
+
+#if defined UNICODE || defined _UNICODE
+/* By the time we get to here, the EAX register contains the effective
+ * length of the scanned string in bytes; this is the correct value to be
+ * returned, in the case of char * strings, but it is twice the correct
+ * length for wchar_t * strings, (possibly with one odd residual byte,
+ * left over from a partially discounted NUL wchar_t); we may adjust this,
+ * for the wchar_t * case, by a simple logical right shift, effectively
+ * dividing the even extent of the (unsigned) count by two, extracting
+ * the full wchar_t count, leaving any odd byte residual as remainder
+ * in the carry flag, where we may simply (and safely) ignore it.
+ */
+ shrl %eax /* convert byte count to wchar_t count */
+#endif
+
+.L4: popl %edi /* restore saved register ... */
ret /* and we're done */
.align 4
-----------------------------------------------------------------------
Summary of changes:
mingwrt/ChangeLog | 32 +++++++++++++++++++++++
mingwrt/Makefile.in | 13 ++++++---
mingwrt/include/string.h | 4 ++-
mingwrt/include/wchar.h | 30 +++++++++++++++++++++
mingwrt/mingwex/{strnlen.s => strnlen.sx} | 40 +++++++++++++++++++++++++---
5 files changed, 109 insertions(+), 10 deletions(-)
rename mingwrt/mingwex/{strnlen.s => strnlen.sx} (74%)
hooks/post-receive
--
Repository: mingw-org-wsl
|
|
From: Keith M. <no...@so...> - 2017-01-26 20:41:04
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Repository: mingw-org-wsl".
The branch, 5.0-active has been updated
via cc2f1a7a56d95bfb20b97f022f0a1dc7f8250387 (commit)
via df96caa682ec8abb3faf6caa181205b2de028fb5 (commit)
via 597dadeab7bb2070d5bd5a5c06e4b4b98493b1aa (commit)
from 490e36035f4e6d99a01faaee73c297b7f385f3a3 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://sf.net/p/mingw/mingw-org-wsl/ci/cc2f1a7a56d95bfb20b97f022f0a1dc7f8250387/
commit cc2f1a7a56d95bfb20b97f022f0a1dc7f8250387
Author: Jason Hood <ja...@ya...>
Date: Thu Jan 26 20:34:13 2017 +0000
Honour GLOB_CASEMATCH for globbing sets; cf. issue [#2327].
diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog
index 67091e8..41a6e08 100644
--- a/mingwrt/ChangeLog
+++ b/mingwrt/ChangeLog
@@ -1,3 +1,11 @@
+2017-01-26 Jason Hood <ja...@ya...>
+
+ Honour GLOB_CASEMATCH for globbing sets; cf. issue [#2327].
+
+ * include/glob.h (GLOB_CASEMATCH): Update comment.
+ * mingwex/glob.c (glob_case_match): Move before, and use it in...
+ (glob_in_set): ...this function, to test characters in the set.
+
2017-01-26 Keith Marshall <kei...@us...>
Avoid snprintf() overhead in directory stream functions.
diff --git a/mingwrt/include/glob.h b/mingwrt/include/glob.h
index 9cfa169..45e1c9a 100644
--- a/mingwrt/include/glob.h
+++ b/mingwrt/include/glob.h
@@ -8,7 +8,7 @@
* $Id$
*
* Written by Keith Marshall <kei...@us...>
- * Copyright (C) 2011, 2012, 2014, 2016, MinGW.org Project.
+ * Copyright (C) 2011, 2012, 2014, 2016, 2017, MinGW.org Project.
*
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -94,10 +94,7 @@ enum {
* but to better support the MS-Windows
* file system, the MinGW implementation
* of glob() performs a CASE INSENSITIVE
- * character match by default, (except
- * when matching within character group
- * patterns, which are ALWAYS assumed to
- * require CASE SENSITIVE matching).
+ * character match by default.
*/
__GLOB_CASEMATCH_OFFSET,
/*
diff --git a/mingwrt/mingwex/glob.c b/mingwrt/mingwex/glob.c
index 8b5332a..1f064e1 100644
--- a/mingwrt/mingwex/glob.c
+++ b/mingwrt/mingwex/glob.c
@@ -7,7 +7,7 @@
* $Id$
*
* Written by Keith Marshall <kei...@us...>
- * Copyright (C) 2011-2014, MinGW.org Project.
+ * Copyright (C) 2011-2014, 2017, MinGW.org Project.
*
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -227,6 +227,15 @@ static const char *glob_set_adjusted( const char *pattern, int flags )
return ++p;
}
+GLOB_INLINE int glob_case_match( int flags, int check, int match )
+{
+ /* Local helper function, used to facilitate the case insensitive
+ * glob character matching appropriate for MS-Windows systems.
+ */
+ return (flags & GLOB_CASEMATCH) ? check - match
+ : tolower( check ) - tolower( match );
+}
+
static const char *glob_in_set( const char *set, int test, int flags )
{
/* Check if the single character "test" is present in the set
@@ -283,7 +292,7 @@ static const char *glob_in_set( const char *set, int test, int flags )
/* ...in incremental collating sequence order, to the next
* character following the '-'...
*/
- if( lastc++ == test )
+ if( glob_case_match( flags, lastc++, test ) == 0 )
/*
* ...returning immediately on a successful match...
*/
@@ -295,7 +304,7 @@ static const char *glob_in_set( const char *set, int test, int flags )
* range may have been specified in decrementing collating
* sequence order...
*/
- if( lastc-- == test )
+ if( glob_case_match( flags, lastc--, test ) == 0 )
/*
* ...once again, return immediately on a successful match.
*/
@@ -316,7 +325,7 @@ static const char *glob_in_set( const char *set, int test, int flags )
*/
return NULL;
- if( c == test )
+ if( glob_case_match( flags, c, test ) == 0 )
/*
* We found the test character within the set; adjust the pattern
* reference, to resume after the end of the set, and return the
@@ -337,15 +346,6 @@ static const char *glob_in_set( const char *set, int test, int flags )
return NULL;
}
-GLOB_INLINE int glob_case_match( int flags, int check, int match )
-{
- /* Local helper function, used to facilitate the case insensitive
- * glob character matching appropriate for MS-Windows systems.
- */
- return (flags & GLOB_CASEMATCH) ? check - match
- : tolower( check ) - tolower( match );
-}
-
static int glob_strcmp( const char *pattern, const char *text, int flags )
{
/* Compare "text" to a specified globbing "pattern" using semantics
https://sf.net/p/mingw/mingw-org-wsl/ci/df96caa682ec8abb3faf6caa181205b2de028fb5/
commit df96caa682ec8abb3faf6caa181205b2de028fb5
Author: Keith Marshall <kei...@us...>
Date: Thu Jan 26 18:56:27 2017 +0000
Avoid snprintf() overhead in directory stream functions.
diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog
index b90c04e..67091e8 100644
--- a/mingwrt/ChangeLog
+++ b/mingwrt/ChangeLog
@@ -1,5 +1,16 @@
2017-01-26 Keith Marshall <kei...@us...>
+ Avoid snprintf() overhead in directory stream functions.
+
+ * mingwex/dirent.c (dirent_update): Do not use either snprintf() or
+ snwprintf() functions when updating dd->d_name and dd->d_namlen data;
+ emulate them instead, using a lightweight inline char-by-char counted
+ copy loop, operating on char or wchar_t data as appropriate.
+ (DIRENT_ASSIGN_NAME): Macro no longer required; delete it.
+ (NUL): New manifest constant; define it.
+
+2017-01-26 Keith Marshall <kei...@us...>
+
Avoid #include_next misbehaviour; cf. MinGW-Bug [#2330]
* include/ctype.h (wctype.h): Use "..." form of #include, rather than
diff --git a/mingwrt/mingwex/dirent.c b/mingwrt/mingwex/dirent.c
index e6813c1..10a2ac7 100644
--- a/mingwrt/mingwex/dirent.c
+++ b/mingwrt/mingwex/dirent.c
@@ -1,24 +1,46 @@
/*
* dirent.c
*
- * This file has no copyright assigned and is placed in the Public Domain.
+ * $Id$
+ *
+ * Provides emulation of POSIX "directory stream" manipulation functions,
+ * in terms of the MS-Windows FindFile API.
*
- * This file is a part of the mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within the package.
*
* Derived from DIRLIB.C by Matt J. Weinstein
- * This note appears in the DIRLIB.H
+ * This note appears in the associated DIRLIB.H header file:
* DIRLIB.H by M. J. Weinstein Released to public domain 1-Jan-89
*
* Updated by Jeremy Bettis <je...@hk...>
* Significantly revised and rewinddir, seekdir and telldir added
* by Colin Peters <co...@fu...>
+ *
* Further significantly revised for improved memory utilisation,
* efficiency in operation, and better POSIX standards compliance
* by Keith Marshall <kei...@us...>
+ * Copyright (C) 1997, 2001-2006, 2014, 2017, MinGW.org Project
+ *
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice, this permission notice, and the following
+ * disclaimer shall be included in all copies or substantial portions of
+ * the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OF OR OTHER
+ * DEALINGS IN THE SOFTWARE.
*
*/
-#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
@@ -28,23 +50,6 @@
#include <windows.h>
#include <tchar.h>
-#ifdef _UNICODE
- /* In a Unicode build, the path name within the _wdirent struct is
- * represented by a wchar_t string; we use the snwprintf() function
- * to simultaneously assign the d_name and d_namlen fields, copying
- * from a temporary WIN32_FIND_DATA struct on the stack...
- */
-# include <wchar.h>
-# define DIRENT_ASSIGN_NAME snwprintf
-
-#else
- /* ...while for a non-Unicode build, the corresponding data within
- * the dirent structure is represented by a normal char string, and
- * the assignments are made by the snprintf() function.
- */
-# define DIRENT_ASSIGN_NAME snprintf
-#endif
-
/* This implementation applies a "__mingw_" pseudo-namespace prefix to
* the standard POSIX function names, for each each function it defines;
* the following pair of macros facilitates this.
@@ -150,16 +155,33 @@ struct __wdirstream_t
*/
#define DT_VALID_BITS ~(DT_IGNORED | 0x0080)
+/* For convenience, we identify the NUL "character" which terminates any
+ * file or directory name, appropriately typed, using this macro:
+ */
+#define NUL ((_TCHAR)(0))
+
static
void dirent_update( struct _tdirent *dd, WIN32_FIND_DATA *fd )
{
/* Helper function, used by dirent_findfirst() and dirent_findnext(),
* to transfer all relevant data from their respective WIN32_FIND_DATA
- * buffers to the specified dirent structure.
+ * buffers to the specified dirent structure; in the case of the d_name
+ * field, we want the effect of a snprintf() string transfer, but to
+ * avoid the (perceptually significant) overhead of format parsing,
+ * we simulate it with an inline character-by-character counted
+ * string copy loop...
+ */
+ _TCHAR *d_name = dd->d_name;
+ for( dd->d_namlen = 0; (*d_name = fd->cFileName[dd->d_namlen]) != NUL; )
+ /*
+ * ...continuing to count input characters, until the terminal NUL,
+ * but declining to store any character beyond the physical end of
+ * the d_name field buffer.
+ */
+ if( ++dd->d_namlen < FILENAME_MAX ) ++d_name;
+
+ /* Store only those file attribute bits which are valid for d_type.
*/
- dd->d_namlen = DIRENT_ASSIGN_NAME( dd->d_name, FILENAME_MAX,
- _T("%s"), fd->cFileName
- );
if( (dd->d_type = fd->dwFileAttributes & DT_VALID_BITS) > DT_DIR )
dd->d_type = DT_UNKNOWN;
}
https://sf.net/p/mingw/mingw-org-wsl/ci/597dadeab7bb2070d5bd5a5c06e4b4b98493b1aa/
commit 597dadeab7bb2070d5bd5a5c06e4b4b98493b1aa
Author: Keith Marshall <kei...@us...>
Date: Thu Jan 26 16:14:43 2017 +0000
Avoid #include_next misbehaviour; cf. MinGW-Bug [#2330]
diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog
index aed25b8..b90c04e 100644
--- a/mingwrt/ChangeLog
+++ b/mingwrt/ChangeLog
@@ -1,3 +1,14 @@
+2017-01-26 Keith Marshall <kei...@us...>
+
+ Avoid #include_next misbehaviour; cf. MinGW-Bug [#2330]
+
+ * include/ctype.h (wctype.h): Use "..." form of #include, rather than
+ the <...> form; we must include our own corresponding mingwrt version
+ of this subsidiary header, and avoid any bogus alternative which may
+ have been insinuated earlier in the system header path.
+
+ * include/string.h (wchar.h): Likewise.
+
2017-01-25 Jason Hood <ja...@ya...>
Correct quoted backslash handling, per bug [#2328].
diff --git a/mingwrt/include/ctype.h b/mingwrt/include/ctype.h
index 5c4ef43..7ff41a0 100644
--- a/mingwrt/include/ctype.h
+++ b/mingwrt/include/ctype.h
@@ -6,7 +6,7 @@
* $Id$
*
* Written by Colin Peters <co...@bi...>
- * Copyright (C) 1997-2008, 2016, MinGW.org Project
+ * Copyright (C) 1997-2008, 2016, 2017, MinGW.org Project
*
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -42,17 +42,21 @@
* properly declared here, this file should also declare elements of the
* wide classification API, which is properly declared in <wctype.h>
*
- * To avoid the burden of maintaining duplicate declarations, in two
+ * To avoid the burden of maintaining duplicate declarations in two
* locations, we keep the wide character declarations where ISO-C and
* POSIX say they belong, in <wctype.h>, while accommodating Microsoft
* compatibility by providing for selective inclusion of the relevant
* elements of it here. (Note that we must do this early, because to
* avoid duplication, we delegate the definition of common character
* classification macros, with the exception of _LEADBYTE, which is
- * not required in both headers, to <wctype.h>).
+ * not required in both headers, to <wctype.h>; we use the quoted
+ * form of inclusion here, to ensure that we get our own "wctype.h",
+ * and not any predecessor which may have been insinuated into the
+ * system include path, and which may interfere with our mechanism
+ * for partial inclusion of shared header content).
*/
#define __CTYPE_H_SOURCED__
-#include <wctype.h>
+#include "wctype.h"
/* This is the one character classification macro, for which definition
* is NOT delegated to <wctype.h>
diff --git a/mingwrt/include/string.h b/mingwrt/include/string.h
index 720c85a..6cc4f88 100644
--- a/mingwrt/include/string.h
+++ b/mingwrt/include/string.h
@@ -6,7 +6,7 @@
* $Id$
*
* Written by Colin Peters <co...@bi...>
- * Copyright (C) 1997-2000, 2002-2004, 2007, 2009, 2015, 2016,
+ * Copyright (C) 1997-2000, 2002-2004, 2007, 2009, 2015-2017,
* MinGW.org Project.
*
*
@@ -160,9 +160,13 @@ _CRTIMP __cdecl __MINGW_NOTHROW void swab (const char *, char *, size_t);
* scope, will selectively expose the required function prototypes;
* however, strictly ISO-C conforming applications should include
* <wchar.h> directly; they should not rely on this MSVC specific
- * anomalous behaviour.
+ * anomalous behaviour. (We use the quoted form of inclusion here,
+ * to ensure that we get our own "wchar.h", and not any predecessor
+ * which may have been insinuated into the system include path, and
+ * so could interfere with our mechanism for partial inclusion of
+ * shared header content).
*/
-#include <wchar.h>
+#include "wchar.h"
#endif /* ! __STRICT_ANSI__ */
-----------------------------------------------------------------------
Summary of changes:
mingwrt/ChangeLog | 30 ++++++++++++++++++
mingwrt/include/ctype.h | 12 +++++--
mingwrt/include/glob.h | 7 +---
mingwrt/include/string.h | 10 ++++--
mingwrt/mingwex/dirent.c | 74 +++++++++++++++++++++++++++++----------------
mingwrt/mingwex/glob.c | 26 ++++++++--------
6 files changed, 108 insertions(+), 51 deletions(-)
hooks/post-receive
--
Repository: mingw-org-wsl
|
|
From: Keith M. <no...@so...> - 2017-01-25 13:58:31
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Repository: mingw-org-wsl".
The branch, 5.0-active has been updated
via 490e36035f4e6d99a01faaee73c297b7f385f3a3 (commit)
from 888d2e2f11bfd3d69b9075882d85f27729619ea5 (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/490e36035f4e6d99a01faaee73c297b7f385f3a3/
commit 490e36035f4e6d99a01faaee73c297b7f385f3a3
Author: Jason Hood <ja...@ya...>
Date: Wed Jan 25 13:41:43 2017 +0000
Correct quoted backslash handling, per bug [#2328].
diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog
index d827abc..aed25b8 100644
--- a/mingwrt/ChangeLog
+++ b/mingwrt/ChangeLog
@@ -1,3 +1,10 @@
+2017-01-25 Jason Hood <ja...@ya...>
+
+ Correct quoted backslash handling, per bug [#2328].
+
+ * setargv.c (__mingw32_setargv): Within single quotes, backslashes
+ should be interpreted literally; copy them as-is.
+
2017-01-25 Keith Marshall <kei...@us...>
Use C99 blanks as default argv separators, per issue [#2329].
diff --git a/mingwrt/setargv.c b/mingwrt/setargv.c
index 73bb8dd..36aaab7 100644
--- a/mingwrt/setargv.c
+++ b/mingwrt/setargv.c
@@ -123,12 +123,18 @@ void __mingw32_setargv( const char *cmdline )
* need special handling.
*/
case '\\':
- /* We don't (yet) know if this is a literal backslash,
- * (directory separator), or an escape for a following
- * quote character; just note its presence, until we
- * have looked far enough ahead to decide.
- */
- ++bslash;
+ if( quoted == '\'' )
+ /* Backslashes within single quotes are always literal.
+ */
+ *argptr++ = '\\';
+
+ else
+ /* We don't (yet) know if this is a literal backslash,
+ * (directory separator), or an escape for a following
+ * quote character; just note its presence, until we
+ * have looked far enough ahead to decide.
+ */
+ ++bslash;
break;
case '[':
-----------------------------------------------------------------------
Summary of changes:
mingwrt/ChangeLog | 7 +++++++
mingwrt/setargv.c | 18 ++++++++++++------
2 files changed, 19 insertions(+), 6 deletions(-)
hooks/post-receive
--
Repository: mingw-org-wsl
|
|
From: Keith M. <no...@so...> - 2017-01-25 13:12:44
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Repository: mingw-org-wsl".
The branch, 5.0-active has been updated
via 888d2e2f11bfd3d69b9075882d85f27729619ea5 (commit)
from 66c389c590ed7a0c84eefe76c5db500cf3bbddf3 (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/888d2e2f11bfd3d69b9075882d85f27729619ea5/
commit 888d2e2f11bfd3d69b9075882d85f27729619ea5
Author: Keith Marshall <kei...@us...>
Date: Wed Jan 25 13:07:06 2017 +0000
Use C99 blanks as default argv separators, per issue [#2329].
diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog
index e285d3c..d827abc 100644
--- a/mingwrt/ChangeLog
+++ b/mingwrt/ChangeLog
@@ -1,3 +1,13 @@
+2017-01-25 Keith Marshall <kei...@us...>
+
+ Use C99 blanks as default argv separators, per issue [#2329].
+
+ * setargv.c [_ISOC99_SOURCE]: Require it.
+ (__mingw32_setargv): Separate command line arguments based on...
+ [(quoted == 0) && isblank( c )]: ...this condition, instead of on...
+ [(quoted == 0) && isspace( c )]: ...this, so that only blanks, rather
+ than any whitespace characters, serve as default argument separators.
+
2017-01-10 Keith Marshall <kei...@us...>
Correct <strings.h> preprocessor logic; fix bug [#2322]
diff --git a/mingwrt/setargv.c b/mingwrt/setargv.c
index 09e543c..73bb8dd 100644
--- a/mingwrt/setargv.c
+++ b/mingwrt/setargv.c
@@ -8,7 +8,7 @@
* $Id$
*
* Written by Keith Marshall <kei...@us...>
- * Copyright (C) 2014, MinGW.org Project
+ * Copyright (C) 2014, 2017, MinGW.org Project
*
* ---------------------------------------------------------------------------
*
@@ -33,6 +33,8 @@
* ---------------------------------------------------------------------------
*
*/
+#define _ISOC99_SOURCE
+
#include <glob.h>
#include <string.h>
#include <ctype.h>
@@ -181,9 +183,9 @@ void __mingw32_setargv( const char *cmdline )
* literally, after flushing out any pending backslashes.
*/
argptr = backslash( bslash, argptr );
- if( (quoted == 0) && isspace( c ) )
+ if( (quoted == 0) && isblank( c ) )
{
- /* The one exception is any white space character,
+ /* The one exception is any blank or tab character,
* when it is not contained within quotes; this acts
* as an argument separator, (or is simply discarded
* if there is no argument already collected)...
-----------------------------------------------------------------------
Summary of changes:
mingwrt/ChangeLog | 10 ++++++++++
mingwrt/setargv.c | 8 +++++---
2 files changed, 15 insertions(+), 3 deletions(-)
hooks/post-receive
--
Repository: mingw-org-wsl
|
|
From: Keith M. <no...@so...> - 2017-01-24 23:08:06
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Repository: mingw-org-wsl".
The branch, 5.0-active has been updated
via 66c389c590ed7a0c84eefe76c5db500cf3bbddf3 (commit)
from 01d9f3fc1aed8b4fd7e2894dfa54bda71080fafe (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/66c389c590ed7a0c84eefe76c5db500cf3bbddf3/
commit 66c389c590ed7a0c84eefe76c5db500cf3bbddf3
Author: Keith Marshall <kei...@us...>
Date: Tue Jan 10 19:43:48 2017 +0000
Correct <strings.h> preprocessor logic; fix bug [#2322]
diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog
index df2e26e..e285d3c 100644
--- a/mingwrt/ChangeLog
+++ b/mingwrt/ChangeLog
@@ -1,3 +1,10 @@
+2017-01-10 Keith Marshall <kei...@us...>
+
+ Correct <strings.h> preprocessor logic; fix bug [#2322]
+
+ * include/strings.h (_stricmp, _strnicmp): Always declare, unless...
+ [__STRICT_ANSI__ && __NO_INLINE__]: ...both of these are defined.
+
2016-11-28 Keith Marshall <kei...@us...>
Implement POSIX.1 compatible setenv() and unsetenv() functions.
diff --git a/mingwrt/include/strings.h b/mingwrt/include/strings.h
index 8b790a3..0d10628 100644
--- a/mingwrt/include/strings.h
+++ b/mingwrt/include/strings.h
@@ -6,7 +6,7 @@
* $Id$
*
* Written by Keith Marshall <kei...@us...>
- * Copyright (C) 2015, 2016, MinGW.org Project.
+ * Copyright (C) 2015-2017, MinGW.org Project.
*
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -66,17 +66,20 @@ int __cdecl __MINGW_NOTHROW strncasecmp( const char *, const char *, size_t );
#endif /* ! RC_INVOKED */
#endif /* !__STRING_H_SOURCED__ */
-#if ! (defined _STRINGS_H && defined __NO_INLINE__)
+#if ! (defined __STRICT_ANSI__ && defined __NO_INLINE__)
/* These are the MSVCRT.DLL equivalents for POSIX.1's strcasecmp() and
* strncasecmp() functions, for which we provide in-line implementations
* in <strings.h> respectively; MSVC expects to find these prototypes in
* <string.h>, but we also need them here, in <strings.h>, to facilitate
* the in-line function implementations; we declare them here, and allow
- * <string.h> to include them selectively.
+ * <string.h> to include them selectively. Note that <string.h> doesn't
+ * need these if __STRICT_ANSI__ is defined, while <strings.h> doesn't
+ * if __NO_INLINE__ is defined; thus we declare them, unless BOTH of
+ * these conditions for not requiring them are satisfied.
*/
_CRTIMP __cdecl __MINGW_NOTHROW int _stricmp( const char *, const char * );
_CRTIMP __cdecl __MINGW_NOTHROW int _strnicmp( const char *, const char *, size_t );
-#endif /* !(_STRINGS_H && __NO_INLINE__) */
+#endif /* !(__STRICT_ANSI__ && __NO_INLINE__) */
#if defined _STRINGS_H && ! defined RC_INVOKED
#ifndef __NO_INLINE__
-----------------------------------------------------------------------
Summary of changes:
mingwrt/ChangeLog | 7 +++++++
mingwrt/include/strings.h | 11 +++++++----
2 files changed, 14 insertions(+), 4 deletions(-)
hooks/post-receive
--
Repository: mingw-org-wsl
|