diff options
author | Christopher Faylor <me@cgf.cx> | 2009-08-04 04:20:36 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2009-08-04 04:20:36 +0000 |
commit | 824d851859450e8c3943d0439fc57a3520081eb4 (patch) | |
tree | f6ac160a57aee5c0875ba90309fba2ce6337158c /winsup/cygwin/fhandler.h | |
parent | ff7b364c121175ad1b5b88ec4010ee81dab1e5c4 (diff) | |
download | cygnal-824d851859450e8c3943d0439fc57a3520081eb4.tar.gz cygnal-824d851859450e8c3943d0439fc57a3520081eb4.tar.bz2 cygnal-824d851859450e8c3943d0439fc57a3520081eb4.zip |
* fhandler.h (fhandler_cygdrive:DRVSZ): New enum.
(pdrive_buf): New place to hold information about cygdrive.
* fhandler_disk_file.cc (fhandler_cygdrive::set_drives): Store drive info in
pdrive_buf since get_win32_name() could now be too small to hold everything.
(fhandler_cygdrive::rewinddir): Reset pdrive to pdrive_buf.
(fhandler_cygdrive::closedir): Ditto.
* pipe.cc (fhandler_pipe::init): Be more defensive when referencing
get_win32_name(). Rework logic which made a copy of the POSIX path and then
never used it.
Diffstat (limited to 'winsup/cygwin/fhandler.h')
-rw-r--r-- | winsup/cygwin/fhandler.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 382a592cb..87ae390d7 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -753,8 +753,13 @@ class fhandler_disk_file: public fhandler_base class fhandler_cygdrive: public fhandler_disk_file { + enum + { + DRVSZ = sizeof ("x:\\") + }; int ndrives; const char *pdrive; + char pdrive_buf[2 * 26 * DRVSZ]; void set_drives (); public: fhandler_cygdrive (); |