Condense winsock includes and defines into one header.

git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/ossman@428 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
Pierre Ossman 2006-01-09 16:50:39 +00:00
parent 9818d67ec2
commit 5fcbf04f5b
14 changed files with 41 additions and 65 deletions

View file

@ -335,6 +335,7 @@ libpolyp_@PA_MAJORMINOR@_la_SOURCES = \
tagstruct.c tagstruct.h \
typeid.c typeid.h \
util.c util.h \
winsock.h \
xmalloc.c xmalloc.h
if HAVE_X11
@ -476,6 +477,7 @@ libpolypcore_la_SOURCES = \
tokenizer.c tokenizer.h \
typeid.c typeid.h \
util.c util.h \
winsock.h \
xmalloc.c xmalloc.h
libpolypcore_la_CPPFLAGS = $(AM_CPPFLAGS)

View file

@ -28,9 +28,7 @@
#include <fcntl.h>
#include <unistd.h>
#ifdef HAVE_WINSOCK2_H
#include <winsock2.h>
#endif
#include "winsock.h"
#include "iochannel.h"
#include "util.h"

View file

@ -42,15 +42,13 @@
#include <sys/ioctl.h>
#endif
#ifdef HAVE_WINSOCK2_H
#include <winsock2.h>
#endif
#ifdef HAVE_LIBWRAP
#include <syslog.h>
#include <tcpd.h>
#endif
#include "winsock.h"
#include "core.h"
#include "mainloop.h"
#include "module.h"

View file

@ -38,9 +38,7 @@
#include "poll.h"
#endif
#ifdef HAVE_WINSOCK2_H
#include <winsock2.h>
#endif
#include "winsock.h"
#include "mainloop.h"
#include "util.h"

View file

@ -40,12 +40,7 @@
#include <netinet/in.h>
#endif
#ifdef HAVE_WINSOCK2_H
#include <winsock2.h>
#endif
#ifdef HAVE_WS2TCPIP_H
#include <ws2tcpip.h>
#endif
#include "winsock.h"
#include "module.h"
#include "socket-server.h"

View file

@ -36,16 +36,7 @@
#include <sys/select.h>
#endif
#ifdef HAVE_WINSOCK2_H
#include <winsock2.h>
#define EBADF WSAEBADF
#define ESHUTDOWN WSAESHUTDOWN
#define ECONNRESET WSAECONNRESET
#define ECONNABORTED WSAECONNABORTED
#define ENETRESET WSAENETRESET
#endif /* HAVE_WINSOCK2_H */
#include "winsock.h"
#ifndef HAVE_SYS_POLL_H

View file

@ -45,12 +45,7 @@
#include <netdb.h>
#endif
#ifdef HAVE_WINSOCK2_H
#include <winsock2.h>
#define ETIMEDOUT WSAETIMEDOUT
#define ECONNREFUSED WSAECONNREFUSED
#define EHOSTUNREACH WSAEHOSTUNREACH
#endif
#include "winsock.h"
#include "polyplib-internal.h"
#include "polyplib-context.h"

View file

@ -32,9 +32,7 @@
#include <netinet/in.h>
#endif
#ifdef HAVE_WINSOCK2_H
#include <winsock2.h>
#endif
#include "winsock.h"
#include "pstream.h"
#include "queue.h"

View file

@ -48,19 +48,12 @@
#include <netdb.h>
#endif
#ifdef HAVE_WINSOCK2_H
#include <winsock2.h>
#define EINPROGRESS WSAEINPROGRESS
#define ETIMEDOUT WSAETIMEDOUT
#endif
#ifdef HAVE_WS2TCPIP_H
#include <ws2tcpip.h>
#endif
#ifdef HAVE_LIBASYNCNS
#include <asyncns.h>
#endif
#include "winsock.h"
#include "socket-client.h"
#include "socket-util.h"
#include "util.h"

View file

@ -48,17 +48,12 @@
#include <netinet/in.h>
#endif
#ifdef HAVE_WINSOCK2_H
#include <winsock2.h>
#endif
#ifdef HAVE_WS2TCPIP_H
#include <ws2tcpip.h>
#endif
#ifdef HAVE_LIBWRAP
#include <tcpd.h>
#endif
#include "winsock.h"
#include "socket-server.h"
#include "socket-util.h"
#include "xmalloc.h"

View file

@ -57,10 +57,7 @@
#include <netdb.h>
#endif
#ifdef HAVE_WINSOCK2_H
#include <winsock2.h>
#define ETIMEDOUT WSAETIMEDOUT
#endif
#include "winsock.h"
#include "socket-util.h"
#include "util.h"

View file

@ -33,9 +33,7 @@
#include <netinet/in.h>
#endif
#ifdef HAVE_WINSOCK2_H
#include <winsock2.h>
#endif
#include "winsock.h"
#include "tagstruct.h"
#include "xmalloc.h"

View file

@ -59,13 +59,6 @@
#include <windows.h>
#endif
#ifdef HAVE_WINSOCK2_H
#include <winsock2.h>
#endif
#ifdef HAVE_WS2TCPIP_H
#include <ws2tcpip.h>
#endif
#include <samplerate.h>
#ifdef HAVE_PWD_H
@ -75,6 +68,8 @@
#include <grp.h>
#endif
#include "winsock.h"
#include "util.h"
#include "xmalloc.h"
#include "log.h"

23
polyp/winsock.h Normal file
View file

@ -0,0 +1,23 @@
#ifndef foowinsockhfoo
#define foowinsockhfoo
#ifdef HAVE_WINSOCK2_H
#include <winsock2.h>
#define EBADF WSAEBADF
#define ESHUTDOWN WSAESHUTDOWN
#define ECONNRESET WSAECONNRESET
#define ECONNABORTED WSAECONNABORTED
#define ENETRESET WSAENETRESET
#define EINPROGRESS WSAEINPROGRESS
#define ETIMEDOUT WSAETIMEDOUT
#define ECONNREFUSED WSAECONNREFUSED
#define EHOSTUNREACH WSAEHOSTUNREACH
#endif
#ifdef HAVE_WS2TCPIP_H
#include <ws2tcpip.h>
#endif
#endif