]> git.pld-linux.org Git - packages/crossmingw32-gcc.git/blame - gcc-mingw32.patch
- updated to 10.5.0
[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
9ea34387
JB
50--- gcc-10.4.0/libstdc++-v3/src/filesystem/ops-common.h.orig 2023-06-26 19:29:27.267246537 +0200
51+++ gcc-10.4.0/libstdc++-v3/src/filesystem/ops-common.h 2023-06-26 20:39:47.401050776 +0200
52@@ -115,7 +115,7 @@ namespace __gnu_posix
53 return -1;
54 }
e1e2e047
JB
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
9ea34387
JB
82--- gcc-10.4.0/libstdc++-v3/src/c++11/system_error.cc.orig 2022-06-28 10:54:32.000000000 +0200
83+++ gcc-10.4.0/libstdc++-v3/src/c++11/system_error.cc 2023-06-26 19:29:27.740577306 +0200
e1e2e047
JB
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
9ea34387 93@@ -266,10 +266,10 @@ namespace
e1e2e047
JB
94 #if defined EOPNOTSUPP && (!defined ENOTSUP || EOPNOTSUPP != ENOTSUP)
95 case EOPNOTSUPP:
96 #endif
97-#ifdef EOVERFLOW
98+#if defined(EOVERFLOW) && (EOVERFLOW != ERANGE)
99 case EOVERFLOW:
100 #endif
9ea34387
JB
101-#ifdef EOWNERDEAD
102+#if defined(EOWNERDEAD) && (!defined EILSEQ || EOWNERDEAD != EILSEQ)
103 case EOWNERDEAD:
104 #endif
105 #ifdef EPERM
106--- gcc-10.4.0/libgfortran/io/io.h.orig 2022-06-28 10:54:30.000000000 +0200
107+++ gcc-10.4.0/libgfortran/io/io.h 2023-06-27 16:00:06.467225258 +0200
108@@ -291,7 +291,7 @@ typedef enum
109 unit_share;
110
111 typedef enum
112-{ CC_LIST, CC_FORTRAN, CC_NONE,
113+{ CC_LIST, CC_FORTRAN, CC_NONE_,
114 CC_UNSPECIFIED
115 }
116 unit_cc;
117--- gcc-10.4.0/libgfortran/io/transfer.c.orig 2022-06-28 10:54:30.000000000 +0200
118+++ gcc-10.4.0/libgfortran/io/transfer.c 2023-06-27 18:46:33.802431279 +0200
119@@ -388,7 +388,7 @@ read_sf (st_parameter_dt *dtp, size_t *l
120 q = fbuf_getc (dtp->u.p.current_unit);
121 if (q == EOF)
122 break;
123- else if (dtp->u.p.current_unit->flags.cc != CC_NONE
124+ else if (dtp->u.p.current_unit->flags.cc != CC_NONE_
125 && (q == '\n' || q == '\r'))
126 {
127 /* Unexpected end of line. Set the position. */
128@@ -3660,7 +3660,7 @@ next_record_r (st_parameter_dt *dtp, int
129 }
130 break;
131 }
132- else if (dtp->u.p.current_unit->flags.cc != CC_NONE)
133+ else if (dtp->u.p.current_unit->flags.cc != CC_NONE_)
134 {
135 do
136 {
137@@ -4026,7 +4026,7 @@ next_record_w (st_parameter_dt *dtp, int
138 else
139 {
140 /* Skip newlines for CC=CC_NONE. */
141- const int len = (dtp->u.p.current_unit->flags.cc == CC_NONE)
142+ const int len = (dtp->u.p.current_unit->flags.cc == CC_NONE_)
143 ? 0
144 #ifdef HAVE_CRLF
145 : 2;
146@@ -4034,7 +4034,7 @@ next_record_w (st_parameter_dt *dtp, int
147 : 1;
148 #endif
149 fbuf_seek (dtp->u.p.current_unit, 0, SEEK_END);
150- if (dtp->u.p.current_unit->flags.cc != CC_NONE)
151+ if (dtp->u.p.current_unit->flags.cc != CC_NONE_)
152 {
153 char *p = fbuf_alloc (dtp->u.p.current_unit, len);
154 if (!p)
155--- gcc-10.4.0/libgfortran/io/open.c.orig 2022-06-28 10:54:30.000000000 +0200
156+++ gcc-10.4.0/libgfortran/io/open.c 2023-06-27 18:46:19.772507286 +0200
157@@ -63,7 +63,7 @@ static const st_option cc_opt[] =
158 {
159 { "list", CC_LIST },
160 { "fortran", CC_FORTRAN },
161- { "none", CC_NONE },
162+ { "none", CC_NONE_ },
163 { NULL, 0}
164 };
165
166@@ -354,8 +354,8 @@ new_unit (st_parameter_open *opp, gfc_un
167 flags->status = STATUS_UNKNOWN;
168
169 if (flags->cc == CC_UNSPECIFIED)
170- flags->cc = flags->form == FORM_UNFORMATTED ? CC_NONE : CC_LIST;
171- else if (flags->form == FORM_UNFORMATTED && flags->cc != CC_NONE)
172+ flags->cc = flags->form == FORM_UNFORMATTED ? CC_NONE_ : CC_LIST;
173+ else if (flags->form == FORM_UNFORMATTED && flags->cc != CC_NONE_)
174 {
175 generate_error (&opp->common, LIBERROR_OPTION_CONFLICT,
176 "CARRIAGECONTROL parameter conflicts with UNFORMATTED form in "
177--- gcc-10.4.0/libgfortran/io/read.c.orig 2022-06-28 10:54:30.000000000 +0200
178+++ gcc-10.4.0/libgfortran/io/read.c 2023-06-27 18:46:49.979010309 +0200
179@@ -1275,7 +1275,7 @@ read_x (st_parameter_dt *dtp, size_t n)
180 q = fbuf_getc (dtp->u.p.current_unit);
181 if (q == EOF)
182 break;
183- else if (dtp->u.p.current_unit->flags.cc != CC_NONE
184+ else if (dtp->u.p.current_unit->flags.cc != CC_NONE_
185 && (q == '\n' || q == '\r'))
186 {
187 /* Unexpected end of line. Set the position. */
188--- gcc-10.4.0/libgfortran/io/inquire.c.orig 2022-06-28 10:54:30.000000000 +0200
189+++ gcc-10.4.0/libgfortran/io/inquire.c 2023-06-27 18:46:57.988966916 +0200
190@@ -489,7 +489,7 @@ inquire_via_unit (st_parameter_inquire *
191 case CC_LIST:
192 p = "LIST";
193 break;
194- case CC_NONE:
195+ case CC_NONE_:
196 p = "NONE";
197 break;
198 case CC_UNSPECIFIED:
199--- gcc-10.4.0/libstdc++-v3/src/filesystem/ops.cc.orig 2022-06-28 10:54:32.000000000 +0200
200+++ gcc-10.4.0/libstdc++-v3/src/filesystem/ops.cc 2023-06-27 19:57:41.412644984 +0200
201@@ -971,7 +971,7 @@ fs::permissions(const path& p, perms prm
202 err = errno;
203 #else
204 if (nofollow && is_symlink(st))
205- ec = std::make_error_code(std::errc::operation_not_supported);
206+ ec = std::make_error_code(std::errc::function_not_supported);
207 else if (posix::chmod(p.c_str(), static_cast<mode_t>(prms)))
208 err = errno;
209 #endif
This page took 0.134499 seconds and 4 git commands to generate.