summaryrefslogtreecommitdiffstats
path: root/0019-Cygwin-doesn-t-do-text-mode-translations-for-file-ha.patch
diff options
context:
space:
mode:
authorYaakov Selkowitz <yselkowi@redhat.com>2016-02-21 18:56:00 -0600
committerYaakov Selkowitz <yselkowi@redhat.com>2016-02-21 18:56:00 -0600
commit2426323bbdcaf8d5904f1f243bb2a5066dd21c8a (patch)
tree21ab325f116ab50e84ac20a77bbaf569eb56a469 /0019-Cygwin-doesn-t-do-text-mode-translations-for-file-ha.patch
parentd9caede9a622bfa41c984c4685a7b185421c96d7 (diff)
downloadcygwin-gcc-2426323bbdcaf8d5904f1f243bb2a5066dd21c8a.tar.gz
cygwin-gcc-2426323bbdcaf8d5904f1f243bb2a5066dd21c8a.tar.xz
cygwin-gcc-2426323bbdcaf8d5904f1f243bb2a5066dd21c8a.zip
cygwin-gcc 5.3.0
Diffstat (limited to '0019-Cygwin-doesn-t-do-text-mode-translations-for-file-ha.patch')
-rw-r--r--0019-Cygwin-doesn-t-do-text-mode-translations-for-file-ha.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/0019-Cygwin-doesn-t-do-text-mode-translations-for-file-ha.patch b/0019-Cygwin-doesn-t-do-text-mode-translations-for-file-ha.patch
new file mode 100644
index 0000000..0b63c22
--- /dev/null
+++ b/0019-Cygwin-doesn-t-do-text-mode-translations-for-file-ha.patch
@@ -0,0 +1,37 @@
+From 418028350ff9fc086f45e628423f7d0519ad6b60 Mon Sep 17 00:00:00 2001
+From: Jonathan Yong <10walls@gmail.com>
+Date: Wed, 16 Sep 2015 06:57:22 +0800
+Subject: [PATCH 19/21] Cygwin doesn't do text mode translations for file
+ handles
+
+Remove UTF-16/UTF-8 mode translations.
+---
+ gcc/ada/sysdep.c | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/gcc/ada/sysdep.c b/gcc/ada/sysdep.c
+index 01dae2b..fd4abbb 100644
+--- a/gcc/ada/sysdep.c
++++ b/gcc/ada/sysdep.c
+@@ -163,12 +163,16 @@ __gnat_set_mode (int handle, int mode)
+ U16text = 5 */
+
+ switch (mode) {
+- case 0 : WIN_SETMODE (handle, _O_BINARY); break;
++ case 0 : WIN_SETMODE (handle, O_BINARY); break;
+ case 1 : WIN_SETMODE (handle, CurrentCCSEncoding); break;
+- case 2 : WIN_SETMODE (handle, _O_TEXT); break;
++ case 2 : WIN_SETMODE (handle, O_TEXT); break;
++#if defined (__CYGWIN__)
++ default: WIN_SETMODE (handle, O_BINARY); break;
++#else
+ case 3 : WIN_SETMODE (handle, _O_U8TEXT); break;
+ case 4 : WIN_SETMODE (handle, _O_WTEXT); break;
+ case 5 : WIN_SETMODE (handle, _O_U16TEXT); break;
++#endif
+ }
+ }
+
+--
+2.4.5
+