X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=m4%2Fftello.m4;h=ab7b548eba3ec8f6b342f708350f0dd6f3dc5102;hb=daf7f8c02242c535d596231e2f655109b97fa2bc;hp=599f8f204734bff5684ede8de65878023481d19f;hpb=d60f3b0c6b0f93a601acd1cfd3923f94ca05abb0;p=gnulib.git diff --git a/m4/ftello.m4 b/m4/ftello.m4 index 599f8f204..ab7b548eb 100644 --- a/m4/ftello.m4 +++ b/m4/ftello.m4 @@ -1,5 +1,5 @@ -# ftello.m4 serial 9 -dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. +# ftello.m4 serial 11 +dnl Copyright (C) 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -9,6 +9,7 @@ AC_DEFUN([gl_FUNC_FTELLO], AC_REQUIRE([gl_STDIO_H_DEFAULTS]) AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([gl_STDIN_LARGE_OFFSET]) + AC_REQUIRE([gl_SYS_TYPES_H]) dnl Persuade glibc to declare ftello(). AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) @@ -30,9 +31,13 @@ AC_DEFUN([gl_FUNC_FTELLO], if test $gl_cv_func_ftello = no; then HAVE_FTELLO=0 else + if test $WINDOWS_64_BIT_OFF_T = 1; then + REPLACE_FTELLO=1 + fi if test $gl_cv_var_stdin_large_offset = no; then REPLACE_FTELLO=1 - else + fi + if test $REPLACE_FTELLO = 0; then dnl Detect bug on Solaris. dnl ftell and ftello produce incorrect results after putc that followed a dnl getc call that reached EOF on Solaris. This is because the _IOREAD @@ -124,12 +129,12 @@ main (void) esac fi fi - if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then - gl_REPLACE_FTELLO - fi ]) -AC_DEFUN([gl_REPLACE_FTELLO], +# Prerequisites of lib/ftello.c. +AC_DEFUN([gl_PREREQ_FTELLO], [ - AC_LIBOBJ([ftello]) + dnl Native Windows has the function _ftelli64. mingw hides it, but mingw64 + dnl makes it usable again. + AC_CHECK_FUNCS([_ftelli64]) ])