Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Eric Sandall (f6bca50c3f9f8f89ee709a316a28be5e55e5b989)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Eric Sandall <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Eric Sandall (f6bca50c3f9f8f89ee709a316a28be5e55e5b989)
  • Date: Thu, 13 Sep 2018 08:37:21 +0000

GIT changes to master grimoire by Eric Sandall <sandalle AT sourcemage.org>:

devel/m4/HISTORY | 5 +
devel/m4/PRE_BUILD | 4 +
devel/m4/glibc-2.28.patch | 116
++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 125 insertions(+)

New commits:
commit f6bca50c3f9f8f89ee709a316a28be5e55e5b989
Author: Eric Sandall <sandalle AT sourcemage.org>
Commit: Eric Sandall <sandalle AT sourcemage.org>

m4: Fix compilation against glibc 2.28

See
https://github.com/coreutils/gnulib/commit/4af4a4a71827c0bc5e0ec67af23edef4f15cee8e#diff-5bcce8ce55246264586c4aed2a45ff89

diff --git a/devel/m4/HISTORY b/devel/m4/HISTORY
index 6a04114..0be8abc 100644
--- a/devel/m4/HISTORY
+++ b/devel/m4/HISTORY
@@ -1,3 +1,8 @@
+2018-09-13 Eric Sandall <sandalle AT sourcemage.org>
+ * glibc-2.28.patch: Fix compilation against glibc 2.28
+ See
https://github.com/coreutils/gnulib/commit/4af4a4a71827c0bc5e0ec67af23edef4f15cee8e#diff-5bcce8ce55246264586c4aed2a45ff89
+ * PRE_BUILD: Apply glibc-2.28.patch
+
2017-01-01 Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>
* DETAILS: version 1.4.18

