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

ruby-changes:14475

From: nobu <ko1@a...>
Date: Wed, 13 Jan 2010 06:55:09 +0900 (JST)
Subject: [ruby-changes:14475] Ruby:r26311 (trunk, ruby_1_8): * configure.in: check for if struct timezone is defined.

nobu	2010-01-13 06:54:47 +0900 (Wed, 13 Jan 2010)

  New Revision: 26311

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

  Log:
    * configure.in: check for if struct timezone is defined.
    
    * missing.h (struct timezone): define if not defined.
    
    * win32/win32.h (struct timezone): defined in the newer w32api.
      [ruby-core:27515]

  Modified files:
    branches/ruby_1_8/ChangeLog
    branches/ruby_1_8/configure.in
    branches/ruby_1_8/missing.h
    branches/ruby_1_8/win32/win32.h
    trunk/ChangeLog
    trunk/configure.in
    trunk/include/ruby/missing.h
    trunk/include/ruby/win32.h

Index: include/ruby/missing.h
===================================================================
--- include/ruby/missing.h	(revision 26310)
+++ include/ruby/missing.h	(revision 26311)
@@ -38,6 +38,13 @@
 };
 #endif
 
+#if !defined(HAVE_STRUCT_TIMEZONE)
+struct timezone {
+    int tz_minuteswest;
+    int tz_dsttime;
+};
+#endif
+
 #ifndef RUBY_EXTERN
 #define RUBY_EXTERN extern
 #endif
Index: include/ruby/win32.h
===================================================================
--- include/ruby/win32.h	(revision 26310)
+++ include/ruby/win32.h	(revision 26311)
@@ -197,11 +197,9 @@
 #define strncasecmp		_strnicmp
 #define fsync			_commit
 
+struct timezone;
+
 #ifdef __MINGW32__
-struct timezone {
-  int tz_minuteswest;
-  int tz_dsttime;
-};
 #undef isascii
 #define isascii __isascii
 #endif
Index: configure.in
===================================================================
--- configure.in	(revision 26310)
+++ configure.in	(revision 26311)
@@ -1064,6 +1064,13 @@
 @%:@include <time.h>
 @%:@endif])
 
+AC_CHECK_TYPES([struct timezone], [], [], [@%:@ifdef HAVE_TIME_H
+@%:@ include <time.h>
+@%:@endif
+@%:@ifdef HAVE_SYS_TIME_H
+@%:@ include <sys/time.h>
+@%:@endif])
+
 AC_CHECK_TYPE(fd_mask, [AC_DEFINE(HAVE_RB_FD_INIT, 1)])
 
 dnl RUBY_DEFINT TYPENAME, SIZE, [SIGNED-OR-UNSIGNED], [INCLUDES = DEFAULT-INCLUDES]
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 26310)
+++ ChangeLog	(revision 26311)
@@ -1,3 +1,12 @@
+Wed Jan 13 06:54:44 2010  Nobuyoshi Nakada  <nobu@r...>
+
+	* configure.in: check for if struct timezone is defined.
+
+	* missing.h (struct timezone): define if not defined.
+
+	* win32/win32.h (struct timezone): defined in the newer w32api.
+	  [ruby-core:27515]
+
 Wed Jan 13 00:33:09 2010  NARUSE, Yui  <naruse@r...>
 
 	* lib/shell/command-processor.rb: fix typo by Sho Hashimoto.
Index: ruby_1_8/configure.in
===================================================================
--- ruby_1_8/configure.in	(revision 26310)
+++ ruby_1_8/configure.in	(revision 26311)
@@ -567,7 +567,7 @@
 		 fcntl.h sys/fcntl.h sys/select.h sys/time.h sys/times.h sys/param.h\
 		 syscall.h pwd.h grp.h a.out.h utime.h memory.h direct.h sys/resource.h \
 		 sys/mkdev.h sys/utime.h netinet/in_systm.h float.h ieeefp.h \
-		 ucontext.h intrinsics.h)
+		 ucontext.h intrinsics.h time.h)
 
 dnl Check additional types.
 AC_CHECK_SIZEOF(rlim_t, 0, [
@@ -592,6 +592,13 @@
 AC_STRUCT_ST_BLOCKS
 AC_STRUCT_ST_RDEV
 
+AC_CHECK_TYPES([struct timezone], [], [], [@%:@ifdef HAVE_TIME_H
+@%:@ include <time.h>
+@%:@endif
+@%:@ifdef HAVE_SYS_TIME_H
+@%:@ include <sys/time.h>
+@%:@endif])
+
 dnl Checks for library functions.
 AC_TYPE_GETGROUPS
 AC_TYPE_SIGNAL
Index: ruby_1_8/ChangeLog
===================================================================
--- ruby_1_8/ChangeLog	(revision 26310)
+++ ruby_1_8/ChangeLog	(revision 26311)
@@ -1,3 +1,12 @@
+Wed Jan 13 06:54:44 2010  Nobuyoshi Nakada  <nobu@r...>
+
+	* configure.in: check for if struct timezone is defined.
+
+	* missing.h (struct timezone): define if not defined.
+
+	* win32/win32.h (struct timezone): defined in the newer w32api.
+	  [ruby-core:27515]
+
 Tue Jan 12 23:58:27 2010  Kouhei Sutou  <kou@c...>
 
 	* lib/rss/maker/base.rb, test/rss/test_maker_0.9.rb:
Index: ruby_1_8/missing.h
===================================================================
--- ruby_1_8/missing.h	(revision 26310)
+++ ruby_1_8/missing.h	(revision 26311)
@@ -25,6 +25,13 @@
 #  include <sys/types.h>
 #endif
 
+#if !defined(HAVE_STRUCT_TIMEZONE)
+struct timezone {
+    int tz_minuteswest;
+    int tz_dsttime;
+};
+#endif
+
 #ifndef RUBY_EXTERN
 #define RUBY_EXTERN extern
 #endif
Index: ruby_1_8/win32/win32.h
===================================================================
--- ruby_1_8/win32/win32.h	(revision 26310)
+++ ruby_1_8/win32/win32.h	(revision 26311)
@@ -150,11 +150,9 @@
 #undef unlink
 #define unlink(p)		rb_w32_unlink(p)
 
+struct timezone;
+
 #ifdef __MINGW32__
-struct timezone {
-  int tz_minuteswest;
-  int tz_dsttime;
-};
 #undef isascii
 #define isascii __isascii
 #endif

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

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