From: Keith Marshall Date: Tue, 7 Feb 2017 11:20:05 +0000 (+0000) Subject: Ensure selective inclusion of the correct X-Git-Tag: wsl-5.0-release~10 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=8dbfc3da207efa274b88d4540f8be78fbda59254;p=mingw%2Fmingw-org-wsl.git Ensure selective inclusion of the correct --- 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 + + Ensure selective inclusion of the correct + + * 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 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 , where * we declare their POSIX strcasecmp() and strncasecmp() equivalents; * get the requisite prototypes by selective 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 +#include "strings.h" #endif # ifdef __MSVCRT__