tools-make/config_thread.m
Adam Fedor 244789c8b5 Better thread testing
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@16871 72102866-910b-0410-8b05-ffd578937521
2003-06-06 01:55:21 +00:00

19 lines
403 B
Objective-C

/* Test whether Objective-C runtime was compiled with thread support */
#ifndef NeXT_RUNTIME
/* Dummy NXConstantString impl for so libobjc that doesn't include it */
#include <objc/NXConstStr.h>
@implementation NXConstantString
@end
#endif
#include <objc/thr.h>
#include <objc/Object.h>
int
main()
{
id o = [Object new];
return (objc_thread_detach (@selector(hash), o, nil) == NULL) ? -1 : 0;
}