Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDoug Schaefer2007-04-25 15:20:08 -0400
committerDoug Schaefer2007-04-25 15:20:08 -0400
commit4be0fe893c51632ca2c1c31e538a54fa17856616 (patch)
tree2f7c9052b713b69e93ef2ed6f1662a1f1b04a23d /core/org.eclipse.cdt.core.win32/library
parentdd55dc2b5806df17de41e8cb75464dc1a021456f (diff)
downloadorg.eclipse.cdt-4be0fe893c51632ca2c1c31e538a54fa17856616.tar.gz
org.eclipse.cdt-4be0fe893c51632ca2c1c31e538a54fa17856616.tar.xz
org.eclipse.cdt-4be0fe893c51632ca2c1c31e538a54fa17856616.zip
Bug 183382 - Added JNICALL to the winreg native code to fix a crash that was happening on Vista with IBM's VM. Also moved this build to use MinGW instead of MSVC.
Diffstat (limited to 'core/org.eclipse.cdt.core.win32/library')
-rw-r--r--core/org.eclipse.cdt.core.win32/library/Makefile22
-rw-r--r--core/org.eclipse.cdt.core.win32/library/nmake.mak18
-rw-r--r--core/org.eclipse.cdt.core.win32/library/winreg.cpp4
3 files changed, 15 insertions, 29 deletions
diff --git a/core/org.eclipse.cdt.core.win32/library/Makefile b/core/org.eclipse.cdt.core.win32/library/Makefile
index 9f05e23b7c..c00aa7f93e 100644
--- a/core/org.eclipse.cdt.core.win32/library/Makefile
+++ b/core/org.eclipse.cdt.core.win32/library/Makefile
@@ -8,12 +8,13 @@ endif
OS = win32
ARCH = x86
-JDK_INCLUDES= $(JAVA_HOME)/include
-JDK_OS_INCLUDES= $(JAVA_HOME)/include/$(OS)
+JDK_INCLUDES= "$(JAVA_HOME)/include"
+JDK_OS_INCLUDES= "$(JAVA_HOME)/include/$(OS)"
CC=gcc
-CPPFLAGS = -I. -I$(JDK_INCLUDES) -I$(JDK_OS_INCLUDES)
-CFLAGS += -D_UNICODE -Dwchar_t=short
+CFLAGS = -DUNICODE -I$(JDK_INCLUDES) -I$(JDK_OS_INCLUDES)
+CXX=g++
+CXXFLAGS=$(CFLAGS)
INSTALL_DIR = ../os/$(OS)/$(ARCH)
@@ -21,15 +22,18 @@ LIB_NAME_SPAWNER = spawner.dll
LIB_NAME_FULL_SPAWNER = $(INSTALL_DIR)/spawner.dll
OBJS_SPAWNER=StdAfx.o Win32ProcessEx.o iostream.o raise.o spawner.o
-OBJS = $(OBJS_SPAWNER)
+WINREG = $(INSTALL_DIR)/winreg.dll
+OBJS_WINREG = winreg.o
-all: $(LIB_NAME_FULL_SPAWNER)
+all: $(LIB_NAME_FULL_SPAWNER) $(WINREG)
rebuild: clean all
$(LIB_NAME_FULL_SPAWNER) : $(OBJS_SPAWNER)
- mkdir -p $(INSTALL_DIR)
- $(CC) -Wl,--kill-at -g -shared -o $(LIB_NAME_FULL_SPAWNER) $(OBJS_SPAWNER)
+ $(CC) -Wl,--kill-at -shared -o $(LIB_NAME_FULL_SPAWNER) $(OBJS_SPAWNER)
clean :
- $(RM) $(OBJS_SPAWNER) $(LIB_NAME_FULL_SPAWNER)
+ $(RM) $(OBJS_SPAWNER) $(LIB_NAME_FULL_SPAWNER) $(OBJS_WINREG) $(WINREG)
+
+$(WINREG) : $(OBJS_WINREG)
+ $(CXX) -Wl,--kill-at -shared -o $(WINREG) $(OBJS_WINREG)
diff --git a/core/org.eclipse.cdt.core.win32/library/nmake.mak b/core/org.eclipse.cdt.core.win32/library/nmake.mak
deleted file mode 100644
index 16a16f9253..0000000000
--- a/core/org.eclipse.cdt.core.win32/library/nmake.mak
+++ /dev/null
@@ -1,18 +0,0 @@
-#*******************************************************************************
-# Copyright (c) 2005, 2006 QNX Software Systems
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# QNX Software Systems - initial API and implementation
-#*******************************************************************************
-TARGET = ..\os\win32\x86\winreg.dll
-
-OBJS = winreg.obj
-
-CPPFLAGS = /nologo /I C:\Java\jdk1.5.0_06\include /I C:\Java\jdk1.5.0_06\include\win32 /DUNICODE
-
-$(TARGET): $(OBJS)
- link /nologo /dll /out:$(TARGET) $(OBJS) advapi32.lib user32.lib
diff --git a/core/org.eclipse.cdt.core.win32/library/winreg.cpp b/core/org.eclipse.cdt.core.win32/library/winreg.cpp
index 2b06ad1296..81367b9e47 100644
--- a/core/org.eclipse.cdt.core.win32/library/winreg.cpp
+++ b/core/org.eclipse.cdt.core.win32/library/winreg.cpp
@@ -13,7 +13,7 @@
#include <string.h>
extern "C"
-JNIEXPORT jstring Java_org_eclipse_cdt_utils_WindowsRegistry_getLocalMachineValue(
+JNIEXPORT jstring JNICALL Java_org_eclipse_cdt_utils_WindowsRegistry_getLocalMachineValue(
JNIEnv * env, jobject obj, jstring subkey, jstring name)
{
const jchar * csubkey = env->GetStringChars(subkey, NULL);
@@ -46,7 +46,7 @@ JNIEXPORT jstring Java_org_eclipse_cdt_utils_WindowsRegistry_getLocalMachineValu
*/
extern "C"
-JNIEXPORT jstring Java_org_eclipse_cdt_utils_WindowsRegistry_getLocalMachineValueName(
+JNIEXPORT jstring JNICALL Java_org_eclipse_cdt_utils_WindowsRegistry_getLocalMachineValueName(
JNIEnv * env, jobject obj, jstring subkey, jint index)
{
const jchar * csubkey = env->GetStringChars(subkey, NULL);

Back to the top