diff mbox

[fixincludes] Fix PR 48009 53348

Message ID CAGWvnynpG4AepA+GH-E4Hr9g0keSz2PPfwP9yf4o+cAjN-K47g@mail.gmail.com
State New
Headers show

Commit Message

David Edelsohn Feb. 15, 2015, 8:49 p.m. UTC
The stdlib.h header in AIX 4.3 does not correctly declare strtof with
a const char* argument.  Users are building the latest releases of GCC
on AIX 4.3  The appended patch from Richard G Daniel uses fixincludes
to correct the declaration.

Okay?

Thanks, David

        PR bootstrap/48009
        PR bootstrap/53348
        * inclhack.def (aix_strtof_const): New fix.
        * fixincl.x: Regenerate.
        * tests/base/inttypes.h: New test.

  */

Comments

Bruce Korb Feb. 15, 2015, 9:52 p.m. UTC | #1
Looks good to me.

On Sun, Feb 15, 2015 at 12:49 PM, David Edelsohn <dje.gcc@gmail.com> wrote:
> The stdlib.h header in AIX 4.3 does not correctly declare strtof with
> a const char* argument.  Users are building the latest releases of GCC
> on AIX 4.3  The appended patch from Richard G Daniel uses fixincludes
> to correct the declaration.
>
> Okay?
>
> Thanks, David
>
>         PR bootstrap/48009
>         PR bootstrap/53348
>         * inclhack.def (aix_strtof_const): New fix.
>         * fixincl.x: Regenerate.
>         * tests/base/inttypes.h: New test.
>
> Index: inclhack.def
> ===================================================================
> --- inclhack.def        (revision 220717)
> +++ inclhack.def        (working copy)
> @@ -842,6 +842,18 @@
>  };
>
>  /*
> + * stdlib.h on AIX 4.3 declares strtof() with a non-const first argument.
> + */
> +fix = {
> +    hackname  = aix_strtof_const;
> +    files     = stdlib.h;
> +    select    = "((extern[ \t]+)?float[ \t]+strtof)\\(char \\*, char \\*\\*\\);
> ";
> +    c_fix     = format;
> +    c_fix_arg = "%1(const char *, char **);";
> +    test_text = "extern float    strtof(char *, char **);";
> +};
> +
> +/*
>   *  sys/machine.h on AIX 4.3.3 puts whitespace between a \ and a newline
>   *  in an otherwise harmless (and #ifed out) macro definition
>   */
diff mbox

Patch

Index: inclhack.def
===================================================================
--- inclhack.def        (revision 220717)
+++ inclhack.def        (working copy)
@@ -842,6 +842,18 @@ 
 };

 /*
+ * stdlib.h on AIX 4.3 declares strtof() with a non-const first argument.
+ */
+fix = {
+    hackname  = aix_strtof_const;
+    files     = stdlib.h;
+    select    = "((extern[ \t]+)?float[ \t]+strtof)\\(char \\*, char \\*\\*\\);
";
+    c_fix     = format;
+    c_fix_arg = "%1(const char *, char **);";
+    test_text = "extern float    strtof(char *, char **);";
+};
+
+/*
  *  sys/machine.h on AIX 4.3.3 puts whitespace between a \ and a newline
  *  in an otherwise harmless (and #ifed out) macro definition