]> Savannah Git Hosting - gnulib.git/commitdiff
argp: use stdalign
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 16 Oct 2011 23:59:46 +0000 (16:59 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 27 Oct 2011 20:05:42 +0000 (13:05 -0700)
* lib/argp-parse.c: Include <stdalign.h>.
(alignof): Remove.
* modules/argp (Depends-on): Add stdalign.

ChangeLog
lib/argp-parse.c
modules/argp

index 7b607346eef1d9ac6a4e148571cd80c8884b167b..0b9d921381215478093bc86cca7147dede5ffccf 100644 (file)
--- 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-27  Bruno Haible  <bruno@clisp.org>
 
        raise test: Avoid a test failure on Linux/MIPS.
index 5cab8cec3521093fc428bf51242e782ff150be04..64360beac05a455fd7fc37936c971e64ea734c80 100644 (file)
@@ -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.  */
index fa39580eaf0efc9fe3652d3548b28c9f79271014..8d496812d846d5f102d15b78f376934f123f307f 100644 (file)
@@ -35,6 +35,7 @@ strcase
 extensions
 vsnprintf
 sleep
+stdalign
 strerror
 memchr
 memmove