bugGNUstep - Bugs: bug #34914, TRUE / FALSE not defined


You are not allowed to post comments on this tracker with your current authentication level.

bug #34914: TRUE / FALSE not defined

Submitted by:  julian <julian_>
Submitted on:  Sun 27 Nov 2011 06:44:44 PM UTC  
Category:  Base/Foundation Severity:  3 - Normal
Item Group:  Change Request Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Closed

Fri 20 Dec 2013 03:27:14 PM UTC, comment #4:

Declared by CoreBase

Richard Frith-Macdonald <CaS>
Project Member
Fri 20 Jan 2012 07:05:53 PM UTC, comment #3:

Julian, that use case is now possible. I mentioned it on my e-mail to the mailing list at the beginning of the year.

If you have a particular use case that isn't working, please let me know and I'll do my best to get them fixed in a timely manner. A test compatible with the GNUstep test suite would be even better.

To address Richard's comment... I do not think -corebase is ready to be integrated with -base at this time. However, I think this should be the end goal.

Stef <stefanbidi>
Project Member
Fri 20 Jan 2012 02:03:46 PM UTC, comment #2:

>header now includes

now? that can't be new. i've used TRUE/FALSE interchangeably with YES/NO for so many years (in pure cocoa projects) that i didn't even know it was not technically part of cocoa.

>incorporate corebase

that would be welcome for people porting from cocoa. however when i last looked at corebase a few weeks back it didn't meet my minimum requirements to be useful:
being able to create data structures that do not retain their objects, by passing a NULL callback for the retain callbacks, e.g.:

NSMutableArray array = (NSMutableArray )CFArrayCreateMutable(kCFAllocatorDefault, 5, NULL);

julian <julian_>
Thu 19 Jan 2012 10:18:10 AM UTC, comment #1:

It's hard to know what to do here. This stuff is not officially part of Cocoa/Foundation, yet the Apple Foundation.h header now includes CoreFoundation.h and these things are defined there.
Perhaps we should incorporate corebase into base and do the same at some point?

Richard Frith-Macdonald <CaS>
Project Member
Sun 27 Nov 2011 06:44:44 PM UTC, original submission:

when porting cocoa apps a common problem seems to be that TRUE and FALSE do not seem to be defined on gnustep. TRUE and FALSE are used mostly interchangeable with YES and NO in cocoa code.

it would be great if gnustep could define these. possibly in Cocoa.h?

what i don't get is that gnustep itself uses TRUE/FALSE in quite a few places (70 occurrences). most of these seem to be in windows specific places, but a few of them seem to be in the linux code...how can this even work if it isnt defined?

as far as compatibility macros are concerned it would also be great if the following ones could be included, they greatly help portability. of course they should only be defined if CoreBase is not available:

typedef NSSize CGSize;
typedef NSRect CGRect;
typedef NSPoint CGPoint;
typedef NSTimeInterval CFTimeInterval;
typedef CFTimeInterval CFAbsoluteTime;

#define CGSizeMake NSMakeSize
#define CGRectMake NSMakeRect
#define CGPointMake NSMakePoint
#define NSRectFromCGRect(x) (x)

julian <julian_>


No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by stefanbidi (Posted a comment)
  • -email is unavailable- added by CaS (Posted a comment)
  • -email is unavailable- added by julian_ (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-12-20 CaS Open/ClosedOpen => Closed

    Back to the top

    Powered by Savane 3.3