Commit Graph

68 Commits

Author SHA1 Message Date
foobar
e0782e2519 - Moved php_srand() call into php_rand().
# Makes shuffle() and str_shuffle() to be random without having to
# call srand() in scripts.
# They don't internally call php_srand() at all and it would be silly
# to start adding php_srand() calls all over the place..
2004-01-19 03:14:58 +00:00
Andi Gutmans
dbeb4158d2 - A belated happy holidays and PHP 5 2004-01-08 08:18:22 +00:00
Ilia Alshanetsky
d2b89ae32b Revert proto 'fix'. 2004-01-06 15:45:52 +00:00
Ilia Alshanetsky
10889a3084 Proto fixes. 2004-01-06 03:55:57 +00:00
foobar
9a2a0aa5e1 - Fixed bug #25007 (rand() & mt_rand() seed RNG every call).
# Also cleaned up the code a bit with this fix.
2003-08-11 00:42:29 +00:00
James Cox
f68c7ff249 updating license information in the headers. 2003-06-10 20:04:29 +00:00
Zeev Suraski
4934744b93 Win32 build improvements 2003-02-17 13:29:59 +00:00
Sebastian Bergmann
b506f5c8f8 Bump year. 2002-12-31 16:08:15 +00:00
Anantha Kesari H Y
338332c799 NetWare related changes/modifications 2002-09-06 07:44:30 +00:00
Andrei Zmievski
5f3a9ebf13 Make RAND_RANGE() an API macro. 2002-06-09 04:26:36 +00:00
Sebastian Bergmann
90613d2282 Maintain headers. 2002-02-28 08:29:35 +00:00
Sebastian Bergmann
38933514e1 Update headers. 2001-12-11 15:32:16 +00:00
Sterling Hughes
3a50a0322f @ Have rand() and mt_rand() seed automatically if srand() or mt_srand() has
@ not been called. (Sterling)
2001-10-07 11:52:09 +00:00
Sterling Hughes
8092460830 hopefully fix win32 compile warnings
# I really wish i had a box to compile php with win32 on
2001-09-18 05:48:49 +00:00
Sterling Hughes
97fea0931c Make rand thread safe when ZTS is defined. 2001-09-16 20:49:57 +00:00
Sterling Hughes
96763e8372 Hopefully fix compile warnings on win32 systems 2001-09-16 17:37:19 +00:00
Sterling Hughes
47f3851a00 for the daft folks that think 0 is a good seed. 2001-09-16 03:50:04 +00:00
Sterling Hughes
373fc12bb1 @ Make the seed options to srand() and mt_srand() optional, if the seed is
@ not specified, the generate the most random seed possible. (Sterling)

Please, if anyone has any comments on the way I generate this seed, speak up!
This seems to be the most "random" seed I could come up with...

This commit is 100% backwards compatible :)

Add myself to the authors list cause of recent work on the file
2001-09-16 03:46:59 +00:00
Derick Rethans
78747bd2df - Don't wrap lines... this is annoying while coding. 2001-09-09 13:29:31 +00:00
Sterling Hughes
6963ac4050 export the mt rand functions... 2001-09-09 10:44:12 +00:00
Sterling Hughes
33fc6e2d5f add missing ) 2001-09-06 07:33:45 +00:00
Sterling Hughes
8a156d9a39 fix ms compile warnings 2001-09-06 06:41:16 +00:00
Sterling Hughes
903c831be5 spaces -> tabs work cont. 2001-09-06 00:40:02 +00:00
Sterling Hughes
a4c905ff16 ws fix 2001-09-06 00:18:13 +00:00
Sterling Hughes
a1b11f0755 Fix ts build
# I've gotta start compiling --enable-experimental-zts...  anyway we can make
# this the default when compiling from cvs?  It'll help a large portion of
# compile issues with patches
2001-09-05 21:46:44 +00:00
Sterling Hughes
e121eaaef5 Straight out da bronx, I be using zend_parse_parameters()
# Word out to my peeps on Connor st.
2001-09-05 21:38:49 +00:00
Sterling Hughes
5ec58914fe stray tabs and spaces 2001-09-05 21:04:30 +00:00
Sterling Hughes
f0c5631778 change range macro semantics
# Kinda torn between the two, thoughts?
2001-09-05 20:59:24 +00:00
Sterling Hughes
d930a72cd7 remove inline 2001-09-05 20:56:15 +00:00
Sterling Hughes
1b0f00d67f a bit of api cleanup... move range stuff into a macro (properly :) 2001-09-05 20:52:45 +00:00
foobar
42b5521af5 revert bad commit. 2001-09-05 19:47:55 +00:00
Daniel Beulshausen
9b8886410d fix zts+win32 build 2001-09-04 02:19:30 +00:00
Derick Rethans
383691eec2 - Fix broken build
#- Please test before commit!
2001-09-03 17:38:10 +00:00
Jeroen van Wolffelaar
efb83df9f9 Kill some warnings/errors (reported by Sebastian, more to come, but
could take some time. Update of ZTS-builderrors is welcome)
2001-09-03 11:57:15 +00:00
Jeroen van Wolffelaar
72c7ae080b Fix SIGSEGV because HAS_SRAND didn't check wether the entry existed at
all
2001-09-03 01:25:24 +00:00
Jeroen van Wolffelaar
92f1248a49 Update credits 2001-09-03 01:09:35 +00:00
Jeroen van Wolffelaar
f7306ce010 Merge RAND_REDESIGN into MAIN 2001-09-03 01:06:23 +00:00
Rasmus Lerdorf
4d11d90880 Track down a few more functions that don't check for 0 args and use
faster mechanism
2001-08-13 07:55:39 +00:00
Zeev Suraski
c0404f4631 Whitespace 2001-08-11 17:03:37 +00:00
Zeev Suraski
d87cc976e1 Redesigned thread safety mechanism - nua nua 2001-07-28 11:36:37 +00:00
Rasmus Lerdorf
81e2cf03ac Fix folding and clean up some extensions 2001-06-06 13:06:12 +00:00
Rasmus Lerdorf
25c3a3a39d vim-6 does folding - clean up a bunch of missing folding tags plus
some misguided RINIT and RSHUTDOWN calls in a few fringe extensions
2001-06-05 13:12:10 +00:00
Fredrik Öhrn
3c5ed324dd Fix erronous out of bounds error message in rand(min,max) 2001-03-20 20:48:42 +00:00
Andi Gutmans
eb6ba01d1c - Fix copyright notices with 2001 2001-02-26 06:11:02 +00:00
James Moore
118c015529 Adding php_rand() and php_srand(seed) as a wrapper around random, lrand48 and rand. 2001-02-22 00:24:19 +00:00
Derick Rethans
82c2851bcc - Fix for bug 9277, two the same boundaries make sense in some cases 2001-02-19 19:20:47 +00:00
Jim Jagielski
e541a27eed For those lucky systems with both random() and *rand48(), the random()
family is the prefered choice. So if both exist, we now choose that.
2001-02-06 16:27:08 +00:00
Stig Bakken
7bb67a6200 @Set default include_path so PEAR files can be reached (Stig) 2000-07-18 11:02:28 +00:00
Sascha Schumann
d1c1e99d98 Rename phpmath.h to php_math.h. 2000-06-13 16:31:57 +00:00
Andi Gutmans
3701bc4207 - ARG_COUNT(ht) -> ZEND_NUM_ARGS() mega patch 2000-06-05 19:47:54 +00:00