very strange problem on darwin6.4 with gcc-3.4

Brad Lucier lucier@math.purdue.edu
Sun Feb 23 08:35:00 GMT 2003


With this compiler

[zakon:~/programs/gambc40b1/lib] lucier% gcc -v
Reading specs from /usr/local/gcc-3.4/lib/gcc-lib/powerpc-apple-darwin6.4/3.4/specs
Configured with: ../configure --prefix=/usr/local/gcc-3.4 --disable-checking
Thread model: single
gcc version 3.4 20030222 (experimental)

I get this message when I try to preprocess a file:

[zakon:~/programs/gambc40b1/lib] lucier% gcc -E -traditional-cpp -Wall -W -Wno-unused -O1 -fno-math-errno -fschedule-insns2 -fno-strict-aliasing -fomit-frame-pointer -fPIC -fno-common -fno-trapping-math -mcpu=7400 -D__APPLE__ main.c -I../include > ! crap.c
In file included from /usr/include/machine/param.h:30,
                 from /usr/include/sys/param.h:102,
                 from /usr/include/netdb.h:84,
                 from os.h:555,
                 from main.c:11:
/usr/include/ppc/param.h:98: macro "btodb" requires 2 arguments, but only 1 given
/usr/include/ppc/param.h:100: macro "dbtob" requires 2 arguments, but only 1 given

The only place I can find btodb in /usr/include is

/* bytes to pages */
#define btoc(x) (((unsigned)(x)+(PGOFSET))>>PGSHIFT)
#ifdef __APPLE__
#define  btodb(bytes, devBlockSize)         \
        ((unsigned)(bytes) / devBlockSize)
#define  dbtob(db, devBlockSize)            \
             ((unsigned)(db) * devBlockSize)
#else
#define btodb(bytes)                    /* calculates (bytes / DEV_BSIZE) */ \
        ((unsigned)(bytes) >> DEV_BSHIFT)
#define dbtob(db)                       /* calculates (db * DEV_BSIZE) */ \
        ((unsigned)(db) << DEV_BSHIFT)
#endif

in ppc/param.h; it doesn't appear in the gcc sources.

If you guys think this is an apple problem and tell me to go away, that's fine.
But I sure can't figure out why this should fail with the gcc mainline.

Brad



More information about the Gcc mailing list