summaryrefslogtreecommitdiffstats
path: root/winsup
Commit message (Collapse)AuthorAgeFilesLines
* * ntdll.h: Allow usage from plain C code.Corinna Vinschen2011-03-312-0/+175
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (FSCTL_PIPE_IMPERSONATE): Define. (enum _THREAD_INFORMATION_CLASS): Define. (RTL_QUERY_REGISTRY_xxx): Define. (RTL_REGISTRY_xxx): Define. (PRTL_QUERY_REGISTRY_ROUTINE): Define. (struct _RTL_QUERY_REGISTRY_TABLE): Define. (enum _KEY_VALUE_INFORMATION_CLASS): Define. (struct _KEY_VALUE_PARTIAL_INFORMATION): Define. (NtAccessCheck): Declare. (NtAllocateLocallyUniqueId): Declare. (NtCreateKey): Declare. (NtDuplicateToken): Declare. (NtLoadKey): Declare. (NtOpenKey): Declare. (NtOpenProcessToken): Declare. (NtOpenThreadToken): Declare. (NtPrivilegeCheck): Declare. (NtQueryInformationToken): Declare. (NtQueryValueKey): Declare. (NtSetInformationThread): Declare. (NtSetInformationToken): Declare. (NtSetValueKey): Declare. (RtlAbsoluteToSelfRelativeSD): Declare. (RtlAddAccessAllowedAce): Declare. (RtlAddAccessDeniedAce): Declare. (RtlAddAce): Declare. (RtlCheckRegistryKey): Declare. (RtlCopySid): Declare. (RtlCreateAcl): Declare. (RtlCreateRegistryKey): Declare. (RtlCreateSecurityDescriptor): Declare. (RtlEqualPrefixSid): Declare. (RtlEqualSid): Declare. (RtlFirstFreeAce): Declare. (RtlGetAce): Declare. (RtlGetDaclSecurityDescriptor): Declare. (RtlGetGroupSecurityDescriptor): Declare. (RtlGetOwnerSecurityDescriptor): Declare. (RtlIdentifierAuthoritySid): Declare. (RtlInitializeSid): Declare. (RtlLengthSid): Declare. (RtlQueryRegistryValues): Declare. (RtlSetControlSecurityDescriptor): Declare. (RtlSetDaclSecurityDescriptor): Declare. (RtlSetGroupSecurityDescriptor): Declare. (RtlSetOwnerSecurityDescriptor): Declare. (RtlSubAuthorityCountSid): Declare. (RtlSubAuthoritySid): Declare. (RtlWriteRegistryValue): Declare.
* * uinfo.cc (cygheap_user::init): Don't call GetUserName. Fetch usernameCorinna Vinschen2011-03-312-7/+26
| | | | | | from Windows environment instead. Explain why. (cygheap_user::env_domain): Use MAX_DOMAIN_NAME_LEN rather than DNLEN to specify the size of the domain name buffer.
* * Makefile.in (LIBS): Remove advapi32.dll.Corinna Vinschen2011-03-317-58/+53
| | | | | | | | | | | | | (clean): Remove cyglsa.def. * cyglsa.c: Drop definitions required for VC++. Don't include ntddk.h. Declare functions from NTDLL here. Explain why. Use NTDLL functions in place of ADVAPI32 functions. * cyglsa64.def: New file. * cyglsa64.dll: Regenerate. * make-64bit-version-with-mingw-w64.sh (LIBS): Remove advapi32.dll. Reference cyglsa64.def instead of mslsa.def. * make-64bit-version-with-visual-c.bat: Remove. * mslsa.def: Remove.
* * cyglsa.c: Fix compilation with MinGW-w64 toolchains.Corinna Vinschen2011-03-314-2/+33
| | | | | * make-64bit-version-with-mingw-w64.sh: New file. * cyglsa64.dll: Regenerate with MinGW-w64-gc.
* Fix ChangeLog entry.Corinna Vinschen2011-03-301-1/+0
|
* * hires.h: Fix copyright.Corinna Vinschen2011-03-303-174/+26
| | | | | | | | | | | | | | | * times.cc: Ditto. localtime, gmtime). (FACTOR): Add comment. (NSPERSEC): Ditto. (JITTER): New definition. Comment. (systime_ns): Avoid gratuitous copying of the value returned by GetSystemTimeAsFileTime. (corelocaltime, localtime, gmtime): Remove very old, unused code block. (cygwin_tzset): Remove. (hires_ms::timeGetTime_ns): Add missing semicolon in comment. (hires_ms::nsecs): Redefine check for difference between internal timer value and system time.
* * times.cc (hires_ms::resolution): Make sure resolution is never 0.Corinna Vinschen2011-03-302-0/+13
| | | | (clock_setres): Ditto.
* * regtool.cc (cmd_set): Avoid a compiler warning.Corinna Vinschen2011-03-302-5/+11
|
* * cygtls.h (struct _local_storage): Redefine process_ident as wchar_tCorinna Vinschen2011-03-293-18/+32
| | | | | | | | | | pointer. * syslog.cc (CYGWIN_LOG_NAME): Convert to wide char constant. (openlog): Convert incoming ident string to wide char. Fix formatting. (vsyslog): Print ident string as wide char string. Convert message string to wide char and call UNICODE Win32 Event functions to make sure to use correct codeset. * tlsoffset.h: Regenerate.
* * fhandler_socket.cc (get_inet_addr): Make externally available.Corinna Vinschen2011-03-294-23/+56
| | | | | | | | | | * autoload.cc (GetUdpTable): Define. * syslog.cc (connect_syslogd): Use get_inet_addr rather than _stat64 to check for local socket file. Create socket with type returned by get_inet_addr. If connect on UDP socket works, test if there's really a listening peer, otherwise fall back to Windows event log. (try_connect_syslogd): Use syslogd_inited flag to check if syslogd is available.
* * cygcheck.cc (handle_unique_object_name): Avoid a compiler warning.Corinna Vinschen2011-03-294-5/+18
| | | | | | | | (dump_sysinfo): Ditto. * loadlib.h (_load_sys_library): Mark as used, to avoid a compiler warning. * path.cc (oopt): Gurad with !FSTAB_ONLY to avoid a compiler warning. (read_flags): Ditto.
* * uinfo.cc (cygheap_user::env_domain): Use LookupAccountSidW andCorinna Vinschen2011-03-292-9/+15
| | | | | convert user and domain to multibyte strings to make sure to use correct codeset.
* * autoload.cc (UuidCreate): Remove.Corinna Vinschen2011-03-296-23/+42
| | | | | | | | | | (UuidCreateSequential): Remove. * passwd.cc (internal_getpwsid): Avoid a strict-aliasing compiler error with gcc 4.5.1. * fhandler_floppy.cc (fhandler_dev_floppy::get_drive_info): Ditto. * ntdll.h (NtAllocateUuids): Declare. * syscalls.cc (gethostid): Use NtAllocateUuids function rather than UuidCreateSequential/UuidCreate to get rid of rpcrt4 dependency.
* * new-features.sgml (ov-new1.7.10): Document pthread spinlocks.Corinna Vinschen2011-03-292-0/+17
|
* * cygwin.din (pthread_spin_destroy): Export.Corinna Vinschen2011-03-299-13/+217
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (pthread_spin_init): Export. (pthread_spin_lock): Export. (pthread_spin_trylock): Export. (pthread_spin_unlock): Export. * posix.sgml (std-susv4): Add pthread_spin_destroy, pthread_spin_init, pthread_spin_lock, pthread_spin_trylock, pthread_spin_unlock. (std-notimpl): Remove pthread_spin_[...]. * pthread.cc (pthread_spin_init): New function. * thread.cc (pthread_spinlock::is_good_object): New function. (pthread_mutex::pthread_mutex): Rearrange initializers to accommodate protected data in pthread_mutex. (pthread_spinlock::pthread_spinlock): New constructor. (pthread_spinlock::lock): New method. (pthread_spinlock::unlock): New method. (pthread_spinlock::init): New method. (pthread_spin_lock): New function. (pthread_spin_trylock): New function. (pthread_spin_unlock): New function. (pthread_spin_destroy): New function. * thread.h (PTHREAD_SPINLOCK_MAGIC): Define. (class pthread_mutex): Change access level of members shared with derived classes to protected. (pthread_mutex::set_shared): New protected method. (class pthread_spinlock): New class, derived class of pthread_mutex. * include/pthread.h (pthread_spin_destroy): Declare. (pthread_spin_init): Declare. (pthread_spin_lock): Declare. (pthread_spin_trylock): Declare. (pthread_spin_unlock): Declare. * include/cygwin/types.h (pthread_spinlock_t): New typedef. * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
* * net.cc (SIO_BASE_HANDLE): Define.Corinna Vinschen2011-03-292-36/+65
| | | | | (fdsock): If we got an LSP handle, try to create a copy of the base handle instead. Change comment to explain.
* * include/cygwin/version.h: Bump CYGWIN_VERSION_DLL_MINOR to 10.Corinna Vinschen2011-03-292-1/+5
|
* * autoload.cc (winmm): Remove time functions. Don't treatCorinna Vinschen2011-03-296-60/+164
| | | | | | | | | | | | | | | | | | | | | | | unloadable wave functions as fatal. * hires.h (hires_ms::timeGetTime_ns): New private method. (hires_ms::dmsecs): Call timeGetTime_ns here. * ntdll.h (struct _KSYSTEM_TIME): Define. (KUSER_SHARED_DATA): Redefine to allow access to InterruptTime. (SharedUserData): Define here. (NtQueryTimerResolution): Declare. (NtSetTimerResolution): Declare. * path.cc (SharedUserData): Move to ntdll.h. * times.cc (hires_ms::timeGetTime_ns): New private method. Use throughout instead of timeGetTime. Document entire functionality of timeGetTime in case we need it. (hires_ms::resolution): Try a call to NtQueryTimerResolution to fetch current period. Fall back to heuristic if that fails. Cast to DWORD in assignments to minperiod. (clock_setres): Align period to possible values per a call to NtQueryTimerResolution. Explain why. Replace calls to timeBeginPeriod and timeEndPeriod with underlying call to NtSetTimerResolution. Use status code from NtSetTimerResolution to compute errno. Convert period to ULONGLONG and store 100ns value to simplify code.
* * include/userenv.h: Add functions and definitions added with WindowsCorinna Vinschen2011-03-292-0/+36
| | | | 2000 and Vista.
* * include/sys/xattr.h: New file.Corinna Vinschen2011-03-292-0/+23
|
* * thread.cc (semaphore::init, destroy, close): Standards conformanceCorinna Vinschen2011-03-293-7/+35
| | | | | | fix. On a failure, return -1 and set errno. * thread.h (semaphore::terminate): Save errno since semaphore::close() may now modify it.
* * setfacl.c (strchrnul): Drop local implementation.Corinna Vinschen2011-03-282-11/+5
|
* * new-features.sgml (ov-new1.7.9): Add "new API" paragraph.Corinna Vinschen2011-03-282-0/+16
|
* * cygwin.din (strchrnul): Export.Corinna Vinschen2011-03-284-1/+10
| | | | | * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump. * posix.sgml (std-gnu): Add strchrnul.
* * dll_init.cc (dll::init): Accommodate ill-behaved dlls who don't fill outChristopher Faylor2011-03-272-1/+9
| | | | p.envptr.
* 2011-03-25 Chris Sutcliffe <ir0nh34d@users.sf.net>Chris Sutcliffe2011-03-262-1/+5
| | | | * Makefile.in: Increment CYGRELEASE to 2.
* 2011-03-25 Chris Sutcliffe <ir0nh34d@users.sf.net>Chris Sutcliffe2011-03-262-0/+8
| | | | * lib/Makefile.in: Include GDIPLUS_HEADERS in dist target.
* * mmap.cc (mmap64): Add a cheat to let a certain autoconf test succeedCorinna Vinschen2011-03-252-0/+49
| | | | on 64 bit systems. Explain why.
* * wincap.cc (wincap_2003): Set use_dont_resolve_hack to true.Christopher Faylor2011-03-232-1/+5
|
* * autoload.cc (dll_load): Change error message to make it clear if a newer DLLChristopher Faylor2011-03-232-1/+6
| | | | is being run.
* * libltp/lib/get_high_address.c: Align copyright with upstream.Corinna Vinschen2011-03-212-3/+33
|
* Fix typo.Corinna Vinschen2011-03-201-1/+1
|
* * fenv.cc (_feinitialise); Don't use SSE instructions on systems notCorinna Vinschen2011-03-204-4/+25
| | | | | | supporting them. * wincap.h (wincaps::supports_sse): New element. * wincap.cc: Implement above element throughout.
* * cygwin.sc: Raise default cygheap size to 2 Megs.Corinna Vinschen2011-03-182-1/+5
|
* Fix typo.Corinna Vinschen2011-03-181-1/+1
|
* * fhandler.h (DEFAULT_PIPEBUFSIZE): Reset to 64K.Christopher Faylor2011-03-182-1/+9
|
* * mmap.cc (mmap_record::alloc_fh): Initialize nmae strings in fdev toCorinna Vinschen2011-03-182-1/+8
| | | | | empty strings or suffer a SEGV. Drop second parameter in call to build_fh_dev.
* * mmap.cc (class mmap_record): Pack 4 byte-aligned. Convert member devCorinna Vinschen2011-03-182-5/+16
| | | | | | to plain int. (mmap_record::alloc_fh): Create temporary device from dev and use in call to build_fh_dev.
* * mmap.cc (mmap_record::page_map): Define as variable array rather thanCorinna Vinschen2011-03-182-26/+29
| | | | | | | | | | | | | as pointer. (mmap_record::alloc_page_map): Remove. (mmap_record::free_page_map): Remove. (mmap_record::init_page_map): New method. (mmap_record::add_record): Take mmap_record parameter by reference rather than by value. (mmap_record::map_pages): Fix comment. (mmap_list::add_record): Allocate space for mmap_record including the page_map in a single ccalloc call. Call init_page_map afterwards. (mmap_list::del_record): Remove call to mmap_record::free_page_map.
* * crt0.c (mainCRTStartup): Move call to _feinitialise from here...Corinna Vinschen2011-03-173-3/+10
| | | | * dcrt0.cc (_dll_crt0): ...to here.
* * winver.rc: Fix copyright dates.Corinna Vinschen2011-03-162-1/+5
|
* * fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Only useCorinna Vinschen2011-03-142-1/+7
| | | | file id as inode number if it masters the isgood_inode check.
* * fhandler.cc (fhandler_base_overlapped::wait_overlapped): Remove specialChristopher Faylor2011-03-133-83/+56
| | | | | | | | | | | | | | | treatment for ERROR_NO_SYSTEM_RESOURCES. Cancel I/O and reset the overlapped handle on error. (fhandler_base_overlapped::write_overlapped): Limit writes to max_atomic_write bytes in blocking case. Incorporate code from now-defunct write_overlapped_fallback. Fix serious oversight where ptr was not advanced as buffer was written. (fhandler_base_overlapped::write_overlapped_fallback): Eliminate. * fhandler.h (fhandler_base_overlapped::write_overlapped_fallback): Ditto for declaration. (DEFAULT_PIPEBUFSIZE): Lower size to slightly less than documented worst-case atomic write size. (fhandler_overlapped::wait_return): Remove unused element.
* 2011-03-11 Chris Sutcliffe <ir0nh34d@users.sf.net>Chris Sutcliffe2011-03-123-3/+8
| | | | | * include/w32api.h: Increment version to 3.17. * Makefile.in: Ditto.
* * fhandler.cc (fhandler_base_overlapped::wait_overlapped): HandleChristopher Faylor2011-03-092-24/+49
| | | | | | | | | | overlapped_fallback error condition like other error conditions. Set res carefully and specifically for each condition rather than resorting to a default. (fhandler_base_overlapped::write_overlapped): Preserve errno in overlapped_fallback condition. Correct write_overlapped_fallback to avoid inappropriate looping. (fhandler_base_overlapped::write_overlapped_fallback): Add some more comments.
* * fhandler.cc (fhandler_base_overlapped::write_overlapp): Oops! AccommodateChristopher Faylor2011-03-092-1/+6
| | | | change in arguments to wait_overlapped.
* * errno.cc (errmap): Change mapping of NO_SYSTEM_RESOURCES to EFBIG.Christopher Faylor2011-03-096-57/+193
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * fhandler.cc (MAX_OVERLAPPED_WRITE_LEN): New constant. (MIN_OVERLAPPED_WRITE_LEN): Ditto. (fhandler_base_overlapped::close): Accommodate change in arguments to wait_overlapped. (fhandler_base_overlapped::setup_overlapped): Add __stdcall and regparm modifiers. (fhandler_base_overlapped::destroy_overlapped): Ditto. (fhandler_base_overlapped::has_ongoing_io): Ditto. (fhandler_base_overlapped::wait_overlapped): Modify to return an enum returning various states. Accept nonblocking parameter. (fhandler_base_overlapped::read_overlapped): Add __stdcall and regparm modifiers. Rework to attempt to be smarter about reacting to states returned by wait_overlapped. (fhandler_base_overlapped::write_overlapped): Ditto. Add fallback option for when wait_overlapped detects that smaller chunks must be written. (fhandler_base_overlapped::write_overlapped_fallback): Ditto. * fhandler.h (DEFAULT_PIPEBUFSIZE): Move definition here from pipe.cc. (fhandler_base::has_ongoing_io): Define with __stdcall and regparm modifiers. (fhandler_base_overlapped::wait_return): New enum. (fhandler_base_overlapped::max_atomic_write): New variable. (fhandler_base_overlapped:: wait_overlapped): Accommodate changes mentioned above to arguments and modifiers. (fhandler_base_overlapped::setup_overlapped): Ditto for modifiers. (fhandler_base_overlapped::read_overlapped): Ditto. (fhandler_base_overlapped::write_overlapped): Ditto. (fhandler_base_overlapped::destroy_overlapped): Ditto. (fhandler_base_overlapped::has_ongoing_io): Ditto. (fhandler_base_overlapped::fhandler_base_overlapped): Zero max_atomic_write. * fhandler_fifo.cc (fhandler_fifo::fhandler_fifo): Set max_atomic_write to the size of the DEFAULT_PIPEBUFSIZE. (fhandler_fifo::wait): Accommodate change in arguments to wait_overlapped. * pipe.cc (fhandler_pipe::fhandler_pipe): Set max_atomic_write to the size of the DEFAULT_PIPEBUFSIZE. (fhandler_pipe::create_selectable): Allow minimum size of DEFAULT_PIPEBUFSIZE. (DEFAULT_PIPEBUFSIZE): Delete here, move to fhandler.h.
* * security.cc: Fix copyright dates.Corinna Vinschen2011-03-082-2/+6
|
* * fhandler.cc (fhandler_base::open): When creating a file on aCorinna Vinschen2011-03-088-21/+85
| | | | | | | | | | | | | | | filesystem supporting ACLs, create the file with WRITE_DAC access. Explain why. * fhandler_disk_file.cc (fhandler_disk_file::mkdir): Ditto for directories. * fhandler_socket.cc (fhandler_socket::bind): Ditto for sockets. * path.cc (symlink_worker): Ditto for symlinks. * security.cc (get_file_sd): Always call GetSecurityInfo for directories on XP and Server 2003. Improve comment to explain why. (set_file_attribute): Explicitely cast mode_t value to bool in call to get_file_sd. * wincap.h (wincaps::use_get_sec_info_on_dirs): New element. * wincap.cc: Implement above element throughout.
* 2011-03-07 Chris Sutcliffe <ir0nh34d@users.sf.net>Chris Sutcliffe2011-03-083-16/+23
| | | | | | | * include/winbase.h (PSAPI_WORKING_SET_BLOCK, PSAPI_WORKING_SET_INFORMATION): Move from here... * include/psapi.h (PSAPI_WORKING_SET_BLOCK, PSAPI_WORKING_SET_INFORMATION): ... to here.