This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: fixinc help with Solaris 9?
- From: Bruce Korb <bkorb at pacbell dot net>
- To: rittle at labs dot mot dot com
- Cc: pfeifer at dbai dot tuwien dot ac dot at, libstdc++ at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Tue, 15 Oct 2002 15:50:27 -0700
- Subject: Re: fixinc help with Solaris 9?
- References: <Pine.BSF.4.44.0210142213110.28509-100000@pulcherrima.dbai.tuwien.ac.at> <3DAB47CE.568B67C8@pacbell.net> <200210152225.g9FMP3AF089768@latour.rsch.comm.mot.com>
Loren James Rittle wrote:
> My only opinion having battled it without success: Have one fixinc fix
> per Sun-released version of the pthread.h header. Guard each fix on
> the exact RCS/SCCS ID of the file. The sad fact is that Sun has
> changed that file every release of Solaris since 2.5 in a way that has
> required a subtly different fix...
Yes. It might be reasonable to do a C-fix-text, a la:
#ifndef __sun
return SKIP_FIX
#else
pz = strstr( pzText, "@(#)pthread.h" );
if (pz == NULL)
return SKIP_FIX;
return (<can we verify that it is a version we know about?>)
? APPLY_FIX : SKIP_FIX;
#endif
and then something similar with the c-fix itself.
> The other observation: Why the heck is gcc even warning/erroring on
> such an issue appearing in a *system* header?
That would be easier for fixinc, but likely more work overall??
> However, I will write a new fixinc fix for 2.9 based on the above
> guidelines, if you can send me the exact context diff that you create
> by hand to remove all warnings.
Either you or I could do it. But first, from someone, for
each valid combination of "#pragma ident"s from /usr/include/pthread.h
and /usr/include/sys/synch.h, we need a context/unified diff
between the vendor supplied macro and a macro that works.
Almost certainly this new macro is going to have to depend
upon the structure of pad64_t (however that was spelled.)
> and mail it to me along with the exact RCS/SCCS ID. For example,
> from Bruce's e-mail, it looks like it should be:
> #pragma ident "@(#)pthread.h 1.32 01/11/10 SMI"
>
> I will then mail back a patch for you to test in context.
>
> To avoid all frustration, I will not attempt to fix this more
> generally. I think I have written enough on why this is almost
> impossible given Sun's evolution of that file.
Sounds right to me.