Patch - Add restrict to time.h

Corinna Vinschen vinschen@redhat.com
Mon Nov 25 14:13:00 GMT 2013


On Nov 25 07:41, Joel Sherrill wrote:
> On 11/25/2013 5:20 AM, Corinna Vinschen wrote:
> > On Nov 25 11:46, Corinna Vinschen wrote:
> >> On Nov 24 11:45, Joel Sherrill wrote:
> >>> Hi
> >>> 
> >>> This should be the next to the last patch in the Google Code-In
> >>> add restrict keyword series. wchar.h should be the last.
> >>> 
> >>> This patch has one oddity -- strftime and wcsftime are built 
> >>> from the same source as best I can tell. And there are multiple
> >>> versions of them in the same file to support different build
> >>> options.
> >>> 
> >>> Please review this one a little closer than the others.
> >> 
> >> I did and it looks good to me.  There are only two functions, 
> >> strftime and wcsftime, and two variations, with and without C99 
> >> extensions, to get either completeness or smaller codesize.
> >> This does not affect the definition of the entry points.
> >> 
> >> Please apply.
> > 
> > It looks like your patches miss a few restricts in the header 
> > files.  I was just having another look and I found at least
> > ctime_r im time.h and
> 
> Where do you see restrict on ctime_r()? It isn't in POSIX 2013.
> 
> http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/time.h.html
> 
> > renameat in stdio.h.  Yes, the latter is Cygwin-only, but that 
> > doesn't mean we should leave them out, does it?  Would you mind to 
> > have another sweep at this to pick up the missed ones?
> 
> renameat() also does not have restrict in POSIX 2013.
> 
> http://pubs.opengroup.org/onlinepubs/9699919799/functions/rename.html
> 
> I am happy to fix mistakes but these follow POSIX.

Yes, you're right.  I was sure that I saw them with restrict this
morning, but now that I'm looking again they are both clearly not
defined this way...  *headscratch*


Pardon the false alarm,
Corinna


-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/newlib/attachments/20131125/cdc46255/attachment.sig>


More information about the Newlib mailing list