[libc-commits] [PATCH] D156961: [libc] Add limits.h
Alfred Persson Forsberg via Phabricator via libc-commits
libc-commits at lists.llvm.org
Thu Aug 10 16:15:42 PDT 2023
alfredfo added inline comments.
================
Comment at: libc/include/llvm-libc-macros/limits-macros.h:9
+#if __LP64__
+#define __LONG_MAX 0x7fffffffffffffffL
+#else
----------------
michaelrj wrote:
> as an added thing, can we make it so that we only define these if they aren't already defined?
Sure, will fix tomorrow
================
Comment at: libc/include/llvm-libc-macros/limits-macros.h:14
+
+#define LONG_MAX __LONG_MAX
+#define SSIZE_MAX LONG_MAX
----------------
sivachandra wrote:
> Considering `LONG_MAX` is already defined in the freestanding `limits.h`, may be all you need is:
>
> ```
> #define SSIZE_MAX __LONG_MAX__
> ```
Yes, done
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D156961/new/
https://reviews.llvm.org/D156961
More information about the libc-commits
mailing list