]> git.saurik.com Git - apple/dyld.git/blob - unit-tests/test-cases/upward-dylib/up.c
dyld-210.2.3.tar.gz
[apple/dyld.git] / unit-tests / test-cases / upward-dylib / up.c
1 #include <stdio.h>
2 #include "down.h"
3
4 static int state = 0;
5
6 #ifndef STUB
7 // should run second because up.dylib is higher than down.dylib
8 static __attribute__((constructor)) void myInit1()
9 {
10 //fprintf(stderr, "myInit1()\n");
11 if ( getdown() ) {
12 state = 1;
13 }
14 }
15 #endif
16
17 int whatsup()
18 {
19 return state;
20 }
21