summaryrefslogtreecommitdiffstats
path: root/winsup/utils
Commit message (Collapse)AuthorAgeFilesLines
...
* * cygwin/strsig.cc (__signals): New macro.Christopher Faylor2007-07-103-3/+17
| | | | | | | | | | | (sys_sigabbrev): New array of signal strings, patterned after linux. (siglist): Use __signals. * cygwin/include/cygwin/signal.h (sys_sigabbrev): Define. * cygwin/include/cygwin/version.h: Bump API minor version to 177. * utils/Makefile.in (kill.exe): Remove reliance on libiberty. * utils/kill.cc (strsigno): New function patterned after libiberty but using newly exported cygwin array.
* * cygcheck.cc (pathlike): New class.Christopher Faylor2007-06-043-183/+302
| | | | | | | | | | | | | | | | | | | | | | | | | | | | (paths): Redefine as type pathlike. (display_error): Declare a few different ways to allow more flexible usage throughout. (display_error_fmt): New function for those cases where C++ just isn't enough. (add_path): Rewrite to allocate pathlike paths. Always tack on a trailing slash since that's what everyone who uses it wants. NULL terminate the path list. Register "it's a system path" field. (init_path): Call add_path with info regarding whether path is a system path or not. (pathlike::check_existence): Move into pathlike class. Accept file and extension arguments to build up path on the fly. Modify other arguments. (find_on_path): Constify return value and appropriate arguments. Eliminate short-circuit for fully-qualified paths. Simplify loop which iterates over path. (already_did): Constify argument. (track_down): Ditto. Regularize some error messages. (find_app_on_path): Ditto. (cygcheck): Constify argument. Use 20th century string handling functions. (dump_sysinfo): Remove odd inclusion of '\\bin' "Just in case". Accommodate change of paths to pathlike. * path.cc (isslash): Rename from SLASH_P and use throughout. (rel_vconcat): Front-end to vconcat which prepends cwd to path before passing along for conversion to native windows. (cygpath): Remove "./" test. Call rel_vconcat if filename appears to be relative.
* * dumper.cc (dumper::prepare_core_dump): Record a phdr for each section.Corinna Vinschen2007-05-292-3/+62
|
* * cygpath.cc (do_options): Allow outputflag combined with otherCorinna Vinschen2007-05-292-9/+15
| | | | | | | basic flags. Only check options_from_file_flag if reading options from command line. (main): Check for NULL argz vector. Don't free argz vector prematurely. Don't force flag combination in !options_from_file_flag case.
* * cygpath.cc: Include argz.h.Corinna Vinschen2007-05-232-127/+130
| | | | | | | | | | | | | | (options_from_file_flag): Move from main to global static variable. (mode_flag): Ditto. (do_sysfolders): Rename from dowin and accommodate throughout. Don't exit from here. (do_pathconv): Rename from doit and accommodate throughout. (print_version): Change copyright. (do_options): New function, centralizing option processing. Rework checking options for correctness. (action): New function, centralizing calling worker functions. (main): Simplify. Move option processing to do_options. Move calling worker functions to action. Rework getting arguments from files.
* * utils/cygpath.cc (get_long_path_name_w32impl): Close handles returned byChristopher Faylor2007-03-312-4/+15
| | | | FindFirstFile.
* * cygwin/external.cc (cygwin_internal): Implement CW_SET_DOS_FILE_WARNING.Christopher Faylor2007-03-302-0/+7
| | | | | | * cygwin/include/sys/cygwin.h: Define CW_SET_DOS_FILE_WARNING. * utils/mount.cc (main): Turn dos file warnings off since we know what we're doing.
* * ipcs.c (_POSIX2_LINE_MAX): Drop definition.Corinna Vinschen2007-02-222-1/+4
|
* * cygcheck.cc (dump_sysinfo): Add "not supported" to osname on 9xCorinna Vinschen2007-02-202-12/+12
| | | | | machines. Drop "not supported" for Vista. Drop "Longhorn" text for now.
* * cygpath.cc (usage): Add -O and -F, remove tabs.Corinna Vinschen2007-01-093-40/+99
| | | | | | | | (get_special_folder): New function. (get_user_folder): New function. (dowin): Add -O and -F, better -D, -P error handling. (main): Add -O and -F. * utils.sgml (cygpath): Document -O and -F.
* * dumper.cc: Include ansidecl.h before including bfd.h to woraroundCorinna Vinschen2006-12-212-2/+7
| | | | a problem with the order in which system include files are included.
* * dumper.cc: Add an include to accommodate new include/elf usage.Christopher Faylor2006-12-112-0/+5
|
* correct email addressChristopher Faylor2006-12-111-1/+1
|
* * mount.cc (do_mount): Avoid unnecessary cygwin_conv_to_win32_path and passChristopher Faylor2006-12-102-4/+6
| | | | POSIX path directly - this avoids a cygwin DLL warning.
* * regtool.cc (key_type): Drop.Corinna Vinschen2006-10-212-111/+218
| | | | | | | | | | | | | | | | | | | | (REG_AUTO): Define. (value_type): Replace key_type. Use REG_xxx values directly. Accomodate change throughout. (longopts): Add --dword, --dword-le, --none, --qword and --hex options. (opts): Add -d, -D, -n, -Q and -x options. (types): Array to convert REG_xxx into strings. (hex): New variable to keep value of --hex option. (usage): Accomodate new options. Print only the necessary by default. Only be verbose in case of -h/--help option. (cmd_list): Use key separator from -K option when printing. Print value type when verbose option is given. Handle so far not handled REG_xxx types. (cmd_set): Avoid SEGV due to missing argument. Handle so far not handled REG_xxx types. (cmd_get): Handle --binary option type agnostic. Handle so far not handled REG_xxx types. (main): Handle new options.
* * regtool.cc (longopts): Add --wow32 option.Corinna Vinschen2006-10-193-0/+19
| | | | | | | (opts): Add -W option. (usage): Add text for --wow32/-W option. (main): Handle --wow32/-W option. * utils.sgml: Document the new -W option.
* * regtool.cc (KEY_WOW64_64KEY): Drop definition. Instead defineCorinna Vinschen2006-10-162-4/+6
| | | | WINVER to 0x0502 before including windows.h.
* * regtool.cc (KEY_WOW64_64KEY): Define.Corinna Vinschen2006-10-163-6/+57
| | | | | | | | | | | | | | | (longopts): Add --wow64 option. (opts): Add -w option. (wow64): New variable to control usage of KEY_WOW64_64KEY access flag. (usage): Add text for --wow64/-w option. (print_version): Fix copyright. (find_key): Use wow64 value in calls to RegOpenKeyEx and RegCreateKeyEx. (cmd_add): Use wow64 value in call to RegCreateKeyEx. (regDeleteKeyEx): New function pointer to load RegDeleteKeyEx function dynamically. (cmd_remove): Load and use regDeleteKeyEx when wow64 is set. (main): Handle --wow64/-w option. * utils.sgml: Document the new -w option.
* * cygcheck.cc (get_word, get_dword): Move to path.cc.Corinna Vinschen2006-10-054-46/+363
| | | | | | | | | | | | | | | | | | | (LINK_EXTENSION): New macro. (check_existence): New static function. (find_on_path): Check for symbolic links if asked. (dll_info): New error handling. (track_down): Only call dll_info() for executables, display an error for symlinks, and print magic number for others. (find_app_on_path): New static function. (cygcheck, dump_sysinfo): Call find_app_on_path() instead of find_on_path(). * path.cc (cmp_shortcut_header): New static function. (get_word, get_dword): Moved from cygcheck.cc. (EXE_MAGIC, SHORTCUT_MAGIC, SYMLINK_COOKIE, SYMLINK_MAGIC): New macros. (is_exe, is_symlink, readlink): New functions. * path.h (is_exe, is_symlink, readlink): Declare. (get_word, get_dword): Ditto.
* white spaceChristopher Faylor2006-09-131-1/+1
|
* Check in previously mentioned change to cygcheck.ccChristopher Faylor2006-09-131-0/+6
|
* * Makefile.in: Fix -ntdll typo.Christopher Faylor2006-09-122-3/+12
| | | | | * cygcheck.cc (main): Restore POSIXLY_CORRECT before displaying user's environment.
* * path.cc (vconcat): Don't convert backslahes to slashes.Corinna Vinschen2006-08-032-4/+6
| | | | (cygpath): Return native path with all backslashes.
* * Makefile.in (cygpath.exe): Add rule to link cygpath against ntdll.dll.Corinna Vinschen2006-08-023-0/+178
| | | | | | | | | * cygpath.cc: Include DDK headers. (RtlAllocateUnicodeString): New static inline function. (get_device_name): New static function to evaluate DOS path from native NT path. (get_device_paths): New function to do the same for path lists. (doit): Call get_device_paths/get_device_name where appropriate.
* * cygpath.cc (get_long_name): Fallback to get_long_path_name_w32impl.Corinna Vinschen2006-07-312-4/+15
|
* * cygpath.c (get_long_name): Cover the case that GetLongPathNameCorinna Vinschen2006-07-272-4/+16
| | | | | doesn't return valid information for non-existant files. Just return incoming filename in that case.
* * Makefile.in: Build setmetamode.exe.Corinna Vinschen2006-07-033-1/+88
| | | | * setmetamode.c: New file.
* update to newer autoconfChristopher Faylor2006-05-244-944/+4321
|
* * strace.cc (proc_child): Propagate return code from child process.Christopher Faylor2006-05-242-5/+16
| | | | | (dostrace): Ditto. (main): Ditto.
* * regtool.cc (options): Add 'binary'.Corinna Vinschen2006-03-033-11/+212
| | | | | | | | | | | | | | (usage): Document 'load|unload|save' and '-b'. (find_key): Add 'options' parameter, add load/unload. (cmd_set): Add KT_BINARY case. (cmd_get): Add hex output in KT_BINARY case. (cmd_load): New function. (cmd_unload): New function. (set_privilege): New function. (cmd_save): New function. (commands): Add load, unload and save. (main): Add '-b' * utils.sgml (regtool): Document it.
* * cygpath.cc (get_long_name): Load GetLongPathNameA instead of incorrectCorinna Vinschen2006-02-172-3/+10
| | | | | | GetLongPathName. (doit): Create mixed filename after converting to short or long pathname respectively.
* * ps.cc (main): Set aflag if -p option is given.Corinna Vinschen2006-02-172-0/+5
|
* * ps.cc (longopts): Add --process option.Corinna Vinschen2006-02-163-4/+24
| | | | | | | (opts): Add -p option. (usage): Mention -p/--process option. (main): Handle -p option. * utils.sgml: Describe -p/--process option.
* * regtool.cc (usage): Clarify help for "-K".Corinna Vinschen2006-02-152-1/+5
|
* * cygcheck.cc (find_on_path): Update copyright text.Corinna Vinschen2006-02-082-1/+5
|
* * cygcheck.cc (find_on_path): Create copy of rv on successful accessCorinna Vinschen2006-02-082-1/+6
| | | | check, since rv can be reused in subsequent calls.
* * cygcheck.cc (common_paths): Add "patch".Christopher Faylor2006-01-192-0/+5
|
* * cygcheck.cc (init_paths): Record first_nonsys_path.Christopher Faylor2006-01-192-8/+13
| | | | (find_on_path): Start on first nonsys path when !search_sysdirs.
* white spaceChristopher Faylor2006-01-191-1/+1
|
* Wasn't going to check this in but since it did get checked in, here's a ↵Christopher Faylor2006-01-181-0/+9
| | | | ChangeLog.
* bad_keywordsChristopher Faylor2006-01-185-21/+20
|
* * cygpath.cc (dowin): Remove stray debugging printf statement.Dave Korn2006-01-182-1/+4
|
* copyrightChristopher Faylor2006-01-172-2/+4
|
* * Makefile.in: Replace etcdir with sysconfdir.Corinna Vinschen2006-01-172-2/+6
|
* * Makefile.in (cygcheck.exe): Do not link against libwininet.a.Corinna Vinschen2006-01-153-12/+61
| | | | | | | * cygcheck.cc (pInternetCloseHandle): Define global function pointer. (display_internet_error): Use it. (package_grep): Attempt to load wininet.dll at runtime. Call WinInet API through function pointers throughout.
* * cygcheck.cc (dump_sysinfo): Convert k32 to HMODULE.Corinna Vinschen2006-01-132-1/+5
|
* * cygcheck.cc (dump_sysinfo): Convert osname to const and remove castsCorinna Vinschen2006-01-132-30/+65
| | | | | | in subsequent assignments. Recognize Longhorn/Vista and report as not yet supported. Recognize when running under WOW64 and report native CPU type. Slightly rearrange \n printing.
* * cygcheck.cc: Replace ` with ' throughout.Christopher Faylor2006-01-122-9/+13
|
* * cygcheck.cc (dump_sysinfo): Report the failing drive to prevent having toChristopher Faylor2006-01-052-4/+16
| | | | guess.
* *** cygwin DLL Changes:Christopher Faylor2005-12-293-42/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * child_info.h (CURR_CHILD_INFO_MAGIC): Reset. (child_info::dwProcessId): Delete. (child_info::straced): New variable. (child_info::handle_fork): New member function. * dcrt0.cc (in_forkee): New global variable. (__cygwin_user_data::forkee): Mark as obsolete. (do_global_ctors): Use in_forkee rather than user_data->forkee. (get_cygwin_startup_info): Ditto. Deal with new straced field to allow strace to deal with children of attached processes. (initial_env): Accommodate changes to strace::hello. (child_info_fork::handle_fork): Rename from plain old 'handle_fork'. Move alloc_stack() call elsewhere. (dll_crt0_0): Fill out more of user_data. Reference handle_fork via fork_info. Add some debugging output. (_dll_crt0): Don't wait for sync thread if sync_startup is invalid. Zero sync_startup here. Call alloc_stack() here, if appropriate. (dll_crt0_1): Use in_forkee rather than user_data->forkee. (dll_crt0): Ditto. * malloc_wrapper.cc (malloc_init): Ditto. * dll_init.cc (in_forkee): Remove local static version of this variable. (dll_list::load_after_fork): Don't set in_forkee here. * external.cc (cygwin_internal): Use strace method rather than accessing field directly. * fhandler.cc (fhandler_base::read): Ditto. * fhandler_tty.cc (fhandler_tty_common::__acquire_output_mutex): Ditto. * fork.cc (frok::parent): Invoke strace write_childpid to communicate with potential strace. (child_copy): Add more detail to debugging output. * init.cc (calibration_id): New static variable. (prime_threads): Set sync_startup to invalid handle if we already know about thread_func_ix. Use static calibration_id to hold calibration thread id. * munge_threadfunc (munge_threadfunc): Don't try to debug if we don't find threadfunc_ix. (dll_entry): Avoid calling munge_threadfunc and _cygtls::remove on non-cygwin threads invoked during process startup. * pinfo.cc (set_myself): Always call strace.hello here regardless of DEBUGGING. * sigproc.cc (child_info::child_info): Remove spurious handling of dwProcessId. Set straced as appropriate. * spawn.cc (spawn_guts): Rename ciresrv to ch. Invoke strace write_childpid to communicate with potential strace. * strace.cc: Include child_info.h. (strace::hello): Remove inited test. Use active() method to test if strace has been activated. Handle case where we are started before (mypid): New function. (strace::vsprntf): Try to deal more intelligently with case where progname may not be filled out. Put pid in parentheses if it is a windows pid rather than a cygwin pid. myself has been filled out. (strace::write_childpid): New function for notifying strace about the creation of children. (strace::vprntf): Use strace method rather than accessing field directly. (strace_printf): Ditto. (strace::wm): Ditto. * winsup.h (in_forkee): Declare. * include/sys/strace.h (strace::write_childpid): Declare new function. (strace::attached): Define new function. (strace::active): Ditto. (strace::active_val): Ditto. (_STRACE_ON): Delete. (_STRACE_OFF): Ditto. (define_strace0): Use strace method rather than accessing field directly. (strace_printf_wrap): Ditto. (strace_printf_wrap1): Ditto. *** cygwin utils changes: * strace.cc (nprocesses): Make static global. (quiet): New variable. (strace_active): Ditto. (add_child): Increment nprocesses here. Don't add a child if it is already added (windows bug?). Report on child if not quiet. (get_child): Just return NULL if child not found. (remove_child): Report on child if not quiet. (attach_process): Don't complain if given a windows process. Use windows pid in error. (handle_output_debug_string): Issue error if trying to manipulate a process that we don't know about. Handle _STRACE_CHILD_PID - attach to reported child when we get this. (proc_child): Move nprocesses to file scope. Report on exceptions. (longopts): Implement "--quiet". (opts): Implement "-q". (main): Manipulate quiet flag. * utils.sgml (strace): Add words describing '-q'.