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.
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?
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.