aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin
AgeCommit message (Collapse)AuthorFilesLines
2007-07-14* init.cc (in_dllentry): Make NO_COPY to avoid spurious false positives.Christopher Faylor2-1/+6
2007-07-10* debug.cc (close_handle): Change debug output format slightly.Christopher Faylor5-11/+22
* dlfcn.cc (dlclose): Don't close handle returned from GetModuleHandle(NULL). * fhandler.h (fhandler_pipe::create): Remove obsolete argument. (fhandler_pipe::create): Ditto. * fhandler.cc (fhandler_pipe::create): Ditto. (fhandler_pipe::create): Ditto.
2007-07-10* cygwin/strsig.cc (__signals): New macro.Christopher Faylor4-36/+61
(sys_sigabbrev): New array of signal strings, patterned after linux. (siglist): Use __signals. * cygwin/include/cygwin/signal.h (sys_sigabbrev): Define. * cygwin/include/cygwin/version.h: Bump API minor version to 177. * utils/Makefile.in (kill.exe): Remove reliance on libiberty. * utils/kill.cc (strsigno): New function patterned after libiberty but using newly exported cygwin array.
2007-07-09 * dir.cc (closedir): Revert change from 2007-06-29.Corinna Vinschen5-82/+83
* fhandler.h (dirent_valid_fd): Drop. * fhandler_disk_file.cc (fhandler_disk_file::opendir): If opening a real dir, use the underlying fhandler to keep track of the directory handle. In fdopendir case use original io_handle from fhandler. Use fhandler's io_handle in subsequent directory functions throughout. Create handle non-inheritable and set close-on-exec flag. (readdir_get_ino): Drop dirent_isroot case. (fhandler_disk_file::readdir): Handle dirent_isroot case here. (fhandler_disk_file::rewinddir): Revert change from 2007-07-05. Use NtClose instead of CloseHandle. * fhandler_virtual.cc (fhandler_virtual::opendir): Drop adding dirent_valid_fd flag. Set close-on-exec flag.
2007-07-08* Makefile.in (DLL_OFILES): Add newly-imported random.o. Eliminate reliance onChristopher Faylor4-30/+41
libiberty. * random.cc: Import from FreeBSD. Modify for Cygwin environment. * include/cygwin/stdlib.h (random): Reflect change in return value to be more linux/freebsd-like. (srandom): Ditto.
2007-07-08Add initial FreeBSD version of random.cChristopher Faylor1-0/+502
2007-07-07update copyrightChristopher Faylor1-1/+1
2007-07-07* fhandler.h (fhandler_base::write): Remove __stdcall decoration.Christopher Faylor2-3/+9
(fhandler_pipe::write): Ditto. (fhandler_fifo::write): Ditto.
2007-07-07Preliminary change to make fifos/pipes interruptible and fifos reliable.Christopher Faylor10-504/+305
* dtable.cc (dtable::find_fifo): Eliminate definition. * dtable.h (dtable::find_fifo): Ditto for declaration. * fhandler.cc (fhandler_base::raw_read): Remove pipe-specific stuff. (fhandler_base::fhandler_base): Ditto. (fhandler_base::close): Handle overlapped I/O structure if appropriate. (fhandler_base::dup): Ditto. (fhandler_base::fork_fixup): Ditto. (fhandler_base::setup_overlapped): Define new function. (fhandler_base::destroy_overlapped): Ditto. (fhandler_base::wait_overlapped): Ditto. (fhandler_base::read_overlapped): Ditto. (fhandler_base::write_overlapped): Ditto. * fhandler.h (fhandler_base::get_overlapped): Declare new function. (fhandler_base::setup_overlapped): Ditto. (fhandler_base::destroy_overlapped): Ditto. (fhandler_base::wait_overlapped): Ditto. (fhandler_base::read_overlapped): Ditto. (fhandler_base::write_overlapped): Ditto. (fhandler_base::get_guard): Eliminate. (fhandler_pipe::*): Rework to eliminate most Win9x related cruft, removing many variables and defining a new overlapped capability. (fhandler_fifo::*): Ditto. (fifo_state): Declare new enum. * fhandler_fifo.cc (fhandler_fifo::fhandler_fifo): Remove old Win9x stuff. Initialize overlapped handle to NULL. (fhandler_fifo::set_use): Eliminate. (fhandler_fifo::open_nonserver): Define. (fhandler_fifo::open): Rework to use named pipes and overlapped I/O. (fhandler_fifo::wait): Define new function to wait for named pipe connection. (fhandler_fifo::read): Rework to use wait() and new overlapped I/O functionality. (fhandler_fifo::write): Ditto. (fhandler_fifo::dup): Eliminate. * pinfo.cc (commune_process): Remove fifo handling. (_pinfo::commune_request): Ditto. * pinfo.h (picom): Ditto. * pipe.cc (fhandler_pipe::fhandler_pipe): Remove Win9x stuff. Initialize overlapped handle to NULL. (fhandler_pipe::open): Eliminate Win9x stuff. (fhandler_pipe::set_close_on_exec): Eliminate. (read_pipe): Eliminate. (fhandler_pipe::close): Ditto. (fhandler_pipe::fixup_after_exec): Ditto. (fhandler_pipe::fixup_in_child): Ditto. (fhandler_pipe::read): Rework to use overlapped I/O. (fhandler_pipe::write): New function using overlapped I/O. (fhandler_pipe::dup): Rework to eliminate Win9x stuff. (fhandler_pipe::create_selectable): Rework to eliminate Win9x and use overlapped I/O. * select.cc (peek_pipe): Rework to eliminate Win9x stuff and use overlapped I/O. (fhandler_base::ready_for_read): Ditto.
2007-07-07* path.cc (symlink_info::check_shortcut): Handle device "symlinks" specially -Christopher Faylor2-2/+11
don't posixify them.
2007-07-07* fhandler_disk_file.cc: White space.Christopher Faylor4-24/+30
* fhandler_proc.cc: Ditto. * fhandler_virtual.cc: Ditto.
2007-07-07* fork.cc: White space.Christopher Faylor4-36/+42
* net.cc: Ditto. * posix_ipc.cc: Ditto.
2007-07-06 * times.cc (gettimeofday): Align definition to POSIX.Corinna Vinschen2-1/+6
2007-07-06 * cygwin.din: Export wcstol, wcstoll, wcstoul, wcstoull, wcsxfrm.Corinna Vinschen3-1/+12
* include/cygwin/version.h: Bump API minor number.
2007-07-05 * fhandler_disk_file.cc (fhandler_disk_file::opendir): Add missingCorinna Vinschen2-2/+10
OBJ_INHERIT flag when creating OBJECT_ATTRIBUTES. (fhandler_disk_file::rewinddir): Ditto.
2007-07-05 Check in missing cygwin.din change from 2007-06-29.Corinna Vinschen1-0/+1
2007-07-04 * times.cc: Define __timezonefunc__ before including time.h to protectCorinna Vinschen2-0/+6
definition of timezone function.
2007-07-04 * include/cygwin/time.h: Switch to timezone variable by default. AddCorinna Vinschen2-1/+8
comment.
2007-06-29 * cygwin.din: Export fdopendir.Corinna Vinschen11-61/+127
* dir.cc (opendir): Call fhandler's opendir with fd set to -1. (fdopendir): New function. (seekdir64): Use dirent_info_mask. (rewinddir): Ditto. (closedir): Only release underlying file descriptor if it has been reserved by opendir itself. * fhandler.cc (fhandler_base::opendir): Accommodate new parameter. * fhandler.h (dirent_states): Add dirent_valid_fd and dirent_info_mask. (fhander_XXX::opendir): Add file descriptor parameter. Use regparms. (fhandler_procnet::opendir): Drop declaration. * fhandler_disk_file.cc (fhandler_disk_file::opendir): Ditto. If called from fdopendir, use existing handle to re-open directory with valid flags. Rename fd to cfd. Use only if no valid incoming fd. (fhandler_cygdrive::opendir): Accommodate new parameter. * fhandler_process.cc (fhandler_process::opendir): Ditto. * fhandler_procnet.cc (fhandler_procnet::opendir): Drop definition. * fhandler_virtual.cc (fhandler_virtual::opendir): Accommodate new parameter. Only create new file descriptor entry if called from opendir. Remove duplicated setting of dir->__flags. * posix.sgml: Add fdopendir to list of implemented Solaris functions. * include/cygwin/version.h: Bump API minor number. * include/sys/dirent.h: Declare fdopendir.
2007-06-28 * include/cygwin/version.h: Fix comment typo.Brian Dessent2-1/+5
2007-06-28 * cygwin.din: Export stpcpy, stpncpy.Corinna Vinschen4-1/+13
* posix.sgml: Add stpcpy and stpncpy to list of implemented GNU extensions. * include/cygwin/version.h: Bump API minor number.
2007-06-27 * shared_info.h (SHARED_INFO_CB): Accommodate change to shared_info.Corinna Vinschen3-8/+15
(CURR_SHARED_MAGIC): Ditto. (class shared_info): Add heap_slop_inited member. * shared.cc (shared_info::heap_slop_size): Use heap_slop_inited to track initializing heap_slop since 0 is a valid value for heap_slop. Drop useless < 0 consideration.
2007-06-27 * assert.cc (__assert_func): New function, to match newlib headerEric Blake4-7/+25
change. * cygwin.din: Export __assert_func. * include/cygwin/version.h: Bump API minor number.
2007-06-21 * autoload.cc (WSAIoctl): Remove.Corinna Vinschen10-452/+644
* cygwin.din: Export freeifaddrs, getifaddrs. * fhandler_socket.cc (fhandler_socket::ioctl): Drop SOCKET parameter from get_ifconf. * net.cc: Include ifaddrs.h. (in_are_prefix_equal): Match addresses in network byte order. (ip_addr_prefix): Convert address into host byte order before testing with IN_LOOPBACK. (struct ifall): Define. (get_xp_ifs): Replace get_xp_ifconf. Return struct ifall array. (get_2k_ifs): Ditto, replace get_2k_ifconf. (get_nt_ifs): Ditto, replace get_nt_ifconf. (getifaddrs): New function. (freeifaddrs): New function. (get_ifconf): Call matching get_XX_ifs function and create ifc content from here. Drop lo fake since it's now in get_nt_ifs. * posix.sgml: Add freeifaddrs and getifaddrs to list of implemented BSD functions. * wincap.h (wincapc::has_broken_if_oper_status): New element. * wincap.cc: Implement above element throughout. * include/ifaddrs.h: New file. * include/cygwin/version.h: Bump API minor number.
2007-06-21 * cygwin.din: Export exp10, exp10f, pow10, pow10f, strcasestr,Corinna Vinschen4-13/+45
funopen, fopencookie. * include/cygwin/version.h: Bump API minor number. * posix.sgml: Minor improvements.
2007-06-20 * include/cygwin/if.h (IFF_POINTOPOINT): Fix typo.Corinna Vinschen2-1/+5
2007-06-17* include/search.h: Reinstate node_t definition.Christopher Faylor3-23/+16
* include/sys/cdefs.h: Remove in favor of newlib version.
2007-06-14 * autoload.cc (GetIpForwardTable): Define.Corinna Vinschen7-9/+75
* fhandler_socket.cc (fhandler_socket::ioctl): Handle SIOCGIFDSTADDR. * net.cc (get_routedst): New static function to get destination address of point-to-point interfaces. (get_xp_ifconf): Handle SIOCGIFDSTADDR. (get_2k_ifconf): Ditto. (get_nt_ifconf): Ditto. (get_ifconf): Ditto. * include/asm/socket.h (SIOCGIFDSTADDR): Define. * include/cygwin/if.h (struct ifreq): Add ifru_dstaddr member. (ifr_dstaddr): Define. * include/cygwin/in.h: Cast ipv4 addresses correctly to in_addr_t in definitions.
2007-06-12* signal.cc (usleep): Use useconds_t for the type as per POSIX.Christopher Faylor2-1/+5
2007-06-12 * Makefile.in (DLL_OFILES): Add xsique.o.Corinna Vinschen9-65/+80
* cygwin.din (confstr): Make NOSIGFE. (insque): Export. (remque): Export. * lsearch.cc: Remove superfluous _SEARCH_PRIVATE define. * posix.sgml: Move insque to defined SUSv3 interfaces. Remove comment for remque. * include/search.h: Remove _SEARCH_PRIVATE guarded definitions. Add struct qelem definition. Add insque and remque declarations. * include/cygwin/version.h: Bump API minor number. * include/sys/queue.h: Remove insque/remque definitions so as not to collide with SUSv3 compatible declaration in search.h. * libc/xsique.cc: New file implementing insque and remque.
2007-06-12 * fhandler.cc (fhandler_base::fstat): Set pipe permission bits moreCorinna Vinschen2-3/+8
correctly.
2007-06-11 * cygwin.din (confstr): Export.Corinna Vinschen5-2/+59
* posix.sgml (confstr): Move to list of implemented SUSv3 functions. * sysconf.cc (confstr): Implement. * include/cygwin/version.h: Bump API minor number.
2007-06-05 * ansi.sgml: Delete.Corinna Vinschen4-201/+1271
* misc-std.sgml: Delete. * posix.sgml: Rework entirely.
2007-05-29 * dtable.cc (dtable::set_file_pointers_for_exec): Call SetFilePointerCorinna Vinschen5-13/+34
correctly for 64 bit file access. Comment out functionality. * fhandler.cc (fhandler_base::open): Don't set append_mode. (fhandler_base::write): Check for O_APPEND instead of append_mode. Call SetFilePointer correctly for 64 bit file access. Handle errors from SetFilePointer. * fhandler.h (class fhandler_base): Drop append_mode status flag. * fhandler_disk_file.cc (fhandler_base::fstat_helper): Handle seeking correctly for 64 bit file access.
2007-05-22 * path.cc (cwdstuff::set): Revert useless acquire check.Corinna Vinschen2-2/+5
2007-05-22 * path.cc (cwdstuff::set): Avoid double aquiring of cwd_lock.Corinna Vinschen2-2/+8
Open directory with inheriting enabled.
2007-05-22 * fhandler_floppy.cc (fhandler_dev_floppy::lseek): Don't invalidateCorinna Vinschen2-1/+20
devbuf if new position is within buffered range.
2007-05-21 * include/search.h (hsearch_r): Provide declaration.Corinna Vinschen2-0/+5
2007-05-21 * fhandler_floppy.cc (fhandler_dev_floppy::lseek): Set buf size toCorinna Vinschen2-4/+13
sector size. Simplify non-sector aligned case. Handle errors from raw_read.
2007-05-15 * fhandler_socket.cc (adjust_socket_file_mode): New inline function.Corinna Vinschen2-4/+24
(fhandler_socket::fchmod): Squeeze mode through adjust_socket_file_mode before using it. (fhandler_socket::bind): Ditto.
2007-05-15* path.cc (fs_info::update): Set and use is_cdrom.Christopher Faylor3-14/+54
* path.cc (fillout_mntent): Set ret.mnt_type to something more Linux-like, based on data from fs_info. Move "system" and "user" strings from mnt_type to mnt_opts. * path.h (struct fs_info): Add is_cdrom field. * path.h (fs_info::clear): Initialize is_cdrom. * path.h (struct fs_info): Add IMPLEMENT_STATUS_FLAG(bool,is_cdrom). * path.h (class path_conv): Add fs_is_cdrom method. Add missing fs_is_netapp method.
2007-05-15* cygwin.din (asnprintf, dprint, _Exit, vasnprintf, vdprintf): Export.Christopher Faylor3-1/+12
* include/cygwin/version.h: Bump API minor number.
2007-04-27* include/cygwin/time.h: Use __cdecl on declaration. RemoveChristopher Faylor1-7/+6
declarations which are duplicated in include/time.h.
2007-04-18 * cygwin.sc: Remove duplicated .debug_macinfo section.Brian Dessent3-2/+9
* dllfixdbg: Also copy DWARF-2 sections into .dbg file.
2007-04-06 * include/stdint.h (WINT_MIN): Fix sign.Corinna Vinschen2-1/+5
2007-04-04 * include/stdint.h (WINT_MIN, WINT_MAX): Fix definition.Corinna Vinschen2-3/+7
2007-03-30* cygwin/external.cc (cygwin_internal): Implement CW_SET_DOS_FILE_WARNING.Christopher Faylor3-1/+14
* cygwin/include/sys/cygwin.h: Define CW_SET_DOS_FILE_WARNING. * utils/mount.cc (main): Turn dos file warnings off since we know what we're doing.
2007-03-29 * cygheap.cc (cygheap_init): Fix formatting. Remove comment. SetCorinna Vinschen11-58/+111
shared_prefix depending only on terminal service capability. * dcrt0.cc (dll_crt0_1): Don't call set_cygwin_privileges here. * fhandler_fifo.cc (fhandler_fifo::open): Create the mutex as global object. * posix_ipc.cc (ipc_mutex_init): Use cygheap->shared_prefix. (ipc_cond_init): Ditto. * sec_helper.cc (privilege_name): Make static. Use LookupPrivilegeName directly to be independent of the state of cygheap. (set_privilege): Take a LUID as parameter instead of an index value. Only print debug output in case of failure. (set_cygwin_privileges): Add comment. Use LookupPrivilegeValue to get privilege LUIDs. (init_global_security): Call set_cygwin_privileges here. * security.h (privilege_name): Drop declaration. (set_privilege): Declare according to above change. (set_process_privilege): Call privilege_luid to get LUID. (_push_thread_privilege): Ditto. * shared.cc (open_shared): Add comment. On systems supporting the SeCreateGlobalPrivilege, try to create/open global shared memory first. Fall back to local shared memory if that fails. * thread.cc (semaphore::semaphore): Use cygheap->shared_prefix. * wincap.h (wincapc::has_create_global_privilege): New element. * wincap.cc: Implement above element throughout.
2007-03-28* spawn.cc (spawn_guts): Start pure-windows processes in a suspended state toChristopher Faylor2-6/+9
avoid potential DuplicateHandle problems.
2007-03-13 Fix typo.Corinna Vinschen1-1/+1