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
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2004-02-17 23:03:01 +0300
committerChristopher Faylor <me@cgf.cx>2004-02-17 23:03:01 +0300
commit720c33ae4c9fb2fe10268e123d5b34a5042170e1 (patch)
tree6bf6a681bbfeee61d2da5170d94cbbaf3a80ba05
parent88e584bf43ec8d63729f59c2e21e8dd4001e7e41 (diff)
* Makefile.in (clean): Clean libserver, too.
* fhandler.cc (fhandler_base::~fhandler_base): Remove path_conv cleanup. * syscalls.cc (chroot): Ditto. * path.cc (path_conv::~path_conv): Define new destructor. (conv_path_list_buf_size): Remove explicit path_conv cleanup. * path.h (path_conv::~path_conv): Declare new destructor.
-rw-r--r--winsup/cygwin/ChangeLog10
-rw-r--r--winsup/cygwin/Makefile.in1
-rw-r--r--winsup/cygwin/fhandler.cc2
-rw-r--r--winsup/cygwin/path.cc13
-rw-r--r--winsup/cygwin/path.h1
-rw-r--r--winsup/cygwin/syscalls.cc2
6 files changed, 21 insertions, 8 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index fbbb754e4..90d2cb5f9 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,13 @@
+2004-02-17 Christopher Faylor <cgf@redhat.com>
+
+ * Makefile.in (clean): Clean libserver, too.
+
+ * fhandler.cc (fhandler_base::~fhandler_base): Remove path_conv cleanup.
+ * syscalls.cc (chroot): Ditto.
+ * path.cc (path_conv::~path_conv): Define new destructor.
+ (conv_path_list_buf_size): Remove explicit path_conv cleanup.
+ * path.h (path_conv::~path_conv): Declare new destructor.
+
2004-02-16 Christopher Faylor <cgf@redhat.com>
* Makefile.in: Compile flock.o with -fomit-frame-pointer.
diff --git a/winsup/cygwin/Makefile.in b/winsup/cygwin/Makefile.in
index 474ae0430..a75a63e3c 100644
--- a/winsup/cygwin/Makefile.in
+++ b/winsup/cygwin/Makefile.in
@@ -352,6 +352,7 @@ uninstall-man:
clean:
-rm -f *.o *.dll *.a *.exp junk *.base version.cc regexp/*.o winver_stamp *.exe *.d *stamp* *_magic.h sigfe.s
+ -@$(MAKE) -C $(bupdir)/cygserver libclean
maintainer-clean realclean: clean
@echo "This command is intended for maintainers to use;"
diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc
index 81466d3bd..3ddd12bd6 100644
--- a/winsup/cygwin/fhandler.cc
+++ b/winsup/cygwin/fhandler.cc
@@ -1278,8 +1278,6 @@ fhandler_base::fhandler_base ():
/* Normal I/O destructor */
fhandler_base::~fhandler_base (void)
{
- if (!pc.normalized_path_size && pc.normalized_path)
- cfree (pc.normalized_path);
if (rabuf)
free (rabuf);
}
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index a7d95df71..03f0a1262 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -882,6 +882,15 @@ out:
#endif
}
+path_conv::~path_conv ()
+{
+ if (!normalized_path_size && normalized_path)
+ {
+ cfree (normalized_path);
+ normalized_path = NULL;
+ }
+}
+
static __inline int
digits (const char *name)
{
@@ -3500,10 +3509,6 @@ conv_path_list_buf_size (const char *path_list, bool to_posix)
+ (nrel * strlen (to_posix ? pc.normalized_path : pc.get_win32 ()))
+ 100;
- if (!pc.normalized_path_size && pc.normalized_path)
- cfree (pc.normalized_path); // FIXME - probably should be in a destructor but
- // it's hard to justify a destructor for the few
- // places where this is needed
return size;
}
diff --git a/winsup/cygwin/path.h b/winsup/cygwin/path.h
index 92cd2b876..56eb0ca81 100644
--- a/winsup/cygwin/path.h
+++ b/winsup/cygwin/path.h
@@ -172,6 +172,7 @@ class path_conv
known_suffix (NULL), error (0), normalized_path (NULL)
{path[0] = '\0';}
+ ~path_conv ();
inline char *get_win32 () { return path; }
operator char *() {return path;}
operator const char *() {return path;}
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc
index 98a8848cf..132d22325 100644
--- a/winsup/cygwin/syscalls.cc
+++ b/winsup/cygwin/syscalls.cc
@@ -2320,8 +2320,6 @@ chroot (const char *newroot)
syscall_printf ("%d = chroot (%s)", ret ? get_errno () : 0,
newroot ? newroot : "NULL");
- if (!path.normalized_path_size && path.normalized_path)
- cfree (path.normalized_path);
return ret;
}