Bug 47839 - Namespace conflict due to "_write" while compiling for MinGW target
Summary: Namespace conflict due to "_write" while compiling for MinGW target
Status: RESOLVED FIXED
Alias: None
Product: cairo
Classification: Unclassified
Component: general (show other bugs)
Version: 1.12.0
Hardware: Other Windows (All)
: medium normal
Assignee: Carl Worth
QA Contact: cairo-bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-25 05:18 UTC by Marko Lindqvist
Modified: 2012-04-10 04:27 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Renaming patch (1.37 KB, patch)
2012-04-01 18:45 UTC, John Lindgren
Details | Splinter Review

Description Marko Lindqvist 2012-03-25 05:18:43 UTC
Compiling cairo-1.12.0 for MinGW target errors:
src/cairo-1.12.0/test/any2ppm.c:126: error: conflicting types for ‘_write’
/usr/i586-mingw32msvc/include/io.h:253: error: previous declaration of ‘_write’ was here

It seems that "_write" is defined in public MinGW headers. Renaming cairo side _write fixes allows compilation to proceed.
Comment 1 Avuton Olrich 2012-03-28 05:48:09 UTC
Confirm.
Comment 2 John Lindgren 2012-04-01 18:45:37 UTC
Created attachment 59358 [details] [review]
Renaming patch

How about renaming _write() to do_write() and _writen() to do_writen()?
Comment 3 Uli Schlachter 2012-04-10 04:27:30 UTC
commit 3f32419257bb2e380dd63a3b1a850b512a617776
Author: Maarten Bosmans <mkbosmans@gmail.com>
Date:   Mon Apr 9 21:33:49 2012 +0200

    test: Give some functions in any2ppm a prefix
    
    The function name _write is too generic and can clash with already
    defined functions.


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.