mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-21 01:50:30 +00:00
Make dos errno multimapping linkage tinier
640 bytes for old kDos2Errno table 182 bytes for new kDos2Errno under hello2.com (MODE=fastbuild) 122 bytes for new kDos2Errno under hello2.com (MODE=tiny)
This commit is contained in:
parent
9fa6725067
commit
8f5678882d
63 changed files with 602 additions and 160 deletions
|
@ -36,7 +36,7 @@ privileged errno_t __dos2errno(uint32_t error) {
|
|||
if (error) {
|
||||
for (i = 0; kDos2Errno[i].doscode; ++i) {
|
||||
if (error == kDos2Errno[i].doscode) {
|
||||
return *(const int *)((intptr_t)kDos2Errno + kDos2Errno[i].systemv);
|
||||
return *(const int *)((intptr_t)kDos2Errno[i].systemv);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue