Commit 6676c77f by Tom Tromey Committed by Tom Tromey

natPlainDatagramSocketImpl.cc (close): New function.

	* java/net/natPlainDatagramSocketImpl.cc (close): New function.
	* java/net/natPlainSocketImpl.cc (close): Indentation fix.

From-SVN: r51563
parent 7d9b6378
2002-03-29 Tom Tromey <tromey@redhat.com>
* java/net/natPlainDatagramSocketImpl.cc (close): New function.
* java/net/natPlainSocketImpl.cc (close): Indentation fix.
2002-03-27 Jeff Sturm <jsturm@one-point.com> 2002-03-27 Jeff Sturm <jsturm@one-point.com>
* java/net/PlainDatagramSocketImpl.java * java/net/PlainDatagramSocketImpl.java
......
...@@ -8,7 +8,7 @@ details. */ ...@@ -8,7 +8,7 @@ details. */
#include <config.h> #include <config.h>
#include<platform.h> #include <platform.h>
#ifdef WIN32 #ifdef WIN32
#include <errno.h> #include <errno.h>
...@@ -16,6 +16,13 @@ details. */ ...@@ -16,6 +16,13 @@ details. */
#ifndef ENOPROTOOPT #ifndef ENOPROTOOPT
#define ENOPROTOOPT 109 #define ENOPROTOOPT 109
#endif #endif
static inline int
close(int s)
{
return closesocket(s);
}
#else /* WIN32 */ #else /* WIN32 */
#ifdef HAVE_SYS_SOCKET_H #ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h> #include <sys/socket.h>
......
...@@ -22,7 +22,8 @@ details. */ ...@@ -22,7 +22,8 @@ details. */
// These functions make the Win32 socket API look more POSIXy // These functions make the Win32 socket API look more POSIXy
static inline int static inline int
close(int s) { close(int s)
{
return closesocket(s); return closesocket(s);
} }
......
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