mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-03-31 18:20:22 +08:00
configure: smarter way to handle fseeko() searching
Better handling of the replacement for fseeko() in its absence; also look for the Windows _fseeki64() function. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
This commit is contained in:
parent
73b22f5c1c
commit
ec82d7a92b
14
compiler.h
14
compiler.h
@ -99,6 +99,20 @@ int vsnprintf(char *, size_t, const char *, va_list);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Missing fseeko/ftello */
|
||||
#ifndef HAVE_FSEEKO
|
||||
# undef off_t /* Just in case it is a macro */
|
||||
# ifdef HAVE__FSEEKI64
|
||||
# define fseeko _fseeki64
|
||||
# define ftello _ftelli64
|
||||
# define off_t int64_t
|
||||
# else
|
||||
# define fseeko fseek
|
||||
# define ftello ftell
|
||||
# define off_t long
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_STRLCPY) || !HAVE_DECL_STRLCPY
|
||||
size_t strlcpy(char *, const char *, size_t);
|
||||
#endif
|
||||
|
@ -139,8 +139,8 @@ AC_CHECK_FUNCS(canonicalize_file_name)
|
||||
AC_CHECK_FUNCS(_fullpath)
|
||||
AC_CHECK_FUNCS(pathconf)
|
||||
|
||||
AC_TYPE_OFF_T
|
||||
AC_FUNC_FSEEKO
|
||||
AC_CHECK_FUNCS([_fseeki64])
|
||||
AC_CHECK_FUNCS([ftruncate _chsize _chsize_s])
|
||||
AC_CHECK_FUNCS([fileno])
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user