| 1 | /* io.h,v 1.10 2004/09/14 22:27:33 bird Exp */
|
|---|
| 2 | /** @file
|
|---|
| 3 | * EMX
|
|---|
| 4 | */
|
|---|
| 5 |
|
|---|
| 6 | #ifndef _IO_H
|
|---|
| 7 | #define _IO_H
|
|---|
| 8 |
|
|---|
| 9 | #if defined (__cplusplus)
|
|---|
| 10 | extern "C" {
|
|---|
| 11 | #endif
|
|---|
| 12 |
|
|---|
| 13 | #include <sys/_types.h>
|
|---|
| 14 |
|
|---|
| 15 | #if !defined(_SIZE_T_DECLARED) && !defined(_SIZE_T) /* bird: emx */
|
|---|
| 16 | typedef __size_t size_t;
|
|---|
| 17 | #define _SIZE_T_DECLARED
|
|---|
| 18 | #define _SIZE_T /* bird: emx */
|
|---|
| 19 | #endif
|
|---|
| 20 |
|
|---|
| 21 | #if !defined(_SSIZE_T_DECLARED) && !defined(_SSIZE_T) /* bird: emx */
|
|---|
| 22 | typedef __ssize_t ssize_t;
|
|---|
| 23 | #define _SSIZE_T_DECLARED
|
|---|
| 24 | #define _SSIZE_T /* bird: emx */
|
|---|
| 25 | #endif
|
|---|
| 26 |
|
|---|
| 27 | #if !defined(_OFF_T_DECLARED) && !defined(_OFF_T) /* bird:emx */
|
|---|
| 28 | typedef __off_t off_t; /* file offset */
|
|---|
| 29 | #define _OFF_T_DECLARED
|
|---|
| 30 | #define _OFF_T /* bird: emx */
|
|---|
| 31 | #endif
|
|---|
| 32 |
|
|---|
| 33 | #if !defined(_MODE_T_DECLARED) && !defined(_MODE_T) /* bird: EMX */
|
|---|
| 34 | typedef __mode_t mode_t;
|
|---|
| 35 | #define _MODE_T_DECLARED
|
|---|
| 36 | #define _MODE_T /* bird: EMX */
|
|---|
| 37 | #endif
|
|---|
| 38 |
|
|---|
| 39 | #if !defined (SEEK_SET)
|
|---|
| 40 | #define SEEK_SET 0
|
|---|
| 41 | #define SEEK_CUR 1
|
|---|
| 42 | #define SEEK_END 2
|
|---|
| 43 | #endif
|
|---|
| 44 |
|
|---|
| 45 | struct stat;
|
|---|
| 46 | struct fd_set;
|
|---|
| 47 | struct timeval;
|
|---|
| 48 |
|
|---|
| 49 | int remove (__const__ char *);
|
|---|
| 50 | int rename (__const__ char *, __const__ char *);
|
|---|
| 51 |
|
|---|
| 52 | int access (__const__ char *, int);
|
|---|
| 53 | int chmod (__const__ char *, mode_t);
|
|---|
| 54 | int chsize (int, off_t);
|
|---|
| 55 | int close (int);
|
|---|
| 56 | int creat (const char *, mode_t);
|
|---|
| 57 | int dup (int);
|
|---|
| 58 | int dup2 (int, int);
|
|---|
| 59 | int eof (int);
|
|---|
| 60 | off_t filelength (int);
|
|---|
| 61 | int fstat (int, struct stat *);
|
|---|
| 62 | int fsync (int);
|
|---|
| 63 | #ifndef _FTRUNCATE_DECLARED
|
|---|
| 64 | #define _FTRUNCATE_DECLARED
|
|---|
| 65 | int ftruncate(int, off_t);
|
|---|
| 66 | #endif
|
|---|
| 67 | int ioctl (int, unsigned long request, ...);
|
|---|
| 68 | int isatty (int);
|
|---|
| 69 | #ifndef _LSEEK_DECLARED
|
|---|
| 70 | #define _LSEEK_DECLARED
|
|---|
| 71 | off_t lseek(int, off_t, int);
|
|---|
| 72 | #endif
|
|---|
| 73 | int mkstemp (char *);
|
|---|
| 74 | char *mktemp (char *);
|
|---|
| 75 | int open (__const__ char *, int, ...);
|
|---|
| 76 | int pipe (int *);
|
|---|
| 77 | ssize_t read (int, void *, size_t);
|
|---|
| 78 | int select (int, struct fd_set *, struct fd_set *, struct fd_set *, struct timeval *);
|
|---|
| 79 | int setmode (int, int);
|
|---|
| 80 | int sopen (__const__ char *, int, int, ...);
|
|---|
| 81 | int stat (__const__ char *, struct stat *);
|
|---|
| 82 | off_t tell (int);
|
|---|
| 83 | #ifndef _TRUNCATE_DECLARED
|
|---|
| 84 | #define _TRUNCATE_DECLARED
|
|---|
| 85 | int truncate(const char *, off_t);
|
|---|
| 86 | #endif
|
|---|
| 87 | mode_t umask(mode_t);
|
|---|
| 88 | int unlink (__const__ char *);
|
|---|
| 89 | int write (int, __const__ void *, size_t);
|
|---|
| 90 |
|
|---|
| 91 | #if (!defined (__STRICT_ANSI__) && !defined (_POSIX_SOURCE)) || defined (_WITH_UNDERSCORE) || defined(__USE_EMX)
|
|---|
| 92 |
|
|---|
| 93 | int _access (__const__ char *, int);
|
|---|
| 94 | int _chmod (__const__ char *, int);
|
|---|
| 95 | int _chsize (int, off_t);
|
|---|
| 96 | int _close (int);
|
|---|
| 97 | int _creat (__const__ char *, int);
|
|---|
| 98 | int _crlf (char *, size_t, size_t *);
|
|---|
| 99 | int _dup (int);
|
|---|
| 100 | int _dup2 (int, int);
|
|---|
| 101 | int _eof (int);
|
|---|
| 102 | off_t _filelength (int);
|
|---|
| 103 | int _fstat (int, struct stat *);
|
|---|
| 104 | int _fsync (int);
|
|---|
| 105 | #ifndef __FTRUNCATE_DECLARED
|
|---|
| 106 | #define __FTRUNCATE_DECLARED
|
|---|
| 107 | int _ftruncate(int, off_t);
|
|---|
| 108 | #endif
|
|---|
| 109 | int _imphandle (int);
|
|---|
| 110 | int _ioctl (int, unsigned long request, ...);
|
|---|
| 111 | int _isatty (int);
|
|---|
| 112 | int _isterm (int);
|
|---|
| 113 | #ifndef __LSEEK_DECLARED
|
|---|
| 114 | #define __LSEEK_DECLARED
|
|---|
| 115 | off_t _lseek(int, off_t, int);
|
|---|
| 116 | #endif
|
|---|
| 117 | int _mkstemp (char *);
|
|---|
| 118 | char *_mktemp (char *);
|
|---|
| 119 | int _open (__const__ char *, int, ...);
|
|---|
| 120 | int _pipe (int *);
|
|---|
| 121 | ssize_t _read (int, void *, size_t);
|
|---|
| 122 | int _seek_hdr (int);
|
|---|
| 123 | int _select (int, struct fd_set *, struct fd_set *, struct fd_set *, struct timeval *);
|
|---|
| 124 | int _setmode (int, int);
|
|---|
| 125 | int _sopen (__const__ char *, int, int, ...);
|
|---|
| 126 | int _stat (__const__ char *, struct stat *);
|
|---|
| 127 | off_t _tell (int);
|
|---|
| 128 | int _truncate (char *, off_t);
|
|---|
| 129 | int _umask (int);
|
|---|
| 130 | int _unlink (__const__ char *);
|
|---|
| 131 | int _write (int, __const__ void *, size_t);
|
|---|
| 132 |
|
|---|
| 133 | #endif
|
|---|
| 134 |
|
|---|
| 135 | #if defined (__cplusplus)
|
|---|
| 136 | }
|
|---|
| 137 | #endif
|
|---|
| 138 |
|
|---|
| 139 | #endif /* not _IO_H */
|
|---|