summaryrefslogtreecommitdiff
path: root/m4/stat-size.m4
diff options
context:
space:
mode:
authorJames Youngman <jay@gnu.org>2011-06-11 01:15:39 +0100
committerJames Youngman <jay@gnu.org>2011-06-11 12:52:22 +0100
commit9fc77bc59374e21e1174742df416af186a368e14 (patch)
tree85753a7dd655e49e7f98c8d832704cfd2212914b /m4/stat-size.m4
parentf462d86108d41b1ca0f48b51caad6c696d67d8fd (diff)
downloadgnulib-9fc77bc59374e21e1174742df416af186a368e14.tar.gz
New module 'stat-size'.
* modules/stat-size: New module. Provides macros for accessing file size information in instances of struct stat. Depends on the fileblocks module because it calls st_blocks. * lib/stat-size.h: New file, adapted from coreutils' system.h. * doc/gnulib.texi: Include stat-size.texi. * doc/stat-size.texi: Documentation for this module. * m4/stat-size.m4: New file; defines gl_STAT_SIZE. * m4/fileblocks.m4: Mention that stat-size depends on the call to AC_STRUCT_ST_BLOCKS.
Diffstat (limited to 'm4/stat-size.m4')
-rw-r--r--m4/stat-size.m414
1 files changed, 14 insertions, 0 deletions
diff --git a/m4/stat-size.m4 b/m4/stat-size.m4
new file mode 100644
index 0000000000..fa4e6b9e91
--- /dev/null
+++ b/m4/stat-size.m4
@@ -0,0 +1,14 @@
+#serial 1
+
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_STAT_SIZE],
+[
+ # Don't call AC_STRUCT_ST_BLOCKS because it causes bugs. Details at
+ # http://lists.gnu.org/archive/html/bug-gnulib/2011-06/msg00051.html
+ AC_CHECK_HEADERS_ONCE([sys/param.h])
+])