31-05-2010, 08:31 AM
(1) "errno", like many other identifiers used in the standard headers, is reserved so you should NOT attempt to use it for your own purposes. You could use something like error_number instead.
(2) The standard permits errno to be implemented as a macro or as an identifier declared with external linkage. It is a violation of rule 20.5 to use errno, regardless of its implementation.
As pointed out by previous correspondents errno has a lot of implementation defined behaviour associated with it in ISO C.
(2) The standard permits errno to be implemented as a macro or as an identifier declared with external linkage. It is a violation of rule 20.5 to use errno, regardless of its implementation.
As pointed out by previous correspondents errno has a lot of implementation defined behaviour associated with it in ISO C.
Posted by and on behalf of the MISRA C Working Group