1 diff -rNU3 dist.orig/gcc/cp/cfns.gperf dist/gcc/cp/cfns.gperf
2 --- dist.orig/gcc/cp/cfns.gperf 2018-08-24 00:40:38.917847976 +0200
3 +++ dist/gcc/cp/cfns.gperf 2018-08-24 00:43:45.613142399 +0200
6 +%define class-name libc_name
8 /* Copyright (C) 2000-2013 Free Software Foundation, Inc.
11 You should have received a copy of the GNU General Public License
12 along with GCC; see the file COPYING3. If not see
13 <http://www.gnu.org/licenses/>. */
17 -static unsigned int hash (const char *, unsigned int);
21 -const char * libc_name_p (const char *, unsigned int);
24 # The standard C library functions, for feeding to gperf; the result is used
25 diff -rNU3 dist.orig/gcc/cp/cfns.h dist/gcc/cp/cfns.h
26 --- dist.orig/gcc/cp/cfns.h 2018-08-24 00:40:38.913848077 +0200
27 +++ dist/gcc/cp/cfns.h 2018-08-24 00:49:31.228441865 +0200
29 -/* ANSI-C code produced by gperf version 3.0.3 */
30 -/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L ANSI-C cfns.gperf */
31 +/* C++ code produced by gperf version 3.0.3 */
32 +/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L C++ cfns.gperf */
34 #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
35 && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
37 #error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
43 /* Copyright (C) 2000-2013 Free Software Foundation, Inc.
46 You should have received a copy of the GNU General Public License
47 along with GCC; see the file COPYING3. If not see
48 <http://www.gnu.org/licenses/>. */
52 -static unsigned int hash (const char *, unsigned int);
56 -const char * libc_name_p (const char *, unsigned int);
57 /* maximum key range = 391, duplicates = 0 */
67 -hash (register const char *str, register unsigned int len)
71 + static inline unsigned int hash (const char *str, unsigned int len);
73 + static const char *libc_name_p (const char *str, unsigned int len);
77 +libc_name::hash (register const char *str, register unsigned int len)
79 static const unsigned short asso_values[] =
82 return hval + asso_values[(unsigned char)str[len - 1]];
87 -#ifdef __GNUC_STDC_INLINE__
88 -__attribute__ ((__gnu_inline__))
92 -libc_name_p (register const char *str, register unsigned int len)
93 +libc_name::libc_name_p (register const char *str, register unsigned int len)
97 diff -rNU3 dist.orig/gcc/cp/except.c dist/gcc/cp/except.c
98 --- dist.orig/gcc/cp/except.c 2018-08-24 00:40:38.917847976 +0200
99 +++ dist/gcc/cp/except.c 2018-08-24 00:49:19.820728889 +0200
100 @@ -1025,7 +1025,8 @@
101 unless the system headers are playing rename tricks, and if
102 they are, we don't want to be confused by them. */
104 - return !!libc_name_p (IDENTIFIER_POINTER (id), IDENTIFIER_LENGTH (id));
105 + return !!libc_name::libc_name_p (IDENTIFIER_POINTER (id),
106 + IDENTIFIER_LENGTH (id));
109 /* Returns nonzero if an exception of type FROM will be caught by a
110 diff -rNU3 dist.orig/gcc/cp/Make-lang.in dist/gcc/cp/Make-lang.in
111 --- dist.orig/gcc/cp/Make-lang.in 2018-08-24 00:40:38.913848077 +0200
112 +++ dist/gcc/cp/Make-lang.in 2018-08-24 00:41:40.240301781 +0200
114 # deleting the $(srcdir)/cp/cfns.h file.
117 - gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L ANSI-C \
118 + gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L C++ \
119 $(srcdir)/cp/cfns.gperf --output-file $(srcdir)/cp/cfns.h