fixinc help with Solaris 9?

Loren James Rittle
Tue Oct 15 15:25:00 GMT 2002

>> To satisfy Bruce, I think you will want to update the
>> hack without adding a new hack.

> Bruce will be readily satisfied with anything that works.
> Bruce has preferences, but the crucial bottom line is that
> it has to work.  I'm sorry, Loren, if you felt put off.

No; at least, not anymore; and never really by you, Bruce.  In my
memory, we resolved that issue a year ago.  I was more put off by the
process and my inability to produce a patch. ;-)

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...

The other observation: Why the heck is gcc even warning/erroring on
such an issue appearing in a *system* header?  Because the macro,
defined in a system header, is expanded inside a user source file not
a system header.  Perhaps you, Gerald, could ask the preprocessor guys
to enhance their handling of ignoring warnings about constructs
defined in macros in system headers but expanded in another context...

Sorry, Gerald, I do not have the resources to test/create
per-Solaris-release bug fixes to gcc and/or their system headers
anymore; I only have access to Solaris 2.7.

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.  E.g. copy /usr/include/pthread.h to

(If fixinc already staged a copy, then please skip this first step.)

Edit the staged file until it works for you against the installed gcc then:

diff -c /usr/include/pthread.h $prefix/lib/gcc-lib/sparc-sun-solaris<solaris-version>/<gcc-version>/include/pthread.h

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.


More information about the Libstdc++ mailing list