mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 17:10:48 +00:00
garbage collection fixups
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@27578 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
43ad91f79e
commit
952af9c197
65 changed files with 707 additions and 214 deletions
69
ChangeLog
69
ChangeLog
|
@ -1,3 +1,72 @@
|
|||
2009-01-12 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSIndexPath.m:
|
||||
* Source/NSSocketPortNameServer.m:
|
||||
* Source/NSTimeZone.m:
|
||||
* Source/GSInvocation.h:
|
||||
* Source/GSSocketStream.m:
|
||||
* Source/NSValueTransformer.m:
|
||||
* Source/NSPortCoder.m:
|
||||
* Source/NSSpellServer.m:
|
||||
* Source/NSBundle.m:
|
||||
* Source/NSURLHandle.m:
|
||||
* Source/NSPropertyList.m:
|
||||
* Source/NSPathUtilities.m:
|
||||
* Source/NSProcessInfo.m:
|
||||
* Source/NSDistributedNotificationCenter.m:
|
||||
* Source/GNUmakefile:
|
||||
* Source/NSSocketPort.m:
|
||||
* Source/NSRunLoop.m:
|
||||
* Source/NSUserDefaults.m:
|
||||
* Source/NSArray.m:
|
||||
* Source/NSMessagePortNameServer.m:
|
||||
* Source/NSDebug.m:
|
||||
* Source/NSKeyedUnarchiver.m:
|
||||
* Source/NSKeyValueObserving.m:
|
||||
* Source/GSHTTPURLHandle.m:
|
||||
* Source/GSFFIInvocation.m:
|
||||
* Source/NSMessagePort.m:
|
||||
* Source/NSInvocation.m:
|
||||
* Source/NSFileManager.m:
|
||||
* Source/NSURLResponse.m:
|
||||
* Source/NSURLProtocol.m:
|
||||
* Source/NSException.m:
|
||||
* Source/NSURL.m:
|
||||
* Source/NSString.m:
|
||||
* Source/NSObject.m:
|
||||
* Source/NSDecimalNumber.m:
|
||||
* Source/Additions/GSXML.m:
|
||||
* Source/Additions/GNUmakefile:
|
||||
* Source/Additions/GSCategories.m:
|
||||
* Source/Additions/GCDictionary.m:
|
||||
* Source/Additions/GSMime.m:
|
||||
* Source/GSString.m:
|
||||
* Source/NSConnection.m:
|
||||
* Source/NSThread.m:
|
||||
* Source/NSHost.m:
|
||||
* Source/NSProtocolChecker.m:
|
||||
* Source/GSHTTPAuthentication.m:
|
||||
* Source/NSSerializer.m:
|
||||
* Source/NSClassDescription.m:
|
||||
* Source/GSFileHandle.m:
|
||||
* Source/NSSet.m:
|
||||
* Source/NSDistantObject.m:
|
||||
* Source/NSTask.m:
|
||||
* Source/NSNumberFormatter.m:
|
||||
* Source/GSFTPURLHandle.m:
|
||||
* SSL/GSSSLHandle.m:
|
||||
* configure.ac:
|
||||
* configure:
|
||||
* base.make.in:
|
||||
* Tools/sfparse.m:
|
||||
* Tools/plget.m:
|
||||
* Tools/AGSParser.m:
|
||||
* Tools/autogsdoc.m:
|
||||
* Tools/AGSOutput.m:
|
||||
* Tools/HTMLLinker.m:
|
||||
Tweaks to get things to compile with garbage collection again
|
||||
and (mostly) compile without warnings.
|
||||
|
||||
2009-01-09 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSTimer.m: ([invalidate]) release target and user info.
|
||||
|
|
|
@ -195,7 +195,7 @@ sslError(int err)
|
|||
* Set non-blocking so accept won't hang if remote end goes wrong.
|
||||
*/
|
||||
[self setNonBlocking: YES];
|
||||
RETAIN(self); // Don't get destroyed during runloop
|
||||
IF_NO_GC([self retain];) // Don't get destroyed during runloop
|
||||
loop = [NSRunLoop currentRunLoop];
|
||||
ret = SSL_set_fd(ssl, descriptor);
|
||||
if (ret == 1)
|
||||
|
@ -293,7 +293,7 @@ sslError(int err)
|
|||
{
|
||||
ssl = SSL_new(ctx);
|
||||
}
|
||||
RETAIN(self); // Don't get destroyed during runloop
|
||||
IF_NO_GC([self retain];) // Don't get destroyed during runloop
|
||||
/*
|
||||
* Set non-blocking so accept won't hang if remote end goes wrong.
|
||||
*/
|
||||
|
|
|
@ -103,9 +103,11 @@ _GCCompareObjects(NSMapTable *table, const GCInfo *o1, const GCInfo *o2)
|
|||
static void
|
||||
_GCRetainObjects(NSMapTable *table, const void *ptr)
|
||||
{
|
||||
#if !GS_WITH_GC
|
||||
GCInfo *objectStruct = (GCInfo*)ptr;
|
||||
|
||||
RETAIN(objectStruct->object);
|
||||
[objectStruct->object retain];
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -45,7 +45,9 @@ Additions_OBJC_FILES =\
|
|||
behavior.m
|
||||
|
||||
ifneq ($(OBJC_RUNTIME_LIB), gnu)
|
||||
Additions_OBJC_FILES += GSNextRuntime.m
|
||||
ifneq ($(OBJC_RUNTIME_LIB), gnugc)
|
||||
Additions_OBJC_FILES += GSNextRuntime.m
|
||||
endif
|
||||
endif
|
||||
ifneq ($(FOUNDATION_LIB), gnu)
|
||||
Additions_OBJC_FILES += GSCompatibility.m
|
||||
|
|
|
@ -784,7 +784,7 @@ static void MD5Transform (uint32_t buf[4], uint32_t const in[16])
|
|||
d = [NSData dataWithBytes: &bytes[off] length: end - off];
|
||||
name = [[NSString alloc] initWithData: d
|
||||
encoding: NSASCIIStringEncoding];
|
||||
AUTORELEASE(name);
|
||||
IF_NO_GC(AUTORELEASE(name);)
|
||||
if (namePtr != 0)
|
||||
{
|
||||
*namePtr = name;
|
||||
|
|
|
@ -681,7 +681,7 @@ wordData(NSString *word)
|
|||
if ([parser isComplete] == YES)
|
||||
{
|
||||
newDocument = [parser mimeDocument];
|
||||
RETAIN(newDocument);
|
||||
IF_NO_GC(RETAIN(newDocument);)
|
||||
}
|
||||
RELEASE(parser);
|
||||
return AUTORELEASE(newDocument);
|
||||
|
@ -853,7 +853,7 @@ wordData(NSString *word)
|
|||
tmp = [[NSString alloc] initWithBytes: buffer
|
||||
length: buflen
|
||||
encoding: NSASCIIStringEncoding];
|
||||
AUTORELEASE(tmp);
|
||||
IF_NO_GC([tmp autorelease];)
|
||||
return [tmp lowercaseString];
|
||||
}
|
||||
buflen = 0;
|
||||
|
@ -2498,7 +2498,7 @@ NSDebugMLLog(@"GSMime", @"Header parsed - %@", info);
|
|||
expect = 0;
|
||||
}
|
||||
context = [self contextFor: hdr];
|
||||
RETAIN(context);
|
||||
IF_NO_GC([context retain];)
|
||||
NSDebugMLLog(@"GSMime", @"Parse body expects %u bytes", expect);
|
||||
}
|
||||
|
||||
|
@ -3821,7 +3821,7 @@ appendString(NSMutableData *m, unsigned offset, unsigned fold,
|
|||
{
|
||||
r = [NSStringClass allocWithZone: NSDefaultMallocZone()];
|
||||
r = [r initWithData: d encoding: NSASCIIStringEncoding];
|
||||
AUTORELEASE(r);
|
||||
IF_NO_GC([r autorelease];)
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
@ -3882,7 +3882,7 @@ appendString(NSMutableData *m, unsigned offset, unsigned fold,
|
|||
{
|
||||
r = [NSStringClass allocWithZone: NSDefaultMallocZone()];
|
||||
r = [r initWithData: d encoding: NSASCIIStringEncoding];
|
||||
AUTORELEASE(r);
|
||||
IF_NO_GC([r autorelease];)
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
@ -4753,7 +4753,7 @@ appendString(NSMutableData *m, unsigned offset, unsigned fold,
|
|||
enc = [documentClass encodingFromCharset: charset];
|
||||
s = [NSStringClass allocWithZone: NSDefaultMallocZone()];
|
||||
s = [s initWithData: content encoding: enc];
|
||||
AUTORELEASE(s);
|
||||
IF_NO_GC([s autorelease];)
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
@ -5620,7 +5620,7 @@ appendString(NSMutableData *m, unsigned offset, unsigned fold,
|
|||
hdr = [hdr initWithName: @"content-type" value: val parameters: nil];
|
||||
[hdr setObject: type forKey: @"Type"];
|
||||
[hdr setObject: subtype forKey: @"Subtype"];
|
||||
AUTORELEASE(hdr);
|
||||
IF_NO_GC([hdr autorelease];)
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -3800,7 +3800,7 @@ fatalErrorFunction(void *ctx, const unsigned char *msg, ...)
|
|||
else
|
||||
{
|
||||
result = [GSXPathObject _newWithNativePointer: res context: self];
|
||||
AUTORELEASE (result);
|
||||
IF_NO_GC ([result autorelease];)
|
||||
}
|
||||
xmlXPathFreeCompExpr (comp);
|
||||
|
||||
|
@ -4034,7 +4034,7 @@ static BOOL warned = NO; if (warned == NO) { warned = YES; NSLog(@"WARNING, use
|
|||
newdoc = [newdoc _initFrom: res
|
||||
parent: self
|
||||
ownsLib: YES];
|
||||
AUTORELEASE(newdoc);
|
||||
IF_NO_GC([newdoc autorelease];)
|
||||
}
|
||||
}
|
||||
/*
|
||||
|
@ -4316,7 +4316,7 @@ static BOOL warned = NO; if (warned == NO) { warned = YES; NSLog(@"WARNING, use
|
|||
}
|
||||
self = [[NSString alloc] initWithCharacters: to length: output];
|
||||
NSZoneFree (NSDefaultMallocZone (), to);
|
||||
AUTORELEASE(self);
|
||||
IF_NO_GC([self autorelease];)
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -91,25 +91,27 @@ preface.m \
|
|||
mframe.m
|
||||
|
||||
ifeq ($(findstring openbsd, $(GNUSTEP_TARGET_OS)), openbsd)
|
||||
GNU_MFILES += thr-pthread.m
|
||||
OBJC_LIBS += -lpthread
|
||||
GNU_MFILES += thr-pthread.m
|
||||
OBJC_LIBS += -lpthread
|
||||
endif
|
||||
|
||||
ifneq ($(OBJC_RUNTIME_LIB), gnu)
|
||||
GNU_MFILES += objc-gnu2next.m
|
||||
ifeq ($(HAVE_PTHREAD_H), yes)
|
||||
GNU_MFILES += thr-pthread.m
|
||||
else
|
||||
GNU_MFILES += thr-mach.m
|
||||
endif
|
||||
ifneq ($(OBJC_RUNTIME_LIB), gnugc)
|
||||
GNU_MFILES += objc-gnu2next.m
|
||||
ifeq ($(HAVE_PTHREAD_H), yes)
|
||||
GNU_MFILES += thr-pthread.m
|
||||
else
|
||||
GNU_MFILES += thr-mach.m
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(GNUSTEP_TARGET_OS), mingw32)
|
||||
GNU_MFILES += libgnustep-base-entry.m
|
||||
GNU_MFILES += libgnustep-base-entry.m
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_OBJC_SYNC_ENTER), no)
|
||||
GNU_MFILES += synchronization.m
|
||||
GNU_MFILES += synchronization.m
|
||||
endif
|
||||
|
||||
|
||||
|
|
|
@ -533,7 +533,7 @@ GSFFIInvocationCallback(ffi_cif *cif, void *retp, void **args, void *user)
|
|||
values: args
|
||||
frame: user
|
||||
signature: sig];
|
||||
AUTORELEASE(invocation);
|
||||
IF_NO_GC([invocation autorelease];)
|
||||
[invocation setTarget: obj];
|
||||
[invocation setSelector: selector];
|
||||
|
||||
|
@ -555,7 +555,7 @@ GSFFIInvocationCallback(ffi_cif *cif, void *retp, void **args, void *user)
|
|||
if ([sig methodReturnType] && *[sig methodReturnType] == _C_ID
|
||||
&& ((NSInvocation_t *)invocation)->_validReturn == YES)
|
||||
{
|
||||
AUTORELEASE(*(id *)retp);
|
||||
IF_NO_GC([*(id *)retp autorelease];)
|
||||
((NSInvocation_t *)invocation)->_validReturn = NO;
|
||||
}
|
||||
|
||||
|
|
|
@ -529,7 +529,7 @@ static NSLock *urlLock = nil;
|
|||
// NSLog(@"Lookup for handle for '%@'", page);
|
||||
[urlLock lock];
|
||||
obj = [urlCache objectForKey: page];
|
||||
AUTORELEASE(RETAIN(obj));
|
||||
IF_NO_GC([[obj retain] autorelease];)
|
||||
[urlLock unlock];
|
||||
// NSLog(@"Found handle %@", obj);
|
||||
}
|
||||
|
@ -729,7 +729,7 @@ static NSLock *urlLock = nil;
|
|||
dHandle = [NSFileHandle
|
||||
fileHandleAsClientInBackgroundAtAddress: h service: p
|
||||
protocol: @"tcp"];
|
||||
RETAIN(dHandle);
|
||||
IF_NO_GC([dHandle retain];)
|
||||
nc = [NSNotificationCenter defaultCenter];
|
||||
[nc addObserver: self
|
||||
selector: @selector(_data:)
|
||||
|
|
|
@ -1019,7 +1019,7 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
|
|||
{
|
||||
if (fh_stderr != nil)
|
||||
{
|
||||
RETAIN(fh_stderr);
|
||||
IF_NO_GC([fh_stderr retain];)
|
||||
RELEASE(self);
|
||||
}
|
||||
else
|
||||
|
@ -1039,7 +1039,7 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
|
|||
{
|
||||
if (fh_stdin != nil)
|
||||
{
|
||||
RETAIN(fh_stdin);
|
||||
IF_NO_GC([fh_stdin retain];)
|
||||
RELEASE(self);
|
||||
}
|
||||
else
|
||||
|
@ -1059,7 +1059,7 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
|
|||
{
|
||||
if (fh_stdout != nil)
|
||||
{
|
||||
RETAIN(fh_stdout);
|
||||
IF_NO_GC([fh_stdout retain];)
|
||||
RELEASE(self);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -135,7 +135,7 @@ static GSMimeParser *mimeParser = nil;
|
|||
RELEASE(authentication);
|
||||
}
|
||||
}
|
||||
AUTORELEASE(RETAIN(authentication));
|
||||
IF_NO_GC([[authentication retain] autorelease];)
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
|
|
|
@ -291,7 +291,7 @@ static void debugWrite(GSHTTPURLHandle *handle, NSData *data)
|
|||
{
|
||||
[urlOrder removeObjectIdenticalTo: obj];
|
||||
[urlOrder addObject: obj];
|
||||
AUTORELEASE(RETAIN(obj));
|
||||
IF_NO_GC([[obj retain] autorelease];)
|
||||
}
|
||||
[urlLock unlock];
|
||||
//NSLog(@"Found handle %@", obj);
|
||||
|
@ -310,7 +310,7 @@ static void debugWrite(GSHTTPURLHandle *handle, NSData *data)
|
|||
debugFile = [NSString stringWithFormat: @"%@/GSHTTP.%d",
|
||||
NSTemporaryDirectory(),
|
||||
[[NSProcessInfo processInfo] processIdentifier]];
|
||||
RETAIN(debugFile);
|
||||
IF_NO_GC([debugFile retain];)
|
||||
|
||||
#if !defined(__MINGW32__)
|
||||
sslClass = [NSFileHandle sslClass];
|
||||
|
@ -404,7 +404,7 @@ static void debugWrite(GSHTTPURLHandle *handle, NSData *data)
|
|||
NSString *version;
|
||||
NSMapEnumerator enumerator;
|
||||
|
||||
RETAIN(self);
|
||||
IF_NO_GC([self retain];)
|
||||
if (debug) NSLog(@"%@ %s", NSStringFromSelector(_cmd), keepalive?"K":"");
|
||||
|
||||
s = [basic mutableCopy];
|
||||
|
@ -549,7 +549,7 @@ static void debugWrite(GSHTTPURLHandle *handle, NSData *data)
|
|||
NSRange r;
|
||||
unsigned readCount;
|
||||
|
||||
RETAIN(self);
|
||||
IF_NO_GC([self retain];)
|
||||
|
||||
if (debug) NSLog(@"%@ %s", NSStringFromSelector(_cmd), keepalive?"K":"");
|
||||
d = [dict objectForKey: NSFileHandleNotificationDataItem];
|
||||
|
@ -801,7 +801,7 @@ static void debugWrite(GSHTTPURLHandle *handle, NSData *data)
|
|||
NSData *d;
|
||||
GSMimeParser *p = [GSMimeParser new];
|
||||
|
||||
RETAIN(self);
|
||||
IF_NO_GC([self retain];)
|
||||
if (debug) NSLog(@"%@ %s", NSStringFromSelector(_cmd), keepalive?"K":"");
|
||||
d = [dict objectForKey: NSFileHandleNotificationDataItem];
|
||||
if (debug == YES) debugRead(self, d);
|
||||
|
@ -875,7 +875,7 @@ static void debugWrite(GSHTTPURLHandle *handle, NSData *data)
|
|||
NSString *method;
|
||||
NSString *path;
|
||||
|
||||
RETAIN(self);
|
||||
IF_NO_GC([self retain];)
|
||||
if (debug) NSLog(@"%@ %s", NSStringFromSelector(_cmd), keepalive?"K":"");
|
||||
|
||||
path = [[u path] stringByTrimmingSpaces];
|
||||
|
@ -1046,7 +1046,7 @@ static void debugWrite(GSHTTPURLHandle *handle, NSData *data)
|
|||
NSDictionary *userInfo = [notification userInfo];
|
||||
NSString *e;
|
||||
|
||||
RETAIN(self);
|
||||
IF_NO_GC([self retain];)
|
||||
if (debug) NSLog(@"%@ %s", NSStringFromSelector(_cmd), keepalive?"K":"");
|
||||
e = [userInfo objectForKey: GSFileHandleNotificationError];
|
||||
if (e != nil)
|
||||
|
@ -1410,7 +1410,7 @@ static void debugWrite(GSHTTPURLHandle *handle, NSData *data)
|
|||
host, port, [NSError _last]]];
|
||||
return;
|
||||
}
|
||||
RETAIN(sock);
|
||||
IF_NO_GC([sock retain];)
|
||||
nc = [NSNotificationCenter defaultCenter];
|
||||
[nc addObserver: self
|
||||
selector: @selector(bgdConnect:)
|
||||
|
|
|
@ -18,7 +18,8 @@
|
|||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
*/
|
||||
|
||||
#ifndef __GSInvocation_h_GNUSTEP_BASE_INCLUDE
|
||||
|
@ -59,6 +60,6 @@ GSFFIInvokeWithTargetAndImp(NSInvocation *inv, id anObject, IMP imp);
|
|||
}\
|
||||
} while (0)
|
||||
|
||||
#define RETAIN_RETURN_VALUE do { if (*_info[0].type == _C_ID) RETAIN (*(id*) _retval);} while (0)
|
||||
#define RETAIN_RETURN_VALUE IF_NO_GC(do { if (*_info[0].type == _C_ID) RETAIN (*(id*) _retval);} while (0))
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1953,7 +1953,7 @@ setNonBlocking(SOCKET fd)
|
|||
int result;
|
||||
socklen_t len = sizeof(error);
|
||||
|
||||
AUTORELEASE(RETAIN(self));
|
||||
IF_NO_GC([[self retain] autorelease];)
|
||||
[self _unschedule];
|
||||
result = getsockopt([self _sock], SOL_SOCKET, SO_ERROR, &error, &len);
|
||||
|
||||
|
@ -2356,7 +2356,7 @@ setNonBlocking(SOCKET fd)
|
|||
socklen_t len = sizeof(error);
|
||||
int result;
|
||||
|
||||
AUTORELEASE(RETAIN(self));
|
||||
IF_NO_GC([[self retain] autorelease];)
|
||||
[self _schedule];
|
||||
result
|
||||
= getsockopt((intptr_t)_loopID, SOL_SOCKET, SO_ERROR, &error, &len);
|
||||
|
|
|
@ -2604,9 +2604,8 @@ substring_c(GSStr self, NSRange aRange)
|
|||
o->_count = aRange.length;
|
||||
o->_flags.wide = 0;
|
||||
o->_flags.free = 0;
|
||||
ASSIGN(o->_parent, self);
|
||||
AUTORELEASE((id)o);
|
||||
return (id)o;
|
||||
ASSIGN(o->_parent, (id)self);
|
||||
return AUTORELEASE((id)o);
|
||||
}
|
||||
|
||||
static inline NSString*
|
||||
|
@ -2624,9 +2623,8 @@ substring_u(GSStr self, NSRange aRange)
|
|||
o->_count = aRange.length;
|
||||
o->_flags.wide = 1;
|
||||
o->_flags.free = 0;
|
||||
ASSIGN(o->_parent, self);
|
||||
AUTORELEASE((id)o);
|
||||
return (id)o;
|
||||
ASSIGN(o->_parent, (id)self);
|
||||
return AUTORELEASE((id)o);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -1659,7 +1659,7 @@ compare(id elem1, id elem2, void* context)
|
|||
{
|
||||
id tmp = [self objectAtIndex: i1];
|
||||
|
||||
RETAIN(tmp);
|
||||
IF_NO_GC([tmp retain];)
|
||||
[self replaceObjectAtIndex: i1 withObject: [self objectAtIndex: i2]];
|
||||
[self replaceObjectAtIndex: i2 withObject: tmp];
|
||||
RELEASE(tmp);
|
||||
|
@ -1858,7 +1858,7 @@ compare(id elem1, id elem2, void* context)
|
|||
* first equal object we don't get left with a bad object
|
||||
* pointer for later comparisons.
|
||||
*/
|
||||
RETAIN(anObject);
|
||||
IF_NO_GC([anObject retain];)
|
||||
}
|
||||
(*rem)(self, remSel, i);
|
||||
}
|
||||
|
@ -1950,7 +1950,7 @@ compare(id elem1, id elem2, void* context)
|
|||
* first equal object we don't get left with a bad object
|
||||
* pointer for later comparisons.
|
||||
*/
|
||||
RETAIN(anObject);
|
||||
IF_NO_GC([anObject retain];)
|
||||
}
|
||||
(*rem)(self, remSel, i);
|
||||
}
|
||||
|
|
|
@ -268,7 +268,7 @@ GSPrivateExecutablePath()
|
|||
executablePath = AbsolutePathOfExecutable(executablePath, YES);
|
||||
}
|
||||
|
||||
RETAIN(executablePath);
|
||||
IF_NO_GC([executablePath retain];)
|
||||
beenHere = YES;
|
||||
}
|
||||
[load_lock unlock];
|
||||
|
@ -1216,10 +1216,12 @@ _bundle_load_callback(Class theClass, struct objc_category *theCategory)
|
|||
if (_byIdentifier)
|
||||
{
|
||||
bundle = (NSBundle *)NSMapGet(_byIdentifier, identifier);
|
||||
IF_NO_GC(
|
||||
if (bundle != nil)
|
||||
{
|
||||
RETAIN(bundle); /* retain - look as if we were alloc'ed */
|
||||
[bundle retain]; /* retain - look as if we were alloc'ed */
|
||||
}
|
||||
)
|
||||
}
|
||||
[load_lock unlock];
|
||||
return AUTORELEASE(bundle);
|
||||
|
@ -1295,7 +1297,7 @@ _bundle_load_callback(Class theClass, struct objc_category *theCategory)
|
|||
|
||||
if (bundle != nil)
|
||||
{
|
||||
RETAIN(bundle); /* retain - look as if we were alloc'ed */
|
||||
IF_NO_GC([bundle retain];)
|
||||
[load_lock unlock];
|
||||
[self dealloc];
|
||||
return bundle;
|
||||
|
@ -1347,7 +1349,7 @@ _bundle_load_callback(Class theClass, struct objc_category *theCategory)
|
|||
|
||||
if (bundle != nil)
|
||||
{
|
||||
RETAIN(bundle); /* retain - look as if we were alloc'ed */
|
||||
IF_NO_GC([bundle retain];)
|
||||
[load_lock unlock];
|
||||
[self dealloc];
|
||||
return bundle;
|
||||
|
@ -1371,7 +1373,7 @@ _bundle_load_callback(Class theClass, struct objc_category *theCategory)
|
|||
* dynamically loaded code, so we want to prevent a bundle
|
||||
* being loaded twice.
|
||||
*/
|
||||
RETAIN(self);
|
||||
IF_NO_GC([self retain];)
|
||||
return;
|
||||
}
|
||||
if (_path != nil)
|
||||
|
@ -1556,7 +1558,7 @@ _bundle_load_callback(Class theClass, struct objc_category *theCategory)
|
|||
We need it to answer calls like bundleForClass:; also, users
|
||||
normally want all loaded bundles to appear when they call
|
||||
+allBundles. */
|
||||
RETAIN (self);
|
||||
IF_NO_GC([self retain];)
|
||||
_loadingBundle = nil;
|
||||
|
||||
DESTROY(_loadingFrameworks);
|
||||
|
@ -1836,8 +1838,7 @@ _bundle_load_callback(Class theClass, struct objc_category *theCategory)
|
|||
}
|
||||
}
|
||||
}
|
||||
RETAIN(result);
|
||||
DESTROY(arp);
|
||||
IF_NO_GC([result retain]; DESTROY(arp);)
|
||||
return AUTORELEASE(result);
|
||||
}
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ static NSMapTable *classMap;
|
|||
object: aClass];
|
||||
description = NSMapGet(classMap, aClass);
|
||||
}
|
||||
RETAIN(description);
|
||||
IF_NO_GC([description retain];)
|
||||
[mapLock unlock];
|
||||
|
||||
return AUTORELEASE(description);
|
||||
|
|
|
@ -298,7 +298,7 @@ existingConnection(NSPort *receivePort, NSPort *sendPort)
|
|||
* We don't want this connection to be destroyed by another thread
|
||||
* between now and when it's returned from this function and used!
|
||||
*/
|
||||
AUTORELEASE(RETAIN(c));
|
||||
IF_NO_GC([[c retain] autorelease];)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -386,7 +386,7 @@ static NSLock *cached_proxies_gate = nil;
|
|||
{
|
||||
c = [self allocWithZone: NSDefaultMallocZone()];
|
||||
c = [c initWithReceivePort: r sendPort: s];
|
||||
AUTORELEASE(c);
|
||||
IF_NO_GC([c autorelease];)
|
||||
}
|
||||
return c;
|
||||
}
|
||||
|
@ -1150,7 +1150,7 @@ static NSLock *cached_proxies_gate = nil;
|
|||
*/
|
||||
[self setRequestMode: nil];
|
||||
|
||||
RETAIN(self);
|
||||
IF_NO_GC([self retain];)
|
||||
|
||||
if (debug_connection)
|
||||
{
|
||||
|
@ -3058,8 +3058,7 @@ static void callEncoder (DOContext *ctxt)
|
|||
if (cacheCoders == YES && _cachedDecoders != nil
|
||||
&& (count = [_cachedDecoders count]) > 0)
|
||||
{
|
||||
coder = [_cachedDecoders objectAtIndex: --count];
|
||||
RETAIN(coder);
|
||||
coder = RETAIN([_cachedDecoders objectAtIndex: --count]);
|
||||
[_cachedDecoders removeObjectAtIndex: count];
|
||||
}
|
||||
else
|
||||
|
@ -3112,8 +3111,7 @@ static void callEncoder (DOContext *ctxt)
|
|||
if (cacheCoders == YES && _cachedEncoders != nil
|
||||
&& (count = [_cachedEncoders count]) > 0)
|
||||
{
|
||||
coder = [_cachedEncoders objectAtIndex: --count];
|
||||
RETAIN(coder);
|
||||
coder = RETAIN([_cachedEncoders objectAtIndex: --count]);
|
||||
[_cachedEncoders removeObjectAtIndex: count];
|
||||
}
|
||||
else
|
||||
|
@ -3262,7 +3260,7 @@ static void callEncoder (DOContext *ctxt)
|
|||
node = GSIMapNodeForKey(_localTargets, (GSIMapKey)target);
|
||||
NSAssert(node == 0, NSInternalInconsistencyException);
|
||||
|
||||
RETAIN(anObj);
|
||||
IF_NO_GC([anObj retain];)
|
||||
GSIMapAddPair(_localObjects, (GSIMapKey)object, (GSIMapVal)((id)anObj));
|
||||
GSIMapAddPair(_localTargets, (GSIMapKey)target, (GSIMapVal)((id)anObj));
|
||||
|
||||
|
@ -3288,8 +3286,7 @@ static void callEncoder (DOContext *ctxt)
|
|||
}
|
||||
else
|
||||
{
|
||||
p = node->value.obj;
|
||||
RETAIN(p);
|
||||
p = RETAIN(node->value.obj);
|
||||
DESTROY(proxy);
|
||||
}
|
||||
if (p == nil && proxy != nil)
|
||||
|
@ -3642,8 +3639,7 @@ static void callEncoder (DOContext *ctxt)
|
|||
}
|
||||
else
|
||||
{
|
||||
p = node->value.obj;
|
||||
RETAIN(p);
|
||||
p = RETAIN(node->value.obj);
|
||||
DESTROY(aProxy);
|
||||
}
|
||||
if (p == nil && aProxy != nil)
|
||||
|
|
|
@ -801,11 +801,13 @@ GSDebugAllocationListRecordedObjects(Class c)
|
|||
the_table[i].num_recorded_objects * sizeof(id));
|
||||
|
||||
/* Retain all the objects - NB: if retaining one of the objects as a
|
||||
side effect releases another one of them , we are broken ... */
|
||||
side effect eleases another one of them , we are broken ... */
|
||||
#if !GS_WITH_GC
|
||||
for (k = 0; k < the_table[i].num_recorded_objects; k++)
|
||||
{
|
||||
RETAIN (tmp[k]);
|
||||
[tmp[k] retain];
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Then, we bravely unlock the lock */
|
||||
[uniqueLock unlock];
|
||||
|
|
|
@ -867,8 +867,8 @@ static NSDecimalNumber *one;
|
|||
double num;
|
||||
NSDecimalNumber *dnum;
|
||||
num = [self doubleValue];
|
||||
dnum = [[NSDecimalNumber alloc] initWithBytes: &num objCType: "d"];
|
||||
AUTORELEASE(dnum);
|
||||
dnum
|
||||
= AUTORELEASE([[NSDecimalNumber alloc] initWithBytes: &num objCType: "d"]);
|
||||
return [dnum decimalValue];
|
||||
}
|
||||
@end
|
||||
|
|
|
@ -674,8 +674,7 @@ enum proxyLocation
|
|||
|
||||
if (sig == nil)
|
||||
{
|
||||
sig = [NSMethodSignature signatureWithObjCTypes: "@@::"];
|
||||
RETAIN(sig);
|
||||
sig = RETAIN([NSMethodSignature signatureWithObjCTypes: "@@::"]);
|
||||
}
|
||||
return sig;
|
||||
}
|
||||
|
@ -690,8 +689,7 @@ enum proxyLocation
|
|||
|
||||
if (sig == nil)
|
||||
{
|
||||
sig = [NSMethodSignature signatureWithObjCTypes: "r*@:"];
|
||||
RETAIN(sig);
|
||||
sig = RETAIN([NSMethodSignature signatureWithObjCTypes: "r*@:"]);
|
||||
}
|
||||
return sig;
|
||||
}
|
||||
|
|
|
@ -744,8 +744,8 @@ static NSDistributedNotificationCenter *netCenter = nil;
|
|||
_remote = [NSConnection
|
||||
rootProxyForConnectionWithRegisteredName: service
|
||||
host: host usingNameServer: ns];
|
||||
RETAIN(_remote);
|
||||
DESTROY(pool);
|
||||
IF_NO_GC([_remote retain];)
|
||||
IF_NO_GC(DESTROY(pool);)
|
||||
}
|
||||
if (_remote == nil)
|
||||
{
|
||||
|
@ -755,10 +755,12 @@ static NSDistributedNotificationCenter *netCenter = nil;
|
|||
@"I attempted to start it at '%@'\n", cmd];
|
||||
}
|
||||
}
|
||||
#if !GS_WITH_GC
|
||||
else
|
||||
{
|
||||
RETAIN(_remote);
|
||||
[_remote retain];
|
||||
}
|
||||
#endif
|
||||
|
||||
c = [_remote connectionForProxy];
|
||||
[_remote setProtocolForProxy: p];
|
||||
|
|
|
@ -1008,8 +1008,8 @@ callUncaughtHandler(id value)
|
|||
result = [NSString stringWithFormat: @"%@ NAME:%@ REASON:%@",
|
||||
[super description], _e_name, _e_reason];
|
||||
}
|
||||
RETAIN(result);
|
||||
DESTROY(pool);
|
||||
IF_NO_GC([result retain];)
|
||||
IF_NO_GC(DESTROY(pool);)
|
||||
return AUTORELEASE(result);
|
||||
}
|
||||
|
||||
|
|
|
@ -2235,9 +2235,8 @@ static inline void gsedRelease(GSEnumeratedDirectory X)
|
|||
stringWithFileSystemRepresentation: dirbuf->d_name
|
||||
length: strlen(dirbuf->d_name)];
|
||||
#endif
|
||||
returnFileName = [dir.path stringByAppendingPathComponent:
|
||||
returnFileName];
|
||||
RETAIN(returnFileName);
|
||||
returnFileName = RETAIN([dir.path stringByAppendingPathComponent:
|
||||
returnFileName]);
|
||||
|
||||
/* TODO - can this one can be removed ? */
|
||||
if (!_flags.justContents)
|
||||
|
@ -2905,7 +2904,7 @@ static NSSet *fileKeys = nil;
|
|||
NSFileSystemNumber,
|
||||
NSFileType,
|
||||
nil];
|
||||
RETAIN(fileKeys);
|
||||
IF_NO_GC([fileKeys retain];)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -335,7 +335,7 @@ myHostName()
|
|||
* with ALL the IP addresses of any interfaces on the local machine
|
||||
*/
|
||||
host = [[self alloc] _initWithHostEntry: 0 key: localHostName];
|
||||
AUTORELEASE(host);
|
||||
IF_NO_GC([host autorelease];)
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -369,13 +369,13 @@ myHostName()
|
|||
else
|
||||
{
|
||||
host = [[self alloc] _initWithHostEntry: h key: name];
|
||||
AUTORELEASE(host);
|
||||
IF_NO_GC([host autorelease];)
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
AUTORELEASE(RETAIN(host));
|
||||
IF_NO_GC([[host retain] autorelease];)
|
||||
}
|
||||
[_hostCacheLock unlock];
|
||||
if (tryByAddress == YES)
|
||||
|
@ -431,18 +431,18 @@ myHostName()
|
|||
if (badAddr == NO)
|
||||
{
|
||||
host = [[self alloc] _initWithAddress: address];
|
||||
AUTORELEASE(host);
|
||||
IF_NO_GC([host autorelease];)
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
host = [[self alloc] _initWithHostEntry: h key: address];
|
||||
AUTORELEASE(host);
|
||||
IF_NO_GC([host autorelease];)
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
AUTORELEASE(RETAIN(host));
|
||||
IF_NO_GC([[host retain] autorelease];)
|
||||
}
|
||||
[_hostCacheLock unlock];
|
||||
return host;
|
||||
|
@ -507,7 +507,7 @@ myHostName()
|
|||
{
|
||||
host = [NSHost currentHost];
|
||||
}
|
||||
RETAIN(host);
|
||||
IF_NO_GC([host retain];)
|
||||
RELEASE(self);
|
||||
return host;
|
||||
}
|
||||
|
|
|
@ -60,8 +60,7 @@ static NSIndexPath *dummy = nil;
|
|||
id o = [self allocWithZone: NSDefaultMallocZone()];
|
||||
|
||||
o = [o initWithIndexes: indexes length: length];
|
||||
AUTORELEASE(o);
|
||||
return o;
|
||||
return AUTORELEASE(o);
|
||||
}
|
||||
|
||||
+ (void) initialize
|
||||
|
|
|
@ -823,8 +823,7 @@ _arg_addr(NSInvocation *inv, int index)
|
|||
NSZoneFree(NSDefaultMallocZone(), (void*)types);
|
||||
|
||||
RELEASE(self);
|
||||
self = [NSInvocation invocationWithMethodSignature: newSig];
|
||||
RETAIN(self);
|
||||
self = RETAIN([NSInvocation invocationWithMethodSignature: newSig]);
|
||||
|
||||
[aCoder decodeValueOfObjCType: @encode(id) at: &_target];
|
||||
|
||||
|
|
|
@ -1366,7 +1366,7 @@ replacementForClass(Class c)
|
|||
* turn off key-value-observing for it.
|
||||
*/
|
||||
isa = [self class];
|
||||
AUTORELEASE(info);
|
||||
IF_NO_GC(AUTORELEASE(info);)
|
||||
[self setObservationInfo: nil];
|
||||
}
|
||||
[kvoLock unlock];
|
||||
|
@ -1811,7 +1811,7 @@ triggerChangeNotificationsForDependentKey: (NSString*)dependentKey
|
|||
setup();
|
||||
[kvoLock lock];
|
||||
info = NSMapGet(infoTable, (void*)self);
|
||||
AUTORELEASE(RETAIN((id)info));
|
||||
IF_NO_GC(AUTORELEASE(RETAIN((id)info));)
|
||||
[kvoLock unlock];
|
||||
return info;
|
||||
}
|
||||
|
|
|
@ -787,7 +787,7 @@ static NSMapTable globalClassMap = 0;
|
|||
unsigned count;
|
||||
unsigned i;
|
||||
|
||||
RETAIN(_archive);
|
||||
IF_NO_GC(RETAIN(_archive);)
|
||||
_archiverClass = [_archive objectForKey: @"$archiver"];
|
||||
_version = [_archive objectForKey: @"$version"];
|
||||
|
||||
|
|
|
@ -874,7 +874,7 @@ static Class runLoopClass;
|
|||
DESTROY(rItems);
|
||||
NSDebugMLLog(@"NSMessagePort_details",
|
||||
@"got message %@ on 0x%x", pm, self);
|
||||
RETAIN(rp);
|
||||
IF_NO_GC([rp retain];)
|
||||
M_UNLOCK(myLock);
|
||||
NS_DURING
|
||||
{
|
||||
|
@ -1023,7 +1023,7 @@ static Class runLoopClass;
|
|||
|
||||
l = [runLoopClass currentRunLoop];
|
||||
|
||||
RETAIN(self);
|
||||
IF_NO_GC([self retain];)
|
||||
|
||||
[l addEvent: (void*)(uintptr_t)desc
|
||||
type: ET_WDESC
|
||||
|
@ -1137,7 +1137,7 @@ static void clean_up_sockets(void)
|
|||
unlink([name bytes]);
|
||||
}
|
||||
NSEndMapTableEnumeration(&mEnum);
|
||||
DESTROY(arp);
|
||||
IF_NO_GC(DESTROY(arp);)
|
||||
if (unknownThread == YES)
|
||||
{
|
||||
GSUnregisterCurrentThread();
|
||||
|
@ -1334,7 +1334,7 @@ typedef struct {
|
|||
else
|
||||
{
|
||||
RELEASE(theName);
|
||||
RETAIN(port);
|
||||
IF_NO_GC([port retain];)
|
||||
NSDebugMLLog(@"NSMessagePort", @"Using pre-existing port: %@", port);
|
||||
}
|
||||
IF_NO_GC(AUTORELEASE(port));
|
||||
|
@ -1454,7 +1454,7 @@ typedef struct {
|
|||
{
|
||||
if ((NSPort*) [handle recvPort] == recvPort)
|
||||
{
|
||||
RETAIN(handle);
|
||||
IF_NO_GC([handle retain];)
|
||||
NSEndMapTableEnumeration(&me);
|
||||
M_UNLOCK(myLock);
|
||||
return AUTORELEASE(handle);
|
||||
|
@ -1573,7 +1573,7 @@ typedef struct {
|
|||
{
|
||||
if ([self isValid] == YES)
|
||||
{
|
||||
RETAIN(self);
|
||||
IF_NO_GC([self retain];)
|
||||
M_LOCK(myLock);
|
||||
|
||||
if ([self isValid] == YES)
|
||||
|
@ -1709,7 +1709,7 @@ typedef struct {
|
|||
|
||||
- (void) removeHandle: (GSMessageHandle*)handle
|
||||
{
|
||||
RETAIN(self);
|
||||
IF_NO_GC([self retain];)
|
||||
M_LOCK(myLock);
|
||||
if ([handle sendPort] == self)
|
||||
{
|
||||
|
@ -1722,7 +1722,7 @@ typedef struct {
|
|||
* been retained - we must therefore release this port since the
|
||||
* handle no longer uses it.
|
||||
*/
|
||||
AUTORELEASE(self);
|
||||
IF_NO_GC([self autorelease];)
|
||||
}
|
||||
handle->sendPort = nil;
|
||||
}
|
||||
|
|
|
@ -97,7 +97,7 @@ static void clean_up_names(void)
|
|||
[defaultServer removePort: port];
|
||||
}
|
||||
NSEndMapTableEnumeration(&mEnum);
|
||||
DESTROY(arp);
|
||||
IF_NO_GC(DESTROY(arp);)
|
||||
if (unknownThread == YES)
|
||||
{
|
||||
GSUnregisterCurrentThread();
|
||||
|
@ -206,7 +206,7 @@ static void clean_up_names(void)
|
|||
data = [GSMimeDocument encodeBase64: data];
|
||||
name = [[NSString alloc] initWithData: data
|
||||
encoding: NSASCIIStringEncoding];
|
||||
AUTORELEASE(name);
|
||||
IF_NO_GC([name autorelease];)
|
||||
}
|
||||
[serverLock lock];
|
||||
if (!base_path)
|
||||
|
|
|
@ -102,17 +102,17 @@
|
|||
{
|
||||
NSNumberFormatter *c = (NSNumberFormatter*) NSCopyObject(self, 0, zone);
|
||||
|
||||
RETAIN(c->_negativeFormat);
|
||||
RETAIN(c->_positiveFormat);
|
||||
RETAIN(c->_attributesForPositiveValues);
|
||||
RETAIN(c->_attributesForNegativeValues);
|
||||
RETAIN(c->_maximum);
|
||||
RETAIN(c->_minimum);
|
||||
RETAIN(c->_roundingBehavior);
|
||||
RETAIN(c->_roundingBehavior);
|
||||
RETAIN(c->_attributedStringForNil);
|
||||
RETAIN(c->_attributedStringForNotANumber);
|
||||
RETAIN(c->_attributedStringForZero);
|
||||
IF_NO_GC(RETAIN(c->_negativeFormat);)
|
||||
IF_NO_GC(RETAIN(c->_positiveFormat);)
|
||||
IF_NO_GC(RETAIN(c->_attributesForPositiveValues);)
|
||||
IF_NO_GC(RETAIN(c->_attributesForNegativeValues);)
|
||||
IF_NO_GC(RETAIN(c->_maximum);)
|
||||
IF_NO_GC(RETAIN(c->_minimum);)
|
||||
IF_NO_GC(RETAIN(c->_roundingBehavior);)
|
||||
IF_NO_GC(RETAIN(c->_roundingBehavior);)
|
||||
IF_NO_GC(RETAIN(c->_attributedStringForNil);)
|
||||
IF_NO_GC(RETAIN(c->_attributedStringForNotANumber);)
|
||||
IF_NO_GC(RETAIN(c->_attributedStringForZero);)
|
||||
|
||||
return c;
|
||||
}
|
||||
|
|
|
@ -123,6 +123,7 @@ BOOL NSDeallocateZombies = NO;
|
|||
static Class zombieClass;
|
||||
static NSMapTable zombieMap;
|
||||
|
||||
#if !GS_WITH_GC
|
||||
static void GSMakeZombie(NSObject *o)
|
||||
{
|
||||
Class c = ((id)o)->class_pointer;
|
||||
|
@ -141,6 +142,7 @@ static void GSMakeZombie(NSObject *o)
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
static void GSLogZombie(id o, SEL sel)
|
||||
{
|
||||
|
@ -384,7 +386,7 @@ typedef struct obj_layout *obj;
|
|||
|
||||
#include "GNUstepBase/GSIMap.h"
|
||||
|
||||
static GSIMapTable_t retain_counts = {0};
|
||||
IF_NO_GC(static GSIMapTable_t retain_counts = {0};)
|
||||
|
||||
#endif /* !defined(REFCNT_LOCAL) */
|
||||
|
||||
|
@ -701,7 +703,7 @@ NSAllocateObject(Class aClass, unsigned extraBytes, NSZone *zone)
|
|||
}
|
||||
else if ([aClass requiresTypedMemory])
|
||||
{
|
||||
new = GC_CALLOC_EXPLICTLY_TYPED(1, size, gc_type);
|
||||
new = GC_calloc_explicitly_typed(1, size, gc_type);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -2116,6 +2116,6 @@ if (domainMask & mask) \
|
|||
}
|
||||
}
|
||||
|
||||
AUTORELEASE (paths);
|
||||
IF_NO_GC(AUTORELEASE (paths);)
|
||||
return paths;
|
||||
}
|
||||
|
|
|
@ -365,7 +365,7 @@ static IMP _xRefImp; /* Serialize a crossref. */
|
|||
|
||||
coder = [self allocWithZone: NSDefaultMallocZone()];
|
||||
coder = [coder initWithReceivePort: recv sendPort: send components: comp];
|
||||
AUTORELEASE(coder);
|
||||
IF_NO_GC(AUTORELEASE(coder);)
|
||||
return coder;
|
||||
}
|
||||
|
||||
|
|
|
@ -991,7 +991,7 @@ int main(int argc, char *argv[], char *env[])
|
|||
pid = [self processIdentifier];
|
||||
start = (unsigned long)GSTimeNow();
|
||||
host = [[self hostName] stringByReplacingString: @"." withString: @"_"];
|
||||
RETAIN(host);
|
||||
IF_NO_GC(RETAIN(host);)
|
||||
}
|
||||
count = counter++;
|
||||
[gnustep_global_lock unlock];
|
||||
|
|
|
@ -1384,8 +1384,7 @@ nodeToObject(GSXMLNode* node, NSPropertyListMutabilityOptions o, NSString **e)
|
|||
}
|
||||
}
|
||||
}
|
||||
RETAIN(result);
|
||||
RELEASE(arp);
|
||||
IF_NO_GC([result retain]; [arp release];)
|
||||
return AUTORELEASE(result);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -203,7 +203,7 @@
|
|||
if (sig == nil)
|
||||
{
|
||||
sig = [NSMethodSignature signatureWithObjCTypes: "@@::"];
|
||||
RETAIN(sig);
|
||||
IF_NO_GC(RETAIN(sig);)
|
||||
}
|
||||
return sig;
|
||||
}
|
||||
|
|
|
@ -1047,11 +1047,7 @@ static inline BOOL timerInvalidated(NSTimer *t)
|
|||
|
||||
RELEASE(arp);
|
||||
|
||||
if (when != nil)
|
||||
{
|
||||
AUTORELEASE(when);
|
||||
}
|
||||
else
|
||||
if (when == nil)
|
||||
{
|
||||
GSIArray watchers = context->watchers;
|
||||
unsigned i = GSIArrayCount(watchers);
|
||||
|
@ -1070,6 +1066,12 @@ static inline BOOL timerInvalidated(NSTimer *t)
|
|||
when = theFuture;
|
||||
}
|
||||
}
|
||||
#if !GS_WITH_GC
|
||||
else
|
||||
{
|
||||
AUTORELEASE(when);
|
||||
}
|
||||
#endif
|
||||
|
||||
NSDebugMLLog(@"NSRunLoop", @"limit date %f in %@",
|
||||
[when timeIntervalSinceReferenceDate], mode);
|
||||
|
|
|
@ -684,7 +684,7 @@ deserializeFromInfo(_NSDeserializerInfo* info)
|
|||
* rather than simply releasing as the key may
|
||||
* be referred to by a cross-reference later.
|
||||
*/
|
||||
AUTORELEASE(k);
|
||||
IF_NO_GC(AUTORELEASE(k);)
|
||||
RELEASE(o);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1074,7 +1074,7 @@ static Class NSMutableSet_concrete_class;
|
|||
}
|
||||
else
|
||||
{
|
||||
RETAIN(other); // In case it's held by us
|
||||
IF_NO_GC([other retain];) // In case it's held by us
|
||||
[self removeAllObjects];
|
||||
[self unionSet: other];
|
||||
RELEASE(other);
|
||||
|
|
|
@ -1076,7 +1076,7 @@ static Class runLoopClass;
|
|||
DESTROY(rItems);
|
||||
NSDebugMLLog(@"GSTcpHandle",
|
||||
@"got message %@ on 0x%x", pm, self);
|
||||
RETAIN(rp);
|
||||
IF_NO_GC(RETAIN(rp);)
|
||||
M_UNLOCK(myLock);
|
||||
NS_DURING
|
||||
{
|
||||
|
@ -1353,7 +1353,7 @@ static Class runLoopClass;
|
|||
|
||||
l = [runLoopClass currentRunLoop];
|
||||
|
||||
RETAIN(self);
|
||||
IF_NO_GC(RETAIN(self);)
|
||||
|
||||
#if defined(__MINGW32__)
|
||||
NSAssert(event != WSA_INVALID_EVENT, @"Socket without win32 event!");
|
||||
|
@ -1754,7 +1754,7 @@ static Class tcpPortClass;
|
|||
}
|
||||
else
|
||||
{
|
||||
RETAIN(port);
|
||||
IF_NO_GC(RETAIN(port);)
|
||||
NSDebugMLLog(@"NSPort", @"Using pre-existing port: %@", port);
|
||||
}
|
||||
IF_NO_GC(AUTORELEASE(port));
|
||||
|
@ -1938,7 +1938,7 @@ static Class tcpPortClass;
|
|||
{
|
||||
if ((NSPort*) [handle recvPort] == recvPort)
|
||||
{
|
||||
RETAIN(handle);
|
||||
IF_NO_GC(RETAIN(handle);)
|
||||
NSEndMapTableEnumeration(&me);
|
||||
M_UNLOCK(myLock);
|
||||
return AUTORELEASE(handle);
|
||||
|
@ -2060,7 +2060,7 @@ static Class tcpPortClass;
|
|||
{
|
||||
if ([self isValid] == YES)
|
||||
{
|
||||
RETAIN(self);
|
||||
IF_NO_GC(RETAIN(self);)
|
||||
M_LOCK(myLock);
|
||||
|
||||
if ([self isValid] == YES)
|
||||
|
@ -2254,7 +2254,7 @@ static Class tcpPortClass;
|
|||
*/
|
||||
- (void) removeHandle: (GSTcpHandle*)handle
|
||||
{
|
||||
RETAIN(self);
|
||||
IF_NO_GC(RETAIN(self);)
|
||||
M_LOCK(myLock);
|
||||
if ([handle sendPort] == self)
|
||||
{
|
||||
|
@ -2267,7 +2267,7 @@ static Class tcpPortClass;
|
|||
* been retained - we must therefore release this port since the
|
||||
* handle no longer uses it.
|
||||
*/
|
||||
AUTORELEASE(self);
|
||||
IF_NO_GC(AUTORELEASE(self);)
|
||||
}
|
||||
handle->sendPort = nil;
|
||||
}
|
||||
|
|
|
@ -1195,7 +1195,7 @@ typedef enum {
|
|||
NSMutableSet *known = (NSMutableSet*)NSMapGet(_portMap, port);
|
||||
NSString *name;
|
||||
|
||||
RETAIN(known);
|
||||
IF_NO_GC(RETAIN(known);)
|
||||
while ((name = [known anyObject]) != nil)
|
||||
{
|
||||
if ([self removePortForName: name] == NO)
|
||||
|
|
|
@ -122,7 +122,7 @@ GSSpellServerName(NSString *vendor, NSString *language)
|
|||
connection = [[NSConnection alloc] init];
|
||||
if (connection)
|
||||
{
|
||||
RETAIN(connection);
|
||||
IF_NO_GC(RETAIN(connection);)
|
||||
[connection setRootObject: self];
|
||||
result = [connection registerName: serverName];
|
||||
}
|
||||
|
@ -150,7 +150,7 @@ GSSpellServerName(NSString *vendor, NSString *language)
|
|||
- (void) setDelegate: (id)anObject
|
||||
{
|
||||
/* FIXME - we should not retain the delegate ! */
|
||||
RETAIN(anObject);
|
||||
IF_NO_GC(RETAIN(anObject);)
|
||||
ASSIGN(_delegate, anObject);
|
||||
}
|
||||
|
||||
|
|
|
@ -1485,7 +1485,7 @@ handle_printf_atsign (FILE *stream,
|
|||
length: dpos
|
||||
encoding: NSASCIIStringEncoding];
|
||||
NSZoneFree(NSDefaultMallocZone(), dst);
|
||||
AUTORELEASE(s);
|
||||
IF_NO_GC([s autorelease];)
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
@ -2553,7 +2553,7 @@ handle_printf_atsign (FILE *stream,
|
|||
}
|
||||
m = [d mutableCopy];
|
||||
[m appendBytes: "" length: 1];
|
||||
AUTORELEASE(m);
|
||||
IF_NO_GC([m autorelease];)
|
||||
return (const char*)[m bytes];
|
||||
}
|
||||
|
||||
|
@ -2589,7 +2589,7 @@ handle_printf_atsign (FILE *stream,
|
|||
{
|
||||
[m appendBytes: "" length: 1];
|
||||
}
|
||||
AUTORELEASE(m);
|
||||
IF_NO_GC([m autorelease];)
|
||||
return (const char*)[m bytes];
|
||||
}
|
||||
|
||||
|
@ -2636,7 +2636,7 @@ handle_printf_atsign (FILE *stream,
|
|||
allowLossyConversion: YES];
|
||||
m = [d mutableCopy];
|
||||
[m appendBytes: "" length: 1];
|
||||
AUTORELEASE(m);
|
||||
IF_NO_GC([m autorelease];)
|
||||
return (const char*)[m bytes];
|
||||
}
|
||||
|
||||
|
@ -2654,7 +2654,7 @@ handle_printf_atsign (FILE *stream,
|
|||
allowLossyConversion: NO];
|
||||
m = [d mutableCopy];
|
||||
[m appendBytes: "" length: 1];
|
||||
AUTORELEASE(m);
|
||||
IF_NO_GC([m autorelease];)
|
||||
return (const char*)[m bytes];
|
||||
}
|
||||
|
||||
|
|
|
@ -1278,7 +1278,7 @@ GSPrivateCheckTasks()
|
|||
|
||||
[tasksLock lock];
|
||||
t = (NSTask*)NSMapGet(activeTasks, (void*)(intptr_t)result);
|
||||
AUTORELEASE(RETAIN(t));
|
||||
IF_NO_GC(AUTORELEASE(RETAIN(t));)
|
||||
[tasksLock unlock];
|
||||
if (t != nil)
|
||||
{
|
||||
|
|
|
@ -834,7 +834,7 @@ pthread_detach(pthread_self());
|
|||
|
||||
/* The thread must persist until it finishes executing.
|
||||
*/
|
||||
RETAIN(self);
|
||||
IF_NO_GC(RETAIN(self);)
|
||||
|
||||
/* Mark the thread as active whiul it's running.
|
||||
*/
|
||||
|
|
|
@ -1432,14 +1432,16 @@ static NSMapTable *absolutes = 0;
|
|||
{
|
||||
tzdir = [tzdir stringByDeletingLastPathComponent];
|
||||
}
|
||||
if ([tzdir length] > 2)
|
||||
{
|
||||
RETAIN(tzdir);
|
||||
}
|
||||
else
|
||||
if ([tzdir length] <= 2)
|
||||
{
|
||||
localZoneString = tzdir = nil;
|
||||
}
|
||||
#if !GS_WITH_GC
|
||||
else
|
||||
{
|
||||
[tzdir retain];
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
if (localZoneString != nil && [localZoneString hasPrefix: tzdir])
|
||||
|
@ -1621,7 +1623,7 @@ static NSMapTable *absolutes = 0;
|
|||
to be in this directory, but initWithName:data:
|
||||
will do this anyway and log a message if not. */
|
||||
zone = [[self alloc] initWithName: name data: data];
|
||||
AUTORELEASE(zone);
|
||||
IF_NO_GC([zone autorelease];)
|
||||
}
|
||||
if (zone != nil)
|
||||
{
|
||||
|
|
|
@ -1651,7 +1651,7 @@ static unsigned urlAlign;
|
|||
if (c != 0)
|
||||
{
|
||||
handle = [[c alloc] initWithURL: self cached: shouldUseCache];
|
||||
AUTORELEASE(handle);
|
||||
IF_NO_GC([handle autorelease];)
|
||||
}
|
||||
}
|
||||
return handle;
|
||||
|
@ -1734,7 +1734,7 @@ static unsigned urlAlign;
|
|||
{
|
||||
id c = clientForHandle(_clients, sender);
|
||||
|
||||
RETAIN(self);
|
||||
IF_NO_GC([self retain];)
|
||||
[sender removeClient: self];
|
||||
if (c != nil)
|
||||
{
|
||||
|
|
|
@ -252,10 +252,10 @@ static Class NSURLHandleClass = 0;
|
|||
{
|
||||
id o = client;
|
||||
|
||||
RETAIN(o);
|
||||
IF_NO_GC([o retain];)
|
||||
[_clients removeObjectIdenticalTo: o];
|
||||
[_clients addObject: o];
|
||||
RELEASE(o);
|
||||
IF_NO_GC([o release];)
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -312,12 +312,12 @@ static Class NSURLHandleClass = 0;
|
|||
*/
|
||||
- (void) cancelLoadInBackground
|
||||
{
|
||||
RETAIN(self);
|
||||
IF_NO_GC([self retain];)
|
||||
[_clients makeObjectsPerformSelector:
|
||||
@selector(URLHandleResourceDidCancelLoading:)
|
||||
withObject: self];
|
||||
[self endLoadInBackground];
|
||||
RELEASE(self);
|
||||
IF_NO_GC([self release];)
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
|
@ -631,7 +631,7 @@ static NSLock *fileLock = nil;
|
|||
NS_DURING
|
||||
{
|
||||
obj = [fileCache objectForKey: path];
|
||||
AUTORELEASE(RETAIN(obj));
|
||||
IF_NO_GC([[obj retain] autorelease];)
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
|
@ -723,7 +723,7 @@ static NSLock *fileLock = nil;
|
|||
if (obj != nil)
|
||||
{
|
||||
DESTROY(self);
|
||||
RETAIN(obj);
|
||||
IF_NO_GC([obj retain];)
|
||||
}
|
||||
}
|
||||
NS_HANDLER
|
||||
|
|
|
@ -664,8 +664,10 @@ static NSURLProtocol *placeholder = nil;
|
|||
nil]]];
|
||||
return;
|
||||
}
|
||||
RETAIN(this->input);
|
||||
RETAIN(this->output);
|
||||
#if !GS_WITH_GC
|
||||
[this->input retain];
|
||||
[this->output retain];
|
||||
#endif
|
||||
if ([[url scheme] isEqualToString: @"https"] == YES)
|
||||
{
|
||||
[this->input setProperty: NSStreamSocketSecurityLevelNegotiatedSSL
|
||||
|
@ -1153,7 +1155,7 @@ static NSURLProtocol *placeholder = nil;
|
|||
{
|
||||
/* Make sure no action triggered by anything else destroys us prematurely.
|
||||
*/
|
||||
AUTORELEASE(RETAIN(self));
|
||||
IF_NO_GC([[self retain] autorelease];)
|
||||
|
||||
#if 0
|
||||
NSLog(@"stream: %@ handleEvent: %x for: %@", stream, event, self);
|
||||
|
@ -1451,8 +1453,10 @@ static NSURLProtocol *placeholder = nil;
|
|||
userInfo: nil]];
|
||||
return;
|
||||
}
|
||||
RETAIN(this->input);
|
||||
RETAIN(this->output);
|
||||
#if !GS_WITH_GC
|
||||
[this->input retain];
|
||||
[this->output retain];
|
||||
#endif
|
||||
if ([[url scheme] isEqualToString: @"https"] == YES)
|
||||
{
|
||||
[this->input setProperty: NSStreamSocketSecurityLevelNegotiatedSSL
|
||||
|
|
|
@ -279,7 +279,7 @@ typedef struct {
|
|||
p = AUTORELEASE([GSMimeParser new]);
|
||||
h = [[GSMimeHeader alloc] initWithName: @"content-displosition"
|
||||
value: disp];
|
||||
AUTORELEASE(h);
|
||||
IF_NO_GC([h autorelease];)
|
||||
sc = [NSScanner scannerWithString: [h value]];
|
||||
if ([p scanHeaderBody: sc into: h] == YES)
|
||||
{
|
||||
|
|
|
@ -449,7 +449,7 @@ static BOOL setSharedDefaults = NO; /* Flag to prevent infinite recursion */
|
|||
*/
|
||||
if (setSharedDefaults == YES)
|
||||
{
|
||||
RETAIN(sharedDefaults);
|
||||
IF_NO_GC([sharedDefaults retain];)
|
||||
[classLock unlock];
|
||||
return AUTORELEASE(sharedDefaults);
|
||||
}
|
||||
|
@ -628,7 +628,7 @@ static BOOL setSharedDefaults = NO; /* Flag to prevent infinite recursion */
|
|||
/* FIXME - should we set this as volatile domain for English ? */
|
||||
[sharedDefaults registerDefaults: [self _unlocalizedDefaults]];
|
||||
}
|
||||
RETAIN(sharedDefaults);
|
||||
IF_NO_GC([sharedDefaults retain];)
|
||||
updateCache(sharedDefaults);
|
||||
[classLock unlock];
|
||||
return AUTORELEASE(sharedDefaults);
|
||||
|
@ -1024,7 +1024,7 @@ static BOOL setSharedDefaults = NO; /* Flag to prevent infinite recursion */
|
|||
if (dict != nil && (object = [dict objectForKey: defaultName]))
|
||||
break;
|
||||
}
|
||||
RETAIN(object);
|
||||
IF_NO_GC([object retain];)
|
||||
[_lock unlock];
|
||||
return AUTORELEASE(object);
|
||||
}
|
||||
|
|
|
@ -91,7 +91,7 @@ static GSLazyLock *lock = nil;
|
|||
|
||||
[lock lock];
|
||||
transformer = [registry objectForKey: name];
|
||||
RETAIN(transformer);
|
||||
IF_NO_GC([transformer retain];)
|
||||
[lock unlock];
|
||||
return AUTORELEASE(transformer);
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ static BOOL snuggleEnd(NSString *t)
|
|||
if (set == nil)
|
||||
{
|
||||
set = [NSCharacterSet characterSetWithCharactersInString: @"]}).,;"];
|
||||
RETAIN(set);
|
||||
IF_NO_GC([set retain];)
|
||||
}
|
||||
return [set characterIsMember: [t characterAtIndex: 0]];
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ static BOOL snuggleStart(NSString *t)
|
|||
if (set == nil)
|
||||
{
|
||||
set = [NSCharacterSet characterSetWithCharactersInString: @"[{("];
|
||||
RETAIN(set);
|
||||
IF_NO_GC([set retain];)
|
||||
}
|
||||
return [set characterIsMember: [t characterAtIndex: [t length] - 1]];
|
||||
}
|
||||
|
@ -1068,7 +1068,7 @@ static BOOL snuggleStart(NSString *t)
|
|||
} while (r.length > 0);
|
||||
if (m != nil)
|
||||
{
|
||||
AUTORELEASE(m);
|
||||
IF_NO_GC([m autorelease];)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1055,7 +1055,7 @@
|
|||
@"unsigned",
|
||||
@"volatile",
|
||||
nil];
|
||||
RETAIN(qualifiers);
|
||||
IF_NO_GC([qualifiers retain];)
|
||||
keep = [NSSet setWithObjects:
|
||||
@"const",
|
||||
@"long",
|
||||
|
@ -1064,7 +1064,7 @@
|
|||
@"unsigned",
|
||||
@"volatile",
|
||||
nil];
|
||||
RETAIN(keep);
|
||||
IF_NO_GC([keep retain];)
|
||||
}
|
||||
|
||||
a = [NSMutableArray array];
|
||||
|
@ -1103,7 +1103,7 @@
|
|||
pos++;
|
||||
[self skipSpaces];
|
||||
}
|
||||
DESTROY(arp);
|
||||
IF_NO_GC(DESTROY(arp);)
|
||||
return nil;
|
||||
}
|
||||
|
||||
|
@ -2573,7 +2573,7 @@ fail:
|
|||
|
||||
itemName = nil;
|
||||
RELEASE(arp);
|
||||
AUTORELEASE(method);
|
||||
IF_NO_GC([method autorelease];)
|
||||
return method;
|
||||
|
||||
fail:
|
||||
|
@ -3251,7 +3251,7 @@ fail:
|
|||
unitName = nil;
|
||||
DESTROY(comment);
|
||||
RELEASE(arp);
|
||||
AUTORELEASE(dict);
|
||||
IF_NO_GC([dict autorelease];)
|
||||
return dict;
|
||||
|
||||
fail:
|
||||
|
@ -3698,8 +3698,8 @@ fail:
|
|||
pos = 0;
|
||||
lines = [[NSArray alloc] initWithArray: a];
|
||||
RELEASE(arp);
|
||||
AUTORELEASE(lines);
|
||||
AUTORELEASE(data);
|
||||
IF_NO_GC([lines autorelease];)
|
||||
IF_NO_GC([data autorelease];)
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1046,7 +1046,7 @@ build_relocation_table_for_directory (NSString *dir)
|
|||
NSMutableDictionary *relocationTable;
|
||||
|
||||
relocationTable = [NSMutableDictionary new];
|
||||
AUTORELEASE (relocationTable);
|
||||
IF_NO_GC ([relocationTable autorelease];)
|
||||
|
||||
e = [HTMLDirectoryEnumerator alloc];
|
||||
e = [e initWithBasePath: dir];
|
||||
|
|
|
@ -1270,7 +1270,7 @@ main(int argc, char **argv, char **env)
|
|||
if (sDate == nil || [d earlierDate: sDate] == sDate)
|
||||
{
|
||||
sDate = d;
|
||||
AUTORELEASE(RETAIN(sDate));
|
||||
IF_NO_GC([[sDate retain] autorelease];)
|
||||
}
|
||||
}
|
||||
if (verbose == YES)
|
||||
|
@ -1298,7 +1298,7 @@ main(int argc, char **argv, char **env)
|
|||
if (gDate == nil || [d laterDate: gDate] == gDate)
|
||||
{
|
||||
gDate = d;
|
||||
AUTORELEASE(RETAIN(gDate));
|
||||
IF_NO_GC([[gDate retain] autorelease];)
|
||||
}
|
||||
}
|
||||
if (verbose == YES)
|
||||
|
@ -1497,7 +1497,7 @@ main(int argc, char **argv, char **env)
|
|||
{
|
||||
attrs = [mgr fileAttributesAtPath: gsdocfile traverseLink: YES];
|
||||
gDate = [attrs fileModificationDate];
|
||||
AUTORELEASE(RETAIN(gDate));
|
||||
IF_NO_GC([[gDate retain] autorelease];)
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1603,7 +1603,7 @@ main(int argc, char **argv, char **env)
|
|||
systemProjects = @"";
|
||||
}
|
||||
projects = [[defs dictionaryForKey: @"Projects"] mutableCopy];
|
||||
AUTORELEASE(projects);
|
||||
IF_NO_GC([projects autorelease];)
|
||||
|
||||
/*
|
||||
* Merge any system project references.
|
||||
|
@ -1964,10 +1964,10 @@ main(int argc, char **argv, char **env)
|
|||
*/
|
||||
attrs = [mgr fileAttributesAtPath: gsdocfile traverseLink: YES];
|
||||
gDate = [attrs fileModificationDate];
|
||||
AUTORELEASE(RETAIN(gDate));
|
||||
IF_NO_GC([[gDate retain] autorelease];)
|
||||
attrs = [mgr fileAttributesAtPath: htmlfile traverseLink: YES];
|
||||
hDate = [attrs fileModificationDate];
|
||||
AUTORELEASE(RETAIN(hDate));
|
||||
IF_NO_GC([[hDate retain] autorelease];)
|
||||
}
|
||||
|
||||
if ([mgr isReadableFileAtPath: gsdocfile] == YES)
|
||||
|
|
|
@ -53,7 +53,6 @@ main(int argc, char** argv, char **env)
|
|||
#ifdef GS_PASS_ARGUMENTS
|
||||
[NSProcessInfo initializeWithArguments:argv count:argc environment:env];
|
||||
#endif
|
||||
pool = [NSAutoreleasePool new];
|
||||
proc = [NSProcessInfo processInfo];
|
||||
if (proc == nil)
|
||||
{
|
||||
|
|
|
@ -49,7 +49,7 @@ convert_unicode(NSArray *args)
|
|||
data = [NSData dataWithContentsOfFile: file];
|
||||
myString = [[NSString alloc] initWithData: data
|
||||
encoding: NSUTF8StringEncoding];
|
||||
AUTORELEASE(myString);
|
||||
IF_NO_GC([myString autorelease];)
|
||||
if ([myString length] == 0)
|
||||
{
|
||||
myString = [[NSString alloc] initWithData: data
|
||||
|
|
|
@ -42,11 +42,6 @@ ifeq ($(FOUNDATION_LIB),gnu)
|
|||
FND_LIBS = -lgnustep-base
|
||||
FND_DEFINE = -DGNUSTEP_BASE_LIBRARY=1
|
||||
GNUSTEP_DEFINE = -DGNUSTEP
|
||||
# If gc=yes was passed, use the appropriate library and defines
|
||||
ifeq ($(gc), yes)
|
||||
AUXILIARY_CPPFLAGS += -DGS_WITH_GC=1
|
||||
AUXILIARY_INCLUDE_DIRS += -I/usr/include/gc
|
||||
endif
|
||||
endif
|
||||
|
||||
GNUSTEP_BASE_HAVE_GNUTLS=@HAVE_GNUTLS@
|
||||
|
|
394
configure
vendored
394
configure
vendored
|
@ -310,7 +310,7 @@ ac_includes_default="\
|
|||
#endif"
|
||||
|
||||
ac_subdirs_all="$ac_subdirs_all Source/pathconfig Source/mframe SSL"
|
||||
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP WHOAMI EGREP GS_WORDS_BIGENDIAN GS_SINT8 GS_UINT8 ac_cv_sizeof_short ac_cv_sizeof_int ac_cv_sizeof_long ac_cv_sizeof_long_long ac_cv_sizeof_float ac_cv_sizeof_double ac_cv_sizeof_voidp GS_SADDR GS_UADDR GS_SINT16 GS_UINT16 GS_SINT32 GS_UINT32 GS_SINT64 GS_UINT64 GS_HAVE_I64 GS_SINT128 GS_UINT128 GS_HAVE_I128 GS_FLT32 GS_FLT64 _GSC_S_SHT _GSC_S_INT _GSC_S_LNG _GSC_S_LNG_LNG DYNAMIC_LINKER NX_CONST_STRING_OBJCFLAGS NX_CONST_STRING_CLASS HAVE_OBJC_SYNC_ENTER HAVE_PTHREAD_H HAVE_PTS_STREAM_MODULES INCLUDE_STDINT DEFINE_INT8_T DEFINE_UINT8_T DEFINE_INT16_T DEFINE_UINT16_T DEFINE_INT32_T DEFINE_UINT32_T DEFINE_INT64_T DEFINE_UINT64_T DEFINE_INTPTR_T DEFINE_UINTPTR_T USE_ZLIB HAVE_INET_PTON HAVE_INET_NTOP GS_PASS_ARGUMENTS GS_FAKE_MAIN WITH_FFI XML2_CONFIG XML_CONFIG XML_CFLAGS XML_LIBS HAVE_LIBXSLT HAVE_LIBXML TLS_CONFIG TLS_CFLAGS TLS_LIBS HAVE_GNUTLS HAVE_MDNS USE_GMP INCLUDE_FLAGS LDIR_FLAGS subdirs VERSION MAJOR_VERSION MINOR_VERSION SUBMINOR_VERSION GCC_VERSION LIBOBJS LTLIBOBJS'
|
||||
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP WHOAMI EGREP OBJC_WITH_GC GS_WORDS_BIGENDIAN GS_SINT8 GS_UINT8 ac_cv_sizeof_short ac_cv_sizeof_int ac_cv_sizeof_long ac_cv_sizeof_long_long ac_cv_sizeof_float ac_cv_sizeof_double ac_cv_sizeof_voidp GS_SADDR GS_UADDR GS_SINT16 GS_UINT16 GS_SINT32 GS_UINT32 GS_SINT64 GS_UINT64 GS_HAVE_I64 GS_SINT128 GS_UINT128 GS_HAVE_I128 GS_FLT32 GS_FLT64 _GSC_S_SHT _GSC_S_INT _GSC_S_LNG _GSC_S_LNG_LNG DYNAMIC_LINKER NX_CONST_STRING_OBJCFLAGS NX_CONST_STRING_CLASS HAVE_OBJC_SYNC_ENTER HAVE_PTHREAD_H HAVE_PTS_STREAM_MODULES INCLUDE_STDINT DEFINE_INT8_T DEFINE_UINT8_T DEFINE_INT16_T DEFINE_UINT16_T DEFINE_INT32_T DEFINE_UINT32_T DEFINE_INT64_T DEFINE_UINT64_T DEFINE_INTPTR_T DEFINE_UINTPTR_T USE_ZLIB HAVE_INET_PTON HAVE_INET_NTOP GS_PASS_ARGUMENTS GS_FAKE_MAIN WITH_FFI XML2_CONFIG XML_CONFIG XML_CFLAGS XML_LIBS HAVE_LIBXSLT HAVE_LIBXML TLS_CONFIG TLS_CFLAGS TLS_LIBS HAVE_GNUTLS HAVE_MDNS USE_GMP INCLUDE_FLAGS LDIR_FLAGS subdirs VERSION MAJOR_VERSION MINOR_VERSION SUBMINOR_VERSION GCC_VERSION LIBOBJS LTLIBOBJS'
|
||||
ac_subst_files=''
|
||||
|
||||
# Initialize some variables set by options.
|
||||
|
@ -1330,6 +1330,11 @@ if test -z "$GNUSTEP_MAKEFILES"; then
|
|||
GNUSTEP_MAKEFILES=`gnustep-config --variable=GNUSTEP_MAKEFILES 2>&5`
|
||||
fi
|
||||
|
||||
# If LIBRARY_COMBO is undefined, try to use gnustep-config to determine it.
|
||||
if test -z "$LIBRARY_COMBO"; then
|
||||
LIBRARY_COMBO=`gnustep-config --variable=LIBRARY_COMBO 2>&5`
|
||||
fi
|
||||
|
||||
exceptions=`gnustep-config --objc-flags | grep _NATIVE_OBJC_EXCEPTIONS 2>&5`
|
||||
if test -z "$exceptions"; then
|
||||
exceptions=no
|
||||
|
@ -2792,6 +2797,7 @@ fi
|
|||
#--------------------------------------------------------------------
|
||||
# Set Apple/Darwin/OSX/NeXT information for other tests
|
||||
#--------------------------------------------------------------------
|
||||
OBJC_WITH_GC=no
|
||||
OBJC_RUNTIME_LIB=`echo $LIBRARY_COMBO | tr '-' ' ' | awk '{print $1}'`
|
||||
echo "$as_me:$LINENO: checking the Objective-C runtime" >&5
|
||||
echo $ECHO_N "checking the Objective-C runtime... $ECHO_C" >&6
|
||||
|
@ -2800,6 +2806,12 @@ if test "$OBJC_RUNTIME_LIB" = "nx" -o "$OBJC_RUNTIME_LIB" = "apple"; then
|
|||
echo "${ECHO_T}NeXT" >&6
|
||||
LIBOBJC='-lobjc'
|
||||
OBJCFLAGS="-fnext-runtime -DNeXT_RUNTIME"
|
||||
elif test "$OBJC_RUNTIME_LIB" = "gnugc"; then
|
||||
echo "$as_me:$LINENO: result: GNU" >&5
|
||||
echo "${ECHO_T}GNU" >&6
|
||||
LIBOBJC='-lobjc_gc -ldl -lgc'
|
||||
OBJCFLAGS="-fgnu-runtime"
|
||||
OBJC_WITH_GC=yes
|
||||
else
|
||||
echo "$as_me:$LINENO: result: GNU" >&5
|
||||
echo "${ECHO_T}GNU" >&6
|
||||
|
@ -2831,7 +2843,7 @@ else
|
|||
fi
|
||||
|
||||
if test -f "$GNUSTEP_HDIR/objc/objc.h"; then
|
||||
if test -f "$GNUSTEP_LDIR/libobjc.a" -o -f "$GNUSTEP_LDIR/libobjc.so" -o -f "$GNUSTEP_LDIR/libobjc.dll.a" -o -f "$GNUSTEP_LDIR/libobjc-gnu.dylib"; then
|
||||
if test -f "$GNUSTEP_LDIR/libobjc.a" -o -f "$GNUSTEP_LDIR/libobjc.so" -o -f "$GNUSTEP_LDIR/libobjc.dll.a" -o -f "$GNUSTEP_LDIR/libobjc-gnu.dylib" -o -f "$GNUSTEP_LDIR/libobjc_gc.a" -o -f "$GNUSTEP_LDIR/libobjc_gc.so" -o -f "$GNUSTEP_LDIR/libobjc_gc.dll.a" -o -f "$GNUSTEP_LDIR/libobjc_gc-gnu.dylib"; then
|
||||
gs_cv_objc_libdir="$GNUSTEP_LDIR"
|
||||
gs_cv_objc_incdir="$GNUSTEP_HDIR"
|
||||
fi
|
||||
|
@ -2848,7 +2860,7 @@ else
|
|||
fi
|
||||
|
||||
if test -f "$GNUSTEP_HDIR/objc/objc.h"; then
|
||||
if test -f "$GNUSTEP_LDIR/libobjc.a" -o -f "$GNUSTEP_LDIR/libobjc.so" -o -f "$GNUSTEP_LDIR/libobjc.dll.a" -o -f "$GNUSTEP_LDIR/libobjc-gnu.dylib"; then
|
||||
if test -f "$GNUSTEP_LDIR/libobjc.a" -o -f "$GNUSTEP_LDIR/libobjc.so" -o -f "$GNUSTEP_LDIR/libobjc.dll.a" -o -f "$GNUSTEP_LDIR/libobjc-gnu.dylib" -o -f "$GNUSTEP_LDIR/libobjc_gc.a" -o -f "$GNUSTEP_LDIR/libobjc_gc.so" -o -f "$GNUSTEP_LDIR/libobjc_gc.dll.a" -o -f "$GNUSTEP_LDIR/libobjc_gc-gnu.dylib"; then
|
||||
gs_cv_objc_libdir="$GNUSTEP_LDIR"
|
||||
gs_cv_objc_incdir="$GNUSTEP_HDIR"
|
||||
fi
|
||||
|
@ -2865,7 +2877,7 @@ else
|
|||
fi
|
||||
|
||||
if test -f "$GNUSTEP_HDIR/objc/objc.h"; then
|
||||
if test -f "$GNUSTEP_LDIR/libobjc.a" -o -f "$GNUSTEP_LDIR/libobjc.so" -o -f "$GNUSTEP_LDIR/libobjc.dll.a" -o -f "$GNUSTEP_LDIR/libobjc-gnu.dylib"; then
|
||||
if test -f "$GNUSTEP_LDIR/libobjc.a" -o -f "$GNUSTEP_LDIR/libobjc.so" -o -f "$GNUSTEP_LDIR/libobjc.dll.a" -o -f "$GNUSTEP_LDIR/libobjc-gnu.dylib" -o -f "$GNUSTEP_LDIR/libobjc_gc.a" -o -f "$GNUSTEP_LDIR/libobjc_gc.so" -o -f "$GNUSTEP_LDIR/libobjc_gc.dll.a" -o -f "$GNUSTEP_LDIR/libobjc_gc-gnu.dylib"; then
|
||||
gs_cv_objc_libdir="$GNUSTEP_LDIR"
|
||||
gs_cv_objc_incdir="$GNUSTEP_HDIR"
|
||||
fi
|
||||
|
@ -3302,6 +3314,379 @@ echo "$as_me: error: Could not find Objective-C headers" >&2;}
|
|||
{ (exit 1); exit 1; }; }
|
||||
fi
|
||||
|
||||
if test $OBJC_WITH_GC = yes; then
|
||||
|
||||
for ac_header in gc.h
|
||||
do
|
||||
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
|
||||
if eval "test \"\${$as_ac_Header+set}\" = set"; then
|
||||
echo "$as_me:$LINENO: checking for $ac_header" >&5
|
||||
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
|
||||
if eval "test \"\${$as_ac_Header+set}\" = set"; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
fi
|
||||
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
|
||||
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
|
||||
else
|
||||
# Is the header compilable?
|
||||
echo "$as_me:$LINENO: checking $ac_header usability" >&5
|
||||
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
$ac_includes_default
|
||||
#include <$ac_header>
|
||||
_ACEOF
|
||||
rm -f conftest.$ac_objext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||
(eval $ac_compile) 2>conftest.er1
|
||||
ac_status=$?
|
||||
grep -v '^ *+' conftest.er1 >conftest.err
|
||||
rm -f conftest.er1
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; } &&
|
||||
{ ac_try='test -s conftest.$ac_objext'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
ac_header_compiler=yes
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
ac_header_compiler=no
|
||||
fi
|
||||
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
|
||||
echo "${ECHO_T}$ac_header_compiler" >&6
|
||||
|
||||
# Is the header present?
|
||||
echo "$as_me:$LINENO: checking $ac_header presence" >&5
|
||||
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
#include <$ac_header>
|
||||
_ACEOF
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
|
||||
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
|
||||
ac_status=$?
|
||||
grep -v '^ *+' conftest.er1 >conftest.err
|
||||
rm -f conftest.er1
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } >/dev/null; then
|
||||
if test -s conftest.err; then
|
||||
ac_cpp_err=$ac_c_preproc_warn_flag
|
||||
ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
|
||||
else
|
||||
ac_cpp_err=
|
||||
fi
|
||||
else
|
||||
ac_cpp_err=yes
|
||||
fi
|
||||
if test -z "$ac_cpp_err"; then
|
||||
ac_header_preproc=yes
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
ac_header_preproc=no
|
||||
fi
|
||||
rm -f conftest.err conftest.$ac_ext
|
||||
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
|
||||
echo "${ECHO_T}$ac_header_preproc" >&6
|
||||
|
||||
# So? What about this header?
|
||||
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
|
||||
yes:no: )
|
||||
{ echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
|
||||
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
|
||||
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
|
||||
echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
|
||||
ac_header_preproc=yes
|
||||
;;
|
||||
no:yes:* )
|
||||
{ echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
|
||||
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
|
||||
{ echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
|
||||
echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
|
||||
{ echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
|
||||
echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
|
||||
{ echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
|
||||
echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
|
||||
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
|
||||
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
|
||||
{ echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
|
||||
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
|
||||
(
|
||||
cat <<\_ASBOX
|
||||
## ------------------------------------------ ##
|
||||
## Report this to the AC_PACKAGE_NAME lists. ##
|
||||
## ------------------------------------------ ##
|
||||
_ASBOX
|
||||
) |
|
||||
sed "s/^/$as_me: WARNING: /" >&2
|
||||
;;
|
||||
esac
|
||||
echo "$as_me:$LINENO: checking for $ac_header" >&5
|
||||
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
|
||||
if eval "test \"\${$as_ac_Header+set}\" = set"; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
eval "$as_ac_Header=\$ac_header_preproc"
|
||||
fi
|
||||
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
|
||||
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
|
||||
|
||||
fi
|
||||
if test `eval echo '${'$as_ac_Header'}'` = yes; then
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
|
||||
_ACEOF
|
||||
gc_ok=yes
|
||||
else
|
||||
gc_ok=no
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
if test "$gc_ok" = no; then
|
||||
{ { echo "$as_me:$LINENO: error: Garbage collection was required, but the gc.h header" >&5
|
||||
echo "$as_me: error: Garbage collection was required, but the gc.h header" >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
{ echo "$as_me:$LINENO: couldn't be found." >&5
|
||||
echo "$as_me: couldn't be found." >&6;}
|
||||
fi
|
||||
saved_LIBS="$LIBS"
|
||||
LIBS+=" -lgc"
|
||||
echo "$as_me:$LINENO: checking for GC_malloc" >&5
|
||||
echo $ECHO_N "checking for GC_malloc... $ECHO_C" >&6
|
||||
if test "${ac_cv_func_GC_malloc+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
/* Define GC_malloc to an innocuous variant, in case <limits.h> declares GC_malloc.
|
||||
For example, HP-UX 11i <limits.h> declares gettimeofday. */
|
||||
#define GC_malloc innocuous_GC_malloc
|
||||
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char GC_malloc (); below.
|
||||
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
|
||||
<limits.h> exists even on freestanding compilers. */
|
||||
|
||||
#ifdef __STDC__
|
||||
# include <limits.h>
|
||||
#else
|
||||
# include <assert.h>
|
||||
#endif
|
||||
|
||||
#undef GC_malloc
|
||||
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
/* We use char because int might match the return type of a gcc2
|
||||
builtin and then its argument prototype would still apply. */
|
||||
char GC_malloc ();
|
||||
/* The GNU C library defines this for functions which it implements
|
||||
to always fail with ENOSYS. Some functions are actually named
|
||||
something starting with __ and the normal name is an alias. */
|
||||
#if defined (__stub_GC_malloc) || defined (__stub___GC_malloc)
|
||||
choke me
|
||||
#else
|
||||
char (*f) () = GC_malloc;
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
return f != GC_malloc;
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
rm -f conftest.$ac_objext conftest$ac_exeext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
|
||||
(eval $ac_link) 2>conftest.er1
|
||||
ac_status=$?
|
||||
grep -v '^ *+' conftest.er1 >conftest.err
|
||||
rm -f conftest.er1
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; } &&
|
||||
{ ac_try='test -s conftest$ac_exeext'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
ac_cv_func_GC_malloc=yes
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
ac_cv_func_GC_malloc=no
|
||||
fi
|
||||
rm -f conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
fi
|
||||
echo "$as_me:$LINENO: result: $ac_cv_func_GC_malloc" >&5
|
||||
echo "${ECHO_T}$ac_cv_func_GC_malloc" >&6
|
||||
if test $ac_cv_func_GC_malloc = yes; then
|
||||
gc_ok=yes
|
||||
else
|
||||
gc_ok=no
|
||||
fi
|
||||
|
||||
if test "$gc_ok" = no; then
|
||||
{ { echo "$as_me:$LINENO: error: Garbage collection was required, but the gc library" >&5
|
||||
echo "$as_me: error: Garbage collection was required, but the gc library" >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
{ echo "$as_me:$LINENO: couldn't be found." >&5
|
||||
echo "$as_me: couldn't be found." >&6;}
|
||||
fi
|
||||
LIBS="-lobjc_gc -ldl"
|
||||
echo "$as_me:$LINENO: checking for class_ivar_set_gcinvisible" >&5
|
||||
echo $ECHO_N "checking for class_ivar_set_gcinvisible... $ECHO_C" >&6
|
||||
if test "${ac_cv_func_class_ivar_set_gcinvisible+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
/* Define class_ivar_set_gcinvisible to an innocuous variant, in case <limits.h> declares class_ivar_set_gcinvisible.
|
||||
For example, HP-UX 11i <limits.h> declares gettimeofday. */
|
||||
#define class_ivar_set_gcinvisible innocuous_class_ivar_set_gcinvisible
|
||||
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char class_ivar_set_gcinvisible (); below.
|
||||
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
|
||||
<limits.h> exists even on freestanding compilers. */
|
||||
|
||||
#ifdef __STDC__
|
||||
# include <limits.h>
|
||||
#else
|
||||
# include <assert.h>
|
||||
#endif
|
||||
|
||||
#undef class_ivar_set_gcinvisible
|
||||
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
/* We use char because int might match the return type of a gcc2
|
||||
builtin and then its argument prototype would still apply. */
|
||||
char class_ivar_set_gcinvisible ();
|
||||
/* The GNU C library defines this for functions which it implements
|
||||
to always fail with ENOSYS. Some functions are actually named
|
||||
something starting with __ and the normal name is an alias. */
|
||||
#if defined (__stub_class_ivar_set_gcinvisible) || defined (__stub___class_ivar_set_gcinvisible)
|
||||
choke me
|
||||
#else
|
||||
char (*f) () = class_ivar_set_gcinvisible;
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
return f != class_ivar_set_gcinvisible;
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
rm -f conftest.$ac_objext conftest$ac_exeext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
|
||||
(eval $ac_link) 2>conftest.er1
|
||||
ac_status=$?
|
||||
grep -v '^ *+' conftest.er1 >conftest.err
|
||||
rm -f conftest.er1
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; } &&
|
||||
{ ac_try='test -s conftest$ac_exeext'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
ac_cv_func_class_ivar_set_gcinvisible=yes
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
ac_cv_func_class_ivar_set_gcinvisible=no
|
||||
fi
|
||||
rm -f conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
fi
|
||||
echo "$as_me:$LINENO: result: $ac_cv_func_class_ivar_set_gcinvisible" >&5
|
||||
echo "${ECHO_T}$ac_cv_func_class_ivar_set_gcinvisible" >&6
|
||||
if test $ac_cv_func_class_ivar_set_gcinvisible = yes; then
|
||||
gc_ok=yes
|
||||
else
|
||||
gc_ok=no
|
||||
fi
|
||||
|
||||
if test "$gc_ok" = no; then
|
||||
{ { echo "$as_me:$LINENO: error: Garbage collection was required, but the gc runtime" >&5
|
||||
echo "$as_me: error: Garbage collection was required, but the gc runtime" >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
{ echo "$as_me:$LINENO: couldn't be found." >&5
|
||||
echo "$as_me: couldn't be found." >&6;}
|
||||
fi
|
||||
LIBS="$saved_LIBS"
|
||||
|
||||
fi
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Check for strange network stuff used by gdomap
|
||||
#--------------------------------------------------------------------
|
||||
|
@ -19153,6 +19538,7 @@ s,@OBJEXT@,$OBJEXT,;t t
|
|||
s,@CPP@,$CPP,;t t
|
||||
s,@WHOAMI@,$WHOAMI,;t t
|
||||
s,@EGREP@,$EGREP,;t t
|
||||
s,@OBJC_WITH_GC@,$OBJC_WITH_GC,;t t
|
||||
s,@GS_WORDS_BIGENDIAN@,$GS_WORDS_BIGENDIAN,;t t
|
||||
s,@GS_SINT8@,$GS_SINT8,;t t
|
||||
s,@GS_UINT8@,$GS_UINT8,;t t
|
||||
|
|
40
configure.ac
40
configure.ac
|
@ -39,6 +39,11 @@ if test -z "$GNUSTEP_MAKEFILES"; then
|
|||
GNUSTEP_MAKEFILES=`gnustep-config --variable=GNUSTEP_MAKEFILES 2>&5`
|
||||
fi
|
||||
|
||||
# If LIBRARY_COMBO is undefined, try to use gnustep-config to determine it.
|
||||
if test -z "$LIBRARY_COMBO"; then
|
||||
LIBRARY_COMBO=`gnustep-config --variable=LIBRARY_COMBO 2>&5`
|
||||
fi
|
||||
|
||||
exceptions=`gnustep-config --objc-flags | grep _NATIVE_OBJC_EXCEPTIONS 2>&5`
|
||||
if test -z "$exceptions"; then
|
||||
exceptions=no
|
||||
|
@ -153,12 +158,18 @@ fi
|
|||
#--------------------------------------------------------------------
|
||||
# Set Apple/Darwin/OSX/NeXT information for other tests
|
||||
#--------------------------------------------------------------------
|
||||
OBJC_WITH_GC=no
|
||||
OBJC_RUNTIME_LIB=`echo $LIBRARY_COMBO | tr '-' ' ' | awk '{print $1}'`
|
||||
AC_MSG_CHECKING(the Objective-C runtime)
|
||||
if test "$OBJC_RUNTIME_LIB" = "nx" -o "$OBJC_RUNTIME_LIB" = "apple"; then
|
||||
AC_MSG_RESULT(NeXT)
|
||||
LIBOBJC='-lobjc'
|
||||
OBJCFLAGS="-fnext-runtime -DNeXT_RUNTIME"
|
||||
elif test "$OBJC_RUNTIME_LIB" = "gnugc"; then
|
||||
AC_MSG_RESULT(GNU)
|
||||
LIBOBJC='-lobjc_gc -ldl -lgc'
|
||||
OBJCFLAGS="-fgnu-runtime"
|
||||
OBJC_WITH_GC=yes
|
||||
else
|
||||
AC_MSG_RESULT(GNU)
|
||||
LIBOBJC='-lobjc'
|
||||
|
@ -187,7 +198,7 @@ else
|
|||
fi
|
||||
|
||||
if test -f "$GNUSTEP_HDIR/objc/objc.h"; then
|
||||
if test -f "$GNUSTEP_LDIR/libobjc.a" -o -f "$GNUSTEP_LDIR/libobjc.so" -o -f "$GNUSTEP_LDIR/libobjc.dll.a" -o -f "$GNUSTEP_LDIR/libobjc-gnu.dylib"; then
|
||||
if test -f "$GNUSTEP_LDIR/libobjc.a" -o -f "$GNUSTEP_LDIR/libobjc.so" -o -f "$GNUSTEP_LDIR/libobjc.dll.a" -o -f "$GNUSTEP_LDIR/libobjc-gnu.dylib" -o -f "$GNUSTEP_LDIR/libobjc_gc.a" -o -f "$GNUSTEP_LDIR/libobjc_gc.so" -o -f "$GNUSTEP_LDIR/libobjc_gc.dll.a" -o -f "$GNUSTEP_LDIR/libobjc_gc-gnu.dylib"; then
|
||||
gs_cv_objc_libdir="$GNUSTEP_LDIR"
|
||||
gs_cv_objc_incdir="$GNUSTEP_HDIR"
|
||||
fi
|
||||
|
@ -204,7 +215,7 @@ else
|
|||
fi
|
||||
|
||||
if test -f "$GNUSTEP_HDIR/objc/objc.h"; then
|
||||
if test -f "$GNUSTEP_LDIR/libobjc.a" -o -f "$GNUSTEP_LDIR/libobjc.so" -o -f "$GNUSTEP_LDIR/libobjc.dll.a" -o -f "$GNUSTEP_LDIR/libobjc-gnu.dylib"; then
|
||||
if test -f "$GNUSTEP_LDIR/libobjc.a" -o -f "$GNUSTEP_LDIR/libobjc.so" -o -f "$GNUSTEP_LDIR/libobjc.dll.a" -o -f "$GNUSTEP_LDIR/libobjc-gnu.dylib" -o -f "$GNUSTEP_LDIR/libobjc_gc.a" -o -f "$GNUSTEP_LDIR/libobjc_gc.so" -o -f "$GNUSTEP_LDIR/libobjc_gc.dll.a" -o -f "$GNUSTEP_LDIR/libobjc_gc-gnu.dylib"; then
|
||||
gs_cv_objc_libdir="$GNUSTEP_LDIR"
|
||||
gs_cv_objc_incdir="$GNUSTEP_HDIR"
|
||||
fi
|
||||
|
@ -221,7 +232,7 @@ else
|
|||
fi
|
||||
|
||||
if test -f "$GNUSTEP_HDIR/objc/objc.h"; then
|
||||
if test -f "$GNUSTEP_LDIR/libobjc.a" -o -f "$GNUSTEP_LDIR/libobjc.so" -o -f "$GNUSTEP_LDIR/libobjc.dll.a" -o -f "$GNUSTEP_LDIR/libobjc-gnu.dylib"; then
|
||||
if test -f "$GNUSTEP_LDIR/libobjc.a" -o -f "$GNUSTEP_LDIR/libobjc.so" -o -f "$GNUSTEP_LDIR/libobjc.dll.a" -o -f "$GNUSTEP_LDIR/libobjc-gnu.dylib" -o -f "$GNUSTEP_LDIR/libobjc_gc.a" -o -f "$GNUSTEP_LDIR/libobjc_gc.so" -o -f "$GNUSTEP_LDIR/libobjc_gc.dll.a" -o -f "$GNUSTEP_LDIR/libobjc_gc-gnu.dylib"; then
|
||||
gs_cv_objc_libdir="$GNUSTEP_LDIR"
|
||||
gs_cv_objc_incdir="$GNUSTEP_HDIR"
|
||||
fi
|
||||
|
@ -250,6 +261,29 @@ if test $ac_cv_header_objc_objc_h = no; then
|
|||
AC_MSG_ERROR(Could not find Objective-C headers)
|
||||
fi
|
||||
|
||||
if test $OBJC_WITH_GC = yes; then
|
||||
AC_CHECK_HEADERS(gc.h, gc_ok=yes, gc_ok=no)
|
||||
if test "$gc_ok" = no; then
|
||||
AC_MSG_ERROR([Garbage collection was required, but the gc.h header])
|
||||
AC_MSG_NOTICE([couldn't be found.])
|
||||
fi
|
||||
saved_LIBS="$LIBS"
|
||||
LIBS+=" -lgc"
|
||||
AC_CHECK_FUNC(GC_malloc, gc_ok=yes, gc_ok=no)
|
||||
if test "$gc_ok" = no; then
|
||||
AC_MSG_ERROR([Garbage collection was required, but the gc library])
|
||||
AC_MSG_NOTICE([couldn't be found.])
|
||||
fi
|
||||
LIBS="-lobjc_gc -ldl"
|
||||
AC_CHECK_FUNC(class_ivar_set_gcinvisible, gc_ok=yes, gc_ok=no)
|
||||
if test "$gc_ok" = no; then
|
||||
AC_MSG_ERROR([Garbage collection was required, but the gc runtime])
|
||||
AC_MSG_NOTICE([couldn't be found.])
|
||||
fi
|
||||
LIBS="$saved_LIBS"
|
||||
AC_SUBST(OBJC_WITH_GC)
|
||||
fi
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Check for strange network stuff used by gdomap
|
||||
#--------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in a new issue