summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--compat/mkstemp.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 58cdc2f..a3de07b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-07-09 Donal K. Fellows <dkf@users.sf.net>
+
+ * compat/mkstemp.c (mkstemp): [Bug 2819227]: Use rand() for random
+ numbers as it is more portable.
+
2009-07-05 Donal K. Fellows <dkf@users.sf.net>
* generic/tclZlib.c (ZlibTransformWatch): Correct the handling of
diff --git a/compat/mkstemp.c b/compat/mkstemp.c
index f86bde2..f396993 100644
--- a/compat/mkstemp.c
+++ b/compat/mkstemp.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: mkstemp.c,v 1.2 2009/05/12 20:26:04 dkf Exp $
+ * RCS: @(#) $Id: mkstemp.c,v 1.3 2009/07/09 22:28:38 dkf Exp $
*/
#include <errno.h>
@@ -64,7 +64,7 @@ mkstemp(
*/
for (b=a ; *b ; b++) {
- float r = random() / ((float) RAND_MAX);
+ float r = rand() / ((float) RAND_MAX);
*b = alphanumerics[(int)(r * alphanumericsLen)];
}