configure.ac: Check if __overflow() is available.

This commit is contained in:
Simon Ruderich
2013-06-20 22:14:42 +02:00
parent b0c02291be
commit f3c734eb7d
2 changed files with 3 additions and 1 deletions

View File

@@ -58,6 +58,8 @@ AC_CHECK_FUNCS([memmove setenv],
AC_CHECK_FUNCS([execvpe])
dnl These are not in POSIX.
AC_CHECK_FUNCS([fwrite_unlocked fputs_unlocked fputc_unlocked])
dnl Internal functions in libc implementations which must be hooked.
AC_CHECK_FUNCS([__overflow])
dnl Thanks to gperftools' configure.ac (https://code.google.com/p/gperftools).
AC_MSG_CHECKING([for __builtin_expect])

View File

@@ -275,7 +275,7 @@ HOOK_FILE1(int, putchar_unlocked, stdout,
* part. As writes to stderr are never buffered, __overflow() is always called
* and everything works fine. This is only a problem if stdout is dupped to
* stderr (which shouldn't be the case too often). */
#ifdef HAVE_STRUCT__IO_FILE__FILENO
#if defined(HAVE_STRUCT__IO_FILE__FILENO) && defined(HAVE___OVERFLOW)
/* _IO_FILE is glibc's representation of FILE. */
HOOK_FILE2(int, __overflow, f, _IO_FILE *, f, int, ch)
#endif