[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 3/5] argp: use stdalign
From: |
Paul Eggert |
Subject: |
[PATCH 3/5] argp: use stdalign |
Date: |
Sun, 16 Oct 2011 17:28:01 -0700 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.23) Gecko/20110922 Thunderbird/3.1.15 |
* 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 <address@hidden>
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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH 3/5] argp: use stdalign,
Paul Eggert <=