|
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
|