From f40475404235a392b16bb7db048fc18c56af3604 Mon Sep 17 00:00:00 2001 From: Bryce McKinlay Date: Sun, 1 Apr 2001 11:16:40 +0000 Subject: 1.3-Compliant Implementation of java.io.File. * java/lang/natSystem.cc (init_properties): Get "file.separator", "path.separator", and "java.io.tmpdir" from the File class, instead of setting them explicitly. * java/io/File.java: Do not canonicalize paths for security manager checks. Call init_native() from static initializer. Do not pass path argument to native methods. New native method declarations. Some security manager checks moved to checkWrite(). (equals): Check file system case sensitivity and act appropriatly. (hashCode): Likewise. (isHidden): New method implemented. (performList): Changed prototype. Now takes a class argument specifying the class of the returned array: Strings or File objects. Also added FileFilter argument. (listFiles): New variants with "File" return type implemented. (createTempFile): Use createNewFile(). Use maxPathLen. (setReadOnly): New method implemented. (listRoots): Likewise. (compareTo): Likewise. (setLastModified): Likewise. (checkWrite): New method. (setPath): Removed. * java/io/natFile.cc: Various functions no longer take canonical path argument. (stat): Handle ISHIDDEN query. (isAbsolute): Remove WIN32 cruft. (performList): New arguments. Handle returning either File[] or String[] arrays. Check with FileFilter or FilenameFilter arguments as appropriate. Use an ArrayList, not a Vector, for the temporary list. (performSetReadOnly): New method implemented. (performListRoots): Likewise. (performSetLastModified): Likewise. (performCreate): Likewise. (init_native): New initialization function. * java/io/natFileWin32.cc: Various functions no longer take canonical path argument. (stat): Add FIXME about ISHIDDEN query. (performList): New arguments. Handle returning either File[] or String[] arrays. Check with FileFilter or FilenameFilter arguments as appropriate. Use an ArrayList, not a Vector, for the temporary list. (performSetReadOnly): New. Stubbed. (performListRoots): Likewise. (performSetLastModified): Likewise. (performCreate): Likewise. (init_native) New initialization function. * configure.in: Check for utime() and chmod(). * configure: Rebuilt. * include/config.h.in: Rebuilt. Resolves PR libgcj/1759. From-SVN: r40985 --- libjava/include/config.h.in | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'libjava/include/config.h.in') diff --git a/libjava/include/config.h.in b/libjava/include/config.h.in index a31dcea..b4cdf24 100644 --- a/libjava/include/config.h.in +++ b/libjava/include/config.h.in @@ -135,9 +135,6 @@ getenv("GCJ_PROPERTIES"). */ #undef DISABLE_GETENV_PROPERTIES -/* Define if using setjmp/longjmp exceptions. */ -#undef SJLJ_EXCEPTIONS - /* Define if you have /proc/self/exe */ #undef HAVE_PROC_SELF_EXE @@ -167,6 +164,9 @@ /* Define if you have the backtrace function. */ #undef HAVE_BACKTRACE +/* Define if you have the chmod function. */ +#undef HAVE_CHMOD + /* Define if you have the execvp function. */ #undef HAVE_EXECVP @@ -287,6 +287,9 @@ /* Define if you have the unlink function. */ #undef HAVE_UNLINK +/* Define if you have the utime function. */ +#undef HAVE_UTIME + /* Define if you have the header file. */ #undef HAVE_ARPA_INET_H @@ -359,6 +362,9 @@ /* Version number of package */ #undef VERSION +/* Define if the compiler is configured for setjmp/longjmp exceptions. */ +#undef SJLJ_EXCEPTIONS + /* Required define if using POSIX threads */ #undef _REENTRANT -- cgit v1.1