Re: [PATCH] Decouple build from userspace headers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jul 14, 2021 at 03:22:08PM +0100, Christoph Hellwig wrote:
> > -#define signals_blocked false
> > +#define signals_blocked 0
> 
> Why can't we get at the kernel definition of false here?

Variable and other code surrounding this wants "int".
I don't really want to expand into bool conversion.

> > new file mode 100644
> > --- /dev/null
> > +++ b/include/stdarg.h
> > @@ -0,0 +1,9 @@
> > +#ifndef _LINUX_STDARG_H
> > +#define _LINUX_STDARG_H
> > +typedef __builtin_va_list __gnuc_va_list;
> > +typedef __builtin_va_list va_list;
> > +#define va_start(v, l)	__builtin_va_start(v, l)
> > +#define va_end(v)	__builtin_va_end(v)
> > +#define va_arg(v, T)	__builtin_va_arg(v, T)
> > +#define va_copy(d, s)	__builtin_va_copy(d, s)
> > +#endif
> 
> Empty lines before and after the include guards would be nice.
> 
> What do we need the __gnuc_va_list typedef for?

That's because without __gnuc_va_list something didn't compile.
I'm preparing second version with <linux/stdarg.h> where __gnuc_va_list is
unnecessary indeed.

> Otherwise this looks great.  As a follow on maybe move the new header
> to <linux/stdarg.h> to make clear to everyone that we are using our
> own version.



[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux