Skip to content

Commit 6ead2d4

Browse files
committed
Jenkins: Fix M4 build on Ubuntu 20.04
M4 versions before 1.4.19 have a portability bug on glibc 6 platforms, including Ubuntu 20.04. Provide a fix for versions of M4 used in Open MPI branches for which we still build nightly tarballs. Signed-off-by: Brian Barrett <bbarrett@amazon.com>
1 parent 02ad34e commit 6ead2d4

File tree

3 files changed

+331
-0
lines changed

3 files changed

+331
-0
lines changed
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
diff --color -urp m4-1.4.16.orig/lib/fflush.c m4-1.4.16/lib/fflush.c
2+
--- m4-1.4.16.orig/lib/fflush.c 2011-03-01 16:39:27.000000000 +0000
3+
+++ m4-1.4.16/lib/fflush.c 2021-09-11 19:37:54.112227455 +0000
4+
@@ -31,7 +31,7 @@
5+
#undef fflush
6+
7+
8+
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
9+
+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
10+
11+
/* Clear the stream's ungetc buffer, preserving the value of ftello (fp). */
12+
static inline void
13+
@@ -138,7 +138,7 @@ rpl_fflush (FILE *stream)
14+
if (stream == NULL || ! freading (stream))
15+
return fflush (stream);
16+
17+
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
18+
+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
19+
20+
clear_ungetc_buffer_preserving_position (stream);
21+
22+
diff --color -urp m4-1.4.16.orig/lib/fpurge.c m4-1.4.16/lib/fpurge.c
23+
--- m4-1.4.16.orig/lib/fpurge.c 2011-03-01 16:39:27.000000000 +0000
24+
+++ m4-1.4.16/lib/fpurge.c 2021-09-11 19:37:54.112227455 +0000
25+
@@ -61,7 +61,7 @@ fpurge (FILE *fp)
26+
/* Most systems provide FILE as a struct and the necessary bitmask in
27+
<stdio.h>, because they need it for implementing getc() and putc() as
28+
fast macros. */
29+
-# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
30+
+# if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
31+
fp->_IO_read_end = fp->_IO_read_ptr;
32+
fp->_IO_write_ptr = fp->_IO_write_base;
33+
/* Avoid memory leak when there is an active ungetc buffer. */
34+
diff --color -urp m4-1.4.16.orig/lib/freadahead.c m4-1.4.16/lib/freadahead.c
35+
--- m4-1.4.16.orig/lib/freadahead.c 2011-03-01 16:39:27.000000000 +0000
36+
+++ m4-1.4.16/lib/freadahead.c 2021-09-11 19:37:54.112227455 +0000
37+
@@ -25,7 +25,7 @@
38+
size_t
39+
freadahead (FILE *fp)
40+
{
41+
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
42+
+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
43+
if (fp->_IO_write_ptr > fp->_IO_write_base)
44+
return 0;
45+
return (fp->_IO_read_end - fp->_IO_read_ptr)
46+
diff --color -urp m4-1.4.16.orig/lib/freading.c m4-1.4.16/lib/freading.c
47+
--- m4-1.4.16.orig/lib/freading.c 2011-03-01 16:39:27.000000000 +0000
48+
+++ m4-1.4.16/lib/freading.c 2021-09-11 19:37:54.112227455 +0000
49+
@@ -31,7 +31,7 @@ freading (FILE *fp)
50+
/* Most systems provide FILE as a struct and the necessary bitmask in
51+
<stdio.h>, because they need it for implementing getc() and putc() as
52+
fast macros. */
53+
-# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
54+
+# if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
55+
return ((fp->_flags & _IO_NO_WRITES) != 0
56+
|| ((fp->_flags & (_IO_NO_READS | _IO_CURRENTLY_PUTTING)) == 0
57+
&& fp->_IO_read_base != NULL));
58+
diff --color -urp m4-1.4.16.orig/lib/fseeko.c m4-1.4.16/lib/fseeko.c
59+
--- m4-1.4.16.orig/lib/fseeko.c 2011-03-01 16:39:28.000000000 +0000
60+
+++ m4-1.4.16/lib/fseeko.c 2021-09-11 19:37:54.112227455 +0000
61+
@@ -40,7 +40,7 @@ fseeko (FILE *fp, off_t offset, int when
62+
#endif
63+
64+
/* These tests are based on fpurge.c. */
65+
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
66+
+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
67+
if (fp->_IO_read_end == fp->_IO_read_ptr
68+
&& fp->_IO_write_ptr == fp->_IO_write_base
69+
&& fp->_IO_save_base == NULL)
70+
@@ -106,7 +106,7 @@ fseeko (FILE *fp, off_t offset, int when
71+
return -1;
72+
}
73+
74+
-#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+
fp->_flags &= ~_IO_EOF_SEEN;
77+
#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
78+
# if defined __CYGWIN__
79+
diff --color -urp m4-1.4.16.orig/lib/stdio-impl.h m4-1.4.16/lib/stdio-impl.h
80+
--- m4-1.4.16.orig/lib/stdio-impl.h 2011-03-01 16:39:29.000000000 +0000
81+
+++ m4-1.4.16/lib/stdio-impl.h 2021-09-11 19:37:54.112227455 +0000
82+
@@ -18,6 +18,12 @@
83+
the same implementation of stdio extension API, except that some fields
84+
have different naming conventions, or their access requires some casts. */
85+
86+
+/* Glibc 2.28 made _IO_IN_BACKUP private. For now, work around this
87+
+ problem by defining it ourselves. FIXME: Do not rely on glibc
88+
+ internals. */
89+
+#if !defined _IO_IN_BACKUP && defined _IO_EOF_SEEN
90+
+# define _IO_IN_BACKUP 0x100
91+
+#endif
92+
93+
/* BSD stdio derived implementations. */
94+
95+
Only in m4-1.4.16/lib: stdio.h.~1~
96+
diff --color -urp m4-1.4.16.orig/lib/stdio.in.h m4-1.4.16/lib/stdio.in.h
97+
--- m4-1.4.16.orig/lib/stdio.in.h 2011-03-01 16:39:29.000000000 +0000
98+
+++ m4-1.4.16/lib/stdio.in.h 2021-09-11 19:55:34.246406982 +0000
99+
@@ -158,11 +158,13 @@ _GL_WARN_ON_USE (fflush, "fflush is not
100+
"use gnulib module fflush for portable POSIX compliance");
101+
#endif
102+
103+
+#if 0
104+
/* It is very rare that the developer ever has full control of stdin,
105+
so any use of gets warrants an unconditional warning. Assume it is
106+
always declared, since it is required by C89. */
107+
#undef gets
108+
_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
109+
+#endif
110+
111+
#if @GNULIB_FOPEN@
112+
# if @REPLACE_FOPEN@
113+
Only in m4-1.4.16/lib: stdio.in.h.~1~
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
diff --color -urp m4-1.4.17.orig/lib/fflush.c m4-1.4.17/lib/fflush.c
2+
--- m4-1.4.17.orig/lib/fflush.c 2013-09-22 06:15:20.000000000 +0000
3+
+++ m4-1.4.17/lib/fflush.c 2021-09-11 03:50:41.125878146 +0000
4+
@@ -33,7 +33,7 @@
5+
#undef fflush
6+
7+
8+
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
9+
+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
10+
11+
/* Clear the stream's ungetc buffer, preserving the value of ftello (fp). */
12+
static void
13+
@@ -71,7 +71,7 @@ clear_ungetc_buffer (FILE *fp)
14+
15+
#endif
16+
17+
-#if ! (defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */)
18+
+#if ! (defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */)
19+
20+
# if (defined __sferror || defined __DragonFly__) && defined __SNPT /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */
21+
22+
@@ -145,7 +145,7 @@ rpl_fflush (FILE *stream)
23+
if (stream == NULL || ! freading (stream))
24+
return fflush (stream);
25+
26+
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
27+
+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
28+
29+
clear_ungetc_buffer_preserving_position (stream);
30+
31+
diff --color -urp m4-1.4.17.orig/lib/fpurge.c m4-1.4.17/lib/fpurge.c
32+
--- m4-1.4.17.orig/lib/fpurge.c 2013-09-22 06:15:20.000000000 +0000
33+
+++ m4-1.4.17/lib/fpurge.c 2021-09-11 03:50:41.125878146 +0000
34+
@@ -61,7 +61,7 @@ fpurge (FILE *fp)
35+
/* Most systems provide FILE as a struct and the necessary bitmask in
36+
<stdio.h>, because they need it for implementing getc() and putc() as
37+
fast macros. */
38+
-# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
39+
+# if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
40+
fp->_IO_read_end = fp->_IO_read_ptr;
41+
fp->_IO_write_ptr = fp->_IO_write_base;
42+
/* Avoid memory leak when there is an active ungetc buffer. */
43+
diff --color -urp m4-1.4.17.orig/lib/freadahead.c m4-1.4.17/lib/freadahead.c
44+
--- m4-1.4.17.orig/lib/freadahead.c 2013-09-22 06:15:20.000000000 +0000
45+
+++ m4-1.4.17/lib/freadahead.c 2021-09-11 03:50:41.125878146 +0000
46+
@@ -25,7 +25,7 @@
47+
size_t
48+
freadahead (FILE *fp)
49+
{
50+
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
51+
+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
52+
if (fp->_IO_write_ptr > fp->_IO_write_base)
53+
return 0;
54+
return (fp->_IO_read_end - fp->_IO_read_ptr)
55+
diff --color -urp m4-1.4.17.orig/lib/freading.c m4-1.4.17/lib/freading.c
56+
--- m4-1.4.17.orig/lib/freading.c 2013-09-22 06:15:20.000000000 +0000
57+
+++ m4-1.4.17/lib/freading.c 2021-09-11 03:50:41.125878146 +0000
58+
@@ -31,7 +31,7 @@ freading (FILE *fp)
59+
/* Most systems provide FILE as a struct and the necessary bitmask in
60+
<stdio.h>, because they need it for implementing getc() and putc() as
61+
fast macros. */
62+
-# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
63+
+# if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
64+
return ((fp->_flags & _IO_NO_WRITES) != 0
65+
|| ((fp->_flags & (_IO_NO_READS | _IO_CURRENTLY_PUTTING)) == 0
66+
&& fp->_IO_read_base != NULL));
67+
diff --color -urp m4-1.4.17.orig/lib/fseeko.c m4-1.4.17/lib/fseeko.c
68+
--- m4-1.4.17.orig/lib/fseeko.c 2013-09-22 06:15:55.000000000 +0000
69+
+++ m4-1.4.17/lib/fseeko.c 2021-09-11 03:50:41.125878146 +0000
70+
@@ -47,7 +47,7 @@ fseeko (FILE *fp, off_t offset, int when
71+
#endif
72+
73+
/* These tests are based on fpurge.c. */
74+
-#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+
if (fp->_IO_read_end == fp->_IO_read_ptr
77+
&& fp->_IO_write_ptr == fp->_IO_write_base
78+
&& fp->_IO_save_base == NULL)
79+
@@ -121,7 +121,7 @@ fseeko (FILE *fp, off_t offset, int when
80+
return -1;
81+
}
82+
83+
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
84+
+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
85+
fp->_flags &= ~_IO_EOF_SEEN;
86+
fp->_offset = pos;
87+
#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */
88+
diff --color -urp m4-1.4.17.orig/lib/stdio-impl.h m4-1.4.17/lib/stdio-impl.h
89+
--- m4-1.4.17.orig/lib/stdio-impl.h 2013-09-22 06:20:02.000000000 +0000
90+
+++ m4-1.4.17/lib/stdio-impl.h 2021-09-11 03:50:41.125878146 +0000
91+
@@ -18,6 +18,12 @@
92+
the same implementation of stdio extension API, except that some fields
93+
have different naming conventions, or their access requires some casts. */
94+
95+
+/* Glibc 2.28 made _IO_IN_BACKUP private. For now, work around this
96+
+ problem by defining it ourselves. FIXME: Do not rely on glibc
97+
+ internals. */
98+
+#if !defined _IO_IN_BACKUP && defined _IO_EOF_SEEN
99+
+# define _IO_IN_BACKUP 0x100
100+
+#endif
101+
102+
/* BSD stdio derived implementations. */
103+
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
diff --color -urp m4-1.4.18.orig/lib/fflush.c m4-1.4.18/lib/fflush.c
2+
--- m4-1.4.18.orig/lib/fflush.c 2016-12-31 13:54:41.000000000 +0000
3+
+++ m4-1.4.18/lib/fflush.c 2021-09-11 03:47:08.623555635 +0000
4+
@@ -33,7 +33,7 @@
5+
#undef fflush
6+
7+
8+
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
9+
+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
10+
11+
/* Clear the stream's ungetc buffer, preserving the value of ftello (fp). */
12+
static void
13+
@@ -72,7 +72,7 @@ clear_ungetc_buffer (FILE *fp)
14+
15+
#endif
16+
17+
-#if ! (defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */)
18+
+#if ! (defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */)
19+
20+
# if (defined __sferror || defined __DragonFly__ || defined __ANDROID__) && defined __SNPT
21+
/* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
22+
@@ -148,7 +148,7 @@ rpl_fflush (FILE *stream)
23+
if (stream == NULL || ! freading (stream))
24+
return fflush (stream);
25+
26+
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
27+
+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
28+
29+
clear_ungetc_buffer_preserving_position (stream);
30+
31+
diff --color -urp m4-1.4.18.orig/lib/fpending.c m4-1.4.18/lib/fpending.c
32+
--- m4-1.4.18.orig/lib/fpending.c 2016-12-31 13:54:41.000000000 +0000
33+
+++ m4-1.4.18/lib/fpending.c 2021-09-11 03:47:08.623555635 +0000
34+
@@ -32,7 +32,7 @@ __fpending (FILE *fp)
35+
/* Most systems provide FILE as a struct and the necessary bitmask in
36+
<stdio.h>, because they need it for implementing getc() and putc() as
37+
fast macros. */
38+
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
39+
+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
40+
return fp->_IO_write_ptr - fp->_IO_write_base;
41+
#elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
42+
/* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
43+
diff --color -urp m4-1.4.18.orig/lib/fpurge.c m4-1.4.18/lib/fpurge.c
44+
--- m4-1.4.18.orig/lib/fpurge.c 2016-12-31 13:54:41.000000000 +0000
45+
+++ m4-1.4.18/lib/fpurge.c 2021-09-11 03:47:08.623555635 +0000
46+
@@ -62,7 +62,7 @@ fpurge (FILE *fp)
47+
/* Most systems provide FILE as a struct and the necessary bitmask in
48+
<stdio.h>, because they need it for implementing getc() and putc() as
49+
fast macros. */
50+
-# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
51+
+# if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
52+
fp->_IO_read_end = fp->_IO_read_ptr;
53+
fp->_IO_write_ptr = fp->_IO_write_base;
54+
/* Avoid memory leak when there is an active ungetc buffer. */
55+
diff --color -urp m4-1.4.18.orig/lib/freadahead.c m4-1.4.18/lib/freadahead.c
56+
--- m4-1.4.18.orig/lib/freadahead.c 2016-12-31 13:54:41.000000000 +0000
57+
+++ m4-1.4.18/lib/freadahead.c 2021-09-11 03:47:08.623555635 +0000
58+
@@ -25,7 +25,7 @@
59+
size_t
60+
freadahead (FILE *fp)
61+
{
62+
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
63+
+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
64+
if (fp->_IO_write_ptr > fp->_IO_write_base)
65+
return 0;
66+
return (fp->_IO_read_end - fp->_IO_read_ptr)
67+
diff --color -urp m4-1.4.18.orig/lib/freading.c m4-1.4.18/lib/freading.c
68+
--- m4-1.4.18.orig/lib/freading.c 2016-12-31 13:54:41.000000000 +0000
69+
+++ m4-1.4.18/lib/freading.c 2021-09-11 03:47:08.623555635 +0000
70+
@@ -31,7 +31,7 @@ freading (FILE *fp)
71+
/* Most systems provide FILE as a struct and the necessary bitmask in
72+
<stdio.h>, because they need it for implementing getc() and putc() as
73+
fast macros. */
74+
-# 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+
return ((fp->_flags & _IO_NO_WRITES) != 0
77+
|| ((fp->_flags & (_IO_NO_READS | _IO_CURRENTLY_PUTTING)) == 0
78+
&& fp->_IO_read_base != NULL));
79+
diff --color -urp m4-1.4.18.orig/lib/fseeko.c m4-1.4.18/lib/fseeko.c
80+
--- m4-1.4.18.orig/lib/fseeko.c 2016-12-31 13:54:41.000000000 +0000
81+
+++ m4-1.4.18/lib/fseeko.c 2021-09-11 03:47:08.623555635 +0000
82+
@@ -47,7 +47,7 @@ fseeko (FILE *fp, off_t offset, int when
83+
#endif
84+
85+
/* These tests are based on fpurge.c. */
86+
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
87+
+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
88+
if (fp->_IO_read_end == fp->_IO_read_ptr
89+
&& fp->_IO_write_ptr == fp->_IO_write_base
90+
&& fp->_IO_save_base == NULL)
91+
@@ -123,7 +123,7 @@ fseeko (FILE *fp, off_t offset, int when
92+
return -1;
93+
}
94+
95+
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
96+
+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
97+
fp->_flags &= ~_IO_EOF_SEEN;
98+
fp->_offset = pos;
99+
#elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
100+
diff --color -urp m4-1.4.18.orig/lib/stdio-impl.h m4-1.4.18/lib/stdio-impl.h
101+
--- m4-1.4.18.orig/lib/stdio-impl.h 2016-12-31 13:54:42.000000000 +0000
102+
+++ m4-1.4.18/lib/stdio-impl.h 2021-09-11 03:47:08.623555635 +0000
103+
@@ -18,6 +18,12 @@
104+
the same implementation of stdio extension API, except that some fields
105+
have different naming conventions, or their access requires some casts. */
106+
107+
+/* Glibc 2.28 made _IO_IN_BACKUP private. For now, work around this
108+
+ problem by defining it ourselves. FIXME: Do not rely on glibc
109+
+ internals. */
110+
+#if !defined _IO_IN_BACKUP && defined _IO_EOF_SEEN
111+
+# define _IO_IN_BACKUP 0x100
112+
+#endif
113+
114+
/* BSD stdio derived implementations. */
115+

0 commit comments

Comments
 (0)