Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions include/zephyr/posix/posix_limits.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
#ifndef ZEPHYR_INCLUDE_ZEPHYR_POSIX_POSIX_LIMITS_H_
#define ZEPHYR_INCLUDE_ZEPHYR_POSIX_POSIX_LIMITS_H_

#if defined(_POSIX_C_SOURCE) || defined(__DOXYGEN__)

/*
* clang-format and checkpatch disagree on formatting here, so rely on checkpatch and disable
* clang-format since checkpatch cannot be selectively disabled.
Expand Down Expand Up @@ -122,4 +124,6 @@

/* clang-format on */

#endif

#endif /* ZEPHYR_INCLUDE_ZEPHYR_POSIX_POSIX_LIMITS_H_ */
17 changes: 2 additions & 15 deletions lib/libc/arcmwdt/include/limits.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,10 @@
#define LIB_LIBC_ARCMWDT_INCLUDE_LIMITS_H_

#include_next <limits.h>

#ifdef __cplusplus
extern "C" {
#endif

#if defined(_POSIX_C_SOURCE) || defined(__DOXYGEN__)

#include <zephyr/posix/posix_limits.h>

#else

#ifndef PATH_MAX
#define PATH_MAX 256

#endif

#ifdef __cplusplus
}
#endif

#endif /* ZEPHYR_LIB_LIBC_ARMSTDC_INCLUDE_LIMITS_H_ */
#endif /* LIB_LIBC_ARCMWDT_INCLUDE_LIMITS_H_ */
15 changes: 1 addition & 14 deletions lib/libc/armstdc/include/limits.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,10 @@
#define ZEPHYR_LIB_LIBC_ARMSTDC_INCLUDE_LIMITS_H_

#include_next <limits.h>

#ifdef __cplusplus
extern "C" {
#endif

#if defined(_POSIX_C_SOURCE) || defined(__DOXYGEN__)

#include <zephyr/posix/posix_limits.h>

#else

#ifndef PATH_MAX
#define PATH_MAX 256

#endif

#ifdef __cplusplus
}
#endif

#endif /* ZEPHYR_LIB_LIBC_ARMSTDC_INCLUDE_LIMITS_H_ */
15 changes: 1 addition & 14 deletions lib/libc/iar/include/limits.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,10 @@
#define ZEPHYR_LIB_LIBC_IAR_INCLUDE_LIMITS_H_

#include_next <limits.h>

#ifdef __cplusplus
extern "C" {
#endif

#if defined(_POSIX_C_SOURCE) || defined(__DOXYGEN__)

#include <zephyr/posix/posix_limits.h>

#else

#ifndef PATH_MAX
#define PATH_MAX 256

#endif

#ifdef __cplusplus
}
#endif

#endif /* ZEPHYR_LIB_LIBC_IAR_INCLUDE_LIMITS_H_ */
13 changes: 13 additions & 0 deletions lib/libc/newlib/include/limits.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
* Copyright The Zephyr Project Contributors
*
* SPDX-License-Identifier: Apache-2.0
*/

#ifndef ZEPHYR_LIB_LIBC_NEWLIB_INCLUDE_LIMITS_H_
#define ZEPHYR_LIB_LIBC_NEWLIB_INCLUDE_LIMITS_H_

#include_next <limits.h>
#include <zephyr/posix/posix_limits.h>

#endif /* ZEPHYR_LIB_LIBC_NEWLIB_INCLUDE_LIMITS_H_ */