]>
git.saurik.com Git - apple/dyld.git/blob - testing/test-cases/interpose-resolver.dtest/main.c
2 // BUILD: $CC foo.c -dynamiclib -o $BUILD_DIR/libfoo.dylib -install_name $RUN_DIR/libfoo.dylib
3 // BUILD: $CC interposer.c -dynamiclib -o $BUILD_DIR/libmyinterpose.dylib -install_name $RUN_DIR/libmyinterpose.dylib $BUILD_DIR/libfoo.dylib
4 // BUILD: $CC main.c $BUILD_DIR/libfoo.dylib -o $BUILD_DIR/resolver-only.exe
5 // BUILD: $CC main.c $BUILD_DIR/libfoo.dylib -o $BUILD_DIR/interposed-resolver.exe -DINTERPOSED $BUILD_DIR/libmyinterpose.dylib
7 // RUN: ./resolver-only.exe
8 // RUN: ./interposed-resolver.exe
14 #include "test_support.h"
19 int main(int argc
, const char* argv
[], const char* envp
[], const char* apple
[]) {
23 else if ( (*pFoo
)() != 11 )
24 FAIL("*pFoo() != 11");
30 else if ( (*pFoo
)() != 10 )
31 FAIL(" *pFoo() != 10");