Commit Graph

88 Commits

Author SHA1 Message Date
Corinna Vinschen 73f2ecd19d * Makefile.in (cygpath.exe): Add -fno-threadsafe-statics to CXXFLAGS. 2009-11-04 14:14:52 +00:00
Corinna Vinschen 1e497ebd33 * Makefile.in (path-mount.o): Add a rule to build stripped down version
of path.cc for usage in mount.
	(mount.exe): Add dependency to path-mount.o.
	* mount.cc (force): Convert to bool value.  Accommodate throughout.
	(from_fstab): New function.
	(do_mount_from_fstab): New function.
	(longopts): Add --all option.
	(opts): Add -a option.
	(usage): Document -a/--all option.
	(main): Handle -a option as well as single parameter.
	* path.cc: Add FSTAB_ONLY conditional to allow building path-mount.o.
	(mount_table): Remove static storage class.
	(max_mount_entry): Ditto.
	(root_here): Unused.  Remove.
	(from_fstab_line): Remove static.
	* path.h (struct mnt_t): Define here rather than in path.cc.
	(from_fstab_line): Declare.
	(mount_table): Declare.
	(max_mount_entry): Declare.
	* utils.sgml (mount): Document -a/--all option and mounting of single
	path from fstab files.
2009-07-22 10:20:26 +00:00
Christopher Faylor cea37699d1 * cygwin-console-helper.cc: New file. 2009-07-05 00:01:26 +00:00
Corinna Vinschen 48829c1d86 * Makefile.in (cygpath.exe): Link against cygwin.a before linking
against ntdll.dll to avoid linking symbols defined in both DLLs
	from ntdll.
	(ps.exe): Ditto.
2009-05-16 15:46:42 +00:00
Corinna Vinschen 46777e0a3d * Makefile.in: Link ps.exe agains ntdll.dll.
* ps.cc (main): Enable SE_DEBUG_NAME privilege if Windows processes
	have to be enumerated.  Workaround EnumProcessModules problem when
	running under WOW64 and use NtQueryInformationProcess to fetch
	process image name.
2009-05-11 14:01:17 +00:00
Dave Korn 228f0b11fd * Makefile.in (dumper.exe): Add -lz to ALL_LDFLAGS. 2009-04-13 22:51:02 +00:00
Christopher Faylor 2e13058eac * ldd.cc (load_dll): Start helper program rather than ldd.exe.
(set_entry_point_break): Rename from get_entry_point.
(print_dlls): Rename from print_dlls_and_kill_inferior.  Avoid printing
specific dll name if we're looking at a dll.
(report): Always dump dlls on process exit.  Don't allow thread creation.
Accommodate get_entry_point rename.
(start_process): Start process with DEBUG_ONLY_THIS_PROCESS.
(longopts): Eliminate "dll" option.
(main): Ditto.
* ldd.cc: Use wide character Win32 paths throughout.
(load_dll): Fix size expression (add fn) in realloc.
2009-03-18 04:19:05 +00:00
Christopher Faylor 99fe2b7866 Add DESTDIR functionality to Makefile.in's. 2009-02-24 02:11:14 +00:00
Corinna Vinschen 2ac273a946 * Makefile.in: Fix copyright date.
* cygcheck.cc (scan_registry): Take additional parameter and add code
	to avoid recursion in Wow6432Node subkey.  Rename variable cygnus to
	cygwin.  Scan for "Cygwin" instead of for "cygnus" substring.
	(dump_sysinfo): Drop unused calls to scan_registry.  Drop scanning
	HKEY_CURRENT_CONFIG.
