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