Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 352840 Details for
Bug 473364
app-editors/emacs-24.3-r2: build fails on freebsd with gcc-4.6.3
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for emacs-24.3
emacs-24.3-gnulib-fbsd-9.1.patch (text/plain), 3.34 KB, created by
Ulrich Müller
on 2013-07-08 06:56:59 UTC
(
hide
)
Description:
Patch for emacs-24.3
Filename:
MIME Type:
Creator:
Ulrich Müller
Created:
2013-07-08 06:56:59 UTC
Size:
3.34 KB
patch
obsolete
>2013-07-08 Paul Eggert <eggert@cs.ucla.edu> > >Try to fix FreeBSD 9.1 porting problem (Bug#14812). >This incorporates the following merge from gnulib: >2013-07-07 stdalign, verify: port to FreeBSD 9.1, to C11, and to C++11 > >--- emacs-24.3-orig/lib/stdalign.in.h >+++ emacs-24.3/lib/stdalign.in.h >@@ -41,13 +41,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 <stddef.h> for offsetof. */ > #include <stddef.h> >-#if defined __cplusplus >+ >+/* FreeBSD 9.1 <sys/cdefs.h>, included by <stddef.h> 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 <class __t> struct __alignof_helper { char __a; __t __b; }; >-# define _Alignof(type) offsetof (__alignof_helper<type>, __b) >-#else >-# define _Alignof(type) offsetof (struct { char __a; type __b; }, __b) >+# define _Alignof(type) offsetof (__alignof_helper<type>, __b) >+# endif >+# else >+# define _Alignof(type) offsetof (struct { char __a; type __b; }, __b) >+# endif > #endif > #define alignof _Alignof > #define __alignof_is_defined 1 >@@ -77,12 +92,16 @@ > > */ > >-#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__ || __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 >--- emacs-24.3-orig/lib/verify.h >+++ emacs-24.3/lib/verify.h >@@ -40,6 +40,14 @@ > # define _GL_HAVE_STATIC_ASSERT 1 > # endif > >+/* FreeBSD 9.1 <sys/cdefs.h>, included by <stddef.h> and lots of other >+ system headers, defines a conflicting _Static_assert that is no >+ better than ours; override it. */ >+#ifndef _GL_HAVE_STATIC_ASSERT >+# include <stddef.h> >+# undef _Static_assert >+#endif >+ > /* Each of these macros verifies that its argument R is nonzero. To > be portable, R should be an integer constant expression. Unlike > assert (R), there is no run-time overhead. >--- emacs-24.3-orig/m4/stdalign.m4 >+++ emacs-24.3/m4/stdalign.m4 >@@ -31,7 +31,8 @@ AC_DEFUN([gl_STDALIGN_H], > > /* Test _Alignas only on platforms where gnulib can help. */ > #if \ >- (__GNUC__ || __IBMC__ || __IBMCPP__ \ >+ ((defined __cplusplus && 201103 <= __cplusplus) \ >+ || __GNUC__ || __IBMC__ || __IBMCPP__ || __ICC \ > || 0x5110 <= __SUNPRO_C || 1300 <= _MSC_VER) > int alignas (8) alignas_int = 1; > char test_alignas[_Alignof (alignas_int) == 8 ? 1 : -1];
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 473364
:
350998
|
351000
|
351002
|
351366
| 352840