gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC/Proposal] Cocoa.h header


From: Fred Kiefer
Subject: Re: [RFC/Proposal] Cocoa.h header
Date: Mon, 22 Nov 2004 13:41:33 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040906

Alexander Malmberg wrote:
Alex Perez wrote:
[snip]

For the record, last I checked, Alexander Malmberg agreed that Cocoa.h should not have all this extra cruft as well. Alex, I'd appreciate it if you'd weigh in on this matter here.


Well, fwiw, I think it's Wrong to put darwin system header compatibility stuff in Cocoa.h. If anyone is really interested in knowing why, I could make an attempt to explain. Otherwise, suffice to say that:


Not sure why you call the implicit inclusion of math.h in Foundation.h on Cocoa systems "darwin system header compatibility".

1. That stuff shouldn't be there.


I disagree here. The only purpos of the Cocoa.h file in GNUstep is to make porting from Cocoa less painfull. For this we need to add all the stuff here that people rightfully expect to be present on Cocoa. If we don't do so, why would we keep this file at all?

2. If you insist on making system header symbols visible when Cocoa.h is included, at least do so by including the right system header, not by defining the symbols yourself.

Fully agree with that,

3. If you insist on defining the symbols yourself, at least get the rounding right for M_PI.

This one falls back on you :-) I stole the definition from NSBezierPath, where PI instead of M_PI is used (which needs correction!), and if I remember correctly this was one of your first contributions to GNUstep years ago.


You only focused on the definition of M_PI, which shouldn't do to much harm as it is protected by an #ifdef. You didn't mention the other bit, which I see as being much more important, the handling of the compiler specific bool type. GNUstep will keep on supporting gcc releases where this type is not present, so we need to offer some sort of compatibility. What are your choices here?

Fred





reply via email to

[Prev in Thread] Current Thread [Next in Thread]