ikarus-errno.c needs a small change to compile on FreeBSD (possible patch included)

Bug #399080 reported by Andrew Reilly
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ikarus Scheme
Fix Committed
Low
Abdulaziz Ghuloum

Bug Description

FreeBSD doesn't do SysV STREAM, and so doesn't have the XSI-related errno values in errno.h. This is easy to work around, because made-up values are OK, because it doesn't look as though ikarus needs them anyway, and they won't be generated by the system. So this patch (or something like it) is all that I needed to get ikarus to compile on my FreeBSD/amd64 system. Nice work! I haven't used it in anger yet, but it seems to start up, and runs the benchmarks (with some errors and odd output...)

This patch is against:
Ikarus Scheme version 0.0.4-rc1+, 64-bit (revision 1827, build 2009-07-12)
Copyright (c) 2006-2009 Abdulaziz Ghuloum
downloaded using bzr on Saturday 11th.

Here's the patch:

--- ikarus.dev/src/ikarus-errno.c.orig 2009-07-12 13:37:04.000000000 +1000
+++ ikarus.dev/src/ikarus-errno.c 2009-07-12 13:43:26.000000000 +1000
@@ -31,6 +31,15 @@
 #define ECANCELED 140
 #endif

+#ifndef ENODATA
+/* These errno names relate to STREAMs, which are optional in
+ * POSIX and not present in BSD */
+#define ENODATA 999
+#define ENOSR 999
+#define ENOSTR 999
+#define ETIME 999
+#endif
+
 static errno_info errno_table[] = {
   /* errnos from POSIX IEEE Std 1003.1 2004 Edition */
   {E2BIG, "E2BIG", fix(-1)},

Related branches

Revision history for this message
Abdulaziz Ghuloum (aghuloum) wrote :

Fixed in revision 1851. Thanks.

Changed in ikarus:
assignee: nobody → Abdulaziz Ghuloum (aghuloum)
importance: Undecided → Low
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.