Looks good to me.

On Thu, Dec 5, 2013 at 2:18 AM, Richard Biener <rguent...@suse.de> wrote:
>
> This fixes the issue in linux/vt.h that appears in SUSE SLE11 kernel
> headers which contain a pre-release variant that is broken and not
> compatible with C++ (using the 'new' keyword).
>
> The following fix simply replaces that (and only that) field with
> 'newev', the upstream choice.
>
> fixinclude-tested and also built libsanitizer on a broken system.
>
> Ok for trunk?
>
> Thanks,
> Richard.
>
> 2013-12-05  Richard Biener  <rguent...@suse.de>
>
>         fixincludes/
>         * inclhack.def (suse_linux_vt_cxx): New fix for linux/vt.h
>         being not compatible with C++.
>
>         * tests/base/linux/vt.h: New test.
>
> Index: fixincludes/inclhack.def
> ===================================================================
> *** fixincludes/inclhack.def    (revision 205695)
> --- fixincludes/inclhack.def    (working copy)
> *************** fix = {
> *** 4828,4831 ****
> --- 4828,4845 ----
>       test_text = "#define __builtin_warning(x, y...) (1)";
>   };
>
> + /*
> +  *  Linux kernel's vt.h breaks C++
> +  */
> + fix = {
> +     hackname  = suse_linux_vt_cxx;
> +     files     = linux/vt.h;
> +
> +     select    = "^[ \t]*unsigned int new;";
> +     c_fix     = format;
> +     c_fix_arg = "unsigned int newev;";
> +
> +     test_text = "        unsigned int new;               /* New console (if 
> changing) */";
> + };
> +
>   /*EOF*/
> Index: fixincludes/tests/base/linux/vt.h
> ===================================================================
> *** fixincludes/tests/base/linux/vt.h   (revision 0)
> --- fixincludes/tests/base/linux/vt.h   (working copy)
> ***************
> *** 0 ****
> --- 1,14 ----
> + /*  DO NOT EDIT THIS FILE.
> +
> +     It has been auto-edited by fixincludes from:
> +
> +       "fixinc/tests/inc/linux/vt.h"
> +
> +     This had to be done to correct non-standard usages in the
> +     original, manufacturer supplied header file.  */
> +
> +
> +
> + #if defined( SUSE_LINUX_VT_CXX_CHECK )
> + unsigned int newev;               /* New console (if changing) */
> + #endif  /* SUSE_LINUX_VT_CXX_CHECK */

Reply via email to