Include <climits> for GCC 16
authorPaul Zander <negril.nx+gentoo@gmail.com>
Mon, 12 Jan 2026 21:14:33 +0000 (22:14 +0100)
committerPino Toscano <pino@debian.org>
Sat, 6 Jun 2026 12:22:26 +0000 (14:22 +0200)
Origin: https://gitlab.freedesktop.org/poppler/poppler/-/commit/4a2294f59ebbbe690d09aa6f7e021e29cbb85782

```
poppler-26.01.0/poppler/SplashOutputDev.cc: In constructor
‘T3FontCache::T3FontCache(const Ref*, double, double, double, double, int, int,
int, int, bool, bool)’:
poppler-26.01.0/poppler/SplashOutputDev.cc:1129:18: error: ‘INT_MAX’ was not
declared in this scope
1129 |     if (glyphW > INT_MAX / glyphH || glyphW <= 0 || glyphH <= 0 ||
glyphW * glyphH > 100000) {
      |                  ^~~~~~~
poppler-26.01.0/poppler/SplashOutputDev.cc:84:1: note: ‘INT_MAX’ is defined in
header ‘<climits>’; this is probably fixable by adding ‘#include <climits>’
   83 | #include "SplashOutputDev.h"
  +++ |+#include <climits>
   84 | #include <algorithm>
```

Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
Signed-off-by: Sam James <sam@gentoo.org>
Gbp-Pq: Name Include-climits-for-GCC-16.patch

poppler/Function.cc
poppler/Gfx.cc
poppler/Parser.cc
poppler/SplashOutputDev.cc

index 313b58df16ac7e3e232e93fe1969ac088b9e5f5d..60d535e76adc4577c735d16309ac2675163b0db6 100644 (file)
@@ -30,6 +30,7 @@
 
 #include <config.h>
 
+#include <climits>
 #include <cstdlib>
 #include <cstring>
 #include <cctype>
index 2436159448830b8fa5755e63ed03930c5d5180a6..e24f414947de9e673ccc04eba52451145a3d1200 100644 (file)
@@ -60,6 +60,7 @@
 
 #include <config.h>
 
+#include <climits>
 #include <cstdlib>
 #include <cstdio>
 #include <cstring>
index 415fa5e5504107dee81de8afd88f650f30d616d3..cf23d778a5053ba020af5a6fb235fa35fc2d5d86 100644 (file)
@@ -33,6 +33,7 @@
 
 #include <config.h>
 
+#include <climits>
 #include "Object.h"
 #include "Array.h"
 #include "Dict.h"
index 184d37e69e34565f11865fe24a6fc97688f779bd..3b30669cce31d47b307e88922b8c542b3b807e7f 100644 (file)
@@ -53,6 +53,7 @@
 
 #include <config.h>
 
+#include <climits>
 #include <cstring>
 #include <cmath>
 #include <vector>