diff --git a/devel/m4/PRE_BUILD b/devel/m4/PRE_BUILD
new file mode 100755
index 0000000..5b327d0
--- /dev/null
+++ b/devel/m4/PRE_BUILD
@@ -0,0 +1,4 @@
+default_pre_build &&
+cd "${SOURCE_DIRECTORY}" &&
+message "${MESSAGE_COLOR}Applying glibc 2.28 patch...${DEFAULT_COLOR}" &&
+patch -p1 < "${SPELL_DIRECTORY}"/glibc-2.28.patch
diff --git a/devel/m4/glibc-2.28.patch b/devel/m4/glibc-2.28.patch
new file mode 100644
index 0000000..10e81bf
--- /dev/null
+++ b/devel/m4/glibc-2.28.patch
@@ -0,0 +1,116 @@
+# See
https://github.com/coreutils/gnulib/commit/4af4a4a71827c0bc5e0ec67af23edef4f15cee8e#diff-5bcce8ce55246264586c4aed2a45ff89
+diff -Naur m4-1.4.18.orig/lib/fflush.c m4-1.4.18/lib/fflush.c
+--- m4-1.4.18.orig/lib/fflush.c 2018-09-13 01:24:12.169871830 -0700
++++ m4-1.4.18/lib/fflush.c 2018-09-13 01:24:38.925537338 -0700
+@@ -33,7 +33,7 @@
+ #undef fflush
+
+
+-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS,
Haiku, Linux libc5 */
++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku,
Linux libc5 */
+
+ /* Clear the stream's ungetc buffer, preserving the value of ftello (fp).
*/
+ static void
+@@ -72,7 +72,7 @@
+
+ #endif
+
+-#if ! (defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS,
Haiku, Linux libc5 */)
++#if ! (defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS,
Haiku, Linux libc5 */)
+
+ # if (defined __sferror || defined __DragonFly__ || defined __ANDROID__) &&
defined __SNPT
+ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
+@@ -148,7 +148,7 @@
+ if (stream == NULL || ! freading (stream))
+ return fflush (stream);
+
+-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS,
Haiku, Linux libc5 */
++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku,
Linux libc5 */
+
+ clear_ungetc_buffer_preserving_position (stream);
+
+diff -Naur m4-1.4.18.orig/lib/fpending.c m4-1.4.18/lib/fpending.c
+--- m4-1.4.18.orig/lib/fpending.c 2018-09-13 01:24:12.168871843 -0700
++++ m4-1.4.18/lib/fpending.c 2018-09-13 01:24:38.925537338 -0700
+@@ -32,7 +32,7 @@
+ /* Most systems provide FILE as a struct and the necessary bitmask in
+ <stdio.h>, because they need it for implementing getc() and putc() as
+ fast macros. */
+-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS,
Haiku, Linux libc5 */
++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku,
Linux libc5 */
+ return fp->_IO_write_ptr - fp->_IO_write_base;
+ #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
+ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
+diff -Naur m4-1.4.18.orig/lib/fpurge.c m4-1.4.18/lib/fpurge.c
+--- m4-1.4.18.orig/lib/fpurge.c 2018-09-13 01:24:12.174871768 -0700
++++ m4-1.4.18/lib/fpurge.c 2018-09-13 01:24:38.925537338 -0700
+@@ -62,7 +62,7 @@
+ /* Most systems provide FILE as a struct and the necessary bitmask in
+ <stdio.h>, because they need it for implementing getc() and putc() as
+ fast macros. */
+-# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS,
Haiku, Linux libc5 */
++# if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku,
Linux libc5 */
+ fp->_IO_read_end = fp->_IO_read_ptr;
+ fp->_IO_write_ptr = fp->_IO_write_base;
+ /* Avoid memory leak when there is an active ungetc buffer. */
+diff -Naur m4-1.4.18.orig/lib/freadahead.c m4-1.4.18/lib/freadahead.c
+--- m4-1.4.18.orig/lib/freadahead.c 2018-09-13 01:24:12.173871780 -0700
++++ m4-1.4.18/lib/freadahead.c 2018-09-13 01:24:38.926537326 -0700
+@@ -25,7 +25,7 @@
+ size_t
+ freadahead (FILE *fp)
+ {
+-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS,
Haiku, Linux libc5 */
++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku,
Linux libc5 */
+ if (fp->_IO_write_ptr > fp->_IO_write_base)
+ return 0;
+ return (fp->_IO_read_end - fp->_IO_read_ptr)
+diff -Naur m4-1.4.18.orig/lib/freading.c m4-1.4.18/lib/freading.c
+--- m4-1.4.18.orig/lib/freading.c 2018-09-13 01:24:12.173871780 -0700
++++ m4-1.4.18/lib/freading.c 2018-09-13 01:24:38.926537326 -0700
+@@ -31,7 +31,7 @@
+ /* Most systems provide FILE as a struct and the necessary bitmask in
+ <stdio.h>, because they need it for implementing getc() and putc() as
+ fast macros. */
+-# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS,
Haiku, Linux libc5 */
++# if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku,
Linux libc5 */
+ return ((fp->_flags & _IO_NO_WRITES) != 0
+ || ((fp->_flags & (_IO_NO_READS | _IO_CURRENTLY_PUTTING)) == 0
+ && fp->_IO_read_base != NULL));
+diff -Naur m4-1.4.18.orig/lib/fseeko.c m4-1.4.18/lib/fseeko.c
+--- m4-1.4.18.orig/lib/fseeko.c 2018-09-13 01:24:12.166871868 -0700
++++ m4-1.4.18/lib/fseeko.c 2018-09-13 01:24:38.926537326 -0700
+@@ -47,7 +47,7 @@
+ #endif
+
+ /* These tests are based on fpurge.c. */
+-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS,
Haiku, Linux libc5 */
++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku,
Linux libc5 */
+ if (fp->_IO_read_end == fp->_IO_read_ptr
+ && fp->_IO_write_ptr == fp->_IO_write_base
+ && fp->_IO_save_base == NULL)
+@@ -123,7 +123,7 @@
+ return -1;
+ }
+
+-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS,
Haiku, Linux libc5 */
++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku,
Linux libc5 */
+ fp->_flags &= ~_IO_EOF_SEEN;
+ fp->_offset = pos;
+ #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
+diff -Naur m4-1.4.18.orig/lib/stdio-impl.h m4-1.4.18/lib/stdio-impl.h
+--- m4-1.4.18.orig/lib/stdio-impl.h 2018-09-13 01:24:12.166871868 -0700
++++ m4-1.4.18/lib/stdio-impl.h 2018-09-13 01:28:52.315369530 -0700
+@@ -18,6 +18,12 @@
+ the same implementation of stdio extension API, except that some fields
+ have different naming conventions, or their access requires some casts.
*/
+
++/* Glibc 2.28 made _IO_IN_BACKUP private. For now, work around this
++ * problem by defining it ourselves. FIXME: Do not rely on glibc
++ * internals. */
++#if !defined _IO_IN_BACKUP && defined _IO_EOF_SEEN
++# define _IO_IN_BACKUP 0x100
++#endif
+
+ /* BSD stdio derived implementations. */
+



  • [SM-Commit] GIT changes to master grimoire by Eric Sandall (f6bca50c3f9f8f89ee709a316a28be5e55e5b989), Eric Sandall, 09/13/2018

Archive powered by MHonArc 2.6.24.

Top of Page