diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2015-09-09 12:36:18 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2015-09-09 12:36:45 -0700 |
commit | 5a3122e1679575a8b4e24d3d965f6d6684ae118e (patch) | |
tree | 77dd3851262b5c2e008e0dc6a549233c5f105782 /lib | |
parent | ab21f61a552f038485d40218dfd94a16b843eb52 (diff) |
Merge from gnulib and texinfo
This incorporates:
2015-08-03 Improve port of stdalign to C++11
* lib/stdalign.in.h: Copy from gnulib.
* doc/misc/texinfo.tex: Copy from texinfo.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/stdalign.in.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/stdalign.in.h b/lib/stdalign.in.h index a990050b67..c6115b6dbe 100644 --- a/lib/stdalign.in.h +++ b/lib/stdalign.in.h @@ -64,7 +64,9 @@ # define _Alignof(type) offsetof (struct { char __a; type __b; }, __b) # endif #endif -#define alignof _Alignof +#if ! (defined __cplusplus && 201103 <= __cplusplus) +# define alignof _Alignof +#endif #define __alignof_is_defined 1 /* alignas (A), also known as _Alignas (A), aligns a variable or type @@ -105,8 +107,11 @@ # define _Alignas(a) __declspec (align (a)) # endif #endif -#if defined _Alignas || (defined __STDC_VERSION && 201112 <= __STDC_VERSION__) +#if ((defined _Alignas && ! (defined __cplusplus && 201103 <= __cplusplus)) \ + || (defined __STDC_VERSION && 201112 <= __STDC_VERSION__)) # define alignas _Alignas +#endif +#if defined alignas || (defined __cplusplus && 201103 <= __cplusplus) # define __alignas_is_defined 1 #endif |