tar: only patch wordsplit.h, not wordsplit.c. (#627)

This commit is contained in:
fbrosson
2016-06-07 02:02:46 +00:00
parent 61ab12139a
commit 1e3c48d329
2 changed files with 20 additions and 11 deletions

View File

@@ -28,23 +28,32 @@ index ba24c43..09c344d 100644
From 3269fb640f76f56b450231ae78576c855da9dda1 Mon Sep 17 00:00:00 2001 From 3269fb640f76f56b450231ae78576c855da9dda1 Mon Sep 17 00:00:00 2001
From: fbrosson <fbrosson@localhost> From: fbrosson <fbrosson@localhost>
Date: Mon, 16 May 2016 18:46:10 +0000 Date: Sun, 5 Jun 2016 18:48:22 +0000
Subject: Use __attribute__ only if gcc > 2.95 (instead of gcc >= 2.7) Subject: Use __attribute__ only if gcc > 2.95 (instead of gcc >= 2.7)
diff --git a/lib/wordsplit.h b/lib/wordsplit.h diff --git a/lib/wordsplit.h b/lib/wordsplit.h
index e0d2559..627a626 100644 index e0d2559..c421467 100644
--- a/lib/wordsplit.h --- a/lib/wordsplit.h
+++ b/lib/wordsplit.h +++ b/lib/wordsplit.h
@@ -22,7 +22,7 @@ @@ -40,9 +40,17 @@ struct wordsplit
const char *ws_escape;
#include <stddef.h> void (*ws_alloc_die) (struct wordsplit * wsp);
void (*ws_error) (const char *, ...)
-#if 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
+#if 2 < __GNUC__ + (95 < __GNUC_MINOR__) +#if 2 < __GNUC__ + (95 < __GNUC_MINOR__)
# define __WORDSPLIT_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) __WORDSPLIT_ATTRIBUTE_FORMAT ((__printf__, 1, 2));
#else +#else
# define __WORDSPLIT_ATTRIBUTE_FORMAT(spec) /* empty */ + ;
+#endif
void (*ws_debug) (const char *, ...)
+#if 2 < __GNUC__ + (95 < __GNUC_MINOR__)
__WORDSPLIT_ATTRIBUTE_FORMAT ((__printf__, 1, 2));
+#else
+ ;
+#endif
const char **ws_env;
const char *(*ws_getvar) (const char *, size_t, void *);
-- --
2.7.0 2.7.0

View File

@@ -12,7 +12,7 @@ archives)."
HOMEPAGE="https://www.gnu.org/software/tar/" HOMEPAGE="https://www.gnu.org/software/tar/"
COPYRIGHT="1990-2016 Free Software Foundation, Inc." COPYRIGHT="1990-2016 Free Software Foundation, Inc."
LICENSE="GNU GPL v3" LICENSE="GNU GPL v3"
REVISION="1" REVISION="2"
SOURCE_URI="http://ftpmirror.gnu.org/tar/tar-$portVersion.tar.bz2" SOURCE_URI="http://ftpmirror.gnu.org/tar/tar-$portVersion.tar.bz2"
CHECKSUM_SHA256="236b11190c0a3a6885bdb8d61424f2b36a5872869aa3f7f695dea4b4843ae2f2" CHECKSUM_SHA256="236b11190c0a3a6885bdb8d61424f2b36a5872869aa3f7f695dea4b4843ae2f2"
PATCHES="tar-$portVersion.patchset" PATCHES="tar-$portVersion.patchset"