diff options
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | configure.in | 58 |
2 files changed, 58 insertions, 10 deletions
@@ -105,16 +105,6 @@ Fri Nov 25 08:00:23 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com> 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 <kosaki.motohiro@gmail.com> - - * 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 <kosaki.motohiro@gmail.com> - - * 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 <kosaki.motohiro@gmail.com> * 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 <stdio.h> +], + [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 <stdio.h> +], + [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 <stdio.h> + ], + [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 <sys/stat.h>]) AC_CACHE_CHECK([whether struct dirent.d_name is too small], rb_cv_sizeof_struct_dirent_too_small, |