Differences between version 5 and predecessor to the previous major change of ENOMEM.
Other diffs: Previous Revision, Previous Author, or view the Annotated Edit History
Newer page: | version 5 | Last edited on Saturday, February 22, 2003 1:05:02 pm | by PerryLorier | Revert |
Older page: | version 4 | Last edited on Saturday, February 22, 2003 11:21:34 am | by MarekShnur | Revert |
@@ -4,4 +4,12 @@
I found that ENOMEM is declared in /usr/include/sys/errno.h
%%%
but in mine linux distribution it is defined in /usr/include/asm/errno.h
+
+You should never need to include anything from asm/ bits/ or linux/ directly. For example:
+ errno.h includes bits/errno.h
+ bits/errno.h includes linux/errno.h and defines [ENOTSUP] as an alias for [ENOTSUPPORTED], and [EDOM], [EILSEQ] and [ERANGE], since these are only ever generated by libc, not by the kernel
+ linux/errno.h includes asm/errno.h and defines [ERESTARTSYS], [ERESTARTNOINTR], [ERESTARTNOHAND], [ENOIOCTLCMD], [EBADHANDLE], [ENOTSYNC], [EBADCOOKIE], [ENOTSUPP], [ESERVERFAULT], [ETOOSMALL], [EBADTYPE], [EJUKEBOX] (but only for the kernel, these are never defined in userspace)
+ asm/errno.h has the #define's for all the usual errno's
+
+so, you should #include <errno.h> to get all the errno's, or you'll miss some :)