Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2002-06-27 06:29:57 +0400
committerChristopher Faylor <me@cgf.cx>2002-06-27 06:29:57 +0400
commitb3e2d035bbf42433f48a966e1f73f9a67082d37e (patch)
tree09c8b6a33c677c20d4801075b05c57e20c2ebc53 /winsup
parentc99902b9b09c43722eeccac40175f9e69d9e59c4 (diff)
* cygheap.cc (cygheap_user::set_name): Correct thinko in below change.
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/ChangeLog4
-rw-r--r--winsup/cygwin/cygheap.cc10
-rw-r--r--winsup/cygwin/fhandler_disk_file.cc4
3 files changed, 13 insertions, 5 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 1af4606df..85eb55d45 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,9 @@
2002-06-26 Christopher Faylor <cgf@redhat.com>
+ * cygheap.cc (cygheap_user::set_name): Correct thinko in below change.
+
+2002-06-26 Christopher Faylor <cgf@redhat.com>
+
* cygheap.cc (cygheap_user::set_name): Avoid clearing things when just
setting name to itself or during first time initialization.
diff --git a/winsup/cygwin/cygheap.cc b/winsup/cygwin/cygheap.cc
index ded9c252a..561e9330f 100644
--- a/winsup/cygwin/cygheap.cc
+++ b/winsup/cygwin/cygheap.cc
@@ -440,12 +440,14 @@ cygheap_user::~cygheap_user ()
void
cygheap_user::set_name (const char *new_name)
{
- if (strcasematch (new_name, pname))
- return; /* nothing changed */
-
bool allocated = !!pname;
+
if (allocated)
- cfree (pname);
+ {
+ if (strcasematch (new_name, pname))
+ return;
+ cfree (pname);
+ }
pname = cstrdup (new_name ? new_name : "");
if (!allocated)
diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc
index 443612ff4..c412e2109 100644
--- a/winsup/cygwin/fhandler_disk_file.cc
+++ b/winsup/cygwin/fhandler_disk_file.cc
@@ -103,11 +103,13 @@ fhandler_disk_file::fstat_by_name (struct __stat64 *buf, path_conv *pc)
if (!pc->exists ())
{
+ debug_printf ("already determined that pc does not exist");
set_errno (ENOENT);
res = -1;
}
- else if ((handle = FindFirstFile (pc->get_win32 (), &local)) == INVALID_HANDLE_VALUE)
+ else if ((handle = FindFirstFile ((char *) pc, &local)) == INVALID_HANDLE_VALUE)
{
+ debug_printf ("FindFirstFile failed, %E");
__seterrno ();
res = -1;
}