Commit Graph

7509 Commits

Author SHA1 Message Date
Corinna Vinschen fa986bf9cd * path.cc (path_conv::check): Don't call set_exec for files on "noacl"
mount points.
2009-06-02 13:29:30 +00:00
Christopher Faylor e44b9069cd * strfuncs.cc (sys_cp_mbstowcs): Treat src as unsigned char *. Convert failure
of f_mbtowc into a single malformed utf-16 value.
2009-05-31 03:59:38 +00:00
Christopher Faylor 025e4859af * cygwin/include/sys/termios.h: Make default erase character "^?". 2009-05-30 17:21:22 +00:00
Christopher Faylor bfa7707bce * fhandler_console.cc (fhandler_console::read): Convert backspace key to DEL. 2009-05-30 05:51:41 +00:00
Christopher Faylor 992ddba949 * path.cc (cwdstuff::set): Rewrite previous change to properly test the end of
the buffer.
2009-05-29 20:18:50 +00:00
Christopher Faylor 9971adf5aa * path.cc (cwdstuff::set): Avoid removing a nonexistent trailing slash. 2009-05-28 05:10:03 +00:00
Christopher Faylor 1ccd407d79 Change explicitely to explicitly throughout. 2009-05-27 02:30:42 +00:00
Christopher Faylor 0a20e5a02b * net.cc (gethostby_helper): Use correct signedness. 2009-05-20 14:56:46 +00:00
Christopher Faylor 6b4d6adebd * mount.cc (mount_info::add_item): Avoid using any-old '/' as indicating root. 2009-05-19 00:42:35 +00:00
Christopher Faylor 3fdcac0b1c * mount.cc (mount_info::got_usr_bin): Mark as NO_COPY.
(mount_info::got_usr_lib): Ditto.
(mount_info::root_idx): Ditto.
2009-05-18 04:58:21 +00:00
Corinna Vinschen 0a23799aee * cygpath.cc (codepage): New variable.
(long_options): Add --codepage option.
	(options): Add -C option.
	(usage): Add -C/--codepage description.
	(my_wcstombs): New function.  Use througout instead of wcstombs.
	(do_options): Handle -C/--codepage option.
	* utils.sgml (cygpath): Add description for new -C/--codepage option.
2009-05-17 11:16:12 +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 7aa710a782 * setup2.sgml (setup-locale-console): Disable section for now. 2009-05-15 12:16:01 +00:00
Corinna Vinschen 73535010d7 * cygpath.cc (main): Only setlocale for LC_CTYPE category. Fallback
to UTF-8 if locale is "C".
	* ldd.cc (main): Ditto.
	* mkgroup.c (main): Ditto.
	* mkpasswd.c (main): Ditto.
	* passwd.c (main): Ditto.
2009-05-15 11:30:18 +00:00
Corinna Vinschen a972ea99d5 * wchar.h (sys_mbstowcs): Add missing __stdcall attribute. 2009-05-15 11:27:41 +00:00
Corinna Vinschen 6f401eccfb * cygheap.cc (cygheap_init): Set Cygwin default locale values.
* cygheap.h (struct cygheap_locale): New structure.
	(struct user_heap_info): Add cygheap_locale member locale.
	* dcrt0.cc (dll_crt0_1): Revert to calling _setlocale_r so that only
	the applications locale is reverted to "C".
	* environ.cc (environ_init): Remove unused got_lc variable.
	* fhandler.h (class dev_console): Remove now unsed locale variables.
	* fhandler_console.cc (fhandler_console::get_tty_stuff): Remove
	setting dev_console's locale members.
	(dev_console::con_to_str): Use internal locale settings.  Default to
	__ascii_wctomb if charset is "ASCII".
	(fhandler_console::write_normal): Ditto.
	* strfuncs.cc (__ascii_wctomb): Drop declaration.
	(__db_wctomb): Use fixed value 2 instead of not
	necessarily matching MB_CUR_MAX.
	(__eucjp_wctomb): Use 3 instead of MB_CUR_MAX.
	(sys_cp_wcstombs): Remove special case for "C" locale.
	(sys_wcstombs): Implement here.  Use internal locale data stored on
	cygheap.
	(sys_cp_mbstowcs): Remove special case for "C" locale.
	(sys_mbstowcs): Implement here.  Use internal locale data stored on
	cygheap.
	* syscalls.cc (internal_setlocale): New function to set cygheap locale
	data and to reset CWD posix path.
	(setlocale): Just call internal_setlocale from here if necessary.
	* wchar.h (__ascii_wctomb): Declare.
	(sys_wcstombs): Don't define inline, just declare.
	(sys_mbstowcs): Ditto.
