From ab53a1de3184ac426a0b9a13175b87c2a7c5fbb4 Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Fri, 10 Apr 2009 18:05:54 +0200 Subject: Make it compile in Solaris See bug #21080 --- poppler/CairoFontEngine.cc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/poppler/CairoFontEngine.cc b/poppler/CairoFontEngine.cc index 8d5ad721..73ba8cc5 100644 --- a/poppler/CairoFontEngine.cc +++ b/poppler/CairoFontEngine.cc @@ -21,6 +21,7 @@ // Copyright (C) 2006, 2007 Carlos Garcia Campos // Copyright (C) 2007 Koji Otani // Copyright (C) 2008 Chris Wilson +// Copyright (C) 2009 Darren Kenny // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -148,7 +149,11 @@ _ft_done_face (void *closure) else _ft_open_faces = data->next; +#if defined(__SUNPRO_CC) && defined(__sun) && defined(__SVR4) + munmap ((char*)data->bytes, data->size); +#else munmap (data->bytes, data->size); +#endif close (data->fd); FT_Done_Face (data->face); @@ -190,7 +195,11 @@ _ft_new_face (FT_Library lib, for (l = _ft_open_faces; l; l = l->next) { if (_ft_face_data_equal (l, &tmpl)) { +#if defined(__SUNPRO_CC) && defined(__sun) && defined(__SVR4) + munmap ((char*)tmpl.bytes, tmpl.size); +#else munmap (tmpl.bytes, tmpl.size); +#endif close (tmpl.fd); *face_out = l->face; *font_face_out = cairo_font_face_reference (l->font_face); @@ -200,7 +209,12 @@ _ft_new_face (FT_Library lib, /* not a dup, open and insert into list */ if (FT_New_Face (lib, filename, 0, &tmpl.face)) { +#if defined(__SUNPRO_CC) && defined(__sun) && defined(__SVR4) + munmap ((char*)tmpl.bytes, tmpl.size); +#else munmap (tmpl.bytes, tmpl.size); +#endif + close (tmpl.fd); return gFalse; } -- cgit v1.2.3