* 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.
This commit is contained in:
Christopher Faylor
2001-11-21 06:47:57 +00:00
parent f6a6c2a358
commit 7903ee6955
8 changed files with 895 additions and 743 deletions

View File

@@ -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);