summaryrefslogtreecommitdiff
path: root/java/eclipse-devel/files/post-patch-plugins-swt-gtk-library-os.c
diff options
context:
space:
mode:
authorGreg Lewis <glewis@FreeBSD.org>2007-10-13 03:28:18 +0000
committerGreg Lewis <glewis@FreeBSD.org>2007-10-13 03:28:18 +0000
commit28a3f566fca055cd6c99ab2f6cd7390324c1814d (patch)
tree108450e1e2832da70f3e9cccbd427c8f60674457 /java/eclipse-devel/files/post-patch-plugins-swt-gtk-library-os.c
parentUpgrade to 0.39. (diff)
. Enlist eclipse-devel to get some wider spread of the Eclipse 3.3 port
before it replaces Eclipse 3.2. The submitters (listed in alphabetical order) collaborated on this. Submitted by: Mike Bowie <mbowie@buzmo.com> Dan Rucci <dan@rucci.org> Ken Yamada <ken@tydfam.jp>
Notes
Notes: svn path=/head/; revision=201381
Diffstat (limited to '')
-rw-r--r--java/eclipse-devel/files/post-patch-plugins-swt-gtk-library-os.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/java/eclipse-devel/files/post-patch-plugins-swt-gtk-library-os.c b/java/eclipse-devel/files/post-patch-plugins-swt-gtk-library-os.c
new file mode 100644
index 000000000000..a9841275e672
--- /dev/null
+++ b/java/eclipse-devel/files/post-patch-plugins-swt-gtk-library-os.c
@@ -0,0 +1,20 @@
+--- plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c.orig 2007-06-26 04:57:29.000000000 +0900
++++ plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c 2007-09-16 16:44:43.000000000 +0900
+@@ -17397,11 +17397,16 @@
+ jint rc = 0;
+ OS_NATIVE_ENTER(env, that, realpath_FUNC);
+ if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
+- if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
++ if (arg1) {
++ if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
++ } else
++ lparg1 = malloc(PATH_MAX);
+ rc = (jint)realpath((const char *)lparg0, (char *)lparg1);
+ fail:
+ if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
+ if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
++ if (!arg1 && lparg1 && rc == 0)
++ free(lparg1);
+ OS_NATIVE_EXIT(env, that, realpath_FUNC);
+ return rc;
+ }