Hello, I'm attaching a patch with the following change-log:
1. Stop defining __BEGIN_DECLS and __END_DECLS in fts.h 2. Replace occurences of __BEGIN_DECLS with: extern "C" { 3. Replace occurences of __BEGIN_DECLS with: } Comment ======= __BEGIN_DECLS and __END_DECLS are already defined in the NetBSD's standard C library as an internal definition and redefinition of it causes errors. The possible solutions are to rename the definitions or take rid of them. Actually __BEGIN_DECLS and __END_DECLS are used only once and encapsulate 'extern "C" {' and '}', so they aren't really helping more then obfuscating the code. Regards, Kamil Rytarowski
>From a1649c349eceb81fc47f3ddbeeac08e56c40bb8e Mon Sep 17 00:00:00 2001 From: Kamil Rytarowski <n...@gmx.com> Date: Thu, 25 Jul 2013 17:10:00 +0200 Subject: [PATCH] Take rid of redefinitions of __BEGIN_DECLS and __END_DECLS causing build errors 1. Stop defining __BEGIN_DECLS and __END_DECLS in fts.h 2. Replace occurences of __BEGIN_DECLS with: extern "C" { 3. Replace occurences of __BEGIN_DECLS with: } Comment ======= __BEGIN_DECLS and __END_DECLS are already defined in the NetBSD's standard C library as an internal definition and redefinition of it causes errors. The possible solutions are to rename the definitions or take rid of them. Actually __BEGIN_DECLS and __END_DECLS are used only once and encapsulate 'extern "C" {' and '}', so they aren't really helping more then obfuscating the code. --- misc/fts.h | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/misc/fts.h b/misc/fts.h index a01cfa0..b147de4 100644 --- a/misc/fts.h +++ b/misc/fts.h @@ -39,13 +39,6 @@ #else # define __THROW -#ifdef __cplusplus -# define __BEGIN_DECLS extern "C" { -# define __END_DECLS } -#else -# define __BEGIN_DECLS -# define __END_DECLS -#endif #if defined(hpux) # define _D_EXACT_NAMLEN(d) ((d)->d_namlen) @@ -151,7 +144,9 @@ typedef struct _ftsent { char fts_name[1]; /*!< file name */ } FTSENT; -__BEGIN_DECLS +#ifdef __cplusplus +extern "C" { +#endif /** * Return list of children of the current node. @@ -204,6 +199,8 @@ RPM_GNUC_INTERNAL int Fts_set (FTS * sp, FTSENT * p, int instr) __THROW ; -__END_DECLS +#ifdef __cplusplus +} +#endif #endif /* fts.h */ -- 1.7.9.5
_______________________________________________ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint