Peter Gerwinski wrote:
Yes, conditional defines. GPC pre-defines the symbol "__GPC__":
(*$ifdef __GPC__ *) (* GNU Pascal switches *)
[...] (*$else *) (* Borland Pascal switches *) [...] (*$endif *)
What would you consider "simpler" than this? ;-)
OK, if "__GPC__" is predefined, this is viable. I didn't know about this, I tried just "GPC"...
BTW: Is it legal (with the currect version) to use "gpc foo.c bar.pas"? I asked about this already in my mail about "Re: Linking directives..." on 3 Apr, but unfortunately got no replies.
Oh - sorry, I overlooked it. #-) Yes, it's legal, and it works on my Linux box, too. (You wrote that it didn't work on yours; perhaps this bug is fixed now?)
No, it seems to be an installation problem. Up to now, I could trace it down to the fact that "-D__GNUC_MINOR__=0(2" is passed to cpp if called via gpc, instead of "-D__GNUC_MINOR__=7" with gcc. I'm not sure yet why this is so, does it have anything to do with "gpc version 2.0(2.7.2.1)"? ^^^
On Fri, 18 Apr 1997, Frank Heckenbach wrote:
Peter Gerwinski wrote:
Yes, conditional defines. GPC pre-defines the symbol "__GPC__":
(*$ifdef __GPC__ *) (* GNU Pascal switches *)
[...] (*$else *) (* Borland Pascal switches *) [...] (*$endif *)
What would you consider "simpler" than this? ;-)
OK, if "__GPC__" is predefined, this is viable. I didn't know about this, I tried just "GPC"...
There's more (try `gpc -v' or read the specs file) The underscores are required by POSIX specifications
No, it seems to be an installation problem. Up to now, I could trace it down to the fact that "-D__GNUC_MINOR__=0(2" is passed to cpp if called via gpc, instead of "-D__GNUC_MINOR__=7" with gcc. I'm not sure yet why this is so, does it have anything to do with "gpc version 2.0(2.7.2.1)"? ^^^
That's a bug. (thanks for finding it ;-)
--- The nice thing about standards is that there are so many to choose from - Andrew Tanenbaum