[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[coreutils] [PATCH 1/4] stat: use gnulib's alignof module
From: |
Jim Meyering |
Subject: |
[coreutils] [PATCH 1/4] stat: use gnulib's alignof module |
Date: |
Mon, 31 May 2010 11:12:15 +0200 |
From: Jim Meyering <address@hidden>
* 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 | 1 +
src/stat.c | 7 +++----
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/bootstrap.conf b/bootstrap.conf
index 8d34d19..576d308 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -40,6 +40,7 @@ gnulib_modules="
$avoided_gnulib_modules
$obsolete_gnulib_modules
acl
+ alignof
alloca
announce-gen
areadlink-with-size
diff --git a/src/stat.c b/src/stat.c
index e6de541..39d3077 100644
--- a/src/stat.c
+++ b/src/stat.c
@@ -57,18 +57,17 @@
#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
--
1.7.1.348.gb26ba
- [coreutils] considering uncrustify for automatic indentation: prepare, Jim Meyering, 2010/05/31
- [coreutils] [PATCH 1/4] stat: use gnulib's alignof module,
Jim Meyering <=
- [coreutils] [PATCH 2/4] maint: correct indentation of case_GETOPT_* macro uses, Jim Meyering, 2010/05/31
- [coreutils] [PATCH 4/4] maint: make spacing around "=" consistent, even in IF_LINT, Jim Meyering, 2010/05/31
- [coreutils] [PATCH 3/4] maint: replace each "for (; ; )" with "while (true)", Jim Meyering, 2010/05/31
- Re: [coreutils] considering uncrustify for automatic indentation: prepare, Pádraig Brady, 2010/05/31