Commit Graph

4831 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 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 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 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 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
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 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 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
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
Christopher Faylor a8fdf91d85 * include/cygwin/socket.h: Define SOL_IPV6. 2009-04-27 04:31:22 +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
Corinna Vinschen a74869c027 * flock.cc (class inode_t): Add i_wait member and matching methods
wait(), unwait(), and waiting().
	(inode_t::inode_t): Initialize i_wait to 0.
	(fhandler_disk_file::lock): Only remove node if no other thread is
	waiting for a blocking lock.
	(lf_setlock): Manipulate node->i_wait to signal that a thread is
	waiting for a blocking lock in this node.
	(lf_findoverlap): Reinstantiate SELF test as in original code.
2009-04-17 13:29:08 +00:00
Corinna Vinschen 54155bc37b * dlfcn.cc (get_full_path_of_dll): Just return a bool value. Drop
local path_conv in favor of getting it as parameter.  Add local string
	buffer instead of getting it as parameter.
	(dlopen): Accommodate get_full_path_of_dll change.  Fetch WCHAR Windows
	path from path_conv variable and call LoadLibraryW.
2009-04-16 16:17:58 +00:00
Corinna Vinschen 03897d8dda * ntdll.h (STATUS_LOCK_NOT_GRANTED): Define.
* syscalls.cc (unlink_nt): Handle STATUS_LOCK_NOT_GRANTED same as
	STATUS_SHARING_VIOLATION.  Add lengthy comment to explain why.
2009-04-16 12:16:35 +00:00
Corinna Vinschen ca027229d5 * path.cc (path_conv::get_wide_win32_path): Allow relative paths.
(cygwin_conv_path): In case of CCP_POSIX_TO_WIN_W, convert relative
	paths to absolute paths if the relative pathname length exceeds
	MAX_PATH.
2009-04-15 09:58:41 +00:00
Corinna Vinschen d370bb56c8 * libc/bsdlib.cc: Align copyright with upstream.
* libc/fnmatch.c: Ditto.
	* libc/fts.c: Ditto.
	* libc/inet_addr.c: Ditto.
	* libc/inet_network.c: Ditto.
	* libc/rcmd.cc: Ditto.
	* libc/rexec.cc: Ditto.
2009-04-15 08:20:47 +00:00
Christopher Faylor fcea4c1c3d * speclib: Really revert to using tempdir. 2009-04-14 15:10:28 +00:00
Christopher Faylor d295466636 * speclib: Revert to using tempdir. 2009-04-14 14:28:34 +00:00
Corinna Vinschen 51291d61e2 * localtime.cc (tzload): Implement setting __tzrule's offset member
using newlib's __gettzinfo () interface also when tzload returns
	successfully.
2009-04-14 12:08:07 +00:00
Dave Korn 03d59fb47d * include/stdint.h (intptr_t): Remove long from type.
(uintptr_t):  Likewise.
	(INTPTR_MIN):  Remove 'L' suffix.
	(INTPTR_MAX, UINTPTR_MAX):  Likewise.
2009-04-13 22:55:00 +00:00
Christopher Faylor 73bd57524a * speclib: Initial stab at cleaning up temp files. More work needed.
* mkimport: Ditto.
2009-04-12 05:11:08 +00:00
Christopher Faylor d129941aef * Makefile.in (clean): Clean globals.h.
(LIBCOS): Depend on globals.h.
2009-04-12 04:14:31 +00:00
Christopher Faylor edd090a270 * mkimport: New script to perform all operations necessary to create
libcygwin.a.
* rmsym: Delete.
* newsym: Delete.
* Makefile.in (toolopts): New variable which holds options relating to
binutils/gcc tools.
(speclib): Use toolopts.  Add symbols to avoid copying to special libraries.
(OBSOLETE_FUNCTIONS): Delete.
(NEW_FUNCTIONS): Change to represent an argument to new mkimport script.
(libcygwin.a): Use only new mkimport script to create libcygwin.a.  Only rely
on ${LIBCOS}.
(*/lib*.a): Simplify speclib dependencies.
(speclib): Accept toolchain options.  Convert every argument to absolute path.
Simplify parsing of nm output.  Accommodate new exclude option.
2009-04-12 03:19:52 +00:00
Corinna Vinschen 1b98373a40 * include/stdint.h (INTPTR_MIN, INTPTR_MAX): Add 'L' suffix.
(WINT_MAX):  Add 'U' suffix.
2009-04-11 08:07:30 +00:00
Christopher Faylor 1318037e44 * speclib: Use a more robust method to derive full file path. 2009-04-10 04:29:25 +00:00
Christopher Faylor 59328e28c4 * speclib: Semi-revert to previous version but don't try to generate
well-formed import library.  Instead, just extract appropriate symbols and let
later libcygwin.a on link line fill in the rest of the import stuff.
* gendef: Hopefully no-op modification to allow easier post-processing on
symbol values.
2009-04-09 21:02:53 +00:00
Corinna Vinschen 0c4023011d * syscalls.cc (try_to_bin): Use tmp_pathbuf buffer to allocate infobuf
rather than using the stack.
2009-04-09 17:55:01 +00:00