]> git.pld-linux.org Git - packages/crossmingw32-gcc.git/blobdiff - crossmingw32-gcc-lfs.patch
- updated to 7.5.0
[packages/crossmingw32-gcc.git] / crossmingw32-gcc-lfs.patch
index 7a28abab8cf82258d14c9fbd83236868bd65c157..589bad1a565630ab4f758ea5f9780c3b28dbd305 100644 (file)
@@ -1,19 +1,6 @@
-diff -r faddb1a6e933 libstdc++-v3/config/io/basic_file_stdio.cc
---- a/libstdc++-v3/config/io/basic_file_stdio.cc       Fri Jul 31 08:58:42 2009 -0600
-+++ b/libstdc++-v3/config/io/basic_file_stdio.cc       Fri Jul 31 13:09:27 2009 -0600
-@@ -224,16 +224,16 @@
-       }
-     return __ret;
-   }
--  
--  __basic_file<char>* 
--  __basic_file<char>::open(const char* __name, ios_base::openmode __mode, 
-+
-+  __basic_file<char>*
-+  __basic_file<char>::open(const char* __name, ios_base::openmode __mode,
-                          int /*__prot*/)
-   {
-     __basic_file* __ret = NULL;
+--- gcc-7.5.0/libstdc++-v3/config/io/basic_file_stdio.cc.orig  2017-08-14 14:14:09.143001000 +0200
++++ gcc-7.5.0/libstdc++-v3/config/io/basic_file_stdio.cc       2019-12-25 20:03:25.172581834 +0100
+@@ -236,7 +236,7 @@
      const char* __c_mode = fopen_mode(__mode);
      if (__c_mode && !this->is_open())
        {
@@ -22,31 +9,31 @@ diff -r faddb1a6e933 libstdc++-v3/config/io/basic_file_stdio.cc
        if ((_M_cfile = fopen64(__name, __c_mode)))
  #else
        if ((_M_cfile = fopen(__name, __c_mode)))
-@@ -317,7 +317,7 @@
+@@ -311,7 +311,7 @@
    streamoff
-   __basic_file<char>::seekoff(streamoff __off, ios_base::seekdir __way)
+   __basic_file<char>::seekoff(streamoff __off, ios_base::seekdir __way) throw ()
    {
 -#ifdef _GLIBCXX_USE_LFS
 +#if defined(_GLIBCXX_USE_LFS) || defined(__MINGW32__)
      return lseek64(this->fd(), __off, __way);
  #else
      if (__off > numeric_limits<off_t>::max()
-@@ -366,6 +366,15 @@
-                                                          ios_base::cur);
-       return std::min(__off, streamoff(numeric_limits<streamsize>::max()));
-       }
+@@ -355,6 +355,15 @@
+     if (!__err && _GLIBCXX_ISREG(__buffer.st_mode))
+       {
+       const streamoff __off = __buffer.st_size - lseek64(this->fd(), 0,
++                                                         ios_base::cur);
++      return std::min(__off, streamoff(numeric_limits<streamsize>::max()));
++      }
 +#elif defined(__MINGW32__)
 +    struct _stati64 __buffer;
 +    const int __err = _fstati64(this->fd(), &__buffer);
 +    if (!__err && _GLIBCXX_ISREG(__buffer.st_mode))
 +      {
 +      const streamoff __off = __buffer.st_size - lseek64(this->fd(), 0,
-+                                                         ios_base::cur);
-+      return std::min(__off, streamoff(numeric_limits<streamsize>::max()));
-+      }
- #else
-     struct stat __buffer;
-     const int __err = fstat(this->fd(), &__buffer);
+                                                          ios_base::cur);
+       return std::min(__off, streamoff(numeric_limits<streamsize>::max()));
+       }
 diff -r faddb1a6e933 libstdc++-v3/include/ext/stdio_sync_filebuf.h
 --- a/libstdc++-v3/include/ext/stdio_sync_filebuf.h    Fri Jul 31 08:58:42 2009 -0600
 +++ b/libstdc++-v3/include/ext/stdio_sync_filebuf.h    Fri Jul 31 13:09:27 2009 -0600
This page took 0.061758 seconds and 4 git commands to generate.