* lib/argp-parse.c: Include <stdalign.h>.
(alignof): Remove.
* modules/argp (Depends-on): Add stdalign.
---
ChangeLog | 5 +++++
lib/argp-parse.c | 2 +-
modules/argp | 1 +
3 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 99664de..379bd4b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,11 @@
stdalign-tests: new module
* modules/stdalign-tests, tests/test-stdalign.c: New files.
+ argp: use stdalign
+ * lib/argp-parse.c: Include <stdalign.h>.
+ (alignof): Remove.
+ * modules/argp (Depends-on): Add stdalign.
+
2011-10-15 Bruno Haible <[email protected]>
xstrtoll: Fix compilation failure.
diff --git a/lib/argp-parse.c b/lib/argp-parse.c
index 5cab8ce..64360be 100644
--- a/lib/argp-parse.c
+++ b/lib/argp-parse.c
@@ -21,6 +21,7 @@
#endif
#include <alloca.h>
+#include <stdalign.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
@@ -42,7 +43,6 @@
#include "argp.h"
#include "argp-namefrob.h"
-#define alignof(type) offsetof (struct { char c; type x; }, x)
#define alignto(n, d) ((((n) + (d) - 1) / (d)) * (d))
/* Getopt return values. */
diff --git a/modules/argp b/modules/argp
index fa39580..8d49681 100644
--- a/modules/argp
+++ b/modules/argp
@@ -35,6 +35,7 @@ strcase
extensions
vsnprintf
sleep
+stdalign
strerror
memchr
memmove
--
1.7.4.4