summaryrefslogtreecommitdiff
path: root/package/gzip/patches/patch-m4_fflush_m4
diff options
context:
space:
mode:
Diffstat (limited to 'package/gzip/patches/patch-m4_fflush_m4')
-rw-r--r--package/gzip/patches/patch-m4_fflush_m429
1 files changed, 29 insertions, 0 deletions
diff --git a/package/gzip/patches/patch-m4_fflush_m4 b/package/gzip/patches/patch-m4_fflush_m4
new file mode 100644
index 000000000..6954fa2c4
--- /dev/null
+++ b/package/gzip/patches/patch-m4_fflush_m4
@@ -0,0 +1,29 @@
+--- gzip-1.6.orig/m4/fflush.m4 2013-06-09 22:37:56.000000000 +0200
++++ gzip-1.6/m4/fflush.m4 2016-01-14 17:07:56.000000000 +0100
+@@ -14,7 +14,15 @@ AC_DEFUN([gl_FUNC_FFLUSH],
+ [
+ AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+ gl_FUNC_FFLUSH_STDIN
+- if test $gl_cv_func_fflush_stdin = no; then
++ case $gl_cv_func_fflush_stdin in
++ yes) gl_func_fflush_stdin=1 ;;
++ no) gl_func_fflush_stdin=0 ;;
++ *) gl_func_fflush_stdin='(-1)' ;;
++ esac
++ AC_DEFINE_UNQUOTED([FUNC_FFLUSH_STDIN], [$gl_func_fflush_stdin],
++ [Define to 1 if fflush is known to work on stdin as per POSIX.1-2008,
++ 0 if fflush is known to not work, -1 if unknown.])
++ if test $gl_cv_func_fflush_stdin != yes; then
+ REPLACE_FFLUSH=1
+ fi
+ ])
+@@ -72,8 +80,7 @@ AC_DEFUN([gl_FUNC_FFLUSH_STDIN],
+ return 7;
+ return 0;
+ ]])], [gl_cv_func_fflush_stdin=yes], [gl_cv_func_fflush_stdin=no],
+- [dnl Pessimistically assume fflush is broken.
+- gl_cv_func_fflush_stdin=no])
++ [gl_cv_func_fflush_stdin=cross])
+ rm conftest.txt
+ ])
+ ])