This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Add restrict keyword to sys/stat.h


On 11/21/2013 8:55 AM, Gedare Bloom wrote:
> Joel,
> There is a stray "+" in front of "int stat". With the + from the diff
> format it looks like "++" operator. hence the joke. The stray "+"
> should be removed.

It isn't in the file. I think it is an artifact of the file
being in DOS format.

I would LOVE to convert them to UNIX format. <hint> :)

--joel


> -Gedare
> 
> On Thu, Nov 21, 2013 at 9:53 AM, Joel Sherrill
> <joel.sherrill@oarcorp.com> wrote:
>> On 11/21/2013 8:43 AM, Peter Rosin wrote:
>>> On 2013-11-21 15:32, Joel Sherrill wrote:
>>>> --- newlib/libc/sys/rdos/stat.c      31 Jan 2006 19:33:56 -0000      1.1
>>>> +++ newlib/libc/sys/rdos/stat.c      21 Nov 2013 14:30:26 -0000
>>>> @@ -5,7 +5,7 @@
>>>>  #include <sys/stat.h>
>>>>  #include <errno.h>
>>>>
>>>> -int stat(const char *file, struct stat *st)
>>>> ++int stat(const char *__restrict file, struct stat *__restrict st)
>>>>  {
>>>>    errno = ENOSYS;
>>>>    return -1;
>>>
>>> Errm, this is C, right? Not C++ or something? :-)
>>
>> What do you mean? The restrict keyword is part of C99.
>> __restrict is the magic to make it disappear in C89 and K&R
>> while being restrict in C99 mode.
>>
>>> Cheers,
>>> Peter
>>>
>>
>>
>>
>> --
>> Joel Sherrill, Ph.D.             Director of Research & Development
>> joel.sherrill@OARcorp.com        On-Line Applications Research
>> Ask me about RTEMS: a free RTOS  Huntsville AL 35805
>> Support Available                (256) 722-9985



-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel.sherrill@OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
Support Available                (256) 722-9985


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]