summaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2012-06-02 18:53:13 +0000
committerGuy Harris <guy@alum.mit.edu>2012-06-02 18:53:13 +0000
commit68a4971594be308056cd28833cb4f21213beb71c (patch)
tree17f79825410c1847824774adca2381fa2a113ca5 /acinclude.m4
parent2e4f30d0f92025226ed1168bfa7b1b5fe50548c4 (diff)
downloadwireshark-68a4971594be308056cd28833cb4f21213beb71c.tar.gz
If the user tries to save a capture file atop a file that has all its
write bits turned off or, on 4.4-Lite-based systems, has its "user immutable" bit turned on, ask them if they really want to overwrite the file (as those are both used to say "this file is precious, don't let me easily accidentally trash it") and, if the "user immutable" bit is set, turn it off first so that the move in the "safe save" won't fail. svn path=/trunk/; revision=43006
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m422
1 files changed, 22 insertions, 0 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index 45cbc1dfbb..052b2beb17 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -105,6 +105,28 @@ AC_DEFUN([AC_WIRESHARK_TIMEZONE_ABBREV],
#
+# AC_WIRESHARK_STRUCT_ST_FLAGS
+#
+dnl AC_STRUCT_ST_BLKSIZE extracted from the file in question,
+dnl "acspecific.m4" in GNU Autoconf 2.12, and turned into
+dnl AC_WIRESHARK_STRUCT_ST_FLAGS, which checks if "struct stat"
+dnl has the 4.4BSD "st_flags" member, and defines HAVE_ST_FLAGS; that's
+dnl what's in this file.
+dnl Done by Guy Harris <guy@alum.mit.edu> on 2012-06-02.
+
+dnl ### Checks for structure members
+
+AC_DEFUN([AC_WIRESHARK_STRUCT_ST_FLAGS],
+[AC_CACHE_CHECK([for st_flags in struct stat], ac_cv_wireshark_struct_st_flags,
+[AC_TRY_COMPILE([#include <sys/stat.h>], [struct stat s; s.st_flags;],
+ac_cv_wireshark_struct_st_flags=yes, ac_cv_wireshark_struct_st_flags=no)])
+if test $ac_cv_wireshark_struct_st_flags = yes; then
+ AC_DEFINE(HAVE_ST_FLAGS, 1, [Define if st_flags field exists in struct stat])
+fi
+])
+
+
+#
# AC_WIRESHARK_STRUCT_SA_LEN
#
dnl AC_STRUCT_ST_BLKSIZE extracted from the file in question,