[pulseaudio-commits] 2 commits - src/Makefile.am src/pulsecore

Tanu Kaskinen tanuk at kemper.freedesktop.org
Sat May 30 03:21:27 PDT 2015


 src/Makefile.am          |    4 +-
 src/pulsecore/socket.h   |   13 ------
 src/pulsecore/winerrno.h |   89 +++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 93 insertions(+), 13 deletions(-)

New commits:
commit 53b6b9df1919115c162ed146947b3f5c46d631c6
Author: Tanu Kaskinen <tanuk at iki.fi>
Date:   Sat May 30 13:19:52 2015 +0300

    build-sys: add winerrno.h to libpulsecommon_SOURCES

diff --git a/src/Makefile.am b/src/Makefile.am
index d582e57..cef3114 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -712,7 +712,9 @@ libpulsecommon_ at PA_MAJORMINOR@_la_SOURCES = \
 		pulsecore/socket.h
 
 if OS_IS_WIN32
-libpulsecommon_ at PA_MAJORMINOR@_la_SOURCES += pulsecore/poll-win32.c pulsecore/poll.h
+libpulsecommon_ at PA_MAJORMINOR@_la_SOURCES += \
+		pulsecore/poll-win32.c pulsecore/poll.h \
+		pulsecore/winerrno.h
 else
 libpulsecommon_ at PA_MAJORMINOR@_la_SOURCES += pulsecore/poll-posix.c pulsecore/poll.h
 endif

commit d284d90d5f0347e049a84cddc59adaafa7414d45
Author: Pierre Ossman <ossman at cendio.se>
Date:   Fri May 29 16:39:45 2015 +0200

    core: make sure we use the correct win32 socket errno:s
    
    Modern versions of MinGW and Visual Studio provide socket errno
    defines that make no sense (no API sets them). Make sure we
    continue to use the old WSAE ones that are actually returned by
    Windows' socket API.
    
    Signed-off-by: Pierre Ossman <ossman at cendio.se>

diff --git a/src/pulsecore/socket.h b/src/pulsecore/socket.h
index 0d38bee..72f2228 100644
--- a/src/pulsecore/socket.h
+++ b/src/pulsecore/socket.h
@@ -7,18 +7,7 @@
 
 #ifdef HAVE_WINSOCK2_H
 #include <winsock2.h>
-
-#define ESHUTDOWN       WSAESHUTDOWN
-#define ECONNRESET      WSAECONNRESET
-#define ECONNABORTED    WSAECONNABORTED
-#define ENETRESET       WSAENETRESET
-#define EINPROGRESS     WSAEINPROGRESS
-#define EAFNOSUPPORT    WSAEAFNOSUPPORT
-#define ETIMEDOUT       WSAETIMEDOUT
-#define ECONNREFUSED    WSAECONNREFUSED
-#define EHOSTUNREACH    WSAEHOSTUNREACH
-#define EWOULDBLOCK     WSAEWOULDBLOCK
-#define EADDRINUSE      WSAEADDRINUSE
+#include "winerrno.h"
 
 typedef long suseconds_t;
 
diff --git a/src/pulsecore/winerrno.h b/src/pulsecore/winerrno.h
new file mode 100644
index 0000000..052d4de
--- /dev/null
+++ b/src/pulsecore/winerrno.h
@@ -0,0 +1,89 @@
+
+/* Generated with:
+cat /usr/i686-pc-mingw32/sys-root/mingw/include/winerror.h \
+ | awk '/#define WSAE.*WSABASE/{gsub("WSA", ""); print "#undef " $2 "\n#define " $2 " WSA" $2}' \
+ | egrep -v 'EINTR|EBADF|EACCES|EFAULT|EINVAL|EMFILE|_QOS|PROVIDER|PROCTABLE'
+*/
+
+#undef EWOULDBLOCK
+#define EWOULDBLOCK WSAEWOULDBLOCK
+#undef EINPROGRESS
+#define EINPROGRESS WSAEINPROGRESS
+#undef EALREADY
+#define EALREADY WSAEALREADY
+#undef ENOTSOCK
+#define ENOTSOCK WSAENOTSOCK
+#undef EDESTADDRREQ
+#define EDESTADDRREQ WSAEDESTADDRREQ
+#undef EMSGSIZE
+#define EMSGSIZE WSAEMSGSIZE
+#undef EPROTOTYPE
+#define EPROTOTYPE WSAEPROTOTYPE
+#undef ENOPROTOOPT
+#define ENOPROTOOPT WSAENOPROTOOPT
+#undef EPROTONOSUPPORT
+#define EPROTONOSUPPORT WSAEPROTONOSUPPORT
+#undef ESOCKTNOSUPPORT
+#define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT
+#undef EOPNOTSUPP
+#define EOPNOTSUPP WSAEOPNOTSUPP
+#undef EPFNOSUPPORT
+#define EPFNOSUPPORT WSAEPFNOSUPPORT
+#undef EAFNOSUPPORT
+#define EAFNOSUPPORT WSAEAFNOSUPPORT
+#undef EADDRINUSE
+#define EADDRINUSE WSAEADDRINUSE
+#undef EADDRNOTAVAIL
+#define EADDRNOTAVAIL WSAEADDRNOTAVAIL
+#undef ENETDOWN
+#define ENETDOWN WSAENETDOWN
+#undef ENETUNREACH
+#define ENETUNREACH WSAENETUNREACH
+#undef ENETRESET
+#define ENETRESET WSAENETRESET
+#undef ECONNABORTED
+#define ECONNABORTED WSAECONNABORTED
+#undef ECONNRESET
+#define ECONNRESET WSAECONNRESET
+#undef ENOBUFS
+#define ENOBUFS WSAENOBUFS
+#undef EISCONN
+#define EISCONN WSAEISCONN
+#undef ENOTCONN
+#define ENOTCONN WSAENOTCONN
+#undef ESHUTDOWN
+#define ESHUTDOWN WSAESHUTDOWN
+#undef ETOOMANYREFS
+#define ETOOMANYREFS WSAETOOMANYREFS
+#undef ETIMEDOUT
+#define ETIMEDOUT WSAETIMEDOUT
+#undef ECONNREFUSED
+#define ECONNREFUSED WSAECONNREFUSED
+#undef ELOOP
+#define ELOOP WSAELOOP
+#undef ENAMETOOLONG
+#define ENAMETOOLONG WSAENAMETOOLONG
+#undef EHOSTDOWN
+#define EHOSTDOWN WSAEHOSTDOWN
+#undef EHOSTUNREACH
+#define EHOSTUNREACH WSAEHOSTUNREACH
+#undef ENOTEMPTY
+#define ENOTEMPTY WSAENOTEMPTY
+#undef EPROCLIM
+#define EPROCLIM WSAEPROCLIM
+#undef EUSERS
+#define EUSERS WSAEUSERS
+#undef EDQUOT
+#define EDQUOT WSAEDQUOT
+#undef ESTALE
+#define ESTALE WSAESTALE
+#undef EREMOTE
+#define EREMOTE WSAEREMOTE
+#undef EDISCON
+#define EDISCON WSAEDISCON
+#undef ENOMORE
+#define ENOMORE WSAENOMORE
+#undef ECANCELLED
+#define ECANCELLED WSAECANCELLED
+#undef EREFUSED
+#define EREFUSED WSAEREFUSED



More information about the pulseaudio-commits mailing list