From 1ffe3e67b1f055a8a81a0e6cefad78f0df795aa6 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Sat, 22 Mar 2008 21:04:16 +0000 Subject: * dtable.cc: Define various device-related string constants as wide character constants. (dtable::init_std_file_from_handle): Reorganize pipe handling to try to catch special tty case. (build_fh_name_worker): Declare for common use. (build_fh_name): Define char version. (build_fh_name): Define (currently unused) UNICODE_STRING version. (decode_tty): Detect if pipe is actually a cygwin tty, returning the tty name in the buffer. (handle_to_fn): Reorganize to use wide characters. * dtable.h (build_fh_name): Declare (currently unused) UNICODE_STRING version. * fhandler_tty.cc (fhandler_pty_master::setup): Use fhandler_pipe::create_selectable to create a pipe with a given name. * pipe.cc (pipe_handler): Make returned handle inheritable. (fhandler_pipe::create_selectable): Take an optional name. Use a standard cygwin introducer for the name. * path.cc (path_conv::check): Make first argument const. * path.h (path_conv::check): Ditto for declaration. (path_conv::path_conv): Ditto for UNICODE_STRING version. --- winsup/cygwin/path.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'winsup/cygwin/path.h') diff --git a/winsup/cygwin/path.h b/winsup/cygwin/path.h index 2b1c751f7..f49c420f1 100644 --- a/winsup/cygwin/path.h +++ b/winsup/cygwin/path.h @@ -199,7 +199,7 @@ class path_conv void set_has_symlinks () {path_flags |= PATH_HAS_SYMLINKS;} void set_exec (int x = 1) {path_flags |= x ? PATH_EXEC : PATH_NOTEXEC;} - void check (PUNICODE_STRING upath, unsigned opt = PC_SYM_FOLLOW, + void check (const UNICODE_STRING *upath, unsigned opt = PC_SYM_FOLLOW, const suffix_info *suffixes = NULL) __attribute__ ((regparm(3))); void check (const char *src, unsigned opt = PC_SYM_FOLLOW, const suffix_info *suffixes = NULL) __attribute__ ((regparm(3))); @@ -217,7 +217,7 @@ class path_conv check (src, opt, suffixes); } - path_conv (PUNICODE_STRING src, unsigned opt = PC_SYM_FOLLOW, + path_conv (const UNICODE_STRING *src, unsigned opt = PC_SYM_FOLLOW, const suffix_info *suffixes = NULL) { check (src, opt | PC_NULLEMPTY, suffixes); @@ -300,10 +300,10 @@ enum fe_types FE_CWD = 4, /* Search CWD for program */ FE_DLL = 8 /* Search for DLLs, not executables. */ }; -const char * __stdcall find_exec (const char *name, path_conv& buf, - const char *winenv = "PATH=", - unsigned opt = FE_NADA, - const char **known_suffix = NULL) +const char *__stdcall find_exec (const char *name, path_conv& buf, + const char *winenv = "PATH=", + unsigned opt = FE_NADA, + const char **known_suffix = NULL) __attribute__ ((regparm(3))); /* Common macros for checking for invalid path names */ -- cgit v1.2.3