Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 315147 Details for
Bug 420899
dev-libs/libgcrypt uses ugly inlining gcc hacks and doesn't compile with clang
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Suggested patch
0001-Fix-use-of-inline-to-avoid-multiple-declarations.patch (text/plain), 2.48 KB, created by
Michał Górny
on 2012-06-12 21:40:56 UTC
(
hide
)
Description:
Suggested patch
Filename:
MIME Type:
Creator:
Michał Górny
Created:
2012-06-12 21:40:56 UTC
Size:
2.48 KB
patch
obsolete
>From 0f9211dd66dcf4e3d9fe4b08baaf7feca722bebd Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <gentoo@mgorny.alt.pl> >Date: Tue, 12 Jun 2012 23:19:22 +0200 >Subject: [PATCH] Fix use of inline to avoid multiple declarations. > >The current code can result in multiple declarations of inline functions >which will fail at linking stage. This patch fixes that by adding >the 'inline' keywords to their prototypes as required by the C standard, >and removing 'extern'. > >The patch was tested both with __GNUC__ block enabled and disabled. >--- > mpi/mpi-inline.h | 2 +- > mpi/mpi-internal.h | 10 +++++----- > 2 files changed, 6 insertions(+), 6 deletions(-) > >diff --git a/mpi/mpi-inline.h b/mpi/mpi-inline.h >index 88d9f56..dbf408c 100644 >--- a/mpi/mpi-inline.h >+++ b/mpi/mpi-inline.h >@@ -29,7 +29,7 @@ > #define G10_MPI_INLINE_H > > #ifndef G10_MPI_INLINE_DECL >-#define G10_MPI_INLINE_DECL extern __inline__ >+#define G10_MPI_INLINE_DECL inline > #endif > > G10_MPI_INLINE_DECL mpi_limb_t >diff --git a/mpi/mpi-internal.h b/mpi/mpi-internal.h >index e75b7c6..31a513b 100644 >--- a/mpi/mpi-internal.h >+++ b/mpi/mpi-internal.h >@@ -183,23 +183,23 @@ void _gcry_mpi_lshift_limbs( gcry_mpi_t a, unsigned int count ); > > > /*-- mpih-add.c --*/ >-mpi_limb_t _gcry_mpih_add_1(mpi_ptr_t res_ptr, mpi_ptr_t s1_ptr, >+inline mpi_limb_t _gcry_mpih_add_1(mpi_ptr_t res_ptr, mpi_ptr_t s1_ptr, > mpi_size_t s1_size, mpi_limb_t s2_limb ); > mpi_limb_t _gcry_mpih_add_n( mpi_ptr_t res_ptr, mpi_ptr_t s1_ptr, > mpi_ptr_t s2_ptr, mpi_size_t size); >-mpi_limb_t _gcry_mpih_add(mpi_ptr_t res_ptr, mpi_ptr_t s1_ptr, mpi_size_t s1_size, >+inline mpi_limb_t _gcry_mpih_add(mpi_ptr_t res_ptr, mpi_ptr_t s1_ptr, mpi_size_t s1_size, > mpi_ptr_t s2_ptr, mpi_size_t s2_size); > > /*-- mpih-sub.c --*/ >-mpi_limb_t _gcry_mpih_sub_1( mpi_ptr_t res_ptr, mpi_ptr_t s1_ptr, >+inline mpi_limb_t _gcry_mpih_sub_1( mpi_ptr_t res_ptr, mpi_ptr_t s1_ptr, > mpi_size_t s1_size, mpi_limb_t s2_limb ); > mpi_limb_t _gcry_mpih_sub_n( mpi_ptr_t res_ptr, mpi_ptr_t s1_ptr, > mpi_ptr_t s2_ptr, mpi_size_t size); >-mpi_limb_t _gcry_mpih_sub(mpi_ptr_t res_ptr, mpi_ptr_t s1_ptr, mpi_size_t s1_size, >+inline mpi_limb_t _gcry_mpih_sub(mpi_ptr_t res_ptr, mpi_ptr_t s1_ptr, mpi_size_t s1_size, > mpi_ptr_t s2_ptr, mpi_size_t s2_size); > > /*-- mpih-cmp.c --*/ >-int _gcry_mpih_cmp( mpi_ptr_t op1_ptr, mpi_ptr_t op2_ptr, mpi_size_t size ); >+inline int _gcry_mpih_cmp( mpi_ptr_t op1_ptr, mpi_ptr_t op2_ptr, mpi_size_t size ); > > /*-- mpih-mul.c --*/ > >-- >1.7.10.2 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 420899
:
315143
|
315147