[libc-commits] [libc] [libc][errno] Remove non asm generic error number (PR #92172)
via libc-commits
libc-commits at lists.llvm.org
Tue May 14 14:25:17 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libc
Author: Robin Caloudis (robincaloudis)
<details>
<summary>Changes</summary>
The following small thing caught my eye:
1) `EILSEQ` is not part of the generic asm error number macros. See the [full list of generic asm errno codes](https://github.com/torvalds/linux/blob/4b95dc87362aa57bdd0dcbad109ca5e5ef3cbb6c/include/uapi/asm-generic/errno-base.h). AFAIK the generic asm errno numbers are common between different operating systems and architectures. `EILSEQ` is not part of this common set of errno's.
2) `EILSEQ`'s value is wrong. During the addition of `EILSEQ` in https://reviews.llvm.org/D151129, the value `35` was probably chosen as its the consecutive number. This is not correct. The actual values can be looked up for example here:
* [For Linux kernel](https://github.com/search?q=repo%3Atorvalds%2Flinux+EILSEQ&type=code&p=1): `EILSEQ = 84` (uapi; i.e. x86_64), `EILSEQ = 88` (mips), `EILSEQ = 47` (parisc)
* [For Darwin kernel](https://github.com/apple-oss-distributions/xnu/blob/main/bsd/sys/errno.h#L237): `EILSEQ = 92`
---
Full diff: https://github.com/llvm/llvm-project/pull/92172.diff
1 Files Affected:
- (modified) libc/include/llvm-libc-macros/generic-error-number-macros.h (-1)
``````````diff
diff --git a/libc/include/llvm-libc-macros/generic-error-number-macros.h b/libc/include/llvm-libc-macros/generic-error-number-macros.h
index b5b1b676dacc3..cb4411fbac665 100644
--- a/libc/include/llvm-libc-macros/generic-error-number-macros.h
+++ b/libc/include/llvm-libc-macros/generic-error-number-macros.h
@@ -43,7 +43,6 @@
#define EPIPE 32
#define EDOM 33
#define ERANGE 34
-#define EILSEQ 35
#define ENAMETOOLONG 36
#define EOVERFLOW 75
``````````
</details>
https://github.com/llvm/llvm-project/pull/92172
More information about the libc-commits
mailing list