X-Git-Url: https://git.saurik.com/apple/dyld.git/blobdiff_plain/bac542e65c0030c0d819c7ff1dcfc25892a61844..19894a1236eae932b4028640f24ab843f691d4e4:/unit-tests/test-cases/bundle-v-dylib/main.c diff --git a/unit-tests/test-cases/bundle-v-dylib/main.c b/unit-tests/test-cases/bundle-v-dylib/main.c index 8caba38..aea5c6f 100644 --- a/unit-tests/test-cases/bundle-v-dylib/main.c +++ b/unit-tests/test-cases/bundle-v-dylib/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@ * @@ -29,9 +29,15 @@ #include #include #include +#include #include "test.h" // PASS(), FAIL() +extern void bar(); + + +// NSCreateObjectFileImageFromMemory is only available on Mac OS X - not iPhone OS +#if __MAC_OS_X_VERSION_MIN_REQUIRED void loadAsBundleFromMemory(const char* path) { @@ -79,10 +85,11 @@ void loadAsDylib(const char* path) } } -extern void bar(); +#endif int main() { +#if __MAC_OS_X_VERSION_MIN_REQUIRED int dummy; // verify that NSAddImage fails to load MH_BUNDLE @@ -102,7 +109,7 @@ int main() // verify that dyld data structures are not wanked by scanning all images _dyld_get_image_header_containing_address(&dummy); - +#endif PASS("bundle-v-dylib"); return 0; } \ No newline at end of file