diff options
Diffstat (limited to 'gl/m4/ftello.m4')
-rw-r--r-- | gl/m4/ftello.m4 | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/gl/m4/ftello.m4 b/gl/m4/ftello.m4 index 42be83e..ab7b548 100644 --- a/gl/m4/ftello.m4 +++ b/gl/m4/ftello.m4 @@ -1,4 +1,4 @@ -# ftello.m4 serial 10 +# 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, @@ -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 <stdio.h> 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 @@ -125,3 +130,11 @@ main (void) fi fi ]) + +# Prerequisites of lib/ftello.c. +AC_DEFUN([gl_PREREQ_FTELLO], +[ + dnl Native Windows has the function _ftelli64. mingw hides it, but mingw64 + dnl makes it usable again. + AC_CHECK_FUNCS([_ftelli64]) +]) |