This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: 3.1 PATCH: Fix Solaris 2.5.1 <widec.h> to avoid bootstrap failure
- From: Bruce Korb <bkorb at pacbell dot net>
- To: Rainer Orth <ro at TechFak dot Uni-Bielefeld dot DE>
- Cc: gcc-patches at gcc dot gnu dot org, Bruce Korb <bkorb at gnu dot org>, libstdc++ at gcc dot gnu dot org,Mark Mitchell <mark at codesourcery dot com>
- Date: Fri, 26 Apr 2002 21:39:20 -0700
- Subject: Re: 3.1 PATCH: Fix Solaris 2.5.1 <widec.h> to avoid bootstrap failure
- Organization: Home
- References: <15562.2299.470938.584607@xayide.TechFak.Uni-Bielefeld.DE>
Rainer Orth wrote:
> Manually rebuilding stmp-fixinc had the
> desired effect on widec.h, and the libstdc++-v3 bootstrap continued. I
> couldn't run make check in fixinc since autogen complained:
>
> ERROR: Unbound variable: set-writable
> AutoGen ABENDED in template
> /vol/gnu/src/gcc/gcc-3.1-branch-dist/gcc/fixinc/check.tpl line 174
http://www.gnu.org/manual/autogen-5.3.6/html_node/autogen_62.html#SEC62
I guess I should put some version checking in the template.
I forget how long ago I put "set-writable" into the product.
Been a while, though. Sorry about that.
> A fresh bootstrap on sparc-sun-solaris2.5.1 is now in progress, ok for
> branch and mainline provided this finishes without regressions?
Just a couple tiny nits:
> Sat Apr 27 03:24:56 2002 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
>
> * fixinc/inclhack.def (solaris_widec): Include <wchar.h> in
> Solaris 2 <widec.h> if missing.
> * fixinc/fixincl.x: Regenerate.
> * fixinc/tests/base/widec.h: New file.
>
> Index: inclhack.def
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/fixinc/inclhack.def,v
> retrieving revision 1.120.2.5
> diff -u -p -r1.120.2.5 inclhack.def
> --- inclhack.def 2 Apr 2002 18:23:17 -0000 1.120.2.5
> +++ inclhack.def 27 Apr 2002 01:54:33 -0000
> @@ -2093,6 +2093,23 @@ fix = {
> };
>
> /*
> + * <widec.h> until Solaris 2.5.1 defines macros for a couple of <wchar.h>
> + * functions, breaking their prototypes if that file is included afterwards.
> + * Include <wchar.h> early to avoid this issue, as is done on Solaris 2.6
> + * and up.
> + */
> +fix = {
> + hackname = solaris_widec;
> + files = widec.h;
> + mach = '*-*-solaris*';
> + bypass = "wchar.h";
This will match "wcharXh" anywhere in the file, but that is probably adequate.
> + select = "#include <euc.h>";
> + c_fix = format;
> + c_fix_arg = "%0\n#include <wchar.h>";
> + test_text = "#include <euc.h>";
> +};
> +
> +/*
> * Sony NEWSOS 5.0 does not support the complete ANSI C standard.
> */
> #ifdef SONY
> Index: tests/base/widec.h
> ===================================================================
> RCS file: tests/base/widec.h
> diff -N tests/base/widec.h
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ tests/base/widec.h 27 Apr 2002 01:54:33 -0000
> @@ -0,0 +1,12 @@
> +/* DO NOT EDIT THIS FILE.
> +
> + It has been auto-edited by fixincludes from:
> +
> + "fixinc/tests/inc/widec.h"
> +
> + This had to be done to correct non-standard usages in the
> + original, manufacturer supplied header file. */
> +
> +#if defined( SOLARIS_WIDEC_CHECK )
> +#include <euc.h>
> +#endif /* SOLARIS_WIDEC_CHECK */
This file is to be a copy of the patched result.
The patched result includes the line:
#include <wchar.h>
but you will see that when you run make check :-)
Cheers,
Bruce