File: config_thread.m

package info (click to toggle)
gnustep-make 1.10.0-5
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,044 kB
  • ctags: 109
  • sloc: sh: 3,904; ansic: 959; makefile: 194; csh: 116; objc: 13
file content (19 lines) | stat: -rw-r--r-- 403 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* 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;
}