[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Current CVS: incorrect re-decrlaration of errno
From: |
Werner LEMBERG |
Subject: |
Re: Current CVS: incorrect re-decrlaration of errno |
Date: |
Fri, 22 Sep 2000 10:15:21 +0200 (CEST) |
> #include <errno.h>
> ...
> #ifndef errno
> extern int errno;
> #endif
>
> This is plain wrong; you cannot assume that errno is #define'd. It
> is *declared* in <errno.h> and the second redeclaration fails for
> C++ (well, it may be subtle namespace problem - our compiler does
> some tricks with namespaces in standard includes).
At least for C you are wrong. According to the ISO C standard, errno
may be a macro (and glibc indeed uses a macro). I'll have a look into
the C++ standard, but I doubt this has changed since it would break
backwards compatibility.
Antoine, can you please comment this?
Werner