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

ruby-changes:27786

From: nagachika <ko1@a...>
Date: Wed, 20 Mar 2013 22:34:30 +0900 (JST)
Subject: [ruby-changes:27786] nagachika:r39838 (ruby_2_0_0): merge revision(s) 39772,39773: [Backport #8080]

nagachika	2013-03-20 22:34:16 +0900 (Wed, 20 Mar 2013)

  New Revision: 39838

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

  Log:
    merge revision(s) 39772,39773: [Backport #8080]
    
    * configure.in: check struct timeval exist or not.
    
    * include/ruby/missing.h (struct timeval): check HAVE_STRUCT_TIMEVAL
      properly. and don't include sys/time.h if struct timeval exist.
    
    * file.c: include sys/time.h explicitly.
    
    * random.c: ditto.
    
    * thread_pthread.c: ditto.
    
    * time.c: ditto.
    
    * ext/date/date_strftime.c: ditto.
    
    * include/ruby/missing.h (struct timespec): include <sys/time.h>

  Modified directories:
    branches/ruby_2_0_0/
  Modified files:
    branches/ruby_2_0_0/ChangeLog
    branches/ruby_2_0_0/configure.in
    branches/ruby_2_0_0/ext/date/date_strftime.c
    branches/ruby_2_0_0/file.c
    branches/ruby_2_0_0/include/ruby/missing.h
    branches/ruby_2_0_0/random.c
    branches/ruby_2_0_0/thread_pthread.c
    branches/ruby_2_0_0/time.c
    branches/ruby_2_0_0/version.h

Index: ruby_2_0_0/time.c
===================================================================
--- ruby_2_0_0/time.c	(revision 39837)
+++ ruby_2_0_0/time.c	(revision 39838)
@@ -27,6 +27,10 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/time.c#L27
 #include <strings.h>
 #endif
 
+#if defined(HAVE_SYS_TIME_H)
+#include <sys/time.h>
+#endif
+
 #include "timev.h"
 
 static ID id_divmod, id_mul, id_submicro, id_nano_num, id_nano_den, id_offset, id_zone;
Index: ruby_2_0_0/include/ruby/missing.h
===================================================================
--- ruby_2_0_0/include/ruby/missing.h	(revision 39837)
+++ ruby_2_0_0/include/ruby/missing.h	(revision 39838)
@@ -25,20 +25,26 @@ extern "C" { https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/include/ruby/missing.h#L25
 #include RUBY_EXTCONF_H
 #endif
 
-#if defined(HAVE_SYS_TIME_H)
+#if !defined(HAVE_STRUCT_TIMEVAL)
+# if defined(HAVE_SYS_TIME_H)
 #  include <sys/time.h>
-#elif !defined(_WIN32)
+# elif !defined(_WIN32)
 #  define time_t long
 struct timeval {
     time_t tv_sec;	/* seconds */
     long tv_usec;	/* microseconds */
 };
-#endif
+# endif
+#endif /* HAVE_STRUCT_TIMEVAL */
+
 #if defined(HAVE_SYS_TYPES_H)
 #  include <sys/types.h>
 #endif
 
 #if !defined(HAVE_STRUCT_TIMESPEC)
+# if defined(HAVE_SYS_TIME_H)
+#  include <sys/time.h>
+# endif
 struct timespec {
     time_t tv_sec;	/* seconds */
     long tv_nsec;	/* nanoseconds */
Index: ruby_2_0_0/configure.in
===================================================================
--- ruby_2_0_0/configure.in	(revision 39837)
+++ ruby_2_0_0/configure.in	(revision 39838)
@@ -1371,6 +1371,13 @@ AC_CHECK_MEMBERS([struct stat.st_ctim]) https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/configure.in#L1371
 AC_CHECK_MEMBERS([struct stat.st_ctimespec])
 AC_CHECK_MEMBERS([struct stat.st_ctimensec])
 
+AC_CHECK_TYPES([struct timeval], [], [], [@%:@ifdef HAVE_TIME_H
+@%:@include <time.h>
+@%:@endif
+@%:@ifdef HAVE_SYS_TIME_H
+@%:@include <sys/time.h>
+@%:@endif])
+
 AC_CHECK_TYPES([struct timespec], [], [], [@%:@ifdef HAVE_TIME_H
 @%:@include <time.h>
 @%:@endif
Index: ruby_2_0_0/ChangeLog
===================================================================
--- ruby_2_0_0/ChangeLog	(revision 39837)
+++ ruby_2_0_0/ChangeLog	(revision 39838)
@@ -1,3 +1,19 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/ChangeLog#L1
+Wed Mar 20 22:33:26 2013  KOSAKI Motohiro  <kosaki.motohiro@g...>
+
+	* include/ruby/missing.h (struct timespec): include <sys/time.h>
+
+Wed Mar 20 22:33:26 2013  KOSAKI Motohiro  <kosaki.motohiro@g...>
+
+	* configure.in: check struct timeval exist or not.
+	* include/ruby/missing.h (struct timeval): check HAVE_STRUCT_TIMEVAL
+	  properly. and don't include sys/time.h if struct timeval exist.
+
+	* file.c: include sys/time.h explicitly.
+	* random.c: ditto.
+	* thread_pthread.c: ditto.
+	* time.c: ditto.
+	* ext/date/date_strftime.c: ditto.
+
 Mon Mar 18 00:12:28 2013  Eric Hodel  <drbrain@s...>
 
 	* lib/rubygems/commands/setup_command.rb:  Don't delete non-rubygems
Index: ruby_2_0_0/thread_pthread.c
===================================================================
--- ruby_2_0_0/thread_pthread.c	(revision 39837)
+++ ruby_2_0_0/thread_pthread.c	(revision 39838)
@@ -33,6 +33,9 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/thread_pthread.c#L33
 #if HAVE_POLL
 #include <poll.h>
 #endif
+#if defined(HAVE_SYS_TIME_H)
+#include <sys/time.h>
+#endif
 
 static void native_mutex_lock(pthread_mutex_t *lock);
 static void native_mutex_unlock(pthread_mutex_t *lock);
Index: ruby_2_0_0/ext/date/date_strftime.c
===================================================================
--- ruby_2_0_0/ext/date/date_strftime.c	(revision 39837)
+++ ruby_2_0_0/ext/date/date_strftime.c	(revision 39838)
@@ -12,6 +12,10 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/ext/date/date_strftime.c#L12
 #include <ctype.h>
 #include <errno.h>
 
+#if defined(HAVE_SYS_TIME_H)
+#include <sys/time.h>
+#endif
+
 #undef strchr	/* avoid AIX weirdness */
 
 #define range(low, item, hi)	(item)
Index: ruby_2_0_0/version.h
===================================================================
--- ruby_2_0_0/version.h	(revision 39837)
+++ ruby_2_0_0/version.h	(revision 39838)
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/version.h#L1
 #define RUBY_VERSION "2.0.0"
 #define RUBY_RELEASE_DATE "2013-03-20"
-#define RUBY_PATCHLEVEL 73
+#define RUBY_PATCHLEVEL 74
 
 #define RUBY_RELEASE_YEAR 2013
 #define RUBY_RELEASE_MONTH 3
Index: ruby_2_0_0/file.c
===================================================================
--- ruby_2_0_0/file.c	(revision 39837)
+++ ruby_2_0_0/file.c	(revision 39838)
@@ -75,6 +75,10 @@ int flock(int, int); https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/file.c#L75
 #include <fcntl.h>
 #endif
 
+#if defined(HAVE_SYS_TIME_H)
+#include <sys/time.h>
+#endif
+
 #if !defined HAVE_LSTAT && !defined lstat
 #define lstat stat
 #endif
Index: ruby_2_0_0/random.c
===================================================================
--- ruby_2_0_0/random.c	(revision 39837)
+++ ruby_2_0_0/random.c	(revision 39838)
@@ -73,6 +73,9 @@ The original copyright notice follows. https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/random.c#L73
 #endif
 #include <math.h>
 #include <errno.h>
+#if defined(HAVE_SYS_TIME_H)
+#include <sys/time.h>
+#endif
 
 #ifdef _WIN32
 # if !defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0400

Property changes on: ruby_2_0_0
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /trunk:r39772-39773


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

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