Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
z
Classes
Class List
Class Hierarchy
Class Members
All
:
[
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
[
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
y
Enumerations
a
b
c
d
e
f
h
i
k
l
m
n
o
p
r
s
t
u
v
w
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Properties
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
Related Functions
:
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
z
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
grpc
third_party
libuv
src
unix
unix/dl.c
Go to the documentation of this file.
1
/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
2
*
3
* Permission is hereby granted, free of charge, to any person obtaining a copy
4
* of this software and associated documentation files (the "Software"), to
5
* deal in the Software without restriction, including without limitation the
6
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
7
* sell copies of the Software, and to permit persons to whom the Software is
8
* furnished to do so, subject to the following conditions:
9
*
10
* The above copyright notice and this permission notice shall be included in
11
* all copies or substantial portions of the Software.
12
*
13
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
18
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
19
* IN THE SOFTWARE.
20
*/
21
22
#include "
uv.h
"
23
#include "
internal.h
"
24
25
#include <dlfcn.h>
26
#include <
errno.h
>
27
#include <
string.h
>
28
#include <locale.h>
29
30
static
int
uv__dlerror
(
uv_lib_t
* lib);
31
32
33
int
uv_dlopen
(
const
char
*
filename
,
uv_lib_t
* lib) {
34
dlerror();
/* Reset error status. */
35
lib->
errmsg
= NULL;
36
lib->
handle
= dlopen(
filename
, RTLD_LAZY);
37
return
lib->
handle
? 0 :
uv__dlerror
(lib);
38
}
39
40
41
void
uv_dlclose
(
uv_lib_t
* lib) {
42
uv__free
(lib->
errmsg
);
43
lib->
errmsg
= NULL;
44
45
if
(lib->
handle
) {
46
/* Ignore errors. No good way to signal them without leaking memory. */
47
dlclose(lib->
handle
);
48
lib->
handle
= NULL;
49
}
50
}
51
52
53
int
uv_dlsym
(
uv_lib_t
* lib,
const
char
*
name
,
void
**
ptr
) {
54
dlerror();
/* Reset error status. */
55
*
ptr
= dlsym(lib->
handle
,
name
);
56
return
uv__dlerror
(lib);
57
}
58
59
60
const
char
*
uv_dlerror
(
const
uv_lib_t
* lib) {
61
return
lib->
errmsg
? lib->
errmsg
:
"no error"
;
62
}
63
64
65
static
int
uv__dlerror
(
uv_lib_t
* lib) {
66
const
char
* errmsg;
67
68
uv__free
(lib->
errmsg
);
69
70
errmsg = dlerror();
71
72
if
(errmsg) {
73
lib->
errmsg
=
uv__strdup
(errmsg);
74
return
-1;
75
}
76
else
{
77
lib->
errmsg
= NULL;
78
return
0;
79
}
80
}
ptr
char * ptr
Definition:
abseil-cpp/absl/base/internal/low_level_alloc_test.cc:45
filename
const char * filename
Definition:
bloaty/third_party/zlib/contrib/minizip/ioapi.h:135
string.h
setup.name
name
Definition:
setup.py:542
uv_dlerror
const char * uv_dlerror(const uv_lib_t *lib)
Definition:
unix/dl.c:60
uv__dlerror
static int uv__dlerror(uv_lib_t *lib)
Definition:
unix/dl.c:65
uv_dlclose
void uv_dlclose(uv_lib_t *lib)
Definition:
unix/dl.c:41
uv_dlsym
int uv_dlsym(uv_lib_t *lib, const char *name, void **ptr)
Definition:
unix/dl.c:53
uv_lib_t
Definition:
unix.h:216
uv__strdup
char * uv__strdup(const char *s)
Definition:
uv-common.c:55
uv__free
void uv__free(void *ptr)
Definition:
uv-common.c:81
uv.h
internal.h
uv_lib_t::handle
void * handle
Definition:
unix.h:217
uv_dlopen
int uv_dlopen(const char *filename, uv_lib_t *lib)
Definition:
unix/dl.c:33
errno.h
uv_lib_t::errmsg
char * errmsg
Definition:
unix.h:218
grpc
Author(s):
autogenerated on Thu Mar 13 2025 02:59:12