# HG changeset patch # User Christian Wirth # Date 1432897152 -7200 # Node ID 59c3f921e4547042738a86706cd475c9195557f7 # Parent 9bb04af5849034887e5f305d97ad6a5431c00942 fixes for windows build (size_t conversion, missing precompiled.hpp, missing strtof, strtoll in Windows SDK) diff -r 9bb04af58490 -r 59c3f921e454 src/share/vm/jvmci/jvmciHashtable.cpp --- a/src/share/vm/jvmci/jvmciHashtable.cpp Fri May 29 11:35:20 2015 +0200 +++ b/src/share/vm/jvmci/jvmciHashtable.cpp Fri May 29 12:59:12 2015 +0200 @@ -21,6 +21,7 @@ * questions. */ +#include "precompiled.hpp" #include "jvmci/jvmciHashtable.hpp" template bool JVMCIHashtable::add(V value, bool replace) { @@ -54,7 +55,7 @@ template void JVMCIHashtable::for_each(ValueClosure* closure) { for (size_t i = 0; i < table_size(); ++i) { - for (JVMCIHashtableEntry* e = bucket(i); e != NULL && !closure->is_aborted(); e = e->next()) { + for (JVMCIHashtableEntry* e = bucket((int)i); e != NULL && !closure->is_aborted(); e = e->next()) { closure->do_value(e->literal_addr()); } } @@ -62,7 +63,7 @@ template JVMCIHashtable::~JVMCIHashtable() { for (size_t i = 0; i < table_size(); ++i) { - JVMCIHashtableEntry* e = bucket(i); + JVMCIHashtableEntry* e = bucket((int)i); while (e != NULL) { JVMCIHashtableEntry* current = e; e = e->next(); diff -r 9bb04af58490 -r 59c3f921e454 src/share/vm/jvmci/jvmciHashtable.hpp --- a/src/share/vm/jvmci/jvmciHashtable.hpp Fri May 29 11:35:20 2015 +0200 +++ b/src/share/vm/jvmci/jvmciHashtable.hpp Fri May 29 12:59:12 2015 +0200 @@ -79,7 +79,7 @@ unsigned int _number_of_entries; public: - JVMCIHashtable(size_t size) : _table_size(size), _number_of_entries(0) { + JVMCIHashtable(size_t size) : _table_size((int)size), _number_of_entries(0) { _buckets = NEW_C_HEAP_ARRAY(JVMCIHashtableEntry*, table_size(), mtCompiler); for (size_t i = 0; i < table_size(); ++i) { _buckets[i] = NULL; diff -r 9bb04af58490 -r 59c3f921e454 src/share/vm/jvmci/jvmciOptions.hpp --- a/src/share/vm/jvmci/jvmciOptions.hpp Fri May 29 11:35:20 2015 +0200 +++ b/src/share/vm/jvmci/jvmciOptions.hpp Fri May 29 12:59:12 2015 +0200 @@ -58,7 +58,7 @@ class OptionsTable : public JVMCIHashtable { protected: - unsigned int compute_hash(const char* key) { return compute_string_hash(key, strlen(key)); } + unsigned int compute_hash(const char* key) { return compute_string_hash(key, (int)strlen(key)); } bool key_equals(const char* k1, const char* k2) { return strcmp(k1, k2) == 0; } const char* get_key(OptionDesc value) { return value.name; } ; const char* get_key(OptionDesc* value) { return value->name; } ; @@ -87,7 +87,7 @@ class OptionsValueTable : public JVMCIHashtable { OptionsTable* _table; protected: - unsigned int compute_hash(const char* key) { return compute_string_hash(key, strlen(key)); } + unsigned int compute_hash(const char* key) { return compute_string_hash(key, (int)strlen(key)); } bool key_equals(const char* k1, const char* k2) { return strcmp(k1, k2) == 0; } const char* get_key(OptionValue value) { return value.desc.name; } ; const char* get_key(OptionValue* value) { return value->desc.name; } ; diff -r 9bb04af58490 -r 59c3f921e454 src/share/vm/jvmci/jvmciRuntime.cpp --- a/src/share/vm/jvmci/jvmciRuntime.cpp Fri May 29 11:35:20 2015 +0200 +++ b/src/share/vm/jvmci/jvmciRuntime.cpp Fri May 29 12:59:12 2015 +0200 @@ -39,7 +39,11 @@ #include "utilities/debug.hpp" #include "utilities/defaultStream.hpp" - jobject JVMCIRuntime::_HotSpotJVMCIRuntime_instance = NULL; +#if defined(_MSC_VER) +#define strtoll _strtoi64 +#endif + +jobject JVMCIRuntime::_HotSpotJVMCIRuntime_instance = NULL; bool JVMCIRuntime::_HotSpotJVMCIRuntime_initialized = false; bool JVMCIRuntime::_shutdown_called = false; @@ -854,7 +858,7 @@ break; } case _float: { - optionValue.float_value = ::strtof(value, &check); + optionValue.float_value = (float)::strtod(value, &check); //strtof not available in Windows SDK yet if (*check != '\0' || errno == ERANGE) { jio_fprintf(defaultStream::error_stream(), "Expected float value for VM option '%s'\n", name); return false;