mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 16:50:58 +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
da2a563929
commit
f77619ab3c
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
|
as an option to gcc. If it doesn't work, it means your gcc doesn't
|
||||||
support this option. */
|
support this option. */
|
||||||
|
|
||||||
#include <objc/objc.h>
|
#include "objc-common.g"
|
||||||
#include <objc/Object.h>
|
|
||||||
|
|
||||||
/* Define our custom constant string class */
|
/* Define our custom constant string class */
|
||||||
@interface FooConstantString : Object
|
@interface FooConstantString : Object
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#include <objc/objc.h>
|
|
||||||
#include <objc/objc-api.h>
|
#include "objc-common.g"
|
||||||
|
|
||||||
int main (void)
|
int main (void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#include <objc/objc-api.h>
|
#include "objc-common.g"
|
||||||
|
|
||||||
int main (void)
|
int main (void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -3,8 +3,7 @@
|
||||||
* joinable (which it shouldn't be) and this program returns 0.
|
* joinable (which it shouldn't be) and this program returns 0.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <objc/thr.h>
|
#include "objc-common.g"
|
||||||
#include <objc/Object.h>
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
int
|
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,
|
#include "objc-common.g"
|
||||||
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 Test : NSObject
|
||||||
|
|
||||||
@interface Test : Object
|
|
||||||
+(void) load;
|
+(void) load;
|
||||||
+(int) test_result;
|
+(int) test_result;
|
||||||
@end
|
@end
|
||||||
|
@ -25,4 +12,6 @@ static int test_result = 1;
|
||||||
+(int) test_result {return test_result;}
|
+(int) test_result {return test_result;}
|
||||||
@end
|
@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.
|
With the GNU runtime, this file does not link.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <objc/Object.h>
|
#include "objc-common.g"
|
||||||
|
|
||||||
int libobjects_nextrt_checker ()
|
int libobjects_nextrt_checker ()
|
||||||
{
|
{
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
* Fails to build or returns 1 if the feature is not availale.
|
* Fails to build or returns 1 if the feature is not availale.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "objc-common.g"
|
||||||
|
|
||||||
int
|
int
|
||||||
main()
|
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,
|
#include "objc-common.g"
|
||||||
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
|
|
||||||
|
|
||||||
@interface Test : Object
|
@interface Test : Object
|
||||||
+(int) testResult;
|
+(int) testResult;
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#include <objc/objc-api.h>
|
|
||||||
|
#include "objc-common.g"
|
||||||
|
|
||||||
int main (void)
|
int main (void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#include <objc/objc-api.h>
|
|
||||||
|
#include "objc-common.g"
|
||||||
|
|
||||||
int main (void)
|
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…
Add table
Add a link
Reference in a new issue