diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-03-29 00:21:20 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-03-29 00:21:20 +0000 |
commit | 46a4000a6862cffb535e4feacad907c4296ad1cf (patch) | |
tree | 55967b88a065b61b682a9ac0fd65623fd92c8d8e | |
parent | cb905affbdbe3abd69ff7ac78b3b8d2d58851b07 (diff) | |
download | ruby-46a4000a6862cffb535e4feacad907c4296ad1cf.tar.gz |
* random.c: change include order; ruby.h should be at first.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27082 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | random.c | 45 |
2 files changed, 27 insertions, 22 deletions
@@ -1,3 +1,7 @@ +Mon Mar 29 09:16:45 2010 NARUSE, Yui <naruse@ruby-lang.org> + + * random.c: change include order; ruby.h should be at first. + Mon Mar 29 06:47:25 2010 Aaron Patterson <aaron@tenderlovemaking.com> * ext/psych/*: importing Psych to trunk @@ -59,7 +59,30 @@ The original copyright notice follows. email: matumoto@math.keio.ac.jp */ +#include "ruby/ruby.h" + #include <limits.h> +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif +#include <time.h> +#include <sys/types.h> +#include <sys/stat.h> +#ifdef HAVE_FCNTL_H +#include <fcntl.h> +#endif +#include <math.h> +#include <errno.h> + +#ifdef _WIN32 +# if !defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0400 +# undef _WIN32_WINNT +# define _WIN32_WINNT 0x400 +# undef __WINCRYPT_H__ +# endif +#include <wincrypt.h> +#endif + typedef int int_must_be_32bit_at_least[sizeof(int) * CHAR_BIT < 32 ? -1 : 1]; /* Period parameters */ @@ -194,20 +217,6 @@ genrand_real2(struct MT *mt) /* These real versions are due to Isaku Wada, 2002/01/09 added */ -#include "ruby/ruby.h" - -#ifdef HAVE_UNISTD_H -#include <unistd.h> -#endif -#include <time.h> -#include <sys/types.h> -#include <sys/stat.h> -#ifdef HAVE_FCNTL_H -#include <fcntl.h> -#endif -#include <math.h> -#include <errno.h> - typedef struct { VALUE seed; struct MT mt; @@ -449,14 +458,6 @@ random_init(int argc, VALUE *argv, VALUE obj) #else # 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 static void fill_random_seed(unsigned int seed[DEFAULT_SEED_CNT]) |