It’s said that the error numbers like EINVAL, ENOMEM, etc. are defined in errno.h, but I can’t find them in errno.h, I also searched some directories under /usr/include, still can’t find them. I can use these macros without any issue in my C code. Anyone can tell me where are them?
In which header file are EINVAL, ENOMEM, etc. defined in Linux?
27.6k Views Asked by oldnavy At
3
It's up to the implementation of the standard C library.
All that is certain is that
<errno.h>is the top-level header that application code should use.One way of figuring out is to trace an invocation of the compiler.