1.Dd April 17, 2006
2.Os
3.Dt DLOPEN_PREFLIGHT 3
4.Sh NAME
5.Nm dlopen_preflight
6.Nd preflight the load of a dynamic library or bundle
7.Sh SYNOPSIS
8.In dlfcn.h
9.Ft bool
10.Fn dlopen_preflight "const char* path"
11.Sh DESCRIPTION
12.Fn dlopen_preflight
13examines the mach-o file specified by 
14.Fa path .
15It checks if the file and libraries it depends on are all compatible with the current process. 
16That is, they contain the correct architecture and are not otherwise ABI incompatible. 
17.Pp
18.Fn dlopen_preflight
19was first available in Mac OS X 10.5.
20.Sh SEARCHING
21.Fn dlopen_preflight
22uses the same steps as 
23.Fn dlopen
24to find a compatible mach-o file.
25.Sh RETURN VALUES
26.Fn dlopen_preflight
27returns true on if the mach-o file is compatible.  If the file is not compatible, it returns false 
28and sets an error string that can be examined with
29.Fn dlerror .
30.Pp
31.Sh SEE ALSO
32.Xr dlopen 3
33.Xr dlerror 3
34