[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Hurd] error_t, E*, and c++
From: |
Samuel Thibault |
Subject: |
[Hurd] error_t, E*, and c++ |
Date: |
Sun, 25 May 2008 18:45:18 +0100 |
User-agent: |
Mutt/1.5.12-2006-07-14 |
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
- [Hurd] error_t, E*, and c++,
Samuel Thibault <=