From 4840f4a01946507f1f0e8003caac0bc77f3d9d36 Mon Sep 17 00:00:00 2001 From: Alexey Pelykh Date: Tue, 29 Jan 2013 14:21:02 +0200 Subject: [PATCH] Fixes to WP8/WinRT support --- classpath/java-io.cpp | 3 ++- makefile | 4 +--- src/bootimage.cpp | 14 ++++---------- src/windows.cpp | 4 ++-- 4 files changed, 9 insertions(+), 16 deletions(-) diff --git a/classpath/java-io.cpp b/classpath/java-io.cpp index c12ee64368..3860e67ecd 100644 --- a/classpath/java-io.cpp +++ b/classpath/java-io.cpp @@ -547,7 +547,8 @@ Java_java_io_File_lastModified(JNIEnv* e, jclass, jstring path) string_t chars = getChars(e, path); if (chars) { #ifdef PLATFORM_WINDOWS - # error "Implementation of last modified :)" + # pragma message("Implementation of last modified") + return 0; #else struct stat st; if (stat(chars, &st)) { diff --git a/makefile b/makefile index d15ac115a5..8106406a22 100755 --- a/makefile +++ b/makefile @@ -618,7 +618,7 @@ ifeq ($(platform),wp8) # Environment variable WP8_SDK not found. It should be something like # "C:\Program Files[ (x86)]\Microsoft Visual Studio 11.0\VC\WPSDK\WP80" # TODO: Lookup in SOFTWARE\Microsoft\Microsoft SDKs\WindowsPhone\v8.0 - WP80_SDK = C:\$(programFiles)\Microsoft Visual Studio 11.0\VC\WPSDK\WP80 + WP80_SDK = $(MSVS_ROOT)\VC\WPSDK\WP80 endif ifeq ($(WP80_KIT),) # Environment variable WP8_KIT not found. It should be something like @@ -670,8 +670,6 @@ ifeq ($(platform),wp8) asm-output = -o $(1) asm-input = $(1) machine_type = ARM - bootimage-symbols = binary_bootimage_bin_start:binary_bootimage_bin_end - codeimage-symbols = binary_codeimage_bin_start:binary_codeimage_bin_end endif ifeq ($(arch),i386) wp8_arch = diff --git a/src/bootimage.cpp b/src/bootimage.cpp index ec04196ca0..5b725f5058 100644 --- a/src/bootimage.cpp +++ b/src/bootimage.cpp @@ -1917,26 +1917,20 @@ public: exit(1); } -# if AVIAN_TARGET_FORMAT != AVIAN_FORMAT_PE -# define SYMBOL_PREFIX "_" -# else -# define SYMBOL_PREFIX -# endif - if(!bootimageStart) { - bootimageStart = strdup(SYMBOL_PREFIX"binary_bootimage_bin_start"); + bootimageStart = strdup("_binary_bootimage_bin_start"); } if(!bootimageEnd) { - bootimageEnd = strdup(SYMBOL_PREFIX"binary_bootimage_bin_end"); + bootimageEnd = strdup("_binary_bootimage_bin_end"); } if(!codeimageStart) { - codeimageStart = strdup(SYMBOL_PREFIX"binary_codeimage_bin_start"); + codeimageStart = strdup("_binary_codeimage_bin_start"); } if(!codeimageEnd) { - codeimageEnd = strdup(SYMBOL_PREFIX"binary_codeimage_bin_end"); + codeimageEnd = strdup("_binary_codeimage_bin_end"); } } diff --git a/src/windows.cpp b/src/windows.cpp index 8c7512eab1..d0b5228368 100644 --- a/src/windows.cpp +++ b/src/windows.cpp @@ -34,10 +34,10 @@ WaitForSingleObjectEx((hHandle), (dwMilliseconds), FALSE) #define CreateEvent(lpEventAttributes, bManualReset, bInitialState, lpName) \ - CreateEventEx((lpEventAttributes), (lpName), ((bManualReset)?CREATE_EVENT_MANUAL_RESET:0)|((bInitialState)?CREATE_EVENT_INITIAL_SET:0), EVENT_MODIFY_STATE) + CreateEventEx((lpEventAttributes), (lpName), ((bManualReset)?CREATE_EVENT_MANUAL_RESET:0)|((bInitialState)?CREATE_EVENT_INITIAL_SET:0), EVENT_ALL_ACCESS) #define CreateMutex(lpEventAttributes, bInitialOwner, lpName) \ - CreateMutexEx((lpEventAttributes), (lpName), (bInitialOwner)?CREATE_MUTEX_INITIAL_OWNER:0, MUTEX_MODIFY_STATE) + CreateMutexEx((lpEventAttributes), (lpName), (bInitialOwner)?CREATE_MUTEX_INITIAL_OWNER:0, MUTEX_ALL_ACCESS) #include "thread-emulation.h"