2009-05-14 19:49:37 +00:00
Christopher Faylor ef5da523a9 * mount.cc (mount_info::init): Remove MOUNT_CYGWIN_EXEC setting when
auto-mounting /usr/bin.
2009-05-14 14:44:31 +00:00
Corinna Vinschen e8d534d51a * faq-setup.xml (faq.setup.upgrade-mountpoints): New entry.
* faq-using.xml (faq.using.directory-structure): Align example to
	latest mount output.
	* pathnames.sgml (mount-table): Add note about upgrade helper scripts
	to create /etc/fstab and /etc/fstab.f/${USER}.
2009-05-14 11:03:43 +00:00
Corinna Vinschen 3106abf042 * new-features.sgml: Add automounting of /, /usr/bin, and /usr/lib.
* pathnames.sgml (pathnames-intro): Be more verbose about POSIX and
	Win32 paths.
	(mount-table): Add "auto" flag.  Add a paragraph about /usr/bin and
	/usr/lib.
	(pathnames-mount-ex): Enhance flags output.
2009-05-14 10:03:25 +00:00
Corinna Vinschen f7c246620d * mount.cc (oopts): Add a no-op "auto" option.
(mount_info::create_root_entry): Set root dir to MOUNT_IMMUTABLE rather
	than to MOUNT_OVERRIDE.
2009-05-14 09:56:45 +00:00
Christopher Faylor e951743709 cygwin ChangeLog
2009-05-13  Corinna Vinschen  <corinna@vinschen.de>
	    Christopher Faylor  <me+cygwin@cgf.cx>

	* mount.cc (mount_info::got_usr_bin): Define.
	(mount_info::got_usr_lib): Ditto.
	(mount_info::root_idx): Ditto.
	(mount_info::create_root_entry): Create root entry as immutable and
	flag as automatic.
	(mount_info::init): Remove "Huh?  No /etc/fstab..." warning.
	Unconditionally call from_fstab for user and system tables.  Fill in
	/usr/bin and /usr/lib if they have not been specified in /etc/fstab.
	(oopts): Alphabetize.  Add "override" option to allow overriding
	immutable mount points.
	(mount_info::add_item): Accommodate new MOUNT_IMMUTABLE flag intended
	for root mount.
	(mount_info::add_item): Detect "/usr/bin", "/usr/lib", and "/" and set
	appropriate global state.
	(fillout_mntent): Add ,auto to mount points added by Cygwin DLL.
	(mount): Remove masking of MOUNT_SYSTEM.  Allow user to shoot
	themselves.  Add comment.
	* mount.h (mount_info::got_usr_bin): Declare.
	(mount_info::got_usr_lib): Ditto.
	(mount_info::root_idx): Ditto.
	* include/sys/mount.h: Reformat enum.
	Add MOUNT_{OVERRIDE,IMMUTABLE,AUTOMATIC}.

doc ChangeLog
2009-05-13  Corinna Vinschen  <corinna@vinschen.de>
	    Christopher Faylor  <me+cygwin@cgf.cx>

	* pathnames.sgml (mount-table): Sort mount options and add override
	option.  Add description of root mount handling.

utils ChangeLog
2009-05-13  Corinna Vinschen  <corinna@vinschen.de>
	    Christopher Faylor  <me+cygwin@cgf.cx>

	* mount.cc (oopts): Sort.  Add override option.  Add dummy "auto"
	option for consistency.
	(mount_entries): Avoid adding auto-mounted entries to -m output.

	* utils.sgml: Sort mount options.  Add description of override option.
2009-05-14 03:25:45 +00:00
Corinna Vinschen 40c66067fb * pathnames.sgml (pathnames-unusual): Talk about using UTF-8 in C
locale.
	* setup2.sgml (setup-locale-problems): Ditto.
