This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: fixinc help with Solaris 9?
- From: Gerald Pfeifer <pfeifer at dbai dot tuwien dot ac dot at>
- To: rittle at labs dot mot dot com
- Cc: bkorb at pacbell dot net, <libstdc++ at gcc dot gnu dot org>, <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 24 Oct 2002 00:25:25 +0200 (CEST)
- Subject: Re: fixinc help with Solaris 9?
On Tue, 15 Oct 2002, Loren James Rittle wrote:
> 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...
Having studied this (and related) header(s) a bit now, I have to agree
that this is a mess. :-(
> 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...
I will do that, especially as the warning I have been reporting now only
occurs on the 3.2-branch, but not on mainline. Perhaps they addressed that
there already?
> 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 [...] 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"
Yes, that's right:
#pragma ident "@(#)pthread.h 1.32 01/11/10 SMI"
And the diff is at the end of this message. (BTW, in case this is of
interest to someone here, the root of the problems is the following in
sys/types.h:
#if __STDC__ - 0 == 0 && !defined(_NO_LONGLONG)
typedef int64_t pad64_t;
typedef uint64_t upad64_t;
#else
typedef union {
double _d;
int32_t _l[2];
} pad64_t;
typedef union {
double _d;
uint32_t _l[2];
} upad64_t;
#endif
Weird, isn't it?)
> I will then mail back a patch for you to test in context.
Thanks a lot!
Gerald
--- /usr/include/pthread.h Sat Apr 6 21:12:32 2002
+++ /files/pfeifer/gcc-3.2.1/lib/gcc-lib/sparc-sun-solaris2.9/3.2.1/include/pthread.h Thu Oct 24 00:17:55 2002
@@ -81,9 +81,9 @@
* of the corresponding types in sys/types.h (e.g. PTHREAD_MUTEX_INITIALIZER
* should be consistent with the definition for pthread_mutex_t).
*/
#define PTHREAD_MUTEX_INITIALIZER /* = DEFAULTMUTEX */ \
- {{0, 0, 0, DEFAULT_TYPE, _MUTEX_MAGIC}, {{{0}}}, 0}
+ {{0, 0, 0, DEFAULT_TYPE, _MUTEX_MAGIC}, {{{0}}}, {0}}
#define PTHREAD_COND_INITIALIZER /* = DEFAULTCV */ \
{{{0, 0, 0, 0}, DEFAULT_TYPE, _COND_MAGIC}, 0}