Line
Link Here
|
0 |
-- emacs-24.3-orig/lib/stdalign.in.h |
0 |
++ emacs-24.3/lib/stdalign.in.h |
Lines 41-53
Link Here
|
41 |
are 4 unless the option '-malign-double' is used. |
41 |
are 4 unless the option '-malign-double' is used. |
42 |
|
42 |
|
43 |
The result cannot be used as a value for an 'enum' constant, if you |
43 |
The result cannot be used as a value for an 'enum' constant, if you |
44 |
want to be portable to HP-UX 10.20 cc and AIX 3.2.5 xlc. */ |
44 |
want to be portable to HP-UX 10.20 cc and AIX 3.2.5 xlc. |
|
|
45 |
|
46 |
Include <stddef.h> for offsetof. */ |
45 |
#include <stddef.h> |
47 |
#include <stddef.h> |
46 |
#if defined __cplusplus |
48 |
|
|
|
49 |
/* FreeBSD 9.1 <sys/cdefs.h>, included by <stddef.h> and lots of other |
50 |
standard headers, defines conflicting implementations of _Alignas |
51 |
and _Alignof that are no better than ours; override them. */ |
52 |
#undef _Alignas |
53 |
#undef _Alignof |
54 |
|
55 |
#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 |
56 |
# ifdef __cplusplus |
57 |
# if 201103 <= __cplusplus |
58 |
# define _Alignof(type) alignof (type) |
59 |
# else |
47 |
template <class __t> struct __alignof_helper { char __a; __t __b; }; |
60 |
template <class __t> struct __alignof_helper { char __a; __t __b; }; |
48 |
# define _Alignof(type) offsetof (__alignof_helper<type>, __b) |
61 |
# define _Alignof(type) offsetof (__alignof_helper<type>, __b) |
49 |
#else |
62 |
# endif |
50 |
# define _Alignof(type) offsetof (struct { char __a; type __b; }, __b) |
63 |
# else |
|
|
64 |
# define _Alignof(type) offsetof (struct { char __a; type __b; }, __b) |
65 |
# endif |
51 |
#endif |
66 |
#endif |
52 |
#define alignof _Alignof |
67 |
#define alignof _Alignof |
53 |
#define __alignof_is_defined 1 |
68 |
#define __alignof_is_defined 1 |
Lines 77-88
Link Here
|
77 |
|
92 |
|
78 |
*/ |
93 |
*/ |
79 |
|
94 |
|
80 |
#if __GNUC__ || __IBMC__ || __IBMCPP__ || 0x5110 <= __SUNPRO_C |
95 |
#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 |
81 |
# define _Alignas(a) __attribute__ ((__aligned__ (a))) |
96 |
# if defined __cplusplus && 201103 <= __cplusplus |
82 |
#elif 1300 <= _MSC_VER |
97 |
# define _Alignas(a) alignas (a) |
83 |
# define _Alignas(a) __declspec (align (a)) |
98 |
# elif __GNUC__ || __IBMC__ || __IBMCPP__ || __ICC || 0x5110 <= __SUNPRO_C |
|
|
99 |
# define _Alignas(a) __attribute__ ((__aligned__ (a))) |
100 |
# elif 1300 <= _MSC_VER |
101 |
# define _Alignas(a) __declspec (align (a)) |
102 |
# endif |
84 |
#endif |
103 |
#endif |
85 |
#ifdef _Alignas |
104 |
#if defined _Alignas || (defined __STDC_VERSION && 201112 <= __STDC_VERSION__) |
86 |
# define alignas _Alignas |
105 |
# define alignas _Alignas |
87 |
# define __alignas_is_defined 1 |
106 |
# define __alignas_is_defined 1 |
88 |
#endif |
107 |
#endif |
89 |
-- emacs-24.3-orig/lib/verify.h |
108 |
++ emacs-24.3/lib/verify.h |
Lines 40-45
Link Here
|
40 |
# define _GL_HAVE_STATIC_ASSERT 1 |
40 |
# define _GL_HAVE_STATIC_ASSERT 1 |
41 |
# endif |
41 |
# endif |
42 |
|
42 |
|
|
|
43 |
/* FreeBSD 9.1 <sys/cdefs.h>, included by <stddef.h> and lots of other |
44 |
system headers, defines a conflicting _Static_assert that is no |
45 |
better than ours; override it. */ |
46 |
#ifndef _GL_HAVE_STATIC_ASSERT |
47 |
# include <stddef.h> |
48 |
# undef _Static_assert |
49 |
#endif |
50 |
|
43 |
/* Each of these macros verifies that its argument R is nonzero. To |
51 |
/* Each of these macros verifies that its argument R is nonzero. To |
44 |
be portable, R should be an integer constant expression. Unlike |
52 |
be portable, R should be an integer constant expression. Unlike |
45 |
assert (R), there is no run-time overhead. |
53 |
assert (R), there is no run-time overhead. |
46 |
-- emacs-24.3-orig/m4/stdalign.m4 |
54 |
++ emacs-24.3/m4/stdalign.m4 |
Lines 31-37
AC_DEFUN([gl_STDALIGN_H],
Link Here
|
31 |
|
31 |
|
32 |
/* Test _Alignas only on platforms where gnulib can help. */ |
32 |
/* Test _Alignas only on platforms where gnulib can help. */ |
33 |
#if \ |
33 |
#if \ |
34 |
(__GNUC__ || __IBMC__ || __IBMCPP__ \ |
34 |
((defined __cplusplus && 201103 <= __cplusplus) \ |
|
|
35 |
|| __GNUC__ || __IBMC__ || __IBMCPP__ || __ICC \ |
35 |
|| 0x5110 <= __SUNPRO_C || 1300 <= _MSC_VER) |
36 |
|| 0x5110 <= __SUNPRO_C || 1300 <= _MSC_VER) |
36 |
int alignas (8) alignas_int = 1; |
37 |
int alignas (8) alignas_int = 1; |
37 |
char test_alignas[_Alignof (alignas_int) == 8 ? 1 : -1]; |
38 |
char test_alignas[_Alignof (alignas_int) == 8 ? 1 : -1]; |