public inbox for newlib-cvs@sourceware.org help / color / mirror / Atom feed
From: Richard Earnshaw <rearnsha@sourceware.org> To: newlib-cvs@sourceware.org Subject: [newlib-cygwin] aarch64: support binary mode for opening files Date: Wed, 26 May 2021 14:21:08 +0000 (GMT) [thread overview] Message-ID: <20210526142108.C14C93858025@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=2a3a03972b35377aef8d3d52d873ac3b8fcc512c commit 2a3a03972b35377aef8d3d52d873ac3b8fcc512c Author: Richard Earnshaw <rearnsha@arm.com> Date: Wed May 26 15:17:11 2021 +0100 aarch64: support binary mode for opening files Newlib for aarch64 uses libgloss for the backend. One common libgloss implementation is the 'rdimon' implementation, which uses the Arm Semihosting protocol. In order to support a remote host that runs on Windows we need to know whether a file is to be opened in binary or text mode. That means that we need to preserve this information via O_BINARY until we know what the libgloss binding will be. This patch simply copies the arm implementation from sys/arm/sys and puts it in machine/aarch64/sys, because we don't have a 'sys' subtree on aarch64. Diff: --- newlib/libc/machine/aarch64/sys/fcntl.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/newlib/libc/machine/aarch64/sys/fcntl.h b/newlib/libc/machine/aarch64/sys/fcntl.h new file mode 100644 index 000000000..7da1d46da --- /dev/null +++ b/newlib/libc/machine/aarch64/sys/fcntl.h @@ -0,0 +1,12 @@ +#ifndef _SYS_FCNTL_H_ +#define _SYS_FCNTL_H_ + +#include <sys/_default_fcntl.h> + +/* We want to support O_BINARY for the open syscall. + For example, the Demon debug monitor has a separate + flag value for "rb" vs "r". */ +#define _FBINARY 0x10000 +#define O_BINARY _FBINARY + +#endif /* _SYS_FCNTL_H_ */
reply other threads:[~2021-05-26 14:21 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20210526142108.C14C93858025@sourceware.org \ --to=rearnsha@sourceware.org \ --cc=newlib-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).