This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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

   #if __STDC__ - 0 == 0 && !defined(_NO_LONGLONG)
  typedef int64_t         pad64_t;
  typedef uint64_t        upad64_t;
  typedef union {
        double   _d;
        int32_t  _l[2];
  } pad64_t;
  typedef union {
        double   _d;
        uint32_t _l[2];
  } upad64_t;

Weird, isn't it?)

> I will then mail back a patch for you to test in context.

Thanks a lot!


--- /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).
-	{{0, 0, 0, DEFAULT_TYPE, _MUTEX_MAGIC}, {{{0}}}, 0}
+	{{0, 0, 0, DEFAULT_TYPE, _MUTEX_MAGIC}, {{{0}}}, {0}}

 	{{{0, 0, 0, 0}, DEFAULT_TYPE, _COND_MAGIC}, 0}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]