diff --git a/src/hotspot/share/runtime/os.cpp b/src/hotspot/share/runtime/os.cpp index 595aa00b6dd..997bf3a968f 100644 --- a/src/hotspot/share/runtime/os.cpp +++ b/src/hotspot/share/runtime/os.cpp @@ -162,7 +162,7 @@ char* os::iso8601_time(jlong milliseconds_since_19700101, char* buffer, size_t b // No offset when dealing with UTC time_t UTC_to_local = 0; if (!utc) { -#if defined(_ALLBSD_SOURCE) || defined(_GNU_SOURCE) +#if (defined(_ALLBSD_SOURCE) || defined(_GNU_SOURCE)) && !defined(AIX) UTC_to_local = -(time_struct.tm_gmtoff); #elif defined(_WINDOWS) long zone; @@ -878,8 +878,8 @@ bool os::print_function_and_library_name(outputStream* st, // this as a function descriptor for the reader (see below). if (!have_function_name && os::is_readable_pointer(addr)) { address addr2 = (address)os::resolve_function_descriptor(addr); - if (have_function_name = is_function_descriptor = - dll_address_to_function_name(addr2, p, buflen, &offset, demangle)) { + if ((have_function_name = is_function_descriptor = + dll_address_to_function_name(addr2, p, buflen, &offset, demangle))) { addr = addr2; } } diff --git a/src/hotspot/share/utilities/globalDefinitions_xlc.hpp b/src/hotspot/share/utilities/globalDefinitions_xlc.hpp index edeb730132b..0064e15c04f 100644 --- a/src/hotspot/share/utilities/globalDefinitions_xlc.hpp +++ b/src/hotspot/share/utilities/globalDefinitions_xlc.hpp @@ -32,12 +32,22 @@ // globally used constants & types, class (forward) // declarations and a few frequently used utility functions. +#include #include #include #include #include #include #include +// In stdlib.h on AIX malloc is defined as a macro causing +// compiler errors when resolving them in different depths as it +// happens in the log tags. This avoids the macro. +#if (defined(__VEC__) || defined(__AIXVEC)) && defined(AIX) \ + && defined(__open_xl_version__) && __open_xl_version__ >= 17 + #undef malloc + extern void *malloc(size_t) asm("vec_malloc"); +#endif + #include #include