From f439598036842212b7a886095ff1c85e9a3cbf22 Mon Sep 17 00:00:00 2001 From: Violet Purcell Date: Thu, 8 Jun 2023 14:57:30 +0000 Subject: [PATCH 1/2] Remove LFS64 calls and set _FILE_OFFSET_BITS=64 Musl 1.2.4 made the LFS64 interfaces only available when _LARGEFILE64_SOURCE is defined, and they will be removed altogether in Musl 1.2.5. This commit replaces the LFS64 calls with their non-LFS64 versions and defines _FILE_OFFSET_BITS=64, which makes all interfaces 64-bit. Bug: https://bugs.gentoo.org/905999 --- CMakeLists.txt | 1 + Makefile | 2 +- tinyxml2.cpp | 3 --- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8802fb81..2a45e459 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,6 +31,7 @@ target_compile_definitions( PUBLIC $<$:TINYXML2_DEBUG> INTERFACE $<$:TINYXML2_IMPORT> PRIVATE $<$:_CRT_SECURE_NO_WARNINGS> + PUBLIC _FILE_OFFSET_BITS=64 ) set_target_properties( diff --git a/Makefile b/Makefile index e76d8ec0..6ca8544e 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ ARFLAGS = cr RM = rm -f RANLIB = ranlib MKDIR = mkdir -p -CXXFLAGS = -fPIC +CXXFLAGS = -D_FILE_OFFSET_BITS=64 -fPIC INSTALL = install INSTALL_PROGRAM = $(INSTALL) diff --git a/tinyxml2.cpp b/tinyxml2.cpp index 4b561b3d..e3618180 100755 --- a/tinyxml2.cpp +++ b/tinyxml2.cpp @@ -114,9 +114,6 @@ distribution. #define TIXML_FSEEK fseeko #define TIXML_FTELL ftello #endif -#elif defined(__unix__) && defined(__x86_64__) - #define TIXML_FSEEK fseeko64 - #define TIXML_FTELL ftello64 #else #define TIXML_FSEEK fseek #define TIXML_FTELL ftell From 8158ba05ac4ce6c976b7044c5746f82050e07da4 Mon Sep 17 00:00:00 2001 From: Lee Thomason Date: Tue, 21 Nov 2023 11:40:28 -0800 Subject: [PATCH 2/2] fix readme link --- readme.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/readme.md b/readme.md index 5245ac4e..b9f2f92d 100644 --- a/readme.md +++ b/readme.md @@ -3,8 +3,6 @@ TinyXML-2 ![Build](https://github.com/leethomason/tinyxml2/actions/workflows/test.yml/badge.svg) -![TinyXML-2 Logo](http://www.grinninglizard.com/tinyxml2/TinyXML2_small.png) - TinyXML-2 is a simple, small, efficient, C++ XML parser that can be easily integrated into other programs.