2009-01-17 11:59:16 +00:00
Christopher Faylor 086dc27fec * ldd.cc: New file. First stab at implementing ldd-like functionality for
Cygwin.
* Makefile.in (CYGWIN_BINS): Add ldd.
(ldd.exe): Use -lpsapi.
2009-01-09 05:11:57 +00:00
Christopher Faylor b2e5367846 * Makefile.in (ALL_LDFLAGS): Link libgcc statically for everything here. 2008-10-29 13:13:26 +00:00
Christopher Faylor 9401a0f805 Dummy check-in to get right revision log:
* mingw: New front-end script to control building of MinGW files without using
the deprecated -mno-cygwin option.
* Makefile.in: Use mingw front-end.
2008-10-12 03:08:33 +00:00
Christopher Faylor fd49ac277f * Makefile.in: Tweak to work better with new utils/mingw front-end.
In utils:
2008-10-12 03:06:12 +00:00
Christopher Faylor 6510edf4bc * Makefile.in (ALL_LDFLAGS): Add --enable-auto-import option to quiet ld
warnings.
* mkgroup.c: Change all global variables and most functions to static.
(enum_local_groups): Add a print_current parameter to control whether entries
for everything should be printed or just the current user.
(enum_groups): Ditto.
(main): Move call fetch_current_pgrp_sid earlier to avoid a NULL deference when
no command line arguments are specified.  Accommodate argument changes to above
functions.  Avoid printing SYSTEM account when print_current is specified.
Issue error when extra stuff is found on the command line.
* mkpasswd.c: Change all global variables and most functions to static.
(enum_users): Add a print_current parameter to control whether entries for
everything should be printed or just the current user.
(main): Move call fetch_current_user_sid earlier to avoid a NULL deference when
no command line arguments are specified.  Accommodate argument change to above
function.  Avoid printing standard accounts when print_current is specified.
Issue error when extra stuff is found on the command line.
2008-08-17 16:45:44 +00:00
Christopher Faylor e3e942ac00 * Makefile.in: Link cygcheck with -lntdll even without mingw-zlib. 2008-07-30 06:07:42 +00:00
Corinna Vinschen a1e1990348 * Makefile.in (cygcheck.exe): Link against ntdll.
* bloda.cc: Use statically linked functions throughout.
	* cygpath.cc: Drop 9x considerations.
	* mkgroup.c: Revamp.  Redefine -l and -d options to take optional
	machine and domain parameters.  Redefine -c to work always, using
	token information.  Add -L, -D, -C to create unique groupnames in
	domain\group syntax.  Add -S option to define domain\group separator
	char.  Ignore -u and -s options.
	* mkpasswd.c: Revamp.  Redefine -l and -d options to take optional
	machine and domain parameters.  Redefine -c to work always, using
	token information.  Add -L, -D, -C to create unique usernames in
	domain\user syntax.  Add -S option to define domain\user separator
	char.  Ignore -g and -s options.  Prefer to take homedir from $HOME
	over $HOMEDRIVE/$HOMEPATH.
	* path.cc (oopts): Add "acl", "noacl", "posix=0" and "posix=1" options.
	(getmntent): Accomodate throughout.
	* ps.cc: Fix copyright dates.
	* utils.sgml: Fix text for mkgroup and mkpasswd.
2008-07-22 14:40:05 +00:00
Corinna Vinschen 43334bd027 * Makefile.in (CYGWIN_BINS): Remove ipcrm and ipcs.
* ipcrm.c: Remove.
	* ipcs.c: Remove.
2008-05-15 11:01:31 +00:00
Brian Dessent 92108f4e26 * Makefile.in (install): Don't install the testsuite. 2008-03-09 09:41:42 +00:00
Brian Dessent 59fb00ae07 * Makefile.in: Add a 'check' target that builds and runs
testsuite.exe from path-testsuite.o and testsuite.o.
	* path.cc: Include testsuite.h.
	(struct mnt): Change to a mnt_t typedef and don't define
	mount_table when TESTSUITE is defined.
	(find2): Don't include when TESTSUITE is defined to avoid warning.
	(get_cygdrive0): Ditto.
	(get_cygdrive): Ditto.
	(read_mounts): Provide empty implementation when TESTSUITE is
	defined.
	(vconcat): Use the isslash macro.
	(unconvert_slashes): New helper to convert to backslashses.
	(rel_vconcat): Handle relative paths more gracefully.
	(cygpath): Skip a leading "./" sequence.  Avoid double-slashes.
	Normalize final output to backslashes and remove redundant path
	sequences.
	* testsuite.cc: New file implementing testsuite driver.
	* testsuite.h: New header implementing harness mount table and
	series of tests.
