From 21fe3ef399c25f030d6657e83cc635335f3a9f40 Mon Sep 17 00:00:00 2001 From: Zach van Rijn Date: Thu, 17 Aug 2023 20:58:19 -0500 Subject: user/gnucobol: bump { 3.1.2 --> 3.2 }. --- user/gnucobol/0002-errno.patch | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 user/gnucobol/0002-errno.patch (limited to 'user/gnucobol/0002-errno.patch') diff --git a/user/gnucobol/0002-errno.patch b/user/gnucobol/0002-errno.patch new file mode 100644 index 000000000..968190733 --- /dev/null +++ b/user/gnucobol/0002-errno.patch @@ -0,0 +1,26 @@ +See also: + +* https://git.adelielinux.org/adelie/packages/-/issues/1045#note_13472 + +--- a/cobc/cobc.c.gc32 Sat Jul 22 17:01:52 2023 ++++ b/cobc/cobc.c Thu Aug 17 23:01:33 2023 +@@ -2358,6 +2358,10 @@ + DECLNORET static void COB_A_NORETURN + cobc_terminate (const char *str) + { ++ /* must be executed before anything that may adjust errno, ... ++ like the listing code below. */ ++ const char *errno_str = cb_get_strerror (); ++ + if (cb_src_list_file) { + set_listing_date (); + set_standard_title (); +@@ -2365,7 +2369,7 @@ + cobc_elided_strcpy (cb_listing_filename, str, sizeof (cb_listing_filename), 0); + print_program_header (); + } +- cb_perror (0, "cobc: %s: %s", str, cb_get_strerror ()); ++ cb_perror (0, "cobc: %s: %s", str, errno_str); + if (cb_src_list_file) { + print_program_trailer (); + } -- cgit v1.2.3-70-g09d2