]> git.saurik.com Git - apple/dyld.git/blob - testing/test-cases/dlopen-in-init2.dtest/bar.c
dyld-750.5.tar.gz
[apple/dyld.git] / testing / test-cases / dlopen-in-init2.dtest / bar.c
1 #include "test_support.h"
2
3 static int inited = 0;
4
5 __attribute__((constructor))
6 static void myinit()
7 {
8 inited = 1;
9 }
10
11 int barIsInited() {
12 return inited;
13 }
14
15 void bar() {
16 if (inited == 0) {
17 FAIL("libbar.dylib not initialized");
18 }
19 }