mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* random.c: workaround for VC++ 6.0.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24191 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f3d022543e
commit
4c7c46b6af
2 changed files with 10 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
|||
Sat Jul 18 11:39:49 2009 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||
|
||||
* random.c: workaround for VC++ 6.0.
|
||||
|
||||
Sat Jul 18 09:16:18 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* random.c (rb_random_{int32,real,bytes,int}): added functions for
|
||||
|
|
7
random.c
7
random.c
|
@ -381,6 +381,11 @@ random_init(int argc, VALUE *argv, VALUE obj)
|
|||
# define USE_DEV_URANDOM 0
|
||||
#endif
|
||||
#ifdef _WIN32
|
||||
# if !defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0400
|
||||
# undef _WIN32_WINNT
|
||||
# define _WIN32_WINNT 0x400
|
||||
# undef __WINCRYPT_H__
|
||||
# endif
|
||||
#include <wincrypt.h>
|
||||
#endif
|
||||
|
||||
|
@ -393,7 +398,7 @@ fill_random_seed(unsigned int seed[DEFAULT_SEED_CNT])
|
|||
int fd;
|
||||
struct stat statbuf;
|
||||
#elif defined(_WIN32)
|
||||
HCRYPTPROV prov;
|
||||
HCRYPTPROV prov;
|
||||
#endif
|
||||
|
||||
memset(seed, 0, DEFAULT_SEED_LEN);
|
||||
|
|
Loading…
Reference in a new issue