This is the mail archive of the
mailing list for the newlib project.
Re: Patch - Add restrict to time.h
- From: Craig Howland <howland at LGSInnovations dot com>
- To: "newlib at sourceware dot org" <newlib at sourceware dot org>
- Date: Mon, 25 Nov 2013 12:19:23 -0500
- Subject: Re: Patch - Add restrict to time.h
- Authentication-results: sourceware.org; auth=none
- References: <52923B56 dot 8060408 at oarcorp dot com> <3862C5643B15B6468269546753EB2A92096B9C07 at BLTSXVS01 dot govsolutions dot com> <52937EC5 dot 5010503 at oarcorp dot com>
On 11/25/2013 11:45 AM, Joel Sherrill wrote:
On 11/25/2013 10:41 AM, Howland Craig D (Craig) wrote:
* libc/time/strftime.c (strftime): Same.
- size_t strftime(char *<[s]>, size_t <[maxsize]>,
- const char *<[format]>, const struct tm
+ size_t strftime(char *restrict<[s]>, size_t <[maxsize]>,
+ const char *restrict<[format]>,
+ const struct tm *restrict<[timp]>);
The strftime patch for the man page is missing spaces between restrict
and the respective pointers, which will make it very hard to read.
So change "restrict<[s]>" to "restrict <[s]>"?
Yes, iconv.c also needs to be tweaked (I missed that one earlier). (The
"<[string]>" construct ends up making "string" bold in the PDF version of the
manual, but no other alteration. So, for example, "char *restrict<[s]>,"
becomes "char *restricts," instead of the desired "char *restrict s,".)
If that's the pattern, grep says iconv.c also needs fixing.
If you can confirm that, I will fix those instances.