Files
MSYS2-packages/gzip/gzip-1.6-fpending.patch
2013-11-05 12:22:22 +04:00

88 lines
2.5 KiB
Diff

diff -Naur gzip-1.6-fpending/lib/config.hin gzip-1.6/lib/config.hin
--- gzip-1.6-fpending/lib/config.hin 2013-10-20 10:11:10.369000000 +0400
+++ gzip-1.6/lib/config.hin 2013-10-20 10:24:12.124800000 +0400
@@ -411,10 +411,6 @@
don't. */
#undef HAVE_DECL__SNPRINTF
-/* Define to 1 if you have the declaration of `__fpending', and to 0 if you
- don't. */
-#undef HAVE_DECL___FPENDING
-
/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
*/
#undef HAVE_DIRENT_H
@@ -778,9 +774,6 @@
/* Define to 1 if you have the `_set_invalid_parameter_handler' function. */
#undef HAVE__SET_INVALID_PARAMETER_HANDLER
-/* Define to 1 if you have the `__fpending' function. */
-#undef HAVE___FPENDING
-
/* Define to 1 if you have the `__fpurge' function. */
#undef HAVE___FPURGE
diff -Naur gzip-1.6-fpending/lib/fpending.h gzip-1.6/lib/fpending.h
--- gzip-1.6-fpending/lib/fpending.h 2013-09-22 19:25:57.000000000 +0400
+++ gzip-1.6/lib/fpending.h 2013-10-20 10:26:22.710600000 +0400
@@ -20,11 +20,10 @@
#include <stddef.h>
#include <stdio.h>
+#if HAVE_STDIO_EXT_H
+# include <stdio_ext.h>
+#endif
-#if HAVE_DECL___FPENDING
-# if HAVE_STDIO_EXT_H
-# include <stdio_ext.h>
-# endif
-#else
+#ifndef __fpending
size_t __fpending (FILE *);
#endif
diff -Naur gzip-1.6-fpending/m4/fpending.m4 gzip-1.6/m4/fpending.m4
--- gzip-1.6-fpending/m4/fpending.m4 2013-09-22 19:25:57.000000000 +0400
+++ gzip-1.6/m4/fpending.m4 2013-10-20 10:27:26.603600000 +0400
@@ -16,14 +16,19 @@
AC_DEFUN([gl_FUNC_FPENDING],
[
AC_CHECK_HEADERS_ONCE([stdio_ext.h])
- AC_CHECK_FUNCS_ONCE([__fpending])
- fp_headers='
-# include <stdio.h>
-# if HAVE_STDIO_EXT_H
-# include <stdio_ext.h>
-# endif
-'
- AC_CHECK_DECLS([__fpending], , , $fp_headers)
+ AC_CACHE_CHECK([for __fpending], [gl_cv_func___fpending],
+ [
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <stdio.h>
+ #if HAVE_STDIO_EXT_H
+ # include <stdio_ext.h>
+ #endif
+ ]],
+ [[return ! __fpending (stdin);]])],
+ [gl_cv_func___fpending=yes],
+ [gl_cv_func___fpending=no])
+ ])
])
AC_DEFUN([gl_PREREQ_FPENDING],
diff -Naur gzip-1.6-fpending/m4/gnulib-comp.m4 gzip-1.6/m4/gnulib-comp.m4
--- gzip-1.6-fpending/m4/gnulib-comp.m4 2013-09-22 19:29:16.000000000 +0400
+++ gzip-1.6/m4/gnulib-comp.m4 2013-10-20 10:28:16.554800000 +0400
@@ -333,7 +333,7 @@
AC_LIBOBJ([itold])
fi
gl_FUNC_FPENDING
- if test $ac_cv_func___fpending = no; then
+ if test $gl_cv_func___fpending = no; then
AC_LIBOBJ([fpending])
gl_PREREQ_FPENDING
fi