[libc-commits] [libc] [libc] Add sys/param.h header (PR #200559)

via libc-commits libc-commits at lists.llvm.org
Sat May 30 02:47:09 PDT 2026


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff origin/main HEAD --extensions h -- libc/include/llvm-libc-macros/sys-param-macros.h --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/libc/include/llvm-libc-macros/sys-param-macros.h b/libc/include/llvm-libc-macros/sys-param-macros.h
index f0e42418c..c201259cc 100644
--- a/libc/include/llvm-libc-macros/sys-param-macros.h
+++ b/libc/include/llvm-libc-macros/sys-param-macros.h
@@ -26,23 +26,23 @@
 #endif
 
 #ifndef MIN
-#define MIN(a,b) (((a)<(b))?(a):(b))
+#define MIN(a, b) (((a) < (b)) ? (a) : (b))
 #endif
 
 #ifndef MAX
-#define MAX(a,b) (((a)>(b))?(a):(b))
+#define MAX(a, b) (((a) > (b)) ? (a) : (b))
 #endif
 
 #ifndef howmany
-#define howmany(n,d) (((n)+((d)-1))/(d))
+#define howmany(n, d) (((n) + ((d) - 1)) / (d))
 #endif
 
 #ifndef roundup
-#define roundup(n,d) (howmany(n,d)*(d))
+#define roundup(n, d) (howmany(n, d) * (d))
 #endif
 
 #ifndef powerof2
-#define powerof2(n) !(((n)-1) & (n))
+#define powerof2(n) !(((n) - 1) & (n))
 #endif
 
 #ifndef MAXPATHLEN

``````````

</details>


https://github.com/llvm/llvm-project/pull/200559


More information about the libc-commits mailing list