1From 41ef9a0bc36b9db7115fbe9623f989bfb47bbade Mon Sep 17 00:00:00 2001
2From: Chris Liddell <chris.liddell@artifex.com>
3Date: Tue, 20 Oct 2020 09:49:45 +0100
4Subject: [PATCH] Bug 702985: drop use of FT_CALLBACK_DEF() def
5
6From 2.10.3, Freetype disappeared the FT_CALLBACK_DEF() macro, which is what
7we used when defining our callbacks from Freetype.
8
9No guidance forthcoming from the Freetype developer who made those changes,
10so change to explicitly declaring the callbacks file static.
11
12Should fix the reported build failures.
13
14Downloaded from upstream commit:
15https://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=41ef9a0bc36b
16
17Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
18---
19 base/fapi_ft.c | 6 +++---
20 1 file changed, 3 insertions(+), 3 deletions(-)
21
22diff --git a/base/fapi_ft.c b/base/fapi_ft.c
23index 65fa6dcf4..21aef2f06 100644
24--- a/base/fapi_ft.c
25+++ b/base/fapi_ft.c
26@@ -125,7 +125,7 @@ static void
27 delete_inc_int_info(gs_fapi_server * a_server,
28                     FT_IncrementalRec * a_inc_int_info);
29
30-FT_CALLBACK_DEF(void *)
31+static void *
32 FF_alloc(FT_Memory memory, long size)
33 {
34     gs_memory_t *mem = (gs_memory_t *) memory->user;
35@@ -133,7 +133,7 @@ FF_alloc(FT_Memory memory, long size)
36     return (gs_malloc(mem, size, 1, "FF_alloc"));
37 }
38
39-FT_CALLBACK_DEF(void *)
40+static void *
41     FF_realloc(FT_Memory memory, long cur_size, long new_size, void *block)
42 {
43     gs_memory_t *mem = (gs_memory_t *) memory->user;
44@@ -153,7 +153,7 @@ FT_CALLBACK_DEF(void *)
45     return (tmp);
46 }
47
48-FT_CALLBACK_DEF(void)
49+static void
50     FF_free(FT_Memory memory, void *block)
51 {
52     gs_memory_t *mem = (gs_memory_t *) memory->user;
53--
542.17.1
55
56