1 2011-04-04 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
3 * include/cygwin/types.h: Move multiple inclusion guards to
4 beginning and end of header.
6 2011-04-04 Christopher Faylor <me.cygwin2011@cgf.cx>
8 * Makefile.in: Move Makefile.common include earlier to fix problems with
9 relative ${srcdir} path which confuses make.
11 2011-04-04 Corinna Vinschen <corinna@vinschen.de>
14 * autoload.cc (DnsQuery_A): Fatal if not available.
15 (DnsRecordListFree): Ditto.
16 (DsGetDcNameW): Ditto.
17 (NetGetAnyDCName): Remove.
18 (NetGetDCName): Remove.
19 (EnumProcessModules): Fatal if not available.
20 (GetModuleFileNameExW): Ditto.
21 (GetModuleInformation): Ditto.
22 (GetProcessMemoryInfo): Ditto.
23 (QueryWorkingSet): Ditto.
24 (LsaRegisterLogonProcess): Ditto.
25 * fenv.cc (_feinitialise): Drop supports_sse condition.
26 * fhandler_disk_file.cc (path_conv::isgood_inode): Fix comment.
27 (fhandler_base::fstat_by_name): Drop has_fileid_dirinfo condition.
28 (fhandler_disk_file::opendir): Ditto.
29 * fhandler_netdrive.cc (fhandler_netdrive::readdir): Fix comment.
30 * fhandler_proc.cc (format_proc_partitions): Drop NT4-only code.
31 * fhandler_process.cc (get_process_state): Ditto.
32 * kernel32.cc (GetWindowsDirectoryW): Remove.
33 (GetWindowsDirectoryA): Remove.
34 * miscfuncs.cc (nice_to_winprio): Drop NT4-only code.
35 * mount.cc (fs_info::update): Fix comments.
36 * net.cc (get_2k_ifs): Drop NT4-only code.
37 * sec_auth.cc (get_logon_server): Ditto.
38 (lsaauth): Drop NT4-specific error handling.
39 * security.cc (alloc_sd): Set SE_DACL_PROTECTED unconditionally.
40 * select.cc (select_stuff::wait): Always use MWMO_INPUTAVAILABLE.
41 (peek_windows): Drop NT4-only condition in call to PeekMessage.
42 * syscalls.cc (gethostid): Remove NT4-only workaround.
43 * wincap.cc: Througout, drop has_dacl_protect,
44 has_broken_if_oper_status, has_process_io_counters,
45 has_terminal_services, has_extended_priority_class, has_guid_volumes,
46 has_fileid_dirinfo, has_mwmo_inputavailable and supports_sse from
48 (wincap_nt4sp4): Remove.
49 (wincap_minimal): Set to wincap_2000.
50 (wincapc::init): Rely on availability of OSVERSIONINFOEX structure.
51 Treat error from GetVersionEx as fatal. Treat NT4 as fatal.
52 * wincap.h (struct wincaps): Drop has_dacl_protect,
53 has_broken_if_oper_status, has_process_io_counters,
54 has_terminal_services, has_extended_priority_class, has_guid_volumes,
55 has_fileid_dirinfo, has_mwmo_inputavailable and supports_sse flags
57 * winlean.h (GetWindowsDirectoryW) Define as GetSystemWindowsDirectoryW.
58 (GetWindowsDirectoryA): Define as GetSystemWindowsDirectoryA.
60 2011-04-04 Corinna Vinschen <corinna@vinschen.de>
62 * dtable.cc (dtable::init_std_file_from_handle): Fix a comment to
63 reflect the current state.
65 2011-04-04 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
67 * Makefile.in (fhandler_proc_CFLAGS): Define USERNAME, HOSTNAME,
69 * fhandler_proc.cc (format_proc_version): Add build machine and GCC
70 version information as on Linux.
72 2011-04-04 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
73 Corinna Vinschen <corinna@vinschen.de>
75 * devices.h (fh_devices): Define FH_PROC_MIN_MINOR.
76 Reorder major-0 devices so that all /proc directories fall
77 between FH_PROC and FH_PROC_MIN_MINOR.
78 * path.h (isproc_dev): Redefine accordingly.
80 2011-04-04 Corinna Vinschen <corinna@vinschen.de>
82 * cygserver_setpwd.h (setlsapwd): Add username parameter to declaration.
83 * external.cc (cygwin_internal): In the CW_SET_PRIV_KEY case, fetch
84 additional username parameter.
85 * setlsapwd.cc (setlsapwd): Add username parameter. Allow admin to
86 set the hidden password for other users.
88 2011-04-04 Corinna Vinschen <corinna@vinschen.de>
90 * sec_auth.cc (get_user_groups): Mark well-known groups as well-known.
91 (get_user_local_groups): Ditto.
92 (verify_token): Drop useless label.
93 * sec_helper.cc (cygsid::get_sid): Check for well-known SID if
95 * security.h (well_known_sid_type): New inline function.
97 2011-04-02 Corinna Vinschen <corinna@vinschen.de>
99 * autoload.cc (FindFirstVolumeA): Remove.
100 (FindNextVolumeA): Remove.
101 (FindVolumeClose): Remove.
102 (GetVolumeNameForVolumeMountPointA): Remove.
103 * ntdll.h (NtFlushBuffersFile): Declare.
104 * syscalls.cc (sync_worker): Rewrite using native NT functions.
107 2011-04-02 Corinna Vinschen <corinna@vinschen.de>
109 * fhandler_proc.cc (format_proc_partitions): Express length in WCHAR
112 2011-04-02 Corinna Vinschen <corinna@vinschen.de>
114 * autoload.cc (GetExtendedTcpTable): Remove.
115 (GetTcpTable): Remove.
116 (CharNextExA): Remove.
117 (FindWindowA): Remove.
118 (ShowWindowAsync): Remove.
119 * dcrt0.cc (disable_dep): Remove unused function.
120 (dll_crt0_0): Drop comment babbling about TS & DEP.
121 * fhandler_socket.cc (address_in_use): Remove unused function.
122 * wincap.cc: Throughout, drop ts_has_dep_problem from wincaps.
123 (wincapc::init): Drop code setting ts_has_dep_problem flag.
124 * wincap.h (struct wincaps): Drop ts_has_dep_problem flags and method.
126 2011-04-01 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
128 Implement /proc/sysvipc/*
129 * devices.in (dev_procsysvipc_storage): Add.
130 * devices.cc: Regenerate.
131 * devices.h (fh_devices): Add FH_PROCSYSVIPC.
132 * dtable.cc (build_fh_pc): Add case FH_PROCSYSVIPC.
133 * fhandler.h (class fhandler_procsysvipc): Declare.
134 (fhandler_union): Add __procsysvipc.
135 * fhandler_proc.cc (proc_tab): Add sysvipc virt_directory.
136 * fhandler_procsysvipc.cc: New file.
137 * Makefile.in (DLL_OFILES): Add fhandler_procsysvipc.o.
138 * path.h (isproc_dev): Add FH_PROCSYSVIPC to conditional.
140 2011-04-01 Corinna Vinschen <corinna@vinschen.de>
142 * Makefile.in (DLL_OFILES): Add avapi32.o.
143 * advapi32.cc: New file.
144 * autoload.cc: Add block of remaining advapi32 functions used by
145 Cygwin. Keep commented out. Explain why.
147 2011-04-01 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
149 * fhandler_proc.cc (format_proc_loadavg): Add running/total
150 processes as fourth component of output.
151 * fhandler_process.cc (get_process_state): Make non-static.
152 Add FIXME about generating an 'O' flag.
154 2011-04-01 Corinna Vinschen <corinna@vinschen.de>
156 * fhandler_random.cc (fhandler_dev_random::crypt_gen_random):
157 Use CryptAcquireContextW.
158 * ntdll.h (STATUS_PROCEDURE_NOT_FOUND): Define.
159 * sec_auth.cc (open_local_policy): Rename NTSTATUS variable ret to
160 status. Drop usage of LsaNtStatusToWinError.
161 (verify_token): Call NtQuerySecurityObject instead of
162 GetKernelObjectSecurity.
163 (create_token): Rename NTSTATUS variable ret to status. Rename ret2 to
164 sub_status. Drop usage of LsaNtStatusToWinError. In case LsaLogonUser
165 fails, report the sub_status as well.
167 2011-04-01 Corinna Vinschen <corinna@vinschen.de>
169 * libc/strptime.c: Remove misleading comment.
171 2011-03-31 Corinna Vinschen <corinna@vinschen.de>
173 * ntdll.h: Allow usage from plain C code.
174 (FSCTL_PIPE_IMPERSONATE): Define.
175 (enum _THREAD_INFORMATION_CLASS): Define.
176 (RTL_QUERY_REGISTRY_xxx): Define.
177 (RTL_REGISTRY_xxx): Define.
178 (PRTL_QUERY_REGISTRY_ROUTINE): Define.
179 (struct _RTL_QUERY_REGISTRY_TABLE): Define.
180 (enum _KEY_VALUE_INFORMATION_CLASS): Define.
181 (struct _KEY_VALUE_PARTIAL_INFORMATION): Define.
182 (NtAccessCheck): Declare.
183 (NtAllocateLocallyUniqueId): Declare.
184 (NtCreateKey): Declare.
185 (NtDuplicateToken): Declare.
186 (NtLoadKey): Declare.
187 (NtOpenKey): Declare.
188 (NtOpenProcessToken): Declare.
189 (NtOpenThreadToken): Declare.
190 (NtPrivilegeCheck): Declare.
191 (NtQueryInformationToken): Declare.
192 (NtQueryValueKey): Declare.
193 (NtSetInformationThread): Declare.
194 (NtSetInformationToken): Declare.
195 (NtSetValueKey): Declare.
196 (RtlAbsoluteToSelfRelativeSD): Declare.
197 (RtlAddAccessAllowedAce): Declare.
198 (RtlAddAccessDeniedAce): Declare.
199 (RtlAddAce): Declare.
200 (RtlCheckRegistryKey): Declare.
201 (RtlCopySid): Declare.
202 (RtlCreateAcl): Declare.
203 (RtlCreateRegistryKey): Declare.
204 (RtlCreateSecurityDescriptor): Declare.
205 (RtlEqualPrefixSid): Declare.
206 (RtlEqualSid): Declare.
207 (RtlFirstFreeAce): Declare.
208 (RtlGetAce): Declare.
209 (RtlGetDaclSecurityDescriptor): Declare.
210 (RtlGetGroupSecurityDescriptor): Declare.
211 (RtlGetOwnerSecurityDescriptor): Declare.
212 (RtlIdentifierAuthoritySid): Declare.
213 (RtlInitializeSid): Declare.
214 (RtlLengthSid): Declare.
215 (RtlQueryRegistryValues): Declare.
216 (RtlSetControlSecurityDescriptor): Declare.
217 (RtlSetDaclSecurityDescriptor): Declare.
218 (RtlSetGroupSecurityDescriptor): Declare.
219 (RtlSetOwnerSecurityDescriptor): Declare.
220 (RtlSubAuthorityCountSid): Declare.
221 (RtlSubAuthoritySid): Declare.
222 (RtlWriteRegistryValue): Declare.
224 2011-03-31 Corinna Vinschen <corinna@vinschen.de>
226 * uinfo.cc (cygheap_user::init): Don't call GetUserName. Fetch username
227 from Windows environment instead. Explain why.
228 (cygheap_user::env_domain): Use MAX_DOMAIN_NAME_LEN rather than DNLEN
229 to specify the size of the domain name buffer.
231 2011-03-30 Corinna Vinschen <corinna@vinschen.de>
233 * hires.h: Fix copyright.
235 (FACTOR): Add comment.
237 (JITTER): New definition. Comment.
238 (systime_ns): Avoid gratuitous copying of the value returned by
239 GetSystemTimeAsFileTime.
240 (corelocaltime, localtime, gmtime): Remove very old, unused code block.
241 (cygwin_tzset): Remove.
242 (hires_ms::timeGetTime_ns): Add missing semicolon in comment.
243 (hires_ms::nsecs): Redefine check for difference between internal
244 timer value and system time.
246 2011-03-30 Corinna Vinschen <corinna@vinschen.de>
248 * times.cc (hires_ms::resolution): Make sure resolution is never 0.
249 (clock_setres): Ditto.
251 2011-03-29 Corinna Vinschen <corinna@vinschen.de>
253 * cygtls.h (struct _local_storage): Redefine process_ident as wchar_t
255 * syslog.cc (CYGWIN_LOG_NAME): Convert to wide char constant.
256 (openlog): Convert incoming ident string to wide char. Fix formatting.
257 (vsyslog): Print ident string as wide char string. Convert message
258 string to wide char and call UNICODE Win32 Event functions to make sure
259 to use correct codeset.
260 * tlsoffset.h: Regenerate.
262 2011-03-29 Corinna Vinschen <corinna@vinschen.de>
264 * fhandler_socket.cc (get_inet_addr): Make externally available.
265 * autoload.cc (GetUdpTable): Define.
266 * syslog.cc (connect_syslogd): Use get_inet_addr rather than _stat64
267 to check for local socket file. Create socket with type returned by
268 get_inet_addr. If connect on UDP socket works, test if there's
269 really a listening peer, otherwise fall back to Windows event log.
270 (try_connect_syslogd): Use syslogd_inited flag to check if syslogd
273 2011-03-29 Corinna Vinschen <corinna@vinschen.de>
275 * uinfo.cc (cygheap_user::env_domain): Use LookupAccountSidW and
276 convert user and domain to multibyte strings to make sure to use
279 2011-03-29 Corinna Vinschen <corinna@vinschen.de>
281 * autoload.cc (UuidCreate): Remove.
282 (UuidCreateSequential): Remove.
283 * passwd.cc (internal_getpwsid): Avoid a strict-aliasing compiler
284 error with gcc 4.5.1.
285 * fhandler_floppy.cc (fhandler_dev_floppy::get_drive_info): Ditto.
286 * ntdll.h (NtAllocateUuids): Declare.
287 * syscalls.cc (gethostid): Use NtAllocateUuids function rather than
288 UuidCreateSequential/UuidCreate to get rid of rpcrt4 dependency.
290 2011-03-29 Corinna Vinschen <corinna@vinschen.de>
292 * cygwin.din (pthread_spin_destroy): Export.
293 (pthread_spin_init): Export.
294 (pthread_spin_lock): Export.
295 (pthread_spin_trylock): Export.
296 (pthread_spin_unlock): Export.
297 * posix.sgml (std-susv4): Add pthread_spin_destroy, pthread_spin_init,
298 pthread_spin_lock, pthread_spin_trylock, pthread_spin_unlock.
299 (std-notimpl): Remove pthread_spin_[...].
300 * pthread.cc (pthread_spin_init): New function.
301 * thread.cc (pthread_spinlock::is_good_object): New function.
302 (pthread_mutex::pthread_mutex): Rearrange initializers to accommodate
303 protected data in pthread_mutex.
304 (pthread_spinlock::pthread_spinlock): New constructor.
305 (pthread_spinlock::lock): New method.
306 (pthread_spinlock::unlock): New method.
307 (pthread_spinlock::init): New method.
308 (pthread_spin_lock): New function.
309 (pthread_spin_trylock): New function.
310 (pthread_spin_unlock): New function.
311 (pthread_spin_destroy): New function.
312 * thread.h (PTHREAD_SPINLOCK_MAGIC): Define.
313 (class pthread_mutex): Change access level of members shared with
314 derived classes to protected.
315 (pthread_mutex::set_shared): New protected method.
316 (class pthread_spinlock): New class, derived class of pthread_mutex.
317 * include/pthread.h (pthread_spin_destroy): Declare.
318 (pthread_spin_init): Declare.
319 (pthread_spin_lock): Declare.
320 (pthread_spin_trylock): Declare.
321 (pthread_spin_unlock): Declare.
322 * include/cygwin/types.h (pthread_spinlock_t): New typedef.
323 * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
325 2011-03-29 Corinna Vinschen <corinna@vinschen.de>
327 * net.cc (SIO_BASE_HANDLE): Define.
328 (fdsock): If we got an LSP handle, try to create a copy of the base
329 handle instead. Change comment to explain.
331 2011-03-29 Corinna Vinschen <corinna@vinschen.de>
333 * include/cygwin/version.h: Bump CYGWIN_VERSION_DLL_MINOR to 10.
335 2011-03-29 Corinna Vinschen <corinna@vinschen.de>
337 * autoload.cc (winmm): Remove time functions. Don't treat
338 unloadable wave functions as fatal.
339 * hires.h (hires_ms::timeGetTime_ns): New private method.
340 (hires_ms::dmsecs): Call timeGetTime_ns here.
341 * ntdll.h (struct _KSYSTEM_TIME): Define.
342 (KUSER_SHARED_DATA): Redefine to allow access to InterruptTime.
343 (SharedUserData): Define here.
344 (NtQueryTimerResolution): Declare.
345 (NtSetTimerResolution): Declare.
346 * path.cc (SharedUserData): Move to ntdll.h.
347 * times.cc (hires_ms::timeGetTime_ns): New private method.
348 Use throughout instead of timeGetTime. Document entire functionality
349 of timeGetTime in case we need it.
350 (hires_ms::resolution): Try a call to NtQueryTimerResolution
351 to fetch current period. Fall back to heuristic if that fails.
352 Cast to DWORD in assignments to minperiod.
353 (clock_setres): Align period to possible values per a call to
354 NtQueryTimerResolution. Explain why. Replace calls to timeBeginPeriod
355 and timeEndPeriod with underlying call to NtSetTimerResolution. Use
356 status code from NtSetTimerResolution to compute errno.
357 Convert period to ULONGLONG and store 100ns value to simplify code.
359 2011-03-29 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
360 Corinna Vinschen <corinna@vinschen.de>
362 * include/sys/xattr.h: New file.
364 2011-03-28 Jon TURNEY <jon.turney@dronecode.org.uk>
366 * thread.cc (semaphore::init, destroy, close): Standards conformance
367 fix. On a failure, return -1 and set errno.
368 * thread.h (semaphore::terminate): Save errno since semaphore::close()
371 2011-03-27 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
373 * cygwin.din (strchrnul): Export.
374 * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
375 * posix.sgml (std-gnu): Add strchrnul.
377 2011-03-27 Christopher Faylor <me.cygwin2011@cgf.cx>
379 * dll_init.cc (dll::init): Accommodate ill-behaved dlls who don't fill
382 2011-03-25 Corinna Vinschen <corinna@vinschen.de>
384 * mmap.cc (mmap64): Add a cheat to let a certain autoconf test succeed
385 on 64 bit systems. Explain why.
387 2011-03-23 Christopher Faylor <me.cygwin2011@cgf.cx>
389 * wincap.cc (wincap_2003): Set use_dont_resolve_hack to true.
391 2011-03-23 Christopher Faylor <me.cygwin2011@cgf.cx>
393 * autoload.cc (dll_load): Change error message to make it clear if a
394 newer DLL is being run.
396 2011-03-20 Corinna Vinschen <corinna@vinschen.de>
398 * fenv.cc (_feinitialise): Don't use SSE instructions on systems not
400 * wincap.h (wincaps::supports_sse): New element.
401 * wincap.cc: Implement above element throughout.
403 2011-03-18 Corinna Vinschen <corinna@vinschen.de>
405 * cygwin.sc: Raise default cygheap size to 2 Megs.
407 2011-03-18 Christopher Faylor <me.cygwin2011@cgf.cx>
409 * fhandler.h (DEFAULT_PIPEBUFSIZE): Reset to 64K.
411 2011-03-18 Corinna Vinschen <corinna@vinschen.de>
413 * mmap.cc (mmap_record::alloc_fh): Initialize name strings in fdev to
414 empty strings or suffer a SEGV. Drop second parameter in call to
417 2011-03-18 Corinna Vinschen <corinna@vinschen.de>
419 * mmap.cc (class mmap_record): Pack 4 byte-aligned. Convert member dev
421 (mmap_record::alloc_fh): Create temporary device from dev and use in
422 call to build_fh_dev.
424 2011-03-18 Corinna Vinschen <corinna@vinschen.de>
426 * mmap.cc (mmap_record::page_map): Define as variable array rather than
428 (mmap_record::alloc_page_map): Remove.
429 (mmap_record::free_page_map): Remove.
430 (mmap_record::init_page_map): New method.
431 (mmap_record::add_record): Take mmap_record parameter by reference
432 rather than by value.
433 (mmap_record::map_pages): Fix comment.
434 (mmap_list::add_record): Allocate space for mmap_record including the
435 page_map in a single ccalloc call. Call init_page_map afterwards.
436 (mmap_list::del_record): Remove call to mmap_record::free_page_map.
438 2011-03-16 Corinna Vinschen <corinna@vinschen.de>
440 * crt0.c (mainCRTStartup): Move call to _feinitialise from here...
441 * dcrt0.cc (_dll_crt0): ...to here.
443 2011-03-16 Corinna Vinschen <corinna@vinschen.de>
445 * winver.rc: Fix copyright dates.
447 2011-03-14 Corinna Vinschen <corinna@vinschen.de>
449 * fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Only use
450 file id as inode number if it masters the isgood_inode check.
452 2011-03-13 Christopher Faylor <me.cygwin2011@cgf.cx>
454 * fhandler.cc (fhandler_base_overlapped::wait_overlapped): Remove
455 special treatment for ERROR_NO_SYSTEM_RESOURCES. Cancel I/O and reset
456 the overlapped handle on error.
457 (fhandler_base_overlapped::write_overlapped): Limit writes to
458 max_atomic_write bytes in blocking case. Incorporate code from
459 now-defunct write_overlapped_fallback. Fix serious oversight where ptr
460 was not advanced as buffer was written.
461 (fhandler_base_overlapped::write_overlapped_fallback): Eliminate.
462 * fhandler.h (fhandler_base_overlapped::write_overlapped_fallback):
463 Ditto for declaration.
464 (DEFAULT_PIPEBUFSIZE): Lower size to slightly less than documented
465 worst-case atomic write size.
466 (fhandler_overlapped::wait_return): Remove unused element.
468 2011-03-09 Christopher Faylor <me.cygwin2011@cgf.cx>
470 * fhandler.cc (fhandler_base_overlapped::wait_overlapped): Handle
471 overlapped_fallback error condition like other error conditions. Set
472 res carefully and specifically for each condition rather than resorting
474 (fhandler_base_overlapped::write_overlapped): Preserve errno in
475 overlapped_fallback condition. Correct write_overlapped_fallback to
476 avoid inappropriate looping.
477 (fhandler_base_overlapped::write_overlapped_fallback): Add some more
480 2011-03-09 Christopher Faylor <me.cygwin2011@cgf.cx>
482 * fhandler.cc (fhandler_base_overlapped::write_overlapp): Oops!
483 Accommodate change in arguments to wait_overlapped.
485 2011-03-09 Christopher Faylor <me+cygwin@cgf.cx>
487 * errno.cc (errmap): Change mapping of NO_SYSTEM_RESOURCES to EFBIG.
488 * fhandler.cc (MAX_OVERLAPPED_WRITE_LEN): New constant.
489 (MIN_OVERLAPPED_WRITE_LEN): Ditto.
490 (fhandler_base_overlapped::close): Accommodate change in arguments to
492 (fhandler_base_overlapped::setup_overlapped): Add __stdcall and regparm
494 (fhandler_base_overlapped::destroy_overlapped): Ditto.
495 (fhandler_base_overlapped::has_ongoing_io): Ditto.
496 (fhandler_base_overlapped::wait_overlapped): Modify to return an enum
497 returning various states. Accept nonblocking parameter.
498 (fhandler_base_overlapped::read_overlapped): Add __stdcall and regparm
499 modifiers. Rework to attempt to be smarter about reacting to states
500 returned by wait_overlapped.
501 (fhandler_base_overlapped::write_overlapped): Ditto. Add fallback
502 option for when wait_overlapped detects that smaller chunks must be
504 (fhandler_base_overlapped::write_overlapped_fallback): Ditto.
505 * fhandler.h (DEFAULT_PIPEBUFSIZE): Move definition here from pipe.cc.
506 (fhandler_base::has_ongoing_io): Define with __stdcall and regparm
508 (fhandler_base_overlapped::wait_return): New enum.
509 (fhandler_base_overlapped::max_atomic_write): New variable.
510 (fhandler_base_overlapped:: wait_overlapped): Accommodate changes
511 mentioned above to arguments and modifiers.
512 (fhandler_base_overlapped::setup_overlapped): Ditto for modifiers.
513 (fhandler_base_overlapped::read_overlapped): Ditto.
514 (fhandler_base_overlapped::write_overlapped): Ditto.
515 (fhandler_base_overlapped::destroy_overlapped): Ditto.
516 (fhandler_base_overlapped::has_ongoing_io): Ditto.
517 (fhandler_base_overlapped::fhandler_base_overlapped): Zero
519 * fhandler_fifo.cc (fhandler_fifo::fhandler_fifo): Set max_atomic_write
520 to the size of the DEFAULT_PIPEBUFSIZE.
521 (fhandler_fifo::wait): Accommodate change in arguments to
523 * pipe.cc (fhandler_pipe::fhandler_pipe): Set max_atomic_write to the
524 size of the DEFAULT_PIPEBUFSIZE.
525 (fhandler_pipe::create_selectable): Allow minimum size of DEFAULT_PIPEBUFSIZE.
526 (DEFAULT_PIPEBUFSIZE): Delete here, move to fhandler.h.
528 2011-03-08 Corinna Vinschen <corinna@vinschen.de>
530 * security.cc: Fix copyright dates.
532 2011-03-08 Corinna Vinschen <corinna@vinschen.de>
534 * fhandler.cc (fhandler_base::open): When creating a file on a
535 filesystem supporting ACLs, create the file with WRITE_DAC access.
537 * fhandler_disk_file.cc (fhandler_disk_file::mkdir): Ditto for
539 * fhandler_socket.cc (fhandler_socket::bind): Ditto for sockets.
540 * path.cc (symlink_worker): Ditto for symlinks.
541 * security.cc (get_file_sd): Always call GetSecurityInfo for directories
542 on XP and Server 2003. Improve comment to explain why.
543 (set_file_attribute): Explicitely cast mode_t value to bool in call to
545 * wincap.h (wincaps::use_get_sec_info_on_dirs): New element.
546 * wincap.cc: Implement above element throughout.
548 2011-03-04 Corinna Vinschen <corinna@vinschen.de>
550 * fhandler_procsys.cc (fhandler_procsys::exists): Rewrite.
551 (fhandler_procsys::fill_filebuf): Fill buffer with valid string even if
552 reading the symlink fails.
554 2011-03-03 Corinna Vinschen <corinna@vinschen.de>
556 * posix_ipc.cc (ipc_cond_timedwait): If ipc_mutex_unlock fails, return
558 (_mq_send): Break loop if ipc_cond_timedwait returns with error.
559 (_mq_receive): Ditto.
561 2011-03-03 Corinna Vinschen <corinna@vinschen.de>
563 * errno.cc (__xpg_strerror_r): Add accidentally missing condition.
565 2011-03-02 Corinna Vinschen <corinna@vinschen.de>
567 * fhandler_procsys.cc (fhandler_procsys::open): Call worker exists
568 method, rather than wrapper.
570 2011-03-01 Christopher Faylor <me+cygwin@cgf.cx>
572 * autoload.cc (dll_load): Avoid in_forkee test since this apparently
573 fails even when not forked.
575 2011-03-01 Christopher Faylor <me+cygwin@cgf.cx>
577 * include/cygwin/version.h: Bump CYGWIN_VERSION_DLL_MINOR to 9.
579 2011-02-28 Christopher Faylor <me+cygwin@cgf.cx>
581 * autoload.cc (dll_load): Only perform DONT_RESOLVE_DLL_REFERENCES hack
582 on systems which need it.
583 * wincap.cc (use_dont_resolve_hack): Set as appropriate.
584 * wincap.h (use_dont_resolve_hack): Define.
586 2011-02-28 Christopher Faylor <me+cygwin@cgf.cx>
588 * autoload.cc (dll_load): Make inline. Clarify logic.
590 2011-02-27 Corinna Vinschen <corinna@vinschen.de>
592 * autoload.cc (dll_load): Only call LoadLibraryExW with
593 DONT_RESOLVE_DLL_REFERENCES if a normal LoadLibrary call failed with
594 ERROR_INVALID_ADDRESS.
595 (LsaRegisterLogonProcess): Align comment to previous change.
597 2011-02-26 Christopher Faylor <me+cygwin@cgf.cx>
599 * autoload.cc: Use LoadDLLfuncEx3 for all winmm functions. Accommodate
600 changes to LoadDLLprime.
601 (LoadDLLprime): Take an extra argument indicating whether this dll
602 needs special handling on fork. Place this information in the "handle"
604 (LoadDLLfuncEx3): Eliminate "func" handling. Pass new
605 no_resolve_on_fork argument to LoadDLLprime.
606 (dll_load): New function.
607 (std_dll_init): Accommodate changes to dll_info::handle. Use dll_load
608 to load DLL in both cases where it is used.
610 2011-02-26 Corinna Vinschen <corinna@vinschen.de>
612 * autoload.cc: Make autoloaded ntdll function non-optional. Ditto for
613 secur32 functions, except for LsaRegisterLogonProcess. Change return
614 value to ERROR_PROC_NOT_FOUND. Explain why.
615 * sec_auth.cc (lsaauth): Handle ERROR_PROC_NOT_FOUND from call to
616 LsaRegisterLogonProcess when generating the errno value.
618 2011-02-22 Corinna Vinschen <corinna@vinschen.de>
620 * dcrt0.cc: Fix copyright dates.
622 * syscalls.cc (_read): Move EXPORT_ALIAS to its rightful place.
624 2011-02-21 Christopher Faylor <me+cygwin@cgf.cx>
626 * cygwin.din: Mark __assert* and _abort as NOSIGFE.
628 2011-02-21 Corinna Vinschen <corinna@vinschen.de>
630 * fhandler_socket (fhandler_socket::readv): Call recv_internal directly,
632 (fhandler_socket::writev): Call send_internal directly, rather than
634 * net.cc (cygwin_recv): Call fhandler_socket::recvfrom directly, rather
635 than cygwin_recvfrom.
636 (cygwin_send): Call fhandler_socket::sendto directly, rather than
639 2011-02-20 Christopher Faylor <me+cygwin@cgf.cx>
641 * fhandler.cc (fhandler_base_overlapped::close): Finish any pending I/O
643 (fhandler_base_overlapped::wait_overlapped): Defensively zero bytes
644 read. Add more info to debugging output.
646 2011-02-18 Christopher Faylor <me+cygwin@cgf.cx>
648 * dcrt0.cc (dll_crt0_1): Add a CYGHEAP_DEBUG conditional for debugging
649 which allocates a lot of space at startup.
651 2011-02-18 Corinna Vinschen <corinna@vinschen.de>
653 * cygwin.sc: Set alignment of .cygheap section to 64K.
655 2011-02-15 Corinna Vinschen <corinna@vinschen.de>
657 * spawn.cc (spawn_guts): Only set PID_NOTCYGWIN in _P_OVERLAY mode.
658 Drop flag if creating new process failed.
660 2011-02-15 Corinna Vinschen <corinna@vinschen.de>
662 * Throughout fix copyright dates.
664 2011-02-15 Corinna Vinschen <corinna@vinschen.de>
666 * devices.in: Throughout use slashes instead of backslashes in the
667 native path of devices not backed by native NT devices.
668 * devices.cc: Regenerate.
669 * globals.cc (ro_u_pmem): Use correct case.
670 (ro_u_globalroot): New R/O unicode string.
671 * path.cc (path_conv::check): Fix incorrect handling of /proc/sys
672 block devices if they are just visited due to a component check.
673 (symlink_info::posixify): Fix typo in comment.
674 (cygwin_conv_path): Use ro_u_globalroot instead of string constant.
675 (fast_cwd_version): New shared variable to store FAST_CWD version
677 (find_fast_cwd_pointer): Rename from find_fast_cwd_pointers. Don't
678 set global fast_cwd_ptr pointer here. Return pointer value instead.
679 (find_fast_cwd): New function to set fast_cwd_ptr and fast_cwd_version.
680 (cwdstuff::override_win32_cwd): Call find_fast_cwd from here.
681 Check for fast_cwd_version to differ between old and new FAST_CWD
682 structure. Check old_cwd for NULL to avoid SEGV. Don't set CWD if
683 we have neitehr a valid fast_cwd_ptr, nor a valid CWD handle in the
684 process parameter block.
685 (cwdstuff::set): Create Win32 path taking /proc/sys paths into account.
686 * spawn.cc (spawn_guts): Recode creating runpath. Also take /proc/sys
687 paths into account. Drop special CWD handling when starting non-Cygwin
690 2011-02-15 Corinna Vinschen <corinna@vinschen.de>
692 * fhandler_procsys.cc (fhandler_procsys::opendir): Avoid SEGV if
693 opening object directory fails.
694 * fhandler_virtual.cc (fhandler_virtual::opendir): Don't leak memory.
696 2011-02-15 Corinna Vinschen <corinna@vinschen.de>
698 * fhandler_disk_file.cc (fhandler_disk_file::readdir_helper): Don't
699 append slash if there is one already.
701 2011-02-15 Corinna Vinschen <corinna@vinschen.de>
703 Revert change from 2010-08-31:
704 * path.cc (normalize_posix_path): Drop support for //./ and //?/
706 (path_conv::check): Ditto.
708 2011-02-15 Corinna Vinschen <corinna@vinschen.de>
710 * fhandler_disk_file.cc (fhandler_disk_file::readdir_helper): Use POSIX
711 path to check for symlink.
713 2011-02-14 Corinna Vinschen <corinna@vinschen.de>
715 * config/i386/profile.h: Sync with Mingw.
717 2011-02-13 Corinna Vinschen <corinna@vinschen.de>
719 * path.cc (struct _FAST_CWD): Redefine to new layout used since patch
720 for KB 2393802. Adjust comments throughout.
721 (struct _FAST_CWD_OLD): Rename former definition.
722 (cwdstuff::override_win32_cwd): Check if the OS is using the old or the
723 new FAST_CWD structure layout and handle accordingly.
725 2011-02-11 Christopher Faylor <me+cygwin@cgf.cx>
727 * mkstatic: Make sure that we are not cd'ed to temporary directory on
728 exit to avoid bogus warnings on directory cleanup.
732 2011-02-11 Christopher Faylor <me+cygwin@cgf.cx>
734 * cygwin.sc: Eliminate __cygheap_mid.
737 2011-02-11 Christopher Faylor <me+cygwin@cgf.cx>
739 * cygheap.cc (_cygheap_mid): Drop unneeded section attribute.
740 (cygheap_init): Just zero cygheap structure.
741 * cygwin.sc: Keep 16 byte alignment but drop all other alignments
742 related to cygheap. Eliminate unused __cygheap_end1.
744 2011-02-11 Corinna Vinschen <corinna@vinschen.de>
746 * cygwin.sc: Raise default cygheap size to 1 Meg. Set alignment to
749 2011-02-11 Corinna Vinschen <corinna@vinschen.de>
751 * include/endian.h: Move definitions of __BIG_ENDIAN, __LITTLE_ENDIAN,
752 and __BYTE_ORDER into ...
753 * include/bits/endian.h: New file.
754 * include/arpa/nameser_compat.h: Include endian.h rather than defining
756 * include/asm/byteorder.h: Include bits/endian.h. Drop definition of
758 * include/netinet/ip.h: Include bits/endian.h. Drop definitions of
759 BIG_ENDIAN, LITTLE_ENDIAN, and BYTE_ORDER. Use underscored variants
760 of aforementioned constants.
761 * include/netinet/tcp.h: Ditto.
762 * include/sys/param.h: Drop disabled definitions of BIG_ENDIAN,
763 LITTLE_ENDIAN, and BYTE_ORDER.
765 * include/netinet/ip.h: Reformat. Define setsockopt IP_TOS options
766 matching recent RFCs. Tweak comments.
768 2011-02-10 Eric Blake <eblake@redhat.com>
770 * errno.cc (includes): Avoid compilation failure if <string.h>
771 settles on wrong strerror_r signature.
773 * errno.cc (__xpg_strerror_r): New function.
774 (strerror_r): Update to copy newlib's fixes.
775 (strerror): Set errno on failure.
776 (_sys_errlist): Cause EINVAL failure for reserved values.
777 * cygwin.din: Export new function.
778 * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Combine
781 2011-02-09 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
783 * cygwin.din (pthread_yield): Export as alias to sched_yield.
784 * include/pthread.h (pthread_yield): Declare.
785 * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
786 * posix.sgml (std-deprec): Add pthread_yield.
788 2011-02-09 Christopher Faylor <me+cygwin@cgf.cx>
790 * cygheap.cc: Add some __stdcall decoration where appropriate.
791 * lib/cygwin_crt0.c: __attribute -> __attribute__.
793 2011-02-09 Christopher Faylor <me+cygwin@cgf.cx>
795 * hookapi.cc (hook_or_detect_cygwin): Prevent i from being considered
796 uninitialized by gcc.
798 2011-02-09 Christopher Faylor <me+cygwin@cgf.cx>
800 * exception.h: Remove DEBUG_EXCEPTION left over debugging ifdef.
802 2011-02-08 Christopher Faylor <me+cygwin@cgf.cx>
804 * dll_init.cc: Fix typo in comment.
806 2011-02-07 Corinna Vinschen <corinna@vinschen.de>
808 * configure.in: Remove AC_ALLOCA test and test for __builtin_memset.
809 * configure: Regenerate.
811 2011-02-07 Corinna Vinschen <corinna@vinschen.de>
813 * fhandler_console.cc (fhandler_console::write_normal): Remove
814 erroneous premature return after collecting truncated multibyte
815 sequence in trunc_buf. Rather fall through to printing routine.
816 Fix return value to take trunc_buf content into account. Improve
819 2011-02-05 Christopher Faylor <me+cygwin@cgf.cx>
821 * autoload.cc (wsock_init): Properly define WSAStartup function pointer
822 to avoid stack damage.
824 2011-02-02 Corinna Vinschen <corinna@vinschen.de>
826 * libc/bsdlib.cc: Include err.h.
828 2011-02-02 Eric Blake <eblake@redhat.com>
830 * include/err.h: Fix loss of semicolons in previous patch.
832 2011-02-02 Corinna Vinschen <corinna@vinschen.de>
834 * include/err.h (err): Add noreturn attribute.
839 2011-02-02 Corinna Vinschen <corinna@vinschen.de>
841 * path.cc (conv_path_list): Remove enclosing quotes and trailing
842 backslashes from Win32 environment path lists.
844 2011-02-01 Christian Franke <franke@computer.org>
846 * fhandler.cc (fhandler_base::fsync): Ignore ERROR_INVALID_FUNCTION
847 error from FlushFileBuffers().
849 2011-01-31 Corinna Vinschen <corinna@vinschen.de>
851 * syscalls.cc (utmp_data): Fix potential buffer overflow.
853 2011-01-31 Corinna Vinschen <corinna@vinschen.de>
855 * fhandler_socket.cc (address_in_use): Improve comment readability.
857 2011-01-30 Corinna Vinschen <corinna@vinschen.de>
859 * fhandler_socket.cc (address_in_use): Disable. Add comment.
860 (fhandler_socket::bind): Change comment to explain setting the
861 SO_EXCLUSIVEADDRUSE socket option. Remove code which checks for
863 * net.cc (cygwin_setsockopt): Never set SO_REUSEADDR option. Improve
864 comment to compensate for the deleted comment in fhandler_socket::bind.
865 * wincap.cc: Throughout, drop has_enhanced_socket_security from wincaps.
866 * wincap.h (struct wincaps): Drop has_enhanced_socket_security flags
869 2011-01-28 Peter Foley <jpfoley2@verizon.net>
871 * configure.in: Define LIBSERVER regardless of cross_host.
872 * configure: Regenerate.
874 2011-01-28 Corinna Vinschen <corinna@vinschen.de>
876 * fhandler_socket.cc (fhandler_socket::wait_for_events): Call
877 pthread_testcancel in case of timeout to enable pthread_cancel
880 2011-01-27 Corinna Vinschen <corinna@vinschen.de>
882 * include/features.h (__STDC_ISO_10646__): Move to newlib's
885 2011-01-26 Corinna Vinschen <corinna@vinschen.de>
887 * fhandler_disk_file.cc (fhandler_base::fstat_by_nfs_ea): Fix
888 computation of st_blocks.
889 (fhandler_base::fstat_helper): Fix formatting.
891 2011-01-24 Corinna Vinschen <corinna@vinschen.de>
893 * include/features.h (__STDC_ISO_10646__): Define. Add comment.
895 2011-01-21 Corinna Vinschen <corinna@vinschen.de>
897 * syscalls.cc (rename): Fix permission problem with symlinks on NFS.
898 Rework how NtOpenFile gets called to make it more readable. Change
901 2011-01-20 Corinna Vinschen <corinna@vinschen.de>
903 * exec.cc: Include pinfo.h.
904 * winf.h: Move definitions of _P_PATH_TYPE_EXEC and _P_MODE from here...
905 * pinfo.h: ...to here.
906 (_P_PATH_TYPE_EXEC): Redefine to be bigger than _P_SYSTEM.
907 (_P_MODE): Redefine so as not to mask out _P_SYSTEM.
908 * spawn.cc (spawnlp): Add _P_PATH_TYPE_EXEC flag in call to spawnve.
912 2011-01-19 Corinna Vinschen <corinna@vinschen.de>
914 * spawn.cc (av::fixup): Reenable #! handling for all exec functions.
915 Return ENOEXEC in !p_type_exec case only for unrecognized files.
916 Fix comment formatting.
918 2011-01-19 Corinna Vinschen <corinna@vinschen.de>
920 * exec.cc (execlp): Add missing _P_PATH_TYPE_EXEC flag in call to
923 2011-01-19 Corinna Vinschen <corinna@vinschen.de>
925 * exec.cc: Rearrange functions in alphabetical order.
926 (_execve): Drop temporary define and drop export alias.
927 (execl): Call spawnve.
928 (execle): New function.
929 (execlp): New function.
930 (execv): Call spawnve.
931 (execve): Drop converting NULL envp to emtpy envp.
932 (execvp): Call spawnve.
933 (execvpe): Drop converting NULL envp to emtpy envp. Call spawnve.
934 (fexecve): Call spawnve.
935 * spawn.cc (spawnve): Convert NULL envp to emtpy envp. Remove outdated
937 (spawnlp): Call spawnve.
940 (spawnvpe): Fix formatting.
942 2011-01-19 Corinna Vinschen <corinna@vinschen.de>
944 * exec.cc (strccpy): Move function from here...
945 * strfuncs.cc (strccpy): ...to here.
946 * string.h (strccpy): Declare.
947 * winsup.h (strccpy): Drop declaration.
949 2011-01-19 Corinna Vinschen <corinna@vinschen.de>
951 * errno.cc (errmap): Add error codes for invalid binaries.
952 * exec.cc (execvp): Call spawnve with _P_PATH_TYPE_EXEC flag
955 * spawn.cc (spawn_guts): Filter _P_PATH_TYPE_EXEC from mode and
956 store in p_type_exec. Call av::fixup with addtional p_type_exec
958 (spawnve): Check for filtered mode.
959 (spawnvpe): Add _P_PATH_TYPE_EXEC flag when calling spawnve.
960 (av::fixup): Accept additional bool parameter p_type_exec. Only check
961 for script if p_type_exec is true.
962 * winf.h (_P_PATH_TYPE_EXEC): Define.
964 (av::fixup): Declare with additional bool parameter.
966 2011-01-17 Corinna Vinschen <corinna@vinschen.de>
968 * fhandler_proc.cc (format_proc_partitions): Fix compiler warning.
970 2011-01-17 Corinna Vinschen <corinna@vinschen.de>
972 * path.cc (path_conv::check): Don't follow reparse point symlinks if
973 PC_SYM_NOFOLLOW_REP flag is set.
974 (cygwin_conv_path): Set PC_SYM_NOFOLLOW_REP flag when converting from
976 * path.h (enum pathconv_arg): Define PC_SYM_NOFOLLOW_REP flag.
978 2011-01-17 Corinna Vinschen <corinna@vinschen.de>
980 * fhandler_proc.cc (proc_tab_cmp): Fix typo in comment.
981 (fhandler_proc::fill_filebuf): Handle return value of 0 from format
983 (format_proc_stat): Set errno when returning 0 size.
984 (format_proc_partitions): Rewrite method to fetch partition info.
986 2011-01-13 Corinna Vinschen <corinna@vinschen.de>
988 * fhandler_disk_file.cc (fhandler_base::fstat_helper): Always set
989 st_size of directories to 0. Explain why.
991 2011-01-12 Corinna Vinschen <corinna@vinschen.de>
993 * posix.sgml: Add madvise to BSD list.
995 2011-01-12 Corinna Vinschen <corinna@vinschen.de>
997 * cygwin.din (madvise): Export posix_madvise as madvise.
998 * include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR.
999 * include/sys/mman.h: Define madvise constants, keep Linux-specific
1000 constants undefined.
1003 2011-01-12 Corinna Vinschen <corinna@vinschen.de>
1005 * fhandler.h (struct part_t): New type.
1006 (class fhandler_dev_floppy): Convert partitions to part_t pointer.
1007 Add lock_partition method.
1008 * fhandler_floppy.cc (fhandler_dev_floppy::lock_partition): New method
1009 to implement ondemand partition locking.
1010 (fhandler_dev_floppy::write_file): Call lock_partition from here if
1011 writing failed due to a potential write restriction on a disk
1013 (fhandler_dev_floppy::open): Don't lock partitions here.
1014 (fhandler_dev_floppy::close): Keep track of partition handle reference
1015 count. Close handles and remove partitions pointer ony if count is 0.
1016 (fhandler_dev_floppy::dup): Just copy partitions pointer and increment
1019 2011-01-11 Corinna Vinschen <corinna@vinschen.de>
1021 * fhandler.h (MAX_PARTITIONS): New definition.
1022 (class fhandler_dev_floppy): Add partitions array member. Add close
1024 * fhandler_floppy.cc (fhandler_dev_floppy::fhandler_dev_floppy): Zero
1025 out partitions array.
1026 (fhandler_dev_floppy::open): Fix "entire disk" condition for call to
1027 DeviceIoControl (FSCTL_ALLOW_EXTENDED_DASD_IO).
1028 When opening disks for writing, call DeviceIoControl (FSCTL_LOCK_VOLUME)
1029 on all affected disk partitions starting with Vista.
1030 (fhandler_dev_floppy::close): New method.
1031 (fhandler_dev_floppy::dup): Duplicate handles in partitions, if any.
1032 * wincap.h (wincaps::has_restricted_raw_disk_access): New element.
1033 * wincap.cc: Implement above element throughout.
1035 2011-01-11 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
1037 * termios.cc (cfgetospeed, cfgetispeed): Constify argument per POSIX.
1038 * include/sys/termios.h (cfgetospeed, cfgetispeed): Declare functions.
1039 Move macros after declarations and make conditional on !__cplusplus.
1041 2011-01-11 Corinna Vinschen <corinna@vinschen.de>
1043 * cygtls.cc (_cygtls::init_thread): Call _REENT_INIT_PTR. Drop setting
1044 current locale and calling srand48.
1046 2011-01-02 Christopher Faylor <me+cygwin@cgf.cx>
1048 * ChangeLog-2010: Create from ChangeLog.
1049 * ChangeLog: Start fresh.