summaryrefslogtreecommitdiff
path: root/graphics/xgraph
diff options
context:
space:
mode:
authordholland <dholland>2011-10-03 01:45:21 +0000
committerdholland <dholland>2011-10-03 01:45:21 +0000
commitacdf21e1a7f8c229cbc58bda11ae91eea6714f47 (patch)
tree14b92334de4520a310983fe73b68cc49f682d3cf /graphics/xgraph
parentafc171133c2eef60e397d3e30138c93468d4d723 (diff)
downloadpkgsrc-acdf21e1a7f8c229cbc58bda11ae91eea6714f47.tar.gz
Fix conflict with POSIX getline; fix LP64 issues found by gcc.
Diffstat (limited to 'graphics/xgraph')
-rw-r--r--graphics/xgraph/distinfo4
-rw-r--r--graphics/xgraph/patches/patch-dialog_c33
-rw-r--r--graphics/xgraph/patches/patch-st_c27
3 files changed, 63 insertions, 1 deletions
diff --git a/graphics/xgraph/distinfo b/graphics/xgraph/distinfo
index e0c3c0a2e82..09dcb7641d7 100644
--- a/graphics/xgraph/distinfo
+++ b/graphics/xgraph/distinfo
@@ -1,7 +1,9 @@
-$NetBSD: distinfo,v 1.4 2005/12/19 16:22:56 joerg Exp $
+$NetBSD: distinfo,v 1.5 2011/10/03 01:45:21 dholland Exp $
SHA1 (xgraph-11.3.2-hack.9.tar.gz) = 6e695d2008094e8aca54795c7c73ed239d0d5404
RMD160 (xgraph-11.3.2-hack.9.tar.gz) = 3d1344b9e97b72886faaedce92b697dbc9503a1b
Size (xgraph-11.3.2-hack.9.tar.gz) = 101979 bytes
SHA1 (patch-aa) = cc5f9a2c5d2ca604459f581b41fd3e6cc82633d5
SHA1 (patch-ab) = c04e437b082e3f06ba3c88f3bb605882ce5ad297
+SHA1 (patch-dialog_c) = 9127063712889ebf8e7f197d9b8e6ee6ea64c494
+SHA1 (patch-st_c) = bb47aa944b4cd0827a05fb211cee1f0920c69b68
diff --git a/graphics/xgraph/patches/patch-dialog_c b/graphics/xgraph/patches/patch-dialog_c
new file mode 100644
index 00000000000..c8830daa2b9
--- /dev/null
+++ b/graphics/xgraph/patches/patch-dialog_c
@@ -0,0 +1,33 @@
+$NetBSD: patch-dialog_c,v 1.1 2011/10/03 01:45:22 dholland Exp $
+
+- fix conflict with POSIX getline
+
+--- dialog.c~ 1998-05-22 12:19:06.000000000 +0000
++++ dialog.c
+@@ -32,7 +32,7 @@ static short gray_bits[] = {
+
+ static void make_msg_box();
+ static void del_msg_box();
+-static int getline();
++static int get_line(char **, char *);
+
+
+ #define D_VPAD 2
+@@ -702,7 +702,7 @@ xtb_frame *frame; /* Returned frame */
+ new_info->lines = (Window *) malloc((unsigned) (sizeof(Window) * E_LINES));
+
+ lineptr = text;
+- while (getline(&lineptr, line)) {
++ while (get_line(&lineptr, line)) {
+ if (new_info->num_lines >= new_info->alloc_lines) {
+ new_info->alloc_lines *= 2;
+ new_info->lines = (Window *) realloc((char *) new_info->lines,
+@@ -800,7 +800,7 @@ char *err_text;
+
+
+
+-static int getline(tptr, lptr)
++static int get_line(tptr, lptr)
+ char **tptr;
+ char *lptr;
+ /*
diff --git a/graphics/xgraph/patches/patch-st_c b/graphics/xgraph/patches/patch-st_c
new file mode 100644
index 00000000000..552cbee43f1
--- /dev/null
+++ b/graphics/xgraph/patches/patch-st_c
@@ -0,0 +1,27 @@
+$NetBSD: patch-st_c,v 1.1 2011/10/03 01:45:22 dholland Exp $
+
+- Fix LP64 issues.
+
+--- st.c.orig 1998-05-22 12:27:04.000000000 +0000
++++ st.c
+@@ -11,6 +11,7 @@
+
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <stdint.h>
+ #include "copyright.h"
+
+ #include "st.h"
+@@ -21,9 +22,9 @@
+ #define alloc(type) (type *) malloc(sizeof(type))
+
+ #define ABS(x) ((x) < 0 ? -(x) : (x))
+-#define ST_NUMCMP(x,y) ((int) (x) - (int) (y))
+-#define ST_NUMHASH(x,size) (ABS((int)x)%(size))
+-#define ST_PTRHASH(x,size) ((int)((unsigned)(x)>>2)%size)
++#define ST_NUMCMP(x,y) ((intptr_t) (x) - (intptr_t) (y))
++#define ST_NUMHASH(x,size) (ABS((intptr_t)x)%(size))
++#define ST_PTRHASH(x,size) ((intptr_t)((uintptr_t)(x)>>2)%size)
+ #define EQUAL(func, x, y) \
+ ((((func) == st_numcmp) || ((func) == st_ptrcmp)) ?\
+ (ST_NUMCMP((x),(y)) == 0) : ((*func)((x), (y)) == 0))