diff options
author | Tom Tromey <tromey@redhat.com> | 2001-07-18 18:35:12 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2001-07-18 18:35:12 +0000 |
commit | e5c83273cf9b1b8d7f1a20ed0620be5a24758e7a (patch) | |
tree | 47cdcdcdda4fd32d5beb004c789ca56656ef89b3 /libjava/java | |
parent | fed3b7b43192f7168f083cef98e70555d8898f94 (diff) | |
download | gcc-e5c83273cf9b1b8d7f1a20ed0620be5a24758e7a.zip gcc-e5c83273cf9b1b8d7f1a20ed0620be5a24758e7a.tar.gz gcc-e5c83273cf9b1b8d7f1a20ed0620be5a24758e7a.tar.bz2 |
natFileWin32.cc (_access): Renamed.
* java/io/natFileWin32.cc (_access): Renamed.
(_stat): Likewise.
* java/io/natFile.cc (_access): Renamed.
(_stat): Likewise.
* java/io/File.java (access, stat): Add leading `_' to name.
Updated all callers.
From-SVN: r44124
Diffstat (limited to 'libjava/java')
-rw-r--r-- | libjava/java/io/File.java | 19 | ||||
-rw-r--r-- | libjava/java/io/natFile.cc | 4 | ||||
-rw-r--r-- | libjava/java/io/natFileWin32.cc | 4 |
3 files changed, 15 insertions, 12 deletions
diff --git a/libjava/java/io/File.java b/libjava/java/io/File.java index cfa7782..25b6fcd 100644 --- a/libjava/java/io/File.java +++ b/libjava/java/io/File.java @@ -29,13 +29,13 @@ public class File implements Serializable, Comparable public boolean canRead () { checkRead(); - return access (READ); + return _access (READ); } public boolean canWrite () { checkWrite(); - return access (WRITE); + return _access (WRITE); } private native boolean performCreate() throws IOException; @@ -71,7 +71,7 @@ public class File implements Serializable, Comparable public boolean exists () { checkRead(); - return access (EXISTS); + return _access (EXISTS); } public File (String p) @@ -209,20 +209,20 @@ public class File implements Serializable, Comparable public boolean isDirectory () { checkRead(); - return stat (DIRECTORY); + return _stat (DIRECTORY); } public boolean isFile () { checkRead(); - return stat (ISFILE); + return _stat (ISFILE); } /** @since 1.2 */ public boolean isHidden() { checkRead(); - return stat (ISHIDDEN); + return _stat (ISHIDDEN); } public long lastModified () @@ -566,8 +566,11 @@ public class File implements Serializable, Comparable private final static int LENGTH = 1; private final native long attr (int query); - private final native boolean access (int query); - private final native boolean stat (int query); + // On OSF1 V5.0, `stat' is a macro. It is easiest to use the name + // `_stat' instead. We do the same thing for `_access' just in + // case. + private final native boolean _access (int query); + private final native boolean _stat (int query); private static final long serialVersionUID = 301077366599181567L; } diff --git a/libjava/java/io/natFile.cc b/libjava/java/io/natFile.cc index 82674fc..418df10 100644 --- a/libjava/java/io/natFile.cc +++ b/libjava/java/io/natFile.cc @@ -37,7 +37,7 @@ details. */ #include <java/lang/System.h> jboolean -java::io::File::access (jint query) +java::io::File::_access (jint query) { char buf[MAXPATHLEN]; jsize total = JvGetStringUTFRegion (path, 0, path->length(), buf); @@ -59,7 +59,7 @@ java::io::File::access (jint query) } jboolean -java::io::File::stat (jint query) +java::io::File::_stat (jint query) { char buf[MAXPATHLEN]; jsize total = JvGetStringUTFRegion (path, 0, path->length(), buf); diff --git a/libjava/java/io/natFileWin32.cc b/libjava/java/io/natFileWin32.cc index eb1dc19..dae0b2b 100644 --- a/libjava/java/io/natFileWin32.cc +++ b/libjava/java/io/natFileWin32.cc @@ -25,7 +25,7 @@ details. */ #include <java/lang/System.h> jboolean -java::io::File::access (jint query) +java::io::File::_access (jint query) { char buf[MAX_PATH]; jsize total = JvGetStringUTFRegion (path, 0, path->length(), buf); @@ -46,7 +46,7 @@ java::io::File::access (jint query) } jboolean -java::io::File::stat (jint query) +java::io::File::_stat (jint query) { char buf[MAX_PATH]; jsize total = JvGetStringUTFRegion (path, 0, path->length(), buf); |