This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v4 08/11] nds32: Linux ABI
On Fri, Jun 07, 2019 at 06:45:13AM +0800, Joseph Myers wrote:
> On Wed, 5 Jun 2019, Vincent Chen wrote:
>
> > +int __ioctl (int __fd, unsigned long int __request, ...)
> > +{
> > + unsigned long arg1;
>
> Example coding style issue, indentation should be two columns not eight
> (tabs are always eight columns in glibc sources), as well as the
> previously noted issue of function name starting a new line.
>
> > + return INLINE_SYSCALL(ioctl,3,__fd,__request,arg1);
>
> Example coding style issue, missing spaces after ','.
>
> > +int __prctl (int __option, ...)
> > +{
> > + unsigned long arg1,arg2,arg3,arg4;
> > + va_list arg;
> > + va_start (arg, __option);
> > + arg1 = va_arg (arg, unsigned long);
> > + arg2 = va_arg (arg, unsigned long);
> > + arg3 = va_arg (arg, unsigned long);
> > + arg4 = va_arg (arg, unsigned long);
>
> Example coding style issue, should be "unsigned long int".
>
> > +#ifdef __USE_MISC
> > +# define __ctx(fld) fld
> > +#else
> > +# define __ctx(fld) __ ## fld
> > +#endif
>
> __ctx is only expected to be used for old ports where there might be
> existing code relying on the old names and we want as much API
> compatibility as possible. For new ports, just use the __* names in this
> header unconditionally rather than having such a macro at all.
>
OK, I got it. I will remove __ctx macro and replace __ctx with prifix __.
Also, I will fix the above codeing style issues in the next submission.
Thanks,
Vincent
> --
> Joseph S. Myers
> joseph@codesourcery.com