Re: source conversion
Re: source conversion
- Subject: Re: source conversion
- From: Steve Checkoway <email@hidden>
- Date: Thu, 19 Jan 2006 03:05:38 -0800
On Jan 18, 2006, at 11:18 PM, D. Walsh wrote: I'm in the midst of converting some 65C816 source files and I've run into some code that doesn't quite look right to me.
/* Are we using an old or a new library? */ #ifndef _xsco_version && ndef xsco_version #define xsco_version() 1.000511 #endif
Now, from what it appears, it looks like it's testing for the existence of a function but I don't believe this is the correct approach but I could be wrong.
It's testing for the existence of two macros. [I never realized that you could use ndef like that, I would have done #if !defined(...) && !defined(...)]
Anyway, before I create a mess by ignoring this code and since there are roughly about 400 files I thought I'd ask for some opinions and advice on what to do with this code since the files are peppered with them.
It is a little odd though. If _xsco_version is defined but xsco_version is not and no function xsco_version() exists then code such as:
double version = xsco_version();
will fail to compile (or link, I never can tell when Apple's gcc will allow implicit definitions).
If that was meant to test for a function, it's going about it the wrong way (see the GNU autotools for one possible way to test for a function).
A quick search of header files turns up nothing for me:
$ find /usr/include /usr/X11R6/include/ -type f -print0|xargs -0 grep -i xsco_version
That said, I think you're probably okay just leaving it alone.
- Steve
|
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden