Commit 73fd169d authored by unknown's avatar unknown

Fixed some vio code that was using ___WIN__ instead of __WIN__


include/my_global.h:
  set SOCKET_EWOULDBLOCK to the proper windows def WSAEWOULDBLOCK
sql/net_serv.cc:
  fixed typo with using 3 leading underscores instead of 2
vio/vio.c:
  fixed typo with using 3 leading underscores instead of 2
vio/viosocket.c:
  fixed typo with using 3 leading underscores instead of 2
parent 2bca6451
...@@ -797,7 +797,7 @@ typedef off_t os_off_t; ...@@ -797,7 +797,7 @@ typedef off_t os_off_t;
#define socket_errno WSAGetLastError() #define socket_errno WSAGetLastError()
#define SOCKET_EINTR WSAEINTR #define SOCKET_EINTR WSAEINTR
#define SOCKET_EAGAIN WSAEINPROGRESS #define SOCKET_EAGAIN WSAEINPROGRESS
#define SOCKET_EWOULDBLOCK WSAEINPROGRESS #define SOCKET_EWOULDBLOCK WSAEWOULDBLOCK
#define SOCKET_ENFILE ENFILE #define SOCKET_ENFILE ENFILE
#define SOCKET_EMFILE EMFILE #define SOCKET_EMFILE EMFILE
#elif defined(OS2) #elif defined(OS2)
......
...@@ -132,7 +132,7 @@ my_bool my_net_init(NET *net, Vio* vio) ...@@ -132,7 +132,7 @@ my_bool my_net_init(NET *net, Vio* vio)
if (vio != 0) /* If real connection */ if (vio != 0) /* If real connection */
{ {
net->fd = vio_fd(vio); /* For perl DBI/DBD */ net->fd = vio_fd(vio); /* For perl DBI/DBD */
#if defined(MYSQL_SERVER) && !defined(___WIN__) && !defined(__EMX__) && !defined(OS2) #if defined(MYSQL_SERVER) && !defined(__WIN__) && !defined(__EMX__) && !defined(OS2)
if (!(test_flags & TEST_BLOCKING)) if (!(test_flags & TEST_BLOCKING))
{ {
my_bool old_mode; my_bool old_mode;
......
...@@ -130,7 +130,7 @@ Vio *vio_new(my_socket sd, enum enum_vio_type type, my_bool localhost) ...@@ -130,7 +130,7 @@ Vio *vio_new(my_socket sd, enum enum_vio_type type, my_bool localhost)
sprintf(vio->desc, sprintf(vio->desc,
(vio->type == VIO_TYPE_SOCKET ? "socket (%d)" : "TCP/IP (%d)"), (vio->type == VIO_TYPE_SOCKET ? "socket (%d)" : "TCP/IP (%d)"),
vio->sd); vio->sd);
#if !defined(___WIN__) && !defined(__EMX__) && !defined(OS2) #if !defined(__WIN__) && !defined(__EMX__) && !defined(OS2)
#if !defined(NO_FCNTL_NONBLOCK) #if !defined(NO_FCNTL_NONBLOCK)
#if defined(__FreeBSD__) #if defined(__FreeBSD__)
fcntl(sd, F_SETFL, vio->fcntl_mode); /* Yahoo! FreeBSD patch */ fcntl(sd, F_SETFL, vio->fcntl_mode); /* Yahoo! FreeBSD patch */
...@@ -145,7 +145,7 @@ Vio *vio_new(my_socket sd, enum enum_vio_type type, my_bool localhost) ...@@ -145,7 +145,7 @@ Vio *vio_new(my_socket sd, enum enum_vio_type type, my_bool localhost)
{ {
/* set to blocking mode by default */ /* set to blocking mode by default */
ulong arg=0, r; ulong arg=0, r;
r = ioctlsocket(sd,FIONBIO,(void*) &arg, sizeof(arg)); r = ioctlsocket(sd,FIONBIO,(void*) &arg);
vio->fcntl_mode &= ~O_NONBLOCK; vio->fcntl_mode &= ~O_NONBLOCK;
} }
#endif #endif
......
...@@ -82,7 +82,7 @@ int vio_blocking(Vio * vio __attribute__((unused)), my_bool set_blocking_mode, ...@@ -82,7 +82,7 @@ int vio_blocking(Vio * vio __attribute__((unused)), my_bool set_blocking_mode,
DBUG_PRINT("enter", ("set_blocking_mode: %d old_mode: %d", DBUG_PRINT("enter", ("set_blocking_mode: %d old_mode: %d",
(int) set_blocking_mode, (int) *old_mode)); (int) set_blocking_mode, (int) *old_mode));
#if !defined(___WIN__) && !defined(__EMX__) #if !defined(__WIN__) && !defined(__EMX__)
#if !defined(NO_FCNTL_NONBLOCK) #if !defined(NO_FCNTL_NONBLOCK)
if (vio->sd >= 0) if (vio->sd >= 0)
{ {
...@@ -115,7 +115,7 @@ int vio_blocking(Vio * vio __attribute__((unused)), my_bool set_blocking_mode, ...@@ -115,7 +115,7 @@ int vio_blocking(Vio * vio __attribute__((unused)), my_bool set_blocking_mode,
vio->fcntl_mode |= O_NONBLOCK; /* set bit */ vio->fcntl_mode |= O_NONBLOCK; /* set bit */
} }
if (old_fcntl != vio->fcntl_mode) if (old_fcntl != vio->fcntl_mode)
r = ioctlsocket(vio->sd,FIONBIO,(void*) &arg, sizeof(arg)); r = ioctlsocket(vio->sd,FIONBIO,(void*) &arg);
} }
#ifndef __EMX__ #ifndef __EMX__
else else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment