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
2002-09-19* cygthread.cc (cygthread::initialized): Avoid copying on fork or some threadsChristopher Faylor
may not end up in the pool. (cygthread::new): Avoid race when checking for initialized. Add debugging code. * fhandler.cc (fhandler_base::raw_read): Add case for ERROR_INVALID_HANDLE due to Win95 directories. (fhandler_base::open): Handle errors due to Win95 directories. (fhandler_base::close): Add get_nohandle () test. (fhandler_base::set_close_on_exec): Ditto. (fhandler_base::fork_fixup): Ditto. (fhandler_base::lock): Change error code to Posix EINVAL. (fhandler_base::dup): If get_nohandle (), set new value to INVALID_HANDLE_VALUE instead of NULL. * fhandler_disk_file.cc (fhandler_disk_file::fstat): Call fstat_by_name if get_nohandle (). Remove extraneous element from strpbrk. (fhandler_disk_file::open): Remove test for Win95 directory. * fhandler_random.cc (fhandler_dev_random::open): Add set_nohandle (). * fhandler_clipboard.cc (fhandler_dev_clipboard::open): Ditto. * fhandler_zero.cc (fhandler_dev_zero::open): Ditto. (fhandler_dev_zero::close): Delete. * fhandler.h (class fhandler_dev_zero): Ditto.
2002-09-04 * fhandler.h (fhandler_socket::read): Remove method.Corinna Vinschen
(fhandler_socket::write): Ditto. (fhandler_socket::readv): New method. (fhandler_socket::writev): Ditto. (fhandler_socket::recvmsg): Add new optional argument. (fhandler_socket::sendmsg): Ditto. * fhandler.cc (fhandler_socket::read): Remove method. (fhandler_socket::write): Ditto. (fhandler_socket::readv): New method. (fhandler_socket::writev): Ditto. (fhandler_socket::recvmsg): Use win32's scatter/gather IO where possible. (fhandler_socket::sendmsg): Ditto. * net.cc (cygwin_recvmsg): Check the msghdr's iovec fields. (cygwin_sendmsg): Ditto. Add omitted sigframe.
2002-08-27 * fhandler_socket.cc (fhandler_socket::check_peer_secret_event):Corinna Vinschen
Fix strace message. (fhandler_socket::connect): Remove sigframe. (fhandler_socket::accept): Ditto. (fhandler_socket::getsockname): Ditto. (fhandler_socket::getpeername): Ditto. (fhandler_socket::recvfrom): Ditto. (fhandler_socket::recvmsg): Ditto. (fhandler_socket::sendto): Ditto. (fhandler_socket::sendmsg): Ditto. (fhandler_socket::close): Ditto. (fhandler_socket::ioctl): Ditto. * ioctl.cc (ioctl): Add sigframe. *net.cc (cygwin_sendto): Ditto. (cygwin_recvfrom): Ditto. (cygwin_recvfrom): Ditto. (cygwin_connect): Ditto. (cygwin_shutdown): Ditto. (cygwin_getpeername): Ditto. (cygwin_accept): Ditto. Improve strace message. (cygwin_getsockname): Ditto. Ditto. (cygwin_recvmsg): Ditto. Ditto. (cygwin_sendmsg): Fix strace message.
2002-08-26 * fhandler.h (fhandler_socket::recvfrom): Fix prototype.Corinna Vinschen
(fhandler_socket::sendto): Ditto. * fhandler_socket.cc (fhandler_socket::recvfrom): Ditto. (fhandler_socket::sendto): Ditto. * include/sys/socket.h (recv): Fix prototype. (recvfrom): Ditto. (send): Ditto. (sendto): Ditto. * net.cc (cygwin_sendto): Ditto. Improve strace message (cygwin_recvfrom): Ditto. Ditto. (cygwin_setsockopt): Improve strace message. (cygwin_getsockopt): Ditto. (cygwin_connect): Ditto. (cygwin_accept): Ditto. (cygwin_bind): Ditto. (cygwin_getsockname): Ditto. (cygwin_getpeername): Ditto. (cygwin_recv): Fix prototype. (cygwin_send): Ditto. (cygwin_recvmsg): Improve strace message. (cygwin_sendmsg): Ditto.
2002-08-12 * fhandler.h (fhandler_socket::recv): Remove method.Conrad Scott
(fhandler_socket::send): Ditto. * fhandler_socket.cc (fhandler_socket::recv): Ditto. (fhandler_socket::send): Ditto. (fhandler_socket::read): Delegate to fhandler_socket::recvfrom. (fhandler_socket::write): Delegate to fhandler_socket::sendto. (fhandler_socket::sendto): Check for null `to' address. * net.cc (cygwin_sendto): Check for zero request length. (cygwin_recvfrom): Ditto. Fix signature, use void *buf. (cygwin_recv): Delegate to cygwin_recvfrom. (cygwin_send): Delegate to cygwin_sendto.
2002-08-08 * winsup.h (__check_null_invalid_struct): Make ptr argument non-const.Conrad Scott
(__check_null_invalid_struct_errno): Ditto. * miscfuncs.cc (__check_null_invalid_struct): Ditto. (__check_null_invalid_struct_errno): Ditto. (__check_invalid_read_ptr_errno): Remove superfluous cast. * net.cc (get): Set appropriate errno if fd is not a socket. (cygwin_sendto): Fix parameter checking. (cygwin_recvfrom): Ditto. (cygwin_setsockopt): Ditto. (cygwin_getsockopt): Ditto. (cygwin_connect): Ditto. (cygwin_gethostbyaddr): Ditto. (cygwin_accept): Ditto. (cygwin_bind): Ditto. (cygwin_getsockname): Ditto. (cygwin_listen): Ditto. (cygwin_getpeername): Ditto. (cygwin_send): Ditto. (cygwin_shutdown): Ditto. Move sigframe to fhandler_socket. (cygwin_recvmsg): Fix parameter checking. Add tracing. (cygwin_sendmsg): Ditto. * fhandler_socket.cc (fhandler_socket::shutdown): Add sigframe. * resource.cc (setrlimit): Fix parameter checking.
2002-07-31 * fhandler.h (fhandler_base::get_r_no_interrupt): Make non-virtual.Corinna Vinschen
* net.cc (fdsock): Call set_r_no_interrupt.
2002-07-06 * fhandler.h (fhandler_socket::is_unconnected): Constify.Corinna Vinschen
(fhandler_socket::is_connect_pending): Ditto. (fhandler_socket::is_connected): Ditto. (fhandler_socket::set_connect_state): New method. (struct select_record): Add member `except_on_write'. (select_record::select_record): Initialize all bool values to `false'. * fhandler_socket.cc: Use set_connect_state() method throughout. (fhandler_socket::connect): Set state always to connected if connection isn't pending. * net.cc (cygwin_getsockopt): Revert erroneous previous patch. * select.cc (set_bits): Check for `except_on_write'. Set fd in write_fds if set. Set connect state to connected if fd has been returned by WINSOCK_SELECT. (peek_socket): Check for `except_on_write'. (start_thread_socket): Ditto. (fhandler_socket::select_write): Don't set `write_ready' if connect is pending. Set `except_on_write' if connect is pending.
2002-07-05 * fhandler.h (UNCONNECTED): New define.Corinna Vinschen
(CONNECT_PENDING): Ditto. (CONNECTED): Ditto. (class fhandler_socket): Add member `had_connect_or_listen'. Add member functions `is_unconnected', `is_connect_pending' and `is_connected'. * fhandler_socket.cc (fhandler_socket::connect): Set member `had_connect_or_listen' according to return code of WinSock call. (fhandler_socket::listen): Ditto. * net.cc (cygwin_getsockopt): Modify SO_ERROR return value in case of socket with pending connect(). * select.cc (peek_socket): Only add socket to matching fd_set if it's not "ready". Call WINSOCK_SELECT only if at least one socket is in one of the fd_sets. (start_thread_socket): Only add socket to matching fd_set if it's not "ready". (fhandler_socket::select_write): Set write_ready to true also if socket isn't connected or listening.
2002-07-03* net.cc (cygwin_getpeername): Defend against NULL pointer dereference.Christopher Faylor
2002-07-01* fhandler_clipboard.c (fhandler_dev_clipboard::open): Force text mode.Christopher Faylor
* fhandler_console.cc (fhandler_console::open): *Really* force binary mode rather than make it optional. * fhandler_proc.cc (fhandler_proc::open): Ditto. * fhandler_process.cc (fhandler_process::open): Ditto. * fhandler_random.cc (fhandler_dev_random::fhandler_dev_random): Ditto. * fhandler_raw.cc (fhandler_dev_raw::open): Ditto. * fhandler_registry.cc (fhandler_registry::open): Ditto. * fhandler_tty.cc (fhandler_tty_slave::open): Ditto. * fhandler_virtual.cc (fhandler_virtual::open): Ditto. * fhandler_windows.cc (fhandler_windows::open): Ditto. * fhandler_zero.cc (fhandler_dev_zero::open): Ditto. * net.cc (fdsock): Ditto. * path.cc (set_flags): Add more debugging.
2002-06-26 * fhandler.h (fhandler_socket::bind): Add method definition.Corinna Vinschen
(fhandler_socket::connect): Ditto. (fhandler_socket::listen): Ditto. (fhandler_socket::accept): Ditto. (fhandler_socket::getsockname): Ditto. (fhandler_socket::getpeername): Ditto. (fhandler_socket::recvfrom): Ditto. (fhandler_socket::recvmsg): Ditto. (fhandler_socket::sendto): Ditto. (fhandler_socket::sendmsg): Ditto. (fhandler_socket::shutdown): Ditto. * fhandler_socket.cc (get_inet_addr): Move here from net.cc. (fhandler_socket::bind): New method. (fhandler_socket::connect): Ditto. (fhandler_socket::listen): Ditto. (fhandler_socket::accept): Ditto. (fhandler_socket::getsockname): Ditto. (fhandler_socket::getpeername): Ditto. (fhandler_socket::recvfrom): Ditto. (fhandler_socket::recvmsg): Ditto. (fhandler_socket::sendto): Ditto. (fhandler_socket::sendmsg): Ditto. (fhandler_socket::shutdown): Ditto. * net.cc: Various formatting cleanups throughout. (get_inet_addr): Move to fhandler_socket.cc. (cygwin_bind): Move base functionality to appropriate fhandler_socket method. (cygwin_connect): Ditto. (cygwin_listen): Ditto. (cygwin_accept): Ditto. (cygwin_getsockname): Ditto. (cygwin_getpeername): Ditto. (cygwin_recvfrom): Ditto. (cygwin_recvmsg): Ditto. (cygwin_sendto): Ditto. (cygwin_sendmsg): Ditto. (cygwin_shutdown): Ditto.
2002-06-10* include/sys/strace.h (strace): Avoid use of constructor.Christopher Faylor
2002-06-10 * fhandler.h (fhandler_socket::fixup_after_fork): Revert patch fromCorinna Vinschen
2002-06-04. * fhandler_socket.cc (fhandler_socket::fixup_after_fork): Ditto. (fhandler_socket::dup): Ditto. * net.cc (fdsock): Make sockets explicitely noninheritable on NT.
2002-06-05Remove fcntl.h includes throughout.Christopher Faylor
* fhandler.h: Move fcntl.h include here. (fhandler_base::set_flags): Accept supplied_bin argument. Make non-inlined. * dtable.cc (dtable::init_std_file_from_handle): Just use binmode from pc. (reset_to_open_binmode): Use set_flags. * cygwin.din (open): Avoid newlib wrapper. (read): Ditto. (unlink): Ditto. (write): Ditto. * fhandler.cc (fhandler_base::set_flags): Accept supplied_bin argument. Make binmode decisions here. (fhandler_base::open): Avoid using pc if it is NULL. Eliminate binmode logic. Just call set_flags with binmode argument. (fhandler_base::init): Call set_flags with binmode argument. * fhandler_clipboard.cc (fhandler_dev_clipboard::open): Ditto. * fhandler_console.cc (fhandler_console::open): Ditto. (fhandler_console::init): Force binary on open. * fhandler_disk_file.cc (fhandler_disk_file::open): Don't set binmode here. Let it happen in base class. * fhandler_dsp.cc (fhandler_dev_dsp::open): Force binmode open. Set return value appropriately if unable to open. * fhandler_proc.cc (fhandler_proc::open): Make sure flags are set before open_status. * fhandler_process.cc (fhandler_process::open): Ditto. * fhandler_registry.cc (fhandler_registry::open): Ditto. * fhandler_random.cc (fhandler_dev_random::fhandler_dev_random): Ditto. * fhandler_raw.cc (fhandler_dev_raw::open): Force O_BINARY by default. * fhandler_serial.cc (fhandler_serial::init): Ditto. * fhandler_tty.cc (fhandler_tty_slave::open): Ditto. (fhandler_pty_master::open): Ditto. * fhandler_virtual.cc (fhandler_virtual::open): Ditto. * fhandler_windows.cc (fhandler_windows::open): Ditto. * fhandler_zero.cc (fhandler_dev_zero::open): Ditto. * net.cc (fdsock): Ditto. * path.cc (path_conv::check): Avoid checking for extension when error or directory. (set_flags): Set PATH_TEXT explicitly, when appropriate. (mount_info::conv_to_win32_path): Use set_flags() to set path flags. * path.h (PATH_TEXT): New enum. (path_conv::binmode): Return appropriate constant based on binmode. * pipe.cc (make_pipe): Set binmode to O_TEXT xor O_BINARY. * syscalls.cc (setmode_helper): Make debugging message a little clearer. (setmode): Set binmode via set_flags.
2002-05-28* autoload.cc (LoadFuncEx): Define via new LoadFuncEx2 macro.Christopher Faylor
(LoadFuncEx2): Adapted from LoadFuncEx. Provides control of return value for nonexistent function. (NtQueryObject): Declare. (IsDebuggerPresent): Declare via LoadFuncEx2 and always return true if not available. * debug.h (being_debugged): Just rely on IsDebuggerPresent return value. * dtable.cc (handle_to_fn): New function. (dtable::init_std_file_from_handle): Attempt to derive std handle's name via handle_to_fn. (dtable::build_fhandler_from_name): Fill in what we can in path_conv structure when given a handle and path doesn't exist. * fhandler.cc (fhandler_base::open): Don't set the file pointer here. Use pc->exists () to determine if file exists rather than calling GetFileAttributes again. * fhandler.h (fhandler_base::exec_state_isknown): New method. (fhandler_base::fstat_helper): Add extra arguments to declaration. (fhandler_base::fstat_by_handle): Declare new method. (fhandler_base::fstat_by_name): Declare new method. * fhandler_disk_file (num_entries): Make __stdcall. (fhandler_base::fstat_by_handle): Define new method. (fhandler_base::fstat_by_name): Define new method. (fhandler_base:fstat): Call fstat_by_{handle,name} as appropriate. (fhandler_disk_file::fstat_helper): Accept extra arguments for filling out stat structure. Move handle or name specific stuff to new methods above. (fhandler_disk_file::open): Use real_path->exists rather than calling GetFileAttributes again. * ntdll.h (FILE_NAME_INFORMATION): Define new structure. (OBJECT_INFORMATION_CLASS): Partially define new enum. (OBJECT_NAME_INFORMATION): Define new structure. (NtQueryInformationFile): New declaration. (NtQueryObject): New declaration. * path.cc (path_conv::fillin): Define new method. * path.h (path_conv::fillin): Declare new method. (path_conv::drive_thpe): Rename from 'get_drive_type'. (path_conv::volser): Declare new method. (path_conv::volname): Declare new method. (path_conv::root_dir): Declare new method. * syscalls.cc (fstat64): Send real path_conv to fstat as second argument.
2002-05-25Remove unneeded sync.h, where appropriate, throughout. Remove unneeded heap.h,Christopher Faylor
where appropriate, throughout. Remove unneeded exceptions.h, where appropriate, throughout. Remove unneeded perprocess.h, where appropriate, throughout.
2002-05-12fix formattingChristopher Faylor
2002-05-04* net.cc (getdomainname): Change second argument of getdomainname to size_t.Christopher Faylor
* fhandler_proc.cc (proc_listing): Add '.' and '..' to directory listing. (fhandler_proc::open): Change use of mode to flags. If the file does not exist already, fail with EROFS if O_CREAT flag is set. Change EROFS error to EACCES error when writing to a file. Use cmalloc to allocate memory for filebuf. (fhandler_proc::close): Use cfree to free filebuf. (fhandler_proc::get_proc_fhandler): Properly detect attempts to access unknown subdir. * fhandler_process.cc (process_listing): Add '.' and '..' to directory listing. (fhandler_process::open): Use cmalloc to allocate memory for filebuf. (fhandler_process::close): Use cfree to free filebuf. * fhandler_registry.cc (registry_listing): Add . and '..' to directory listing. (fhandler_registry::open): Move check for open for writing before open_key. Use cmalloc to allocate memory for filebuf. (fhandler_registry::close): Use cfree to free filebuf. (fhandler_registry::telldir): Use lower 16 bits of __d_position as position in directory. (fhandler_registry::seekdir): Ditto. * fhandler_virtual.cc (fhandler_virtual::write): Change EROFS error to EACCES error. (fhandler_virtual::open): Set the NOHANDLE flag. (fhandler_virtual::dup): Add call to fhandler_base::dup. Allocate child's filebuf using cmalloc. Copy filebuf from parent to child. (fhandler_virtual::close): Use cfree to free filebuf. (fhandler_virtual::~fhandler_virtual): Ditto. (from Chris Faylor <cgf@redhat.com>). (fhandler_registry::readdir): Add support for '.' and '..' files in subdirectories of /proc/registry. * path.cc (path_conv::check): Do not return ENOENT if a file is not found in /proc.
2002-04-12 * net.cc (cygwin_accept): Set socket type for accepted socket.Corinna Vinschen
(socketpair): Set socket type for both sockets. From Egor Duda <deo@logos-m.ru>: * fhandler.h (class fhandler_socket): New member to store socket type. (fhandler_socket::get_socket_type): Access it. (fhandler_socket::set_socket_type): Ditto. * net.cc (cygwin_socket): Store socket type. (cygwin_connect): Disable security checks for connectionless sockets. (cygwin_accept): Ditto.
2002-03-16* pinfo.cc (pinfo::init): Use PID_ALLPIDS flag to control when a redirectedChristopher Faylor
block should be marked as nonexistent. (winpids::add): Use PID_ALLPIDS when looking for all pids. * cygwin.h (PID_ALLPIDS): New enum element.
2002-02-22* sync.h (new_muto): Just accept an argument which denotes the name of theChristopher Faylor
muto. Use this argument to construct static storage. * cygheap.cc (cygheap_init): Reflect above change. * exceptions.cc (events_init): Ditto. * malloc.cc (malloc_init): Ditto. * path.cc (cwdstuff::init): Ditto. * cygheap.h (cwdstuff): Change name of lock element to make it less generic. * path.cc (cwdstuff::get_hash): Ditto. (cwdstuff::get_initial): Ditto. (cwdstuff::set): Ditto. (cwdstuff::get): Ditto. * sigproc.cc (proc_subproc): Ditto. * debug.cc (lock_debug): Change to method. Use method rather than macro throughout. * tty.h (tty_min::kill_pgrp): Declare new method. * fhandler_termios.cc (tty_min::kill_pgrp): New method. (fhandler_termios::line_edit): Use new method for killing process. * dcrt0.cc (do_exit): Ditto. * dtable.cc (dtable::get_debugger_info): New method for inheriting dtable info from a debugger. * tty.cc (tty_init): Attempt to grab file handle info from parent debugger, if appropriate. # dtable.cc (dtable::stdio_init): Make this a method. (dtable::init_std_file_from_handle): Don't set fd unless it's not open. (dtable::build_fhandler_from_name): Move name setting to dtable::build_fhandler. (dtable::build_fhandler): Add win32 name parameter. * dcrt0.cc (dll_crt0_1): Change to use dtable stdio_init. * dtable.h (dtable): Reflect build_fhandler parameter change. * mmap.cc (mmap_record::alloc_fh): Don't set name parameter in build_fhandler. * net.cc (fdsock): Remove set_name call since it is now handled by build_fhandler. * sigproc.cc (proc_subproc): Release muto as early as possible.
2002-02-09 * dtable.cc (dtable::dup2): Revert previous patch.Corinna Vinschen
* fhandler.h: Ditto. (fhandler_socket::recv): Define new method. (fhandler_socket::send): Ditto. * fhandler_socket.cc (fhandler_socket::recv): New method. (fhandler_socket::send): Ditto. (fhandler_socket::read): Call fhandler_socket::recv() now. (fhandler_socket::write): Call fhandler_socket::send() now. * net.cc (class wsock_event): Move definition to wsock_event.h. (fdsock): Revert previous patch. (cygwin_recv): Move implementation to fhandler_socket::recv(). (cygwin_send): Move implementation to fhandler_socket::send(). * wsock_event.h: New file.
2002-02-09 * net.cc (get_2k_ifconf): Create interface entries for tokenring cards.Corinna Vinschen
2002-02-08 * dtable.cc (dtable::dup2): Store fd for fhandler_socket.Corinna Vinschen
* fhandler.h (fhandler_base::set_fd): New virtual method. (fhandler_base::get_fd): Ditto. (fhandler_socket::set_fd): Ditto. (fhandler_socket::get_fd): Ditto. * fhandler_socket.cc (fhandler_socket::read): Call cygwin_recv instead of native Winsock recv. (fhandler_socket::write): Call cygwin_send instead of native Winsock send. * net.cc (fdsock): Store fd in fhandler_socket.
2002-02-07 * net.cc (cygwin_getsockname): Fix handling of NULL sun_path.Corinna Vinschen
2002-01-29 * net.cc (getdomainname): Fix registry key for 9x systems, too.Corinna Vinschen
2002-01-29 * net.cc (getdomainname): Fix registry key for NT systems.Corinna Vinschen
2002-01-21Add newline at EOF.Christopher Faylor
2002-01-19 * cygwin.din: Add recvmsg and sendmsg.Corinna Vinschen
* net.cc: Add cygwin_recvmsg and cygwin_sendmsg. * /usr/include/sys/socket.h: Add recvmsg and sendmsg.
2002-01-09 * net.cc (cygwin_accept): Set sun_path for newly connected socket.Corinna Vinschen
2002-01-04 * net.cc: Replace usage of AF_UNIX by Posix compliant AF_LOCALCorinna Vinschen
throughout. (socketpair): Explicitly allow SOCK_STREAM and SOCK_DGRAM socket types in families AF_UNIX and AF_LOCAL. Explicitly allow PF_UNSPEC, PF_LOCAL and PF_INET protocols. Return error otherwise. Implement datagram socketpairs.
2002-01-01 * fhandler.h (fhandler_socket::sun_path): New private member.Corinna Vinschen
(fhandler_socket::set_sun_path): New method. (fhandler_socket::get_sun_path): Ditto. * fhandler_socket.cc (fhandler_socket::fhandler_socket): Initialize sun_path to NULL. (fhandler_socket::~fhandler_socket): Free sun_path if needed. (fhandler_socket::set_sun_path): New method. * net.cc (cygwin_bind): Set sun_path to path of local socket file. (cygwin_getsockname): Add code to return correct sockaddr for unix domain sockets.
2001-12-05* net.cc (cygwin_getsockopt): Dereference optlen pointer when passing toChristopher Faylor
__check_null_invalid_struct_errno.
2001-12-03* net.cc (cygwin_getsockopt): Allow NULL optval.Christopher Faylor
* path.cc (mount_info::read_cygdrive_info_from_registry): Don't write cygdrive to registry if it doesn't exist.
2001-11-25 * net.cc (cygwin_hstrerror): Allow s == NULL.Corinna Vinschen
(cygwin_rcmd): Add parameter checking. (cygwin_rexec): Ditto.
2001-11-25 * net.cc (cygwin_inet_ntoa): Add parameter checking.Corinna Vinschen
(cygwin_inet_network): Return INADDR_NONE instead of 0 in case of EFAULT. (cygwin_hstrerror): Add parameter checking. (cygwin_rresvport): Ditto. (socketpair): Ditto. * winsup.h (check_null_str): Add extern declaration.
2001-11-24* net.cc (inet_makeaddr): Revert previous change.Christopher Faylor
2001-11-24* dtable.cc (dtable::vfork_parent_restore): Add debugging statement.Christopher Faylor
* exceptions.cc (try_to_debug): Spin only as long as we don't have a debugger attached. * fhandler.h (fhandler_base::set_nohandle): New method. (fhandler_base::get_nohandle): New method. * fhandler.cc (fhandler_base::dup): Avoid duplicating handle if there is no handle. * fhandler_disk_file.cc (fhandler_disk_file::opendir): Set nohandle flag on dummy fd. * Makefile.in: Make intermediate library for eventual inclusion in libcygwin.a * fhandler.h (fhandler_pipe::fhandler_pipe): Remove default argument setting since it is no longer used. * miscfuncs.cc (check_null_str): New function. (+check_null_str_errno): Ditto. * net.cc: Add defensive buffer checking throughout. (cygwin_sendto): Protect against invalid fd. (cygwin_recvfrom): Ditto. (cygwin_getpeername): Ditto. (cygwin_recv): Ditto. (cygwin_send): Ditto. * winsup.h: Declare a new function. * select.cc (set_bits): Fix conditional for setting fd in exceptfds. * dtable.cc (dtable::build_fhandler): Create fhandler_pipe using correct device type. * path.cc (get_devn): Set correct pipe device type from device name.
2001-11-10* dtable.cc (dtable::build_fhandler): Don't increment console fd count if newChristopher Faylor
operation fails. Increment fork_fixup field here. (dtable::dup2): Don't increment fork_fixup field here. (fdsock): Ditto.
2001-11-05Eliminate excess whitespace.Christopher Faylor
2001-10-22 * net.cc (get_2k_ifconf): Change multiple IP address naming schemeCorinna Vinschen
to Linux style. Patch by Alexander Gottwald <ago@informatik.tu-chemnitz.de>: * net.cc (get_2k_ifconf): Added support for multiple IP addresses on one interface.
2001-10-16* fhandler.cc (fhandler_base::fork_fixup): Don't protect handle.Christopher Faylor
* dlfcn.cc: Fix to confirm to coding standards. Reorganize includes throughout to accomodate new cygheap.h usage. * cygheap.h (cygheap_fdmanip): New class: simplifies locking and retrieval of fds from cygheap->fdtab. (cygheap_fdget): Ditto. (cygheap_fdnew): Ditto. * fcntl.cc (_fcntl): Use new method to lock fdtab and retrieve info. * ioctl.cc (ioctl): Ditto. * mmap.cc (mmap): Ditto. * net.cc: Ditto, throughout. * passwd.cc (getpass): Ditto. * path.cc (fchdir): Ditto. * pipe.cc (make_pipe): Ditto. * sec_acl.cc (facl): Ditto. * syscalls.cc: Ditto, throughout. * termios.cc: Ditto, throughout.
2001-10-14* autoload.cc (load_wsock32): Declare dummy function to force loading ofChristopher Faylor
winsock. * fhandler.cc (fhandler_base::set_inheritance): Make debugging output more verbose. * fhandler_socket.cc (fhandler_socket::fixup_after_fork): Force loading of winsock32 if winsock2 not available. * net.cc (set_socket_inheritance): Use DuplicateHandle in all cases to set inheritance correctly. (fdsock): Use winsock2_active macro to determine when to set socket inheritance. Remove fdtab resource locking since this function should already be protected. (cygwin_accept): Simplify logic. Ensure that fdtab unlock is not called inappropriately. (cygwin_rcmd): Use fdtab locking. (cygwin_rresvport): Ditto. (cygwin_rexec): Ditto. * select.cc (peek_socket): Set errno appropriately if winsock select fails. * winsup.h: Declare check_pty_fds. * syscalls.cc (check_pty_fds): Rename from check_ttys_fds. Also check pty master. (setsid): Use check_pty_fds. * dtable.cc (dtable::dec_console_fds): Add check on pty fds.
2001-10-13* fhandler_dsp.cc (fhandler_dsp::ioctl): Return 0 for successfulChristopher Faylor
SNDCTL_DSP_GETBLKSIZE operation. Remove obsolete 'name' arg from fhandler_* constructors throughout. * winsup.h (winsock_active): New macro. (winsock2_active): Ditto. * autoload.cc (wsock_init): Use new macros to decide if winsock or winsock2 is loaded. (nonexist_wsock32): Dummy function to force winsock load. (nonexist_ws2_32): Dummy function to force winsock2 load. * fhandler.h (fhandler_socket::fstat): Declare new method. Currently unused. * fhandler_socket.cc (fhandler_socket::fixup_before_fork_exec): Check that winsock2 is active before trying WSADuplicateSocketA. (fhandler_socket::fixup_after_fork): Add extra check for winsock2_active. Otherwise use iffy procedures for Windows 95. (fhandler_socket::fixup_after_exec): Add debugging. (fhandler_socket::dup): Add debugging. (fhandler_socket::fstat): New method. (fhandler_socket::set_close_on_exec): Attempt to perform iffy stuff on Windows 95. * errno.cc (_sys_nerr): Work around compiler strangeness. * pinfo.cc (winpids::add): Add extra element at end of allocated array for setting to NULL. (winpids::enumNT): Ditto. (winpids::init): Don't modify pidlist if it hasn't been allocated (possibly due to malloc problem).
2001-10-13* autoload.cc (wsock_init): Reorganize slightly to accomodate a new compiler.Christopher Faylor
2001-10-11* net.cc (cygwin_sendto): Use correct socket address when sendingEgor Duda
data to AF_UNIX socket.
2001-10-10 * net.cc (get_95_ifconf): Using other registry values pointing toCorinna Vinschen
correct networkdevice identification for Windows95.
2001-09-16* net.cc (dup_servent_ptr): Detect old Windows 95 misaligned structure andChristopher Faylor
realign appropriately.
2001-09-12 * Makefile.in: Build wincap.o.Corinna Vinschen
* wincap.cc: New file. * wincap.h: Ditto. * autoload.cc: Add dynamic load statement for `CreateHardLinkA'. * dcrt0.cc (os_being_run): Eliminated. (osname): Ditto. (iswinnt): Ditto. (set_os_type): Ditto. (dll_crt0_1): Call wincap.init() instead of set_os_type(). (_dll_crt0): Ditto. * environ.cc (set_chunksize): New function. (parse_thing): `forkchunk' setting now invokes function `set_chunksize'. * fork.cc (chunksize): Eliminated. Moved to be member of wincap. * host_dependent.h: Removed. * syscalls.cc (_link): Try using `CreateHardLinkA' first, if available. * cygheap.cc, dcrt0.cc, delqueue.cc, dir.cc, environ.cc, fhandler.cc, fhandler.h, fhandler_console.cc, fhandler_mem.cc, fork.cc, mmap.cc, net.cc, pinfo.cc, pinfo.h, security.cc, syscalls.cc, sysconf.cc, syslog.cc, thread.cc, times.cc, tty.cc, uinfo.cc, uname.cc, winsup.h: Use new wincap capability check throughout. * winsup.h: Include wincap.h. Eliminate extern declarations of `os_being_run' and `iswinnt'. Eliminate `os_type" definition. * include/cygwin/version.h: Bump version to 1.3.4.