From 3118429089d22af93099f7eea64c062842a8e499 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Thu, 6 Apr 2017 15:30:56 -0700 Subject: Windows: clean up the handling of stat on Windows [f]stat on Windows is messy: we need to use _stati64 for maximum compatibility, but because there is a bunch of stuff wrapped in macros, autoconf sometimes gets the wrong answers. Signed-off-by: H. Peter Anvin --- configure.ac | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 9e84627e..00774e66 100644 --- a/configure.ac +++ b/configure.ac @@ -116,8 +116,6 @@ AC_CHECK_FUNCS([ftruncate _chsize _chsize_s]) AC_CHECK_FUNCS([fileno _fileno]) AC_CHECK_FUNCS(_filelengthi64) -AC_CHECK_FUNCS([stat _stati64]) -AC_CHECK_FUNCS([fstat _fstati64]) AC_FUNC_MMAP AC_CHECK_FUNCS(getpagesize) AC_CHECK_FUNCS(sysconf) @@ -134,6 +132,12 @@ AC_CHECK_FUNCS([vsnprintf _vsnprintf]) AC_CHECK_FUNCS([snprintf _snprintf]) AC_CHECK_FUNCS([strlcpy]) +dnl These types are POSIX-specific, and Windows does it differently... +AC_CHECK_TYPES([struct _stati64]) +AC_CHECK_TYPES([struct stat]) +AC_CHECK_FUNCS([stat _stati64]) +AC_CHECK_FUNCS([fstat _fstati64]) + dnl Check for functions that might not be declared in the headers for dnl various idiotic reasons (mostly because of library authors dnl abusing the meaning of __STRICT_ANSI__) -- cgit v1.2.1