lkml.org 
[lkml]   [2021]   [Jul]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] Decouple build from userspace headers
    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.

    \
     
     \ /
      Last update: 2021-07-14 17:55    [W:3.146 / U:0.532 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site