aboutsummaryrefslogtreecommitdiff
path: root/repos/clang/gperf
diff options
context:
space:
mode:
Diffstat (limited to 'repos/clang/gperf')
-rw-r--r--repos/clang/gperf/.checksum3
-rw-r--r--repos/clang/gperf/.files9
-rw-r--r--repos/clang/gperf/abuild6
-rw-r--r--repos/clang/gperf/gperf-3.1-clang-16-wregister.patch21
-rw-r--r--repos/clang/gperf/gperf-3.1-strncmp-decl-mismatch.patch28
5 files changed, 67 insertions, 0 deletions
diff --git a/repos/clang/gperf/.checksum b/repos/clang/gperf/.checksum
new file mode 100644
index 00000000..02812024
--- /dev/null
+++ b/repos/clang/gperf/.checksum
@@ -0,0 +1,3 @@
+543e8c16ce9bc36de79ce5401037f518f7ce4e5f85946ee29784c06e351d76bb gperf-3.1-clang-16-wregister.patch
+918b240f786da47e7edb2db43b3ec3a803f056c8610e96e821f6f4ad77fbe78e gperf-3.1-strncmp-decl-mismatch.patch
+7023ada08089bb46d7c000af7a6eaded9b4cf0ec2d1018d28a1a1425a4ec5680 gperf-3.1.tar.gz
diff --git a/repos/clang/gperf/.files b/repos/clang/gperf/.files
new file mode 100644
index 00000000..3a9c8cb4
--- /dev/null
+++ b/repos/clang/gperf/.files
@@ -0,0 +1,9 @@
+drwxr-xr-x root/root usr/
+drwxr-xr-x root/root usr/bin/
+-rwxr-xr-x root/root usr/bin/gperf
+drwxr-xr-x root/root usr/share/
+drwxr-xr-x root/root usr/share/info/
+-rw-r--r-- root/root usr/share/info/gperf.info.gz
+drwxr-xr-x root/root usr/share/man/
+drwxr-xr-x root/root usr/share/man/man1/
+-rw-r--r-- root/root usr/share/man/man1/gperf.1.gz
diff --git a/repos/clang/gperf/abuild b/repos/clang/gperf/abuild
new file mode 100644
index 00000000..4327723c
--- /dev/null
+++ b/repos/clang/gperf/abuild
@@ -0,0 +1,6 @@
+name=gperf
+version=3.1
+release=1
+source="https://ftp.gnu.org/gnu/$name/$name-$version.tar.gz
+ gperf-${version}-clang-16-wregister.patch
+ gperf-${version}-strncmp-decl-mismatch.patch"
diff --git a/repos/clang/gperf/gperf-3.1-clang-16-wregister.patch b/repos/clang/gperf/gperf-3.1-clang-16-wregister.patch
new file mode 100644
index 00000000..4bbcca6d
--- /dev/null
+++ b/repos/clang/gperf/gperf-3.1-clang-16-wregister.patch
@@ -0,0 +1,21 @@
+https://bugs.gentoo.org/882787
+https://git.savannah.gnu.org/gitweb/?p=gperf.git;a=commit;h=a63b830554920476881837eeacd4a6b507632b19
+
+From a63b830554920476881837eeacd4a6b507632b19 Mon Sep 17 00:00:00 2001
+From: Bruno Haible <bruno@clisp.org>
+Date: Sun, 30 Aug 2020 12:36:15 +0200
+Subject: [PATCH] Make the code C++17 compliant.
+
+* lib/getline.cc (getstr): Don't use the 'register' keyword.
+
+--- a/lib/getline.cc
++++ b/lib/getline.cc
+@@ -55,7 +55,7 @@ getstr (char **lineptr, size_t *n, FILE *stream, char terminator, size_t offset)
+
+ for (;;)
+ {
+- register int c = getc (stream);
++ int c = getc (stream);
+
+ /* We always want at least one char left in the buffer, since we
+ always (unless we get an error while reading the first char)
diff --git a/repos/clang/gperf/gperf-3.1-strncmp-decl-mismatch.patch b/repos/clang/gperf/gperf-3.1-strncmp-decl-mismatch.patch
new file mode 100644
index 00000000..67380fb0
--- /dev/null
+++ b/repos/clang/gperf/gperf-3.1-strncmp-decl-mismatch.patch
@@ -0,0 +1,28 @@
+https://bugs.gentoo.org/869134
+
+From 09844ce4ca3d5975469640cea9c5414d5c0baa44 Mon Sep 17 00:00:00 2001
+From: Bruno Haible <bruno@clisp.org>
+Date: Thu, 8 Sep 2022 04:45:03 +0200
+Subject: [PATCH] Fix a warning regarding strncmp.
+
+Reported by Sam James in <https://savannah.gnu.org/bugs/?63031>.
+
+* lib/getopt.c (strncmp): Declare with a prototype.
+--- a/lib/getopt.c
++++ b/lib/getopt.c
+@@ -194,7 +194,6 @@ static char *posixly_correct;
+ whose names are inconsistent. */
+
+ extern char *getenv ();
+-extern int strncmp ();
+
+ static char *
+ my_index (const char *str, int chr)
+@@ -209,6 +208,7 @@ my_index (const char *str, int chr)
+ }
+
+ extern int strcmp (const char *, const char *);
++extern int strncmp (const char *, const char *, size_t);
+ extern size_t strlen (const char *);
+
+ #endif /* not __GNU_LIBRARY__ */