Win32 DLL support for libpaysages_system
This commit is contained in:
parent
ad1a492884
commit
6ab664485a
3 changed files with 25 additions and 15 deletions
|
@ -15,7 +15,7 @@ namespace system
|
|||
/*!
|
||||
* \brief System mutex
|
||||
*/
|
||||
class Mutex: private QMutex
|
||||
class SYSTEMSHARED_EXPORT Mutex: private QMutex
|
||||
{
|
||||
public:
|
||||
/*!
|
||||
|
@ -39,10 +39,10 @@ extern "C" {
|
|||
typedef struct Mutex Mutex;
|
||||
#endif
|
||||
|
||||
Mutex* mutexCreate();
|
||||
void mutexDestroy(Mutex* mutex);
|
||||
void mutexAcquire(Mutex* mutex);
|
||||
void mutexRelease(Mutex* mutex);
|
||||
SYSTEMSHARED_EXPORT Mutex* mutexCreate();
|
||||
SYSTEMSHARED_EXPORT void mutexDestroy(Mutex* mutex);
|
||||
SYSTEMSHARED_EXPORT void mutexAcquire(Mutex* mutex);
|
||||
SYSTEMSHARED_EXPORT void mutexRelease(Mutex* mutex);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ namespace system
|
|||
/*!
|
||||
* \brief System thread
|
||||
*/
|
||||
class Thread: private QThread
|
||||
class SYSTEMSHARED_EXPORT Thread: private QThread
|
||||
{
|
||||
public:
|
||||
/*!
|
||||
|
@ -61,10 +61,10 @@ extern "C" {
|
|||
typedef struct Thread Thread;
|
||||
#endif
|
||||
|
||||
Thread* threadCreate(ThreadFunction function, void* data);
|
||||
void* threadJoin(Thread* thread);
|
||||
SYSTEMSHARED_EXPORT Thread* threadCreate(ThreadFunction function, void* data);
|
||||
SYSTEMSHARED_EXPORT void* threadJoin(Thread* thread);
|
||||
|
||||
void timeSleepMs(unsigned long ms);
|
||||
SYSTEMSHARED_EXPORT void timeSleepMs(unsigned long ms);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -1,21 +1,31 @@
|
|||
#ifndef SYSTEM_GLOBAL_H
|
||||
#define SYSTEM_GLOBAL_H
|
||||
|
||||
/* Shared object helpers */
|
||||
#ifdef __cplusplus
|
||||
#include <QtCore/qglobal.h>
|
||||
|
||||
#if defined(SYSTEM_LIBRARY)
|
||||
# define SYSTEMSHARED_EXPORT Q_DECL_EXPORT
|
||||
# include <QtCore/qglobal.h>
|
||||
# if defined(SYSTEM_LIBRARY)
|
||||
# define SYSTEMSHARED_EXPORT Q_DECL_EXPORT
|
||||
# else
|
||||
# define SYSTEMSHARED_EXPORT Q_DECL_IMPORT
|
||||
# endif
|
||||
#else
|
||||
# define SYSTEMSHARED_EXPORT Q_DECL_IMPORT
|
||||
# if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)
|
||||
# define SYSTEMSHARED_EXPORT __declspec(dllimport)
|
||||
# else
|
||||
# define SYSTEMSHARED_EXPORT
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Namespace using */
|
||||
#ifdef __cplusplus
|
||||
namespace paysages
|
||||
{
|
||||
namespace system {}
|
||||
}
|
||||
|
||||
using namespace paysages::system;
|
||||
#endif
|
||||
|
||||
/* Global import */
|
||||
|
||||
#endif // SYSTEM_GLOBAL_H
|
||||
|
|
Loading…
Reference in a new issue