X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=gnu%2Fstdalign.in.h;fp=gnu%2Fstdalign.in.h;h=6f1f4d540b6009ff612e9f2ca0b1dae643dec239;hb=4aa85f09e755fc827cd5ab6225f20c83cd42245d;hp=7256ede92ebe608ec599fa290fc68bb8a4e2c400;hpb=eb3ba7cb06fdd0f8627b8f117d8453e297e18b64;p=debian%2Ftar diff --git a/gnu/stdalign.in.h b/gnu/stdalign.in.h index 7256ede9..6f1f4d54 100644 --- a/gnu/stdalign.in.h +++ b/gnu/stdalign.in.h @@ -2,7 +2,7 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A substitute for ISO C11 . - Copyright 2011-2013 Free Software Foundation, Inc. + Copyright 2011-2014 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -43,13 +43,28 @@ are 4 unless the option '-malign-double' is used. The result cannot be used as a value for an 'enum' constant, if you - want to be portable to HP-UX 10.20 cc and AIX 3.2.5 xlc. */ + want to be portable to HP-UX 10.20 cc and AIX 3.2.5 xlc. + + Include for offsetof. */ #include -#if defined __cplusplus + +/* FreeBSD 9.1 , included by and lots of other + standard headers, defines conflicting implementations of _Alignas + and _Alignof that are no better than ours; override them. */ +#undef _Alignas +#undef _Alignof + +#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 +# ifdef __cplusplus +# if 201103 <= __cplusplus +# define _Alignof(type) alignof (type) +# else template struct __alignof_helper { char __a; __t __b; }; -# define _Alignof(type) offsetof (__alignof_helper, __b) -#else -# define _Alignof(type) offsetof (struct { char __a; type __b; }, __b) +# define _Alignof(type) offsetof (__alignof_helper, __b) +# endif +# else +# define _Alignof(type) offsetof (struct { char __a; type __b; }, __b) +# endif #endif #define alignof _Alignof #define __alignof_is_defined 1 @@ -79,12 +94,17 @@ */ -#if __GNUC__ || __IBMC__ || __IBMCPP__ || 0x5110 <= __SUNPRO_C -# define _Alignas(a) __attribute__ ((__aligned__ (a))) -#elif 1300 <= _MSC_VER -# define _Alignas(a) __declspec (align (a)) +#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 +# if defined __cplusplus && 201103 <= __cplusplus +# define _Alignas(a) alignas (a) +# elif (__GNUC__ || __HP_cc || __HP_aCC || __IBMC__ || __IBMCPP__ \ + || __ICC || 0x5110 <= __SUNPRO_C) +# define _Alignas(a) __attribute__ ((__aligned__ (a))) +# elif 1300 <= _MSC_VER +# define _Alignas(a) __declspec (align (a)) +# endif #endif -#ifdef _Alignas +#if defined _Alignas || (defined __STDC_VERSION && 201112 <= __STDC_VERSION__) # define alignas _Alignas # define __alignas_is_defined 1 #endif