summaryrefslogtreecommitdiff
path: root/libjava/java/io/natFilePosix.cc
diff options
context:
space:
mode:
authorandreast <andreast@138bc75d-0d04-0410-961f-82ee72b054a4>2006-08-01 20:59:24 +0000
committerandreast <andreast@138bc75d-0d04-0410-961f-82ee72b054a4>2006-08-01 20:59:24 +0000
commit4787bb169228b1388f7c1cc2f65addffe9e3c647 (patch)
tree6cff204b32d7948ab8b445aab320aab3819ec115 /libjava/java/io/natFilePosix.cc
parent175c55c0e7749087da85bf6831293407a4d0cba9 (diff)
downloadgcc-4787bb169228b1388f7c1cc2f65addffe9e3c647.tar.gz
2006-08-01 Andreas Tobler <a.tobler@schweiz.ch>
* gnu/classpath/natSystemProperties.cc: Add additional check for getpwuid_r on _POSIX_PTHREAD_SEMANTICS. (SystemProperties::insertSystemProperties): Likewise. * java/io/natFilePosix.cc (File::performList): Add additional check for readdir_r on _POSIX_PTHREAD_SEMANTICS. * java/util/natVMTimeZone.cc (VMTimeZone::getSystemTimeZoneId): Add additional check for localtime_r on _POSIX_PTHREAD_SEMANTICS. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@115864 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java/io/natFilePosix.cc')
-rw-r--r--libjava/java/io/natFilePosix.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/libjava/java/io/natFilePosix.cc b/libjava/java/io/natFilePosix.cc
index ff634b0c2d4..c9bf858f187 100644
--- a/libjava/java/io/natFilePosix.cc
+++ b/libjava/java/io/natFilePosix.cc
@@ -1,6 +1,7 @@
// natFile.cc - Native part of File class for POSIX.
-/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation
+/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2006
+ Free Software Foundation
This file is part of libgcj.
@@ -288,7 +289,7 @@ java::io::File::performList (java::io::FilenameFilter *filter,
java::util::ArrayList *list = new java::util::ArrayList ();
struct dirent *d;
-#ifdef HAVE_READDIR_R
+#if defined(HAVE_READDIR_R) && defined(_POSIX_PTHREAD_SEMANTICS)
int name_max = pathconf (buf, _PC_NAME_MAX);
char dbuf[sizeof (struct dirent) + name_max + 1];
while (readdir_r (dir, (struct dirent *) dbuf, &d) == 0 && d != NULL)