summaryrefslogtreecommitdiff
path: root/lang/cu-prolog/patches/patch-ab
diff options
context:
space:
mode:
Diffstat (limited to 'lang/cu-prolog/patches/patch-ab')
-rw-r--r--lang/cu-prolog/patches/patch-ab11
1 files changed, 7 insertions, 4 deletions
diff --git a/lang/cu-prolog/patches/patch-ab b/lang/cu-prolog/patches/patch-ab
index 29c47360cf7..c702944b82f 100644
--- a/lang/cu-prolog/patches/patch-ab
+++ b/lang/cu-prolog/patches/patch-ab
@@ -1,7 +1,7 @@
-$NetBSD: patch-ab,v 1.3 2004/07/04 16:18:14 jschauma Exp $
+$NetBSD: patch-ab,v 1.4 2006/02/24 18:37:20 joerg Exp $
---- include.h.orig 1995-01-27 08:38:48.000000000 +0100
-+++ include.h 2004-07-03 21:54:12.000000000 +0200
+--- include.h.orig 1995-01-27 07:38:48.000000000 +0000
++++ include.h
@@ -21,6 +21,7 @@
#include <stdio.h>
@@ -22,13 +22,16 @@ $NetBSD: patch-ab,v 1.3 2004/07/04 16:18:14 jschauma Exp $
#define KANJI 1 /* 1: allow EUC Kanji for str functions */
/* Tee print macro */
-@@ -135,8 +140,16 @@
+@@ -135,8 +140,19 @@ struct term { /* atomic formula (liter
#define head_of_list(Term) (((struct clause *)Term)->c_form)
#define tail_of_list(Term) ((struct term *)((struct clause *)Term)->c_link)
+#if defined(__linux__)
+#define is_readable(FP) (!(FP->_flags & _IO_NO_READS))
+#define is_writable(FP) (!(FP->_flags & _IO_NO_WRITES))
++#elif defined(__DragonFly__)
++#define is_readable(FP) (((struct __FILE_public *)(FP))->_flags & __SRD)
++#define is_writable(FP) (((struct __FILE_public *)(FP))->_flags & __SWR)
+#elif (defined(BSD) && BSD >= 199306)
+#define is_readable(FP) (FP->_flags & __SRD)
+#define is_writable(FP) (FP->_flags & __SWR)