summaryrefslogtreecommitdiff
path: root/devel/sfio
diff options
context:
space:
mode:
authoragc <agc@pkgsrc.org>1998-11-03 09:41:33 +0000
committeragc <agc@pkgsrc.org>1998-11-03 09:41:33 +0000
commit9f335c315090f4399ad9cdda473bedbb62190fdb (patch)
tree82e83ac736647fa6d3e59e6e96b8456251a7ebec /devel/sfio
parent85ddd63bc87ac41615b0f7b2fc852cbeff871051 (diff)
downloadpkgsrc-9f335c315090f4399ad9cdda473bedbb62190fdb.tar.gz
Fix this properly - the previous patch was incorrect.
Diffstat (limited to 'devel/sfio')
-rw-r--r--devel/sfio/patches/patch-ae19
1 files changed, 15 insertions, 4 deletions
diff --git a/devel/sfio/patches/patch-ae b/devel/sfio/patches/patch-ae
index 0dcc81d8aff..5a1ade60057 100644
--- a/devel/sfio/patches/patch-ae
+++ b/devel/sfio/patches/patch-ae
@@ -1,22 +1,33 @@
-$NetBSD: patch-ae,v 1.1 1998/11/02 21:18:14 agc Exp $
+$NetBSD: patch-ae,v 1.2 1998/11/03 09:41:33 agc Exp $
Avoid compiler warning.
--- src/lib/sfio/sfwr.c 1998/11/02 17:49:14 1.1
+++ src/lib/sfio/sfwr.c 1998/11/02 17:52:14
-@@ -30,10 +30,14 @@
+@@ -14,8 +14,9 @@
+ reg char* buf;
+ reg size_t n;
+ #endif
+-{ reg char *sp, *wbuf, *endbuf;
++{ reg char *wbuf, *endbuf;
+ reg ssize_t s, w, wr;
++ char *sp;
+
+ s = w = 0;
+ wbuf = buf;
+@@ -30,10 +31,14 @@
sp = buf+1;
if(buf[0] == 0 && buf[_Sfpage-1] == 0)
{ /* check byte at a time until int-aligned */
- while(((Sfulong_t)sp)%sizeof(int))
+ Sfulong_t dumbo;
+
-+ (void) memcpy(&dumbo, sp, sizeof(dumbo));
++ (void) memcpy(&dumbo, &sp, sizeof(dumbo));
+ while(dumbo % sizeof(int) != 0)
{ if(*sp != 0)
goto chk_hole;
sp += 1;
-+ (void) memcpy(&dumbo, sp, sizeof(dumbo));
++ (void) memcpy(&dumbo, &sp, sizeof(dumbo));
}
/* check using int to speed up */