[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:48:38 PDT 2023


alfredfo updated this revision to Diff 550548.
alfredfo added a comment.

s/fi/endif


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
@@ -2,6 +2,10 @@
 #define __LLVM_LIBC_MACROS_LIMITS_MACROS_H
 
 #ifdef __linux__
+#if !defined _GCC_LIMITS_H_ && !defined __CLANG_LIMITS_H &&                    \
+    __has_include_next(<limits.h>)
+#include_next <limits.h>
+#endif
 #include <linux/limits.h>
 #endif
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D158040.550548.patch
Type: text/x-patch
Size: 491 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230815/1ead8fc8/attachment.bin>


More information about the libc-commits mailing list