From: Corinna Vinschen <vinschen@redhat.com>
To: newlib@sourceware.org
Subject: Re: Adding POSIX 1003.26 posix_devctl()
Date: Mon, 05 Dec 2016 10:32:00 -0000 [thread overview]
Message-ID: <20161205103212.GA4078@calimero.vinschen.de> (raw)
In-Reply-To: <aa936e52-a14e-f13f-4b1b-e683071ef622@oarcorp.com>
[-- Attachment #1: Type: text/plain, Size: 1646 bytes --]
Hi Joel,
On Dec 1 10:13, Joel Sherrill wrote:
> Hi
>
> I am starting to add posix_devctl() support to RTEMS.
> The POSIX 1003.26 standard defines only this single
> method and the requirements boil down to the following:
>
> The posix_devctl() method is defined by POSIX 1003.26-2003. Aside
> from the single method, it adds the following requirements:
>
> 1. define _POSIX_26_VERSION to 200312L
> 2. add _SC_POSIX_26_VERSION in unistd.h. Return _POSIX_26_VERSION
> 3. application must define _POSIX_26_C_SOURCE to use posix_devctl().
> 4. posix_devctl() is prototyped in <devctl.h>
> 5. provide implementation of posix_devctl().:)
>
> Based on requirements 1,2 and 4, I think the new .h
> file and modifications to existing .h files need to be
> done in newlib.
>
> The implementation would go in RTEMS.
>
> I have attached an initial cut at the patch. I think it
> is close but it is untested.
>
> Comments and thoughts appreciated.
One nit.
> --- a/newlib/libc/include/sys/unistd.h
> +++ b/newlib/libc/include/sys/unistd.h
> @@ -459,6 +459,9 @@ int _EXFUN(unlinkat, (int, const char *, int));
> #define _SC_LEVEL4_CACHE_SIZE 137
> #define _SC_LEVEL4_CACHE_ASSOC 138
> #define _SC_LEVEL4_CACHE_LINESIZE 139
> +#ifdef _POSIX_26_VERSION
> +#define _SC_POSIX_26_VERSION 140
> +#endif
Do not #ifdef this definition. Just define it. It's either supported
by the implementation or not. We shopuld avoid different _SC_ macros
for different targets.
With that, please commit.
Thanks,
Corinna
--
Corinna Vinschen
Cygwin Maintainer
Red Hat
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
prev parent reply other threads:[~2016-12-05 10:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-01 16:13 Joel Sherrill
2016-12-05 10:32 ` Corinna Vinschen [this message]
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=20161205103212.GA4078@calimero.vinschen.de \
--to=vinschen@redhat.com \
--cc=newlib@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: link
Be 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).