From 64bedddcb3c0b9c1ff6ed2cbd673f42f8720a385 Mon Sep 17 00:00:00 2001 From: theraven Date: Mon, 25 Jan 2010 15:53:09 +0000 Subject: [PATCH] Ugly hack to fixup NXConstantString references to NSConstantString if linked against Foundation. Now, if you forget to specify -fconstant-string-class=NSConstantString when compiling, stuff will still work and GNUstep won't get confused. --- init.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/init.c b/init.c index edb4c97..6db4ad7 100644 --- a/init.c +++ b/init.c @@ -462,6 +462,14 @@ objc_init_statics (void) { struct objc_static_instances *statics = *statics_in_module; Class class = objc_lookup_class (statics->class_name); + if (strcmp(statics->class_name, "NXConstantString") == 0) + { + Class constStr = objc_lookup_class(CONSTANT_STRING_CLASS); + if (constStr) + { + class = constStr; + } + } if (! class) module_initialized = 0;