summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2023-04-19 10:08:46 +0200
committerUlrich Müller <ulm@gentoo.org>2023-04-19 10:09:47 +0200
commitec04583bc2ab4515cffc7f3677fb35eddb615610 (patch)
treefc5736cd1f5dd58fa0f6ed3df20567c8b0f8a687 /app-editors/joe
parentmedia-libs/rubberband: Stabilize 3.1.2 ppc, #904553 (diff)
downloadgentoo-ec04583bc2ab4515cffc7f3677fb35eddb615610.tar.gz
gentoo-ec04583bc2ab4515cffc7f3677fb35eddb615610.tar.bz2
gentoo-ec04583bc2ab4515cffc7f3677fb35eddb615610.zip
app-editors/joe: Port to C99
Closes: https://bugs.gentoo.org/900164 Signed-off-by: Ulrich Müller <ulm@gentoo.org>
Diffstat (limited to 'app-editors/joe')
-rw-r--r--app-editors/joe/files/joe-4.6-c99.patch59
-rw-r--r--app-editors/joe/joe-4.6-r2.ebuild3
2 files changed, 61 insertions, 1 deletions
diff --git a/app-editors/joe/files/joe-4.6-c99.patch b/app-editors/joe/files/joe-4.6-c99.patch
new file mode 100644
index 000000000000..8d7a64a6419f
--- /dev/null
+++ b/app-editors/joe/files/joe-4.6-c99.patch
@@ -0,0 +1,59 @@
+https://bugs.gentoo.org/900164
+Patch from https://sourceforge.net/p/joe-editor/mercurial/merge-requests/3/
+
+commit 26e83257075789d901cadbe280ff7f1bd7602983
+Authored by: Nikita Popov 2023-01-31
+
+ Port to C99
+
+ Ensure that functions are declared before use for compatibility
+ with newer compiler versions.
+
+--- a/acinclude.m4
++++ b/acinclude.m4
+@@ -9,7 +9,7 @@
+ int main() {
+ int a = 0;
+ isblank(a++);
+- exit(a != 1);
++ return a != 1;
+ }
+ ],
+ [joe_cv_isblank=yes],
+@@ -34,7 +34,7 @@
+ #endif
+ int main() {
+ /* exit succesfully if setpgrp() takes two args (*BSD systems) */
+- exit(setpgrp(0, 0) != 0);
++ return setpgrp(0, 0) != 0;
+ }],
+ [joe_cv_setpgrp_void=no],
+ [joe_cv_setpgrp_void=yes],
+@@ -95,7 +95,7 @@
+ kill((int)getpid(), SIGINT);
+ kill((int)getpid(), SIGINT);
+ /* exit succesfully if don't have to reinstall sighandler when invoked */
+- exit(nsigint != 2);
++ return nsigint != 2;
+ }],
+ [joe_cv_reinstall_sighandlers=no],
+ [joe_cv_reinstall_sighandlers=yes],
+--- a/joe/selinux.c
++++ b/joe/selinux.c
+@@ -6,6 +6,7 @@
+
+ #ifdef WITH_SELINUX
+ #include <selinux/selinux.h>
++#include <error.h>
+ static int selinux_enabled = -1;
+ #endif
+
+@@ -108,7 +109,7 @@
+ return 0;
+
+ if (setfscreatecon(0) < 0) {
+- error(0, errno, joe_gettext(_("Could not reset default security context")));
++ error(0, errno, "%s", joe_gettext(_("Could not reset default security context")));
+ return 1;
+ }
+ #endif
diff --git a/app-editors/joe/joe-4.6-r2.ebuild b/app-editors/joe/joe-4.6-r2.ebuild
index 1f5bdf049228..ef18848b930d 100644
--- a/app-editors/joe/joe-4.6-r2.ebuild
+++ b/app-editors/joe/joe-4.6-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -22,6 +22,7 @@ PATCHES=(
"${FILESDIR}/${PN}-4.3-tinfo.patch"
"${FILESDIR}/${P}-db.patch"
"${FILESDIR}/${P}-prototypes.patch"
+ "${FILESDIR}/${P}-c99.patch"
)
DOCS=( README.md NEWS.md docs/hacking.md docs/man.md )