summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2009-04-10 18:05:54 +0200
committerAlbert Astals Cid <aacid@kde.org>2009-04-10 18:05:54 +0200
commitab53a1de3184ac426a0b9a13175b87c2a7c5fbb4 (patch)
tree6d2f0f6b997ab99a5065d9eb6468b1c1a596c716
parent5e231c384c0cba9040ab3a545ac699003ff4c2c0 (diff)
Make it compile in Solaris
See bug #21080
-rw-r--r--poppler/CairoFontEngine.cc14
1 files changed, 14 insertions, 0 deletions
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 <carlosgc@gnome.org>
// Copyright (C) 2007 Koji Otani <sho@bbr.jp>
// Copyright (C) 2008 Chris Wilson <chris@chris-wilson.co.uk>
+// Copyright (C) 2009 Darren Kenny <darren.kenny@sun.com>
//
// 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;
}