[poppler] Branch 'poppler-0.10' - poppler/CairoFontEngine.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Fri Apr 10 09:06:29 PDT 2009


 poppler/CairoFontEngine.cc |   14 ++++++++++++++
 1 file changed, 14 insertions(+)

New commits:
commit ab53a1de3184ac426a0b9a13175b87c2a7c5fbb4
Author: Albert Astals Cid <aacid at kde.org>
Date:   Fri Apr 10 18:05:54 2009 +0200

    Make it compile in Solaris
    
    See bug #21080

diff --git a/poppler/CairoFontEngine.cc b/poppler/CairoFontEngine.cc
index 8d5ad72..73ba8cc 100644
--- a/poppler/CairoFontEngine.cc
+++ b/poppler/CairoFontEngine.cc
@@ -21,6 +21,7 @@
 // Copyright (C) 2006, 2007 Carlos Garcia Campos <carlosgc at gnome.org>
 // Copyright (C) 2007 Koji Otani <sho at bbr.jp>
 // Copyright (C) 2008 Chris Wilson <chris at chris-wilson.co.uk>
+// Copyright (C) 2009 Darren Kenny <darren.kenny at 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;
   }


More information about the poppler mailing list