public inbox for cygwin-cvs@sourceware.org help / color / mirror / Atom feed
From: Corinna Vinschen <corinna@sourceware.org> To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin/main] Cygwin: wincap.h: clarify NO_COPY_RO usage Date: Thu, 12 Jan 2023 09:52:57 +0000 (GMT) [thread overview] Message-ID: <20230112095257.4F3A93858C74@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=e5880bef39fd0593bfa51a01b12485f87de4251a commit e5880bef39fd0593bfa51a01b12485f87de4251a Author: Corinna Vinschen <corinna@vinschen.de> AuthorDate: Thu Jan 12 10:51:39 2023 +0100 Commit: Corinna Vinschen <corinna@vinschen.de> CommitDate: Thu Jan 12 10:51:39 2023 +0100 Cygwin: wincap.h: clarify NO_COPY_RO usage ...and drop one unnecessary usage of NO_COPY_RO. Signed-off-by: Corinna Vinschen <corinna@vinschen.de> Diff: --- winsup/cygwin/forkable.cc | 2 +- winsup/cygwin/local_includes/winsup.h | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/forkable.cc b/winsup/cygwin/forkable.cc index 350a95c3e416..fbc30ae3028f 100644 --- a/winsup/cygwin/forkable.cc +++ b/winsup/cygwin/forkable.cc @@ -313,7 +313,7 @@ struct namepart { bool create_dir; }; /* mutex name is formed along dir names */ -static namepart NO_COPY_RO const +static namepart const forkable_nameparts[] = { /* text textfunc mutex_from_dir create */ { L"<cygroot>", rootname, false, false, }, diff --git a/winsup/cygwin/local_includes/winsup.h b/winsup/cygwin/local_includes/winsup.h index c54440fa808d..c9788de8f012 100644 --- a/winsup/cygwin/local_includes/winsup.h +++ b/winsup/cygwin/local_includes/winsup.h @@ -10,6 +10,12 @@ details. */ #define __INSIDE_CYGWIN__ +/* Use "static NO_COPY_RO" instead of "static const", if the datastructure + should be R/O, but without the "const" qualifier. Typically this is only + required if the static datastructure is "const" in reality, but the Windows + function is defined with a R/W type as argument. Unfortunately this is + often the case. However, make sure to try "const" first, and use + "NO_COPY_RO" as seldom as possible. */ #define NO_COPY_RO __attribute__((nocommon)) __attribute__((section(".rdata_cygwin_nocopy"))) #define NO_COPY __attribute__((nocommon)) __attribute__((section(".data_cygwin_nocopy"))) #define NO_COPY_INIT __attribute__((section(".data_cygwin_nocopy")))
reply other threads:[~2023-01-12 9:52 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=20230112095257.4F3A93858C74@sourceware.org \ --to=corinna@sourceware.org \ --cc=cygwin-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).