natGCInfo.cc: Use HAVE_STRERROR_R.
authorKrister Walfridsson <cato@df.lth.se>
Sun, 15 Jul 2007 21:13:05 +0000 (23:13 +0200)
committerKrister Walfridsson <kristerw@gcc.gnu.org>
Sun, 15 Jul 2007 21:13:05 +0000 (21:13 +0000)
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.

From-SVN: r126660

libjava/ChangeLog
libjava/configure
libjava/configure.ac
libjava/gnu/gcj/util/natGCInfo.cc
libjava/include/config.h.in

index 4601738f11c7593fe68a1e1605d8aa5d3be162a8..25af45a4dc29bc19e3866ebe25041af1b64c1a8f 100644 (file)
@@ -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.
index eee628589d3ed3420cb740079a6f57c56dd70822..370534beada850084938797389bc71a22a6d70c7 100755 (executable)
@@ -20682,11 +20682,6 @@ cat >>confdefs.h <<\_ACEOF
 _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 \
index 1c571dce8bae96bb3a96b9035c421f862758fec2..9a9d1fde1798b55a904f0f2ac11784649992f9a7 100644 (file)
@@ -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 \
index 8fe049aace0981076175fdd76e3c098f36740ede..a9240961f8b01d7d7502212d5f6298b509c7b3e4 100644 (file)
@@ -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
     {
index e4948b37d73ae8a9944c8e473d9cf3a86c598708..b47f248686ea8da30f6cb8c641e1ab79d6488fa0 100644 (file)
 /* 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