Macro errors on Panther (MacOSX 10.3)
Macro errors on Panther (MacOSX 10.3)
От:
adam ingram-goble <adamaig@cat.pdx.edu>
Дата:
Hi all!
I just tried building Postgres 7.3.4 on OSX 10.3 and get the following
errors (looks like a Apple changed
a header .... ) I'm hoping the dev team sees this :) If people want me
to test fixes please email me
adamaig at cat dot pdx dot edu
The relevant section of the header file seems to be:
/* bytes to pages */
91 #define btoc(x) (((unsigned)(x)+(PGOFSET))>>PGSHIFT)
92 #ifdef __APPLE__
93 #define btodb(bytes, devBlockSize) \
94 ((unsigned)(bytes) / devBlockSize)
95 #define dbtob(db, devBlockSize) \
96 ((unsigned)(db) * devBlockSize)
97 #else
98 #define btodb(bytes) /* calculates (bytes /
DEV_BSIZE) */ \
99 ((unsigned)(bytes) >> DEV_BSHIFT)
100 #define dbtob(db) /* calculates (db *
DEV_BSIZE) */ \
101 ((unsigned)(db) << DEV_BSHIFT)
102 #endif
The errors I get when running 'make'
make -C doc all
make[1]: Nothing to be done for `all'.
make -C src all
make -C port all
make[2]: Nothing to be done for `all'.
make -C backend all
make -C ../../src/port all
make[3]: Nothing to be done for `all'.
make -C access all
make -C common SUBSYS.o
gcc -traditional-cpp -g -O2 -Wall -Wmissing-prototypes
-Wmissing-declarations -I../../../../src/include -I/sw/include
-I/usr/include -I/usr/local/include -c -o printtup.o printtup.c
In file included from /usr/include/machine/param.h:30,
from /usr/include/sys/socket.h:67,
from ../../../../src/include/libpq/pqcomm.h:28,
from ../../../../src/include/libpq/libpq-be.h:24,
from ../../../../src/include/libpq/libpq.h:21,
from printtup.c:20:
/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
make[4]: *** [printtup.o] Error 1
make[3]: *** [common-recursive] Error 2
make[2]: *** [access-recursive] Error 2
make[1]: *** [all] Error 2
make: *** [all] Error 2
Re: Macro errors on Panther (MacOSX 10.3)
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
adam ingram-goble writes: > I just tried building Postgres 7.3.4 on OSX 10.3 and get the following > errors (looks like a Apple changed a header .... ) Apple's out there breaking things again ;-). It might be that you can make it work by changing -traditional-cpp to -no-cpp-precomp in src/template/darwin (then re-run configure and rebuild). However, 7.4 sources include a number of other Darwin fixes, and I'm not sure that this one is enough to make 7.3 work on Darwin 10.3. I'd recommend trying the latest 7.4 beta instead. regards, tom lane