X-Git-Url: https://git.saurik.com/apple/dyld.git/blobdiff_plain/0959b6d4289bd106fddb7fe7d84a346159895fdd..19894a1236eae932b4028640f24ab843f691d4e4:/unit-tests/test-cases/loader_path/main.c?ds=sidebyside diff --git a/unit-tests/test-cases/loader_path/main.c b/unit-tests/test-cases/loader_path/main.c index 141931f..f8600b4 100644 --- a/unit-tests/test-cases/loader_path/main.c +++ b/unit-tests/test-cases/loader_path/main.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005 Apple Computer, Inc. All rights reserved. + * Copyright (c) 2005-2009 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -23,14 +23,21 @@ #include #include #include +#include +#include #include "test.h" int main() { +#if defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && (__MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_5) NSAddImage("@loader_path/hide/libfoo3.dylib", 0); - - PASS("loader_path"); +#else + if ( dlopen("@loader_path/hide/libfoo3.dylib", 0) == NULL ) + FAIL("loader_path"); + else +#endif + PASS("loader_path"); return EXIT_SUCCESS; }