[PATCH] Use fseek/ftell instead of fseeko/ftello when Newlib is the libc

JF Bastien jfb at chromium.org
Thu Dec 11 13:32:35 PST 2014


================
Comment at: include/fstream:810
@@ -809,3 +809,3 @@
     }
-#if _WIN32
+#if _WIN32 || defined(_NEWLIB_VERSION)
     if (fseek(__file_, __width > 0 ? __width * __off : 0, __whence))
----------------
`#if defined(_WIN32) || defined(_NEWLIB_VERSION)`

================
Comment at: include/fstream:829
@@ -828,3 +828,3 @@
         return pos_type(off_type(-1));
-#if _WIN32
+#if _WIN32 || defined(_NEWLIB_VERSION)
     if (fseek(__file_, __sp, SEEK_SET))
----------------
Ditto.

================
Comment at: include/fstream:894
@@ -893,3 +893,3 @@
         }
-#if _WIN32
+#if _WIN32 || defined(_NEWLIB_VERSION)
         if (fseek(__file_, -__c, SEEK_CUR))
----------------
Ditto.

================
Comment at: include/iosfwd:184
@@ +183,3 @@
+#if defined(_NEWLIB_VERSION)
+typedef long int streamoff;        // for char_traits in <string>
+#else
----------------
Where does this come from?

http://reviews.llvm.org/D6626

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the cfe-commits mailing list