Skip to content

Commit

Permalink
LibC: Add ELAST errno macro
Browse files Browse the repository at this point in the history
The ELAST macro is used on many systems to refer to the largest possible
valid errno value. LLVM's libc++ uses errno values of ELAST+1 and
ELAST+2 internally, and defines an arbitrary fallback value for
platforms which don't have the macro. This means that it's possible for
their internal errno numbers could coincide with values we actually use,
which would be a very bad thing.
  • Loading branch information
BertalanD authored and linusg committed Oct 17, 2021
1 parent b5fcb10 commit 6850451
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Userland/Libraries/LibC/errno_numbers.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,3 +160,4 @@ enum ErrnoCode {
};

#define EWOULDBLOCK EAGAIN
#define ELAST EMAXERRNO

0 comments on commit 6850451

Please sign in to comment.