From b9c20aa8bab752e004c16a5e47ca6c61927fa610 Mon Sep 17 00:00:00 2001 From: Raphael Moll Date: Fri, 8 Nov 2013 11:40:41 -0800 Subject: [PATCH] Windows SDK: define BEGIN_DECLS/END_DECLS. These macros are not provided by MingW by default. Change-Id: I623fda6c8e25e26573543c9368ebad47abc7f5c3 --- .../include/arch/windows/AndroidConfig.h | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/core/combo/include/arch/windows/AndroidConfig.h b/core/combo/include/arch/windows/AndroidConfig.h index 83d0a0f573..0a52674d37 100644 --- a/core/combo/include/arch/windows/AndroidConfig.h +++ b/core/combo/include/arch/windows/AndroidConfig.h @@ -15,7 +15,7 @@ */ /* - * Android config -- "CYGWIN_NT-5.1". + * Android config -- "CYGWIN_NT-5.1". * * Cygwin has pthreads, but GDB seems to get confused if you use it to * create threads. By "confused", I mean it freezes up the first time the @@ -37,6 +37,24 @@ * comments. */ +/* MingW doesn't define __BEGIN_DECLS / __END_DECLS. */ + +#ifndef __BEGIN_DECLS +# ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# else +# define __BEGIN_DECLS +# endif +#endif + +#ifndef __END_DECLS +# ifdef __cplusplus +# define __END_DECLS } +# else +# define __END_DECLS +# endif +#endif + /* * Threading model. Choose one: *