[Hurd] error_t, E*, and c++

Samuel Thibault samuel.thibault@ens-lyon.org
Mon May 26 17:17:00 GMT 2008


Hello,

The following can not compile with g++ on GNU/Hurd:

#include <errno.h>
int main(void) {
	error_t = EPERM;
}

test.c:9: error: invalid conversion from 'int' to 'error_t'

That is because errno.h #defines EPERM to _HURD_ERRNO(1), and then g++
complains because error_t is an enum.

I guess we should for instance make all the #defines #ifndef __cplusplus?

Samuel



More information about the Libc-alpha mailing list