summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-04-22 09:17:06 +0200
committerStephan Bergmann <sbergman@redhat.com>2013-04-22 09:20:31 +0200
commit2a65f0e1857fccd4427eed733a49d8a4c2f67856 (patch)
tree2d801d0327126c5f878c0706027fdb0bdfa8aba4 /vcl
parent684aff90b0657cc46f1f453b8de4b3bdcb2f543e (diff)
Make jdiv_round_up available (-Werror=implicit-function-declaration)
...apparently caused by 845456565db945ffd2a1551ab86446fcd1717021 "DO NOT use internal headers of jpeg." The warning there "I am not sure if it is all right to include parts of jpeg directly into our code" still holds, of course. Change-Id: I4754dbcd9b2c3eafc64d32c3b83faa53cf913abd
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/filter/jpeg/transupp.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/vcl/source/filter/jpeg/transupp.c b/vcl/source/filter/jpeg/transupp.c
index 500b0a2a62f7..a1c341668541 100644
--- a/vcl/source/filter/jpeg/transupp.c
+++ b/vcl/source/filter/jpeg/transupp.c
@@ -21,6 +21,16 @@
#include "jpegcomp.h"
#include <ctype.h> /* to declare isdigit() */
+/* Definition of jdiv_round_up is copied here from jutils.c in jpeg-8c.tar.gz,
+ just as the rest of this file appears to be copied here from transupp.c in
+ jpeg-8c.tar.gz: */
+static long
+jdiv_round_up (long a, long b)
+/* Compute a/b rounded up to next integer, ie, ceil(a/b) */
+/* Assumes a >= 0, b > 0 */
+{
+ return (a + b - 1L) / b;
+}
#if JPEG_LIB_VERSION >= 70
#define dstinfo_min_DCT_h_scaled_size dstinfo->min_DCT_h_scaled_size