Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!rutgers!ucsd!nosc!logicon.arpa!trantor.harris-atd.com!x102c!bbadger From: bbadger@x102c.harris-atd.com (Badger BA 64810) Newsgroups: comp.bugs.sys5 Subject: Bad LALIGN(p) define for pdp11 in sysmacros.h Message-ID: <2721@trantor.harris-atd.com> Date: 24 Sep 89 21:05:05 GMT Sender: news@trantor.harris-atd.com Reply-To: bbadger@x102c.harris-atd.com (Badger BA 64810) Organization: Harris GISD, Melbourne, FL Lines: 47 I noticed what seems to be an error in ATT System V Release 3.2 Upgrade 2.1 system file sysmacros.h. The error only affects pdp11 systems, because it is conditionally compiled. Since this is a 80386 release, perhaps no one is affected. Nonetheless, here's my patch: diff -c /user03/sec/l/V3_2_1/usr/src/uts/i386/sys/sysmacros.h /user03/sec/l/Vcm/usr/src/Vcm/uts/i386/sys/sysmacros.h *** /user03/sec/l/V3_2_1/usr/src/uts/i386/sys/sysmacros.h Tue May 17 17:22:08 1988 --- /user03/sec/l/Vcm/usr/src/Vcm/uts/i386/sys/sysmacros.h Sun Sep 24 16:44:28 1989 *************** *** 191,197 **** #ifdef pdp11 #define SALIGN(p) (char *)(((int)p+1) & ~1) #define IALIGN(p) (char *)(((int)p+1) & ~1) ! #define LALIGN(p) (char *)(((int)p+1) & ~3) #endif #if vax | i386 #define SALIGN(p) (char *)(((int)p+1) & ~1) --- 191,197 ---- #ifdef pdp11 #define SALIGN(p) (char *)(((int)p+1) & ~1) #define IALIGN(p) (char *)(((int)p+1) & ~1) ! #define LALIGN(p) (char *)(((int)p+3) & ~3) #endif #if vax | i386 #define SALIGN(p) (char *)(((int)p+1) & ~1) Note that I've changed a space to a tab and a '1' to a '3'. Now the LALIGN(p) matches the one defined for when ``#if vax | i386'' is in effect (not shown here). I have two questions about this. 1. Technical: Is it really a good idea to convert to (int)? Wouldn't (unsigned int) or (unsigned long) be safer? I've seen a similar operation elsewhere in kernel code which does: (char *)((int)p + 3) & ~3L) Is this any better? 2. Procedural: What's the official way to submit these things to ATT? I haven't seen any ``problem report'' forms in the backs of our manuals, (unlike DIGITAL which puts one in theirs). Is there an ATT network address which accepts bug reports, like Sun has? ----- - - - - - - - ---- Bernard A. Badger Jr. 407/984-6385 |``Get a LIFE!'' -- J.H. Conway Harris GISD, Melbourne, FL 32902 |Buddy, can you paradigm? Internet: bbadger%x102c@trantor.harris-atd.com|'s/./&&/g' Tom sed expansively.