[前][次][番号順一覧][スレッド一覧]

ruby-changes:15201

From: naruse <ko1@a...>
Date: Mon, 29 Mar 2010 09:21:43 +0900 (JST)
Subject: [ruby-changes:15201] Ruby:r27082 (trunk): * random.c: change include order; ruby.h should be at first.

naruse	2010-03-29 09:21:20 +0900 (Mon, 29 Mar 2010)

  New Revision: 27082

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=27082

  Log:
    * random.c: change include order; ruby.h should be at first.

  Modified files:
    trunk/ChangeLog
    trunk/random.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 27081)
+++ ChangeLog	(revision 27082)
@@ -1,3 +1,7 @@
+Mon Mar 29 09:16:45 2010  NARUSE, Yui  <naruse@r...>
+
+	* random.c: change include order; ruby.h should be at first.
+
 Mon Mar 29 06:47:25 2010  Aaron Patterson <aaron@t...>
 
 	* ext/psych/*: importing Psych to trunk
Index: random.c
===================================================================
--- random.c	(revision 27081)
+++ random.c	(revision 27082)
@@ -59,7 +59,30 @@
    email: matumoto@m...
 */
 
+#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 @@
 
 /* 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 @@
 #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])

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]