From ed78271c49bb405b202322ee39a4db919e2fdb3d Mon Sep 17 00:00:00 2001 From: kosaki Date: Sun, 27 Nov 2011 04:55:27 +0000 Subject: * configure.in: revert r33832 and r33833. [ruby-core:41313] [Bug #5674] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33859 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 10 ---------- configure.in | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index afe9bb75ed..18220dca33 100644 --- a/ChangeLog +++ b/ChangeLog @@ -105,16 +105,6 @@ Fri Nov 25 08:00:23 2011 KOSAKI Motohiro and/or -Wold-style-definition warnings if specified. Patch by Nikolai Weibull. Thank you! [Bug #5459] [ruby-core:40200] -Fri Nov 25 07:56:49 2011 KOSAKI Motohiro - - * configure.in: remove [read buffer ptr field in FILE structures] check. - ruby 1.9 or later doesn't use stdio at all. - -Fri Nov 25 07:52:46 2011 KOSAKI Motohiro - - * configure.in: remove [read count field in FILE] check. - ruby 1.9 or later doesn't use stdio at all. - Fri Nov 25 07:46:09 2011 KOSAKI Motohiro * configure.in: add -Wall always. diff --git a/configure.in b/configure.in index f7a2c05a7c..04e0c556dd 100644 --- a/configure.in +++ b/configure.in @@ -1638,6 +1638,64 @@ else AC_DEFINE(RSHIFT(x,y), (((x)<0) ? ~((~(x))>>(int)(y)) : (x)>>(int)(y))) fi +# win32.c still use this. Don't remove it. +test "$rb_cv_fcnt" = "not found" && rb_cv_fcnt="not found (OK if using GNU libc)" +AC_CACHE_CHECK([read count field in FILE structures], rb_cv_fcnt, +[rb_cv_fcnt="not found (OK if using GNU libc)" +for fcnt in dnl + _cnt dnl + __cnt dnl + _r dnl + readCount dnl + _rcount dnl for emx0.9c +; do + AC_TRY_COMPILE([#include +], + [FILE *f = stdin; f->$fcnt = 0;], + [rb_cv_fcnt="$fcnt"; break]) +done]) +AS_CASE("$rb_cv_fcnt", + ["not found"*], [rb_cv_fcnt="not found"], + [AC_DEFINE_UNQUOTED(FILE_COUNT, $rb_cv_fcnt)]) + +# win32.c still use this. Don't remove it. +AC_CACHE_CHECK([read buffer ptr field in FILE structures], rb_cv_frptr, +[for frptr in dnl + _IO_read_ptr dnl + _ptr dnl + __ptr dnl + bufpos dnl + _p dnl + __bufpos dnl +; do + AC_TRY_COMPILE([#include +], + [FILE *f = stdin; char buf[256]; f->$frptr = buf;], + rb_cv_frptr="$frptr"; break, + rb_cv_frptr="not found") +done]) +if test "$rb_cv_frptr" != "not found"; then + AC_DEFINE_UNQUOTED(FILE_READPTR, $rb_cv_frptr) + + if test "$rb_cv_fcnt" = "not found"; then + AC_CACHE_CHECK([read buffer end field in FILE structures], rb_cv_frend, + [for frend in dnl + _IO_read_end dnl + bufread dnl + __bufread dnl + ; do + AC_TRY_COMPILE([#include + ], + [FILE *f = stdin; char buf[256]; f->$frend = buf;], + rb_cv_frend="$frend"; break, + rb_cv_frend="not found") + done]) + if test "$rb_cv_frend" != "not found"; then + AC_DEFINE_UNQUOTED(FILE_READEND, $rb_cv_frend) + fi + fi +fi + RUBY_CHECK_SIZEOF([struct stat.st_ino], [long "long long"], [], [@%:@include ]) AC_CACHE_CHECK([whether struct dirent.d_name is too small], rb_cv_sizeof_struct_dirent_too_small, -- cgit v1.2.3