* 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.
This commit is contained in:
@ -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 */
|
||||
|
Reference in New Issue
Block a user