aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2021-12-24 12:13:08 +0000
committerDimitry Andric <dim@FreeBSD.org>2021-12-24 12:13:08 +0000
commitb5cbe4e981254184d94b307b7dce0405ffcb0f3f (patch)
treec4f2a402f7c2d1b6e7468b0ec359697376f018c9
parenta086650f6dc864806e65d8020f6eae58a1da0ea5 (diff)
downloadsrc-b5cbe4e981254184d94b307b7dce0405ffcb0f3f.tar.gz
src-b5cbe4e981254184d94b307b7dce0405ffcb0f3f.zip
Fix gcc gperf prototypes to avoid redeclaration errors
Otherwise, building stable/12's gcc on recent -CURRENT will result in redeclaration errors: In file included from /usr/src/contrib/gcc/cp/except.c:892: /usr/src/contrib/gcc/cp/cfns.gperf:20:1: error: conflicting types for 'hash' hash (register const char *str, register size_t len) ^ /usr/src/contrib/gcc/cp/cfns.gperf:5:21: note: previous declaration is here static unsigned int hash (const char *, unsigned int); ^ /usr/src/contrib/gcc/cp/cfns.gperf:78:1: error: conflicting types for 'libc_name_p' libc_name_p (register const char *str, register size_t len) ^ /usr/src/contrib/gcc/cp/cfns.gperf:9:14: note: previous declaration is here const char * libc_name_p (const char *, unsigned int); ^ Direct commit to stable/12, since gcc is gone in stable/13 and later.
-rw-r--r--contrib/gcc/cp/cfns.gperf4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/gcc/cp/cfns.gperf b/contrib/gcc/cp/cfns.gperf
index c713eb0c2bdd..079926562919 100644
--- a/contrib/gcc/cp/cfns.gperf
+++ b/contrib/gcc/cp/cfns.gperf
@@ -2,11 +2,11 @@
#ifdef __GNUC__
__inline
#endif
-static unsigned int hash (const char *, unsigned int);
+static unsigned int hash (register const char *, register size_t);
#ifdef __GNUC__
__inline
#endif
-const char * libc_name_p (const char *, unsigned int);
+const char * libc_name_p (register const char *, register size_t);
%}
%%
# The standard C library functions, for feeding to gperf; the result is used