diff options
author | Christopher Faylor <me@cgf.cx> | 2001-11-21 06:47:57 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2001-11-21 06:47:57 +0000 |
commit | 7903ee6955c3add49c2aa341ac1fd15adce1025e (patch) | |
tree | 39f70e3c053f8440791daf24e80987148cd037bd /winsup/cygwin/fhandler.h | |
parent | f6a6c2a358f81a8d7c550bdcba2990c16c0d54ef (diff) | |
download | newlib-7903ee6955c3add49c2aa341ac1fd15adce1025e.zip newlib-7903ee6955c3add49c2aa341ac1fd15adce1025e.tar.gz newlib-7903ee6955c3add49c2aa341ac1fd15adce1025e.tar.bz2 |
* Makefile.in (DLL_OFILES): Add fhandler_disk_file.o.
* cygheap.h (cygheap_fdnew::operator =): New operator.
* dir.cc: Add invalid struct checking throughout. Use methods for all
directory manipulation throughout.
* fhandler.cc: Move fhandler_disk_file stuff to own file.
(fhandler_base::opendir): New method.
(fhandler_base::readdir): New method.
(fhandler_base::telldir): New method.
(fhandler_base::seekdir): New method.
(fhandler_base::rewinddir): New method.
(fhandler_base::closedir): New method.
* fhandler_disk_file.cc: New file.
* fhandler.h (fhandler_base): Declare new virtual methods.
(fhandler_disk_file): Ditto.
(fhandler_cygdrive): New class.
* path.cc (conv_path_list): Use strccpy to break apart path.
Diffstat (limited to 'winsup/cygwin/fhandler.h')
-rw-r--r-- | winsup/cygwin/fhandler.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 1661866..ad6444d 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -103,6 +103,8 @@ extern struct __cygwin_perfile *perfile_table; class select_record; class path_conv; class fhandler_disk_file; +typedef struct __DIR DIR; +struct dirent; enum bg_check_types { @@ -338,6 +340,12 @@ class fhandler_base void operator delete (void *); virtual HANDLE get_guard () const {return NULL;} virtual void set_eof () {} + virtual DIR *opendir (const char *dirname, path_conv& pc); + virtual dirent *readdir (DIR *); + virtual off_t telldir (DIR *); + virtual void seekdir (DIR *, off_t); + virtual void rewinddir (DIR *); + virtual int closedir (DIR *); }; class fhandler_socket: public fhandler_base @@ -532,6 +540,12 @@ class fhandler_disk_file: public fhandler_base int msync (HANDLE h, caddr_t addr, size_t len, int flags); BOOL fixup_mmap_after_fork (HANDLE h, DWORD access, DWORD offset, DWORD size, void *address); + DIR *opendir (const char *dirname, path_conv& pc); + struct dirent *readdir (DIR *); + off_t telldir (DIR *); + void seekdir (DIR *, off_t); + void rewinddir (DIR *); + int closedir (DIR *); }; class fhandler_serial: public fhandler_base @@ -577,6 +591,12 @@ class fhandler_serial: public fhandler_base select_record *select_except (select_record *s); }; +class fhandler_cygdrive: public fhandler_disk_file +{ + public: + fhandler_cygdrive (); +}; + #define acquire_output_mutex(ms) \ __acquire_output_mutex (__PRETTY_FUNCTION__, __LINE__, ms); |