DCL 3.7.4
Loading...
Searching...
No Matches
_dlfcn.cpp
Go to the documentation of this file.
1#include <dcl/Config.h>
2
3#ifndef __WINNT__
4
5#include <errno.h>
6#if defined(_AIX) || defined(__sun__)
7 #include <alloca.h>
8#endif
9#include <stdlib.h> // alloca
10#include <dcl/_dlfcn.h>
11#include <dcl/Object.h> // __T(str)
12#include <dcl/String.h>
13
14#include "__strumbs.h"
15
16#if __DCL_HAVE_THIS_FILE__
17#undef __THIS_FILE__
18static const char_t __UNUSED__ __THIS_FILE__[] = __T("dcl/_dlfcn.cpp");
19#endif
20
21__DCL_BEGIN_NAMESPACE
22
23void* __dlopen(const String& _filename, int _flag)
24{
25 STRTOMBS(_filename, filename)
26 else {
27 errno = EILSEQ;
28 return NULL;
29 }
30
31 errno = 0;
32 return dlopen(filename, _flag);
33}
34
35int __dlerror(String& r)
36{
37 const char* s = dlerror();
38 if (s) {
39 r = __mbstostr(s);
40 return 0;
41 }
42 errno = 0;
43 return -1;
44}
45
46__DCL_END_NAMESPACE
47
48#endif // __WINNT__
__DCL_BEGIN_NAMESPACE String __mbstostr(const char *_mbs, size_t _nmbs) __DCL_THROWS1(CharsetConvertException *)
Definition __strumbs.cpp:18
#define STRTOMBS(str, mbs)
Definition __strumbs.h:25
__DCL_BEGIN_NAMESPACE void * __dlopen(const String &_filename, int _flag)
Definition _dlfcn.cpp:23
int __dlerror(String &r)
Definition _dlfcn.cpp:35
#define __THIS_FILE__
Definition _trace.h:14
#define NULL
Definition Config.h:312
#define __UNUSED__
Definition Config.h:341
wchar_t char_t
Definition Config.h:247
IOException *size_t r
Definition MediaInfo.cpp:82
#define __T(str)
Definition Object.h:60