Bug 26509

Summary: Cairo fails to compile without mmap
Product: cairo Reporter: Hib Eris <hib>
Component: generalAssignee: Carl Worth <cworth>
Status: RESOLVED FIXED QA Contact: cairo-bugs mailing list <cairo-bugs>
Severity: normal    
Priority: medium    
Version: 1.9.5   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: 0001-Fix-compilation-without-HAVE_MMAP-outdef.patch
0001-Fix-compilation-without-HAVE_MMAP-reshuffle.patch

Description Hib Eris 2010-02-10 03:31:28 UTC
Created attachment 33210 [details] [review]
0001-Fix-compilation-without-HAVE_MMAP-outdef.patch

When I cross compile cairo with a mingw32 compiler, I have no HAVE_MMAP defined by configure. This causes a build failure, because not all mmap code is properly out defined in util/cairo-script/cairo-script-operators.c.

I've attached a patch to correct this.
Comment 1 Hib Eris 2010-02-10 03:35:55 UTC
Created attachment 33211 [details] [review]
0001-Fix-compilation-without-HAVE_MMAP-reshuffle.patch

This patch is an alternative to the previous one, reshuffling the code a bit to prevent having '#ifdef HAVE_MMAP' all over the code.

Because of the reshuffling, this patch is a not obviously correct, so please have a good look at it before accepting it. Or just take the previous patch.
Comment 2 Chris Wilson 2010-02-10 04:28:03 UTC
I think this is sufficient:

commit 5d34902c0cb9712179292112fbdb0f06be327fd8
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Wed Feb 10 12:10:16 2010 +0000

    script: Compile without mmap
    
    Should fix:
      Bug 26509 - Cairo fails to compile without mmap
      http://bugs.freedesktop.org/show_bug.cgi?id=26509
    
    As reported by Hib Eris, Cairo files to compile under a mingw32
    cross-compiler as we use a structure only defined if HAVE_MMAP
    unconditionally.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.