fix gc heade rlocation.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32388 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2011-02-27 17:53:14 +00:00
parent cbc458a2f5
commit 671f5bcce5
21 changed files with 5601 additions and 6083 deletions

View file

@ -1,3 +1,28 @@
2011-02-27 Richard Frith-Macdonald <rfm@gnu.org>
* configure.ac: Look for gc.h in gc subdirectory
* configure: regenerate
* Headers/Additions/GNUstepBase/config.h.in: regenerate
* Source/GNUmakefile: Don't attempt to build GSBlocks.m until it works
without causing link failures.
* Source/NSPortCoder.m:
* Source/NSKeyedArchiver.m:
* Source/NSGarbageCollector.m:
* Source/NSZone.m:
* Source/GSDictionary.m:
* Source/GSCountedSet.m:
* Source/NSNotificationCenter.m:
* Source/GSAttributedString.m:
* Source/NSObject.m:
* Source/NSConcreteMapTable.m:
* Source/Additions/GSMime.m:
* Source/Additions/GSObjCRuntime.m:
* Source/GSSet.m:
* Source/NSConnection.m:
* Source/NSThread.m:
* Source/NSConcreteHashTable.m:
Modify location of gc.h header.
2011-02-27 Richard Frith-Macdonald <rfm@gnu.org>
* Source/ObjectiveC2/runtime.c:

View file

@ -1,8 +1,5 @@
/* Headers/Additions/GNUstepBase/config.h.in. Generated from configure.ac by autoheader. */
/* Define if building universal (internal helper macro) */
#undef AC_APPLE_UNIVERSAL_BUILD
/* The normal alignment of `pthread_cond_t', in bytes. */
#undef ALIGNOF_PTHREAD_COND_T
@ -211,8 +208,8 @@
/* Define if GC_allow_register_threads function is available */
#undef HAVE_GC_ALLOW_REGISTER_THREADS
/* Define to 1 if you have the <gc.h> header file. */
#undef HAVE_GC_H
/* Define to 1 if you have the <gc/gc.h> header file. */
#undef HAVE_GC_GC_H
/* Define if GC_register_my_thread function is available */
#undef HAVE_GC_REGISTER_MY_THREAD
@ -612,6 +609,12 @@
/* Define to 1 if you have the <unicode/ucurr.h> header file. */
#undef HAVE_UNICODE_UCURR_H
/* Define to 1 if you have the <unicode/udatpg.h> header file. */
#undef HAVE_UNICODE_UDATPG_H
/* Define to 1 if you have the <unicode/udat.h> header file. */
#undef HAVE_UNICODE_UDAT_H
/* Define to 1 if you have the <unicode/ulocdata.h> header file. */
#undef HAVE_UNICODE_ULOCDATA_H
@ -621,12 +624,6 @@
/* Define to 1 if you have the <unicode/unum.h> header file. */
#undef HAVE_UNICODE_UNUM_H
/* Define to 1 if you have the <unicode/udat.h> header file. */
#undef HAVE_UNICODE_UDAT_H
/* Define to 1 if you have the <unicode/udatpg.h> header file. */
#undef HAVE_UNICODE_UDATPG_H
/* Define to 1 if you have the <unicode/uregex.h> header file. */
#undef HAVE_UNICODE_UREGEX_H
@ -726,44 +723,26 @@
/* Define if using the libffi library for invocations */
#undef USE_LIBFFI
/* Enable extensions on AIX 3, Interix. */
#ifndef _ALL_SOURCE
# undef _ALL_SOURCE
#endif
/* Enable GNU extensions on systems that have them. */
#ifndef _GNU_SOURCE
# undef _GNU_SOURCE
#endif
/* Enable threading extensions on Solaris. */
#ifndef _POSIX_PTHREAD_SEMANTICS
# undef _POSIX_PTHREAD_SEMANTICS
#endif
/* Enable extensions on HP NonStop. */
#ifndef _TANDEM_SOURCE
# undef _TANDEM_SOURCE
#endif
/* Enable general extensions on Solaris. */
#ifndef __EXTENSIONS__
# undef __EXTENSIONS__
#endif
/* Define if vasprintf returns the length printed */
#undef VASPRINTF_RETURNS_LENGTH
/* Define if vsprintf returns the length printed */
#undef VSPRINTF_RETURNS_LENGTH
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
#if defined AC_APPLE_UNIVERSAL_BUILD
# if defined __BIG_ENDIAN__
# define WORDS_BIGENDIAN 1
# endif
#else
# ifndef WORDS_BIGENDIAN
# undef WORDS_BIGENDIAN
# endif
/* Define to 1 if your processor stores words with the most significant byte
first (like Motorola and SPARC, unlike Intel and VAX). */
#undef WORDS_BIGENDIAN
/* Define to 1 if on AIX 3.
System headers sometimes define this.
We just want to avoid a redefinition error message. */
#ifndef _ALL_SOURCE
# undef _ALL_SOURCE
#endif
/* Enable GNU extensions on systems that have them. */
#ifndef _GNU_SOURCE
# undef _GNU_SOURCE
#endif
/* Define to 1 if on MINIX. */
@ -776,6 +755,17 @@
/* Define to 1 if you need to in order for `stat' and other things to work. */
#undef _POSIX_SOURCE
/* Enable extensions on Solaris. */
#ifndef __EXTENSIONS__
# undef __EXTENSIONS__
#endif
#ifndef _POSIX_PTHREAD_SEMANTICS
# undef _POSIX_PTHREAD_SEMANTICS
#endif
#ifndef _TANDEM_SOURCE
# undef _TANDEM_SOURCE
#endif
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus

