1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

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 38cfffea5f)
This commit is contained in:
Jeremy Allison 2002-01-09 21:30:37 +00:00
parent ca2558ff34
commit 3375267106
4 changed files with 389 additions and 311 deletions

View File

@ -185,3 +185,5 @@
#undef HAVE_GSSAPI #undef HAVE_GSSAPI
#undef BROKEN_REDHAT_7_SYSTEM_HEADERS #undef BROKEN_REDHAT_7_SYSTEM_HEADERS
#undef HAVE_LDAP #undef HAVE_LDAP
#undef HAVE_STAT_ST_BLOCKS
#undef STAT_ST_BLOCKSIZE

679
source3/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -690,6 +690,7 @@ case "$host_os" in
BLDSHARED="true" BLDSHARED="true"
LDSHFLAGS="-shared" LDSHFLAGS="-shared"
PICFLAG="-fPIC" PICFLAG="-fPIC"
AC_DEFINE(STAT_ST_BLOCKSIZE,512)
;; ;;
*solaris*) AC_DEFINE(SUNOS5) *solaris*) AC_DEFINE(SUNOS5)
BLDSHARED="true" BLDSHARED="true"
@ -701,6 +702,7 @@ case "$host_os" in
POBAD_CC="" POBAD_CC=""
PICSUFFIX="po.o" PICSUFFIX="po.o"
fi fi
AC_DEFINE(STAT_ST_BLOCKSIZE,512)
;; ;;
*sunos*) AC_DEFINE(SUNOS4) *sunos*) AC_DEFINE(SUNOS4)
BLDSHARED="true" BLDSHARED="true"
@ -710,6 +712,7 @@ case "$host_os" in
*bsd*) BLDSHARED="true" *bsd*) BLDSHARED="true"
LDSHFLAGS="-Wl,-soname,\$@ -shared" LDSHFLAGS="-Wl,-soname,\$@ -shared"
PICFLAG="-fPIC" PICFLAG="-fPIC"
AC_DEFINE(STAT_ST_BLOCKSIZE,512)
;; ;;
*irix*) AC_DEFINE(IRIX) *irix*) AC_DEFINE(IRIX)
case "$host_os" in case "$host_os" in
@ -724,11 +727,13 @@ case "$host_os" in
else else
PICFLAG="-KPIC" PICFLAG="-KPIC"
fi fi
AC_DEFINE(STAT_ST_BLOCKSIZE,512)
;; ;;
*aix*) AC_DEFINE(AIX) *aix*) AC_DEFINE(AIX)
BLDSHARED="true" BLDSHARED="true"
LDSHFLAGS="-Wl,-bexpall,-bM:SRE,-bnoentry" LDSHFLAGS="-Wl,-bexpall,-bM:SRE,-bnoentry"
PICFLAG="-O2 -qmaxmem=6000" PICFLAG="-O2 -qmaxmem=6000"
AC_DEFINE(STAT_ST_BLOCKSIZE,DEV_BSIZE)
;; ;;
*hpux*) AC_DEFINE(HPUX) *hpux*) AC_DEFINE(HPUX)
SHLIBEXT="sl" SHLIBEXT="sl"
@ -738,6 +743,7 @@ case "$host_os" in
LDSHFLAGS="-b -z +h \$@" LDSHFLAGS="-b -z +h \$@"
PICFLAG="+z" PICFLAG="+z"
fi fi
AC_DEFINE(STAT_ST_BLOCKSIZE,8192)
;; ;;
*qnx*) AC_DEFINE(QNX);; *qnx*) AC_DEFINE(QNX);;
*osf*) AC_DEFINE(OSF1) *osf*) AC_DEFINE(OSF1)
@ -1549,6 +1555,15 @@ exit(1);
fi fi
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 case "$host_os" in
*linux*) *linux*)

View File

@ -251,6 +251,8 @@
#undef HAVE_GSSAPI #undef HAVE_GSSAPI
#undef BROKEN_REDHAT_7_SYSTEM_HEADERS #undef BROKEN_REDHAT_7_SYSTEM_HEADERS
#undef HAVE_LDAP #undef HAVE_LDAP
#undef HAVE_STAT_ST_BLOCKS
#undef STAT_ST_BLOCKSIZE
/* The number of bytes in a int. */ /* The number of bytes in a int. */
#undef SIZEOF_INT #undef SIZEOF_INT