00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 #ifndef ACE_OS_INCLUDE_OS_DLFCN_H
00017 #define ACE_OS_INCLUDE_OS_DLFCN_H
00018 
00019 #include  "ace/pre.h"
00020 
00021 #include  "ace/config-all.h"
00022 
00023 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00024 # pragma once
00025 #endif 
00026 
00027 #if !defined (ACE_LACKS_DLFCN_H)
00028 #  if defined (ACE_HAS_DLFCN_H_BROKEN_EXTERN_C)
00029      extern "C" {
00030 #  endif 
00031 #  include  <dlfcn.h>
00032 #  if defined (ACE_HAS_DLFCN_H_BROKEN_EXTERN_C)
00033      }
00034 #  endif 
00035 #endif 
00036 
00037 #if defined (__hpux)
00038 #  if defined(__GNUC__) || __cplusplus >= 199707L
00039 #    include  <dl.h>
00040 #  else
00041 #    include  <cxxdl.h>
00042 #  endif 
00043 #endif 
00044 
00045 #if defined (ACE_VXWORKS) && !defined (__RTP__)
00046 #  include  <loadLib.h> 
00047 #  include  <unldLib.h> 
00048 #  include  <symLib.h> 
00049 #  include  <sysSymTbl.h> 
00050 #endif 
00051 
00052 
00053 #ifdef __cplusplus
00054 extern "C"
00055 {
00056 #endif 
00057 
00058 #if defined (_M_UNIX)
00059   int _dlclose (void *);
00060   char *_dlerror (void);
00061   void *_dlopen (const char *, int);
00062   void * _dlsym (void *, const char *);
00063 #endif 
00064 
00065 
00066 
00067 
00068 
00069 #if defined (ACE_WIN32)
00070    
00071    typedef HINSTANCE ACE_SHLIB_HANDLE;
00072 #  define ACE_SHLIB_INVALID_HANDLE 0
00073 #  define ACE_DEFAULT_SHLIB_MODE 0
00074 #elif defined (ACE_HAS_SVR4_DYNAMIC_LINKING)
00075    typedef void *ACE_SHLIB_HANDLE;
00076 #  define ACE_SHLIB_INVALID_HANDLE 0
00077    
00078    
00079 #  define ACE_DEFAULT_SHLIB_MODE RTLD_LAZY | RTLD_GLOBAL
00080 #elif defined (__hpux)
00081    typedef shl_t ACE_SHLIB_HANDLE;
00082 #  define ACE_SHLIB_INVALID_HANDLE 0
00083 #  define ACE_DEFAULT_SHLIB_MODE BIND_DEFERRED | DYNAMIC_PATH
00084 #else 
00085    typedef void *ACE_SHLIB_HANDLE;
00086 #  define ACE_SHLIB_INVALID_HANDLE 0
00087 #  define ACE_DEFAULT_SHLIB_MODE RTLD_LAZY
00088 #endif 
00089 
00090 #if !defined (RTLD_LAZY)
00091 #define RTLD_LAZY 1
00092 #endif 
00093 
00094 #if !defined (RTLD_NOW)
00095 #define RTLD_NOW 2
00096 #endif 
00097 
00098 #if !defined (RTLD_GLOBAL)
00099 #define RTLD_GLOBAL 3
00100 #endif 
00101 
00102 #ifdef __cplusplus
00103 }
00104 #endif 
00105 
00106 #include  "ace/post.h"
00107 #endif