diff options
author | (no author) <(no author)@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-04-07 16:31:42 +0000 |
---|---|---|
committer | (no author) <(no author)@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-04-07 16:31:42 +0000 |
commit | d8d674a19a9f3d2f17427e7a7b5217e2c15880cf (patch) | |
tree | 4342fb258227c31c859682720d4d979a6df73063 /libjava/include/posix.h | |
parent | 964944fc854c1dd723f7b8150d0deac634aabdbb (diff) |
This commit was manufactured by cvs2svn to create taghammer-3_3-merge-20030407
'hammer-3_3-merge-20030407'.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/tags/hammer-3_3-merge-20030407@65335 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/include/posix.h')
-rw-r--r-- | libjava/include/posix.h | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/libjava/include/posix.h b/libjava/include/posix.h index cdcdb5d45ac..0aadd47d3b3 100644 --- a/libjava/include/posix.h +++ b/libjava/include/posix.h @@ -1,6 +1,6 @@ // posix.h -- Helper functions for POSIX-flavored OSs. -/* Copyright (C) 2000, 2002 Free Software Foundation +/* Copyright (C) 2000, 2002, 2003 Free Software Foundation This file is part of libgcj. @@ -60,6 +60,16 @@ _Jv_platform_close_on_exec (jint fd) ::fcntl (fd, F_SETFD, FD_CLOEXEC); } +#undef fcntl + +#ifdef JV_HASH_SYNCHRONIZATION +inline void +_Jv_platform_usleep (unsigned long usecs) +{ + usleep (usecs); +} +#endif /* JV_HASH_SYNCHRONIZATION */ + #ifndef DISABLE_JAVA_NET #ifndef HAVE_SOCKLEN_T @@ -72,18 +82,24 @@ _Jv_socket (int domain, int type, int protocol) return ::socket (domain, type, protocol); } +#undef socket + inline int _Jv_connect (jint fd, sockaddr *ptr, int len) { return ::connect (fd, ptr, len); } +#undef connect + inline int _Jv_close (jint fd) { return ::close (fd); } +#undef close + // Avoid macro definitions of bind from system headers, e.g. on // Solaris 7 with _XOPEN_SOURCE. FIXME inline int @@ -92,6 +108,8 @@ _Jv_bind (int fd, struct sockaddr *addr, int addrlen) return ::bind (fd, addr, addrlen); } +#undef bind + // Same problem with accept on Tru64 UNIX with _POSIX_PII_SOCKET inline int _Jv_accept (int fd, struct sockaddr *addr, socklen_t *addrlen) @@ -99,24 +117,32 @@ _Jv_accept (int fd, struct sockaddr *addr, socklen_t *addrlen) return ::accept (fd, addr, addrlen); } +#undef accept + inline int _Jv_listen (int fd, int backlog) { return ::listen (fd, backlog); } +#undef listen + inline int _Jv_write(int s, void *buf, int len) { return ::write (s, buf, len); } +#undef write + inline int _Jv_read(int s, void *buf, int len) { return ::read (s, buf, len); } +#undef read + #endif /* DISABLE_JAVA_NET */ #endif /* __JV_POSIX_H__ */ |