spu2x: declare exported function as stdcall

* Fix a stack buffer overflow on address sanitizer
* Might explain an old clang crash
This commit is contained in:
Gregory Hainaut 2015-04-16 23:14:12 +02:00
parent 545c1d387c
commit c456764342
4 changed files with 2 additions and 6 deletions

View File

@ -52,8 +52,6 @@ const char* GSUtil::GetLibName()
list<string> sl; list<string> sl;
// TODO: linux (gcc)
#ifdef __INTEL_COMPILER #ifdef __INTEL_COMPILER
sl.push_back(format("Intel C++ %d.%02d", __INTEL_COMPILER / 100, __INTEL_COMPILER % 100)); sl.push_back(format("Intel C++ %d.%02d", __INTEL_COMPILER / 100, __INTEL_COMPILER % 100));
#elif _MSC_VER #elif _MSC_VER

View File

@ -36,7 +36,7 @@
#endif #endif
PADconf* conf; PADconf* conf;
char libraryName[256]; static char libraryName[256];
keyEvent event; keyEvent event;

View File

@ -60,8 +60,6 @@ using namespace std;
#define EXPORT_C_(type) extern "C" __attribute__((externally_visible,visibility("default"))) type #define EXPORT_C_(type) extern "C" __attribute__((externally_visible,visibility("default"))) type
#endif #endif
extern char libraryName[256];
enum PadOptions enum PadOptions
{ {
PADOPTION_FORCEFEEDBACK = 0x1, PADOPTION_FORCEFEEDBACK = 0x1,

View File

@ -28,7 +28,7 @@
#ifdef _MSC_VER #ifdef _MSC_VER
#define EXPORT_C_(type) extern "C" __declspec(dllexport) type CALLBACK #define EXPORT_C_(type) extern "C" __declspec(dllexport) type CALLBACK
#else #else
#define EXPORT_C_(type) extern "C" __attribute__((externally_visible,visibility("default"))) type #define EXPORT_C_(type) extern "C" __attribute__((stdcall,externally_visible,visibility("default"))) type
#endif #endif
// We have our own versions that have the DLLExport attribute configured: // We have our own versions that have the DLLExport attribute configured: