Andrew Pinski has offered to test these on Darwin for me. His post
will follow.
If approved please apply as I don't have write privileges.
Cheers,
David Ayers
/* This file was derived from the GNU runtimes
NXConstantString implementation. */
#include "objc/Object.h"
@interface NSConstantString: Object
{
char *c_string;
unsigned int len;
}
-(const char *) cString;
-(unsigned int) length;
@end
@implementation NSConstantString
-(const char *) cString
{
return (c_string);
}
-(unsigned int) length
{
return (len);
}
@end
? gcc/testsuite/objc/execute/nsconstantstring.h
Index: gcc/testsuite/objc/execute/string1.m
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/testsuite/objc/execute/string1.m,v
retrieving revision 1.3
diff -u -r1.3 string1.m
--- gcc/testsuite/objc/execute/string1.m 25 Sep 2003 01:26:00 -0000 1.3
+++ gcc/testsuite/objc/execute/string1.m 3 Jun 2004 13:01:58 -0000
@@ -4,7 +4,7 @@
#include <stdlib.h>
#ifdef __NEXT_RUNTIME__
-#import <Foundation/NSString.h>
+#include "nsconstantstring.h"
#else
#include <objc/NXConstStr.h>
#endif
Index: gcc/testsuite/objc/execute/string2.m
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/testsuite/objc/execute/string2.m,v
retrieving revision 1.3
diff -u -r1.3 string2.m
--- gcc/testsuite/objc/execute/string2.m 25 Sep 2003 01:26:00 -0000 1.3
+++ gcc/testsuite/objc/execute/string2.m 3 Jun 2004 13:01:58 -0000
@@ -4,7 +4,7 @@
#include <stdlib.h>
#ifdef __NEXT_RUNTIME__
-#import <Foundation/NSString.h>
+#include "nsconstantstring.h"
#else
#include <objc/NXConstStr.h>
#endif
Index: gcc/testsuite/objc/execute/string3.m
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/testsuite/objc/execute/string3.m,v
retrieving revision 1.2
diff -u -r1.2 string3.m
--- gcc/testsuite/objc/execute/string3.m 25 Sep 2003 01:26:00 -0000 1.2
+++ gcc/testsuite/objc/execute/string3.m 3 Jun 2004 13:01:58 -0000
@@ -4,7 +4,7 @@
#include <stdlib.h>
#ifdef __NEXT_RUNTIME__
-#import <Foundation/NSString.h>
+#include "nsconstantstring.h"
#else
#include <objc/NXConstStr.h>
#endif
Index: gcc/testsuite/objc/execute/string4.m
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/testsuite/objc/execute/string4.m,v
retrieving revision 1.2
diff -u -r1.2 string4.m
--- gcc/testsuite/objc/execute/string4.m 25 Sep 2003 01:26:00 -0000 1.2
+++ gcc/testsuite/objc/execute/string4.m 3 Jun 2004 13:01:58 -0000
@@ -4,7 +4,7 @@
#include <stdlib.h>
#ifdef __NEXT_RUNTIME__
-#import <Foundation/NSString.h>
+#include "nsconstantstring.h"
#else
#include <objc/NXConstStr.h>
#endif