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
AgeCommit message (Collapse)Author
2019-02-18Cygwin: utils: MOUNT_BINARY -> MOUNT_TEXTCorinna Vinschen
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2019-01-06Cygwin: path_conv: decouple path_types from mount typesCorinna Vinschen
- Remove another unfortunate amalgamation: Mount flags (MOUNT_xxx) are converted to path_types (PATH_xxx) and mixed with non-mount path_types flags in the same storage, leading to a tangled, pell-mell usage of mount flags and path flags in path_conv and symlink_info. - There's also the case of PC_NONULLEMPTY. It's used in exactly one place with a path_conv constructor only used in this single place, just to override the automatic PC_NULLEMPTY addition when calling the other path_conv constructors. Crazily, PC_NONULLEMPTY is a define, no path_types flag, despite its name. - It doesn't help that the binary flag exists as mount and path flag, while the text flag only exists as path flag. This leads to mount code using path flags to set text/binary. Very confusing is the fact that a text mount/path flag is not actually required; the mount code sets the text flag on non binary mounts anyway, so there are only two states. However, to puzzle people a bit more, path_conv::binary wrongly implies there's a third, non-binary/non-text state. Clean up this mess: - Store path flags separately from mount flags in path_conv and symlink_info classes and change all checks and testing inline methods accordingly. - Make PC_NONULLEMPTY a simple path_types flag and drop the redundant path_check constructor. - Clean up the definition of pathconv_arg, path_types, and mount flags. Use _BIT expression, newly define in cygwin/bits.h. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2018-08-08Cygwin: utils: change 3rd readlink param to size_tCorinna Vinschen
Avoid gcc warnings Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2018-02-16Cygwin: fix utils path handling in case cygdrive path is just '/'Corinna Vinschen
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-10-22cygcheck: Fix broken test for invalid wcstombs conversion reading symlinksCorinna Vinschen
Fixes Coverity CID 66905 Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-10-22cygcheck: Fix check for Cygwin symlinkCorinna Vinschen
Fixes Coverity CID 66904 and 66906 Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-06-23Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout optioncygwin-2_5_2-releaseCorinna Vinschen
Bump GPLv2+ to GPLv3+ for some files, clarify BSD 2-clause. Everything else stays under GPLv3+. New Linking Exception exempts resulting executables from LGPLv3 section 4. Add CONTRIBUTORS file to keep track of licensing. Remove 'Copyright Red Hat Inc' comments. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2015-06-08Bind mounts require POSIX pathsCorinna Vinschen
* path.cc (from_fstab_line): Don't convert slashes to backslashes for bind mounts. Explain why. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2013-07-07* cygcheck.cc (dll_info): Detect and report on symlinks. Output wrongChristopher Faylor
architecture message inline with stdout for clarity. * path.cc (is_symlink): Always reset file pointer to beginning on exit. (readlink): Assume that file pointer is set to the beginning.
2013-04-23 * Merge in cygwin-64bit-branch.Corinna Vinschen
2013-01-21Update copyrightsChristopher Faylor
2012-11-09 * path.cc (vcygpath): Handle cygdrive prefix.Corinna Vinschen
2012-10-24 * configure.in: Add check for MINGW_CXX. Remove libiconv check.Yaakov Selkowitz
* configure: Regenerate. * Makefile.in: Remove references to mingw and w32api directories. Use MINGW_CXX instead of mingw script to build MINGW_BINS. Check for libiconv with $CC --print-file-name. * cygcheck.cc: Use relative include paths for Cygwin headers. * path.cc: Ditto. * strace.cc: Ditto * mingw: Remove.
2011-12-18Clean up whitespace.Christopher Faylor
2011-03-29 * cygcheck.cc (handle_unique_object_name): Avoid a compiler warning.Corinna Vinschen
(dump_sysinfo): Ditto. * loadlib.h (_load_sys_library): Mark as used, to avoid a compiler warning. * path.cc (oopt): Gurad with !FSTAB_ONLY to avoid a compiler warning. (read_flags): Ditto.
2010-08-28 * loadlib.h: New header implementing safe LoadLibrary calls.Corinna Vinschen
Include throughout files using LoadLibrary function. * cygcheck.cc (dump_sysinfo): Retrieve kernel32.dll handle via GetModuleHandle, rather than using LoadLibrary. * cygpath.cc (get_long_name): Ditto. (do_sysfolders): Append .dll suffix in LoadLibrary call. * ldh.cc (WinMain): Use LoadLibraryExW with DONT_RESOLVE_DLL_REFERENCES to avoid loading malicious library code. * locale.cc (print_locale_with_codeset): Change way to retrieve kernel32.dll path.
2010-04-29 * path.cc: Include sys/cygwin.h if built for mount(1).Corinna Vinschen
(struct opt): Add "dos" and "ihash" options. (from_fstab_line): Call cygwin_internal rather than read_flags if built for mount(1).
2009-11-04 * path.cc (read_mounts): Skip unnecessary test if path has beenCorinna Vinschen
fetched from loaded cygwin1.dll.
2009-11-04 * cygcheck.cc (cygwin_dll_path): New global variable.Corinna Vinschen
(load_cygwin): Fetch cygwin DLL path and store in cygwin_dll_path. * strace.cc: Full ditto. * path.cc (read_mounts): First use the path stored in cygwin_dll_path, if available. Then fall back to fetching own path. Add comment. Drop printing warnings since they look funny in strace output.
2009-11-04 * path.cc (read_mounts): First get installation path from own path.Corinna Vinschen
Check if cygwin1.dll exists in same directory. Only if not, try to get installation path from setup registry key. Add ample warnings.
2009-07-22 * mount.cc (do_mount): Replace --no-executable flag with notexecCorinna Vinschen
mount option in hint for remote filesystems. * path.cc (getmntent): Fix typo (noexec -> notexec).
2009-07-22 * Makefile.in (path-mount.o): Add a rule to build stripped down versionCorinna Vinschen
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-06-10 * path.cc (oopts): Sort alphabetically, add missing "auto" andCorinna Vinschen
"override" entries. (from_fstab_line): Handle mount points same as Cygwin itself. Use "cygdrive prefix" as posix name of cygdrive prefix. (from_fstab): Add auto entries for /usr/bin and /usr/lib. Add MOUNT_AUTOMATIC and MOUNT_IMMUTABLE flags to default root dir entry. Use "cygdrive prefix" as posix name of default cygdrive prefix. (getmntent): Allocate smaller buffers. Align output closer to output of mount(1).
2009-04-07 * path.cc (readlink): Accommodate new UTF-16 symlinks.Corinna Vinschen
2009-03-14 * path.cc (from_fstab): Use wcstombs/mbstowcs instead ofCorinna Vinschen
WideCharToMultiByte/MultiByteToWideChar to accommodate current locale.
2008-09-13* cygcheck.cc (pathlike::check_existence): Remove class name from declaration.Christopher Faylor
(display_internet_error): Use proper format specifier for DWORD. (environ): Remove unneeded declaration. (main): Use brace around nested if to avoid an overly-helpful compiler warning. * dump_setup.cc (parse_filename): Reorganize nested if to avoid an overly-helpful compiler warning. * path.cc (GUID_shortcut): Use braces around part of initializer which needs them. (conv_fstab_spaces): Parenthesize assignment in while loop to avoid a compiler warning. (struct opt): Make static. * ps.cc (main): Reorganize nested if to avoid an overly-helpful compiler warning. * regtool.cc: Make some anonymous structs static to avoid a compiler warning. * ssp.c (lookup_thread_id): Initialize *tix to zero to avoid potential uninitialized use. * strace.cc (add_child): Use proper format specifier for DWORD. (remove_child): Ditto. (proc_child): Ditto.
2008-07-22 * Makefile.in (cygcheck.exe): Link against ntdll.Corinna Vinschen
* 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-17 * mount.cc (do_mount): Remove MOUNT_ENC code.Corinna Vinschen
(oopts): Remove "managed" option. (mount_commands): Drop "managed" handling. * path.cc (oopts): Remove "managed" option. (getmntent): Remove MOUNT_ENC code.
2008-04-22 * cygcheck.cc (dump_sysinfo): Fix multiple Cygwin DLL test.Corinna Vinschen
* path.cc: Fetch mount points from fstab files instead of from registry. Use adapted functions copied from Cygwin DLL. (mnt_t): Drop issys member. Define as "mnt_t" instead of "struct mnt_t" subsequently. (max_mount_entry): New variable. (unconvert_slashes): Move to earlier location in file. Make inline. (find2): Remove. (get_cygdrive0): Remove. (get_cygdrive): Remove. (skip_ws): New function. (find_ws): Ditto. (conv_fstab_spaces): Ditto. (read_flags): Ditto. (from_fstab_line): Ditto. (get_user): Ditto. (from_fstab): Ditto. (mnt_sort): Ditto. (read_mounts): Drop old registry code. Fetch "Software\Cygwin\Setup\rootdir" value from HKCU or HKLM key. Use rootdir extracted from module path as fallback. Call from_fstab for nouser and user mount points. (setmntent): Check max_mount_entry to test if read_mounts must be called. (getmntent): Use MOUNT_SYSTEM flag instead of mnt_t's issys member.
2008-03-16 * path.cc: Include malloc.h for alloca.Brian Dessent
(is_symlink): Rewrite. Just read the whole file in memory rather than by parts. Account for an ITEMIDLIST if present, as well as the new style of Cygwin shortcut supporting targets > MAX_PATH.
2008-03-11 * cygcheck.cc (dirname): New static function.Brian Dessent
(find_app_on_path): Use SYMLINK_MAX. Resolve symlink relative to link's location. Adjust to the fact that cygpath already normalizes its return value. * path.cc (rel_vconcat): Add cwd parameter, and use it instead of calling GetCurrentDirectory() if possible. Rename throughout. (vcygpath): Rename from cygpath and accept cwd and va_list. Pass cwd on to rel_vconcat(). (cygpath_rel): New front end for vcygpath. (cygpath): Ditto. * path.h (cygpath_rel): Declare. (SYMLINK_MAX): Define to 4095.
2008-03-09 * Makefile.in: Add a 'check' target that builds and runsBrian Dessent
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.
2007-06-04* cygcheck.cc (pathlike): New class.Christopher Faylor
(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.
2006-10-05 * cygcheck.cc (get_word, get_dword): Move to path.cc.Corinna Vinschen
(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.
2006-08-03 * path.cc (vconcat): Don't convert backslahes to slashes.Corinna Vinschen
(cygpath): Return native path with all backslashes.
2005-04-29* path.cc (getmntent): Add previously-omitted 'noexec' and 'managed'flags toDave Korn
mnt_opts string if present in mount flags.
2003-09-11* Makefile.in (MINGW_CXX): Define and use for mingw-compiled files.Christopher Faylor
* path.cc: Include more path info in cygwin-specific includes since the cygwin directory is no longer included by default.
2003-03-04* Makefile.in (strace.exe): Include mingw_getopt.o in link line.Christopher Faylor
* 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-02-07* cygcheck.cc (common_apps): Add some more apps.Christopher Faylor
* path.cc (get_cygdrive): Correctly set system flag.
2002-06-09* path.cc (cygpath): Change MOUNT_AUTO to MOUNT_CYGDRIVE.Christopher Faylor
(getmntent): Ditto.
2001-11-22* path.cc (cygpath): Don't consider cygpath stuff when trying to derive nativeChristopher Faylor
paths.
2001-11-12* cygcheck.cc (scan_registry): Open registry with read-only access.Christopher Faylor
(main): Reflect argument change for dump_setup. * dump_setup.cc (dump_setup): Add preliminary extra argument for future use. * path.cc (read_mounts): Open registry with read-only access.
2001-11-11* dump_setup.cc: New file.Christopher Faylor
* Makefile.in: Add info for dump_setup.o. * cygcheck.cc (main): Recognize '-c' option for checking setup installed base. * path.cc (cygpath): Read mount table if not loaded.
2001-11-11* Makefile.in (cygcheck.exe): Compile as -mno-cygwin executable.Christopher Faylor
* path.cc: New file. * cygcheck.cc (init_paths): Use MS-DOS path syntax. (cygwin_info): Properly display cygwin version numbers. Prettify some output. (dump_sysinfo): Calculate max names of posix and ms-dos paths for prettier output.