Mercurial > hg > octave-kai > gnulib-hg
changeset 15996:3c249f388e46
argp: use stdalign
* lib/argp-parse.c: Include <stdalign.h>.
(alignof): Remove.
* modules/argp (Depends-on): Add stdalign.
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Sun, 16 Oct 2011 16:59:46 -0700 |
parents | d3ffa7ff0caf |
children | d8fd2f096b83 |
files | ChangeLog lib/argp-parse.c modules/argp |
diffstat | 3 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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.
--- 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. */