1 From 6442d11617f95d13e2a371bd3e01f5082a9c356d Mon Sep 17 00:00:00 2001
2 From: Las <las@protonmail.ch>
3 Date: Sun, 3 Jan 2021 18:35:37 +0000
4 Subject: [PATCH] Make exported symbols in transupp.c weak
6 The exported symbols are made weak to not conflict with users
7 of the library that already vendor this functionality.
9 transupp.c | 14 +++++++-------
10 1 file changed, 7 insertions(+), 7 deletions(-)
12 diff --git a/transupp.c b/transupp.c
13 index 34fbb371..c0ade5a9 100644
16 @@ -1388,7 +1388,7 @@ jt_read_integer(const char **strptr, JDIMENSION *result)
17 * This code is loosely based on XParseGeometry from the X11 distribution.
21 +GLOBAL(boolean) __attribute__((weak))
22 jtransform_parse_crop_spec(jpeg_transform_info *info, const char *spec)
25 @@ -1488,7 +1488,7 @@ trim_bottom_edge(jpeg_transform_info *info, JDIMENSION full_height)
26 * and transformation is not perfect. Otherwise returns TRUE.
30 +GLOBAL(boolean) __attribute__((weak))
31 jtransform_request_workspace(j_decompress_ptr srcinfo,
32 jpeg_transform_info *info)
34 @@ -2035,7 +2035,7 @@ adjust_exif_parameters(JOCTET *data, unsigned int length, JDIMENSION new_width,
35 * to jpeg_write_coefficients().
38 -GLOBAL(jvirt_barray_ptr *)
39 +GLOBAL(jvirt_barray_ptr *) __attribute__((weak))
40 jtransform_adjust_parameters(j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
41 jvirt_barray_ptr *src_coef_arrays,
42 jpeg_transform_info *info)
43 @@ -2154,7 +2154,7 @@ jtransform_adjust_parameters(j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
44 * Note that some transformations will modify the source data arrays!
48 +GLOBAL(void) __attribute__((weak))
49 jtransform_execute_transform(j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
50 jvirt_barray_ptr *src_coef_arrays,
51 jpeg_transform_info *info)
52 @@ -2266,7 +2266,7 @@ jtransform_execute_transform(j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
53 * (may use custom action then)
57 +GLOBAL(boolean) __attribute__((weak))
58 jtransform_perfect_transform(JDIMENSION image_width, JDIMENSION image_height,
59 int MCU_width, int MCU_height,
60 JXFORM_CODE transform)
61 @@ -2305,7 +2305,7 @@ jtransform_perfect_transform(JDIMENSION image_width, JDIMENSION image_height,
62 * This must be called before jpeg_read_header() to have the desired effect.
66 +GLOBAL(void) __attribute__((weak))
67 jcopy_markers_setup(j_decompress_ptr srcinfo, JCOPY_OPTION option)
69 #ifdef SAVE_MARKERS_SUPPORTED
70 @@ -2337,7 +2337,7 @@ jcopy_markers_setup(j_decompress_ptr srcinfo, JCOPY_OPTION option)
71 * JFIF APP0 or Adobe APP14 markers if selected.
75 +GLOBAL(void) __attribute__((weak))
76 jcopy_markers_execute(j_decompress_ptr srcinfo, j_compress_ptr dstinfo,