mirror of
https://github.com/FAUSheppy/colorredstderr-mirror
synced 2025-12-09 16:38:32 +01:00
configure.ac: Check if __overflow() is available.
This commit is contained in:
@@ -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])
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user