patch-gnulib_m4_fflush_m4 1.0 KB

12345678910111213141516171819202122232425
  1. --- findutils-4.4.2.orig/gnulib/m4/fflush.m4 2009-05-10 23:23:57.000000000 +0200
  2. +++ findutils-4.4.2/gnulib/m4/fflush.m4 2014-03-23 18:40:09.000000000 +0100
  3. @@ -32,12 +32,18 @@ AC_DEFUN([gl_FUNC_FFLUSH],
  4. return 4;
  5. return !(lseek (fd, 0, SEEK_CUR) == 5);
  6. ]])], [gl_cv_func_fflush_stdin=yes], [gl_cv_func_fflush_stdin=no],
  7. - [dnl Pessimistically assume fflush is broken. This is wrong for
  8. - dnl at least glibc and cygwin; but lib/fflush.c takes this into account.
  9. - gl_cv_func_fflush_stdin=no])
  10. + [gl_cv_func_fflush_stdin=cross])
  11. rm conftest.txt
  12. ])
  13. - if test $gl_cv_func_fflush_stdin = no; then
  14. + case $gl_cv_func_fflush_stdin in
  15. + yes) gl_func_fflush_stdin=1 ;;
  16. + no) gl_func_fflush_stdin=0 ;;
  17. + *) gl_func_fflush_stdin='(-1)' ;;
  18. + esac
  19. + AC_DEFINE_UNQUOTED([FUNC_FFLUSH_STDIN], [$gl_func_fflush_stdin],
  20. + [Define to 1 if fflush is known to work on stdin as per POSIX.1-2008,
  21. + 0 if fflush is known to not work, -1 if unknown.])
  22. + if test $gl_cv_func_fflush_stdin != yes; then
  23. gl_REPLACE_FFLUSH
  24. fi
  25. ])