On 2015-05-25 12:17, Erik Joelsson wrote:
Hello,

In Visual Studio 2013 SP4, MS decided to deprecate gethostbyname in favor of getaddrinfo(). We now have two different libraries using this function. In JDK-8077422 I added a workaround for libhprof. Now we also have the problem in libdt_socket. This time I've opted to add the preprocessor macro to the general CFLAGS for all jdk libraries in configure. I will create a followup bug for fixing the usage of deprecated functions.

Bug: https://bugs.openjdk.java.net/browse/JDK-8080983

Looks good to me.

/Magnus


Patch:
diff -r 9d388c0d9872 common/autoconf/flags.m4
--- a/common/autoconf/flags.m4
+++ b/common/autoconf/flags.m4
@@ -559,6 +559,7 @@
         -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
         -DWIN32_LEAN_AND_MEAN \
         -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
+       -D_WINSOCK_DEPRECATED_NO_WARNINGS \
         -DWIN32 -DIAL"
     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
diff -r 9d388c0d9872 common/autoconf/generated-configure.sh
--- a/common/autoconf/generated-configure.sh
+++ b/common/autoconf/generated-configure.sh
@@ -4366,7 +4366,7 @@
 #CUSTOM_AUTOCONF_INCLUDE

# Do not change or remove the following line, it is needed for consistency checks:


Also removing the old fix from JDK-8077422 as it is no longer needed:
diff -r 8f8d35d97f82 make/lib/Lib-jdk.hprof.agent.gmk
--- a/make/lib/Lib-jdk.hprof.agent.gmk
+++ b/make/lib/Lib-jdk.hprof.agent.gmk
@@ -49,7 +49,6 @@
     CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_WARNINGS_ARE_ERRORS) \
         $(BUILD_LIBHPROF_CFLAGS), \
     CFLAGS_debug := -DHPROF_LOGGING, \
-    CFLAGS_windows := -D_WINSOCK_DEPRECATED_NO_WARNINGS, \
     MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libhprof/mapfile-vers, \
     LDFLAGS := $(LDFLAGS_JDKLIB) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \

/Erik

Reply via email to