mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-20 00:47:28 +01:00
Don't use #warning (a GCC notion) with MSVC
This commit is contained in:
1 parent
824b87bb86
commit
d377dcaea8
3 files changed
+11
-5
No files matched your search
@@ -31,11 +31,14 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
// Note that Clang also defines __GNUC__.
|
||||
#ifdef __cplusplus
|
||||
#if __cplusplus >= 201103L
|
||||
#include <memory>
|
||||
#else
|
||||
#warning "Wuffs' C++ code requires -std=c++11 or later"
|
||||
#elif defined(__GNUC__)
|
||||
#warning "Wuffs' C++ code expects -std=c++11 or later"
|
||||
#elif defined(_MSC_VER)
|
||||
#pragma message("Wuffs' C++ code expects C++11 or later")
|
||||
#endif
|
||||
|
||||
extern "C" {
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
package data
|
||||
|
||||
const BaseAllImplC = "" +
|
||||
"#ifndef WUFFS_INCLUDE_GUARD__BASE\n#define WUFFS_INCLUDE_GUARD__BASE\n\n#if defined(WUFFS_IMPLEMENTATION) && !defined(WUFFS_CONFIG__MODULES)\n#define WUFFS_CONFIG__MODULES\n#define WUFFS_CONFIG__MODULE__BASE\n#endif\n\n// !! WUFFS MONOLITHIC RELEASE DISCARDS EVERYTHING ABOVE.\n\n// !! INSERT base/copyright\n\n#include <stdbool.h>\n#include <stdint.h>\n#include <stdlib.h>\n#include <string.h>\n\n#ifdef __cplusplus\n#if __cplusplus >= 201103L\n#include <memory>\n#else\n#warning \"Wuffs' C++ code requires -std=c++11 or later\"\n#endif\n\nextern \"C\" {\n#endif\n\n// !! INSERT base/all-public.h.\n\n// !! INSERT InterfaceDeclarations.\n\n" +
|
||||
"#ifndef WUFFS_INCLUDE_GUARD__BASE\n#define WUFFS_INCLUDE_GUARD__BASE\n\n#if defined(WUFFS_IMPLEMENTATION) && !defined(WUFFS_CONFIG__MODULES)\n#define WUFFS_CONFIG__MODULES\n#define WUFFS_CONFIG__MODULE__BASE\n#endif\n\n// !! WUFFS MONOLITHIC RELEASE DISCARDS EVERYTHING ABOVE.\n\n// !! INSERT base/copyright\n\n#include <stdbool.h>\n#include <stdint.h>\n#include <stdlib.h>\n#include <string.h>\n\n// Note that Clang also defines __GNUC__.\n#ifdef __cplusplus\n#if __cplusplus >= 201103L\n#include <memory>\n#elif defined(__GNUC__)\n#warning \"Wuffs' C++ code expects -std=c++11 or later\"\n#elif defined(_MSC_VER)\n#pragma message(\"Wuffs' C++ code expects C++11 or later\")\n#endif\n\nextern \"C\" {\n#endif\n\n// !! INSERT base/all-public.h.\n\n// !! INSERT InterfaceDeclarations.\n\n" +
|
||||
"" +
|
||||
"// ----------------\n\n#ifdef __cplusplus\n} // extern \"C\"\n#endif\n\n// WUFFS C HEADER ENDS HERE.\n#ifdef WUFFS_IMPLEMENTATION\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n// !! INSERT base/all-private.h.\n\n" +
|
||||
"" +
|
||||
|
||||
@@ -35,11 +35,14 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
// Note that Clang also defines __GNUC__.
|
||||
#ifdef __cplusplus
|
||||
#if __cplusplus >= 201103L
|
||||
#include <memory>
|
||||
#else
|
||||
#warning "Wuffs' C++ code requires -std=c++11 or later"
|
||||
#elif defined(__GNUC__)
|
||||
#warning "Wuffs' C++ code expects -std=c++11 or later"
|
||||
#elif defined(_MSC_VER)
|
||||
#pragma message("Wuffs' C++ code expects C++11 or later")
|
||||
#endif
|
||||
|
||||
extern "C" {
|
||||
|
||||
Reference in new issue
Block a user