summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin
Commit message (Collapse)AuthorAgeFilesLines
* * 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
|
* * mount.cc (fillout_mntent): Print options as taken in fstab and mount.Corinna Vinschen2008-08-132-4/+6
|
* * dll_init.cc: Throughout convert to use long pathnames.Corinna Vinschen2008-08-133-15/+22
| | | | | * dll_init.h (struct dll): Change name to WCHAR, change operator [] to take PWCHAR argument.
* * syscalls.cc (rename): If newpath doesn't exist, check if .exe suffixCorinna Vinschen2008-08-112-2/+8
| | | | in oldpath has been omitted before appending .exe to newpath.
* * fhandler_floppy.cc (fhandler_dev_floppy::raw_read): Don't setCorinna Vinschen2008-08-092-4/+7
| | | | | eom_detected when EOF is detected, thus returning 0 instead of setting errno to ENOSPC.
* * fhandler.cc (fhandler_base::open): Use Samba workaround generallyCorinna Vinschen2008-08-072-17/+27
| | | | | for all remote filesystems supporting ACLs. Change comment and explain why. Refer to the discussion which led to this.
* * config/i386/profile.h (mcount): Mark asms volatile.Brian Dessent2008-08-052-2/+6
|
* * dll_init.cc (dll_global_dtors): Add an additional test to avoid walking theChristopher Faylor2008-08-052-3/+9
| | | | | | linked list if it is empty. (dll_list::detach): Don't set dll_global_dtors_recorded if we aren't actually going to record any dlls.
* Changes suggested by Dave Korn.Christopher Faylor2008-08-044-2/+11
| | | | | | | | * dcrt0.cc (cygwin_exit): Remove (hopefully) extraneous call to dll_global_dtors. * dll_init.cc (dll_global_dtors): Run destructors in reverse dependency/load order. * dll_init.h (dll_list): Add dll_global_dtors as a friend.
* * dcrt0.cc (dll_crt0_1): Add a symbol denoting return from call to main().Christopher Faylor2008-08-013-3/+18
| | | | | * exceptions.cc (stack_info::walk): Stop walking the stack when we hit _cygwin_exit_return rather than just blindly stopping when PC becomes zero.
* * path.cc (symlink_info::check): Handle (and explain) a special caseCorinna Vinschen2008-07-312-0/+17
| | | | when accessing files matching DOS device names on SMB shares.
* * spawn.cc (spawn_guts): Check constructed short pathname for beingCorinna Vinschen2008-07-312-1/+9
| | | | a DOS device name and fall back to long path name, if so.
* * fhandler_disk_file.cc (fhandler_base::fstat_by_name): Check forCorinna Vinschen2008-07-304-25/+58
| | | | | | | | | | | | | | | file systems incapable of handling FileIdBothDirectoryInformation correctly. (fhandler_disk_file::opendir): Ditto. * path.cc (fs_info::update): Always clear at the start. Rearrange to make certain tests only on non-Samba, non-NFS remote drives. Add test for file systems known to be incapable of handling FileIdBothDirectoryInformation correctly. Right now that's just "UNIXFS". * path.h (struct fs_info): Add has_buggy_fileid_dirinfo flag and accessor methods. (class path_conv): Add has_buggy_fileid_dirinfo method.
* * sec_auth.cc (extract_nt_dom_user): Return domain and user name asCorinna Vinschen2008-07-304-15/+35
| | | | | | | | WCHAR. (cygwin_logon_user): Accommodate above change. Convert password to WCHAR and call LogonUserW. * external.cc (cygwin_internal): Accommodate above change. * security.h (extract_nt_dom_user): Change prototype accordingly.
* * cygwin.din (_getutline): Remove.Christopher Faylor2008-07-306-16/+36
| | | | | | | | | | | | | | * lib/bsdlib.cc (login): Make argument const as per linux. (logout): Ditto. * syscalls.cc (getutid): Ditto. (getutline): Ditto. (pututline): Ditto. (getutxent): Add comment mentioning non-thread-safety. (getutxid): Ditto. (getutxline): Ditto. (pututxline): Ditto. * sys/utmp.h: Declare arguments to various functions as const as per linux. Remove bogus _getutline definition.
* (missing changelog entry)Christopher Faylor2008-07-301-1/+6
| | | | | * include/cygwin/version.h: Add comment indicating that current API number bump also has another consequence.
* * include/cygwin/version.h: Add comment indicating that current API number bumpChristopher Faylor2008-07-291-1/+2
| | | | also has another consequence.
* * Makefile.in (DLL_OFILES): Remove v8 regexp files.Corinna Vinschen2008-07-2913-1622/+26
| | | | | | | | | | | (OBSOLETE_FUNCTIONS): Remove v8 regexp functions. (NEW_FUNCTIONS): Remove POSIX regex functions. * cygwin.din: Export POSIX regex functions with their correct symbol name. Export with posix_ prefix for backward compatibility. * syscalls.cc (regfree): Remove ancient fake function. * regex/regex.h: Remove renaming regex functions within Cygwin. * regexp/*: Remove. * include /cygwin/version,.h: Bump API minor number.
* * dcrt0.cc (dll_crt0_0): Remove calling malloc_init andChristopher Faylor2008-07-275-47/+46
| | | | | | | | | | | user_shared_initialize_1 from here. (dll_crt0_1): Remove dynamically_loaded check. Just call malloc_init and user_shared_initialize unconditionally. * shared.cc (user_shared_create): Rename from user_shared_initialize. (user_shared_initialize): Rename from user_shared_initialize_1. Move complete user_shared content initialization code here from user_shared_create. * syscalls.cc (seteuid32): Remove call to user_shared_initialize_1. That is implied by the "true" argument to user_shared_create().
* * mount.cc (mount_info::init): Add location where we're looking for fstab toChristopher Faylor2008-07-274-17/+16
| | | | | | | temporary message. * lib/cygwin_crt0.c (cygwin_crt0): Simplify by eliminating accommodations for ancient cygwin DLLs. * lib/crt0.h: Include <windows.h> directly since it is needed.
* * shared_info.h (shared_destroy): Declare.Christopher Faylor2008-07-274-1/+22
| | | | | | * shared.cc (shared_destroy): Define new function to destroy shared memory regions. * init.cc (dll_entry): Call shared_destroy when dll detaches from the process.