summary refs log tree commit diff
path: root/configure.ac
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2005-10-29 14:31:40 +1000
committerHerbert Xu <herbert@gondor.apana.org.au>2005-10-29 14:31:40 +1000
commitcee866031859ec48dbb8a353ab49564b3a42b34e (patch)
treeb0137c9d65242d2606d91e62cb9d939826518c77 /configure.ac
parent[BUILTIN] Stop using sysexits.h in commandcmd (diff)
downloaddash-cee866031859ec48dbb8a353ab49564b3a42b34e.tar.gz
dash-cee866031859ec48dbb8a353ab49564b3a42b34e.zip
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.
Diffstat (limited to '')
-rw-r--r--configure.ac8
1 files changed, 8 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index a64e666..5c2c2d2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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