From 87d12c2dc788e49f82e3bc91b825a40b8d1c2efc Mon Sep 17 00:00:00 2001 From: Irmen de Jong Date: Mon, 21 Oct 2019 22:00:10 +0200 Subject: Move WASM_DEPRECATED so that binaryen-c.h is selfcontained. Fixes #2054 (#2399) --- src/binaryen-c.h | 8 +++++++- src/compiler-support.h | 3 --- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/binaryen-c.h b/src/binaryen-c.h index ae0a06835..1015c65de 100644 --- a/src/binaryen-c.h +++ b/src/binaryen-c.h @@ -47,7 +47,13 @@ #include #include -#include "compiler-support.h" +#ifdef __GNUC__ +#define WASM_DEPRECATED __attribute__((deprecated)) +#elif defined(_MSC_VER) +#define WASM_DEPRECATED __declspec(deprecated) +#else +#define WASM_DEPRECATED +#endif #if defined(_MSC_VER) && !defined(BUILD_STATIC_LIBRARY) #define BINARYEN_API __declspec(dllexport) diff --git a/src/compiler-support.h b/src/compiler-support.h index 911d92ef5..c75676d54 100644 --- a/src/compiler-support.h +++ b/src/compiler-support.h @@ -50,13 +50,10 @@ #ifdef __GNUC__ #define WASM_NORETURN __attribute__((noreturn)) -#define WASM_DEPRECATED __attribute__((deprecated)) #elif defined(_MSC_VER) #define WASM_NORETURN __declspec(noreturn) -#define WASM_DEPRECATED __declspec(deprecated) #else #define WASM_NORETURN -#define WASM_DEPRECATED #endif // The code might contain TODOs or stubs that read some values but do nothing -- cgit v1.2.3