summaryrefslogtreecommitdiff
path: root/libjava
diff options
context:
space:
mode:
authorkristerw <kristerw@138bc75d-0d04-0410-961f-82ee72b054a4>2007-07-15 21:13:05 +0000
committerkristerw <kristerw@138bc75d-0d04-0410-961f-82ee72b054a4>2007-07-15 21:13:05 +0000
commit69590b5afd0732c3e3f2225419d73a97ffdedd33 (patch)
tree4c910b3e0c78f4cb073f597ecddbeaf9b8d5b551 /libjava
parent54b0551a36a74c1eb4d5af65e2dd5c107120383c (diff)
downloadgcc-69590b5afd0732c3e3f2225419d73a97ffdedd33.tar.gz
2007-07-14 Krister Walfridsson <cato@df.lth.se>
* gnu/gcj/util/natGCInfo.cc: Use HAVE_STRERROR_R. * configure.ac: Remove check for strerror, add check for strerror_r. * configure: Regenerate. * include/config.h.in: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126660 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava')
-rw-r--r--libjava/ChangeLog7
-rwxr-xr-xlibjava/configure7
-rw-r--r--libjava/configure.ac3
-rw-r--r--libjava/gnu/gcj/util/natGCInfo.cc4
-rw-r--r--libjava/include/config.h.in4
5 files changed, 15 insertions, 10 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index 4601738f11c..25af45a4dc2 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -3,6 +3,13 @@
* configure.host:
arm*-linux-gnu -> arm*-linux*.
+2007-07-14 Krister Walfridsson <cato@df.lth.se>
+
+ * gnu/gcj/util/natGCInfo.cc: Use HAVE_STRERROR_R.
+ * configure.ac: Remove check for strerror, add check for strerror_r.
+ * configure: Regenerate.
+ * include/config.h.in: Regenerate.
+
2007-07-13 Andrew Haley <aph@redhat.com>
* libgcj.ver: Add __gcj_personality_sj0.
diff --git a/libjava/configure b/libjava/configure
index eee628589d3..370534beada 100755
--- a/libjava/configure
+++ b/libjava/configure
@@ -20683,11 +20683,6 @@ _ACEOF
cat >>confdefs.h <<\_ACEOF
-#define HAVE_STRERROR 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
#define HAVE_TIME 1
_ACEOF
@@ -20752,7 +20747,7 @@ else
-for ac_func in strerror select fstat open fsync sleep opendir \
+for ac_func in strerror_r select fstat open fsync sleep opendir \
localtime_r readdir_r getpwuid_r getcwd \
access stat lstat mkdir rename rmdir unlink utime chmod readlink \
nl_langinfo setlocale \
diff --git a/libjava/configure.ac b/libjava/configure.ac
index 1c571dce8ba..9a9d1fde179 100644
--- a/libjava/configure.ac
+++ b/libjava/configure.ac
@@ -985,7 +985,6 @@ if test "x${with_newlib}" = "xyes"; then
# we'll have.
AC_DEFINE(HAVE_MEMMOVE, 1, [Define if you have memmove.])
AC_DEFINE(HAVE_MEMCPY, 1, [Define if you have memcpy.])
- AC_DEFINE(HAVE_STRERROR, 1, [Define if you have strerror.])
AC_DEFINE(HAVE_TIME, 1, [Define if you have time.])
AC_DEFINE(HAVE_GMTIME_R, 1, [Define if you have the 'gmtime_r' function])
AC_DEFINE(HAVE_LOCALTIME_R, 1, [Define if you have the 'localtime_r' function.])
@@ -997,7 +996,7 @@ if test "x${with_newlib}" = "xyes"; then
AC_DEFINE(NO_GETUID, 1, [Define if getuid() and friends are missing.])
PLATFORMNET=NoNet
else
- AC_CHECK_FUNCS([strerror select fstat open fsync sleep opendir \
+ AC_CHECK_FUNCS([strerror_r select fstat open fsync sleep opendir \
localtime_r readdir_r getpwuid_r getcwd \
access stat lstat mkdir rename rmdir unlink utime chmod readlink \
nl_langinfo setlocale \
diff --git a/libjava/gnu/gcj/util/natGCInfo.cc b/libjava/gnu/gcj/util/natGCInfo.cc
index 8fe049aace0..a9240961f8b 100644
--- a/libjava/gnu/gcj/util/natGCInfo.cc
+++ b/libjava/gnu/gcj/util/natGCInfo.cc
@@ -245,8 +245,12 @@ GC_enumerator::print_address_map()
fm = fopen("/proc/self/maps", "r");
if (fm == NULL)
{
+#ifdef HAVE_STRERROR_R
if (0 == strerror_r (errno, buffer, sizeof buffer))
fputs (buffer, fp);
+#else
+ fputs (strerror (errno), fp);
+#endif
}
else
{
diff --git a/libjava/include/config.h.in b/libjava/include/config.h.in
index e4948b37d73..b47f248686e 100644
--- a/libjava/include/config.h.in
+++ b/libjava/include/config.h.in
@@ -250,8 +250,8 @@
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
-/* Define to 1 if you have the `strerror' function. */
-#undef HAVE_STRERROR
+/* Define to 1 if you have the `strerror_r' function. */
+#undef HAVE_STRERROR_R
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H