From: RISCi_ATOM Date: Sun, 30 Sep 2018 19:56:11 +0000 (-0400) Subject: Pull in updated {bison,m4,e2fsprogs,findutils} to fix build issues with newer glibc. X-Git-Tag: v1.4.5~9 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=7999efaebf6a8e6b571369490b59062df0848dd7;p=librecmc%2Flibrecmc.git Pull in updated {bison,m4,e2fsprogs,findutils} to fix build issues with newer glibc. --- diff --git a/tools/bison/Makefile b/tools/bison/Makefile index af5737c552..68e06ae33b 100644 --- a/tools/bison/Makefile +++ b/tools/bison/Makefile @@ -1,4 +1,4 @@ -# +# # Copyright (C) 2008-2015 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. @@ -7,11 +7,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=bison -PKG_VERSION:=3.0.4 +PKG_VERSION:=3.0.5 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@GNU/$(PKG_NAME) -PKG_HASH:=a72428c7917bdf9fa93cb8181c971b6e22834125848cf1d03ce10b1bb0716fe1 +PKG_HASH:=075cef2e814642e30e10e8155e93022e4a91ca38a65aa1d5467d4e969f97f338 HOST_BUILD_PARALLEL:=1 diff --git a/tools/bison/patches/100-fix-gets-removal.patch b/tools/bison/patches/100-fix-gets-removal.patch index 20b18cf2e7..563c12040c 100644 --- a/tools/bison/patches/100-fix-gets-removal.patch +++ b/tools/bison/patches/100-fix-gets-removal.patch @@ -1,6 +1,8 @@ +diff --git a/lib/stdio.in.h b/lib/stdio.in.h +index ff7c9c8..f391832 100644 --- a/lib/stdio.in.h +++ b/lib/stdio.in.h -@@ -719,13 +719,6 @@ +@@ -739,14 +739,6 @@ _GL_WARN_ON_USE (getline, "getline is unportable - " # endif #endif @@ -8,9 +10,10 @@ - so any use of gets warrants an unconditional warning; besides, C11 - removed it. */ -#undef gets --#if HAVE_RAW_DECL_GETS +-#if HAVE_RAW_DECL_GETS && !defined __cplusplus -_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); -#endif - - +- #if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@ + struct obstack; + /* Grow an obstack with formatted output. Return the number of diff --git a/tools/e2fsprogs/Makefile b/tools/e2fsprogs/Makefile index c5bdb1c0d4..f11ce52ca0 100644 --- a/tools/e2fsprogs/Makefile +++ b/tools/e2fsprogs/Makefile @@ -8,17 +8,21 @@ include $(TOPDIR)/rules.mk PKG_NAME:=e2fsprogs -PKG_VERSION:=1.43.3 -PKG_HASH:=ce8ef1bbb0d4730f170167284fda156ac9d6bf18db2750eb94af619a81b19927 -PKG_RELEASE:=2 +PKG_CPE_ID:=cpe:/a:e2fsprogs_project:e2fsprogs +PKG_VERSION:=1.44.4 +PKG_HASH:=ee03b2f2180614c5ae5f6dd2666f8808de61c3d8b37d22ba86cc6daea25be55a +PKG_RELEASE:=1 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=@SF/e2fsprogs +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_SOURCE_URL:=@KERNEL/linux/kernel/people/tytso/e2fsprogs/v$(PKG_VERSION)/ HOST_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/host-build.mk +ifneq ($(shell $(HOSTCC) --version | grep clang),) + HOST_CFLAGS += -D__GNUC_PREREQ\(...\)=0 +endif HOST_CFLAGS += $(FPIC) HOST_CONFIGURE_ARGS += \ diff --git a/tools/e2fsprogs/patches/004-darwin-compat.patch b/tools/e2fsprogs/patches/004-darwin-compat.patch new file mode 100644 index 0000000000..d84aa121ca --- /dev/null +++ b/tools/e2fsprogs/patches/004-darwin-compat.patch @@ -0,0 +1,22 @@ +--- a/lib/blkid/blkid_types.h.in ++++ b/lib/blkid/blkid_types.h.in +@@ -9,6 +9,8 @@ + + @ASM_TYPES_HEADER@ + ++#include ++ + #ifndef HAVE___U8 + #define HAVE___U8 + #ifdef __U8_TYPEDEF +--- a/lib/ext2fs/ext2_types.h.in ++++ b/lib/ext2fs/ext2_types.h.in +@@ -9,6 +9,8 @@ + + @ASM_TYPES_HEADER@ + ++#include ++ + #ifndef HAVE___U8 + #define HAVE___U8 + #ifdef __U8_TYPEDEF diff --git a/tools/e2fsprogs/patches/004-freebsd-compat.patch b/tools/e2fsprogs/patches/004-freebsd-compat.patch deleted file mode 100644 index d102e1cd9c..0000000000 --- a/tools/e2fsprogs/patches/004-freebsd-compat.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/lib/ext2fs/tdb.c -+++ b/lib/ext2fs/tdb.c -@@ -58,7 +58,9 @@ Last Changed Date: 2007-06-22 13:36:10 - - #include - #endif - #include -+#ifndef __FreeBSD__ - #include -+#endif - #include - - #ifdef HAVE_SYS_MMAN_H diff --git a/tools/e2fsprogs/patches/005-darwin-compat.patch b/tools/e2fsprogs/patches/005-darwin-compat.patch deleted file mode 100644 index d84aa121ca..0000000000 --- a/tools/e2fsprogs/patches/005-darwin-compat.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/lib/blkid/blkid_types.h.in -+++ b/lib/blkid/blkid_types.h.in -@@ -9,6 +9,8 @@ - - @ASM_TYPES_HEADER@ - -+#include -+ - #ifndef HAVE___U8 - #define HAVE___U8 - #ifdef __U8_TYPEDEF ---- a/lib/ext2fs/ext2_types.h.in -+++ b/lib/ext2fs/ext2_types.h.in -@@ -9,6 +9,8 @@ - - @ASM_TYPES_HEADER@ - -+#include -+ - #ifndef HAVE___U8 - #define HAVE___U8 - #ifdef __U8_TYPEDEF diff --git a/tools/e2fsprogs/patches/005-misc-rename-copy_file_range-to-copy_file_chunk.patch b/tools/e2fsprogs/patches/005-misc-rename-copy_file_range-to-copy_file_chunk.patch deleted file mode 100644 index bd6ee81b90..0000000000 --- a/tools/e2fsprogs/patches/005-misc-rename-copy_file_range-to-copy_file_chunk.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 01551bdba16ab16512a01affe02ade32c41ede8a Mon Sep 17 00:00:00 2001 -From: Palmer Dabbelt -Date: Fri, 29 Dec 2017 10:19:51 -0800 -Subject: [PATCH] misc: rename copy_file_range to copy_file_chunk - -As of 2.27, glibc will have a copy_file_range library call to wrap the -new copy_file_range system call. This conflicts with the function in -misc/create_inode.c, which this patch renames _copy_file_range. - -Signed-off-by: Palmer Dabbelt -Signed-off-by: Theodore Ts'o ---- - misc/create_inode.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - ---- a/misc/create_inode.c -+++ b/misc/create_inode.c -@@ -392,7 +392,7 @@ static ssize_t my_pread(int fd, void *bu - } - #endif /* !defined HAVE_PREAD64 && !defined HAVE_PREAD */ - --static errcode_t copy_file_range(ext2_filsys fs, int fd, ext2_file_t e2_file, -+static errcode_t copy_file_chunk(ext2_filsys fs, int fd, ext2_file_t e2_file, - off_t start, off_t end, char *buf, - char *zerobuf) - { -@@ -466,7 +466,7 @@ static errcode_t try_lseek_copy(ext2_fil - - data_blk = data & ~(fs->blocksize - 1); - hole_blk = (hole + (fs->blocksize - 1)) & ~(fs->blocksize - 1); -- err = copy_file_range(fs, fd, e2_file, data_blk, hole_blk, buf, -+ err = copy_file_chunk(fs, fd, e2_file, data_blk, hole_blk, buf, - zerobuf); - if (err) - return err; -@@ -516,7 +516,7 @@ static errcode_t try_fiemap_copy(ext2_fi - } - for (i = 0, ext = ext_buf; i < fiemap_buf->fm_mapped_extents; - i++, ext++) { -- err = copy_file_range(fs, fd, e2_file, ext->fe_logical, -+ err = copy_file_chunk(fs, fd, e2_file, ext->fe_logical, - ext->fe_logical + ext->fe_length, - buf, zerobuf); - if (err) -@@ -569,7 +569,7 @@ static errcode_t copy_file(ext2_filsys f - goto out; - #endif - -- err = copy_file_range(fs, fd, e2_file, 0, statbuf->st_size, buf, -+ err = copy_file_chunk(fs, fd, e2_file, 0, statbuf->st_size, buf, - zerobuf); - out: - ext2fs_free_mem(&zerobuf); diff --git a/tools/e2fsprogs/patches/010-old-libmagic.patch b/tools/e2fsprogs/patches/010-old-libmagic.patch deleted file mode 100644 index 9156b73372..0000000000 --- a/tools/e2fsprogs/patches/010-old-libmagic.patch +++ /dev/null @@ -1,25 +0,0 @@ -From b482eb7af94885b6bbad9329e40702c958d5b448 Mon Sep 17 00:00:00 2001 -From: Hauke Mehrtens -Date: Thu, 30 Jun 2016 19:53:03 +0200 -Subject: [PATCH] fix build problem with very old libmagic - -The libmagic shipped with RedHat 5 does not define -MAGIC_NO_CHECK_ELF and MAGIC_NO_CHECK_COMPRESS. e2fsprogs should -check for that otherwise the build will fail. - -Signed-off-by: Hauke Mehrtens ---- - lib/support/plausible.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/lib/support/plausible.c -+++ b/lib/support/plausible.c -@@ -247,7 +247,7 @@ int check_plausibility(const char *devic - return 0; - } - --#ifdef HAVE_MAGIC_H -+#if defined(HAVE_MAGIC_H) && defined(MAGIC_NO_CHECK_ELF) && defined(MAGIC_NO_CHECK_COMPRESS) - if ((flags & CHECK_FS_EXIST) && - !getenv("E2FSPROGS_LIBMAGIC_SUPPRESS") && - magic_library_available()) { diff --git a/tools/findutils/Makefile b/tools/findutils/Makefile index b07c53d9f6..c1c45eeaab 100644 --- a/tools/findutils/Makefile +++ b/tools/findutils/Makefile @@ -7,6 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=findutils +PKG_CPE_ID:=cpe:/a:gnu:findutils PKG_VERSION:=4.6.0 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz diff --git a/tools/findutils/patches/110-glibc-change-work-around.patch b/tools/findutils/patches/110-glibc-change-work-around.patch new file mode 100644 index 0000000000..91b69274c8 --- /dev/null +++ b/tools/findutils/patches/110-glibc-change-work-around.patch @@ -0,0 +1,104 @@ +Subject: Workaround change in glibc + +Temporary workaround to compile with glibc 2.28, which +deprecated some constants + +Based on the workaround made for the tools/m4 package + +--- a/gl/lib/stdio-impl.h ++++ b/gl/lib/stdio-impl.h +@@ -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. */ + +--- a/gl/lib/freadahead.c ++++ b/gl/lib/freadahead.c +@@ -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) +--- a/gl/lib/fseeko.c ++++ b/gl/lib/fseeko.c +@@ -47,7 +47,7 @@ fseeko (FILE *fp, off_t offset, int when + #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 @@ fseeko (FILE *fp, off_t offset, int when + 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__ +--- a/gl/lib/fflush.c ++++ b/gl/lib/fflush.c +@@ -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 @@ clear_ungetc_buffer (FILE *fp) + + #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 @@ rpl_fflush (FILE *stream) + 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); + +--- a/gl/lib/freading.c ++++ b/gl/lib/freading.c +@@ -31,7 +31,7 @@ freading (FILE *fp) + /* Most systems provide FILE as a struct and the necessary bitmask in + , 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)); +--- a/gl/lib/fpurge.c ++++ b/gl/lib/fpurge.c +@@ -62,7 +62,7 @@ fpurge (FILE *fp) + /* Most systems provide FILE as a struct and the necessary bitmask in + , 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 --git a/tools/m4/Makefile b/tools/m4/Makefile index 6fe9e0b6e6..a6d931b0fd 100644 --- a/tools/m4/Makefile +++ b/tools/m4/Makefile @@ -7,11 +7,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=m4 -PKG_VERSION:=1.4.17 +PKG_CPE_ID:=cpe:/a:gnu:m4 +PKG_VERSION:=1.4.18 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@GNU/$(PKG_NAME) -PKG_HASH:=f0543c3beb51fa6b3337d8025331591e0e18d8ec2886ed391f1aade43477d508 +PKG_HASH:=f2c1e86ca0a404ff281631bdc8377638992744b175afb806e25871a24a934e07 PKG_CAT:=xzcat HOST_BUILD_PARALLEL:=1 diff --git a/tools/m4/patches/001-fix-macos-vasnprintf.patch b/tools/m4/patches/001-fix-macos-vasnprintf.patch new file mode 100644 index 0000000000..e41315d34e --- /dev/null +++ b/tools/m4/patches/001-fix-macos-vasnprintf.patch @@ -0,0 +1,25 @@ +--- a/lib/vasnprintf.c ++++ b/lib/vasnprintf.c +@@ -4858,7 +4858,11 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t * + #endif + *fbp = dp->conversion; + #if USE_SNPRINTF +-# if !(((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) && !defined __UCLIBC__) || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)) ++# if ! (((__GLIBC__ > 2 \ ++ || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) \ ++ && !defined __UCLIBC__) \ ++ || (defined __APPLE__ && defined __MACH__) \ ++ || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)) + fbp[1] = '%'; + fbp[2] = 'n'; + fbp[3] = '\0'; +@@ -4872,6 +4876,9 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t * + in format strings in writable memory may crash the program + (if compiled with _FORTIFY_SOURCE=2), so we should avoid it + in this situation. */ ++ /* macOS 10.13 High Sierra behaves like glibc with ++ _FORTIFY_SOURCE=2, and older macOS releases ++ presumably do not need %n. */ + /* On native Windows systems (such as mingw), we can avoid using + %n because: + - Although the gl_SNPRINTF_TRUNCATION_C99 test fails, diff --git a/tools/m4/patches/010-glibc-change-work-around.patch b/tools/m4/patches/010-glibc-change-work-around.patch new file mode 100644 index 0000000000..0ef6216965 --- /dev/null +++ b/tools/m4/patches/010-glibc-change-work-around.patch @@ -0,0 +1,118 @@ +Subject: Workaround change in glibc + +Temporary workaround to compile with glibc 2.28, which +deprecated some constants + +Taken from the rpms/m4 Fedora repository, commit 814d5921 +(Work around change in glibc) + +Original filename: m4-1.4.18-glibc-change-work-around.patch + +--- a/lib/stdio-impl.h ++++ b/lib/stdio-impl.h +@@ -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. */ + +--- a/lib/fflush.c ++++ b/lib/fflush.c +@@ -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 @@ clear_ungetc_buffer (FILE *fp) + + #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 @@ rpl_fflush (FILE *stream) + 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); + +--- a/lib/fpending.c ++++ b/lib/fpending.c +@@ -32,7 +32,7 @@ __fpending (FILE *fp) + /* Most systems provide FILE as a struct and the necessary bitmask in + , 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 */ +--- a/lib/fpurge.c ++++ b/lib/fpurge.c +@@ -62,7 +62,7 @@ fpurge (FILE *fp) + /* Most systems provide FILE as a struct and the necessary bitmask in + , 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. */ +--- a/lib/freadahead.c ++++ b/lib/freadahead.c +@@ -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) +--- a/lib/freading.c ++++ b/lib/freading.c +@@ -31,7 +31,7 @@ freading (FILE *fp) + /* Most systems provide FILE as a struct and the necessary bitmask in + , 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)); +--- a/lib/fseeko.c ++++ b/lib/fseeko.c +@@ -47,7 +47,7 @@ fseeko (FILE *fp, off_t offset, int when + #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 @@ fseeko (FILE *fp, off_t offset, int when + 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 --git a/tools/m4/patches/100-fix-gets-removal.patch b/tools/m4/patches/100-fix-gets-removal.patch deleted file mode 100644 index ecd110d934..0000000000 --- a/tools/m4/patches/100-fix-gets-removal.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- a/lib/stdio.in.h -+++ b/lib/stdio.in.h -@@ -714,14 +714,6 @@ _GL_WARN_ON_USE (getline, "getline is un - # endif - #endif - --/* It is very rare that the developer ever has full control of stdin, -- so any use of gets warrants an unconditional warning; besides, C11 -- removed it. */ --#undef gets --#if HAVE_RAW_DECL_GETS --_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); --#endif -- - - #if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@ - struct obstack;