зеркало из https://github.com/github/ruby.git
* configure.in (rb_cv_member_struct_tm_tm_gmtoff): For Linux (glibc)
define _BSD_SOURCE for time.h to define struct tm.tm_gmtoff. * time.c: define _BSD_SOURCE at the top. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54186 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
04eb614251
Коммит
9a8b21446e
|
@ -1,3 +1,10 @@
|
|||
Sat Mar 19 03:53:31 2016 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* configure.in (rb_cv_member_struct_tm_tm_gmtoff): For Linux (glibc)
|
||||
define _BSD_SOURCE for time.h to define struct tm.tm_gmtoff.
|
||||
|
||||
* time.c: define _BSD_SOURCE at the top.
|
||||
|
||||
Sat Mar 19 03:00:50 2016 Rei Odaira <Rei.Odaira@gmail.com>
|
||||
|
||||
* test/-ext-/time/test_new.rb (test_timespec_new): change a gmtoff
|
||||
|
|
|
@ -2609,7 +2609,12 @@ if test "$use_setreuid" = yes; then
|
|||
fi
|
||||
AC_STRUCT_TIMEZONE
|
||||
AC_CACHE_CHECK(for struct tm.tm_gmtoff, rb_cv_member_struct_tm_tm_gmtoff,
|
||||
[AC_TRY_COMPILE([@%:@include <time.h>],
|
||||
[AC_TRY_COMPILE([
|
||||
@%:@include <time.h>
|
||||
@%:@ifndef _BSD_SOURCE
|
||||
@%:@define _BSD_SOURCE 1
|
||||
@%:@endif
|
||||
],
|
||||
[struct tm t; t.tm_gmtoff = 3600;],
|
||||
[rb_cv_member_struct_tm_tm_gmtoff=yes],
|
||||
[rb_cv_member_struct_tm_tm_gmtoff=no])])
|
||||
|
|
1
time.c
1
time.c
|
@ -9,6 +9,7 @@
|
|||
|
||||
**********************************************************************/
|
||||
|
||||
#define _BSD_SOURCE
|
||||
#include "internal.h"
|
||||
#include <sys/types.h>
|
||||
#include <time.h>
|
||||
|
|
Загрузка…
Ссылка в новой задаче