]>
git.saurik.com Git - apple/dyld.git/blob - testing/test-cases/dlopen-recurse.dtest/main.c
2 // BUILD: $CC bar.c -dynamiclib -install_name $RUN_DIR/libbar.dylib -o $BUILD_DIR/libbar.dylib
3 // BUILD: $CC foo.c -dynamiclib -install_name $RUN_DIR/libfoo.dylib -o $BUILD_DIR/libfoo.dylib -DRUN_DIR="$RUN_DIR"
4 // BUILD: $CC main.c -o $BUILD_DIR/dlopen-recurse.exe -DRUN_DIR="$RUN_DIR"
6 // RUN: ./dlopen-recurse.exe
11 #include <dispatch/dispatch.h>
17 printf("[BEGIN] dlopen-recurse\n");
19 // libfoo's initializer calls dlopen(). If that hangs, we have a locking bug
20 void* handle
= dlopen(RUN_DIR
"/libfoo.dylib", RTLD_LAZY
);
23 printf("[PASS] dlopen-recurse\n");