2009-05-13 15:11:39 +00:00
Corinna Vinschen b6c6ea43f3 * cygheap.h (cwdstuff): Convert to class. Make posix and dir private.
(cwdstuff::get_posix): New method.
	(cwdstuff::reset_posix): New method.
	* dcrt0.cc (dll_crt0_1): Call setlocale rather than _setlocale_r.
	* environ.cc (environ_init): Ditto.  Prefer "C" locale over current
	codepage default locale.
	* path.cc (chdir): Use cwdstuff::get_posix method instead of accessing
	cwdstuff::posix directly.
	(cwdstuff::set): Defer creating posix path to first usage.
	(cwdstuff::get_posix): Create posix path if it's empty, and return it.
	(cwdstuff::get): Create posix path if it's empty.
	* strfuncs.cc (sys_cp_wcstombs): Use UTF-8 conversion in the "C"
	locale.
	(sys_cp_mbstowcs): Ditto.
	* syscalls.cc (gen_full_path_at): Fetch CWD posix path locked.
	(setlocale): Implement here.  Reset CWD posix path.
2009-05-13 15:00:06 +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
Christopher Faylor 5aaaadc0e5 * cygwin/version.h (CYGWIN_VERSION_CYGWIN_CONV): New define. 2009-05-09 20:16:06 +00:00
Corinna Vinschen 9b98d6a8fb * dtable.cc (dtable::init_std_file_from_handle): Add workaround for
Windows 7 64 bit issue.  Add lengthy comment to explain what happens.
	* wincap.h (wincaps::has_console_handle_problem): New element.
	* wincap.cc: Implement above element throughout.
	(wincap_7): New wincaps structure for NT 6.1 kernels.
	(wincapc::init): Set has_console_handle_problem to false for 32 bit
	systems.

	Fix broken older ChangeLog entry.
2009-05-09 15:56:37 +00:00
Corinna Vinschen a22af4a956 * sec_auth.cc (str2uni_cat): Move from here...
* path.cc (str2uni_cat): ...to here.  Simplify.  Make static inline.
	(get_nt_native_path): Use RtlAppendUnicodeToString rather than
	str2uni_cat for constant strings for speed.
	* security.h (str2uni_cat): Drop declaration.
2009-05-09 15:08:16 +00:00
Corinna Vinschen 4dff3fed7d * strfuncs.cc (sys_cp_wcstombs): save and restore previous errno value.
(sys_cp_mbstowcs): Ditto.
2009-05-08 20:28:20 +00:00
Corinna Vinschen 0e6edb13c6 * strfuncs.cc (sys_cp_wcstombs): Set errno to 0 before converting
wide char to SO/UTF-8 sequence.
2009-05-08 19:38:33 +00:00
Corinna Vinschen 415867c378 * include/sys/select.h: Guard definitions with __USE_W32_SOCKETS as
the accompanying fd_set definitions in newlib's sys/types.h.
2009-05-08 10:54:58 +00:00
Christopher Faylor 6f5b891b7b * fhandler_console.cc (fhandler_console::ioctl): Properly treat TIOCLINUX
argument as a char.
* fhandler_tty.cc (fhandler_tty_slave::ioctl): Use coercion to properly set
char value.
2009-05-06 17:16:33 +00:00
Corinna Vinschen 967c052689 * Move ChangeLog entry. 2009-05-06 12:08:07 +00:00
Corinna Vinschen eed691a929 * libc/minires.c (scanline): Fix type in calls to ctype functions
to stay in unsigned char range for char values >= 0x80.
	* regex/regcomp.c: Ditto, throughout.
	* regex/regex2.h (ISWORD): Ditto.
2009-05-06 12:03:34 +00:00
Corinna Vinschen e1de7bfabd * faq-setup.xml: Fix entry explaing how the homedir is evaluated
according to recent change.
2009-05-06 12:02:51 +00:00
Corinna Vinschen 05e6f7b2b9 * mkpasswd.c (current_user): Don't use HOMEDRIVE/HOMEPATH to generate
user's homedir.

	* mkgroup.c: Accommodate ctype changes.
	* mkpasswd.c: Ditto.
	* setfacl.c: Ditto.
	* ssp.c: Ditto.
