Commit 91f6762e by Krister Walfridsson Committed by Krister Walfridsson

natGCInfo.cc: Use HAVE_STRERROR_R.

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
parent 945e62dd
...@@ -3,6 +3,13 @@ ...@@ -3,6 +3,13 @@
* configure.host: * configure.host:
arm*-linux-gnu -> arm*-linux*. 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> 2007-07-13 Andrew Haley <aph@redhat.com>
* libgcj.ver: Add __gcj_personality_sj0. * libgcj.ver: Add __gcj_personality_sj0.
......
...@@ -20683,11 +20683,6 @@ _ACEOF ...@@ -20683,11 +20683,6 @@ _ACEOF
cat >>confdefs.h <<\_ACEOF cat >>confdefs.h <<\_ACEOF
#define HAVE_STRERROR 1
_ACEOF
cat >>confdefs.h <<\_ACEOF
#define HAVE_TIME 1 #define HAVE_TIME 1
_ACEOF _ACEOF
...@@ -20752,7 +20747,7 @@ else ...@@ -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 \ localtime_r readdir_r getpwuid_r getcwd \
access stat lstat mkdir rename rmdir unlink utime chmod readlink \ access stat lstat mkdir rename rmdir unlink utime chmod readlink \
nl_langinfo setlocale \ nl_langinfo setlocale \
......
...@@ -985,7 +985,6 @@ if test "x${with_newlib}" = "xyes"; then ...@@ -985,7 +985,6 @@ if test "x${with_newlib}" = "xyes"; then
# we'll have. # we'll have.
AC_DEFINE(HAVE_MEMMOVE, 1, [Define if you have memmove.]) AC_DEFINE(HAVE_MEMMOVE, 1, [Define if you have memmove.])
AC_DEFINE(HAVE_MEMCPY, 1, [Define if you have memcpy.]) 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_TIME, 1, [Define if you have time.])
AC_DEFINE(HAVE_GMTIME_R, 1, [Define if you have the 'gmtime_r' function]) 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.]) 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 ...@@ -997,7 +996,7 @@ if test "x${with_newlib}" = "xyes"; then
AC_DEFINE(NO_GETUID, 1, [Define if getuid() and friends are missing.]) AC_DEFINE(NO_GETUID, 1, [Define if getuid() and friends are missing.])
PLATFORMNET=NoNet PLATFORMNET=NoNet
else 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 \ localtime_r readdir_r getpwuid_r getcwd \
access stat lstat mkdir rename rmdir unlink utime chmod readlink \ access stat lstat mkdir rename rmdir unlink utime chmod readlink \
nl_langinfo setlocale \ nl_langinfo setlocale \
......
...@@ -245,8 +245,12 @@ GC_enumerator::print_address_map() ...@@ -245,8 +245,12 @@ GC_enumerator::print_address_map()
fm = fopen("/proc/self/maps", "r"); fm = fopen("/proc/self/maps", "r");
if (fm == NULL) if (fm == NULL)
{ {
#ifdef HAVE_STRERROR_R
if (0 == strerror_r (errno, buffer, sizeof buffer)) if (0 == strerror_r (errno, buffer, sizeof buffer))
fputs (buffer, fp); fputs (buffer, fp);
#else
fputs (strerror (errno), fp);
#endif
} }
else else
{ {
......
...@@ -250,8 +250,8 @@ ...@@ -250,8 +250,8 @@
/* Define to 1 if you have the <stdlib.h> header file. */ /* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H #undef HAVE_STDLIB_H
/* Define to 1 if you have the `strerror' function. */ /* Define to 1 if you have the `strerror_r' function. */
#undef HAVE_STRERROR #undef HAVE_STRERROR_R
/* Define to 1 if you have the <strings.h> header file. */ /* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H #undef HAVE_STRINGS_H
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment