Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 672048
Collapse All | Expand All

(-)sharutils-4.15.2.orig/lib/fflush.c (-3 / +3 lines)
Lines 33-39 Link Here
33
#undef fflush
33
#undef fflush
34
34
35
35
36
#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
36
#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
37
37
38
/* Clear the stream's ungetc buffer, preserving the value of ftello (fp).  */
38
/* Clear the stream's ungetc buffer, preserving the value of ftello (fp).  */
39
static void
39
static void
Lines 72-78 clear_ungetc_buffer (FILE *fp) Link Here
72
72
73
#endif
73
#endif
74
74
75
#if ! (defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */)
75
#if ! (defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */)
76
76
77
# if (defined __sferror || defined __DragonFly__ || defined __ANDROID__) && defined __SNPT
77
# if (defined __sferror || defined __DragonFly__ || defined __ANDROID__) && defined __SNPT
78
/* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
78
/* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
Lines 148-154 rpl_fflush (FILE *stream) Link Here
148
  if (stream == NULL || ! freading (stream))
148
  if (stream == NULL || ! freading (stream))
149
    return fflush (stream);
149
    return fflush (stream);
150
150
151
#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
151
#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
152
152
153
  clear_ungetc_buffer_preserving_position (stream);
153
  clear_ungetc_buffer_preserving_position (stream);
154
154
(-)sharutils-4.15.2.orig/lib/fpurge.c (-1 / +1 lines)
Lines 62-68 fpurge (FILE *fp) Link Here
62
  /* Most systems provide FILE as a struct and the necessary bitmask in
62
  /* Most systems provide FILE as a struct and the necessary bitmask in
63
     <stdio.h>, because they need it for implementing getc() and putc() as
63
     <stdio.h>, because they need it for implementing getc() and putc() as
64
     fast macros.  */
64
     fast macros.  */
65
# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
65
# if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
66
  fp->_IO_read_end = fp->_IO_read_ptr;
66
  fp->_IO_read_end = fp->_IO_read_ptr;
67
  fp->_IO_write_ptr = fp->_IO_write_base;
67
  fp->_IO_write_ptr = fp->_IO_write_base;
68
  /* Avoid memory leak when there is an active ungetc buffer.  */
68
  /* Avoid memory leak when there is an active ungetc buffer.  */
(-)sharutils-4.15.2.orig/lib/freading.c (-1 / +1 lines)
Lines 31-37 freading (FILE *fp) Link Here
31
  /* Most systems provide FILE as a struct and the necessary bitmask in
31
  /* Most systems provide FILE as a struct and the necessary bitmask in
32
     <stdio.h>, because they need it for implementing getc() and putc() as
32
     <stdio.h>, because they need it for implementing getc() and putc() as
33
     fast macros.  */
33
     fast macros.  */
34
# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
34
# if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
35
  return ((fp->_flags & _IO_NO_WRITES) != 0
35
  return ((fp->_flags & _IO_NO_WRITES) != 0
36
          || ((fp->_flags & (_IO_NO_READS | _IO_CURRENTLY_PUTTING)) == 0
36
          || ((fp->_flags & (_IO_NO_READS | _IO_CURRENTLY_PUTTING)) == 0
37
              && fp->_IO_read_base != NULL));
37
              && fp->_IO_read_base != NULL));
(-)sharutils-4.15.2.orig/lib/fseeko.c (-2 / +2 lines)
Lines 47-53 fseeko (FILE *fp, off_t offset, int when Link Here
47
#endif
47
#endif
48
48
49
  /* These tests are based on fpurge.c.  */
49
  /* These tests are based on fpurge.c.  */
50
#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
50
#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
51
  if (fp->_IO_read_end == fp->_IO_read_ptr
51
  if (fp->_IO_read_end == fp->_IO_read_ptr
52
      && fp->_IO_write_ptr == fp->_IO_write_base
52
      && fp->_IO_write_ptr == fp->_IO_write_base
53
      && fp->_IO_save_base == NULL)
53
      && fp->_IO_save_base == NULL)
Lines 123-129 fseeko (FILE *fp, off_t offset, int when Link Here
123
          return -1;
123
          return -1;
124
        }
124
        }
125
125
126
#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
126
#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
127
      fp->_flags &= ~_IO_EOF_SEEN;
127
      fp->_flags &= ~_IO_EOF_SEEN;
128
      fp->_offset = pos;
128
      fp->_offset = pos;
129
#elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
129
#elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
(-)sharutils-4.15.2.orig/lib/stdio-impl.h (+6 lines)
Lines 18-23 Link Here
18
   the same implementation of stdio extension API, except that some fields
18
   the same implementation of stdio extension API, except that some fields
19
   have different naming conventions, or their access requires some casts.  */
19
   have different naming conventions, or their access requires some casts.  */
20
20
21
/* Glibc 2.28 made _IO_IN_BACKUP private.  For now, work around this
22
   problem by defining it ourselves.  FIXME: Do not rely on glibc
23
   internals.  */
24
#if !defined _IO_IN_BACKUP && defined _IO_EOF_SEEN
25
# define _IO_IN_BACKUP 0x100
26
#endif
21
27
22
/* BSD stdio derived implementations.  */
28
/* BSD stdio derived implementations.  */
23
29

Return to bug 672048