summaryrefslogtreecommitdiff
path: root/source3/configure.in
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2002-01-09 21:30:37 +0000
committerJeremy Allison <jra@samba.org>2002-01-09 21:30:37 +0000
commit3375267106fb0af332a516c6403700acbd1133ab (patch)
tree47dbf6854ec0d06714091de5efc773f1708d6bbc /source3/configure.in
parentca2558ff34fab162c8e893b71a802bb12dfb01ba (diff)
downloadsamba-3375267106fb0af332a516c6403700acbd1133ab.tar.gz
samba-3375267106fb0af332a516c6403700acbd1133ab.tar.bz2
samba-3375267106fb0af332a516c6403700acbd1133ab.zip
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)
Diffstat (limited to 'source3/configure.in')
-rw-r--r--source3/configure.in17
1 files changed, 16 insertions, 1 deletions
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 <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>],
+[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