Mon Oct 3 01:45:22 2011 UTC ()
Fix conflict with POSIX getline; fix LP64 issues found by gcc.
(dholland)
diff -r1.4 -r1.5 pkgsrc/graphics/xgraph/distinfo
diff -r0 -r1.1 pkgsrc/graphics/xgraph/patches/patch-dialog_c
diff -r0 -r1.1 pkgsrc/graphics/xgraph/patches/patch-st_c
--- pkgsrc/graphics/xgraph/distinfo 2005/12/19 16:22:56 1.4
+++ pkgsrc/graphics/xgraph/distinfo 2011/10/03 01:45:21 1.5
| @@ -1,7 +1,9 @@ | | | @@ -1,7 +1,9 @@ |
1 | $NetBSD: distinfo,v 1.4 2005/12/19 16:22:56 joerg Exp $ | | 1 | $NetBSD: distinfo,v 1.5 2011/10/03 01:45:21 dholland Exp $ |
2 | | | 2 | |
3 | SHA1 (xgraph-11.3.2-hack.9.tar.gz) = 6e695d2008094e8aca54795c7c73ed239d0d5404 | | 3 | SHA1 (xgraph-11.3.2-hack.9.tar.gz) = 6e695d2008094e8aca54795c7c73ed239d0d5404 |
4 | RMD160 (xgraph-11.3.2-hack.9.tar.gz) = 3d1344b9e97b72886faaedce92b697dbc9503a1b | | 4 | RMD160 (xgraph-11.3.2-hack.9.tar.gz) = 3d1344b9e97b72886faaedce92b697dbc9503a1b |
5 | Size (xgraph-11.3.2-hack.9.tar.gz) = 101979 bytes | | 5 | Size (xgraph-11.3.2-hack.9.tar.gz) = 101979 bytes |
6 | SHA1 (patch-aa) = cc5f9a2c5d2ca604459f581b41fd3e6cc82633d5 | | 6 | SHA1 (patch-aa) = cc5f9a2c5d2ca604459f581b41fd3e6cc82633d5 |
7 | SHA1 (patch-ab) = c04e437b082e3f06ba3c88f3bb605882ce5ad297 | | 7 | SHA1 (patch-ab) = c04e437b082e3f06ba3c88f3bb605882ce5ad297 |
| | | 8 | SHA1 (patch-dialog_c) = 9127063712889ebf8e7f197d9b8e6ee6ea64c494 |
| | | 9 | SHA1 (patch-st_c) = bb47aa944b4cd0827a05fb211cee1f0920c69b68 |
$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;
/*
$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))