From 3375267106fb0af332a516c6403700acbd1133ab Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 9 Jan 2002 21:30:37 +0000 Subject: Added tests for st_blocks in struct stat, and added a (hateful) constant the specifies the units that st_blocks is in. The reason for this is that HPUX uses 8k, AIX uses a #defined constant and everyone else (tm) uses 512 byte units. Needed for the CIFS UNIX extensions - coming to a Samba server near you soon.... :-). Jeremy. (This used to be commit 38cfffea5f0d7f5ff676f83204a2923247dce9d5) --- source3/configure.in | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'source3/configure.in') diff --git a/source3/configure.in b/source3/configure.in index e65654f3b6..1831fc0f2a 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -690,6 +690,7 @@ case "$host_os" in BLDSHARED="true" LDSHFLAGS="-shared" PICFLAG="-fPIC" + AC_DEFINE(STAT_ST_BLOCKSIZE,512) ;; *solaris*) AC_DEFINE(SUNOS5) BLDSHARED="true" @@ -701,6 +702,7 @@ case "$host_os" in POBAD_CC="" PICSUFFIX="po.o" fi + AC_DEFINE(STAT_ST_BLOCKSIZE,512) ;; *sunos*) AC_DEFINE(SUNOS4) BLDSHARED="true" @@ -710,6 +712,7 @@ case "$host_os" in *bsd*) BLDSHARED="true" LDSHFLAGS="-Wl,-soname,\$@ -shared" PICFLAG="-fPIC" + AC_DEFINE(STAT_ST_BLOCKSIZE,512) ;; *irix*) AC_DEFINE(IRIX) case "$host_os" in @@ -724,11 +727,13 @@ case "$host_os" in else PICFLAG="-KPIC" fi + AC_DEFINE(STAT_ST_BLOCKSIZE,512) ;; *aix*) AC_DEFINE(AIX) BLDSHARED="true" LDSHFLAGS="-Wl,-bexpall,-bM:SRE,-bnoentry" PICFLAG="-O2 -qmaxmem=6000" + AC_DEFINE(STAT_ST_BLOCKSIZE,DEV_BSIZE) ;; *hpux*) AC_DEFINE(HPUX) SHLIBEXT="sl" @@ -738,6 +743,7 @@ case "$host_os" in LDSHFLAGS="-b -z +h \$@" PICFLAG="+z" fi + AC_DEFINE(STAT_ST_BLOCKSIZE,8192) ;; *qnx*) AC_DEFINE(QNX);; *osf*) AC_DEFINE(OSF1) @@ -1549,6 +1555,15 @@ exit(1); fi fi +AC_CACHE_CHECK([for st_blocks in struct stat],samba_cv_HAVE_STAT_ST_BLOCKS,[ +AC_TRY_COMPILE([#include +#include +#include ], +[struct stat st; st.st_blocks = 0;], +samba_cv_HAVE_STAT_ST_BLOCKS=yes,samba_cv_HAVE_STAT_ST_BLOCKS=no,samba_cv_HAVE_STAT_ST_BLOCKS=cross)]) +if test x"$samba_cv_HAVE_STAT_ST_BLOCKS" = x"yes"; then + AC_DEFINE(HAVE_STAT_ST_BLOCKS) +fi case "$host_os" in *linux*) @@ -2619,4 +2634,4 @@ if test "x$enable_dmalloc" = xyes then AC_MSG_RESULT([Note: The dmalloc debug library will be included. To turn it on use]) AC_MSG_RESULT([ \$ eval \`dmalloc samba\`.]) -fi \ No newline at end of file +fi -- cgit