File tree 3 files changed +2392
-0
lines changed
variants/arduino_portenta_c33
llext-edk/include/zephyr/lib/libc/newlib/include
3 files changed +2392
-0
lines changed Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright (c) 2019 Nordic Semiconductor ASA
3
+ *
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+
7
+ #ifndef ZEPHYR_LIB_LIBC_NEWLIB_INCLUDE_STDINT_H_
8
+ #define ZEPHYR_LIB_LIBC_NEWLIB_INCLUDE_STDINT_H_
9
+
10
+ /* Work around -ffreestanding absence of defines required to support
11
+ * PRI.64 macros in <inttypes.h> by including the newlib header that
12
+ * provides the flag macros.
13
+ */
14
+
15
+ #include <newlib.h>
16
+
17
+ #ifdef __NEWLIB__
18
+ /* Has this header. Older versions do it in <stdint.h>. */
19
+ #include <sys/_stdint.h>
20
+ #endif /* __NEWLIB__ */
21
+
22
+ /* This should work on GCC and clang.
23
+ *
24
+ * If we need to support a toolchain without #include_next the CMake
25
+ * infrastructure should be used to identify it and provide an
26
+ * alternative solution.
27
+ */
28
+ #include_next <stdint.h>
29
+
30
+ #endif /* ZEPHYR_LIB_LIBC_NEWLIB_INCLUDE_STDINT_H_ */
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright © 2024 Keith Packard <[email protected] >
3
+ *
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+
7
+ #ifndef ZEPHYR_LIB_LIBC_NEWLIB_INCLUDE_STRING_H_
8
+ #define ZEPHYR_LIB_LIBC_NEWLIB_INCLUDE_STRING_H_
9
+
10
+ /* This should work on GCC and clang.
11
+ *
12
+ * If we need to support a toolchain without #include_next the CMake
13
+ * infrastructure should be used to identify it and provide an
14
+ * alternative solution.
15
+ */
16
+ #include_next <string.h>
17
+
18
+ #ifdef __cplusplus
19
+ extern "C" {
20
+ #endif
21
+
22
+ /*
23
+ * Define these two Zephyr APIs when _POSIX_C_SOURCE is not set to expose
24
+ * them from newlib
25
+ */
26
+ #if !__MISC_VISIBLE && !__POSIX_VISIBLE
27
+ char * strtok_r (char * __restrict, const char * __restrict, char * * __restrict);
28
+ #endif
29
+ #if __POSIX_VISIBLE < 200809L
30
+ size_t strnlen (const char * , size_t );
31
+ #endif
32
+
33
+ #ifdef __cplusplus
34
+ }
35
+ #endif
36
+
37
+ #endif /* ZEPHYR_LIB_LIBC_NEWLIB_INCLUDE_STRING_H_ */
You can’t perform that action at this time.
0 commit comments