3 //=============================================================================
9 * @author Don Hinton <dhinton@dresystems.com>
10 * @author This code was originally in various places including ace/OS.h.
12 //=============================================================================
14 #ifndef ACE_OS_INCLUDE_OS_DLFCN_H
15 #define ACE_OS_INCLUDE_OS_DLFCN_H
17 #include /**/ "ace/pre.h"
19 #include /**/ "ace/config-all.h"
21 #if !defined (ACE_LACKS_PRAGMA_ONCE)
23 #endif /* ACE_LACKS_PRAGMA_ONCE */
25 #if !defined (ACE_LACKS_DLFCN_H)
26 # include /**/ <dlfcn.h>
27 #endif /* !ACE_LACKS_DLFCN_H */
29 #if defined (ACE_VXWORKS) && !defined (__RTP__)
30 # include /**/ <loadLib.h> /* for module load */
31 # include /**/ <unldLib.h> /* for module unload */
32 # include /**/ <symLib.h> /* for findSymbol */
33 # include /**/ <sysSymTbl.h> /* for global symbol table */
34 #endif /* ACE_VXWORKS */
36 // Place all additions (especially function declarations) within extern "C" {}
40 #endif /* __cplusplus */
42 /* Set the proper handle type for dynamically-loaded libraries. */
43 /* Also define a default 'mode' for loading a library - the names and values */
44 /* differ between OSes, so if you write code that uses the mode, be careful */
45 /* of the platform differences. */
46 #if defined (ACE_WIN32)
47 // Dynamic loading-related types - used for dlopen and family.
48 typedef HINSTANCE ACE_SHLIB_HANDLE
;
49 # if !defined (ACE_SHLIB_INVALID_HANDLE)
50 # define ACE_SHLIB_INVALID_HANDLE 0
51 # endif /* ACE_SHLIB_INVALID_HANDLE */
52 # if !defined (ACE_DEFAULT_SHLIB_MODE)
53 # define ACE_DEFAULT_SHLIB_MODE 0
54 # endif /* ACE_DEFAULT_SHLIB_MODE */
55 #elif defined (ACE_HAS_SVR4_DYNAMIC_LINKING)
56 typedef void *ACE_SHLIB_HANDLE
;
57 # if !defined (ACE_SHLIB_INVALID_HANDLE)
58 # define ACE_SHLIB_INVALID_HANDLE 0
59 # endif /* ACE_SHLIB_INVALID_HANDLE */
60 // This is needed to for dynamic_cast to work properly on objects passed to
62 # if !defined (ACE_DEFAULT_SHLIB_MODE)
63 # define ACE_DEFAULT_SHLIB_MODE RTLD_LAZY | RTLD_GLOBAL
65 #else /* !ACE_WIN32 && !ACE_HAS_SVR4_DYNAMIC_LINKING */
66 typedef void *ACE_SHLIB_HANDLE
;
67 # if !defined (ACE_SHLIB_INVALID_HANDLE)
68 # define ACE_SHLIB_INVALID_HANDLE 0
69 # endif /* ACE_SHLIB_INVALID_HANDLE */
70 # if !defined (ACE_DEFAULT_SHLIB_MODE)
71 # define ACE_DEFAULT_SHLIB_MODE RTLD_LAZY
72 # endif /* ACE_DEFAULT_SHLIB_MODE */
73 #endif /* ACE_WIN32 */
75 #if !defined (RTLD_LAZY)
77 #endif /* !RTLD_LAZY */
79 #if !defined (RTLD_NOW)
81 #endif /* !RTLD_NOW */
83 #if !defined (RTLD_GLOBAL)
85 #endif /* !RTLD_GLOBAL */
89 #endif /* __cplusplus */
91 #include /**/ "ace/post.h"
92 #endif /* ACE_OS_INCLUDE_OS_DLFCN_H */