summaryrefslogtreecommitdiff
path: root/ext/standard/basic_functions.h
diff options
context:
space:
mode:
authorSterling Hughes <sterling@php.net>2001-10-07 11:52:09 +0000
committerSterling Hughes <sterling@php.net>2001-10-07 11:52:09 +0000
commit3a50a0322fbea3ebaf795cd730e1e6cc6798d72b (patch)
tree3f2885000dc11e26d2c5b330a19bfa9d9c08399d /ext/standard/basic_functions.h
parentbf59a8db85a6151165f16480c8fe03761226084a (diff)
downloadphp-git-3a50a0322fbea3ebaf795cd730e1e6cc6798d72b.tar.gz
@ Have rand() and mt_rand() seed automatically if srand() or mt_srand() has
@ not been called. (Sterling)
Diffstat (limited to 'ext/standard/basic_functions.h')
-rw-r--r--ext/standard/basic_functions.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/standard/basic_functions.h b/ext/standard/basic_functions.h
index 89bfe7af4e..27d9cf472c 100644
--- a/ext/standard/basic_functions.h
+++ b/ext/standard/basic_functions.h
@@ -174,7 +174,10 @@ typedef struct {
php_uint32 *next; /* next random value is computed from here */
int left; /* can *next++ this many times before reloading */
- unsigned int rand_seed; /* Seed for rand() */
+ unsigned int rand_seed; /* Seed for rand(), in ts version */
+
+ zend_bool rand_is_seeded; /* Whether rand() has been seeded */
+ zend_bool mt_rand_is_seeded; /* Whether mt_rand() has been seeded */
/* syslog.c */
int syslog_started;