Date: Wed, 13 Jan 1999 14:30:02 -0800 (PST) From: dima@best.net (Dima Ruban) To: simokawa@sat.t.u-tokyo.ac.jp (Hidetoshi Shimokawa) Cc: freebsd-alpha@FreeBSD.ORG Subject: Re: fix for unaligned access Message-ID: <199901132230.OAA36952@burka.rdy.com> In-Reply-To: <19990113150430Q.simokawa@sat.t.u-tokyo.ac.jp> from Hidetoshi Shimokawa at "Jan 13, 1999 3: 4:30 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
Hidetoshi Shimokawa writes: > Here is a fix for mail and traceroute not to do unaligned access. > A fix for mail is obtained from NetBSD and that I posted before, but > it has not been commited yet. > > Can I commit these two patch before branch? patch for mail looks good. About traceroute: wouldn't it be simplier to fix gcc? > > /\ Hidetoshi Shimokawa > \/ simokawa@sat.t.u-tokyo.ac.jp > PGP public key: finger -l simokawa@sat.t.u-tokyo.ac.jp > > > Index: usr.bin/mail/strings.c > =================================================================== > RCS file: /pub/FreeBSD-CVS/src/usr.bin/mail/strings.c,v > retrieving revision 1.1.1.1 > diff -u -r1.1.1.1 strings.c > --- strings.c 1994/05/27 12:32:07 1.1.1.1 > +++ strings.c 1998/11/29 06:41:14 > @@ -64,8 +64,8 @@ > int index; > > s = size; > - s += 3; > - s &= ~03; > + s += (sizeof (char *) - 1); > + s &= ~(sizeof (char *) - 1); > index = 0; > for (sp = &stringdope[0]; sp < &stringdope[NSPACE]; sp++) { > if (sp->s_topFree == NOSTR && (STRINGSIZE << index) >= s) > Index: usr.sbin/traceroute/Makefile > =================================================================== > RCS file: /pub/FreeBSD-CVS/src/usr.sbin/traceroute/Makefile,v > retrieving revision 1.9 > diff -u -r1.9 Makefile > --- Makefile 1998/09/19 22:42:13 1.9 > +++ Makefile 1999/01/13 05:58:10 > @@ -14,6 +14,12 @@ > CLEANFILES+= version.c > > TRACEROUTE_DISTDIR?= ${.CURDIR}/../../contrib/traceroute > + > +.if ${MACHINE_ARCH} == "alpha" > +# gcc builtin memcpy causes unaligned access > +CFLAGS+= -fno-builtin > +.endif > + > CFLAGS+= -I${TRACEROUTE_DISTDIR}/lbl > .PATH: ${TRACEROUTE_DISTDIR} > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-alpha" in the body of the message > -- dima To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199901132230.OAA36952>