+2004-01-23 Tor Lillqvist <tml@iki.fi>
+
+ * glib/grand.c: Don't include <unistd.h> unless
+ HAVE_UNISTD_H. Include <process.h> on G_OS_WIN32.
+ (g_rand_new): Use getppid() only on G_OS_UNIX.
+
Thu Jan 22 15:16:11 2004 Owen Taylor <otaylor@redhat.com>
* === Released 2.3.2 ===
* configure.in: Don't blindly set glib_cv_long_long_format to
"ll" when using the included printf. As long as the native
printf supports 64bit printing, use the native format.
- (#119525, Tor Lillquist)
+ (#119525, Tor Lillqvist)
Fri Nov 14 00:28:46 2003 Matthias Clasen <maclas@gmx.de>
+2004-01-23 Tor Lillqvist <tml@iki.fi>
+
+ * glib/grand.c: Don't include <unistd.h> unless
+ HAVE_UNISTD_H. Include <process.h> on G_OS_WIN32.
+ (g_rand_new): Use getppid() only on G_OS_UNIX.
+
Thu Jan 22 15:16:11 2004 Owen Taylor <otaylor@redhat.com>
* === Released 2.3.2 ===
* configure.in: Don't blindly set glib_cv_long_long_format to
"ll" when using the included printf. As long as the native
printf supports 64bit printing, use the native format.
- (#119525, Tor Lillquist)
+ (#119525, Tor Lillqvist)
Fri Nov 14 00:28:46 2003 Matthias Clasen <maclas@gmx.de>
+2004-01-23 Tor Lillqvist <tml@iki.fi>
+
+ * glib/grand.c: Don't include <unistd.h> unless
+ HAVE_UNISTD_H. Include <process.h> on G_OS_WIN32.
+ (g_rand_new): Use getppid() only on G_OS_UNIX.
+
Thu Jan 22 15:16:11 2004 Owen Taylor <otaylor@redhat.com>
* === Released 2.3.2 ===
* configure.in: Don't blindly set glib_cv_long_long_format to
"ll" when using the included printf. As long as the native
printf supports 64bit printing, use the native format.
- (#119525, Tor Lillquist)
+ (#119525, Tor Lillqvist)
Fri Nov 14 00:28:46 2003 Matthias Clasen <maclas@gmx.de>
+2004-01-23 Tor Lillqvist <tml@iki.fi>
+
+ * glib/grand.c: Don't include <unistd.h> unless
+ HAVE_UNISTD_H. Include <process.h> on G_OS_WIN32.
+ (g_rand_new): Use getppid() only on G_OS_UNIX.
+
Thu Jan 22 15:16:11 2004 Owen Taylor <otaylor@redhat.com>
* === Released 2.3.2 ===
* configure.in: Don't blindly set glib_cv_long_long_format to
"ll" when using the included printf. As long as the native
printf supports 64bit printing, use the native format.
- (#119525, Tor Lillquist)
+ (#119525, Tor Lillqvist)
Fri Nov 14 00:28:46 2003 Matthias Clasen <maclas@gmx.de>
+2004-01-23 Tor Lillqvist <tml@iki.fi>
+
+ * glib/grand.c: Don't include <unistd.h> unless
+ HAVE_UNISTD_H. Include <process.h> on G_OS_WIN32.
+ (g_rand_new): Use getppid() only on G_OS_UNIX.
+
Thu Jan 22 15:16:11 2004 Owen Taylor <otaylor@redhat.com>
* === Released 2.3.2 ===
* configure.in: Don't blindly set glib_cv_long_long_format to
"ll" when using the included printf. As long as the native
printf supports 64bit printing, use the native format.
- (#119525, Tor Lillquist)
+ (#119525, Tor Lillqvist)
Fri Nov 14 00:28:46 2003 Matthias Clasen <maclas@gmx.de>
+2004-01-23 Tor Lillqvist <tml@iki.fi>
+
+ * glib/grand.c: Don't include <unistd.h> unless
+ HAVE_UNISTD_H. Include <process.h> on G_OS_WIN32.
+ (g_rand_new): Use getppid() only on G_OS_UNIX.
+
Thu Jan 22 15:16:11 2004 Owen Taylor <otaylor@redhat.com>
* === Released 2.3.2 ===
* configure.in: Don't blindly set glib_cv_long_long_format to
"ll" when using the included printf. As long as the native
printf supports 64bit printing, use the native format.
- (#119525, Tor Lillquist)
+ (#119525, Tor Lillqvist)
Fri Nov 14 00:28:46 2003 Matthias Clasen <maclas@gmx.de>
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
#include "glib.h"
#include "gthreadinit.h"
+#ifdef G_OS_WIN32
+#include <process.h> /* For getpid() */
+#endif
+
G_LOCK_DEFINE_STATIC (global_random);
static GRand* global_random = NULL;
seed[0] = now.tv_sec;
seed[1] = now.tv_usec;
seed[2] = getpid ();
+#ifdef G_OS_UNIX
seed[3] = getppid ();
+#else
+ seed[3] = 0;
+#endif
}
return g_rand_new_with_seed_array (seed, 4);