mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 06:14:49 +02:00
8056039: Hotspot does not compile with clang 3.4 on Linux
Reviewed-by: brutisso, sla
This commit is contained in:
parent
b9d46eee2c
commit
a2d9ba3fd6
7 changed files with 7 additions and 45 deletions
|
@ -4002,10 +4002,6 @@ bool os::check_heap(bool force) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// int local_vsnprintf(char* buf, size_t count, const char* format, va_list args) {
|
|
||||||
// return ::vsnprintf(buf, count, format, args);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// Is a (classpath) directory empty?
|
// Is a (classpath) directory empty?
|
||||||
bool os::dir_is_empty(const char* path) {
|
bool os::dir_is_empty(const char* path) {
|
||||||
DIR *dir = NULL;
|
DIR *dir = NULL;
|
||||||
|
|
|
@ -3797,11 +3797,6 @@ bool os::check_heap(bool force) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
ATTRIBUTE_PRINTF(3, 0)
|
|
||||||
int local_vsnprintf(char* buf, size_t count, const char* format, va_list args) {
|
|
||||||
return ::vsnprintf(buf, count, format, args);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Is a (classpath) directory empty?
|
// Is a (classpath) directory empty?
|
||||||
bool os::dir_is_empty(const char* path) {
|
bool os::dir_is_empty(const char* path) {
|
||||||
DIR *dir = NULL;
|
DIR *dir = NULL;
|
||||||
|
|
|
@ -5007,10 +5007,6 @@ bool os::check_heap(bool force) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
int local_vsnprintf(char* buf, size_t count, const char* format, va_list args) {
|
|
||||||
return ::vsnprintf(buf, count, format, args);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Is a (classpath) directory empty?
|
// Is a (classpath) directory empty?
|
||||||
bool os::dir_is_empty(const char* path) {
|
bool os::dir_is_empty(const char* path) {
|
||||||
DIR *dir = NULL;
|
DIR *dir = NULL;
|
||||||
|
|
|
@ -4729,27 +4729,6 @@ void os::make_polling_page_readable(void) {
|
||||||
|
|
||||||
bool os::check_heap(bool force) { return true; }
|
bool os::check_heap(bool force) { return true; }
|
||||||
|
|
||||||
typedef int (*vsnprintf_t)(char* buf, size_t count, const char* fmt, va_list argptr);
|
|
||||||
static vsnprintf_t sol_vsnprintf = NULL;
|
|
||||||
|
|
||||||
int local_vsnprintf(char* buf, size_t count, const char* fmt, va_list argptr) {
|
|
||||||
if (!sol_vsnprintf) {
|
|
||||||
//search for the named symbol in the objects that were loaded after libjvm
|
|
||||||
void* where = RTLD_NEXT;
|
|
||||||
if ((sol_vsnprintf = CAST_TO_FN_PTR(vsnprintf_t, dlsym(where, "__vsnprintf"))) == NULL)
|
|
||||||
sol_vsnprintf = CAST_TO_FN_PTR(vsnprintf_t, dlsym(where, "vsnprintf"));
|
|
||||||
if (!sol_vsnprintf){
|
|
||||||
//search for the named symbol in the objects that were loaded before libjvm
|
|
||||||
where = RTLD_DEFAULT;
|
|
||||||
if ((sol_vsnprintf = CAST_TO_FN_PTR(vsnprintf_t, dlsym(where, "__vsnprintf"))) == NULL)
|
|
||||||
sol_vsnprintf = CAST_TO_FN_PTR(vsnprintf_t, dlsym(where, "vsnprintf"));
|
|
||||||
assert(sol_vsnprintf != NULL, "vsnprintf not found");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return (*sol_vsnprintf)(buf, count, fmt, argptr);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Is a (classpath) directory empty?
|
// Is a (classpath) directory empty?
|
||||||
bool os::dir_is_empty(const char* path) {
|
bool os::dir_is_empty(const char* path) {
|
||||||
DIR *dir = NULL;
|
DIR *dir = NULL;
|
||||||
|
|
|
@ -66,6 +66,9 @@
|
||||||
#ifndef ATTRIBUTE_PRINTF
|
#ifndef ATTRIBUTE_PRINTF
|
||||||
#define ATTRIBUTE_PRINTF(fmt, vargs)
|
#define ATTRIBUTE_PRINTF(fmt, vargs)
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef ATTRIBUTE_SCANF
|
||||||
|
#define ATTRIBUTE_SCANF(fmt, vargs)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#include "utilities/macros.hpp"
|
#include "utilities/macros.hpp"
|
||||||
|
|
|
@ -271,15 +271,16 @@ inline int wcslen(const jchar* x) { return wcslen((const wchar_t*)x); }
|
||||||
#define PRAGMA_IMPLEMENTATION #pragma implementation
|
#define PRAGMA_IMPLEMENTATION #pragma implementation
|
||||||
#define VALUE_OBJ_CLASS_SPEC
|
#define VALUE_OBJ_CLASS_SPEC
|
||||||
|
|
||||||
#ifndef ATTRIBUTE_PRINTF
|
|
||||||
// Diagnostic pragmas like the ones defined below in PRAGMA_FORMAT_NONLITERAL_IGNORED
|
// Diagnostic pragmas like the ones defined below in PRAGMA_FORMAT_NONLITERAL_IGNORED
|
||||||
// were only introduced in GCC 4.2. Because we have no other possibility to ignore
|
// were only introduced in GCC 4.2. Because we have no other possibility to ignore
|
||||||
// these warnings for older versions of GCC, we simply don't decorate our printf-style
|
// these warnings for older versions of GCC, we simply don't decorate our printf-style
|
||||||
// functions with __attribute__(format) in that case.
|
// functions with __attribute__(format) in that case.
|
||||||
#if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2)) || (__GNUC__ > 4)
|
#if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2)) || (__GNUC__ > 4)
|
||||||
|
#ifndef ATTRIBUTE_PRINTF
|
||||||
#define ATTRIBUTE_PRINTF(fmt,vargs) __attribute__((format(printf, fmt, vargs)))
|
#define ATTRIBUTE_PRINTF(fmt,vargs) __attribute__((format(printf, fmt, vargs)))
|
||||||
#else
|
#endif
|
||||||
#define ATTRIBUTE_PRINTF(fmt,vargs)
|
#ifndef ATTRIBUTE_SCANF
|
||||||
|
#define ATTRIBUTE_SCANF(fmt,vargs) __attribute__((format(scanf, fmt, vargs)))
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -265,14 +265,6 @@ inline int g_isfinite(jdouble f) { return finite(f); }
|
||||||
|
|
||||||
inline int wcslen(const jchar* x) { return wcslen((const wchar_t*)x); }
|
inline int wcslen(const jchar* x) { return wcslen((const wchar_t*)x); }
|
||||||
|
|
||||||
|
|
||||||
// Misc
|
|
||||||
// NOTE: This one leads to an infinite recursion on Linux
|
|
||||||
#ifndef LINUX
|
|
||||||
int local_vsnprintf(char* buf, size_t count, const char* fmt, va_list argptr);
|
|
||||||
#define vsnprintf local_vsnprintf
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Portability macros
|
// Portability macros
|
||||||
#define PRAGMA_INTERFACE
|
#define PRAGMA_INTERFACE
|
||||||
#define PRAGMA_IMPLEMENTATION
|
#define PRAGMA_IMPLEMENTATION
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue