summaryrefslogtreecommitdiff
path: root/lang/cu-prolog
diff options
context:
space:
mode:
authorjoerg <joerg>2006-02-24 18:37:20 +0000
committerjoerg <joerg>2006-02-24 18:37:20 +0000
commit86618d4f3b1be0d55db97cb1a7c41fe066abaa34 (patch)
tree2bf990ef2dfd76ee3b917f14400a979a6a3554e3 /lang/cu-prolog
parentc366f8348723fcdaaa78d2f9048c554727089f2d (diff)
downloadpkgsrc-86618d4f3b1be0d55db97cb1a7c41fe066abaa34.tar.gz
Add DragonFly support. Don't subtract FILE pointers to determine
the order, FILE might be incomplete, the computation overflow and the compiler is clever enough anyway.
Diffstat (limited to 'lang/cu-prolog')
-rw-r--r--lang/cu-prolog/distinfo5
-rw-r--r--lang/cu-prolog/patches/patch-ab11
-rw-r--r--lang/cu-prolog/patches/patch-af18
3 files changed, 28 insertions, 6 deletions
diff --git a/lang/cu-prolog/distinfo b/lang/cu-prolog/distinfo
index e2c233fc1bc..f0da3c769cb 100644
--- a/lang/cu-prolog/distinfo
+++ b/lang/cu-prolog/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.4 2005/02/24 09:03:06 agc Exp $
+$NetBSD: distinfo,v 1.5 2006/02/24 18:37:20 joerg Exp $
SHA1 (cu-prolog-3.94/cupsrc.tar.gz) = bc292c39bf58d142e8810e0c7e7aa25a5e44ad16
RMD160 (cu-prolog-3.94/cupsrc.tar.gz) = 201c44c668602d1bdb1dfba5db767937fb8c5301
@@ -7,7 +7,8 @@ SHA1 (cu-prolog-3.94/cupdoc.tar.gz) = 1d63be56d044fc51fc034c248e2d0cbca35756f3
RMD160 (cu-prolog-3.94/cupdoc.tar.gz) = 58dce5374dffe7a68504c6976982fd2613ec3e0c
Size (cu-prolog-3.94/cupdoc.tar.gz) = 136474 bytes
SHA1 (patch-aa) = 5a62457aa989665b52f8413ae649b4b2eb4a7e0e
-SHA1 (patch-ab) = 7789b243cb2c5a5054f7492930300e2630398715
+SHA1 (patch-ab) = 307077c44051118e8858e7c96dc687ccd71dc37a
SHA1 (patch-ac) = e30a669d5f455ad1063a3e53244c429d5b981625
SHA1 (patch-ad) = 3099002c96faf988499f5f7cde79dd8416aa360d
SHA1 (patch-ae) = aff538343572cf4e786177aa27d1c934255646b8
+SHA1 (patch-af) = b4c423f887321223c6c45e4a3f77126734b9d83f
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)
diff --git a/lang/cu-prolog/patches/patch-af b/lang/cu-prolog/patches/patch-af
new file mode 100644
index 00000000000..1f0fb45e298
--- /dev/null
+++ b/lang/cu-prolog/patches/patch-af
@@ -0,0 +1,18 @@
+$NetBSD: patch-af,v 1.1 2006/02/24 18:37:20 joerg Exp $
+
+--- tr_sub.c.orig 2006-02-24 18:32:10.000000000 +0000
++++ tr_sub.c
+@@ -711,11 +711,8 @@ struct term *a1,*a2;
+ int cmp_fp(a1,a2)
+ struct term *a1,*a2;
+ {
+- register int cp;
+-
+- cp = filep_value(a1) - filep_value(a2);
+- if (cp == 0) return(ARG_EQ);
+- else if (cp > 0) return(ARG_TRUE);
++ if (filep_value(a1) == filep_value(a2)) return(ARG_EQ);
++ else if (filep_value(a1) > filep_value(a2)) return(ARG_TRUE);
+ else return(ARG_FALSE);
+ }
+