Skip to content

Commit

Permalink
Patch updates for latest gnulib
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchcapper committed Nov 27, 2024
1 parent 7224ffa commit 127ba08
Show file tree
Hide file tree
Showing 14 changed files with 275 additions and 1,166 deletions.
18 changes: 9 additions & 9 deletions patches/patches_GNULIB_BUILD_AUX_HANDLE_DOT_A_LIBS.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/build-aux/ar-lib b/build-aux/ar-lib
index 17de55e79c..33f0b676ef 100644
index 1521987496..fa651e18a5 100644
--- a/build-aux/ar-lib
+++ b/build-aux/ar-lib
@@ -1,6 +1,11 @@
Expand All @@ -12,9 +12,9 @@ index 17de55e79c..33f0b676ef 100644
+ . "$(dirname "$(readlink -f "$0")")/wrapper_helper.sh" "$@"
+fi
me=ar-lib
scriptversion=2019-07-04.01; # UTC
scriptversion=2024-06-19.01; # UTC

@@ -29,6 +34,14 @@ scriptversion=2019-07-04.01; # UTC
@@ -29,6 +34,14 @@ scriptversion=2024-06-19.01; # UTC
# bugs to <[email protected]> or send patches to
# <[email protected]>.

Expand Down Expand Up @@ -57,7 +57,7 @@ index 17de55e79c..33f0b676ef 100644
done
}

@@ -205,7 +223,7 @@ if test -n "$delete"; then
@@ -209,7 +227,7 @@ if test -n "$delete"; then
;;
*)
func_file_conv "$1"
Expand All @@ -66,7 +66,7 @@ index 17de55e79c..33f0b676ef 100644
;;
esac
done
@@ -223,15 +241,15 @@ elif test -n "$extract"; then
@@ -227,15 +245,15 @@ elif test -n "$extract"; then
;;
*)
func_file_conv "$1"
Expand All @@ -85,7 +85,7 @@ index 17de55e79c..33f0b676ef 100644
done
fi

@@ -262,14 +280,14 @@ elif test -n "$quick$replace"; then
@@ -266,14 +284,14 @@ elif test -n "$quick$replace"; then
done

if test -n "$orig_archive"; then
Expand All @@ -104,7 +104,7 @@ index 17de55e79c..33f0b676ef 100644
+ func_ar_run -LIST ${COLOR_MAJOR}"$archive"${COLOR_NONE}
fi
diff --git a/build-aux/compile b/build-aux/compile
index ba883b54aa..4e9157a535 100644
index 49b3d05fde..a88792bed9 100644
--- a/build-aux/compile
+++ b/build-aux/compile
@@ -1,5 +1,10 @@
Expand All @@ -116,7 +116,7 @@ index ba883b54aa..4e9157a535 100644
+ . "$(dirname "$(readlink -f "$0")")/wrapper_helper.sh" "$@"
+fi

scriptversion=2018-03-07.03; # UTC
scriptversion=2024-06-19.01; # UTC

@@ -49,6 +54,10 @@ func_file_conv ()
/ | /[!/]*) # absolute file, and not a UNC file
Expand Down Expand Up @@ -242,7 +242,7 @@ index ba883b54aa..4e9157a535 100644
do
@@ -145,16 +189,32 @@ func_cl_wrapper ()
case $2 in
*.o | *.[oO][bB][jJ])
*.o | *.lo | *.[oO][bB][jJ])
func_file_conv "$2"
- set x "$@" -Fo"$file"
+ set x "$@" -Fo${COLOR_MAJOR}"$file"${COLOR_NONE}
Expand Down
4 changes: 2 additions & 2 deletions patches/patches_GNULIB_FIX_SYSSTAT_TIMESPEC_DISABLE_BUG.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/lib/sys_stat.in.h b/lib/sys_stat.in.h
index ad4da17fa4..da61a13df1 100644
index 81138bce25..3139abaefc 100644
--- a/lib/sys_stat.in.h
+++ b/lib/sys_stat.in.h
@@ -143,9 +143,10 @@ struct stat
@@ -170,9 +170,10 @@ struct stat
# define st_ctime st_ctim.tv_sec
/* Indicator, for gnulib internal purposes. */
# define _GL_WINDOWS_STAT_TIMESPEC 1
Expand Down
11 changes: 1 addition & 10 deletions patches/patches_GNULIB_FTS_MINOR_FIXES.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/lib/fts.c b/lib/fts.c
index faeb4b20a5..f2bb85552a 100644
index 92306bc72f..2073e4ff6b 100644
--- a/lib/fts.c
+++ b/lib/fts.c
@@ -123,6 +123,9 @@ static char sccsid[] = "@(#)fts.c 8.6 (Berkeley) 8/14/94";
Expand All @@ -12,12 +12,3 @@ index faeb4b20a5..f2bb85552a 100644

