mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
Attempts to cope with new runtime's failure to link without base.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29636 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
a958c06c8e
commit
1c46da5995
11 changed files with 52 additions and 46 deletions
|
@ -16,8 +16,7 @@
|
|||
as an option to gcc. If it doesn't work, it means your gcc doesn't
|
||||
support this option. */
|
||||
|
||||
#include <objc/objc.h>
|
||||
#include <objc/Object.h>
|
||||
#include "objc-common.g"
|
||||
|
||||
/* Define our custom constant string class */
|
||||
@interface FooConstantString : Object
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include <objc/objc.h>
|
||||
#include <objc/objc-api.h>
|
||||
|
||||
#include "objc-common.g"
|
||||
|
||||
int main (void)
|
||||
{
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <objc/objc-api.h>
|
||||
#include "objc-common.g"
|
||||
|
||||
int main (void)
|
||||
{
|
||||
|
|
|
@ -3,8 +3,7 @@
|
|||
* joinable (which it shouldn't be) and this program returns 0.
|
||||
*/
|
||||
|
||||
#include <objc/thr.h>
|
||||
#include <objc/Object.h>
|
||||
#include "objc-common.g"
|
||||
#include <pthread.h>
|
||||
|
||||
int
|
||||
|
|
|
@ -1,20 +1,7 @@
|
|||
/* Dummy NXConstantString impl for so libobjc that doesn't include it */
|
||||
/*
|
||||
Copyright (C) 2005 Free Software Foundation
|
||||
|
||||
Copying and distribution of this file, with or without modification,
|
||||
are permitted in any medium without royalty provided the copyright
|
||||
notice and this notice are preserved.
|
||||
*/
|
||||
#ifndef NeXT_RUNTIME
|
||||
#include <objc/NXConstStr.h>
|
||||
@implementation NXConstantString
|
||||
@end
|
||||
#endif
|
||||
#include "objc-common.g"
|
||||
|
||||
#include <objc/Object.h>
|
||||
|
||||
@interface Test : Object
|
||||
@interface Test : NSObject
|
||||
+(void) load;
|
||||
+(int) test_result;
|
||||
@end
|
||||
|
@ -25,4 +12,6 @@ static int test_result = 1;
|
|||
+(int) test_result {return test_result;}
|
||||
@end
|
||||
|
||||
int main (void) {return [Test test_result];}
|
||||
int main (void) {
|
||||
return [Test test_result];
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
With the GNU runtime, this file does not link.
|
||||
*/
|
||||
|
||||
#include <objc/Object.h>
|
||||
#include "objc-common.g"
|
||||
|
||||
int libobjects_nextrt_checker ()
|
||||
{
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
* Fails to build or returns 1 if the feature is not availale.
|
||||
*/
|
||||
|
||||
#include "objc-common.g"
|
||||
|
||||
int
|
||||
main()
|
||||
{
|
||||
|
|
|
@ -1,24 +1,5 @@
|
|||
/* Dummy NXConstantString impl for so libobjc that doesn't include it */
|
||||
/*
|
||||
Copyright (C) 2005 Free Software Foundation
|
||||
|
||||
Copying and distribution of this file, with or without modification,
|
||||
are permitted in any medium without royalty provided the copyright
|
||||
notice and this notice are preserved.
|
||||
*/
|
||||
#ifndef NeXT_RUNTIME
|
||||
#include <objc/NXConstStr.h>
|
||||
@implementation NXConstantString
|
||||
@end
|
||||
#endif
|
||||
|
||||
#include <objc/Object.h>
|
||||
|
||||
@interface NSObject : Object
|
||||
@end
|
||||
|
||||
@implementation NSObject
|
||||
@end
|
||||
#include "objc-common.g"
|
||||
|
||||
@interface Test : Object
|
||||
+(int) testResult;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include <objc/objc-api.h>
|
||||
|
||||
#include "objc-common.g"
|
||||
|
||||
int main (void)
|
||||
{
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include <objc/objc-api.h>
|
||||
|
||||
#include "objc-common.g"
|
||||
|
||||
int main (void)
|
||||
{
|
||||
|
|
34
config/objc-common.g
Normal file
34
config/objc-common.g
Normal file
|
@ -0,0 +1,34 @@
|
|||
/* Common information for all objc runtime tests.
|
||||
*/
|
||||
#include <objc/objc.h>
|
||||
#include <objc/objc-api.h>
|
||||
|
||||
#include <objc/Object.h>
|
||||
|
||||
#ifndef NeXT_RUNTIME
|
||||
#include <objc/NXConstStr.h>
|
||||
@implementation NXConstantString
|
||||
- (const char*) cString
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
- (unsigned int) length
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@end
|
||||
#endif
|
||||
|
||||
/* Provide dummy implementations for NSObject and NSConstantString
|
||||
* for runtime implementations which won't link without them.
|
||||
*/
|
||||
|
||||
@interface NSObject : Object
|
||||
@end
|
||||
@implementation NSObject
|
||||
@end
|
||||
|
||||
@interface NSConstantString : NSObject
|
||||
@end
|
||||
@implementation NSConstantString
|
||||
@end
|
Loading…
Reference in a new issue