summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/fhandler_disk_file.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2002-05-24 05:44:10 +0000
committerChristopher Faylor <me@cgf.cx>2002-05-24 05:44:10 +0000
commitff938546975d416cf33466f54f80ec1b37e2693c (patch)
tree312bb5600e3a56bc70aa4dd8f4a3b363af5cdb50 /winsup/cygwin/fhandler_disk_file.cc
parent7a364eb36494dcac90196db3d93d15086d6c1bc1 (diff)
downloadcygnal-ff938546975d416cf33466f54f80ec1b37e2693c.tar.gz
cygnal-ff938546975d416cf33466f54f80ec1b37e2693c.tar.bz2
cygnal-ff938546975d416cf33466f54f80ec1b37e2693c.zip
* dtable.cc (dtable::build_fhandler_from_name): Just pass posix path along to
set_name via return_and_clear_normalized_path. (dtable::build_fhandler): New method with const char * argument. (dtable::reset_unix_path_name): Eliminate. (dtable::dup_worker): Use correct build_fhandler method. * mmap.cc (mmap_record::alloc_fh): Ditto. * dtable.h (dtable::build_fhandler): New method. (dtable::reset_unix_path_name): Eliminate. * fhandler.cc (fhandler_base::set_name): Assume that unix_name has already been cmalloced. (fhandler_base::reset_unix_path_name): Eliminate. (fhandler_base::~fhandler_base): Coercion for cfree. * fhandler.h (fhandler_base::unix_path_name): Make const char *. (fhandler_base::win32_path_name): Ditto. (fhandler_base::reset_unix_path_name): Eliminate. * fhandler_disk_file.cc (fhandler_cygdrive::set_drives): Accommodate const char *ness of win32_path_name. * fhandler_socket.cc (fhandler_socket::fstat): Accommodate new set_name requirements. * path.cc (path_conv::return_and_clear_normalized_path): New method. (path_conv::clear_normalized_path): Eliminate. (path_conv::~path_conv): Ditto. (path_conv::check): Accommodate new build_fhandler method. * path.h (path_conv::~path_conv): Eliminate. (path_conv::clear_normalized_path): Ditto. (path_conv::return_and_clear_normalized_path): Declare new method.
Diffstat (limited to 'winsup/cygwin/fhandler_disk_file.cc')
-rw-r--r--winsup/cygwin/fhandler_disk_file.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc
index 99f8b7ab0..347d1fd6d 100644
--- a/winsup/cygwin/fhandler_disk_file.cc
+++ b/winsup/cygwin/fhandler_disk_file.cc
@@ -775,10 +775,10 @@ void
fhandler_cygdrive::set_drives ()
{
const int len = 1 + 26 * DRVSZ;
- win32_path_name = (char *) crealloc (win32_path_name, len);
+ char *p = (char *) crealloc ((void *) win32_path_name, len);
- ndrives = GetLogicalDriveStrings (len, win32_path_name) / DRVSZ;
- pdrive = win32_path_name;
+ win32_path_name = pdrive = p;
+ ndrives = GetLogicalDriveStrings (len, p) / DRVSZ;
}
int