4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-01-19 04:49:25 +08:00

* 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.
This commit is contained in:
Christopher Faylor 2004-02-17 20:03:01 +00:00
parent 88e584bf43
commit 720c33ae4c
6 changed files with 21 additions and 8 deletions

View File

@ -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.

View File

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

View File

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

View File

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

View File

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

View File

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