Browse Source

Removed LZMA "Windows.h" capitalized file name workaround used to cross compile Windows binaries from Linux hosts.

This breaks compiling windows binaries if the underlaying filesystem is not case sensitive. An example would be using /mnt/c folder under WSL.
Any update on the LZMA SDK needs to be post processed with this command: sed -i 's/<Windows.h>/<windows.h>/' deps/LZMA-SDK/C/*.c deps/LZMA-SDK/C/*.h
pull/2854/head
Jens Steube 1 year ago
parent
commit
b30d55c5d9
  1. 2
      deps/LZMA-SDK/C/Alloc.c
  2. 6
      deps/LZMA-SDK/C/CpuArch.c
  3. 2
      deps/LZMA-SDK/C/DllSecur.c
  4. 2
      deps/LZMA-SDK/C/Threads.h
  5. 15
      include/workarounds/Windows.h
  6. 5
      src/Makefile

2
deps/LZMA-SDK/C/Alloc.c vendored

@ -6,7 +6,7 @@
#include <stdio.h>
#ifdef _WIN32
#include <Windows.h>
#include <windows.h>
#endif
#include <stdlib.h>

6
deps/LZMA-SDK/C/CpuArch.c vendored

@ -217,7 +217,7 @@ BoolInt CPU_Is_InOrder()
}
#if !defined(MY_CPU_AMD64) && defined(_WIN32)
#include <Windows.h>
#include <windows.h>
static BoolInt CPU_Sys_Is_SSE_Supported()
{
OSVERSIONINFO vi;
@ -275,7 +275,7 @@ BoolInt CPU_IsSupported_SHA()
// #include <stdio.h>
#ifdef _WIN32
#include <Windows.h>
#include <windows.h>
#endif
BoolInt CPU_IsSupported_VAES_AVX2()
@ -327,7 +327,7 @@ BoolInt CPU_IsSupported_PageGB()
#ifdef _WIN32
#include <Windows.h>
#include <windows.h>
BoolInt CPU_IsSupported_CRC32()
{ return IsProcessorFeaturePresent(PF_ARM_V8_CRC32_INSTRUCTIONS_AVAILABLE) ? 1 : 0; }

2
deps/LZMA-SDK/C/DllSecur.c vendored

@ -5,7 +5,7 @@
#ifdef _WIN32
#include <Windows.h>
#include <windows.h>
#include "DllSecur.h"

2
deps/LZMA-SDK/C/Threads.h vendored

@ -5,7 +5,7 @@
#define __7Z_THREADS_H
#ifdef _WIN32
#include <Windows.h>
#include <windows.h>
#else
#if !defined(__APPLE__) && !defined(_AIX)

15
include/workarounds/Windows.h

@ -1,15 +0,0 @@
/**
* Author......: See docs/credits.txt
* License.....: MIT
*/
#ifndef _WINDOWS_H
#define _WINDOWS_H
// This is a workaround for files asking to include Windows.h instead of windows.h
// The problem is that MinGW provides only windows.h
// LZMA SDK will fail to cross compile for Windows on Linux
#include <windows.h>
#endif // _WINDOWS_H

5
src/Makefile

@ -254,11 +254,6 @@ ifeq ($(USE_SYSTEM_LZMA),1)
LFLAGS += -llzmasdk
endif
## LZMA workaround for MSYS2
ifeq ($(USE_SYSTEM_LZMA),0)
CFLAGS += -Iinclude/workarounds
endif
# ZLIB
CFLAGS += -I$(DEPS_ZLIB_PATH) -I$(DEPS_ZLIB_PATH)/contrib
ifeq ($(USE_SYSTEM_ZLIB),1)

Loading…
Cancel
Save