Subject: problems with bcopy compiling -current
To: None <port-pmax@netbsd.org>
From: Aaron J. Grier <agrier@poofy.goof.com>
List: port-pmax
Date: 08/21/1998 16:04:26
I'm trying to get a copy of -current working on my 5000/240, and hitting a
compile snag...

cc  -O2 -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -Wno-uninitialized -mno-abicalls -mno-half-pic -I. -I/usr/local/src/NetBSD/src/sys/arch -I/usr/local/src/NetBSD/src/sys -nostdinc -DMIPS1 -DDEBUG -DCOMPAT_43 -DNKMEMCLUSTERS=1024 -DMULTICAST -
DHZ=256 -DMAXUSERS=64 -D_KERNEL  -D__pmax__ -Dpmax -G 0  -c /usr/local/src/NetBSD/src/sys/arch/mips/mips/trap.c
/usr/local/src/NetBSD/src/sys/arch/mips/mips/trap.c: In function `stacktrace_subr':
/usr/local/src/NetBSD/src/sys/arch/mips/mips/trap.c:1655: `bcopy' undeclared (first use this function)
/usr/local/src/NetBSD/src/sys/arch/mips/mips/trap.c:1655: (Each undeclared identifier is reported only once
/usr/local/src/NetBSD/src/sys/arch/mips/mips/trap.c:1655: for each function it appears in.)
*** Error code 1

Stop.

Doing some code scanning, the offending snippet in trap.c looks like this:

        else if (pcBetween(bcopy, setrunqueue)) {
                subr = (unsigned) bcopy;
        }

bcopy is a #define in sys/systm.h:

#define bcopy(src, dst, len)    memcpy(dst, src, len)

Shouldn't the define take care of replacing bcopy with memcpy?

It looks like it should be OK to replace bcopy with memcpy in trap.c, I'm
just wondering how it should be done correctly... 

----
  Aaron J. Grier  | "Not your ordinary poofy goof." | agrier@poofy.goof.com
  "No one's jumped off the top of the [Windows] building here, so I guess
   that's a pretty good indicator that it can't be all that bad."
    -- Rob Bennett, Microsoft group product manager, on Windows 98