+2002-08-27 Tony Kimball <alk@pobox.com>
+ Tom Tromey <tromey@redhat.com>
+
+ * java/net/natPlainDatagramSocketImpl.cc (NATIVE_CLOSE): New
+ define.
+ (::close): Removed.
+ (PlainDatagramSocketImpl::close): Use NATIVE_CLOSE.
+ * java/net/natPlainSocketImpl.cc (NATIVE_CLOSE): New define.
+ (::close): Removed.
+ (PlainSocketImpl::close): Use NATIVE_CLOSE.
+ * include/win32.h (getcwd): Removed declaration. Include io.h.
+
2002-08-25 Adam Megacz <adam@xwt.org>
* include/win32.h (getcwd): copied function declaration as
#include <gcj/cni.h>
#include <java/util/Properties.h>
-// FIXME: remove this once the io.h issue is resolved
-extern "C" char* getcwd (char*, int);
+#include <io.h>
extern void _Jv_platform_initialize (void);
extern void _Jv_platform_initProperties (java::util::Properties*);
#define ENOPROTOOPT 109
#endif
-static inline int
-close(int s)
-{
- return closesocket(s);
-}
+#define NATIVE_CLOSE(s) closesocket (s)
#else /* WIN32 */
+
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#endif
#include <errno.h>
#include <string.h>
+
+#define NATIVE_CLOSE(s) ::close (s)
+
#endif /* WIN32 */
#if HAVE_BSTRING_H
// The method isn't declared to throw anything, so we disregard
// the return value.
- ::close (fnum);
+ NATIVE_CLOSE (fnum);
fnum = -1;
timeout = 0;
}
#undef MIN_PRIORITY
#undef FIONREAD
-// These functions make the Win32 socket API look more POSIXy
-static inline int
-close(int s)
-{
- return closesocket(s);
-}
+#define NATIVE_CLOSE(s) closesocket (s)
+// These functions make the Win32 socket API look more POSIXy
static inline int
write(int s, void *buf, int len)
{
#include <errno.h>
#include <string.h>
+#define NATIVE_CLOSE(s) ::close (s)
+
#endif /* WIN32 */
#endif /* DISABLE_JAVA_NET */
JvSynchronize sync (this);
// should we use shutdown here? how would that effect so_linger?
- int res = ::close (fnum);
+ int res = NATIVE_CLOSE (fnum);
if (res == -1)
{