render / rpms / libvirt

Forked from rpms/libvirt 7 months ago
Clone
Daniel P. Berrangé 48941c
From 397feba12151bec18ab208bd8fe1d9f12b9989d0 Mon Sep 17 00:00:00 2001
Daniel P. Berrangé 48941c
From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= <berrange@redhat.com>
Daniel P. Berrangé 48941c
Date: Mon, 5 Mar 2018 12:27:52 +0000
Daniel P. Berrangé 48941c
Subject: [PATCH] Workaround removal of libio.h
Daniel P. Berrangé 48941c
MIME-Version: 1.0
Daniel P. Berrangé 48941c
Content-Type: text/plain; charset=UTF-8
Daniel P. Berrangé 48941c
Content-Transfer-Encoding: 8bit
Daniel P. Berrangé 48941c
Daniel P. Berrangé 48941c
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Daniel P. Berrangé 48941c
---
Daniel P. Berrangé 48941c
 gnulib/lib/fflush.c   | 8 ++++----
Daniel P. Berrangé 48941c
 gnulib/lib/fpurge.c   | 2 +-
Daniel P. Berrangé 48941c
 gnulib/lib/freading.c | 2 +-
Daniel P. Berrangé 48941c
 gnulib/lib/fseeko.c   | 4 ++--
Daniel P. Berrangé 48941c
 4 files changed, 8 insertions(+), 8 deletions(-)
Daniel P. Berrangé 48941c
Daniel P. Berrangé 48941c
diff --git a/gnulib/lib/fflush.c b/gnulib/lib/fflush.c
Daniel P. Berrangé 48941c
index c52883b..3ebbcae 100644
Daniel P. Berrangé 48941c
--- a/gnulib/lib/fflush.c
Daniel P. Berrangé 48941c
+++ b/gnulib/lib/fflush.c
Daniel P. Berrangé 48941c
@@ -32,8 +32,8 @@
Daniel P. Berrangé 48941c
 
Daniel P. Berrangé 48941c
 #undef fflush
Daniel P. Berrangé 48941c
 
Daniel P. Berrangé 48941c
-
Daniel P. Berrangé 48941c
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
Daniel P. Berrangé 48941c
+#define _IO_IN_BACKUP 0x100
Daniel P. Berrangé 48941c
+#if defined _IO_ftrylockfile || __GNU_LIBRARY__ /* GNU libc, BeOS, Haiku, Linux libc5 */
Daniel P. Berrangé 48941c
 
Daniel P. Berrangé 48941c
 /* Clear the stream's ungetc buffer, preserving the value of ftello (fp).  */
Daniel P. Berrangé 48941c
 static void
Daniel P. Berrangé 48941c
@@ -72,7 +72,7 @@ clear_ungetc_buffer (FILE *fp)
Daniel P. Berrangé 48941c
 
Daniel P. Berrangé 48941c
 #endif
Daniel P. Berrangé 48941c
 
Daniel P. Berrangé 48941c
-#if ! (defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */)
Daniel P. Berrangé 48941c
+#if ! (defined _IO_ftrylockfile || __GNU_LIBRARY__ /* GNU libc, BeOS, Haiku, Linux libc5 */)
Daniel P. Berrangé 48941c
 
Daniel P. Berrangé 48941c
 # if (defined __sferror || defined __DragonFly__ || defined __ANDROID__) && defined __SNPT
Daniel P. Berrangé 48941c
 /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */
Daniel P. Berrangé 48941c
@@ -148,7 +148,7 @@ rpl_fflush (FILE *stream)
Daniel P. Berrangé 48941c
   if (stream == NULL || ! freading (stream))
Daniel P. Berrangé 48941c
     return fflush (stream);
Daniel P. Berrangé 48941c
 
Daniel P. Berrangé 48941c
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
Daniel P. Berrangé 48941c
+#if defined _IO_ftrylockfile || __GNU_LIBRARY__ /* GNU libc, BeOS, Haiku, Linux libc5 */
Daniel P. Berrangé 48941c
 
Daniel P. Berrangé 48941c
   clear_ungetc_buffer_preserving_position (stream);
Daniel P. Berrangé 48941c
 
