summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin
Commit message (Collapse)AuthorAgeFilesLines
* * fhandler_floppy.cc (fhandler_dev_floppy::raw_read): DropCorinna Vinschen2008-11-212-2/+10
| | | | | | initialization of bytes_to_read. Set bytes_to_read to len in non-buffered case. Call read_bytes correctly with bytes_to_read instead of len.
* * mmap.cc (MapView): Add NT status to debug output.Corinna Vinschen2008-11-212-2/+7
|
* * autoload.cc (GetSystemDEPPolicy): Define.Corinna Vinschen2008-11-126-3/+84
| | | | | | | | | | | | | (GetProcessDEPPolicy): Ditto. (SetProcessDEPPolicy): Ditto. * dcrt0.cc (disable_dep): New static function. (dll_crt0_0): Call disable_dep on platforms requiring it. Add longish comment to explain the circumstances. * wincap.h (wincaps::ts_has_dep_problem): New element. * wincap.cc: Implement above element throughout. (wincapc::init): Set ts_has_dep_problem to true on 2008 Terminal Servers. * winsup.h (WINVER): Set to 0x0601.
* * mount.cc (mount_info::cygdrive_win32_path): Always upper caseCorinna Vinschen2008-11-113-3/+19
| | | | | | | DOS drive letter to accommodate case sensitivity. (cygdrive_getmntent): Ditto. * path.cc (path_conv::check): Invalidate wide_path after making path relative.
* * environ.cc (create_upcaseenv): New static variable.Corinna Vinschen2008-11-112-2/+77
| | | | | | | | | | | | (renv_arr): New static array to keep track of environment variables which have to be always uppercased. (idx_arr): Ditto. (start_at): Ditto. (ucreqenv): New function to uppercase only the environment variables from renv_arr. (parse_thing): Add "upcaseenv" setting. (environ_init): Parse $CYGWIN before doing anything else. Call ucreqenv instead of ucenv if CYGWIN=noupcaseenv is set.
* * path.cc (normalize_win32_path): Don't add a trailing '\' if the cwd returns aChristopher Faylor2008-11-112-1/+7
| | | | path with a trailing '\'.
* * pthread.cc (pthread_mutex::_unlock): Avoid unlocking a mutex if theChristopher Faylor2008-11-073-11/+28
| | | | | | | | | | | recursion_counter is already 0. (pthread_mutex::_destroy): Don't consider a mutex busy if its recursion_counter == 0. (pthread_mutex::_fixup_after_fork): Set recursion_counter to 0 to flag that we've just forked. Don't reset the owner of this mutex since the forkee may think it still owns the mutex. Reinstate initialization of win32_obj_id. * fhandler_floppy.cc (fhandler_dev_floppy::raw_read): Initialize a variable to bypass a C++ warning.
* * environ.cc (environ_init): Avoid evaluating $CYGWIN twice.Corinna Vinschen2008-11-052-2/+4
|
* * wincap.cc (all wincaps): Store in .cygwin_dll_common section same asCorinna Vinschen2008-10-232-10/+21
| | | | wincap. Add comment to explain why.
* * autoload.cc (GetSystemWindowsDirectoryW): Define.Corinna Vinschen2008-10-223-0/+43
| | | | | | * kernel32.cc (GetWindowsDirectoryW): Implement to abstract from running under Terminal Services or not. (GetWindowsDirectoryA): Ditto.
* * passwd.cc (pwdgrp::read_passwd): Check if we're called withinCorinna Vinschen2008-10-212-8/+17
| | | | | user_shared initialization and ignore myself, if so. Reformat conditional expression.
* * ntdll.h (NtSetAttributesFile): New inline function.Corinna Vinschen2008-10-205-45/+38
| | | | | | | | | * fhandler_disk_file.cc (fhandler_disk_file::fchmod): Use NtSetAttributesFile. * path.cc (symlink_worker): Ditto. * syscalls.cc (unlink_nt): Ditto. (rename): Omit FILE_SHARE_DELETE when opening files on Samba. Add comment to explain why.
* * dtable.cc (dtable::get_debugger_info): Call SetStdHandleCorinna Vinschen2008-10-172-1/+17
| | | | | | for the newly opened handle. Explain why. (dtable::stdio_init): Don't duplicate standard error handle when stderr has already been created under debugger control.
* * sec_acl.cc (setacl): Align standard owner and group permissionsCorinna Vinschen2008-10-133-10/+19
| | | | | | | with alloc_sd. Strip FILE_READ_ATTRIBUTES fromn setting FILE_GENERIC_EXECUTE permissions same as in alloc_sd. * security.cc (alloc_sd): Reformat expression. Strip EA permission bits from owner_deny and group_deny computation.
* * fhandler_disk_file.cc (fhandler_base::fstat_helper): CheckCorinna Vinschen2008-10-093-11/+19
| | | | | | for executable suffixes here in case we're on a file system not supporting permission. * path.cc (path_conv::check): Drop check for executable suffixes.
* * fhandler_floppy.cc (fhandler_dev_floppy::raw_read): Keep track ofCorinna Vinschen2008-10-092-12/+23
| | | | current position in non-buffered case, too.
* * grp.cc (pwdgrp::read_group): Generate more speaking group nameCorinna Vinschen2008-10-092-1/+7
| | | | if passwd gid exists under different gid in /etc/group.
* Fix ChangeLog entryCorinna Vinschen2008-10-091-1/+1
|
* * path.cc (path_conv::is_binary): Always check for GetBinaryType.Corinna Vinschen2008-10-093-6/+10
| | | | | * syscalls.cc (rename): Fix test for just changing case of name on case insensitive filesystems.
* * path.cc (symlink_info::check_shortcut): Don't check for executabilityCorinna Vinschen2008-10-092-18/+9
| | | | | here. (symlink_info::check_sysfile): Ditto.
* * path.cc (path_conv::path_conv): Only assume executability by suffixCorinna Vinschen2008-10-082-1/+7
| | | | on file systems not supporting permissions.
* * pthread.cc (pthread_create): Very minor formatting change.Christopher Faylor2008-10-073-2/+18
| | | | | * timer.cc (timer_thread): Ensure that any created thread defaults to detached state.
* * cygtls.h (_cygtls::initialized): Remove bogus stack check which would whenChristopher Faylor2008-10-072-2/+7
| | | | checking the current thread from the current thread.
* * dcrt0.cc (dll_crt0_0): Don't initialize signals early when dynamicallyChristopher Faylor2008-10-052-1/+11
| | | | | | loaded. (dll_crt0_1): Wait until this phase to initialize signals when dynamically loaded.
* * thread.cc (pthread_mutex::_fixup_after_fork): Reinstate DEBUGGINGChristopher Faylor2008-09-302-1/+9
| | | | conditional.
* * thread.cc (pthread_mutex::_fixup_after_fork): Just reset lock to pristineChristopher Faylor2008-09-302-22/+12
| | | | state after fork. Don't recreate a mutex since it may not actually be needed.
* * flock.cc (inode_t::get_all_locks_list): Fix typo.Corinna Vinschen2008-09-293-1/+7
| | | | * posix.sgml: Add cfmakeraw to list of implemented BSD functions.
* * errno.cc (_sys_errlist): Add ECANCELED, ENOTRECOVERABLE, EOWNERDEAD.Eric Blake2008-09-192-21/+29
|
* * cygtls.h (unionent): Move from net.cc.Christopher Faylor2008-09-164-94/+130
| | | | | | | | | | | | | | | | | (unionent::struct_type): Move enum here. (_local_storage::hostent_buf): Define as unionent. (_local_storage::protoent_buf): Ditto. (_local_storage::servent_buf): Ditto. * net.cc (unionent): Move to cygtls.h. (struct_type): Ditto. (dup_ent): Define one function per {host,proto,serv}ent type. (cygwin_getprotobyname): Simplify dup_ent call. Removed now-unneeded return type coercion. (cygwin_getprotobynumber): Ditto. (cygwin_getservbyname): Ditto. (cygwin_getservbyport): Ditto. (cygwin_gethostbyname): Ditto. (cygwin_gethostbyaddr): Ditto. tlsoffsets.h: Regenerate.
* * Makefile.in: Add -c option which is now removed from COMPILE_C*.Christopher Faylor2008-09-126-3/+25
| | | | | | | * cygwin.din (cfmakeraw): Export. * termios.cc (cfmakeraw): Implement. * include/sys/termios.h (cfmakeraw): Declare. * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
* * cygwin.din (sys_sigabbrev): Add this here.Christopher Faylor2008-09-117-11/+28
| | | | | | | | | * dcrt0.cc (__argc,__argv,_check_for_executable): Remove dllexport decoration since it is already handled in cygwin.din. * errno.cc (_sys_errlist): Ditto. * strsig.cc (sys_sigabbrev): Ditto. * include/cygwin/signal.h: Protect use of dllimport when __INSIDE_CYGWIN__. * libc/getopt.c: Revert previous changes. Define __INSIDE_CYGWIN__.
* * localtime.cc (increment_overflow): Mark as non-inline to prevent compilerChristopher Faylor2008-09-118-14/+28
| | | | | | | | | | from complaining about the very thing we're trying to test. * ntea.cc (read_ea): Reorganize to avoid a new compiler warning/error. * sched.cc (sched_rr_get_interval): Ditto. * select.cc (peek_serial): Ditto. * libc/rexec.cc (ruserpass): Ditto. * posix_ipc.cc (ipc_names): Make static to avoid a compiler warning (and it's the right thing to do anyway).
* * net.cc (in6addr_any, in6addr_loopback): Add appropriate number of bracesChristopher Faylor2008-09-113-9/+20
| | | | | | | | | | around initializer. (dup_ent): Try harder to coerce the first argument to deal with more stringent compiler. (get_2k_ifs): Remove extraneous typedef. (get_2k_ifs): Reorganize expression to avoid a compiler warning. (get_xp_ifs): Ditto. (get_nt_ifs): Ditto.
* * fhandler.h (fhandler_pipe::raw_read): Remove __stdcall decoration.Christopher Faylor2008-09-113-2/+7
| | | | * pipe.cc (fhandler_pipe::raw_read): Ditto.
* * cygheap.cc (creturn): Reorganize to avoid a new compiler warning/error.Christopher Faylor2008-09-1129-302/+359
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * dtable.cc (handle_to_fn): Ditto. * fhandler_console.cc (fhandler_console::read): Ditto. (fhandler_console::scroll_screen): Ditto. (dev_console::set_color): Ditto. * fhandler_dsp.cc (fhandler_dev_dsp::write): Ditto. (fhandler_dev_dsp::read): Ditto. * fhandler_tape.cc (mtinfo_drive::get_status): Ditto. * hookapi.cc (find_first_notloaded_dll): Ditto. * mmap.cc (msync): Ditto. * pipe.cc (pipesync::pipesync): Ditto. * sec_acl.cc (getace): Ditto. * sec_auth.cc (create_token): Ditto. (lsaauth): Ditto. * select.cc (peek_pipe): Ditto. * spawn.cc (av::fixup): Ditto. * syscalls.cc (popen): Ditto. * tty.cc (tty::init_session): Ditto. * uinfo.cc (pwdgrp::load): Ditto. * fhandler.cc (fhandler_base::setup_overlapped): Ditto. (fhandler_base::wait_overlapped): Rename second use of res variable to wres or errors are not returned correctly. * dcrt0.cc: Remove obsolete variable. * dll_init.cc (release_upto): Fix typo involving incorrect use of '|'. * fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Avoid a compiler warning regarding coercing type-punned variables. (fhandler_base::fstat_by_name): Ditto. fhandler_fifo.cc (fhandler_fifo::open_nonserver): Fix = vs. == typo. (fhandler_fifo::wait): Add all conditions to switch statement to avoid a compiler warning. * fhandler_process.cc: Avoid unneeded initialization of variables to zero. (fhandler_socket::listen): Add braces around initializer. * flock.cc (inode_t::get_all_locks_list): Reorganize to avoid a compiler warning. Fix problem with EWOULDBLOCK error return. * path.cc (GUID_shortcut): Use braces around struct initializer. (cygwin_conv_path): Reorganize to avoid a compiler warning. * random.cc (dummy): Mark variable as volatile to avoid a "used uninitialized" warning. * libc/getopt.c: Mark some variables as dllexport although gcc doesn't seem to do the right thing with them. * libc/minires-os-if.c (get_registry_dns_items): Coerce some function arguments to avoid a compiler warning.
* * fhandler_tty.cc (close_maybe): Check for both types of invalid handle beforeChristopher Faylor2008-08-272-7/+14
| | | | | | attempting CloseHandle. (fhandler_pty_master::setup): Only set inheritance on pty handles, not tty handles.
* * shared_info.h (shared_info::create_root_entry): Remove extraneousChristopher Faylor2008-08-262-1/+6
| | | | mount_info:: from declaration.
* * fhandler.h (class fhandler_pipe): Rename read and writeCorinna Vinschen2008-08-263-4/+11
| | | | | | declarations to raw_read and raw_write. * pipe.cc (fhandler_pipe::raw_read): Rename from read. (fhandler_pipe::raw_write): Rename from write.
* add commentsChristopher Faylor2008-08-251-0/+4
|
* * fhandler.cc (fhandler_base::wait_overlapped): Reorganize again to accommodateChristopher Faylor2008-08-222-2/+10
| | | | | what appears to be an MSDN hint about not resetting the overlapped event prior to calling GetOverlappedResult.
* * path.cc (symlink_info::check_shortcut): If file can't be opened,Corinna Vinschen2008-08-202-5/+8
| | | | | treat it as non-symlink rather than generating an EIO error. (symlink_info::check_sysfile): Ditto.
* * fhandler.cc (fhandler_base::wait_overlapped): Always assume that bytes willChristopher Faylor2008-08-205-15/+27
| | | | | | | | | be non-NULL. Distinguish input result from result derived from WFMO and GetOverlappedResult or res can never be -1. Only raise SIGPIPE when writing. * fhandler.h (fhandler_base::wait_overlapped): Pass first argument by value. * fhandler_fifo.cc (fhandler_fifo::wait): Pass in dummy byte count to wait_overlapped. * pipe.cc (DEFAULT_PIPEBUFSIZE): Define to 65536 explicitly.
* * fhandler_disk_file.cc (fhandler_disk_file::mkdir): Drop fattr variableCorinna Vinschen2008-08-194-6/+16
| | | | | | | | | and use FILE_ATTRIBUTE_DIRECTORY directly in call to NtCreateFile. * posix_ipc.cc (ipc_mutex_init): Fix format string when creating IPC object name. (ipc_cond_init): Ditto. * security.cc (alloc_sd): Add parentheses to fix setting initial owner_allow value.
* * fhandler.cc (fhandler_base::wait_overlapped): Don't treat ERROR_BROKEN_PIPEChristopher Faylor2008-08-192-2/+8
| | | | as a non-error. Do raise SIGPIPE when it is detected.
* * mount.cc (mount_info::get_mounts_here): Don't subtract 2 fromCorinna Vinschen2008-08-152-1/+7
| | | | Length if it's 0 anyway.
* * mount.cc (mount_info::create_root_entry): Create default cygdriveCorinna Vinschen2008-08-152-1/+6
| | | | prefix with MOUNT_NOPOSIX flag.
* * path.cc (symlink_info::check): Don't use eabuf when trying to openCorinna Vinschen2008-08-152-8/+12
| | | | | file a second time. Call NtOpenFile instead of NtCreateFile in this case.
* * fhandler_disk_file.cc (fhandler_disk_file::link): Fix linkingCorinna Vinschen2008-08-142-9/+10
| | | | against symlinks.
* * external.cc (cygwin_internal): Call set_security_attribute withCorinna Vinschen2008-08-148-25/+69
| | | | | | | | | | | | | | | | | | | | | | | additional path_conv argument. * fhandler.cc (fhandler_base::open): Ditto. * fhandler_disk_file.cc (fhandler_disk_file::fchmod): Never set DOS R/O attribute when using ACLs. (fhandler_disk_file::mkdir): Ditto. Set security descriptor on remote dirs after creating the dir, same as in fhandler_base::open. * fhandler_socket.cc (fhandler_socket::bind): Ditto for remote AF_LOCAL socket files. * path.cc (symlink_worker): Ditto. for remote symlinks. * security.cc (alloc_sd): Take additional path_conv argument. Accommodate throughout. Drop setting FILE_WRITE_EA/FILE_READ_EA flags unconditionally (was only necessary for "ntea"). Don't set FILE_READ_ATTRIBUTES and FILE_WRITE_ATTRIBUTES unconditionally on Samba. Add comment to explain. Drop useless setting of STANDARD_RIGHTS_WRITE, it's in FILE_GENERIC_WRITE anyway. Remove FILE_READ_ATTRIBUTES bit from FILE_GENERIC_EXECUTE so as not to enforce read permissions on Samba. (set_security_attribute): Take additional path_conv argument. * security.h (set_security_attribute): Change prototype accordingly.
* * mount.cc (fillout_mntent): Always print noumount option last.Corinna Vinschen2008-08-132-3/+7
|