File tree Expand file tree Collapse file tree 6 files changed +57
-0
lines changed Expand file tree Collapse file tree 6 files changed +57
-0
lines changed Original file line number Diff line number Diff line change 11set(TARGET_PUBLIC_HEADERS
22 libc.include.assert
33 libc.include.ctype
4+ libc.include.dlfcn
45 libc.include.errno
56 libc.include.features
67 libc.include.fenv
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ set(TARGET_PUBLIC_HEADERS
22 libc.include.assert
33 libc.include.ctype
44 libc.include.dirent
5+ libc.include.dlfcn
56 libc.include.errno
67 libc.include.fcntl
78 libc.include.features
Original file line number Diff line number Diff line change @@ -51,6 +51,15 @@ add_gen_header(
5151 .llvm_libc_common_h
5252)
5353
54+ add_gen_header(
55+ dlfcn
56+ DEF_FILE dlfcn.h.def
57+ GEN_HDR dlfcn.h
58+ DEPENDS
59+ .llvm-libc-macros .dlfcn_macros
60+ .llvm_libc_common_h
61+ )
62+
5463add_gen_header(
5564 features
5665 DEF_FILE features.h.def
Original file line number Diff line number Diff line change 1+ //===-- C standard library header dlfcn.h ---------------------------------===//
2+ //
3+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+ // See https://llvm.org/LICENSE.txt for license information.
5+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+ //
7+ //===----------------------------------------------------------------------===//
8+
9+ #ifndef LLVM_LIBC_DLFCN_H
10+ #define LLVM_LIBC_DLFCN_H
11+
12+ #include "__llvm-libc-common.h"
13+ #include "llvm-libc-macros/dlfcn-macros.h"
14+
15+ %%public_api()
16+
17+ #endif // LLVM_LIBC_DLFCN_H
Original file line number Diff line number Diff line change @@ -277,3 +277,9 @@ add_macro_header(
277277 HDR
278278 stdckdint-macros .h
279279)
280+
281+ add_macro_header(
282+ dlfcn_macros
283+ HDR
284+ dlfcn-macros .h
285+ )
Original file line number Diff line number Diff line change 1+ //===-- Definition of macros from dlfcn.h ---------------------------------===//
2+ //
3+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+ // See https://llvm.org/LICENSE.txt for license information.
5+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+ //
7+ //===----------------------------------------------------------------------===//
8+
9+ #ifndef LLVM_LIBC_MACROS_DLFCN_MACROS_H
10+ #define LLVM_LIBC_MACROS_DLFCN_MACROS_H
11+
12+ #define RTLD_LAZY 0x00001
13+ #define RTLD_NOW 0x00002
14+ #define RTLD_GLOBAL 0x00100
15+ #define RTLD_LOCAL 0
16+
17+ // Non-standard stuff here
18+ #define RTLD_BINDING_MASK 0x3
19+ #define RTLD_NOLOAD 0x00004
20+ #define RTLD_DEEPBIND 0x00008
21+ #define RTLD_NODELETE 0x01000
22+
23+ #endif // LLVM_LIBC_MACROS_DLFCN_MACROS_H
You can’t perform that action at this time.
0 commit comments