libtiff: hide implementation details
building with -DLOGLUV_PUBLIC=0 will convert some libtiff functions to "static", preventing potential name clashes with downstream. Pick-to: 6.10 Task-number: QTBUG-138543 Change-Id: I3808de27121ac975714b17508b20cb4bc5203e23 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
This commit is contained in:
parent
d162e9d795
commit
2bfc5d8684
|
@ -590,7 +590,7 @@ extern int TIFFReadRGBAImageOriented(TIFF *, uint32_t, uint32_t, uint32_t *,
|
|||
extern uint64_t TIFFGetStrileByteCountWithErr(TIFF *tif, uint32_t strile,
|
||||
int *pbErr);
|
||||
|
||||
#ifdef LOGLUV_PUBLIC
|
||||
#if LOGLUV_PUBLIC
|
||||
#define U_NEU 0.210526316
|
||||
#define V_NEU 0.473684211
|
||||
#define UVSCALE 410.
|
||||
|
|
32
src/3rdparty/libtiff/patches/0001-tiffio.h-fix-compilation-with-LOGLUV_PUBLIC-0.patch
vendored
Normal file
32
src/3rdparty/libtiff/patches/0001-tiffio.h-fix-compilation-with-LOGLUV_PUBLIC-0.patch
vendored
Normal file
|
@ -0,0 +1,32 @@
|
|||
From c7ea716f16a0eb018c791d05623ce7ae050c8064 Mon Sep 17 00:00:00 2001
|
||||
From: Tim Blechmann <tim@klingt.org>
|
||||
Date: Tue, 12 Aug 2025 16:59:50 +0800
|
||||
Subject: [PATCH] tiffio.h: fix compilation with LOGLUV_PUBLIC=0
|
||||
|
||||
LOGLUV_PUBLIC can be used to compile some functions with hidden
|
||||
visibility.
|
||||
However this functionality was broken (in clang), as LOGLUV_PUBLIC was
|
||||
defined to 1 if it wasn't defined, as the extern declarations were still
|
||||
visible by the compiler leading to "static declaration follows
|
||||
non-static declaration" errors.
|
||||
Changing the header from #ifdef to #if fixes the issue.
|
||||
---
|
||||
libtiff/tiffio.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/libtiff/tiffio.h b/libtiff/tiffio.h
|
||||
index 6a7ab2f5..f9c206e3 100644
|
||||
--- a/libtiff/tiffio.h
|
||||
+++ b/libtiff/tiffio.h
|
||||
@@ -608,7 +608,7 @@ extern int TIFFReadRGBAImageOriented(TIFF *, uint32_t, uint32_t, uint32_t *,
|
||||
extern uint64_t TIFFGetStrileByteCountWithErr(TIFF *tif, uint32_t strile,
|
||||
int *pbErr);
|
||||
|
||||
-#ifdef LOGLUV_PUBLIC
|
||||
+#if LOGLUV_PUBLIC
|
||||
#define U_NEU 0.210526316
|
||||
#define V_NEU 0.473684211
|
||||
#define UVSCALE 410.
|
||||
--
|
||||
2.50.1
|
||||
|
|
@ -86,6 +86,8 @@ qt_internal_extend_target(QTiffPlugin CONDITION NOT QT_FEATURE_system_tiff
|
|||
../../../3rdparty/libtiff/libtiff
|
||||
ATTRIBUTION_FILE_DIR_PATHS
|
||||
../../../3rdparty/libtiff
|
||||
DEFINES
|
||||
LOGLUV_PUBLIC=0
|
||||
)
|
||||
|
||||
qt_internal_extend_target(QTiffPlugin CONDITION WIN32 AND NOT QT_FEATURE_system_tiff
|
||||
|
|
Loading…
Reference in New Issue