summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ConfigureChecks.cmake23
-rw-r--r--config.h.cmake3
-rw-r--r--src/metadata/asf/asffile.cpp8
-rw-r--r--src/metadata/m4a/CMakeLists.txt4
-rw-r--r--src/metadata/rmff/rmff.cpp9
-rw-r--r--src/metadata/trueaudio/ttafile.cpp8
-rw-r--r--src/metadata/wavpack/wvfile.cpp8
7 files changed, 63 insertions, 0 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index aa09f95..ec597fc 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -42,6 +42,29 @@ else( )
tde_message_fatal( "taglib is required, but not found on your system" )
endif( )
+tde_save_and_set( CMAKE_REQUIRED_DEFINITIONS "${LARGEFILES_DEFINITIONS}" )
+tde_save_and_set( CMAKE_REQUIRED_INCLUDES "${TAGLIB_INCLUDE_DIRS}" )
+tde_save_and_set( CMAKE_REQUIRED_LIBRARIES "${TAGLIB_LIBRARIES}" )
+
+check_cxx_source_compiles( "
+ #include <taglib.h>
+ #include <id3v1tag.h>
+
+ int main( int, char** )
+ {
+ off_t tagOffset = 0;
+ TagLib::File *testFile = nullptr;
+ TagLib::ID3v1::Tag *id3tag = new TagLib::ID3v1::Tag(testFile, tagOffset);
+ return 0;
+ }
+ "
+ TAGLIB_LARGE_FILES_SUPPORT
+)
+
+tde_restore( CMAKE_REQUIRED_DEFINITIONS )
+tde_restore( CMAKE_REQUIRED_INCLUDES )
+tde_restore( CMAKE_REQUIRED_LIBRARIES )
+
##### check for cdda interface and paranoia
diff --git a/config.h.cmake b/config.h.cmake
index df9018d..b83cecf 100644
--- a/config.h.cmake
+++ b/config.h.cmake
@@ -10,3 +10,6 @@
// Define if you have int and long types
#cmakedefine SIZEOF_INT @SIZEOF_INT@
#cmakedefine SIZEOF_LONG @SIZEOF_LONG@
+
+// Define if taglib can be built with large files support
+#cmakedefine TAGLIB_LARGE_FILES_SUPPORT 1
diff --git a/src/metadata/asf/asffile.cpp b/src/metadata/asf/asffile.cpp
index 3000007..3c15837 100644
--- a/src/metadata/asf/asffile.cpp
+++ b/src/metadata/asf/asffile.cpp
@@ -19,6 +19,14 @@
* USA *
***************************************************************************/
+#include "config.h"
+
+#if !defined(TAGLIB_LARGE_FILES_SUPPORT)
+ #undef _LARGE_FILES
+ #undef _LARGEFILE_SOURCE
+ #undef _FILE_OFFSET_BITS
+#endif
+
#include <tbytevectorlist.h>
#include <tstring.h>
#include "asffile.h"
diff --git a/src/metadata/m4a/CMakeLists.txt b/src/metadata/m4a/CMakeLists.txt
index 5595611..12030ad 100644
--- a/src/metadata/m4a/CMakeLists.txt
+++ b/src/metadata/m4a/CMakeLists.txt
@@ -12,6 +12,10 @@ link_directories(
${TDE_LIB_DIR}
)
+if( NOT TAGLIB_LARGE_FILES_SUPPORT )
+ add_definitions( -U_LARGE_FILES -U_LARGEFILE_SOURCE -U_FILE_OFFSET_BITS )
+endif()
+
##### pluginloader
diff --git a/src/metadata/rmff/rmff.cpp b/src/metadata/rmff/rmff.cpp
index fb937aa..1c7167e 100644
--- a/src/metadata/rmff/rmff.cpp
+++ b/src/metadata/rmff/rmff.cpp
@@ -26,6 +26,15 @@
* https://common.helixcommunity.org/nonav/2003/HCS_SDK_r5/helixsdk.htm *
* *
***************************************************************************/
+
+#include "config.h"
+
+#if !defined(TAGLIB_LARGE_FILES_SUPPORT)
+ #undef _LARGE_FILES
+ #undef _LARGEFILE_SOURCE
+ #undef _FILE_OFFSET_BITS
+#endif
+
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
diff --git a/src/metadata/trueaudio/ttafile.cpp b/src/metadata/trueaudio/ttafile.cpp
index 3a02e20..0686d74 100644
--- a/src/metadata/trueaudio/ttafile.cpp
+++ b/src/metadata/trueaudio/ttafile.cpp
@@ -23,6 +23,14 @@
* MA 02110-1301 USA *
***************************************************************************/
+#include "config.h"
+
+#if !defined(TAGLIB_LARGE_FILES_SUPPORT)
+ #undef _LARGE_FILES
+ #undef _LARGEFILE_SOURCE
+ #undef _FILE_OFFSET_BITS
+#endif
+
#include <tbytevector.h>
#include <tstring.h>
#if 0
diff --git a/src/metadata/wavpack/wvfile.cpp b/src/metadata/wavpack/wvfile.cpp
index 3890bc9..0e72fee 100644
--- a/src/metadata/wavpack/wvfile.cpp
+++ b/src/metadata/wavpack/wvfile.cpp
@@ -23,6 +23,14 @@
* MA 02110-1301 USA *
***************************************************************************/
+#include "config.h"
+
+#if !defined(TAGLIB_LARGE_FILES_SUPPORT)
+ #undef _LARGE_FILES
+ #undef _LARGEFILE_SOURCE
+ #undef _FILE_OFFSET_BITS
+#endif
+
#include <tbytevector.h>
#include <tstring.h>
#if 0