guile-commits
[Top][All Lists]
Advanced

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

[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.7-114-geaf21


From: Andy Wingo
Subject: [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.7-114-geaf2153
Date: Sun, 24 Feb 2013 11:54:51 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".

http://git.savannah.gnu.org/cgit/guile.git/commit/?id=eaf21539d4afb8df5d1b549215fd397b23004947

The branch, stable-2.0 has been updated
       via  eaf21539d4afb8df5d1b549215fd397b23004947 (commit)
      from  99d1843e2a06f422cbe349804a67d2972c4dedd9 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit eaf21539d4afb8df5d1b549215fd397b23004947
Author: Andy Wingo <address@hidden>
Date:   Sun Feb 24 12:46:48 2013 +0100

    random_state_of_last_resort doesn't rely on HAVE_POSIX
    
    * libguile/random.c (random_state_of_last_resort): Add the PID as a seed
      only if we have scm_getpid().

-----------------------------------------------------------------------

Summary of changes:
 libguile/random.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/libguile/random.c b/libguile/random.c
index 2db19f7..a85ee81 100644
--- a/libguile/random.c
+++ b/libguile/random.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999,2000,2001, 2003, 2005, 2006, 2009, 2010 Free Software 
Foundation, Inc.
+/* Copyright (C) 1999,2000,2001, 2003, 2005, 2006, 2009, 2010, 2013 Free 
Software Foundation, Inc.
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public License
  * as published by the Free Software Foundation; either version 3 of
@@ -665,15 +665,18 @@ random_state_of_last_resort (void)
   SCM time_of_day = scm_gettimeofday ();
   SCM sources = scm_list_n
     (scm_from_unsigned_integer (SCM_UNPACK (time_of_day)),  /* heap addr */
-     scm_getpid (),         /* process ID */
      scm_get_internal_real_time (), /* high-resolution process timer */
      scm_from_unsigned_integer ((scm_t_bits) &time_of_day), /* stack addr */
      scm_car (time_of_day), /* seconds since midnight 1970-01-01 UTC */
      scm_cdr (time_of_day), /* microsecond component of the above clock */
      SCM_UNDEFINED);
+  SCM seed = SCM_INUM0;
+
+#ifdef HAVE_POSIX
+  sources = scm_cons (scm_getpid (), sources); /* process ID */
+#endif
 
   /* Concatenate the sources bitwise to form the seed */
-  SCM seed = SCM_INUM0;
   while (scm_is_pair (sources))
     {
       seed = scm_logxor (seed, scm_ash (scm_car (sources),


hooks/post-receive
-- 
GNU Guile



reply via email to

[Prev in Thread] Current Thread [Next in Thread]