Преглед на файлове

Document the strange usage of W_APPEND mode for stderr

Nicolas Schodet преди 7 години
родител
ревизия
aaa1c60ee3
променени са 1 файла, в които са добавени 4 реда и са изтрити 0 реда
  1. 4 0
      src/hio.rs

+ 4 - 0
src/hio.rs

@@ -41,6 +41,10 @@ impl fmt::Write for HStdout {
 
 /// Construct a new handle to the host's standard error.
 pub fn hstderr() -> Result<HStderr, ()> {
+    // There is actually no stderr access in ARM Semihosting documentation. Use
+    // convention used in libgloss.
+    // See: libgloss/arm/syscalls.c, line 139.
+    // https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;a=blob;f=libgloss/arm/syscalls.c#l139
     open(":tt\0", nr::open::W_APPEND).map(|fd| HStderr { fd })
 }