Bug 90773 - make sure we use the correct win32 socket errno codes
Summary: make sure we use the correct win32 socket errno codes
Status: RESOLVED FIXED
Alias: None
Product: PulseAudio
Classification: Unclassified
Component: core (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: pulseaudio-bugs
QA Contact: pulseaudio-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-29 14:46 UTC by Pierre Ossman
Modified: 2015-05-30 10:21 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
patch that fixes all errno defines (3.88 KB, text/plain)
2015-05-29 14:46 UTC, Pierre Ossman
Details

Description Pierre Ossman 2015-05-29 14:46:14 UTC
Created attachment 116152 [details]
patch that fixes all errno defines

Visual Studio (and now mingw) provide some rather evil errno defines that are never used by any Windows API. It breaks constructs such as:

#ifndef ECONNREFUSED
#define ECONNREFUSED WSAECONNREFUSED
#endif

Fortunately PulseAudio had a rather unconditional approach to handling winsock defines. Still, this can cause compiler complaints and not all errno:s were properly redefined.

The attached patch does a more complete coverage of things.
Comment 1 Tanu Kaskinen 2015-05-30 10:21:53 UTC
Thanks! Applied. I also added winerrno.h to Makefile.am.


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.