|
Last change
on this file since 1389 was 2, checked in by bird, 23 years ago |
|
Initial revision
|
-
Property cvs2svn:cvs-rev
set to
1.1
-
Property svn:eol-style
set to
native
-
Property svn:executable
set to
*
|
|
File size:
1.1 KB
|
| Line | |
|---|
| 1 | // posix.h -- Helper functions for POSIX-flavored OSs.
|
|---|
| 2 |
|
|---|
| 3 | /* Copyright (C) 2000, 2002 Free Software Foundation
|
|---|
| 4 |
|
|---|
| 5 | This file is part of libgcj.
|
|---|
| 6 |
|
|---|
| 7 | This software is copyrighted work licensed under the terms of the
|
|---|
| 8 | Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
|
|---|
| 9 | details. */
|
|---|
| 10 |
|
|---|
| 11 | /* Required on Tru64 UNIX V4/V5 so <sys/socket.h> defines prototypes of
|
|---|
| 12 | socket functions with socklen_t instead of size_t. This must be defined
|
|---|
| 13 | early so <standards.h> defines the correct version of __PIIX. */
|
|---|
| 14 | #define _POSIX_PII_SOCKET
|
|---|
| 15 |
|
|---|
| 16 | #include <time.h>
|
|---|
| 17 | #include <sys/types.h>
|
|---|
| 18 |
|
|---|
| 19 | #ifdef HAVE_SYS_TIME_H
|
|---|
| 20 | #include <sys/time.h>
|
|---|
| 21 | #endif
|
|---|
| 22 |
|
|---|
| 23 | #ifdef HAVE_SYS_SELECT_H
|
|---|
| 24 | #include <sys/select.h>
|
|---|
| 25 | #endif
|
|---|
| 26 |
|
|---|
| 27 | #ifdef HAVE_UNISTD_H
|
|---|
| 28 | #include <unistd.h>
|
|---|
| 29 | #endif
|
|---|
| 30 |
|
|---|
| 31 | #include <fcntl.h>
|
|---|
| 32 |
|
|---|
| 33 | #include <gcj/cni.h>
|
|---|
| 34 | #include <java/util/Properties.h>
|
|---|
| 35 |
|
|---|
| 36 | extern int _Jv_select (int n, fd_set *, fd_set *, fd_set *, struct timeval *);
|
|---|
| 37 | extern jlong _Jv_platform_gettimeofday ();
|
|---|
| 38 | extern void _Jv_platform_initialize (void);
|
|---|
| 39 | extern void _Jv_platform_initProperties (java::util::Properties*);
|
|---|
| 40 |
|
|---|
| 41 | inline void
|
|---|
| 42 | _Jv_platform_close_on_exec (jint fd)
|
|---|
| 43 | {
|
|---|
| 44 | // Ignore errors.
|
|---|
| 45 | fcntl (fd, F_SETFD, FD_CLOEXEC);
|
|---|
| 46 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.