View | Details | Raw Unified | Return to bug 297228 | Differences between
and this patch

Collapse All | Expand All

(-)natives/unix/aix/Makefile (-8 / +7 lines)
Lines 1-28 Link Here
1
#**********************************************************************
1
#**********************************************************************
2
# Copyright (c) 2009 IBM Corporation and others.
2
# Copyright (c) 2009, 2010 IBM Corporation and others.
3
# All rights reserved. This program and the accompanying materials 
3
# All rights reserved. This program and the accompanying materials 
4
# are made available under the terms of the Eclipse Public License v1.0
4
# are made available under the terms of the Eclipse Public License v1.0
5
# which accompanies this distribution, and is available at
5
# which accompanies this distribution, and is available at
6
# http://www.eclipse.org/legal/epl-v10.html
6
# http://www.eclipse.org/legal/epl-v10.html
7
#********************************************************************** 
7
#********************************************************************** 
8
#
8
#
9
# makefile for liblocalfile.so
9
# makefile for libunixfile.so
10
10
11
CORE.C = ../localfile.c
11
CORE.C = ../unixfile.c
12
CORE.O = localfile.o
12
CORE.O = unixfile.o
13
LIB_NAME_FULL = liblocalfile_1_0_0.a
13
LIB_NAME_FULL = libunixfile_1_0_0.a
14
14
15
OS_TYPE=aix
15
OS_TYPE=aix
16
CC=xlC_r
16
CC=xlC_r
17
LD=ld
17
LD=ld
18
CFLAGS=-O -s -q32 -qwarn64
18
CFLAGS=-O -s -q32 -qwarn64
19
LDFLAGS=-b32 -G -s -bnoentry -bexpall -lc
19
LDFLAGS=-b32 -G -s -bnoentry -bexpall -lc
20
JAVA_HOME=
20
JAVA_HOME=/usr/java5/
21
JDK_INCLUDE=-I${JAVA_HOME}/include -I${JAVA_HOME}/include/${OS_TYPE}
21
JDK_INCLUDE=-I${JAVA_HOME}/include -I${JAVA_HOME}/include/${OS_TYPE}
22
COMMON_INCLUDE=-Iinclude
23
22
24
core :
23
core :
25
	$(CC) $(CFLAGS) $(JDK_INCLUDE) $(COMMON_INCLUDE) -c $(CORE.C) -o $(CORE.O)
24
	$(CC) $(CFLAGS) $(JDK_INCLUDE) -c $(CORE.C) -o $(CORE.O)
26
	$(LD) $(LDFLAGS) -o $(LIB_NAME_FULL) $(CORE.O)
25
	$(LD) $(LDFLAGS) -o $(LIB_NAME_FULL) $(CORE.O)
27
clean :
26
clean :
28
	rm -f *.o *.a
27
	rm -f *.o *.a
(-)natives/unix/aix/include/os_custom.h (-22 lines)
Removed Link Here
1
/***********************************************************************
2
* Copyright (c) 2009 IBM Corporation and others.
3
* All rights reserved. This program and the accompanying materials 
4
* are made available under the terms of the Eclipse Public License v1.0
5
* which accompanies this distribution, and is available at
6
* http://www.eclipse.org/legal/epl-v10.html
7
* 
8
* Contributors:
9
*     IBM Corporation - initial API and implementation
10
***********************************************************************/
11
12
/* Use this directive when introducing platform-specific code in localfile.c */
13
#ifndef AIX
14
#define AIX
15
#endif
16
17
/* Linux supports reading symbolic links */
18
#ifndef EFS_SYMLINK_SUPPORT
19
#define EFS_SYMLINK_SUPPORT
20
#endif
21
#include <limits.h>
22
#include <unistd.h>
(-)natives/unix/unixfile.c (-8 / +8 lines)
Lines 30-36 Link Here
30
 */
30
 */