2008-03-09 04:10:10 +00:00
Brian Dessent 68d2dd03a3 * Makefile.in: Reorganize considerably, using GNU make's
static pattern rules and target-specific variables.
2008-03-08 17:52:49 +00:00
Brian Dessent ec62ba9577 * Makefile.in (cygcheck.exe): Don't link to ntdll.
* bloda.cc (pNtQuerySystemInformation): Add.
	(pRtlAnsiStringToUnicodeString): Add.
	(get_process_list): Use function pointers for NT functions.
	(dump_dodgy_apps): Skip dodgy app check on non-NT platforms.
	Use GetProcAddress for NT-specific functions.
2007-12-21 03:32:46 +00:00
Dave Korn 64b94981dc * Makefile.in (cygcheck.exe): Add bloda.o as prerequisite, adjusting
dependency-filtering $(wordlist ...) call appropriately.  Link ntdll.
	(bloda.o):  New rule to build bloda.o
	* cygcheck.cc (dump_sysinfo):  Call bloda function dump_dodgy_apps().
	* bloda.cc:  New file implements detection of applications from the
	Big List Of Dodgy Apps.
2007-08-03 19:41:48 +00:00
Christopher Faylor 5c8891e962 * cygwin/strsig.cc (__signals): New macro.
(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.
2007-07-10 00:12:54 +00:00
Christopher Faylor 56ec0f9c9c * Makefile.in: Fix -ntdll typo.
* cygcheck.cc (main): Restore POSIXLY_CORRECT before displaying user's
environment.
2006-09-12 15:14:51 +00:00
Corinna Vinschen 2dba45f4aa * Makefile.in (cygpath.exe): Add rule to link cygpath against ntdll.dll.
* 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.
2006-08-02 09:48:18 +00:00
Corinna Vinschen e60e8d3b0e * Makefile.in: Build setmetamode.exe.
* setmetamode.c: New file.
2006-07-03 16:00:58 +00:00
Christopher Faylor 14a4d5989a bad_keywords 2006-01-18 15:57:56 +00:00
Christopher Faylor 4d7c0b51bf copyright 2006-01-17 15:37:13 +00:00
Corinna Vinschen 3d7e89f8a2 * Makefile.in: Replace etcdir with sysconfdir. 2006-01-17 12:33:46 +00:00
Corinna Vinschen 8581551218 * Makefile.in (cygcheck.exe): Do not link against libwininet.a.
* 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.
2006-01-15 09:29:02 +00:00
Christopher Faylor a39cfda7ba * Makefile.in: Link cygcheck with libwininet.a.
* cygcheck.cc: Add includes.
(grep_packages): New global variable.
(display_internet_error): New function.
(safe_chars): New global variable.
(base_url): Ditto.
(package_grep): New function.
(usage): Reword --help output for clarity.  Document new argument.
(longopts): Add 'package-query' option.
(opts): Add 'p' option, reorder to be consistent with 'longopts'.
(main): Accommodate new option.
* utils.sgml (cygcheck): Update --help output.  Document new -p option.
2005-11-22 17:19:17 +00:00
Christopher Faylor 7c03f79971 * Makefile.in (build_dumper): Detect missing iconv library.
* cygpath.cc (dowin): Report on filename conversion errors.
(doit): Ditto.
* strace.cc (main): Use symbolic constant for _STRACE_ALL when setting mask.
2004-02-21 04:51:15 +00:00
Christopher Faylor 744ed079bc * strace.cc (main): Ensure POSIXLY_CORRECT argument ordering.
* cygcheck.cc (main): Ditto.
2004-02-10 16:01:31 +00:00
Corinna Vinschen e545df31d5 * Makefile.in: Add rules to build ipcrm and ipcs.
* ipcrm.c: New file.
	* ipcs.c: New file.
2003-11-19 18:50:52 +00:00
Christopher Faylor fa10472e4a * cygcheck.cc (pretty_id): Don't exec if `id' program is not found. 2003-10-17 17:19:31 +00:00
Christopher Faylor 3a25635489 * Makefile.in: Tweak mingw libz.a detection to make it more reliably detect
when libz.a is not available.
2003-09-12 01:51:21 +00:00
Christopher Faylor bd79b736d4 * Makefile.in (cygcheck.o): Use MINGW_CXX for compilation.
* cygcheck.cc: Just include <getopt.h> rather than cygwin version.
(pretty_id): Avoid compiler warnings.
* cygpath.cc (usage): Ditto.
2003-09-11 02:56:40 +00:00
Christopher Faylor b07b167eec * Makefile.in (MINGW_CXX): Define and use for mingw-compiled files.
* path.cc: Include more path info in cygwin-specific includes since the cygwin
directory is no longer included by default.
2003-09-11 02:00:42 +00:00
Christopher Faylor 704d8c321e * Makefile.in: More fixups to adjust for the fact that mingw_getopt.o is no
longer built.
2003-09-11 00:07:28 +00:00
Christopher Faylor 4a6890e76e * Makefile.in: Remove references to getopt since it is now part of mingwex. 2003-09-10 21:55:59 +00:00
Christopher Faylor 7b06693464 * Makefile.in (zlib_h): Rename libz.h -> zlib.h. 2003-09-08 04:29:34 +00:00
Christopher Faylor d31c5928dd * Makefile.in: Detect existence of mingw zlib headers and libraries. Build
cygcheck wihtout package checking if they are unavailable.
* dump_setup.cc: Generate dummy zlib macros when zlib is not available.
(open_package_list): Use zlib functions to uncompress package lists.  Return
gzFile rather than FILE *.
(check_package_files): Change fp to gzFile to accommodate zlib functions.  Use
gzgets to read from package file.  Use gzclose to close the handle.
(package_list): Ditto.
(package_find): Ditto.
2003-09-08 02:50:02 +00:00
Christopher Faylor f6f88b66d2 * Makefile.in: Oops. Put the '...' in the right place. 2003-09-01 02:33:50 +00:00
Christopher Faylor 40d885eb7b * Makefile.in: Display "..." when not-verbose.
* kill.cc (forcekill): Default to entered pid when pinfo fails.  Issue some
warnings when things don't work.
2003-09-01 01:57:44 +00:00
Christopher Faylor 9ddd929f68 preliminary checkin 2003-07-26 00:10:48 +00:00
Christopher Faylor bc1c4e1e64 . 2003-03-09 19:29:22 +00:00
Christopher Faylor 229f2bb465 * Makefile.in (strace.exe): Include mingw_getopt.o in link line.
* cygcheck.cc (print_version): Update copyright.
* strace.cc (print_version): Ditto.
(main): Allow cygwin paths for -o option.
(create_child): Allow cygwin path as argv[0].
* path.cc (path.cc): Allow UNC paths.
2003-03-04 05:30:50 +00:00
Christopher Faylor dbc49afd52 * Makefile.in (cygcheck.o): Fix so that actual mingw include files are used.
* cygcheck.cc (find_on_path): Translate from cygwin path when qualified path
name found.
(pretty_id): New function.  Dump output of id command.
(dump_sysinfo): Call pretty_id for CYGWIN=ntsec and CYGWIN=nontsec cases.
2003-03-01 03:38:19 +00:00
Corinna Vinschen 92005b4cec * Makefile.in (ALL_LDFLAGS): Remove newlib/libm from tools paths.
(MINGW_LDFLAGS): Remove in favor of definition from Makefile.common.
2003-01-22 17:15:53 +00:00
Christopher Faylor 212ed5e01e * configure.in: Check for libiconv.a.
* configure: Regenerate.
* Makefile.in: Add libiconv.a to libraries required for dumper.exe.
2002-07-07 00:54:38 +00:00