summary refs log tree commit diff
path: root/gnu/packages/patches/ecl-16-ignore-stderr-write-error.patch
diff options
context:
space:
mode:
authorJakub Kądziołka <kuba@kadziolka.net>2020-06-17 02:08:04 +0200
committerJakub Kądziołka <kuba@kadziolka.net>2020-07-10 23:03:41 +0200
commit5b9822cf43f0e568fc42a0a60a7ed4d77e5e9832 (patch)
tree71e82f22ca8fd7c51c9ac1f95c6d999ae36515f9 /gnu/packages/patches/ecl-16-ignore-stderr-write-error.patch
parent71153712a2499d0425a709e9bc57dd3f917567ea (diff)
downloadguix-5b9822cf43f0e568fc42a0a60a7ed4d77e5e9832.tar.gz
gnu: Add ECL 16.1.3 for Sage.
* gnu/packages/sagemath.scm (ecl-16): New variable.
* gnu/packages/patches/ecl-16-format-directive-limit.patch,
  gnu/packages/patches/ecl-16-ignore-stderr-write-error.patch,
  gnu/packages/patches/ecl-16-libffi.patch: New files.
* gnu/local.mk (dist_patch_DATA): Register the patches.
Diffstat (limited to 'gnu/packages/patches/ecl-16-ignore-stderr-write-error.patch')
-rw-r--r--gnu/packages/patches/ecl-16-ignore-stderr-write-error.patch17
1 files changed, 17 insertions, 0 deletions
diff --git a/gnu/packages/patches/ecl-16-ignore-stderr-write-error.patch b/gnu/packages/patches/ecl-16-ignore-stderr-write-error.patch
new file mode 100644
index 0000000000..42d213c0e9
--- /dev/null
+++ b/gnu/packages/patches/ecl-16-ignore-stderr-write-error.patch
@@ -0,0 +1,17 @@
+Patch adapted from Sage.
+diff -Naur ecl-16.1.2.orig/src/c/file.d ecl-16.1.2/src/c/file.d
+--- ecl-16.1.2.orig/src/c/file.d	2016-05-11 13:10:51.867673867 +1200
++++ ecl-16.1.2/src/c/file.d	2016-05-11 14:44:48.121907307 +1200
+@@ -3354,8 +3354,10 @@
+   ecl_disable_interrupts();
+   do {
+     out = fwrite(c, sizeof(char), n, IO_STREAM_FILE(strm));
+-  } while (out < n && restartable_io_error(strm, "fwrite"));
+-  ecl_enable_interrupts();
++  /* Ignore write errors to stderr to avoid an infinite loop */
++  } while (out < n && (IO_STREAM_FILE(strm) != stderr) && restartable_io_error(strm, "fwrite"));
++
++  ecl_enable_interrupts();
+   return out;
+ }
+