From 775228a56db6f28b2d4a91b7a9513b7508fe8a2a Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Thu, 5 Jun 2008 02:44:14 +0100 Subject: add error_t, E* and C++ issue --- unsorted/PortingIssues.mdwn | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'unsorted') diff --git a/unsorted/PortingIssues.mdwn b/unsorted/PortingIssues.mdwn index 993d4843..454f24eb 100644 --- a/unsorted/PortingIssues.mdwn +++ b/unsorted/PortingIssues.mdwn @@ -133,6 +133,17 @@ You can for example look in the latest coreutils (the above is a simplified vers Of course, if you don't care about broken systems (like MS-DOG) not supporting `strerror()` you can just replace `sys_errlist[]` directly (upstream might not accept your patch, but debian should have no problem) +## C++, `error_t` and `E*` + +On the Hurd, `error_t` is an enumeration of the `E*` constants. However, C++ +does not like `E*` integer macros being directly assigned to that enumeration. In short, replace + + error_t err = EINTR; + +by + + error_t err = error_t(EINTR); + ## Filenames ending in a slash \`/' Those are evil if they don't exist and you want to name a directory this way. For example, `mkdir foobar/` will not work on GNU. This is POSIX compatible. POSIX says that the path of a directory may have slashes appended to it. But the directory does not exist yet, so the path does not refer to a directory, and hence trailing slashes are not guaranteed to work. Just drop the slashes, and you're fine. -- cgit v1.2.3