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>2011-10-20 18:02:54 +0400
committerChristopher Faylor <me@cgf.cx>2011-10-20 18:02:54 +0400
commit38d732a152ff27601b385c00e6574111461b65c4 (patch)
treece60ae6b1ad6b8ca6e1d71d10cddaffebbf62ab2 /winsup/cygwin/path.h
parentaa982024d14f9d6c4afe8ada89e5a46585623102 (diff)
Throughout change TTY_* to PTY_*, tty_* to pty_*, and ttym_* to ptmx_*.
* devices.cc: Regenerate. * dtable.cc: (fh_alloc): Preserve /dev/tty name when that's what we opened. (build_fh_pc): Preserve any existing name. * fhandler.cc (fhandler_base::open_with_arch): Ditto. * fhandler_tty.cc (fhandler_pty_master::fhandler_pty_master): Force the name to /dev/ptmx while preserving other pty master device information. * path.h (cfree_maybe): New macro. (path_conv::operator =): Free any allocated strings in target. (path_conv::free_strings): Delete unused function. * sigproc.cc (proc_terminate): Remove previous accommodation for execed processes since it didn't have the desired effect. Change comment to a FIXME. * spawn.cc (chExeced): Mark NO_COPY. (exe_suffixes): Ditto.
Diffstat (limited to 'winsup/cygwin/path.h')
-rw-r--r--winsup/cygwin/path.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/winsup/cygwin/path.h b/winsup/cygwin/path.h
index 6b6dc5d3b..3a9c08ca4 100644
--- a/winsup/cygwin/path.h
+++ b/winsup/cygwin/path.h
@@ -282,8 +282,12 @@ class path_conv
PWCHAR get_wide_win32_path (PWCHAR wc);
operator DWORD &() {return fileattr;}
operator int () {return fileattr; }
+# define cfree_maybe(x) if (x) cfree ((void *) (x))
path_conv &operator =(const path_conv& pc)
{
+ cfree_maybe (path);
+ cfree_maybe (normalized_path);
+ cfree_maybe (wide_path);
memcpy (this, &pc, sizeof pc);
path = cstrdup (pc.path);
conv_handle.dup (pc.conv_handle);
@@ -297,11 +301,6 @@ class path_conv
}
return *this;
}
- void free_strings ()
- {
- cfree (modifiable_path ());
- cfree ((char *) normalized_path);
- }
DWORD get_devn () {return (DWORD) dev;}
short get_unitn () const {return dev.get_minor ();}
DWORD file_attributes () const {return fileattr;}