summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin
Commit message (Collapse)AuthorAgeFilesLines
* * cygwin.din: Export gethostbyname2.Corinna Vinschen2009-03-066-24/+384
| | | | | | | | | | | | | | | | * net.cc: define _CYGWIN_IN_H and include resolv.h. (realloc_ent): New function. (dup_ent): Call realloc_ent. (memcpy4to6): New function. (dn_length1): New function. (gethostby_helper): New function. (gethostbyname2): New function. * posix.sgml: Add gethostbyname2. * include/cygwin/version.h: Bump API minor number. * libc/minires.c (get_options): Look for "inet6" and apply bounds to "retry" and "retrans". (res_ninit): Set the default options at the beginning. (dn_expand): Fix "off by one".
* * cygwin.din: Export wprintf, fwprintf, swprintf, vwprintf, vfwprintf,Corinna Vinschen2009-03-064-17/+32
| | | | | | | vswprintf. Sort. * posix.sgml: Move fwprintf, swprintf, vwprintf, vfwprintf, vswprintf to SUSv4 list. Sort SUSv4 list. * include/cygwin/version.h: Bump API minor number.
* * dcrt0.cc (disable_dep): Disable. Explain why.Corinna Vinschen2009-03-042-3/+15
| | | | (dll_crt0_0): Disable calling disable_dep. Explain why.
* * net.cc: Include asm/byteorder.h.Corinna Vinschen2009-03-033-35/+50
| | | | | | | | | (htonl): Move to end of file. Add comment to explain why. Align definition to POSIX. Use related macro from asm/byteorder.h. (ntohl): Ditto. (htons): Ditto. (ntohs): Ditto. * include/asm/byteorder.h: Revert previous patch.
* * include/asm/byteorder.h: Disable optimization when buildingCorinna Vinschen2009-03-032-2/+8
| | | | Cygwin network code.
* * dtable.cc (dtable::select_read): Add ability to override fh.Christopher Faylor2009-02-275-9/+78
| | | | | | | | | | | * fhandler.h (fhandler_fifo::select_read): Declare new function. (fhandler_fifo::select_write): Ditto. (fhandler_fifo::select_except): Ditto. * select.cc (peek_pipe): Treat certain classes of pipe errors as "no data". (fhandler_fifo::select_read): Define new function. (fhandler_fifo::select_write): Ditto. (fhandler_fifo::select_except): Ditto. * shared_info.h (CURR_SHARED_MAGIC): Update.
* Add DESTDIR functionality to Makefile.in's.Christopher Faylor2009-02-243-13/+17
|
* * sec_auth.cc (get_user_local_groups): Simplify LookupAccountName code.Corinna Vinschen2009-02-232-13/+24
|
* * autoload.cc (NetLocalGroupEnum): Remove.Corinna Vinschen2009-02-203-79/+46
| | | | | | | | | | | (NetLocalGroupGetMembers): Remove. (NetUserGetLocalGroups): Add. * sec_auth.cc (is_group_member): Remove function. (get_user_local_groups): Get user as string instead of as SID. Call NetUserGetLocalGroups instead of NetLocalGroupEnum. Drop call to is_group_member. (get_server_groups): Call get_user_local_groups with user name instead of user SID.
* * winver.rc: Fix Copyright date.Corinna Vinschen2009-02-192-1/+5
|
* * cygwin.din: Export mbsnrtowcs and wcsnrtombs.Corinna Vinschen2009-02-194-3/+12
| | | | | * posix.sgml: Move mbsnrtowcs and wcsnrtombs to SUSv4 section. * include/cygwin/version.h: Bump API minor number.
* * cygwin.din: Export open_wmemstream.Corinna Vinschen2009-02-184-2/+10
| | | | | * posix.sgml: Move open_wmemstream to SUSv4 section. * include/cygwin/version.h: Bump API minor number.
* * cygwin.din: Export reallocf.Corinna Vinschen2009-02-166-2/+23
| | | | | | | * malloc_wrapper.cc( reallocf): New function. * posix.sgml: Add reallocf to BSD section. * include/cygwin/version.h: Bump API minor number. * libc/fts.c: Remove erroneous reallocf definition.
* * cygwin.din: Export wcstoimax, wcstoumax.Corinna Vinschen2009-02-165-8/+17
| | | | | | * posix.sgml: Move wcstoimax and wcstoumax to SUSv4 section. * include/inttypes.h: Declare wcstoimax and wcstoumax. * include/cygwin/version.h: Bump API minor number.
* * cygwin.din: Export wcsnlen.Corinna Vinschen2009-02-134-2/+10
| | | | | * posix.sgml: Move wcsnlen to SUSv4 section. * include/cygwin/version.h: Bump API minor number.
* * environ.cc (_getenv_r): New function.Corinna Vinschen2009-02-132-0/+13
|
* * posix.sgml: Move dirfd to SUSv4 section.Corinna Vinschen2009-02-132-1/+5
|
* * posix.sgml: Move interfaces deprecated in SUSv4 to deprecatedCorinna Vinschen2009-02-132-46/+101
| | | | | | interfaces section. Move interfaces added in SUSv4 to SUSv4 section or, if unimplemented, add them to the unimplemented interfaces section.
* * posix.sgml: Merge SUSv3 and SUSv4 section into a single SUSv4 section.Corinna Vinschen2009-02-132-29/+32
| | | | | | Move Solaris calls now in SUSv4 to SUSv4 section. Rename unimplemented section to refer to SUSv4. Add note about missing interfaces. Move wcstod and wcstof from unimplemented to SUSv4 section.
* * mount.cc (mount_info::from_fstab_line): Make cygdrive posix=0 byCorinna Vinschen2009-02-132-0/+7
| | | | default as documented.
* * cygwin.din: Export wcstod and wcstof.Corinna Vinschen2009-02-133-1/+9
| | | | * include/cygwin/version.h: Bump API minor number.
* * syscalls.cc (open): Handle O_DIRECTORY flag.Corinna Vinschen2009-02-114-2/+20
| | | | | * include/fcntl.h: Add SUSv4 flags O_DIRECTORY, O_EXEC and O_SEARCH. * include/cygwin/version.h: Bump API minor number.
* * fhandler_floppy.cc (fhandler_dev_floppy::open): Fix format. AddCorinna Vinschen2009-02-093-6/+50
| | | | | | | | | code to allow to read disk and CD/DVD devices in full length. Explain why. (fhandler_dev_floppy::raw_read): Add current position to debug output. * include/sys/sched.h: New stub file to override newlib file with clashing definitions.
* * cygwin.din: Export wcstok.Corinna Vinschen2009-02-054-2/+10
| | | | | * posix.sgml: Move wcstok from unimplemented to susv3. * include/cygwin/version.h: Bump API minor number.
* * fhandler_proc.cc (proc_tab): Add entry for mounts symlink.Corinna Vinschen2009-02-043-0/+82
| | | | | | (format_proc_mounts): New function to implement mounts symlink. * fhandler_process.cc (process_tab): Add entry for mounts file. (format_process_mounts): New function to implement mounts file.
* * security.cc (alloc_sd): Disable generating default permission entriesCorinna Vinschen2009-02-042-0/+12
| | | | for directories.
* * fhandler_disk_file.cc (fhandler_disk_file::readdir): Fix inode numberCorinna Vinschen2009-01-297-3/+73
| | | | | | | | | | | | | | evaluation for faked "." entry. * mount.cc (fs_info::update): Move setting of is_cdrom after checking for caseinsensitivity. Recognize UDF in is_cdrom case and set caseinsensitive flag according to UDF brokenness determined by OS. Add comment to explain why. * mount.h (class fs_info): Add is_udf status flag. * path.cc (symlink_info::check): Add workaround for UDF bug in terms of casesensitivity on certain OSes. * wincap.h (wincaps::has_broken_udf): New element. (wincaps::has_broken_udf): New element
* * fhandler.cc (fhandler_base::wait_overlapped): Set bytes to -1 on EINTR orChristopher Faylor2009-01-273-4/+15
| | | | | | | | real error. (fhandler_base::write_overlapped): Assume that bytes_written will contain proper error value. * pipe.cc (fhandler_pipe::fhandler_pipe): Set uninterruptible_io since signals are handled by pipe functions now.
* * shared.cc (shared_name): New function for WCHAR names.Corinna Vinschen2009-01-264-16/+34
| | | | | | | | (open_shared): Take name parameter as WCHAR. Accommodate throughout. * shared_info.h ((CURR_SHARED_MAGIC): Redefine. (shared_name): Add declaration for function taking a WCHAR name. (open_shared): Change declaration according to above change. * pinfo.cc (pinfo::init) : Accommodate above change.
* * grp.cc (getgrgid_r): Simplify code by using stpcpy.Corinna Vinschen2009-01-263-52/+35
| | | | | | (getgrnam_r): Ditto. * passwd.cc (getpwuid_r32): Simplify code by using stpcpy. (getpwnam_r): Ditto.
* * uinfo.cc (pwdgrp::load): Open file with FILE_OPEN_FOR_BACKUP_INTENTCorinna Vinschen2009-01-262-1/+8
| | | | flag.
* * mount.cc (mount_info::from_fstab): Open fstab file withCorinna Vinschen2009-01-242-1/+8
| | | | FILE_OPEN_FOR_BACKUP_INTENT flag.
* * smallprint.cc (__small_vsprintf): Use already available buffer tmpCorinna Vinschen2009-01-232-8/+10
| | | | in wfillin case.
* * select.cc (peek_serial): Add hack to allow proper operation with com0comChristopher Faylor2009-01-222-0/+9
| | | | driver.
* ChangeLog:Corinna Vinschen2009-01-2112-1430/+1504
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.in: Remove --enable-server option. Allways add the cygserver directory to $SUBDIRS. * configure: Regenerate. cygwin/ChangeLog: Remove USE_SERVER define. Accommodate throughout. * configure.in: Remove --enable-server option. * configure: Regenerate. * environ.cc: Remove CYGWIN=server setting. cygserver/ChangeLog: * client.cc (allow_server): Remove variable. (client_request_get_version::client_request_get_version): Drop checking allow_server. utils/ChangeLog: * passwd.c: Remove CYGWIN=server requirement from usage text. doc/ChangeLog: * cygserver.sgml: Remove the "How to use the Cygserver services" section. * cygwinenv.sgml: Move "(no)server" to the removed options section. * faq-programming.xml: Remove CYGWIN=server requirement for running the Cygwin testsuite. * ntsec.sgml: Ditto for using `passwd -R'.
* * fhandler_procnet.cc: Reorganize global procnet content data into aCorinna Vinschen2009-01-205-39/+43
| | | | | | | | new struct virt_tab_t. Accommodate throughout. * fhandler.h: Fix copyright dates. * fhandler_process.cc: Ditto. * fhandler_registry.cc: Ditto.
* * devices.h (FH_PROCESSFD): New device type.Corinna Vinschen2009-01-2010-324/+445
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * dtable.cc (build_fh_pc): Add case for FH_PROCESSFD. * fhandler.h (class fhandler_virtual): Drop bufalloc member. * fhandler_virtual.h: New header. * fhandler_proc.cc: Remove types proc_type_t and proc_tab_t in favor of types virt_type_t and virt_tab_t from fhandler_virtual.h. Change prototypes of format_XXX functions accordingly. (proc_tab): Drop size member info. (fhandler_proc::fill_filebuf): Don't allocate filebuf here. Allocate it in the format_XXX functions. * fhandler_process.cc: Reorganize global process content data into a new struct virt_tab_t. Accommodate throughout. (format_process_winexename): New function. (format_process_winpid): New function. (format_process_exename): New function. (format_process_root): New function. (format_process_cwd): New function. (format_process_cmdline): New function. (format_process_ppid): New function. (format_process_uid): New function. (format_process_pgid): New function. (format_process_sid): New function. (format_process_gid): New function. (format_process_ctty): New function. (format_process_fd): New function. * fhandler_procnet.cc (fhandler_procnet::fill_filebuf): Don't use bufalloc. * fhandler_registry.cc (fhandler_registry::fill_filebuf): Define bufalloc locally. * fhandler_virtual.cc (fhandler_virtual::fhandler_virtual): Drop initialization of bufalloc. (fhandler_virtual::dup): Drop copying bufalloc.
* * thread.h (struct pthread_rwlock::RWLOCK_READER): Add counter n.Corinna Vinschen2009-01-203-4/+26
| | | | | | | | * thread.cc (pthread_rwlock::rdlock): If a thread already owns a read lock, just count the number of locks for it, per SUSv4. (pthread_rwlock::tryrdlock): Ditto. (pthread_rwlock::unlock): If a thread has more than one concurrent read locks, just count down.
* * autoload.cc (WSAIoctl): Reintroduce.Corinna Vinschen2009-01-207-65/+177
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | (WSASendMsg): Define. * fhandler.h (class fhandler_socket): Change definition of recv_internal and send_internal to take WSAMSG pointer as parameter. * fhandler_socket.cc (WSAID_WSARECVMSG): Define. (LPFN_WSARECVMSG): Define. (WSASendMsg): Declare. (get_ext_funcptr): New function to fetch address of WSARecvMsg. (fhandler_socket::recv_internal): Take just a LPWSAMSG parameter. Change code accordingly. If control information is requested, fetch address of WSARecvMsg and use that instead of WSARecvFrom. (fhandler_socket::recvfrom): Change return type to ssize_t as declared in fhandler.h. Accommodate changes to recv_internal. (fhandler_socket::recvmsg): Ditto. Make sure that control information is only requested if system, address family, and socket type support it. (fhandler_socket::send_internal): Take just a LPWSAMSG parameter and the flags. Change code accordingly. If control information is provided, use WSASendMsg instead of WSASendTo. (fhandler_socket::sendto): Drop useless comment. Accommodate changes to send_internal. (fhandler_socket::sendmsg): Ditto. Make sure that control information is only provided if system, address family, and socket type support it. * wincap.h (wincaps::has_recvmsg): New element. (wincaps::has_sendmsg): New element * wincap.cc: Implement above elements throughout. * include/cygwin/socket.h (CMSG_ALIGN): Phrase in terms of alignment of type struct cmsghdr.
* * mmap.cc (mmap64): Fix condition checking if anonymous mapping beyondCorinna Vinschen2009-01-172-1/+8
| | | | EOF is required.
* * fhandler_proc.cc: Reorganize global proc content data into a newCorinna Vinschen2009-01-173-139/+104
| | | | | | | | | | struct proc_tab_t. Accommodate throughout. (format_proc_version): New function. (format_proc_loadavg): New function. (format_proc_self): New function. * resource.cc (getrlimit): Return correct rlim_max value for RLIMIT_NOFILE.
* * Fix copyright dates.Corinna Vinschen2009-01-167-6/+11
|
* * libc/getopt.c (parse_long_options): Use fix from NetBSD's getoptCorinna Vinschen2009-01-132-9/+24
| | | | to avoid false ambiguities.
* * syscalls.cc (enum bin_status): New type.Corinna Vinschen2009-01-122-41/+123
| | | | | | | | | | | (try_to_bin): Return bin_status. Rename win32_path to pc. Rename h to fh. Rename fh to tmp_fh. Add code to set delete dispostion and more code to replace file moved to bin by another, temporary file. Add comments to explain why. (unlink_nt): Replace move_to_bin with bin_stat. Only set bin_stat to move_to_bin for non-remote files. As a last resort, call try_to_bin if setting delete-on-close failed. Only re-set R/O DOS attribute and only close handle if it's still valid.
* * errno.cc (errmap): Set errno to ENOENT instead of ENOSHARE throughout.Corinna Vinschen2009-01-113-7/+15
| | | | | | | * path.cc (path_conv::check): Set to and check for ENOENT instead of ENOSHARE. * path.cc (symlink_info::check): Fix Samba 3.2.x comment.
* * mount.cc (mount_info::from_fstab_line): Always convert driveCorinna Vinschen2009-01-093-24/+34
| | | | | | | | | letter in native path to uppercase. * path.cc (normalize_win32_path): Ditto. (path_prefix_p): Revert previous patch. * path.cc (symlink_info::check): Check for STATUS_INVALID_PARAMETER return code to circumvent weird behaviour of Samba 3.2.x shares.
* * include/sys/cygwin.h (CW_SETERRNO): Define.Christopher Faylor2009-01-097-7/+39
| | | | | | | | | * external.cc (CW_SETERRNO): Implement. * include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR to 192 to reflect the above change. * path.cc (path_prefix_p): Treat X: as equivalent to x:. * mkglobals_h: Remove unneeded #define. * spawn.cc (spawn_guts): Avoid overly wordy initialization to zero.
* * libc/fts.c (fts_build): Use DT_DIR case on Cygwin.Corinna Vinschen2009-01-082-3/+10
| | | | | (fts_ufslinks): Fix using wrong structure member in Cygwin-specific code.
* * ntdll.h: Reorder NT status flags. Fix a case difference. AddCorinna Vinschen2009-01-073-15/+57
| | | | | | | | | | STATUS_CANNOT_DELETE flag. * syscalls.cc (unlink_nt): Change initial NtOpenFile to request FILE_SHARE_DELETE sharing mode. Change comment accordingly. If setting delete disposition failed with STATUS_CANNOT_DELETE, try to delete using delete-on-close. Explain why. Rearrange setting R/O DOS attribute after trying to delete. Simplify comment.
* * fhandler_disk_file.cc (fhandler_disk_file::link): Only add .exe ifCorinna Vinschen2009-01-073-1/+11
| | | | | | original file has .exe as well. * path.cc (path_conv::is_binary): Only recognize Windows 32 and 64 bit apps as binaries.