Daniel P. Berrangé 48941c
diff --git a/gnulib/lib/fpurge.c b/gnulib/lib/fpurge.c
Daniel P. Berrangé 48941c
index b236871..ea8f7f5 100644
Daniel P. Berrangé 48941c
--- a/gnulib/lib/fpurge.c
Daniel P. Berrangé 48941c
+++ b/gnulib/lib/fpurge.c
Daniel P. Berrangé 48941c
@@ -62,7 +62,7 @@ fpurge (FILE *fp)
Daniel P. Berrangé 48941c
   /* Most systems provide FILE as a struct and the necessary bitmask in
Daniel P. Berrangé 48941c
      <stdio.h>, because they need it for implementing getc() and putc() as
Daniel P. Berrangé 48941c
      fast macros.  */
Daniel P. Berrangé 48941c
-# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
Daniel P. Berrangé 48941c
+# if defined _IO_ftrylockfile || __GNU_LIBRARY__ /* GNU libc, BeOS, Haiku, Linux libc5 */
Daniel P. Berrangé 48941c
   fp->_IO_read_end = fp->_IO_read_ptr;
Daniel P. Berrangé 48941c
   fp->_IO_write_ptr = fp->_IO_write_base;
Daniel P. Berrangé 48941c
   /* Avoid memory leak when there is an active ungetc buffer.  */
Daniel P. Berrangé 48941c
diff --git a/gnulib/lib/freading.c b/gnulib/lib/freading.c
Daniel P. Berrangé 48941c
index 67a884d..fffda1e 100644
Daniel P. Berrangé 48941c
--- a/gnulib/lib/freading.c
Daniel P. Berrangé 48941c
+++ b/gnulib/lib/freading.c
Daniel P. Berrangé 48941c
@@ -31,7 +31,7 @@ freading (FILE *fp)
Daniel P. Berrangé 48941c
   /* Most systems provide FILE as a struct and the necessary bitmask in
Daniel P. Berrangé 48941c
      <stdio.h>, because they need it for implementing getc() and putc() as
Daniel P. Berrangé 48941c
      fast macros.  */
Daniel P. Berrangé 48941c
-# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
Daniel P. Berrangé 48941c
+# if defined _IO_ftrylockfile || __GNU_LIBRARY__ /* GNU libc, BeOS, Haiku, Linux libc5 */
Daniel P. Berrangé 48941c
   return ((fp->_flags & _IO_NO_WRITES) != 0
Daniel P. Berrangé 48941c
           || ((fp->_flags & (_IO_NO_READS | _IO_CURRENTLY_PUTTING)) == 0
Daniel P. Berrangé 48941c
               && fp->_IO_read_base != NULL));
Daniel P. Berrangé 48941c
diff --git a/gnulib/lib/fseeko.c b/gnulib/lib/fseeko.c
Daniel P. Berrangé 48941c
index ae9b100..82460e5 100644
Daniel P. Berrangé 48941c
--- a/gnulib/lib/fseeko.c
Daniel P. Berrangé 48941c
+++ b/gnulib/lib/fseeko.c
Daniel P. Berrangé 48941c
@@ -47,7 +47,7 @@ fseeko (FILE *fp, off_t offset, int whence)
Daniel P. Berrangé 48941c
 #endif
Daniel P. Berrangé 48941c
 
Daniel P. Berrangé 48941c
   /* These tests are based on fpurge.c.  */
Daniel P. Berrangé 48941c
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
Daniel P. Berrangé 48941c
+#if defined _IO_ftrylockfile || __GNU_LIBRARY__ /* GNU libc, BeOS, Haiku, Linux libc5 */
Daniel P. Berrangé 48941c
   if (fp->_IO_read_end == fp->_IO_read_ptr
Daniel P. Berrangé 48941c
       && fp->_IO_write_ptr == fp->_IO_write_base
Daniel P. Berrangé 48941c
       && fp->_IO_save_base == NULL)
Daniel P. Berrangé 48941c
@@ -123,7 +123,7 @@ fseeko (FILE *fp, off_t offset, int whence)
Daniel P. Berrangé 48941c
           return -1;
Daniel P. Berrangé 48941c
         }
Daniel P. Berrangé 48941c
 
Daniel P. Berrangé 48941c
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
Daniel P. Berrangé 48941c
+#if defined _IO_ftrylockfile || __GNU_LIBRARY__ /* GNU libc, BeOS, Haiku, Linux libc5 */
Daniel P. Berrangé 48941c
       fp->_flags &= ~_IO_EOF_SEEN;
Daniel P. Berrangé 48941c
       fp->_offset = pos;
Daniel P. Berrangé 48941c
 #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
Daniel P. Berrangé 48941c
-- 
Daniel P. Berrangé 48941c
2.14.3
Daniel P. Berrangé 48941c