Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 1 | From 53c5d0982f03fd0e24c4195d6e1e42b9ade9d500 Mon Sep 17 00:00:00 2001 |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 2 | From: Roy Li <rongqing.li@windriver.com> |
| 3 | Date: Wed, 27 May 2015 14:30:28 +0800 |
| 4 | Subject: [PATCH] fix the gcc version check |
| 5 | |
| 6 | Upstream-Status: pending |
| 7 | |
| 8 | "GCC diagnostic push" is gcc 4.6 feature, gcc 4.4.7 on centos did not know it |
| 9 | |
| 10 | Signed-off-by: Roy Li <rongqing.li@windriver.com> |
| 11 | --- |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 12 | apt-pkg/contrib/macros.h | 2 +- |
| 13 | apt-pkg/deb/debsrcrecords.cc | 4 ++-- |
| 14 | apt-pkg/srcrecords.cc | 4 ++-- |
| 15 | 3 files changed, 5 insertions(+), 5 deletions(-) |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 16 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 17 | diff --git a/apt-pkg/contrib/macros.h b/apt-pkg/contrib/macros.h |
| 18 | index 2727fd8..0ecae50 100644 |
| 19 | --- a/apt-pkg/contrib/macros.h |
| 20 | +++ b/apt-pkg/contrib/macros.h |
| 21 | @@ -136,7 +136,7 @@ |
| 22 | #endif |
| 23 | #endif |
| 24 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 25 | -#if __GNUC__ >= 4 |
| 26 | +#if __GNUC__ >= 4 + (6 >= __GNUC_MINOR__) |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 27 | #define APT_IGNORE_DEPRECATED_PUSH \ |
| 28 | _Pragma("GCC diagnostic push") \ |
| 29 | _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 30 | diff --git a/apt-pkg/deb/debsrcrecords.cc b/apt-pkg/deb/debsrcrecords.cc |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 31 | index e8295de..40160b2 100644 |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 32 | --- a/apt-pkg/deb/debsrcrecords.cc |
| 33 | +++ b/apt-pkg/deb/debsrcrecords.cc |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 34 | @@ -139,13 +139,13 @@ bool debSrcRecordParser::Files(std::vector<pkgSrcRecords::File> &F) |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 35 | for (std::vector<pkgSrcRecords::File2>::const_iterator f2 = F2.begin(); f2 != F2.end(); ++f2) |
| 36 | { |
| 37 | pkgSrcRecords::File2 f; |
| 38 | -#if __GNUC__ >= 4 |
| 39 | +#if __GNUC__ >= 4 + (6 >= __GNUC_MINOR__) |
| 40 | #pragma GCC diagnostic push |
| 41 | #pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
| 42 | #endif |
| 43 | f.MD5Hash = f2->MD5Hash; |
| 44 | f.Size = f2->Size; |
| 45 | -#if __GNUC__ >= 4 |
| 46 | +#if __GNUC__ >= 4 + (6 >= __GNUC_MINOR__) |
| 47 | #pragma GCC diagnostic pop |
| 48 | #endif |
| 49 | f.Path = f2->Path; |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 50 | diff --git a/apt-pkg/srcrecords.cc b/apt-pkg/srcrecords.cc |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 51 | index 53d7e60..1484828 100644 |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 52 | --- a/apt-pkg/srcrecords.cc |
| 53 | +++ b/apt-pkg/srcrecords.cc |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 54 | @@ -157,7 +157,7 @@ bool pkgSrcRecords::Parser::Files2(std::vector<pkgSrcRecords::File2> &F2)/*{{{*/ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 55 | for (std::vector<pkgSrcRecords::File>::const_iterator f = F.begin(); f != F.end(); ++f) |
| 56 | { |
| 57 | pkgSrcRecords::File2 f2; |
| 58 | -#if __GNUC__ >= 4 |
| 59 | +#if __GNUC__ >= 4 + (6 >= __GNUC_MINOR__) |
| 60 | #pragma GCC diagnostic push |
| 61 | #pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
| 62 | #endif |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 63 | @@ -165,7 +165,7 @@ bool pkgSrcRecords::Parser::Files2(std::vector<pkgSrcRecords::File2> &F2)/*{{{*/ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 64 | f2.Size = f->Size; |
| 65 | f2.Hashes.push_back(HashString("MD5Sum", f->MD5Hash)); |
| 66 | f2.FileSize = f->Size; |
| 67 | -#if __GNUC__ >= 4 |
| 68 | +#if __GNUC__ >= 4 + (6 >= __GNUC_MINOR__) |
| 69 | #pragma GCC diagnostic pop |
| 70 | #endif |
| 71 | f2.Path = f->Path; |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 72 | -- |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 73 | 2.1.4 |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 74 | |