mirror of
https://github.com/aaru-dps/libaaruformat.git
synced 2026-04-05 21:51:03 +00:00
build: remap POSIX large-file APIs to native 64-bit stdio functions for MSVC
Allows libFLAC to compile in MSVC (how do they do it upstream? do they?)
This commit is contained in:
@@ -89,6 +89,15 @@ endif()
|
|||||||
function(aaru_enable_large_file_support target)
|
function(aaru_enable_large_file_support target)
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
target_compile_definitions(${target} PRIVATE AARU_USE_WIN32_FILEIO64)
|
target_compile_definitions(${target} PRIVATE AARU_USE_WIN32_FILEIO64)
|
||||||
|
|
||||||
|
# Some bundled third-party sources use POSIX large-file APIs directly.
|
||||||
|
# On MSVC, remap them to the native 64-bit stdio functions without
|
||||||
|
# modifying the vendored sources.
|
||||||
|
if(MSVC)
|
||||||
|
target_compile_definitions(${target} PRIVATE
|
||||||
|
fseeko=_fseeki64
|
||||||
|
ftello=_ftelli64)
|
||||||
|
endif()
|
||||||
else()
|
else()
|
||||||
target_compile_definitions(${target} PRIVATE
|
target_compile_definitions(${target} PRIVATE
|
||||||
_FILE_OFFSET_BITS=64
|
_FILE_OFFSET_BITS=64
|
||||||
|
|||||||
Reference in New Issue
Block a user