[Top][All Lists]

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

Re: Corrections for GDL2

From: Stéphane Corthésy
Subject: Re: Corrections for GDL2
Date: Tue, 31 Dec 2002 14:11:47 +0100

On Monday, December 30, 2002, at 11:21 PM, Mirko Viviani wrote:

Stéphane Corthésy <address@hidden> ha scritto:

I hope you will include these modifications in the source tree, as
they are useful for all.

I've currently committed some of these things and the header changes (probably
there are still problems). The dependencies are not solved yet, plus the
inclusion of compatibility headers.

Thanks. It works much better now. We'll take care on (compatibility) header inclusion later. What could be done is to #include "config.h" in all .m files, this way we can put what we need for OSX in config.h.

Anyway I don't know yet how to do with most of the NSDebug stuff.

Just keep it! We'll define corresponding macros/functions on OSX too.

- Use of #include and #import is currently inconsistent in GDL2.
Sometimes we find #include, sometimes #import, for the same header
files. Apple recommends to no longer use #import, because it suffers
from serious bugs. I'd suggest to use #include too, for that reason.

I can't use include for apple foundation...

It works. That's even the way Apple recommends to do things: #import is deprecated. There is a tech note, but I can't find it yet.

- Why do you use #include <<gnustep/base/...>? Couldn't you make a
framework out of gnustep base and use #include <<gnustep-base/...>?
Would be more consistent (and easier for OSX support)

I'm not the author of these things. We'll see how Richard think.


Could it be possible to change the way rcsids are defined in files? Currently there are a lot of warnings displayed:

EOControl/EODataSource.m:34: warning: `rcsId' defined but not used

OmniGroup uses a macro to declare them:

// Copyright 1997-2002 Omni Development, Inc. All rights reserved.
// This software may only be used and reproduced according to the
// terms in the file OmniSourceLicense.html, which should be
// distributed with this project and can also be found at
// $Header: /Network/Source/CVS/OmniGroup/Frameworks/OmniBase/rcsid.h,v 1.12 2002/03/09 01:53:59 kc Exp $
// Define a wrapper macro for rcs_id generation that doesn't produce warnings on any platform. The old hack of rcs_id = (rcs_id, string) is no longer warning free.

#define RCS_ID(rcsIdString) \
static const void *rcs_id = rcsIdString; \
static const void *__rcs_id_hack() { __rcs_id_hack(); return rcs_id; }

#define NAMED_RCS_ID(name, rcsIdString) \
static const void *rcs_id_ ## name = rcsIdString; \
static const void *__rcs_id_ ## name ## _hack() { __rcs_id_ ## name ## _hack(); return rcs_id_ ## name; }

And then, in source files, you #import first the header file containing these declarations, and then:

#import <OmniBase/rcsid.h>

RCS_ID("$Header: /Network/Source/CVS/OmniGroup/Frameworks/OmniBase/NSData-OBObjectCompatibility.m,v 1.9 2002/03/09 01:53:59 kc Exp $")

This way we avoid all these warnings that hide most important ones.

Here are some other modifications, due to last commits:

- In EODataSource.m: #include <string.h>, for NULL
- In EOEditingContext.m: replace "respondsTo:" with "respondsToSelector:" (twice)
- In EOFault.m: add @class EOEditingContext; replace NSDebugFLLog with corresponding EOLog; line 422: condition is always verified, because EOFaultHandler is a subclass of NSObject, and NSObject implements -editingContext. #import <EOControl/EOClassDescription.h>
- In EOFetchSpecification.m: #import <EOControl/EOQualifier.h>
- In EOKeyValueCoding.h: #import <Foundation/NSDictionary.h> instead of @class NSDictionary
- In EOKeyValueCoding.m: #include <ctype.h>
- In EOMutableKnownKeyDictionary.m: #import <EOControl/EONull.h>
- In EOObjectStoreCoordinator.m: #import <EOControl/EOEditingContext.h> and #import <EOControl/EODebug.h>
- In EOObserver.m: #import <Foundation/NSEnumerator.h> and #include <string.h>
- In EOQualifier.h: @class NSException
- In EOAccessFault.m: #import <EOAccess/EODatabaseContextPriv.h> and #import <EOControl/EOKeyGlobalID.h>
- In EOAttribute.m: #include <string.h>
- In EODatabase.m: #import <EOControl/EONull.h>
- In EODatabaseChannel.m: #import <EOControl/EOKeyGlobalID.h> instead of <EOControl/EOGlobalID.h>
- In EODatabaseContext.m: #include <string.h>. Line 826 and 5473: cast (EOKeyGlobalID *)
- In EODatabaseDataSource.m: #import <Foundation/NSEnumerator.h>
- In EODatabaseOperation.m: #import <Foundation/NSEnumerator.h>
- In EOModelGroup.m: #import <Foundation/NSEnumerator.h> and #import <Foundation/NSPathUtilities.h>

Enough for this year ;-)


reply via email to

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