gthread/testgthread.c matters with HPUX10.20



Hi,

glib-1.2.7/1.2.8 can't compile with '--enable-thread' option and GNU/pth
on HPUX10.20,because HPUX10.20's rand_r needs two arguments.
So,I changed gthread/testgthread.c like following;

--- testgthread.c.bak   Thu May 25 14:02:16 2000
+++ testgthread.c       Thu May 25 14:02:16 2000
@@ -166,7 +166,11 @@
   while (i < TEST_PRIVATE_ROUNDS)
     {
 #ifdef HAVE_RAND_R
-      guint random_value = rand_r (&seed) % 10000;
+#     ifdef _HPUX_SOURCE
+        guint random_value = rand() % 10000;
+#     else
+        guint random_value = rand_r (&seed) % 10000;
+#     endif
 #else
       guint random_value = rand() % 10000;
 #endif

It compiles fine.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]