source: trunk/src/emx/include/io.h@ 1739

Last change on this file since 1739 was 1519, checked in by bird, 21 years ago

Big path handling change. Fixed wrong file headers. A new api or two. A bit of restructuring. And hopefully no new bug :-)

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