diff options
author | H. Peter Anvin <hpa@zytor.com> | 2017-04-06 15:30:56 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2017-04-06 15:48:51 -0700 |
commit | 3118429089d22af93099f7eea64c062842a8e499 (patch) | |
tree | eb9a6ed31f831dabc0c75da8eb0254905a23f6e2 /configure.ac | |
parent | 0da1549b7386c60669b34819b0c93b700d212b3c (diff) | |
download | nasm-3118429089d22af93099f7eea64c062842a8e499.tar.gz |
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 <hpa@zytor.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 8 |
1 files changed, 6 insertions, 2 deletions
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__) |