enum
{
@@ -1864,7 +1867,7 @@ fts_sort (FTS *sp, FTSENT *head, register size_t nitems)
FTSENT *dummy;
int (*compare) (void const *, void const *) =
((sizeof &dummy == sizeof (void *)
- && (long int) &dummy == (long int) (void *) &dummy)
+ && (long long int) &dummy == (long long int) (void *) &dummy)
? (int (*) (void const *, void const *)) sp->fts_compar
: fts_compar);

14 changes: 7 additions & 7 deletions patches/patches_GNULIB_GNULIB_TOOL_APPLY_PATCHES_BY_FILE.patch
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
diff --git a/gnulib-tool b/gnulib-tool
index ae1b17f4dd..7b38761978 100644
--- a/gnulib-tool
+++ b/gnulib-tool
@@ -1793,7 +1793,7 @@ func_lookup_file ()
diff --git a/gnulib-tool.sh b/gnulib-tool.sh
index d4f8792898..0e291be22e 100644
--- a/gnulib-tool.sh
+++ b/gnulib-tool.sh
@@ -1825,7 +1825,7 @@ func_lookup_file ()
IFS="$PATH_SEPARATOR"
for patchfile in $lkpatches; do
IFS="$save_IFS"
IFS="$saved_IFS"
- patch -s "$tmp/$lkbase" < "$patchfile" >&2 \
+ patch --ignore-whitespace -i "$patchfile" "$tmp/$lkbase" >&2 \
|| func_fatal_error "patch file $patchfile didn't apply cleanly"
done
IFS="$save_IFS"
IFS="$saved_IFS"
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
diff --git a/m4/printf.m4 b/m4/printf.m4
index 8b8f01067f..198e3363b7 100644
index 4c3e8ecf2d..e1d99ea315 100644
--- a/m4/printf.m4
+++ b/m4/printf.m4
@@ -908,6 +908,7 @@ int main ()
@@ -931,6 +931,7 @@ int main ()
{
int count = -1;
#ifdef _MSC_VER
+ _set_error_mode(1); #1 being _OUT_TO_STDERR, disable abort/retry/ignore popup in debug mode
_set_invalid_parameter_handler (invalid_parameter_handler);
#endif
/* Copy the format string. Some systems (glibc with _FORTIFY_SOURCE=2)
/* Also avoid an Abort/Retry/Ignore dialog in debug builds.
<https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/crtsetreportmode> */
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
diff --git a/lib/dirchownmod.c b/lib/dirchownmod.c
index b3dbac3374..992b810c97 100644
index d5f7b5432a..42ab816fa8 100644
--- a/lib/dirchownmod.c
+++ b/lib/dirchownmod.c
@@ -62,6 +62,7 @@ dirchownmod (int fd, char const *dir, mode_t mkdir_mode,
@@ -68,6 +68,7 @@ dirchownmod (int fd, char const *dir, mode_t mkdir_mode,
uid_t owner, gid_t group,
mode_t mode, mode_t mode_bits)
{
+#ifndef _WIN32
struct stat st;
int result = (fd < 0 ? stat (dir, &st) : fstat (fd, &st));

@@ -138,4 +139,7 @@ dirchownmod (int fd, char const *dir, mode_t mkdir_mode,
@@ -144,4 +145,7 @@ dirchownmod (int fd, char const *dir, mode_t mkdir_mode,
}

return result;
Expand All @@ -19,7 +19,7 @@ index b3dbac3374..992b810c97 100644
+#endif
}
diff --git a/lib/idcache.c b/lib/idcache.c
index ff1233aa17..2a2d8b6202 100644
index ccaf56dad2..239a332746 100644
--- a/lib/idcache.c
+++ b/lib/idcache.c
@@ -22,8 +22,10 @@
Expand Down Expand Up @@ -107,10 +107,10 @@ index ff1233aa17..2a2d8b6202 100644
+ #endif
}
diff --git a/lib/savewd.c b/lib/savewd.c
index 4eddba32dc..dcddb342a0 100644
index 3a0361425a..301127e7e0 100644
--- a/lib/savewd.c
+++ b/lib/savewd.c
@@ -70,7 +70,11 @@ savewd_save (struct savewd *wd)
@@ -87,7 +87,11 @@ savewd_save (struct savewd *wd)
/* "Save" the initial working directory by forking a new
subprocess that will attempt all the work from the chdir
until the next savewd_restore. */
Expand All @@ -122,7 +122,7 @@ index 4eddba32dc..dcddb342a0 100644
if (wd->val.child != 0)
{
if (0 < wd->val.child)
@@ -204,8 +208,12 @@ savewd_restore (struct savewd *wd, int status)
@@ -221,8 +225,12 @@ savewd_restore (struct savewd *wd, int status)
if (0 < child)
{
int child_status;
Expand All @@ -136,7 +136,7 @@ index 4eddba32dc..dcddb342a0 100644
if (! WIFEXITED (child_status))
raise (WTERMSIG (child_status));
diff --git a/lib/userspec.c b/lib/userspec.c
index 5958883ff4..b0912df1fc 100644
index 833f7f58d7..1f992e083a 100644
--- a/lib/userspec.c
+++ b/lib/userspec.c
@@ -24,8 +24,12 @@
Expand Down
8 changes: 4 additions & 4 deletions patches/patches_GNULIB_PHYSMEM_TEST_MAIN_RENAME.patch
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
diff --git a/lib/physmem.c b/lib/physmem.c
index 398f99b727..15a3f0898e 100644
index 5c226b8abf..b640a7706e 100644
--- a/lib/physmem.c
+++ b/lib/physmem.c
@@ -313,7 +313,7 @@ physmem_available (void)
@@ -398,7 +398,7 @@ physmem_available (void)
return physmem_claimable (0.0);
}


-#if DEBUG
+#if TEST

# include <stdio.h>
# include <stdlib.h>
@@ -325,7 +325,7 @@ main (void)
@@ -410,7 +410,7 @@ main (void)
exit (0);
}

Expand Down
12 changes: 6 additions & 6 deletions patches/patches_GNULIB_SPAWN_PIPE_FORK_FD_FIXES.patch
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
diff --git a/lib/pipe.c b/lib/pipe.c
index e8573ed97f..ea11ab21fa 100644
index 167d8f8c5e..92a8e602bb 100644
--- a/lib/pipe.c
+++ b/lib/pipe.c
@@ -34,7 +34,7 @@ pipe (int fd[2])
/* Mingw changes fd to {-1,-1} on failure, but this violates
http://austingroupbugs.net/view.php?id=467 */
https://austingroupbugs.net/view.php?id=467 */
int tmp[2];
- int result = _pipe (tmp, 4096, _O_BINARY);
+ int result = _pipe (tmp, 4096, _O_BINARY | _O_NOINHERIT);
if (!result)
{
fd[0] = tmp[0];
diff --git a/lib/spawn-pipe.c b/lib/spawn-pipe.c
index d2d21e6e8e..e730c9dedc 100644
index fe60646c43..d9e44d0161 100644
--- a/lib/spawn-pipe.c
+++ b/lib/spawn-pipe.c
@@ -593,7 +593,7 @@ create_pipe (const char *progname,
@@ -596,7 +596,7 @@ create_pipe (const char *progname,
fail_with_saved_errno:
if (exit_on_error || !null_stderr)
error (exit_on_error ? EXIT_FAILURE : 0, saved_errno,
Expand All @@ -25,7 +25,7 @@ index d2d21e6e8e..e730c9dedc 100644
return -1;
}
diff --git a/lib/spawn_faction_addclose.c b/lib/spawn_faction_addclose.c
index c87a23794b..9087ac4af1 100644
index af1e77a0d4..f4685fbacd 100644
--- a/lib/spawn_faction_addclose.c
+++ b/lib/spawn_faction_addclose.c
@@ -15,7 +15,12 @@
Expand Down Expand Up @@ -60,7 +60,7 @@ index c87a23794b..9087ac4af1 100644
return posix_spawn_file_actions_addclose (file_actions, fd);
#else
diff --git a/lib/w32sock.h b/lib/w32sock.h
index 84e46e3356..8ffd214597 100644
index 166a5f777e..18a6d781ec 100644
--- a/lib/w32sock.h
+++ b/lib/w32sock.h
@@ -33,7 +33,7 @@
Expand Down
14 changes: 7 additions & 7 deletions patches/patches_GNULIB_WIN32_POLL_FIXES.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/lib/poll.c b/lib/poll.c
index ec8d2c2b55..80a68aff03 100644
index 37cb2d7ba4..292d3b3b99 100644
--- a/lib/poll.c
+++ b/lib/poll.c
@@ -364,6 +364,11 @@ compute_revents (int fd, int sought, fd_set *rfds, fd_set *wfds, fd_set *efds)
@@ -359,6 +359,11 @@ compute_revents (int fd, int sought, fd_set *rfds, fd_set *wfds, fd_set *efds)
}
#endif /* !MinGW */

Expand All @@ -14,7 +14,7 @@ index ec8d2c2b55..80a68aff03 100644
int
poll (struct pollfd *pfd, nfds_t nfd, int timeout)
{
@@ -463,11 +468,13 @@ poll (struct pollfd *pfd, nfds_t nfd, int timeout)
@@ -458,11 +463,13 @@ poll (struct pollfd *pfd, nfds_t nfd, int timeout)
return rc;
#else
static struct timeval tv0;
Expand All @@ -29,7 +29,7 @@ index ec8d2c2b55..80a68aff03 100644
BOOL poll_again;
MSG msg;
int rc = 0;
@@ -539,6 +546,9 @@ restart:
@@ -534,6 +541,9 @@ restart:
timeout = 0;
}
}
Expand All @@ -39,7 +39,7 @@ index ec8d2c2b55..80a68aff03 100644

if (select (0, &rfds, &wfds, &xfds, &tv0) > 0)
{
@@ -575,8 +585,13 @@ restart:
@@ -570,8 +580,13 @@ restart:
break;
}

Expand All @@ -55,7 +55,7 @@ index ec8d2c2b55..80a68aff03 100644

/* Place a sentinel at the end of the array. */
handle_array[nhandles] = NULL;
@@ -632,3 +647,21 @@ restart:
@@ -627,3 +642,21 @@ restart:
return rc;
#endif
}
Expand All @@ -79,7 +79,7 @@ index ec8d2c2b55..80a68aff03 100644
+}
\ No newline at end of file
diff --git a/lib/poll.in.h b/lib/poll.in.h
index 75ca21f4cc..2d57f3ffdb 100644
index 29b2d26150..48a2f7565c 100644
--- a/lib/poll.in.h
+++ b/lib/poll.in.h
@@ -124,7 +124,7 @@ _GL_WARN_ON_USE (poll, "poll is unportable - "
Expand Down
Loading

0 comments on commit 127ba08

Please sign in to comment.