1 // win32.h -- Helper functions for Microsoft-flavored OSs.
3 /* Copyright (C) 2002 Free Software Foundation
5 This file is part of libgcj.
7 This software is copyrighted work licensed under the terms of the
8 Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
11 #ifndef __JV_WIN32_H__
12 #define __JV_WIN32_H__
17 #undef __INSIDE_CYGWIN__
21 #include <java/util/Properties.h>
25 #ifndef DISBALE_JAVA_NET
27 // these errors cannot occur on Win32
32 #define ENOPROTOOPT 109
35 #endif // DISBALE_JAVA_NET
37 extern void _Jv_platform_initialize (void);
38 extern void _Jv_platform_initProperties (java::util::Properties*);
39 extern jlong _Jv_platform_gettimeofday ();
42 _Jv_platform_close_on_exec (jint)
47 #ifndef DISBALE_JAVA_NET
50 _Jv_socket (int domain, int type, int protocol)
52 return ::socket (domain, type, protocol);
56 _Jv_connect (jint fd, sockaddr *ptr, int len)
58 return ::connect (fd, ptr, len);
64 return ::closesocket (fd);
68 _Jv_bind (int fd, struct sockaddr *addr, int addrlen)
70 return ::bind (fd, addr, addrlen);
74 _Jv_accept (int fd, struct sockaddr *addr, socklen_t *addrlen)
76 return ::accept (fd, addr, addrlen);
80 _Jv_listen (int fd, int backlog)
82 return ::listen (fd, backlog);
86 _Jv_write(int s, void *buf, int len)
88 return ::send (s, (char*) buf, len, 0);
92 _Jv_read(int s, void *buf, int len)
94 return ::recv (s, (char*) buf, len, 0);
97 #endif /* DISBALE_JAVA_NET */
99 #define HAVE_BACKTRACE
101 /* Store up to SIZE return address of the current program state in
102 ARRAY and return the exact number of values stored. */
103 extern int backtrace (void **__array, int __size);
105 #endif /* __JV_WIN32_H__ */