summaryrefslogtreecommitdiff
path: root/sql/udf_example.c
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@mariadb.com>2018-02-07 20:17:38 +0000
committerVladislav Vaintroub <wlad@mariadb.com>2018-02-07 20:17:38 +0000
commit282b652028ca79baa5a43aa5356d779a688947a8 (patch)
tree66205f73da3a22532dc0defa6132778e258ded8e /sql/udf_example.c
parentd995dd2865b4dd5d01175594ed667cfe8ce41712 (diff)
downloadmariadb-git-282b652028ca79baa5a43aa5356d779a688947a8.tar.gz
Windows, compiling : reenable warning C4996 (deprecated functions)
But set _CRT_NONSTDC_NO_WARNINGS to silence silly warnings about ANSI C function being non-standard Remove now deprecated GetVersion()/GetVersionEx(),except single case where where it is really needed, in feedback plugin. Remove checks for Windows NT. Avoid old IPv4-only inet_aton, which generated the warning.
Diffstat (limited to 'sql/udf_example.c')
-rw-r--r--sql/udf_example.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sql/udf_example.c b/sql/udf_example.c
index cc9a703373c..afe3c5592bc 100644
--- a/sql/udf_example.c
+++ b/sql/udf_example.c
@@ -142,6 +142,10 @@ typedef long long longlong;
#ifdef _WIN32
/* inet_aton needs winsock library */
#pragma comment(lib, "ws2_32")
+#if _MSC_VER
+/* Silence warning about deprecated functions , gethostbyname etc*/
+#pragma warning(disable : 4996)
+#endif
#endif
#ifdef HAVE_DLOPEN