Skip to content

Commit c5302d0

Browse files
authored
Merge pull request #157 from cscd98/mingw
mingw: use lower case windows.h
2 parents a0c7725 + 72c4b5a commit c5302d0

File tree

8 files changed

+32
-0
lines changed

8 files changed

+32
-0
lines changed

demo/win_service/client/main.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
/// \brief To create a basic Windows command line program.
22

3+
#if defined(__MINGW32__)
4+
#include <windows.h>
5+
#else
36
#include <Windows.h>
7+
#endif
48
#include <tchar.h>
59
#include <stdio.h>
610

demo/win_service/service/main.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
/// \brief To create a basic Windows Service in C++.
22
/// \see https://www.codeproject.com/Articles/499465/Simple-Windows-Service-in-Cplusplus
33

4+
#if defined(__MINGW32__)
5+
#include <windows.h>
6+
#else
47
#include <Windows.h>
8+
#endif
59
#include <tchar.h>
610
#include <string>
711

src/libipc/platform/win/condition.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@
44
#include <string>
55
#include <mutex>
66

7+
#if defined(__MINGW32__)
8+
#include <windows.h>
9+
#else
710
#include <Windows.h>
11+
#endif
812

913
#include "libipc/utility/log.h"
1014
#include "libipc/utility/scope_guard.h"

src/libipc/platform/win/mutex.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33
#include <cstdint>
44
#include <system_error>
55

6+
#if defined(__MINGW32__)
7+
#include <windows.h>
8+
#else
69
#include <Windows.h>
10+
#endif
711

812
#include "libipc/utility/log.h"
913

src/libipc/platform/win/semaphore.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22

33
#include <cstdint>
44

5+
#if defined(__MINGW32__)
6+
#include <windows.h>
7+
#else
58
#include <Windows.h>
9+
#endif
610

711
#include "libipc/utility/log.h"
812

src/libipc/platform/win/shm_win.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11

2+
#if defined(__MINGW32__)
3+
#include <windows.h>
4+
#else
25
#include <Windows.h>
6+
#endif
37

48
#include <string>
59
#include <utility>

src/libipc/platform/win/to_tchar.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
#pragma once
22

3+
#if defined(__MINGW32__)
4+
#include <windows.h>
5+
#else
36
#include <Windows.h>
7+
#endif
48

59
#include <type_traits>
610
#include <string>

test/test_sync.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,11 @@ TEST(PThread, Robust) {
3737
pthread_mutex_destroy(&mutex);
3838
}
3939
#elif defined(IPC_OS_WINDOWS_)
40+
#if defined(__MINGW32__)
41+
#include <windows.h>
42+
#else
4043
#include <Windows.h>
44+
#endif
4145
#include <tchar.h>
4246

4347
TEST(PThread, Robust) {

0 commit comments

Comments
 (0)