File tree Expand file tree Collapse file tree 5 files changed +29
-11
lines changed Expand file tree Collapse file tree 5 files changed +29
-11
lines changed Original file line number Diff line number Diff line change
1
+ // ===-- include/flang/Common/windows-include.h ------------------*- C++ -*-===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ //
7
+ // ===----------------------------------------------------------------------===//
8
+ //
9
+ // Wrapper around windows.h that works around the name conflicts.
10
+ //
11
+ // ===----------------------------------------------------------------------===//
12
+
13
+ #ifndef FORTRAN_COMMON_WINDOWS_INCLUDE_H_
14
+ #define FORTRAN_COMMON_WINDOWS_INCLUDE_H_
15
+
16
+ #ifdef _WIN32
17
+
18
+ #define WIN32_LEAN_AND_MEAN
19
+ #define NOMINMAX
20
+
21
+ #include < windows.h>
22
+
23
+ #endif // _WIN32
24
+
25
+ #endif // FORTRAN_COMMON_WINDOWS_INCLUDE_H_
Original file line number Diff line number Diff line change 16
16
#include < limits>
17
17
18
18
#ifdef _WIN32
19
- #define WIN32_LEAN_AND_MEAN
20
- #define NOMINMAX
21
- #include < windows.h>
19
+ #include " flang/Common/windows-include.h"
22
20
23
21
// On Windows GetCurrentProcessId returns a DWORD aka uint32_t
24
22
#include < processthreadsapi.h>
Original file line number Diff line number Diff line change 16
16
#include < future>
17
17
#include < limits>
18
18
#ifdef _WIN32
19
- #define LEAN_AND_MEAN
20
- #define NOMINMAX
21
- #include < windows.h>
19
+ #include " flang/Common/windows-include.h"
22
20
#else
23
21
#include < signal.h>
24
22
#include < sys/wait.h>
Original file line number Diff line number Diff line change 17
17
#include < stdlib.h>
18
18
#include < sys/stat.h>
19
19
#ifdef _WIN32
20
- #define NOMINMAX
20
+ #include " flang/Common/windows-include.h "
21
21
#include < io.h>
22
- #include < windows.h>
23
22
#else
24
23
#include < unistd.h>
25
24
#endif
Original file line number Diff line number Diff line change 25
25
#if USE_PTHREADS
26
26
#include < pthread.h>
27
27
#elif defined(_WIN32)
28
- // Do not define macros for "min" and "max"
29
- #define NOMINMAX
30
- #include < windows.h>
28
+ #include " flang/Common/windows-include.h"
31
29
#else
32
30
#include < mutex>
33
31
#endif
You can’t perform that action at this time.
0 commit comments