View file

@ -1622,7 +1622,6 @@ wordData(NSString *word)
NSString *tmp = [info parameterForKey: @"boundary"];
NSString *type;
NSString *subtype;
BOOL supported = NO;
DESTROY(boundary);
if (tmp != nil)
@ -1664,7 +1663,6 @@ wordData(NSString *word)
{
subtype = @"mixed";
}
supported = YES;
if (boundary == nil)
{
NSLog(@"multipart message without boundary");
@ -5962,9 +5960,9 @@ appendString(NSMutableData *m, NSUInteger offset, NSUInteger fold,
type: (NSString*)type
name: (NSString*)name
{
CREATE_AUTORELEASE_POOL(arp);
NSString *subtype = nil;
GSMimeHeader *hdr = nil;
CREATE_AUTORELEASE_POOL(arp);
if (type == nil)
{
@ -6042,11 +6040,13 @@ appendString(NSMutableData *m, NSUInteger offset, NSUInteger fold,
*/
- (void) setContentType: (NSString *)newType
{
CREATE_AUTORELEASE_POOL(arp);
GSMimeHeader *hdr = nil;
GSMimeParser *p = AUTORELEASE([GSMimeParser new]);
NSScanner *scanner = [NSScanner scannerWithString: newType];
GSMimeParser *p;
NSScanner *scanner;
CREATE_AUTORELEASE_POOL(arp);
p = AUTORELEASE([GSMimeParser new]);
scanner = [NSScanner scannerWithString: newType];
hdr = AUTORELEASE([GSMimeHeader new]);
[hdr setName: @"content-type"];
if ([p scanHeaderBody: scanner into: hdr] == NO)

View file

@ -1927,11 +1927,11 @@ GSPrintf (FILE *fptr, NSString* format, ...)
{
static Class stringClass = 0;
static NSStringEncoding enc;
CREATE_AUTORELEASE_POOL(arp);
va_list ap;
NSString *message;
NSData *data;
BOOL ok = NO;
CREATE_AUTORELEASE_POOL(arp);
if (stringClass == 0)
{
@ -1963,7 +1963,19 @@ GSPrintf (FILE *fptr, NSString* format, ...)
}
#if defined(GNUSTEP_BASE_LIBRARY)
# ifndef NDEBUG
# define AADD(c, o) GSDebugAllocationAdd(c, o)
# define AREM(c, o) GSDebugAllocationRemove(c, o)
# else
# define AADD(c, o)
# define AREM(c, o)
# endif
# if GS_WITH_GC
#include <gc/gc.h>
static BOOL
GSIsFinalizable(Class c)
{
@ -1977,6 +1989,15 @@ GSIsFinalizable(Class c)
return YES;
return NO;
}
static void
GSFinalize(void* object, void* data)
{
[(id)object finalize];
AREM(object_getClass((id)object), (id)object);
object_setClass((id)object, (Class)(void*)0xdeadface);
}
# endif /* GS_WITH_GC */
#endif /* defined(GNUSTEP_BASE_LIBRARY) */
@ -1985,14 +2006,6 @@ GSClassSwizzle(id instance, Class newClass)
{
Class oldClass = object_getClass(instance);
#ifndef NDEBUG
#define AADD(c, o) GSDebugAllocationAdd(c, o)
#define AREM(c, o) GSDebugAllocationRemove(c, o)
#else
#define AADD(c, o)
#define AREM(c, o)
#endif
if (oldClass != newClass)
{
#if defined(GNUSTEP_BASE_LIBRARY)

View file

@ -149,7 +149,6 @@ BASE_MFILES = \
CXXException.m\
GSArray.m \
GSAttributedString.m \
GSBlocks.m \
GSConcreteValue.m \
GSCountedSet.m \
GSDictionary.m \

View file

@ -107,7 +107,7 @@ static NSDictionary *blank;
#define GSI_MAP_NOCLEAN 1
#if GS_WITH_GC
#include <gc_typed.h>
#include <gc/gc_typed.h>
static GC_descr nodeDesc; // Type descriptor for map node.
#define GSI_MAP_NODES(M, X) \
(GSIMapNode)GC_calloc_explicitly_typed(X, sizeof(GSIMapNode_t), nodeDesc)

View file

@ -36,7 +36,7 @@
#define GSI_MAP_VTYPES GSUNION_NSINT
#if GS_WITH_GC
#include <gc_typed.h>
#include <gc/gc_typed.h>
static GC_descr nodeDesc; // Type descriptor for map node.
#define GSI_MAP_NODES(M, X) \
(GSIMapNode)GC_calloc_explicitly_typed(X, sizeof(GSIMapNode_t), nodeDesc)

View file

@ -46,7 +46,7 @@
[((id)(X).obj) copyWithZone: map->zone]
#if GS_WITH_GC
#include <gc_typed.h>
#include <gc/gc_typed.h>
static GC_descr nodeDesc; // Type descriptor for map node.
#define GSI_MAP_NODES(M, X) \
(GSIMapNode)GC_calloc_explicitly_typed(X, sizeof(GSIMapNode_t), nodeDesc)

View file

@ -38,7 +38,7 @@
#define GSI_MAP_HAS_VALUE 0
#define GSI_MAP_KTYPES GSUNION_OBJ
#if GS_WITH_GC
#include <gc_typed.h>
#include <gc/gc_typed.h>
static GC_descr nodeDesc; // Type descriptor for map node.
#define GSI_MAP_NODES(M, X) \
(GSIMapNode)GC_calloc_explicitly_typed(X, sizeof(GSIMapNode_t), nodeDesc)

View file

@ -93,7 +93,7 @@ typedef GSIMapNode_t *GSIMapNode;
#define GSI_MAP_ENUMERATOR NSHashEnumerator
#if GS_WITH_GC
#include <gc_typed.h>
#include <gc/gc_typed.h>
static GC_descr nodeS = 0;
static GC_descr nodeW = 0;
#define GSI_MAP_NODES(M, X) \

View file

@ -104,7 +104,7 @@ typedef GSIMapNode_t *GSIMapNode;
#define GSI_MAP_ENUMERATOR NSMapEnumerator
#if GS_WITH_GC
#include <gc_typed.h>
#include <gc/gc_typed.h>
static GC_descr nodeSS = 0;
static GC_descr nodeSW = 0;
static GC_descr nodeWS = 0;

View file

@ -107,7 +107,7 @@ skip_argspec(const char *ptr)
#define GSI_MAP_NOCLEAN 1
#if GS_WITH_GC
// FIXME ...
#include <gc_typed.h>
#include <gc/gc_typed.h>
static GC_descr nodeDesc; // Type descriptor for map node.
#define GSI_MAP_NODES(M, X) \
(GSIMapNode)GC_calloc_explicitly_typed(X, sizeof(GSIMapNode_t), nodeDesc)

View file

@ -31,7 +31,7 @@ static unsigned disabled = 0;
#if GS_WITH_GC
#include <gc.h>
#include <gc/gc.h>
#import "Foundation/NSLock.h"
#import "Foundation/NSHashTable.h"

View file

@ -47,7 +47,7 @@
#define GSI_MAP_EQUAL(M, X,Y) ((X).ptr == (Y).ptr)
#undef GSI_MAP_NOCLEAN
#if GS_WITH_GC
#include <gc_typed.h>
#include <gc/gc_typed.h>
static GC_descr nodeDesc; // Type descriptor for map node.
#define GSI_MAP_NODES(M, X) \
(GSIMapNode)GC_calloc_explicitly_typed(X, sizeof(GSIMapNode_t), nodeDesc)

View file

@ -213,7 +213,7 @@ static void obsFree(Observation *o);
#define GSI_MAP_EXTRA void*
#if GS_WITH_GC
#include <gc_typed.h>
#include <gc/gc_typed.h>
static GC_descr nodeDesc; // Type descriptor for map node.
#define GSI_MAP_NODES(M, X) \
(GSIMapNode)GC_calloc_explicitly_typed(X, sizeof(GSIMapNode_t), nodeDesc)

View file

@ -85,8 +85,8 @@ static IMP autorelease_imp;
#if GS_WITH_GC
#include <gc.h>
#include <gc_typed.h>
#include <gc/gc.h>
#include <gc/gc_typed.h>
static SEL finalize_sel;
static IMP finalize_imp;

View file

@ -60,7 +60,7 @@
#define GSI_MAP_NOCLEAN 1
#if GS_WITH_GC
#include <gc_typed.h>
#include <gc/gc_typed.h>
static GC_descr nodeDesc; // Type descriptor for map node.
#define GSI_MAP_NODES(M, X) \
(GSIMapNode)GC_calloc_explicitly_typed(X, sizeof(GSIMapNode_t), nodeDesc)

View file

@ -76,7 +76,7 @@
#import "GSRunLoopCtxt.h"
#if GS_WITH_GC
#include <gc.h>
#include <gc/gc.h>
#endif
// Some older BSD systems used a non-standard range of thread priorities.

View file

@ -234,7 +234,7 @@ NSZoneName (NSZone *zone)
#define GC_DEBUG 1
#endif /* DEBUG */
#include <gc.h>
#include <gc/gc.h>
/*
* Dummy zones used with garbage collection.

11505
configure vendored

File diff suppressed because it is too large Load diff

View file

@ -1142,9 +1142,9 @@ if test $ac_cv_header_objc_objc_h = no; then
fi
if test $OBJC_WITH_GC = yes; then
AC_CHECK_HEADERS(gc.h, gc_ok=yes, gc_ok=no)
AC_CHECK_HEADERS(gc/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 couldn't be found.])
AC_MSG_ERROR([Garbage collection was required, but the gc/gc.h header couldn't be found.])
fi
saved_LIBS="$LIBS"
LIBS+=" -lgc"