Bug 50677 - Fix usage of pkg-config with redirections in windows
Summary: Fix usage of pkg-config with redirections in windows
Status: RESOLVED DUPLICATE of bug 17053
Alias: None
Product: pkg-config
Classification: Unclassified
Component: src (show other bugs)
Version: unspecified
Hardware: Other Windows (All)
: medium normal
Assignee: Dan Nicholson
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-04 06:31 UTC by Andoni Morales Alastruey
Modified: 2012-11-01 02:07 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Open stdout in binary mode to avoid inserting CR+LF line endings (1.12 KB, patch)
2012-06-04 06:31 UTC, Andoni Morales Alastruey
Details | Splinter Review

Description Andoni Morales Alastruey 2012-06-04 06:31:18 UTC
Created attachment 62507 [details] [review]
Open stdout in binary mode to avoid inserting CR+LF line endings

On windows, pkg-config is adding CR+LF line endings writing to stdout, which breaks the usage of pkg-config in most configure scripts.
The proposed patch sets the binary mode in stdout instead of the default text mode which uses the CR+LF line endings.
Comment 1 Dan Nicholson 2012-08-14 12:53:24 UTC
What environment are you using exactly? mingw/msys? msvc/cmd? Also, what version of pkg-config are you using?

The reason I ask is because pkg-config (at least 0.27) does not itself write out \r. Previously it was adding \r for the final newline, but it was found that it was working around a bug in an older msys shell. That commit was reverted in 79c768aa and now pkg-config only writes \n. It's the shell programs that are adding the \r. Take a look at bug 17053.

Can you try the current version or at least with commit 79c768aa applied to your version?
Comment 2 Andoni Morales Alastruey 2012-11-01 02:07:15 UTC
My bug was caused by 79c768aa.

*** This bug has been marked as a duplicate of bug 17053 ***


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.