mirror of
https://github.com/mutouyun/cpp-ipc.git
synced 2025-12-06 16:56:45 +08:00
using IPC_OS_* in test
This commit is contained in:
parent
e5bf3b7c84
commit
3cf7d5bcd5
@ -6,7 +6,8 @@
|
|||||||
|
|
||||||
#include "test.h"
|
#include "test.h"
|
||||||
|
|
||||||
#if defined(__linux__) || defined(__linux)
|
#include "libipc/platform/detail.h"
|
||||||
|
#if defined(IPC_OS_LINUX_)
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
@ -31,8 +32,7 @@ TEST(PThread, Robust) {
|
|||||||
pthread_mutex_unlock(&mutex);
|
pthread_mutex_unlock(&mutex);
|
||||||
pthread_mutex_destroy(&mutex);
|
pthread_mutex_destroy(&mutex);
|
||||||
}
|
}
|
||||||
#elif defined(WIN64) || defined(_WIN64) || defined(__WIN64__) || \
|
#elif defined(IPC_OS_WINDOWS_)
|
||||||
defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)
|
|
||||||
#include <Windows.h>
|
#include <Windows.h>
|
||||||
#include <tchar.h>
|
#include <tchar.h>
|
||||||
|
|
||||||
@ -48,7 +48,7 @@ TEST(PThread, Robust) {
|
|||||||
|
|
||||||
CloseHandle(lock);
|
CloseHandle(lock);
|
||||||
}
|
}
|
||||||
#endif // !__linux__
|
#endif // OS
|
||||||
|
|
||||||
#include "libipc/mutex.h"
|
#include "libipc/mutex.h"
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user