Browse Source

Merge remote-tracking branch 'origin/maint-0.2.3'

Nick Mathewson 11 years ago
parent
commit
523b0ec288
2 changed files with 5 additions and 1 deletions
  1. 4 0
      changes/bug6844
  2. 1 1
      src/common/util.c

+ 4 - 0
changes/bug6844

@@ -0,0 +1,4 @@
+  o Minor bugfixes:
+   - Correct file sizes when reading binary files on
+     Cygwin, to avoid a bug where Tor would fail to read its state file.
+     Fixes bug 6844; bugfix on 0.1.2.7-alpha.

+ 1 - 1
src/common/util.c

@@ -2328,7 +2328,7 @@ read_file_to_str(const char *filename, int flags, struct stat *stat_out)
   }
   string[r] = '\0'; /* NUL-terminate the result. */
 
-#ifdef _WIN32
+#if defined(_WIN32) || defined(__CYGWIN__)
   if (!bin && strchr(string, '\r')) {
     log_debug(LD_FS, "We didn't convert CRLF to LF as well as we hoped "
               "when reading %s. Coping.",