Use stat if stat64 does not exist

64-bit file calls such as stat64 don't exist on all architectures for
dietlibc, and they don't exist at all for klibc.  In those cases the
normal calls such as stat are already 64-bit.

So simply define stat64 as stat if it doesn't exist.  Do the same for
all other 64-bit calls as well.
This commit is contained in:
Herbert Xu 2005-10-29 14:31:40 +10:00
parent 982e3044a5
commit cee8660318
2 changed files with 9 additions and 0 deletions

View File

@ -6,6 +6,7 @@
* Removed use of __P from error.h.
* Use bsd_signal if it exists and signal does not.
* Stop using sysexits.h in commandcmd.
* Use stat if stat64 does not exist.
2005-10-26 Herbert Xu <herbert@gondor.apana.org.au>

View File

@ -33,5 +33,13 @@ if test "$ac_cv_func_signal" != yes; then
[klibc has bsd_signal instead of signal])])
fi
dnl Check for stat64 (dietlibc/klibc).
AC_CHECK_FUNC(stat64,, [
AC_DEFINE(fstat64, fstat, [64-bit operations are the same as 32-bit])
AC_DEFINE(lstat64, lstat, [64-bit operations are the same as 32-bit])
AC_DEFINE(stat64, stat, [64-bit operations are the same as 32-bit])
AC_DEFINE(open64, open, [64-bit operations are the same as 32-bit])
])
AC_CONFIG_FILES([Makefile src/Makefile])
AC_OUTPUT