mirror of
https://github.com/libretro/libretro-3dengine.git
synced 2026-11-07 17:26:20 -10:00
shared.hpp reaches for <tr1/memory> and aliases std1 to std::tr1, with the toolchains that never had TR1 - QNX, iOS, macOS, Emscripten - switched over to the shim in include/compat instead. Two of them were not on that list. The NDK's libc++ has no <tr1/memory> either, so the Android build stopped at the include; it needs the shim's directory on the include path and the same std1 alias, which is all jni/Android.mk was missing. Emscripten was on the list under the name EMSCRIPTEN, which emcc does not define - the macro is __EMSCRIPTEN__ - so the alias resolved to std::tr1 while <tr1/memory> had already been redirected to the shim, and every use of std1 failed to compile. It only looked fine because nobody built it.
44 lines
1.3 KiB
C++
44 lines
1.3 KiB
C++
/*
|
|
* Libretro 3DEngine
|
|
* Copyright (C) 2013-2014 - Hans-Kristian Arntzen
|
|
* Copyright (C) 2013-2014 - Daniel De Matteis
|
|
* Copyright (C) 2013-2014 - Michael Lelli
|
|
*
|
|
* Libretro 3DEngine is free software: you can redistribute it and/or modify it under the terms
|
|
* of the GNU General Public License as published by the Free Software Found-
|
|
* ation, either version 3 of the License, or (at your option) any later version.
|
|
*
|
|
* Libretro 3DEngine is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
* PURPOSE. See the GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License along with Libretro 3DEngine.
|
|
* If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#ifndef SHARED_HPP__
|
|
#define SHARED_HPP__
|
|
|
|
#if defined(_MSC_VER)
|
|
#include <memory>
|
|
#ifdef _MSC_VER
|
|
#define snprintf _snprintf
|
|
#endif
|
|
#else
|
|
#include <tr1/memory>
|
|
#endif
|
|
|
|
#if defined(__QNX__) || defined(IOS) || defined(OSX) || defined(EMSCRIPTEN) || defined(__EMSCRIPTEN__) || defined(ANDROID)
|
|
namespace std1 = compat;
|
|
#else
|
|
namespace std1 = std::tr1;
|
|
#endif
|
|
|
|
#include <libretro.h>
|
|
|
|
extern retro_log_printf_t log_cb;
|
|
extern struct retro_sensor_interface sensor_cb;
|
|
|
|
#endif
|
|
|