cURL / Mailing Lists / curl-library / Single Mail

curl-library

[Patch] docs/examples/htmltitle.cpp

From: Gisle Vanem <gvanem_at_yahoo.no>
Date: Sat, 6 Feb 2016 11:29:06 +0100

Unless this example is compiled with '-D_CRT_NONSTDC_NO_WARNINGS',
MSVC will warn on:

  htmltitle.cpp(153): warning C4996: 'stricmp': The POSIX name for this item is deprecated.
  Instead, use the ISO C and C++ conformant name: _stricmp. See online help for details.
  htmltitle.cpp(170): warning C4996: 'stricmp': The POSIX name for this item is deprecated.
  Instead, use the ISO C and C++ conformant name: _stricmp. See online help for details.

So IMHO it's better to use _stricmp():

--- a/htmltitle.cpp 2016-02-05 07:58:11
+++ b/htmltitle.cpp 2016-02-06 11:27:15
@@ -42,7 +42,7 @@
 //

 #ifdef _MSC_VER
-#define COMPARE(a, b) (!stricmp((a), (b)))
+#define COMPARE(a, b) (!_stricmp((a), (b)))
 #else
 #define COMPARE(a, b) (!strcasecmp((a), (b)))
 #endif

-- 
--gv
-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:  https://curl.haxx.se/mail/etiquette.html
Received on 2016-02-06