Bug 33136 - Updates to Improve Build under Windows
Summary: Updates to Improve Build under Windows
Status: RESOLVED FIXED
Alias: None
Product: cairo
Classification: Unclassified
Component: win32 backend (show other bugs)
Version: 1.10.2
Hardware: Other All
: medium normal
Assignee: cairo-bugs mailing list
QA Contact: cairo-bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-14 13:07 UTC by Brent Fulgham
Modified: 2011-06-24 05:20 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Build improvements for Windows. (8.93 KB, application/octet-stream)
2011-01-14 13:07 UTC, Brent Fulgham
Details
Patch to allow clean building under Windows. (8.54 KB, patch)
2011-01-14 14:10 UTC, Brent Fulgham
Details | Splinter Review
Proposed change for better 'unlink' support on Windows (1.44 KB, patch)
2011-02-08 13:44 UTC, Brent Fulgham
Details | Splinter Review
Proposed adjustment for test run due to MSVCRT behavior (569 bytes, patch)
2011-02-08 13:46 UTC, Brent Fulgham
Details | Splinter Review
Adjustments to support build/test under Windows. (5.67 KB, application/octet-stream)
2011-02-08 14:29 UTC, Brent Fulgham
Details

Description Brent Fulgham 2011-01-14 13:07:33 UTC
Created attachment 42062 [details]
Build improvements for Windows.

The attached patch allows Cairo to build cleanly under Windows using the Cygwin toolchain (and Visual Studio compiler.)

The changes to cairo-boilerplate-constructors.c is obviously not suitable for X11-based systems.  However, the make-cairo-boilerplate-constructors.sh script isn't capable of excluding features based on compile options.

Perhaps the "_register_xxx" functions could have internal guards so that xlib features would compile to a stub on non-xlib systems?
Comment 1 Brent Fulgham 2011-01-14 14:10:04 UTC
Created attachment 42063 [details] [review]
Patch to allow clean building under Windows.

Revised to properly generate the boilerplate constructor logic.  This resolves the "xlib-specific" stuff I mentioned in the initial posting.
Comment 2 Brent Fulgham 2011-02-08 13:44:21 UTC
Created attachment 43134 [details] [review]
Proposed change for better 'unlink' support on Windows

This patch allows the 'xunlink' implementation to work properly under Windows.
Comment 3 Brent Fulgham 2011-02-08 13:46:42 UTC
Created attachment 43135 [details] [review]
Proposed adjustment for test run due to MSVCRT behavior

This patch modifies testing for enabled backends to avoid passing a null parameter to 'strcmp', which blows up under Windows.
Comment 4 Brent Fulgham 2011-02-08 14:20:03 UTC
Comment on attachment 43135 [details] [review]
Proposed adjustment for test run due to MSVCRT behavior

This patch is not necessary.  The boilerplate struct should be properly formed such that this never happens.
Comment 5 Brent Fulgham 2011-02-08 14:29:49 UTC
Created attachment 43138 [details]
Adjustments to support build/test under Windows.

Revised to properly initialize boilerplate structs so that test loops work properly.
Comment 6 Andrea Canciani 2011-06-24 05:20:09 UTC
Cairo, its testsuite and the pref tools should build correctly on win32 since:

commit 463a8b67a3e2dfacede3f4e2ed1f65afc8ae5662
Author: Andrea Canciani <ranma42@gmail.com>
Date:   Tue Jun 21 18:12:29 2011 +0200

    perf: Fix build on win32
    
    The performance tools build system for Win32 hasn't been maintained
    for some time.  The makefiles are now structured as in other
    directories (Makefile.sources used by both Makefile.am and
    Makefile.win32) and some additional code hides os-specific parts.


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.