File extern_c_for_cpp.patch of Package soundtouch
diff --git a/source/SoundTouchDLL/SoundTouchDLL.h b/source/SoundTouchDLL/SoundTouchDLL.h
index 1dde9b0..98a1f32 100644
--- a/source/SoundTouchDLL/SoundTouchDLL.h
+++ b/source/SoundTouchDLL/SoundTouchDLL.h
@@ -33,16 +33,19 @@
#ifndef _SoundTouchDLL_h_
#define _SoundTouchDLL_h_
+#ifdef __cplusplus
+ #define EXTERN_C extern "C"
+#else
+ #define EXTERN_C
+#endif
+
#if defined(_WIN32) || defined(WIN32)
// Windows
- #ifndef __cplusplus
- #error "Expected g++"
- #endif
#ifdef DLL_EXPORTS
- #define SOUNDTOUCHDLL_API extern "C" __declspec(dllexport)
+ #define SOUNDTOUCHDLL_API EXTERN_C __declspec(dllexport)
#else
- #define SOUNDTOUCHDLL_API extern "C" __declspec(dllimport)
+ #define SOUNDTOUCHDLL_API EXTERN_C __declspec(dllimport)
#endif
#else
@@ -50,10 +53,10 @@
#if defined(DLL_EXPORTS) || defined(SoundTouchDLL_EXPORTS)
// GCC declaration for exporting functions
- #define SOUNDTOUCHDLL_API extern "C" __attribute__((__visibility__("default")))
+ #define SOUNDTOUCHDLL_API EXTERN_C __attribute__((__visibility__("default")))
#else
// import function
- #define SOUNDTOUCHDLL_API extern "C"
+ #define SOUNDTOUCHDLL_API EXTERN_C
#endif
// Linux-replacements for Windows declarations: