[libc-commits] [PATCH] D158040: [libc] limits.h: include compiler limits if not already included
Alfred Persson Forsberg via Phabricator via libc-commits
libc-commits at lists.llvm.org
Tue Aug 15 16:52:29 PDT 2023
alfredfo updated this revision to Diff 550550.
alfredfo added a comment.
move out of __linux__ check
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D158040/new/
https://reviews.llvm.org/D158040
Files:
libc/include/llvm-libc-macros/limits-macros.h
Index: libc/include/llvm-libc-macros/limits-macros.h
===================================================================
--- libc/include/llvm-libc-macros/limits-macros.h
+++ libc/include/llvm-libc-macros/limits-macros.h
@@ -1,6 +1,11 @@
#ifndef __LLVM_LIBC_MACROS_LIMITS_MACROS_H
#define __LLVM_LIBC_MACROS_LIMITS_MACROS_H
+#if !defined _GCC_LIMITS_H_ && !defined __CLANG_LIMITS_H && \
+ __has_include_next(<limits.h>)
+#include_next <limits.h>
+#endif
+
#ifdef __linux__
#include <linux/limits.h>
#endif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D158040.550550.patch
Type: text/x-patch
Size: 535 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230815/3ab12abf/attachment.bin>
More information about the libc-commits
mailing list