einfo.h, rc.h.in: ensure __BEGIN_DECLS is defined

Some Standard C Libraries, like musl, don't define __BEGIN_DECLS
or __END_DECLS.  We add some ifdef magic to ensure these are
available.
This commit is contained in:
Anthony G. Basile 2014-10-21 09:31:07 -04:00
parent 9bf789f788
commit 4a08517cac
2 changed files with 20 additions and 0 deletions

View File

@ -48,6 +48,16 @@
# endif
#endif
#undef __BEGIN_DECLS
#undef __END_DECLS
#ifdef __cplusplus
# define __BEGIN_DECLS extern "C" {
# define __END_DECLS }
#else
# define __BEGIN_DECLS /* empty */
# define __END_DECLS /* empty */
#endif
__BEGIN_DECLS
/*! @brief Color types to use */

View File

@ -31,6 +31,16 @@
#include <stdbool.h>
#include <stdio.h>
#undef __BEGIN_DECLS
#undef __END_DECLS
#ifdef __cplusplus
# define __BEGIN_DECLS extern "C" {
# define __END_DECLS }
#else
# define __BEGIN_DECLS /* empty */
# define __END_DECLS /* empty */
#endif
__BEGIN_DECLS
#define RC_PREFIX "@PREFIX@"