summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/kernel32.cc
Commit message (Collapse)AuthorAgeFilesLines
* Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout optioncygwin-2_5_2-releaseCorinna Vinschen2016-06-231-2/+0
| | | | | | | | | | | | | | Bump GPLv2+ to GPLv3+ for some files, clarify BSD 2-clause. Everything else stays under GPLv3+. New Linking Exception exempts resulting executables from LGPLv3 section 4. Add CONTRIBUTORS file to keep track of licensing. Remove 'Copyright Red Hat Inc' comments. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* * kernel32.cc (CreateFileMappingW): Fix default standard rights forCorinna Vinschen2014-08-271-2/+3
| | | | | file mappings from READ_CONTROL to STANDARD_RIGHTS_REQUIRED to allow changing the DACL (fixes "access denied" error in pinfo::set_acl).
* fix comment typoChristopher Faylor2013-07-191-1/+1
|
* * common.din: Export GetCommandLine{A,W}.Christopher Faylor2013-07-191-1/+50
| | | | | | | | | | | | | | | | | | * kernel32.cc: Add includes needed for GetCommandLine functions. (ucmd): New function. (cygwin_GetCommandLineW): Ditto. (cygwin_GetCommandLineA): Ditto. * spawn.cc (child_info_spawn::worker): Rename one_line -> cmd. Use lb_wcs macro to generate a wide character version of the line buffer. Remove duplicate printing of command line. Don't access members of linebuf directly. * winf.h: Use pragma once. (linebuf): Make storage private. (linebuf::operator size_t): New operator. Return size of buf. (linebuf::operator wchar_t): New operator. (linebuf::wcs): New function. (lb_wcs): New macro. * include/cygwin/version.h: Bump API minor number to 268. * strfuncs.cc: Clarify descriptive file comment.
* * Merge in cygwin-64bit-branch.Corinna Vinschen2013-04-231-1/+1
|
* Throughout, update copyrights to reflect dates which correspond to main-branchChristopher Faylor2013-01-211-1/+1
| | | | checkins. Regularize copyright format.
* * pseudo-reloc.cc: Drop including wchar.h.Corinna Vinschen2012-07-121-1/+0
| | | | | | (__report_error): Define module as WCHAR. * advapi.cc: Drop including wchar.h. * kernel32.cc: Ditto.
* * advapi32.cc (_ADVAPI32_): Drop definition.Corinna Vinschen2012-07-061-4/+0
| | | | | | * kernel32.cc (_KERNEL32_): Ditto. * winlean.h: Add definitions required to use Mingw64 headers. (FILE_SHARE_VALID_FLAGS): Drop definition.
* * kernel32.cc (_KERNEL32_): Define. Explain why.Corinna Vinschen2012-06-281-3/+7
| | | | (CreateFileMappingW): Drop undocumented flProtect flags.
* Drop NT4 support.Corinna Vinschen2011-04-041-35/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * autoload.cc (DnsQuery_A): Fatal if not available. (DnsRecordListFree): Ditto. (DsGetDcNameW): Ditto. (NetGetAnyDCName): Remove. (NetGetDCName): Remove. (EnumProcessModules): Fatal if not available. (GetModuleFileNameExW): Ditto. (GetModuleInformation): Ditto. (GetProcessMemoryInfo): Ditto. (QueryWorkingSet): Ditto. (LsaRegisterLogonProcess): Ditto. * fenv.cc (_feinitialise): Drop supports_sse condition. * fhandler_disk_file.cc (path_conv::isgood_inode): Fix comment. (fhandler_base::fstat_by_name): Drop has_fileid_dirinfo condition. (fhandler_disk_file::opendir): Ditto. * fhandler_netdrive.cc (fhandler_netdrive::readdir): Fix comment. * fhandler_proc.cc (format_proc_partitions): Drop NT4-only code. * fhandler_process.cc (get_process_state): Ditto. * kernel32.cc (GetWindowsDirectoryW): Remove. (GetWindowsDirectoryA): Remove. * miscfuncs.cc (nice_to_winprio): Drop NT4-only code. * mount.cc (fs_info::update): Fix comments. * net.cc (get_2k_ifs): Drop NT4-only code. * sec_auth.cc (get_logon_server): Ditto. (lsaauth): Drop NT4-specific error handling. * security.cc (alloc_sd): Set SE_DACL_PROTECTED unconditionally. * select.cc (select_stuff::wait): Always use MWMO_INPUTAVAILABLE. (peek_windows): Drop NT4-only condition in call to PeekMessage. * syscalls.cc (gethostid): Remove NT4-only workaround. * wincap.cc: Througout, drop has_dacl_protect, has_broken_if_oper_status, has_process_io_counters, has_terminal_services, has_extended_priority_class, has_guid_volumes, has_fileid_dirinfo, has_mwmo_inputavailable and supports_sse from wincaps. (wincap_nt4sp4): Remove. (wincap_minimal): Set to wincap_2000. (wincapc::init): Rely on availability of OSVERSIONINFOEX structure. Treat error from GetVersionEx as fatal. Treat NT4 as fatal. * wincap.h (struct wincaps): Drop has_dacl_protect, has_broken_if_oper_status, has_process_io_counters, has_terminal_services, has_extended_priority_class, has_guid_volumes, has_fileid_dirinfo, has_mwmo_inputavailable and supports_sse flags and methods. * winlean.h (GetWindowsDirectoryW) Define as GetSystemWindowsDirectoryW. (GetWindowsDirectoryA): Define as GetSystemWindowsDirectoryA.
* * kernel32.cc (CreateEventW): Create event object with EVENT_ALL_ACCESSCorinna Vinschen2010-04-151-4/+4
| | | | | | | access mask. (CreateMutexW): Create mutex object with MUTEX_ALL_ACCESS access mask. (CreateSemaphoreW): Create semaphore object with SEMAPHORE_ALL_ACCESS access mask.
* * kernel32.cc (CreateMutexW): Use correct access mask.Corinna Vinschen2009-09-241-2/+2
| | | | (CreateSemaphoreW): Ditto.
* Remove unneeded whitespace.Christopher Faylor2008-11-261-1/+1
| | | | | | | | | | | | | | | | * fhandler_fifo.cc (fhandler_fifo::open): Rework to cause errno to be set to ENXIO when opening a fifo write/nonblocking. * environ.cc (ucreqenv): Rename to ucenv. Move code from old ucenv here and conditionalize it on create_upcaseenv. (ucenv): Delete. (environ_init): Fix compiler warning by moving create_upcaseenv test to ucenv. Don't bother checking for child_proc_info when calling ucenv since it is assumed to be NULL at the point where the function is called. * path.cc (symlink_worker): Turn off MS-DOS path warnings when dealing with devices since the device handler passes in a translated MS-DOS path. * sec_auth.cc (lsaprivkeyauth): Avoid variable initialization which causes a compiler error. * fhandler_netdrive.cc: Update copyright.
* * autoload.cc (GetSystemWindowsDirectoryW): Define.Corinna Vinschen2008-10-221-0/+35
| | | | | | * kernel32.cc (GetWindowsDirectoryW): Implement to abstract from running under Terminal Services or not. (GetWindowsDirectoryA): Ditto.
* * kernel32.cc (CreateFileMappingW): Remove stray small_printf.Corinna Vinschen2008-04-281-1/+0
|
* * kernel32.cc (CreateFileMappingW): Fix bug in reserve/commit handling.Corinna Vinschen2008-04-211-2/+2
|
* * Makefile.in (DLL_OFILES): Add kernel32.o.Corinna Vinschen2008-04-211-0/+405
* autoload.cc (WSACloseEvent): Remove. (WSACreateEvent): Remove. * cygheap.cc (cygheap_init): Drop initializing shared_prefix. * cygheap.h (struct init_cygheap): Drop shared_prefix and shared_prefix_buf members. * fhandler_socket.cc (sock_shared_name): New static function. (search_wsa_event_slot): Convert name buffers to WCHAR. Call NtCreateMutant/NtOpenMutant to create mutexes in session local namespace. (fhandler_socket::init_events): Ditto. Fix debug output. (fhandler_socket::release_events): Close mutexes using NtClose. (fhandler_socket::dup): Ditto. * kernel32.cc: New file, implementing Win32 calls in a Cygwin-specific way. * mmap.cc (MapView): Make static. * ntdll.h: Fix status code sorting. (STATUS_OBJECT_NAME_EXISTS): Define. (SEMAPHORE_QUERY_STATE): Define. (CYG_SHARED_DIR_ACCESS): Define. (CYG_MUTANT_ACCESS): Define. (CYG_EVENT_ACCESS): Define. (CYG_SEMAPHORE_ACCESS): Define. (enum _PROCESSINFOCLASS): Define ProcessSessionInformation. (struct _PROCESS_SESSION_INFORMATION): Define. (NtCreateSemaphore): Declare. (NtOpenSemaphore): Declare. * flock.cc: Use CYG_xxx_ACCESS access masks where appropriate. * posix_ipc.cc (ipc_mutex_init): Use native functions to create mutex. Create in cygwin-shared subdir. (ipc_cond_init): Ditto for event. (ipc_mutex_close): Use NtClose. (ipc_cond_close): Ditto. (mq_open): Drop "cyg" prefix from mqh_uname. * shared.cc (CYG_SHARED_DIR_ACCESS): Drop definition here. (_cygwin_testing): Declare extern on file level. (get_shared_parent_dir): Change name of shared directory. Add name to api_fatal output. (get_session_parent_dir): New function. (shared_name): Simplify. (shared_info::initialize): Call get_session_parent_dir. * shared_info.h (get_session_parent_dir): Declare. * smallprint.cc (__small_vswprintf): Fix bug in multibyte string conversion. * thread.cc (semaphore::semaphore): Align semaphore name to object names in posix IPC functions. * include/cygwin/version.h (CYGWIN_VERSION_SHARED_DATA): Bump.