summaryrefslogtreecommitdiff
path: root/source3/configure.in
diff options
context:
space:
mode:
authorTim Prouty <tprouty@samba.org>2008-11-05 13:40:03 -0800
committerTim Prouty <tprouty@samba.org>2008-11-12 09:48:50 -0800
commitd38bffd4126062b92384f0930196059441a2d765 (patch)
tree4723e7edd92eaf95c5096afb1ff45ab29359ccbe /source3/configure.in
parent7f36d3b55051150b9d4fa75af424898f48c48771 (diff)
downloadsamba-d38bffd4126062b92384f0930196059441a2d765.tar.gz
samba-d38bffd4126062b92384f0930196059441a2d765.tar.bz2
samba-d38bffd4126062b92384f0930196059441a2d765.zip
s3: Add support for storing dos attributes as st_flags in the stat struct.
Some filesystems have support for storing dos attributes directly in the inode's st_flags and accessing them through the stat struct. This patch: - Adds a configure check to see if the special flags are available. - Implements getting and setting dos attributes in the stat struct and inode, respectively. This will not change the existing functionality of any system that doesn't have the special flags available.
Diffstat (limited to 'source3/configure.in')
-rw-r--r--source3/configure.in19
1 files changed, 19 insertions, 0 deletions
diff --git a/source3/configure.in b/source3/configure.in
index 5e3eac55e2..24341e0bec 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -1433,6 +1433,25 @@ if test x"$samba_cv_stat_st_birthtime" = x"yes" ; then
AC_DEFINE(HAVE_STAT_ST_BIRTHTIME, 1, [whether struct stat contains st_birthtime])
fi
+AC_CACHE_CHECK([whether there is DOS flags support in the stat struct], samba_cv_stat_dos_flags,
+ [
+ AC_TRY_COMPILE(
+ [#include <sys/stat.h>],
+ [
+ int a = UF_DOS_ARCHIVE;
+ int h = UF_DOS_HIDDEN;
+ int r = UF_DOS_RO;
+ int s = UF_DOS_SYSTEM;
+ int i = UF_DOS_NOINDEX;
+ int f = UF_DOS_FLAGS;
+ ],
+ samba_cv_stat_dos_flags=yes, samba_cv_stat_dos_flags=no)
+ ])
+
+if test x"$samba_cv_stat_dos_flags" = x"yes" ; then
+ AC_DEFINE(HAVE_STAT_DOS_FLAGS, 1, [whether there is DOS flags support in the stat struct])
+fi
+
#####################################
# needed for SRV lookups
AC_CHECK_LIB(resolv, dn_expand)