mirror of
https://github.com/PowerShell/Win32-OpenSSH.git
synced 2025-04-08 19:35:37 +02:00
Add #ifdefs around #defines
In order to avoid redefinition warnings, check before we define.
This commit is contained in:
parent
5fd03ec459
commit
3bbefb6078
@ -40,11 +40,13 @@ int WSHELPshutdown(int sfd, int how);
|
||||
int WSHELPaccept(int sfd, struct sockaddr* addr, int* addrlen);
|
||||
int WSHELPselect (int sfds, fd_set* readfds, fd_set* writefds, fd_set* exceptfds, const struct timeval *timeout);
|
||||
|
||||
|
||||
/* Other helpers */
|
||||
void WSHELPinitialize();
|
||||
int map_standard_descriptor(int *fd);
|
||||
void allocate_standard_descriptor(int fd);
|
||||
|
||||
|
||||
/* Redirect callers of socket functions to use our indirection functions */
|
||||
#if NEED_FUNC_MACROS
|
||||
#define isatty(sfd) WSHELPisatty(sfd)
|
||||
@ -127,30 +129,75 @@ int WSHELPclose(int sfd);
|
||||
|
||||
|
||||
/* Errno helpers */
|
||||
#ifndef ENETDOWN
|
||||
#define ENETDOWN WSAENETDOWN
|
||||
#endif
|
||||
#ifndef EAFNOSUPPORT
|
||||
#define EAFNOSUPPORT WSAEAFNOSUPPORT
|
||||
#endif
|
||||
#ifndef EINPROGRESS
|
||||
#define EINPROGRESS WSAEINPROGRESS
|
||||
#endif
|
||||
#ifndef EXX
|
||||
#define EXX WSAEMFILE
|
||||
#endif
|
||||
#ifndef EXX1
|
||||
#define EXX1 WSAENOBUFS
|
||||
#endif
|
||||
#ifndef EPROTONOSUPPORT
|
||||
#define EPROTONOSUPPORT WSAEPROTONOSUPPORT
|
||||
#endif
|
||||
#ifndef EPROTOTYPE
|
||||
#define EPROTOTYPE WSAEPROTOTYPE
|
||||
#endif
|
||||
#ifndef ESOCKTNOSUPPORT
|
||||
#define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT
|
||||
#endif
|
||||
#ifndef EADDRINUSE
|
||||
#define EADDRINUSE WSAEADDRINUSE
|
||||
// in errno.h #define EINVAL WSAEINVAL
|
||||
#endif
|
||||
#ifndef EISCONN
|
||||
#define EISCONN WSAEISCONN
|
||||
#endif
|
||||
#ifndef ENOTSOCK
|
||||
#define ENOTSOCK WSAENOTSOCK
|
||||
#endif
|
||||
#ifndef EOPNOTSUPP
|
||||
#define EOPNOTSUPP WSAENOTSUPP
|
||||
// in errno.h #define EINTR WSAEINTR
|
||||
#endif
|
||||
#ifndef EALREADY
|
||||
#define EALREADY WSAEALREADY
|
||||
#endif
|
||||
#ifndef ECONNREFUSED
|
||||
#define ECONNREFUSED WSAECONNREFUSED
|
||||
// in errno.h #define EFAULT WSAEFAULT
|
||||
#endif
|
||||
#ifndef ENOTUNREACH
|
||||
#define ENOTUNREACH WSAENOTUNREACH
|
||||
#endif
|
||||
#ifndef EHOSTUNREACH
|
||||
#define EHOSTUNREACH WSAEHOSTUNREACH
|
||||
#endif
|
||||
#ifndef ETIMEDOUT
|
||||
#define ETIMEDOUT WSAETIMEDOUT
|
||||
#endif
|
||||
#ifndef EWOULDBLOCK
|
||||
#define EWOULDBLOCK WSAEWOULDBLOCK
|
||||
#endif
|
||||
#ifndef EACCES
|
||||
#define EACCES WSAEACCESS
|
||||
#endif
|
||||
#ifndef ECONNRESET
|
||||
#define ECONNRESET WSAECONNRESET
|
||||
#endif
|
||||
#ifndef ENOPROTOOPT
|
||||
#define ENOPROTOOPT WSAENOPROTOOPT
|
||||
#endif
|
||||
#ifndef EPFNOSUPPORT
|
||||
#define EPFNOSUPPORT WSAEPFNOSUPPORT
|
||||
#endif
|
||||
#ifndef ENOTCONN
|
||||
#define ENOTCONN WSAENOTCONN
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user