rename <Windows.h> include to <windows.h> for mingw compatibility (see pr #367)

This commit is contained in:
Daan Leijen 2021-02-22 13:04:11 -08:00
parent 7962420697
commit 71ac98ab08
7 changed files with 8 additions and 8 deletions

View file

@ -118,7 +118,7 @@ static inline void mi_atomic_maxi64_relaxed(volatile int64_t* p, int64_t x) {
// MSVC C compilation wrapper that uses Interlocked operations to model C11 atomics.
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
#include <windows.h>
#include <intrin.h>
#ifdef _WIN64
typedef LONG64 msc_intptr_t;

View file

@ -726,7 +726,7 @@ mi_decl_restrict char* mi_strndup(const char* s, size_t n) mi_attr_noexcept {
#ifndef PATH_MAX
#define PATH_MAX MAX_PATH
#endif
#include <Windows.h>
#include <windows.h>
mi_decl_restrict char* mi_heap_realpath(mi_heap_t* heap, const char* fname, char* resolved_name) mi_attr_noexcept {
// todo: use GetFullPathNameW to allow longer file names
char buf[PATH_MAX];

View file

@ -284,7 +284,7 @@ static void _mi_thread_done(mi_heap_t* default_heap);
// nothing to do as it is done in DllMain
#elif defined(_WIN32) && !defined(MI_SHARED_LIB)
// use thread local storage keys to detect thread ending
#include <Windows.h>
#include <windows.h>
#include <fibersapi.h>
#if (_WIN32_WINNT < 0x600) // before Windows Vista
WINBASEAPI DWORD WINAPI FlsAlloc( _In_opt_ PFLS_CALLBACK_FUNCTION lpCallback );

View file

@ -422,7 +422,7 @@ static inline int mi_strnicmp(const char* s, const char* t, size_t n) {
// reliably even when this is invoked before the C runtime is initialized.
// i.e. when `_mi_preloading() == true`.
// Note: on windows, environment names are not case sensitive.
#include <Windows.h>
#include <windows.h>
static bool mi_getenv(const char* name, char* result, size_t result_size) {
result[0] = 0;
size_t len = GetEnvironmentVariableA(name, result, (DWORD)result_size);

View file

@ -28,7 +28,7 @@ terms of the MIT license. A copy of the license can be found in the file
#if defined(_WIN32)
#include <Windows.h>
#include <windows.h>
#elif defined(__wasi__)
// stdlib.h is all we need, and has already been included in mimalloc.h
#else

View file

@ -244,7 +244,7 @@ static bool os_random_buf(void* buf, size_t buf_len) {
#endif
#if defined(_WIN32)
#include <Windows.h>
#include <windows.h>
#elif defined(__APPLE__)
#include <mach/mach_time.h>
#else

View file

@ -393,7 +393,7 @@ void mi_thread_stats_print_out(mi_output_fun* out, void* arg) mi_attr_noexcept {
// Basic timer for convenience; use milli-seconds to avoid doubles
// ----------------------------------------------------------------
#ifdef _WIN32
#include <Windows.h>
#include <windows.h>
static mi_msecs_t mi_to_msecs(LARGE_INTEGER t) {
static LARGE_INTEGER mfreq; // = 0
if (mfreq.QuadPart == 0LL) {
@ -448,7 +448,7 @@ mi_msecs_t _mi_clock_end(mi_msecs_t start) {
// --------------------------------------------------------
#if defined(_WIN32)
#include <Windows.h>
#include <windows.h>
#include <psapi.h>
#pragma comment(lib,"psapi.lib")