]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
stat: use gnulib's alignof module
authorJim Meyering <meyering@redhat.com>
Sat, 1 May 2010 09:29:39 +0000 (11:29 +0200)
committerJim Meyering <meyering@redhat.com>
Mon, 31 May 2010 09:02:21 +0000 (11:02 +0200)
* src/stat.c (alignof): Remove definition.
Instead, include "alignof.h", and sort the #include directives.
And get its definition from the gnulib module by that name:
* bootstrap.conf (gnulib_modules): Add alignof.

bootstrap.conf
src/stat.c

index 8d34d198f7c6d9b37432639c141c7c5ef5fab023..576d308dcefff5f64b0c453d09e77825588c442f 100644 (file)
@@ -40,6 +40,7 @@ gnulib_modules="
   $avoided_gnulib_modules
   $obsolete_gnulib_modules
   acl
+  alignof
   alloca
   announce-gen
   areadlink-with-size
index e6de541e2daeb347d152e5374515d7544e2b7033..39d30777ea4c0f5358dd86daf6c309d2e4565d8d 100644 (file)
 
 #include "system.h"
 
+#include "alignof.h"
+#include "areadlink.h"
 #include "error.h"
-#include "filemode.h"
 #include "file-type.h"
+#include "filemode.h"
 #include "fs.h"
 #include "getopt.h"
 #include "quote.h"
 #include "quotearg.h"
 #include "stat-time.h"
 #include "strftime.h"
-#include "areadlink.h"
-
-#define alignof(type) offsetof (struct { char c; type x; }, x)
 
 #if USE_STATVFS
 # define STRUCT_STATVFS struct statvfs