summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--unsorted/PortingIssues.mdwn11
1 files changed, 11 insertions, 0 deletions
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)
+## <a name="C++_error_t"> C++, `error_t` and `E*` </a>
+
+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);
+
## <a name="Filenames_ending_in_a_slash_"> Filenames ending in a slash \`/' </a>
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.