From: Matthew Fernandez Date: Thu, 11 Feb 2021 15:34:43 +0000 (-0800) Subject: remove recapitulated prototypes of strcasecmp X-Git-Tag: 2.47.0~72^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a115a5ddb0d2f772b804d640e5416a0b29050df1;p=graphviz remove recapitulated prototypes of strcasecmp These actually cause warnings in CMake Windows builds: …\lib\cgraph/strcasecmp.h(15,47): warning C4273: '_stricmp': inconsistent dll linkage […\graphviz\build\plugin\gd\gvplugin_gd.vcxproj] C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\string.h(193,22): message : see previous definition of '_stricmp' […\build\plugin\gd\gvplugin_gd.vcxproj] and MSBuild Windows builds: …\lib\cgraph\strcasecmp.h(23,64): warning C4211: nonstandard extension used: redefined extern to static […\graphviz\lib\cgraph\cgraph.vcxproj] …\lib\cgraph\strcasecmp.h(27,75): warning C4211: nonstandard extension used: redefined extern to static […\lib\cgraph\cgraph.vcxproj] and Cygwin MinGW builds: …/lib/cgraph/strcasecmp.h:15:5: warning: '_stricmp' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 15 | int strcasecmp(const char *s1, const char *s2); | ^~~~~~~~~~ …/lib/cgraph/strcasecmp.h:16:5: warning: '_strnicmp' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 16 | int strncasecmp(const char *s1, const char *s2, size_t n); | ^~~~~~~~~~~ Related to #1940. --- diff --git a/lib/cgraph/strcasecmp.h b/lib/cgraph/strcasecmp.h index e2ec198c9..78654feb7 100644 --- a/lib/cgraph/strcasecmp.h +++ b/lib/cgraph/strcasecmp.h @@ -4,17 +4,6 @@ #include -/* Re-prototype the functions we are abstracting. The purpose of this is to - * cause a compiler warning if our implementations diverge. Windows compilation - * will see these and the inline functions below, and warn if they do not match. - * Compilation on other platforms will see these and the strings.h prototypes, - * and warn if they do not match. This way we have a safeguard that the - * alternatives provided for Windows match the libc functions on other - * platforms. - */ -int strcasecmp(const char *s1, const char *s2); -int strncasecmp(const char *s1, const char *s2, size_t n); - #ifdef _MSC_VER /* redirect these to the Windows alternatives */