]> git.pld-linux.org Git - packages/crossmingw32-gcc.git/blame - gcc-mingw32.patch
- updated to 9.5.0; more hacks to build with mingw32 5.4.x
[packages/crossmingw32-gcc.git] / gcc-mingw32.patch
CommitLineData
e0371882
JB
1--- gcc-8.5.0/libgfortran/intrinsics/chmod.c.orig 2021-05-14 10:42:10.000000000 +0200
2+++ gcc-8.5.0/libgfortran/intrinsics/chmod.c 2022-02-16 06:22:37.688407716 +0100
3@@ -28,6 +28,9 @@ see the files COPYING3 and COPYING.RUNTI
4 #if defined(HAVE_SYS_STAT_H)
5
14b9b67e
JB
6 #include <sys/stat.h> /* For stat, chmod and umask. */
7+#ifdef __MINGW32__
8+#include <io.h>
9+#endif
10
11
12 /* INTEGER FUNCTION CHMOD (NAME, MODE)
e1e2e047
JB
13--- gcc-9.5.0/libstdc++-v3/libsupc++/new_opa.cc.orig 2023-04-15 22:04:10.903826873 +0200
14+++ gcc-9.5.0/libstdc++-v3/libsupc++/new_opa.cc 2023-04-15 22:58:08.356288088 +0200
15@@ -29,10 +29,13 @@
16 #include <bit>
0c9e92e0
JB
17 #include "new"
18
19-#if !_GLIBCXX_HAVE_ALIGNED_ALLOC && !_GLIBCXX_HAVE__ALIGNED_MALLOC \
20- && !_GLIBCXX_HAVE_POSIX_MEMALIGN && _GLIBCXX_HAVE_MEMALIGN
21+#if !_GLIBCXX_HAVE_ALIGNED_ALLOC && (!_GLIBCXX_HAVE__ALIGNED_MALLOC || defined(__MINGW32__)) \
22+ && !_GLIBCXX_HAVE_POSIX_MEMALIGN && (_GLIBCXX_HAVE_MEMALIGN || defined(__MINGW32__))
23 # if _GLIBCXX_HOSTED && __has_include(<malloc.h>)
24 // Some C libraries declare memalign in <malloc.h>
25+# ifdef __MINGW32__
26+# define __MSVCRT_VERSION__ 0x0700
27+# endif
28 # include <malloc.h>
29 # else
30 extern "C" void *memalign(std::size_t boundary, std::size_t size);
31--- gcc-7.5.0/libstdc++-v3/libsupc++/del_opa.cc.orig 2017-01-26 15:30:45.014860000 +0100
32+++ gcc-7.5.0/libstdc++-v3/libsupc++/del_opa.cc 2019-12-26 09:41:01.210155799 +0100
33@@ -40,6 +40,16 @@
34
35 #include "new"
36
37+#if !_GLIBCXX_HAVE_ALIGNED_ALLOC && (!_GLIBCXX_HAVE__ALIGNED_MALLOC || defined(__MINGW32__)) \
38+ && !_GLIBCXX_HAVE_POSIX_MEMALIGN && (_GLIBCXX_HAVE_MEMALIGN || defined(__MINGW32__))
39+# if _GLIBCXX_HOSTED && __has_include(<malloc.h>)
40+# ifdef __MINGW32__
41+# define __MSVCRT_VERSION__ 0x0700
42+# endif
43+# include <malloc.h>
44+# endif
45+#endif
46+
47 // The sized deletes are defined in other files.
48 #pragma GCC diagnostic ignored "-Wsized-deallocation"
49
e1e2e047
JB
50--- gcc-9.5.0/libstdc++-v3/src/filesystem/ops-common.h.orig 2022-05-27 09:21:13.451391769 +0200
51+++ gcc-9.5.0/libstdc++-v3/src/filesystem/ops-common.h 2023-04-16 15:41:54.130017065 +0200
52@@ -106,7 +106,7 @@ namespace __gnu_posix
53 inline int rename(const wchar_t* oldname, const wchar_t* newname)
54 { return _wrename(oldname, newname); }
55
56- inline int truncate(const wchar_t* path, _off64_t length)
57+ inline int truncate(const wchar_t* path, __off64_t length)
58 {
59 const int fd = ::_wopen(path, _O_BINARY|_O_RDWR);
60 if (fd == -1)
61--- gcc-9.5.0/libstdc++-v3/config/os/mingw32/error_constants.h.orig 2022-05-27 09:21:13.331391181 +0200
62+++ gcc-9.5.0/libstdc++-v3/config/os/mingw32/error_constants.h 2023-04-16 18:55:43.337016242 +0200
63@@ -33,6 +33,18 @@
64 #include <bits/c++config.h>
65 #include <cerrno>
66
67+#ifndef EOVERFLOW
68+#define EOVERFLOW ERANGE
69+#endif
70+
71+#ifndef ELOOP
72+#define ELOOP ERANGE
73+#endif
74+
75+#ifndef ENOTSUP
76+#define ENOTSUP ENOSYS
77+#endif
78+
79 namespace std _GLIBCXX_VISIBILITY(default)
80 {
81 _GLIBCXX_BEGIN_NAMESPACE_VERSION
82--- gcc-9.5.0/libstdc++-v3/src/c++11/system_error.cc.orig 2022-05-27 09:21:13.447391751 +0200
83+++ gcc-9.5.0/libstdc++-v3/src/c++11/system_error.cc 2023-04-16 20:09:05.676500055 +0200
84@@ -168,7 +168,7 @@ namespace
85 #ifdef EISDIR
86 case EISDIR:
87 #endif
88-#ifdef ELOOP
89+#if defined(ELOOP) && (ELOOP != ERANGE)
90 case ELOOP:
91 #endif
92 #ifdef EMFILE
93@@ -253,7 +253,7 @@ namespace
94 #ifdef ENOTSOCK
95 case ENOTSOCK:
96 #endif
97-#ifdef ENOTSUP
98+#if defined (ENOTSUP) && (ENOTSUP != ENOSYS)
99 case ENOTSUP:
100 #endif
101 #ifdef ENOTTY
102@@ -265,7 +265,7 @@ namespace
103 #if defined EOPNOTSUPP && (!defined ENOTSUP || EOPNOTSUPP != ENOTSUP)
104 case EOPNOTSUPP:
105 #endif
106-#ifdef EOVERFLOW
107+#if defined(EOVERFLOW) && (EOVERFLOW != ERANGE)
108 case EOVERFLOW:
109 #endif
110 #ifdef EOWNERDEAD
This page took 0.187127 seconds and 4 git commands to generate.