Files
gnucobol/fix-errno.patch

23 lines
718 B
Diff
Raw Permalink Normal View History

Accepting request 1329633 from home:AdaLovelace:branches:devel:languages:misc - Update to 3.2 * improved dialect handling including changed defaults to better match the selected dialect * a complete new dialect GCOS and support for more COBOL statements * intrinsic functions and syntax from both "old" and new dialects * highly improved run-times for several statements, along with less memory usage, especially if runtime checks are enabled * fileio changes to support LINE-SEQUENTIAL per COBOL2023 and runtime options to change the way files are handled, see NEWS and runtime.cfg * improvements for source-level debugging via GDB and coredump support * output of context for diagnostics * improvements for reproducible builds - Change download resources to gnu ftp for more stable source - Add patch move_packed_decimal.patch - Remove mlio.c in gnucobol-3.1.2-C99.diff - Remove fix_test_698.patch - Add patch fix-errno.patch - Add newcob.val.tar.gz for fixing download of value data for tests - Add gnucobol-esql-3.0 * ESQL preprocessor (esqlOC) relies on ODBC for access to a variety of SQL engines - Fix build errors with GCC 15 - Add gnucobol-3.1.2-C99.diff to add missing includes of libxml/parser.h which cause GCC 14 to emit compiler error rather than a warning. - Add -Wno-error=incompatible-pointer-types to optflags so that GCC 14 can compile test 0987 without failing with an error. - Move libcob-devel files to gnucobol.lang because libcob.h can not be found (boo#1209438) - Update to version 3.1.2 (see NEWS or ChangeLog for details) - Drop gnucobol-CFLAGS.patch (no longer needed) - Add fix_test_698.patch and enable hardening - Add buildtime requirements for libjson-c and libxml2 - Disable lto to avoid test failure - Trim redundancies from description. - Enable parallel build and tests - Update to version 3.0rc1, stabler than 2.2 final (see NEWS or ChangeLog for details) - Refreshed gnucobol-CFLAGS.patch - Switched source URL to sourceforge to get the latest tarball - Fixed description - Enabled tests - Update to version 2.2 (see NEWS or ChangeLog) - Switched license to GPL-3.0+/LGPL-3.0+ - Updated source URL and homepage on account of being accepted into the GNU Project - Added gnucobol-CFLAGS.patch - Dropped types.diff (apparently no longer necessary) - Cleanup spec file with spec-cleaner - Use url for source - Update info dependencies - Use macro for locale handling - Do not create static library - Fix SLE11 builds by defining buildroot - First packaging OBS-URL: https://build.opensuse.org/request/show/1329633 OBS-URL: https://build.opensuse.org/package/show/devel:languages:misc/gnucobol?expand=0&rev=1
2026-01-31 19:12:53 +00:00
--- 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 ();
}