@@ -3307,6 +3307,26 @@
/*
+ * Solaris 8 PTHREAD_COND_INITIALIZER lacks the __pthread_cond_magic field.
+ * COND_MAGIC is only defined in <synch.h> and pollutes the namespace, so
+ * use the value literally instead.
+ */
+fix = {
+ hackname = solaris_cond_init;
+ select = '@\(#\)pthread.h' "[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI";
+ files = pthread.h;
+ mach = '*-*-solaris2.8';
+ c_fix = format;
+ c_fix_arg = "%1, 0x4356%2";
+ c_fix_arg = "^(#define[ \t]+PTHREAD_COND_INITIALIZER[ \t]+"
+ "\\{.*0)(\\},[ \t]*0\\}.*)$";
+ test_text =
+ '#pragma ident "@(#)pthread.h 1.29 01/07/07 SMI"'"\n"
+ '#define PTHREAD_COND_INITIALIZER {{{0}, 0}, 0} /* = DEFAULTCV */';
+};
+
+
+/*
* Sun Solaris 10 defines several C99 math macros in terms of
* builtins specific to the Studio compiler, in particular not
* compatible with the GNU compiler.
@@ -101,6 +101,16 @@
#endif /* PTHREAD_INCOMPLETE_STRUCT_ARGUMENT_CHECK */
+#if defined( SOLARIS_COND_INIT_CHECK )
+#pragma ident "@(#)pthread.h 1.29 01/07/07 SMI"
+#if __STDC__ - 0 == 0 && !defined(_NO_LONGLONG)
+#define PTHREAD_COND_INITIALIZER {{{0}, 0, 0x4356}, 0} /* = DEFAULTCV */
+#else
+#define PTHREAD_COND_INITIALIZER {{{0}, 0, 0x4356}, {0}} /* = DEFAULTCV */
+#endif
+#endif /* SOLARIS_COND_INIT_CHECK */
+
+
#if defined( SOLARIS_MUTEX_INIT_2_CHECK )
#ident "@(#)pthread.h 1.26 98/04/12 SMI"
#if __STDC__ - 0 == 0 && !defined(_NO_LONGLONG)
@@ -109,9 +119,9 @@
#define PTHREAD_MUTEX_INITIALIZER {{{0},0}, {{{0}}}, {0}}
#endif
#if __STDC__ - 0 == 0 && !defined(_NO_LONGLONG)
-#define PTHREAD_COND_INITIALIZER {{{0}, 0}, 0} /* DEFAULTCV */
+#define PTHREAD_COND_INITIALIZER {{{0}, 0, 0x4356}, 0} /* DEFAULTCV */
#else
-#define PTHREAD_COND_INITIALIZER {{{0}, 0}, {0}} /* DEFAULTCV */
+#define PTHREAD_COND_INITIALIZER {{{0}, 0, 0x4356}, {0}} /* DEFAULTCV */
#endif
#if __STDC__ - 0 == 0 && !defined(_NO_LONGLONG)
#define PTHREAD_MUTEX_INITIALIZER /* = DEFAULTMUTEX */ \