mirror of
https://github.com/gnustep/libs-base.git
synced 2025-06-01 09:02:01 +00:00
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34005 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
6f6c7316a4
commit
d73267f7e0
3 changed files with 38 additions and 10 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2011-10-15 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
|
* Source/ObjectiveC2/NSBlocks.m:
|
||||||
|
* Source/Additions/GSObjCRuntime.m:
|
||||||
|
Fixes to build with latest gcc.
|
||||||
|
|
||||||
2011-10-15 Gregory Casamento <greg.casamento@gmail.com>
|
2011-10-15 Gregory Casamento <greg.casamento@gmail.com>
|
||||||
|
|
||||||
* Documentation/GNUmakefile:
|
* Documentation/GNUmakefile:
|
||||||
|
|
|
@ -136,10 +136,15 @@ GSSelectorFromName(const char *name)
|
||||||
return sel_getUid(name);
|
return sel_getUid(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: Hack - need to provide these function declarations
|
#if defined (__GNU_LIBOBJC__) && (__GNU_LIBOBJC__ < 20110608)
|
||||||
// for gcc 4.6 libobjc. They're called below, and they're declared
|
/* Don't use sel_registerTypedName() ... it's broken when first introduced
|
||||||
// in objc-api.h, but we're using runtime.h, so objc-api.h can't be imported.
|
* into gcc (fails to correctly check for multiple registrations with same
|
||||||
#if defined (__GNU_LIBOBJC__)
|
* types but different layout info).
|
||||||
|
* Later versions of the runtime should be OK though.
|
||||||
|
* Hack - need to provide these function declarations
|
||||||
|
* for gcc 4.6 libobjc. They're called below, and they're declared
|
||||||
|
* in objc-api.h, but we're using runtime.h, so objc-api.h can't be imported.
|
||||||
|
*/
|
||||||
SEL sel_get_any_typed_uid(const char *name);
|
SEL sel_get_any_typed_uid(const char *name);
|
||||||
SEL sel_get_typed_uid(const char *name, const char*);
|
SEL sel_get_typed_uid(const char *name, const char*);
|
||||||
SEL sel_register_name(const char *name);
|
SEL sel_register_name(const char *name);
|
||||||
|
@ -151,13 +156,8 @@ GSSelectorFromNameAndTypes(const char *name, const char *types)
|
||||||
{
|
{
|
||||||
#if NeXT_RUNTIME
|
#if NeXT_RUNTIME
|
||||||
return sel_getUid(name);
|
return sel_getUid(name);
|
||||||
/* Don't use sel_registerTypedName() ... it's broken when first introduced
|
#elif defined (__GNU_LIBOBJC__) && (__GNU_LIBOBJC__ >= 20110608)
|
||||||
* into gcc (fails to correctly check for multple registrations with same
|
|
||||||
* types but different layout info).
|
|
||||||
*
|
|
||||||
#elif defined (__GNU_LIBOBJC__)
|
|
||||||
return sel_registerTypedName(name, types);
|
return sel_registerTypedName(name, types);
|
||||||
*/
|
|
||||||
#elif defined (__GNUSTEP_RUNTIME__)
|
#elif defined (__GNUSTEP_RUNTIME__)
|
||||||
return sel_registerTypedName_np(name, types);
|
return sel_registerTypedName_np(name, types);
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -1,4 +1,23 @@
|
||||||
|
|
||||||
|
#import <objc/objc.h>
|
||||||
|
|
||||||
|
#if defined (__GNU_LIBOBJC__)
|
||||||
|
|
||||||
|
#warning Unable to build NSBlocks for this runtime.
|
||||||
|
|
||||||
|
/* FIXME ... these let us link, but blocks will be broken.
|
||||||
|
*/
|
||||||
|
void *_NSConcreteStackBlock;
|
||||||
|
BOOL objc_create_block_classes_as_subclasses_of(Class super)
|
||||||
|
{
|
||||||
|
return NO;
|
||||||
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
#import <objc/objc-api.h>
|
#import <objc/objc-api.h>
|
||||||
|
#import "ObjectiveC2/runtime.h"
|
||||||
|
|
||||||
#import "ObjectiveC2/blocks_runtime.h"
|
#import "ObjectiveC2/blocks_runtime.h"
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
|
@ -60,3 +79,6 @@ BOOL objc_create_block_classes_as_subclasses_of(Class super)
|
||||||
NEW_CLASS(&_NSBlock, _NSConcreteGlobalBlock);
|
NEW_CLASS(&_NSBlock, _NSConcreteGlobalBlock);
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif /* defined (__GNU_LIBOBJC__) */
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue