Makefile.in: Rebuilt.

* Makefile.in: Rebuilt.
	* Makefile.am (libgcj_la_SOURCES): Added posix.cc.
	* java/net/natPlainSocketImpl.cc: Include posix.h.
	(accept): Use _Jv_select.
	* java/net/natPlainDatagramSocketImpl.cc: Include posix.h.
	(receive): Use _Jv_select.
	* java/io/natFileDescriptorPosix.cc: Include posix.h.
	(available): Use _Jv_select.
	* java/lang/natSystem.cc: Include posix.h.
	(currentTimeMillis): Use _Jv_gettimeofday.
	* include/posix.h: New file.
	* posix.cc: New file.

From-SVN: r35435
This commit is contained in:
Tom Tromey
2000-08-02 21:54:04 +00:00
committed by Tom Tromey
parent 2d57911678
commit f536cd95fb
9 changed files with 159 additions and 56 deletions
@@ -17,16 +17,10 @@ details. */
#define ENOPROTOOPT 109
#endif
#else /* USE_WINSOCK */
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#include "posix.h"
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#include <sys/time.h>
#ifdef HAVE_SYS_SELECT_H
#include <sys/select.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
@@ -314,7 +308,7 @@ java::net::PlainDatagramSocketImpl::receive (java::net::DatagramPacket *p)
tv.tv_sec = timeout / 1000;
tv.tv_usec = (timeout % 1000) * 1000;
int retval;
if ((retval = select (fnum + 1, &rset, NULL, NULL, &tv)) < 0)
if ((retval = _Jv_select (fnum + 1, &rset, NULL, NULL, &tv)) < 0)
goto error;
else if (retval == 0)
JvThrow (new java::io::InterruptedIOException ());
+3 -7
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 1998, 1999 Free Software Foundation
/* Copyright (C) 1998, 1999, 2000 Free Software Foundation
This file is part of libgcj.
@@ -19,12 +19,8 @@ details. */
#define ENOPROTOOPT 109
#endif
#else /* USE_WINSOCK */
#include <sys/types.h>
#include "posix.h"
#include <sys/socket.h>
#include <sys/time.h>
#ifdef HAVE_SYS_SELECT_H
#include <sys/select.h>
#endif
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <errno.h>
@@ -249,7 +245,7 @@ java::net::PlainSocketImpl::accept (java::net::PlainSocketImpl *s)
tv.tv_sec = timeout / 1000;
tv.tv_usec = (timeout % 1000) * 1000;
int retval;
if ((retval = select (fnum + 1, &rset, NULL, NULL, &tv)) < 0)
if ((retval = _Jv_select (fnum + 1, &rset, NULL, NULL, &tv)) < 0)
goto error;
else if (retval == 0)
JvThrow (new java::io::InterruptedIOException (