Skip to Content.
Sympa Menu

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

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 (0ff1c8b3c02bd66f2c2f4869ab936b0e0cc79606)
  • Date: Thu, 13 Sep 2018 15:36:14 +0000

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

utils/findutils/HISTORY | 6 +
utils/findutils/PRE_BUILD | 4 +
utils/findutils/glibc-2.28.patch | 121
+++++++++++++++++++++++++++++++++++++++
3 files changed, 131 insertions(+)

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

findutils: Fix compilation with glibc 2.28

See http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=patch;h=4af4a4a7
and
http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=4da63c58

diff --git a/utils/findutils/HISTORY b/utils/findutils/HISTORY
index be0d3ce..02106a7 100644
--- a/utils/findutils/HISTORY
+++ b/utils/findutils/HISTORY
@@ -1,3 +1,9 @@
+2018-09-13 Eric Sandall <sandalle AT sourcemage.org>
+ * glibc-2.28.patch: Fix compilation with glibc 2.28
+ See
http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=patch;h=4af4a4a7
+ and
http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=4da63c58
+ * PRE_BUILD: Apply glibc-2.28.patch
+
2016-01-08 Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>
* DETAILS: version 4.6.0

diff --git a/utils/findutils/PRE_BUILD b/utils/findutils/PRE_BUILD
new file mode 100755
index 0000000..5b327d0
--- /dev/null
+++ b/utils/findutils/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/utils/findutils/glibc-2.28.patch
b/utils/findutils/glibc-2.28.patch
new file mode 100644
index 0000000..5cf2fe6
--- /dev/null
+++ b/utils/findutils/glibc-2.28.patch
@@ -0,0 +1,121 @@
+# See http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=patch;h=4af4a4a7
+# and
http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=4da63c58
+diff -Naur findutils-4.6.0.orig/gl/lib/fflush.c
findutils-4.6.0/gl/lib/fflush.c
+--- findutils-4.6.0.orig/gl/lib/fflush.c 2018-09-13 08:15:22.228453656
-0700
++++ findutils-4.6.0/gl/lib/fflush.c 2018-09-13 08:15:38.260253231 -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 findutils-4.6.0.orig/gl/lib/fpurge.c
findutils-4.6.0/gl/lib/fpurge.c
+--- findutils-4.6.0.orig/gl/lib/fpurge.c 2018-09-13 08:15:22.230453631
-0700
++++ findutils-4.6.0/gl/lib/fpurge.c 2018-09-13 08:15:38.261253219 -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 findutils-4.6.0.orig/gl/lib/freadahead.c
findutils-4.6.0/gl/lib/freadahead.c
+--- findutils-4.6.0.orig/gl/lib/freadahead.c 2018-09-13 08:15:22.223453719
-0700
++++ findutils-4.6.0/gl/lib/freadahead.c 2018-09-13 08:15:38.261253219
-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 findutils-4.6.0.orig/gl/lib/freading.c
findutils-4.6.0/gl/lib/freading.c
+--- findutils-4.6.0.orig/gl/lib/freading.c 2018-09-13 08:15:22.228453656
-0700
++++ findutils-4.6.0/gl/lib/freading.c 2018-09-13 08:15:38.261253219 -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 findutils-4.6.0.orig/gl/lib/fseeko.c
findutils-4.6.0/gl/lib/fseeko.c
+--- findutils-4.6.0.orig/gl/lib/fseeko.c 2018-09-13 08:15:22.223453719
-0700
++++ findutils-4.6.0/gl/lib/fseeko.c 2018-09-13 08:15:38.261253219 -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 findutils-4.6.0.orig/gl/lib/mountlist.c
findutils-4.6.0/gl/lib/mountlist.c
+--- findutils-4.6.0.orig/gl/lib/mountlist.c 2018-09-13 08:15:22.226453681
-0700
++++ findutils-4.6.0/gl/lib/mountlist.c 2018-09-13 08:25:11.218090273 -0700
+@@ -37,6 +37,12 @@
+ # include <sys/param.h>
+ #endif
+
++#if MAJOR_IN_MKDEV
++# include <sys/mkdev.h>
++#elif MAJOR_IN_SYSMACROS
++# include <sys/sysmacros.h>
++#endif
++
+ #if defined MOUNTED_GETFSSTAT /* OSF_1 and Darwin1.3.x */
+ # if HAVE_SYS_UCRED_H
+ # include <grp.h> /* needed on OSF V4.0 for definition of NGROUPS,
+diff -Naur findutils-4.6.0.orig/gl/lib/stdio-impl.h
findutils-4.6.0/gl/lib/stdio-impl.h
+--- findutils-4.6.0.orig/gl/lib/stdio-impl.h 2018-09-13 08:15:22.215453819
-0700
++++ findutils-4.6.0/gl/lib/stdio-impl.h 2018-09-13 08:16:08.309877559
-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 (0ff1c8b3c02bd66f2c2f4869ab936b0e0cc79606), Eric Sandall, 09/13/2018

Archive powered by MHonArc 2.6.24.

Top of Page