summaryrefslogtreecommitdiff
path: root/base/sjpegc.c
diff options
context:
space:
mode:
authorChris Liddell <chris.liddell@artifex.com>2019-02-12 17:27:56 +0000
committerChris Liddell <chris.liddell@artifex.com>2019-02-12 17:30:15 +0000
commit0fb8c19f9b848fb691dc067a0feebbfee539672b (patch)
tree3770e0529ccb59f86d0f7310b6c6f3d3bf535fc6 /base/sjpegc.c
parentecf45905a555386c157967aefc986c94002b3c6d (diff)
downloadghostpdl-0fb8c19f9b848fb691dc067a0feebbfee539672b.tar.gz
Bug 700564: Tweak to fix shared libjpeg
A custom header include wasn't protected by proprocessor directives. And remove one not required inclusion.
Diffstat (limited to 'base/sjpegc.c')
-rw-r--r--base/sjpegc.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/base/sjpegc.c b/base/sjpegc.c
index 84f625c3e..1810dcdab 100644
--- a/base/sjpegc.c
+++ b/base/sjpegc.c
@@ -26,7 +26,9 @@
#include "sjpeg.h"
#include "gsmchunk.h"
+#if !defined(SHARE_JPEG) || SHARE_JPEG==0
#include "jmemcust.h"
+#endif
/*
Ghostscript uses a non-public interface to libjpeg in order to
@@ -148,7 +150,7 @@ gs_jpeg_destroy(stream_DCT_state * st)
return 0;
}
-#if SHARE_JPEG == 0
+#if !defined(SHARE_JPEG) || SHARE_JPEG==0
static void *gs_j_mem_alloc(j_common_ptr cinfo, size_t size)
{
gs_memory_t *mem = (gs_memory_t *)(GET_CUST_MEM_DATA(cinfo)->priv);
@@ -192,7 +194,7 @@ static void gs_j_mem_term (j_common_ptr cinfo)
int gs_jpeg_mem_init (gs_memory_t *mem, j_common_ptr cinfo)
{
int code = 0;
-#if SHARE_JPEG == 0
+#if !defined(SHARE_JPEG) || SHARE_JPEG==0
jpeg_cust_mem_data custm, *custmptr;
memset(&custm, 0x00, sizeof(custm));
@@ -219,7 +221,7 @@ int gs_jpeg_mem_init (gs_memory_t *mem, j_common_ptr cinfo)
void
gs_jpeg_mem_term(j_common_ptr cinfo)
{
-#if SHARE_JPEG == 0
+#if !defined(SHARE_JPEG) || SHARE_JPEG==0
if (cinfo->client_data) {
jpeg_cust_mem_data *custmptr = (jpeg_cust_mem_data *)cinfo->client_data;
gs_memory_t *mem = (gs_memory_t *)(GET_CUST_MEM_DATA(cinfo)->priv);