|
From: Keith M. <no...@so...> - 2017-02-07 11:27:35
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Repository: mingw-org-wsl".
The branch, 5.0-active has been updated
via 8dbfc3da207efa274b88d4540f8be78fbda59254 (commit)
via 425e1c3b3cd7fd2dda8ec36d6bfd0063db3160d2 (commit)
from e52d64b7f86888d5f318fae98fec0536653093d3 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://sf.net/p/mingw/mingw-org-wsl/ci/8dbfc3da207efa274b88d4540f8be78fbda59254/
commit 8dbfc3da207efa274b88d4540f8be78fbda59254
Author: Keith Marshall <kei...@us...>
Date: Tue Feb 7 11:20:05 2017 +0000
Ensure selective inclusion of the correct <strings.h>
diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog
index 9f99b73..d022d2d 100644
--- a/mingwrt/ChangeLog
+++ b/mingwrt/ChangeLog
@@ -1,3 +1,12 @@
+2017-02-07 Keith Marshall <kei...@us...>
+
+ Ensure selective inclusion of the correct <strings.h>
+
+ * include/string.h: Use "..." form for selective inclusion of ...
+ (strings.h): ...this, to ensure that we get our own version, avoiding
+ any inappropriate alternative which may have been insinuated into the
+ system header include path.
+
2017-02-04 Keith Marshall <kei...@us...>
Resolve a global variable naming inconsistency.
diff --git a/mingwrt/include/string.h b/mingwrt/include/string.h
index ef80f37..288aedc 100644
--- a/mingwrt/include/string.h
+++ b/mingwrt/include/string.h
@@ -92,8 +92,7 @@ _CRTIMP __cdecl __MINGW_NOTHROW char *strtok (char *, const char *);
_CRTIMP __cdecl __MINGW_NOTHROW size_t strxfrm (char *, const char *, size_t);
#ifndef __STRICT_ANSI__
-/*
- * Extra non-ANSI functions provided by the CRTDLL library
+/* Extra non-ANSI functions provided by the CRTDLL library
*/
_CRTIMP __cdecl __MINGW_NOTHROW char *_strerror (const char *);
_CRTIMP __cdecl __MINGW_NOTHROW void *_memccpy (void *, const void *, int, size_t);
@@ -108,14 +107,16 @@ _CRTIMP __cdecl __MINGW_NOTHROW char *_strset (char *, int);
_CRTIMP __cdecl __MINGW_NOTHROW char *_strupr (char *);
_CRTIMP __cdecl __MINGW_NOTHROW void _swab (const char *, char *, size_t);
+#if !_EMULATE_GLIBC
/* MSVC's non-ANSI _stricmp() and _strnicmp() functions must also be
* prototyped here, but we need to share them with <strings.h>, where
* we declare their POSIX strcasecmp() and strncasecmp() equivalents;
* get the requisite prototypes by selective <strings.h> inclusion,
- * (noting that we've already done so, if emulating glibc).
+ * (noting that we've already done so, if emulating glibc, but if not,
+ * we use quoted inclusion now, to ensure that we get our "strings.h",
+ * which is equipped to support __STRING_H_SOURCED__ filtering).
*/
-#if !_EMULATE_GLIBC
-#include <strings.h>
+#include "strings.h"
#endif
# ifdef __MSVCRT__
https://sf.net/p/mingw/mingw-org-wsl/ci/425e1c3b3cd7fd2dda8ec36d6bfd0063db3160d2/
commit 425e1c3b3cd7fd2dda8ec36d6bfd0063db3160d2
Author: Keith Marshall <kei...@us...>
Date: Sat Feb 4 21:33:50 2017 +0000
Resolve a global variable naming inconsistency.
diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog
index 1862aa4..9f99b73 100644
--- a/mingwrt/ChangeLog
+++ b/mingwrt/ChangeLog
@@ -1,3 +1,14 @@
+2017-02-04 Keith Marshall <kei...@us...>
+
+ Resolve a global variable naming inconsistency.
+
+ * mingwex/ofmt.c (__mingw_output_format_flag): Rename it as...
+ (__mingw_output_format_flags): ...this, at point of definition, and
+ update all references, to maintain consistency with usage...
+ * mingwex/ofmtctl.c (__mingw_output_format_flags): ...here.
+
+ * mingwex/stdio/pformat.c: Update references.
+
2017-01-30 Keith Marshall <kei...@us...>
Implement strerror_r()/strerror_s() API.
diff --git a/mingwrt/mingwex/ofmt.c b/mingwrt/mingwex/ofmt.c
index 9d7543e..01b8096 100644
--- a/mingwrt/mingwex/ofmt.c
+++ b/mingwrt/mingwex/ofmt.c
@@ -8,7 +8,7 @@
* $Id$
*
* Written by Keith Marshall <kei...@us...>
- * Copyright (C) 2014, 2015, MinGW.org Project
+ * Copyright (C) 2014, 2015, 2017, MinGW.org Project
*
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -84,25 +84,23 @@
* declared; users should NEVER access this, other than via our two
* accessor functions.
*/
-extern unsigned int __mingw_output_format_flag;
+extern unsigned int __mingw_output_format_flags;
static __inline__ __attribute__((__always_inline__))
-unsigned int update_output_format_flag( unsigned int style )
-{ return (__mingw_output_format_flag & ~_EXPONENT_DIGIT_MASK) | style; }
+unsigned int update_output_format_flags( unsigned int style )
+{ return (__mingw_output_format_flags & ~_EXPONENT_DIGIT_MASK) | style; }
#if defined __varofmt__
-/*
- * Here, we actually allocate the storage for recording the preferred
+/* Here, we actually allocate the storage for recording the preferred
* formatting style; although POSIX might lead us to prefer an initial
* default of _TWO_DIGIT_EXPONENT, we choose to assign a default which
* is consistent with Microsoft's preference.
*/
-unsigned int __mingw_output_format_flag = _THREE_DIGIT_EXPONENT;
+unsigned int __mingw_output_format_flags = _THREE_DIGIT_EXPONENT;
#elif defined __crtofmt__
-/*
- * Here we implement the common part of the fallback API, retrieving
- * the value stored in __mingw_output_format_flag. Note that this is
+/* Here we implement the common part of the fallback API, retrieving
+ * the value stored in __mingw_output_format_flags. Note that this is
* sufficient for both _get_output_format() and _set_output_format(),
* with the set action being completed in the calling wrapper.
*/
@@ -112,7 +110,7 @@ unsigned int __mingw_get_output_format_fallback( void )
/* Our replacement function simply returns the current setting of
* the assigned formatting style...
*/
- return __mingw_output_format_flag & _EXPONENT_DIGIT_MASK;
+ return __mingw_output_format_flags & _EXPONENT_DIGIT_MASK;
}
/* ...and, in the case of _set_output_format(), we simply map the
* requisite name to the common function implementation.
@@ -121,8 +119,7 @@ extern unsigned int __mingw_set_output_format_fallback( unsigned int )
__attribute__((__alias__("__mingw_get_output_format_fallback")));
#elif defined __crtnfmt__
-/*
- * Here, we implement a generic fallback hook, suitable for use as the
+/* Here, we implement a generic fallback hook, suitable for use as the
* fallback for _get_printf_count_output()/_set_printf_count_output().
*/
int __mingw_get_printf_count_output_fallback( void )
@@ -139,8 +136,7 @@ int __mingw_set_printf_count_output_fallback( int mode )
* _set_output_format() compilation options first.
*/
#if defined __setnfmt__
-/*
- * Here, we are wrapping the _set_printf_count_output() function...
+/* Here, we are wrapping the _set_printf_count_output() function...
*/
# define RTNTYPE int
# define FUNCTION _set_printf_count_output
@@ -150,8 +146,7 @@ int __mingw_set_printf_count_output_fallback( int mode )
extern int __mingw_set_printf_count_output_fallback( int );
#elif defined __getnfmt__
-/*
- * ...while here, it is _get_printf_count_output().
+/* ...while here, it is _get_printf_count_output().
*/
# define RTNTYPE int
# define FUNCTION _get_printf_count_output
@@ -161,8 +156,7 @@ extern int __mingw_set_printf_count_output_fallback( int );
extern int __mingw_get_printf_count_output_fallback( void );
#elif defined __setofmt__
-/*
- * This is our implementation for the _set_output_format() function,
+/* This is our implementation for the _set_output_format() function,
* which will be called when there is no MSVCRT implementation.
*/
# define RTNTYPE unsigned int
@@ -183,7 +177,7 @@ api_invoke( unsigned int (*api_helper)(unsigned int), unsigned int style )
* to use a handler in common with _get_output_format()...
*/
unsigned int retval = api_helper( style &= _EXPONENT_DIGIT_MASK );
- __mingw_output_format_flag = update_output_format_flag( style );
+ __mingw_output_format_flags = update_output_format_flags( style );
return retval;
}
/* ...while declaring its formal prototype as external.
@@ -204,7 +198,7 @@ static __inline__ __attribute__((__always_inline__))
unsigned int api_invoke( unsigned int (*api_helper)( void ) )
{
unsigned int retval = api_helper();
- __mingw_output_format_flag = update_output_format_flag( retval );
+ __mingw_output_format_flags = update_output_format_flags( retval );
return retval;
}
diff --git a/mingwrt/mingwex/stdio/pformat.c b/mingwrt/mingwex/stdio/pformat.c
index 9543f99..11d0153 100644
--- a/mingwrt/mingwex/stdio/pformat.c
+++ b/mingwrt/mingwex/stdio/pformat.c
@@ -8,7 +8,7 @@
* to support Microsoft's non-standard format specifications.
*
* Written by Keith Marshall <kei...@us...>
- * Copyright (C) 2008, 2009, 2011, 2014-2016, MinGW.org Project
+ * Copyright (C) 2008, 2009, 2011, 2014-2017, MinGW.org Project
*
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -187,10 +187,10 @@
* 2) Emulation of _set_output_format(), through the use of inline
* functions defined in stdio.h, and supported regardless of the
* availability of the API within MSVCRT.DLL; this emulated API
- * maintains state in the global `__mingw_output_format_flag'
+ * maintains state in the global `__mingw_output_format_flags'
* variable, (which users should consider to be private).
*/
-extern unsigned int __mingw_output_format_flag;
+extern unsigned int __mingw_output_format_flags;
static __pformat_inline__
int __pformat_exponent_digits( void )
@@ -200,7 +200,7 @@ int __pformat_exponent_digits( void )
*/
char *exponent_digits = getenv( "PRINTF_EXPONENT_DIGITS" );
return ((exponent_digits != NULL) && ((unsigned)(*exponent_digits - '0') < 3))
- || (__mingw_output_format_flag & _TWO_DIGIT_EXPONENT)
+ || (__mingw_output_format_flags & _TWO_DIGIT_EXPONENT)
? 2 : 3 ;
}
#else
@@ -2199,7 +2199,7 @@ int __pformat_is_alt_ldouble_modifier( int length )
* to be treated as equivalent to 'L', as it is in MSVCRT.DLL's
* implementation of the printf() functions.
*/
- return (__mingw_output_format_flag & _MSVC_PRINTF_QUIRKS)
+ return (__mingw_output_format_flags & _MSVC_PRINTF_QUIRKS)
? (length == PFORMAT_LENGTH_LONG) : 0;
}
#else
-----------------------------------------------------------------------
Summary of changes:
mingwrt/ChangeLog | 20 ++++++++++++++++++++
mingwrt/include/string.h | 11 ++++++-----
mingwrt/mingwex/ofmt.c | 36 +++++++++++++++---------------------
mingwrt/mingwex/stdio/pformat.c | 10 +++++-----
4 files changed, 46 insertions(+), 31 deletions(-)
hooks/post-receive
--
Repository: mingw-org-wsl
|