Re: [PATCH] semihosting: add O_BINARY flag in host_open for NT compatibility

2023-01-06 Thread Evgeny Iakovlev
On 1/6/2023 10:48, Bin Meng wrote: On Fri, Jan 6, 2023 at 3:39 PM Philippe Mathieu-Daudé wrote: On 5/1/23 22:19, Evgeny Iakovlev wrote: Windows open(2) implementations opens files in text mode by default and needs a Windows-only O_BINARY flag to open files as binary. Qemu already s/Qemu/QEM

Re: [PATCH] semihosting: add O_BINARY flag in host_open for NT compatibility

2023-01-06 Thread Evgeny Iakovlev
On 1/6/2023 10:48, Bin Meng wrote: On Fri, Jan 6, 2023 at 3:39 PM Philippe Mathieu-Daudé wrote: On 5/1/23 22:19, Evgeny Iakovlev wrote: Windows open(2) implementations opens files in text mode by default and needs a Windows-only O_BINARY flag to open files as binary. Qemu already s/Qemu/QEM

Re: [PATCH] semihosting: add O_BINARY flag in host_open for NT compatibility

2023-01-06 Thread Bin Meng
On Fri, Jan 6, 2023 at 3:39 PM Philippe Mathieu-Daudé wrote: > > On 5/1/23 22:19, Evgeny Iakovlev wrote: > > Windows open(2) implementations opens files in text mode by default and > > needs a Windows-only O_BINARY flag to open files as binary. Qemu already > > s/Qemu/QEMU/ > > > knows about that

Re: [PATCH] semihosting: add O_BINARY flag in host_open for NT compatibility

2023-01-05 Thread Philippe Mathieu-Daudé
On 5/1/23 22:19, Evgeny Iakovlev wrote: Windows open(2) implementations opens files in text mode by default and needs a Windows-only O_BINARY flag to open files as binary. Qemu already s/Qemu/QEMU/ knows about that flag in osdep.h, so we can just add it to the host_flags for better compatibil