31
jbyte* getByteArray(JNIEnv *env, jbyteArray target)
31
jbyte* getByteArray(JNIEnv *env, jbyteArray target)
32
{
32
{
33
	jsize len;
33
	unsigned int len;
34
	jbyte *temp, *result;
34
	jbyte *temp, *result;
35
35
36
	temp = (*env)->GetByteArrayElements(env, target, 0);
36
	temp = (*env)->GetByteArrayElements(env, target, 0);
Lines 158-170 Link Here
158
/*
158
/*
159
 * Class:     org_eclipse_core_internal_filesystem_local_unix_UnixFileNatives
159
 * Class:     org_eclipse_core_internal_filesystem_local_unix_UnixFileNatives
160
 * Method:    readlink
160
 * Method:    readlink
161
 * Signature: ([B[BJ)J
161
 * Signature: ([B[BJ)I
162
 */
162
 */
163
JNIEXPORT jlong JNICALL Java_org_eclipse_core_internal_filesystem_local_unix_UnixFileNatives_readlink
163
JNIEXPORT jint JNICALL Java_org_eclipse_core_internal_filesystem_local_unix_UnixFileNatives_readlink
164
    (JNIEnv *env, jclass clazz, jbyteArray path, jbyteArray buf, jlong bufsiz) {
164
    (JNIEnv *env, jclass clazz, jbyteArray path, jbyteArray buf, jlong bufsiz) {
165
	jint code;
165
	jint code;
166
 	char *name;
166
 	jbyte *name;
167
 	ssize_t len;
167
 	int len;
168
	char temp[PATH_MAX+1];
168
	char temp[PATH_MAX+1];
169
	jstring linkTarget = NULL;
169
	jstring linkTarget = NULL;
170
170
Lines 173-183 Link Here
173
  	free(name);
173
  	free(name);
174
	if (len > 0) {
174
	if (len > 0) {
175
		temp[len] = 0;
175
		temp[len] = 0;
176
		(*env)->SetByteArrayRegion(env, buf, 0, len, temp);
176
		(*env)->SetByteArrayRegion(env, buf, 0, len, (jbyte*) temp);
177
	}
177
	}
178
	else {
178
	else {
179
		temp[0] = 0;
179
		temp[0] = 0;
180
		(*env)->SetByteArrayRegion(env, buf, 0, 0, temp);
180
		(*env)->SetByteArrayRegion(env, buf, 0, 0, (jbyte*) temp);
181
	}
181
	}
182
	return len;
182
	return len;
183
}
183
}
Lines 254-260 Link Here
254
	char *flag;
254
	char *flag;
255
	jint ret = -1;
255
	jint ret = -1;
256
256
257
	flag = getByteArray(env, buf);
257
	flag = (char*) getByteArray(env, buf);
258
	if (strcmp(flag, "PATH_MAX") == 0)
258
	if (strcmp(flag, "PATH_MAX") == 0)
259
		ret = PATH_MAX;
259
		ret = PATH_MAX;
260
	else if (strcmp(flag, "S_IFMT") == 0)
260
	else if (strcmp(flag, "S_IFMT") == 0)
(-)natives/unix/unixfile.h (-2 / +2 lines)
Lines 71-79 Link Here
71
/*
71
/*
72
 * Class:     org_eclipse_core_internal_filesystem_local_unix_UnixFileNatives
72
 * Class:     org_eclipse_core_internal_filesystem_local_unix_UnixFileNatives
73
 * Method:    readlink
73
 * Method:    readlink
74
 * Signature: ([B[BJ)J
74
 * Signature: ([B[BJ)I
75
 */
75
 */
76
JNIEXPORT jlong JNICALL Java_org_eclipse_core_internal_filesystem_local_unix_UnixFileNatives_readlink
76
JNIEXPORT jint JNICALL Java_org_eclipse_core_internal_filesystem_local_unix_UnixFileNatives_readlink
77
  (JNIEnv *, jclass, jbyteArray, jbyteArray, jlong);
77
  (JNIEnv *, jclass, jbyteArray, jbyteArray, jlong);
78
78
79
/*
79
/*
(-)META-INF/MANIFEST.MF (-1 / +1 lines)
Lines 4-9 Link Here
4
Bundle-SymbolicName: org.eclipse.core.filesystem.aix.ppc;singleton:=true
4
Bundle-SymbolicName: org.eclipse.core.filesystem.aix.ppc;singleton:=true
5
Bundle-Version: 1.0.0.qualifier
5
Bundle-Version: 1.0.0.qualifier
6
Bundle-Vendor: %providerName
6
Bundle-Vendor: %providerName
7
Fragment-Host: org.eclipse.core.filesystem;bundle-version="[1.1.0,2.0.0)"
7
Fragment-Host: org.eclipse.core.filesystem;bundle-version="[1.3.0,2.0.0)"
8
Bundle-Localization: fragment
8
Bundle-Localization: fragment
9
Eclipse-PlatformFilter: (& (osgi.os=aix) (osgi.arch=ppc))
9
Eclipse-PlatformFilter: (& (osgi.os=aix) (osgi.arch=ppc))
(-)META-INF/MANIFEST.MF (-1 / +1 lines)
Lines 4-9 Link Here
4
Bundle-SymbolicName: org.eclipse.core.filesystem.aix.ppc64;singleton:=true
4
Bundle-SymbolicName: org.eclipse.core.filesystem.aix.ppc64;singleton:=true
5
Bundle-Version: 1.0.0.qualifier
5
Bundle-Version: 1.0.0.qualifier
6
Bundle-Vendor: %providerName
6
Bundle-Vendor: %providerName
7
Fragment-Host: org.eclipse.core.filesystem;bundle-version="[1.1.0,2.0.0)"
7
Fragment-Host: org.eclipse.core.filesystem;bundle-version="[1.3.0,2.0.0)"
8
Bundle-Localization: fragment
8
Bundle-Localization: fragment
9
Eclipse-PlatformFilter: (& (osgi.os=aix) (osgi.arch=ppc64))
9
Eclipse-PlatformFilter: (& (osgi.os=aix) (osgi.arch=ppc64))
(-)META-INF/MANIFEST.MF (-1 / +1 lines)
Lines 4-9 Link Here
4
Bundle-SymbolicName: org.eclipse.core.filesystem.linux.x86; singleton:=true
4
Bundle-SymbolicName: org.eclipse.core.filesystem.linux.x86; singleton:=true
5
Bundle-Version: 1.3.0.qualifier
5
Bundle-Version: 1.3.0.qualifier
6
Bundle-Vendor: %providerName
6
Bundle-Vendor: %providerName
7
Fragment-Host: org.eclipse.core.filesystem;bundle-version="[1.1.0,2.0.0)"
7
Fragment-Host: org.eclipse.core.filesystem;bundle-version="[1.3.0,2.0.0)"
8
Bundle-Localization: fragment
8
Bundle-Localization: fragment
9
Eclipse-PlatformFilter: (& (osgi.os=linux) (osgi.arch=x86))
9
Eclipse-PlatformFilter: (& (osgi.os=linux) (osgi.arch=x86))
(-)META-INF/MANIFEST.MF (-1 / +1 lines)
Lines 4-9 Link Here
4
Bundle-SymbolicName: org.eclipse.core.filesystem.linux.x86_64; singleton:=true
4
Bundle-SymbolicName: org.eclipse.core.filesystem.linux.x86_64; singleton:=true
5
Bundle-Version: 1.1.0.qualifier
5
Bundle-Version: 1.1.0.qualifier
6
Bundle-Vendor: %providerName
6
Bundle-Vendor: %providerName
7
Fragment-Host: org.eclipse.core.filesystem;bundle-version="[1.1.0,2.0.0)"
7
Fragment-Host: org.eclipse.core.filesystem;bundle-version="[1.3.0,2.0.0)"
8
Bundle-Localization: fragment
8
Bundle-Localization: fragment
9
Eclipse-PlatformFilter: (& (osgi.os=linux) (osgi.arch=x86_64))
9
Eclipse-PlatformFilter: (& (osgi.os=linux) (osgi.arch=x86_64))

Return to bug 297228