diff options
author | Rong-En Fan <rafan@FreeBSD.org> | 2007-08-11 15:26:43 +0000 |
---|---|---|
committer | Rong-En Fan <rafan@FreeBSD.org> | 2007-08-11 15:26:43 +0000 |
commit | 72897abddb1d32564e2be8b255098663677a6157 (patch) | |
tree | 70d1e6f49dcd7fd5612d912135746bf1469fc2d1 /x11-toolkits/swt-devel | |
parent | bf36b9b5396453b1ec41a65b256cdcd2c798e59e (diff) | |
download | ports-72897abddb1d32564e2be8b255098663677a6157.tar.gz ports-72897abddb1d32564e2be8b255098663677a6157.zip |
Notes
Diffstat (limited to 'x11-toolkits/swt-devel')
-rw-r--r-- | x11-toolkits/swt-devel/Makefile | 2 | ||||
-rw-r--r-- | x11-toolkits/swt-devel/files/extra-patch-amd64-os.c | 20 | ||||
-rw-r--r-- | x11-toolkits/swt-devel/files/extra-patch-i386-os.c (renamed from x11-toolkits/swt-devel/files/patch-os.c) | 5 |
3 files changed, 24 insertions, 3 deletions
diff --git a/x11-toolkits/swt-devel/Makefile b/x11-toolkits/swt-devel/Makefile index 99b4b0416181..2313fff4faf6 100644 --- a/x11-toolkits/swt-devel/Makefile +++ b/x11-toolkits/swt-devel/Makefile @@ -19,6 +19,8 @@ COMMENT= Standard Widget Toolkit for Java ONLY_FOR_ARCHS= i386 amd64 +EXTRA_PATCHES= ${PATCHDIR}/extra-patch-${ARCH}-os.c + SWT_VERSION= 3346 OUTPUT_JAR= swt-devel.jar diff --git a/x11-toolkits/swt-devel/files/extra-patch-amd64-os.c b/x11-toolkits/swt-devel/files/extra-patch-amd64-os.c new file mode 100644 index 000000000000..8b23b836383d --- /dev/null +++ b/x11-toolkits/swt-devel/files/extra-patch-amd64-os.c @@ -0,0 +1,20 @@ +--- os.c.orig 2007-06-25 16:06:14.000000000 -0400 ++++ os.c 2007-08-10 11:54:37.000000000 -0400 +@@ -17397,11 +17397,16 @@ + jlong 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 = (jlong)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; + } diff --git a/x11-toolkits/swt-devel/files/patch-os.c b/x11-toolkits/swt-devel/files/extra-patch-i386-os.c index c0f465f77808..f7c566df9a87 100644 --- a/x11-toolkits/swt-devel/files/patch-os.c +++ b/x11-toolkits/swt-devel/files/extra-patch-i386-os.c @@ -1,5 +1,5 @@ ---- ./os.c 2007-07-22 11:53:22.000000000 +0400 -+++ ./os.c 2007-07-22 11:57:56.000000000 +0400 +--- os.c.orig 2007-04-26 14:03:00.000000000 -0400 ++++ os.c 2007-08-10 11:56:22.000000000 -0400 @@ -17397,11 +17397,16 @@ jint rc = 0; OS_NATIVE_ENTER(env, that, realpath_FUNC); @@ -18,4 +18,3 @@ OS_NATIVE_EXIT(env, that, realpath_FUNC); return rc; } - |