Skip to content

Commit

Permalink
libgpg_error: allow header files to be parsed by gcc2. (#2133)
Browse files Browse the repository at this point in the history
  • Loading branch information
fbrosson committed Jan 17, 2018
1 parent 6ea4afd commit ca8ece7
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 1 deletion.
2 changes: 1 addition & 1 deletion dev-libs/libgpg_error/libgpg_error-1.27.recipe
Expand Up @@ -5,7 +5,7 @@ DirMngr, Pinentry, SmartCard Daemon and more."
HOMEPAGE="https://www.gnupg.org/related_software/libraries.en.html#lib-libgpg-error"
COPYRIGHT="2003-2016 g10 Code GmbH"
LICENSE="GNU LGPL v2.1"
REVISION="3"
REVISION="4"
SOURCE_URI="https://www.gnupg.org/ftp/gcrypt/libgpg-error/libgpg-error-$portVersion.tar.bz2"
CHECKSUM_SHA256="4f93aac6fecb7da2b92871bb9ee33032be6a87b174f54abf8ddf0911a22d29d2"
SOURCE_DIR="libgpg-error-$portVersion"
Expand Down
48 changes: 48 additions & 0 deletions dev-libs/libgpg_error/patches/libgpg_error-1.27.patchset
Expand Up @@ -20,3 +20,51 @@ index ea58503..93cfef2 100644
--
1.8.3.4


From 148704497e457b5d82d2d6d4d338f971a273a001 Mon Sep 17 00:00:00 2001
From: fbrosson <fbrosson@localhost>
Date: Wed, 17 Jan 2018 22:03:45 +0000
Subject: Do not use __GNUC_PATCHLEVEL__ if it's not defined.


diff --git a/doc/yat2m.c b/doc/yat2m.c
index 9b76f19..6cda15a 100644
--- a/doc/yat2m.c
+++ b/doc/yat2m.c
@@ -105,9 +105,14 @@


#if __GNUC__
+# ifdef __GNUC_PATCHLEVEL__
# define MY_GCC_VERSION (__GNUC__ * 10000 \
+ __GNUC_MINOR__ * 100 \
+ __GNUC_PATCHLEVEL__)
+# else
+# define MY_GCC_VERSION (__GNUC__ * 10000 \
+ + __GNUC_MINOR__ * 100)
+# endif
#else
# define MY_GCC_VERSION 0
#endif
diff --git a/src/gpg-error.h.in b/src/gpg-error.h.in
index 988898e..222a9b7 100644
--- a/src/gpg-error.h.in
+++ b/src/gpg-error.h.in
@@ -142,9 +142,14 @@ typedef unsigned int gpg_error_t;

/* GCC feature test. */
#if __GNUC__
+# ifdef __GNUC_PATCHLEVEL__
# define _GPG_ERR_GCC_VERSION (__GNUC__ * 10000 \
+ __GNUC_MINOR__ * 100 \
+ __GNUC_PATCHLEVEL__)
+# else
+# define _GPG_ERR_GCC_VERSION (__GNUC__ * 10000 \
+ + __GNUC_MINOR__ * 100)
+# endif
#else
# define _GPG_ERR_GCC_VERSION 0
#endif
--
2.15.1

0 comments on commit ca8ece7

Please sign in to comment.