2009-05-06 11:54:24 +00:00
Corinna Vinschen 764d88e4a7 * cygheap.cc (cygheap_init): Set umask to a sane default.
* uinfo.cc (cygheap_user::ontherange): Don't use HOMEDRIVE/HOMEPATH
	to set HOME.  Default to /home/USERNAME.
2009-05-06 11:52:20 +00:00
Christopher Faylor 3227665e19 * cygcheck.cc (find_app_on_path): Avoid using NULL pointer if find_on_path
doesn't find the app on the path.
2009-05-04 18:51:08 +00:00
Corinna Vinschen 143cb0bed5 * cygcheck.cc (usage): Fix option order and print. 2009-05-04 10:15:48 +00:00
Corinna Vinschen 9d86c13dbb * security.cc (set_file_sd): Drop using FILE_OPEN_FOR_RECOVERY flag in
call to NtOpenFile.
	* exceptions.cc (open_stackdumpfile): Ditto in call to NtCreateFile.
	* fhandler.cc (fhandler_base::open): Ditto.  Simplify setting
	create_options.

	* mount.cc (fs_info::update): Recognize offline storage.
	(fillout_mntent): Report UDF and offline storage.
	* mount.h (class fs_info): Add is_csc_cache status flag.
2009-05-04 09:16:42 +00:00
Christopher Faylor 56a4d31a7f * fhandler_console.cc (fhandler_console::write_console): Eliminate unneeded
debugging output.
(fhandler_console::write_normal): Eliminate unneeded __seterrno.
2009-05-04 04:43:50 +00:00
Christopher Faylor b7a1552440 * libc/minires.c (scanline): Accommodate ctype changes which disallow use of an
unadorned char argument to is* macros.
* regex/regcomp.c: Ditto, throughout.
* regex/regex2.h (ISWORD): Ditto.
2009-05-04 04:30:37 +00:00
Christopher Faylor b65ec404a7 * fhandler.h (fhandler_console::MAX_WRITE_CHARS): Declare.
(fhandler_console::write_replacement_char): Declare as inline.
(fhandler_console::write_console): Declare new function.
* fhandler_console.cc (fhandler_console::MAX_WRITE_CHARS): Define.
(handler_console::write_console): Define.
(fhandler_console::write_replacement_char): Define as inline.
(fhandler_console::write_normal): Use write_console when writing buffers of
unknown length.
2009-05-04 03:51:16 +00:00
Chris Sutcliffe 1f5ea7a0db 2009-05-01 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
* include/shellapi.h (SHIL_LARGE, SHIL_SMALL, SHIL_EXTRALARGE,
        SHIL_SYSSMALL, SHIL_JUMBO, SHIL_LAST SHIL_JUMBO, SHGetImageList): Define.
        * lib/shell32.def (SHGetImageList): Define.
2009-05-02 01:46:36 +00:00
Christopher Faylor a8fdf91d85 * include/cygwin/socket.h: Define SOL_IPV6. 2009-04-27 04:31:22 +00:00
Christopher Faylor 08825b6edc * strace.cc (create_child): Set CYGWIN=noglob when starting new process so that
Cygwin will leave already-parsed the command line alonw.
2009-04-22 19:08:53 +00:00
Corinna Vinschen 27378802ea * ctype.cc (__set_ctype): Copy exact part of the current active
character class array.
2009-04-21 20:10:55 +00:00
Corinna Vinschen 5698171a3f * flock.cc (lf_setlock): Handle border case which results in WFMO loop
exiting with ret == WAIT_TIMEOUT gracefully.  Add a system_printf to
	uncover other potential problems with WFMO loop.
2009-04-20 17:13:19 +00:00
Christopher Faylor b978c43ea0 * mkimport: Specify .text for stub explicitly.
* speclib: Add a dummy '.idata$7' section referring to the dll associated with
the real import library.
2009-04-18 17:23:45 +00:00
Corinna Vinschen 855762d6f4 * dcrt0.cc (globify): Only call mbtowc for non-ascii chars. 2009-04-18 11:08:37 +00:00
Corinna Vinschen 0351fbd504 * dcrt0.cc (globify): Make multibyte-aware. 2009-04-17 14:51:44 +00:00