This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]