fix variable name.
[ruby-svn.git] / wince / io.h
blobeb355a49164e47592e03b986a0d6f1d1d4dbfe5f
2 #ifndef _IO_WINCE_H_
3 #define _IO_WINCE_H_
5 #ifndef _TIME_T_DEFINED
6 typedef unsigned long time_t;
7 #define _TIME_T_DEFINED
8 #endif
10 #ifndef _FSIZE_T_DEFINED
11 typedef unsigned long _fsize_t; /* Could be 64 bits for Win32 */
12 #define _FSIZE_T_DEFINED
13 #endif
15 #ifndef _FINDDATA_T_DEFINED
16 struct _finddata_t {
17 unsigned attrib;
18 time_t time_create; /* -1 for FAT file systems */
19 time_t time_access; /* -1 for FAT file systems */
20 time_t time_write;
21 _fsize_t size;
22 char name[260];
24 #define _FINDDATA_T_DEFINED
25 #endif
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
32 int _chsize(int handle, long size);
33 int _rename (const char *oldname, const char *newname);
34 int _unlink(const char *file);
35 int _umask(int cmask);
36 int _chmod(const char *path, int mode);
37 int dup( int handle );
38 //int dup2( int handle1, int handle2 );
39 int _isatty(int fd);
40 int _pipe(int *phandles, unsigned int psize, int textmode);
41 int _access(const char *filename, int flags);
42 int _open_osfhandle ( long osfhandle, int flags);
43 long _get_osfhandle( int filehandle );
44 int _open(const char *file, int mode,...);
45 int close(int fd);
46 int _read(int fd, void *buffer, int length);
47 int _write(int fd, const void *buffer, unsigned count);
48 long _lseek(int handle, long offset, int origin);
49 long _findfirst( char *filespec, struct _finddata_t *fileinfo );
50 int _findnext( long handle, struct _finddata_t *fileinfo );
51 int _findclose( long handle );
53 #ifdef __cplusplus
55 #endif
57 #define chmod _chmod
58 #define chsize _chsize
59 #define rename _rename
60 #define unlink _unlink
61 #define open _open
62 //#define close _close
63 #define read _read
64 #define write _write
65 #define umask _umask
66 //#define dup _dup
67 #define isatty _isatty
68 #define access _access
69 #define pipe _pipe
70 #define setmode _setmode
71 #define lseek _lseek
73 #define _close close
75 #endif