| @@ -1,30 +1,30 @@ | | | @@ -1,30 +1,30 @@ |
1 | $NetBSD: patch-src_hb-open-type-private.hh,v 1.2 2013/07/07 10:23:14 wiz Exp $ | | 1 | $NetBSD: patch-src_hb-open-type-private.hh,v 1.3 2014/06/05 16:36:19 wiz Exp $ |
2 | | | 2 | |
3 | Fix build with gcc 4.2.1 of FreeBSD 9.1. | | 3 | Fix build with gcc 4.2.1 of FreeBSD 9.1. |
4 | | | 4 | |
5 | Patch is taken from | | 5 | Patch is taken from |
6 | https://build.opensuse.org/package/view_file?file=mozilla-gcc43.patch&package=MozillaFirefox&project=home%3AWernerFink%3Abranches%3Amozilla | | 6 | https://build.opensuse.org/package/view_file?file=mozilla-gcc43.patch&package=MozillaFirefox&project=home%3AWernerFink%3Abranches%3Amozilla |
7 | | | 7 | |
8 | --- src/hb-open-type-private.hh.orig 2013-01-08 22:13:42.000000000 +0000 | | 8 | --- src/hb-open-type-private.hh.orig 2014-05-14 01:47:24.000000000 +0000 |
9 | +++ src/hb-open-type-private.hh | | 9 | +++ src/hb-open-type-private.hh |
10 | @@ -941,6 +941,11 @@ struct HeadlessArrayOf | | 10 | @@ -958,6 +958,11 @@ struct HeadlessArrayOf |
11 | DEFINE_SIZE_ARRAY (sizeof (USHORT), array); | | 11 | DEFINE_SIZE_ARRAY (sizeof (USHORT), array); |
12 | }; | | 12 | }; |
13 | | | 13 | |
14 | +#if __GNUC__ && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4)) | | 14 | +#if __GNUC__ && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4)) |
15 | +// work around GCC 4.3 bug where the search() function gets improperly | | 15 | +// work around GCC 4.3 bug where the search() function gets improperly |
16 | +// optimized away from some instantiations of this template | | 16 | +// optimized away from some instantiations of this template |
17 | +#pragma GCC visibility push(default) | | 17 | +#pragma GCC visibility push(default) |
18 | +#endif | | 18 | +#endif |
19 | | | 19 | |
20 | /* An array with sorted elements. Supports binary searching. */ | | 20 | /* An array with sorted elements. Supports binary searching. */ |
21 | template <typename Type> | | 21 | template <typename LenType, typename Type> |
22 | @@ -968,5 +973,8 @@ struct SortedArrayOf : ArrayOf<Type> { | | 22 | @@ -990,5 +995,8 @@ struct SortedArrayOf : GenericSortedArra |
23 | | | 23 | |
24 | } /* namespace OT */ | | 24 | } /* namespace OT */ |
25 | | | 25 | |
26 | +#if __GNUC__ && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4)) | | 26 | +#if __GNUC__ && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4)) |
27 | +#pragma GCC visibility pop | | 27 | +#pragma GCC visibility pop |
28 | +#endif | | 28 | +#endif |
29 | | | 29 | |
30 | #endif /* HB_OPEN_TYPE_PRIVATE_HH */ | | 30 | #endif /* HB_OPEN_TYPE_PRIVATE_HH */ |