winpr: fix calling convention declarations

This commit is contained in:
Marc-André Moreau 2014-02-28 14:58:50 -05:00
parent 6695873394
commit 41236e87e3
2 changed files with 19 additions and 0 deletions

View File

@ -73,6 +73,24 @@
#endif
#endif
#if defined(_WIN32) || defined(__CYGWIN__)
#ifdef __GNUC__
#define DECLSPEC_EXPORT __attribute__((dllexport))
#define DECLSPEC_IMPORT __attribute__((dllimport))
#else
#define DECLSPEC_EXPORT __declspec(dllexport)
#define DECLSPEC_IMPORT __declspec(dllimport)
#endif
#else
#if defined(__GNUC__) && __GNUC__ >= 4
#define DECLSPEC_EXPORT __attribute__ ((visibility("default")))
#define DECLSPEC_IMPORT
#else
#define DECLSPEC_EXPORT
#define DECLSPEC_IMPORT
#endif
#endif
#ifndef DECLSPEC_NORETURN
#if (defined(__GNUC__) || defined(_MSC_VER) || defined(__clang__))
#define DECLSPEC_NORETURN __declspec(noreturn)

View File

@ -39,6 +39,7 @@
#ifndef _WIN32
#define WINAPI
#define CDECL
#define __int8 char
#define __int16 short