It just struck me that *maybe* a portable solution would be to put the awk output inside genbki.sh in a .h file and then #include it in a one line .c file which is passed to the preprocessor. Would that keep the (strange) HP compiler happy?
ViSolve Open Source Team wrote:
** *2. About the TMPFILE definition change from .c to .h:* Unfortunately, the -V option does not work the same way across HP compilers (it works as expected with HP aCC, but not with HP cc).
We have a couple of alternatives here. a. Using `uname` (to look for HP-UX) /and/ checking to see if *$CPP* is set to //usr/bin/cc/ or //opt/aCC/bin/aCC./ Not good.
b. Doing nothing. The TMPFILE mod is a trivial change to make with each new version of PostgreSQL that we build for HP-UX. (We had in fact suggested this in our original request email). So if you make no changes to the TMPFILE code, that will be fine too.
ViSolve OpenSource Team
From: Bruce Momjian <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
Subject: Re: [BUGS] (Modified) Patch request for PostgreSQL 7.4 for HP-UX IA-64
Peter also mentioned:
>You're doing this:
I'm afraid this will not fly, because calling the preprocessor is only
portable on .c files. Generally, it's also unwise to rely in this kind
of subtle side effect. We need a general solution.
Can you give us a way to test for your preprocessor? Is there some
unique output like --version or -V that we can test and use *.h only
in that case?
Bruce Momjian | http://candle.pha.pa.us
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])