diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1999-09-01 09:48:03 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1999-09-01 09:48:03 +0000 |
commit | 1f72ff9b643dff5f4c5a40bf672a2525d66bd99f (patch) | |
tree | f83116ebca291337b9948831c617217c18f6a317 /random.c | |
parent | aeb066503409062fc8fe8b241e512f5f6aebb128 (diff) | |
download | ruby-1f72ff9b643dff5f4c5a40bf672a2525d66bd99f.tar.gz ruby-1f72ff9b643dff5f4c5a40bf672a2525d66bd99f.tar.xz ruby-1f72ff9b643dff5f4c5a40bf672a2525d66bd99f.zip |
regexp literal (e.g. \202) match, etc.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'random.c')
-rw-r--r-- | random.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -12,6 +12,9 @@ #include "ruby.h" +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif #include <time.h> #ifndef NT #ifdef HAVE_SYS_TIME_H @@ -92,7 +95,7 @@ rb_f_srand(argc, argv, obj) struct timeval tv; gettimeofday(&tv, 0); - seed = tv.tv_sec ^ tv.tv_usec; + seed = tv.tv_sec ^ tv.tv_usec ^ getpid(); } else { seed = NUM2UINT(seed); |