1 2011-04-01 Corinna Vinschen <corinna@vinschen.de>
3 * libc/strptime.c: Remove misleading comment.
5 2011-03-31 Corinna Vinschen <corinna@vinschen.de>
7 * ntdll.h: Allow usage from plain C code.
8 (FSCTL_PIPE_IMPERSONATE): Define.
9 (enum _THREAD_INFORMATION_CLASS): Define.
10 (RTL_QUERY_REGISTRY_xxx): Define.
11 (RTL_REGISTRY_xxx): Define.
12 (PRTL_QUERY_REGISTRY_ROUTINE): Define.
13 (struct _RTL_QUERY_REGISTRY_TABLE): Define.
14 (enum _KEY_VALUE_INFORMATION_CLASS): Define.
15 (struct _KEY_VALUE_PARTIAL_INFORMATION): Define.
16 (NtAccessCheck): Declare.
17 (NtAllocateLocallyUniqueId): Declare.
18 (NtCreateKey): Declare.
19 (NtDuplicateToken): Declare.
22 (NtOpenProcessToken): Declare.
23 (NtOpenThreadToken): Declare.
24 (NtPrivilegeCheck): Declare.
25 (NtQueryInformationToken): Declare.
26 (NtQueryValueKey): Declare.
27 (NtSetInformationThread): Declare.
28 (NtSetInformationToken): Declare.
29 (NtSetValueKey): Declare.
30 (RtlAbsoluteToSelfRelativeSD): Declare.
31 (RtlAddAccessAllowedAce): Declare.
32 (RtlAddAccessDeniedAce): Declare.
34 (RtlCheckRegistryKey): Declare.
35 (RtlCopySid): Declare.
36 (RtlCreateAcl): Declare.
37 (RtlCreateRegistryKey): Declare.
38 (RtlCreateSecurityDescriptor): Declare.
39 (RtlEqualPrefixSid): Declare.
40 (RtlEqualSid): Declare.
41 (RtlFirstFreeAce): Declare.
43 (RtlGetDaclSecurityDescriptor): Declare.
44 (RtlGetGroupSecurityDescriptor): Declare.
45 (RtlGetOwnerSecurityDescriptor): Declare.
46 (RtlIdentifierAuthoritySid): Declare.
47 (RtlInitializeSid): Declare.
48 (RtlLengthSid): Declare.
49 (RtlQueryRegistryValues): Declare.
50 (RtlSetControlSecurityDescriptor): Declare.
51 (RtlSetDaclSecurityDescriptor): Declare.
52 (RtlSetGroupSecurityDescriptor): Declare.
53 (RtlSetOwnerSecurityDescriptor): Declare.
54 (RtlSubAuthorityCountSid): Declare.
55 (RtlSubAuthoritySid): Declare.
56 (RtlWriteRegistryValue): Declare.
58 2011-03-31 Corinna Vinschen <corinna@vinschen.de>
60 * uinfo.cc (cygheap_user::init): Don't call GetUserName. Fetch username
61 from Windows environment instead. Explain why.
62 (cygheap_user::env_domain): Use MAX_DOMAIN_NAME_LEN rather than DNLEN
63 to specify the size of the domain name buffer.
65 2011-03-30 Corinna Vinschen <corinna@vinschen.de>
67 * hires.h: Fix copyright.
69 (FACTOR): Add comment.
71 (JITTER): New definition. Comment.
72 (systime_ns): Avoid gratuitous copying of the value returned by
73 GetSystemTimeAsFileTime.
74 (corelocaltime, localtime, gmtime): Remove very old, unused code block.
75 (cygwin_tzset): Remove.
76 (hires_ms::timeGetTime_ns): Add missing semicolon in comment.
77 (hires_ms::nsecs): Redefine check for difference between internal
78 timer value and system time.
80 2011-03-30 Corinna Vinschen <corinna@vinschen.de>
82 * times.cc (hires_ms::resolution): Make sure resolution is never 0.
83 (clock_setres): Ditto.
85 2011-03-29 Corinna Vinschen <corinna@vinschen.de>
87 * cygtls.h (struct _local_storage): Redefine process_ident as wchar_t
89 * syslog.cc (CYGWIN_LOG_NAME): Convert to wide char constant.
90 (openlog): Convert incoming ident string to wide char. Fix formatting.
91 (vsyslog): Print ident string as wide char string. Convert message
92 string to wide char and call UNICODE Win32 Event functions to make sure
93 to use correct codeset.
94 * tlsoffset.h: Regenerate.
96 2011-03-29 Corinna Vinschen <corinna@vinschen.de>
98 * fhandler_socket.cc (get_inet_addr): Make externally available.
99 * autoload.cc (GetUdpTable): Define.
100 * syslog.cc (connect_syslogd): Use get_inet_addr rather than _stat64
101 to check for local socket file. Create socket with type returned by
102 get_inet_addr. If connect on UDP socket works, test if there's
103 really a listening peer, otherwise fall back to Windows event log.
104 (try_connect_syslogd): Use syslogd_inited flag to check if syslogd
107 2011-03-29 Corinna Vinschen <corinna@vinschen.de>
109 * uinfo.cc (cygheap_user::env_domain): Use LookupAccountSidW and
110 convert user and domain to multibyte strings to make sure to use
113 2011-03-29 Corinna Vinschen <corinna@vinschen.de>
115 * autoload.cc (UuidCreate): Remove.
116 (UuidCreateSequential): Remove.
117 * passwd.cc (internal_getpwsid): Avoid a strict-aliasing compiler
118 error with gcc 4.5.1.
119 * fhandler_floppy.cc (fhandler_dev_floppy::get_drive_info): Ditto.
120 * ntdll.h (NtAllocateUuids): Declare.
121 * syscalls.cc (gethostid): Use NtAllocateUuids function rather than
122 UuidCreateSequential/UuidCreate to get rid of rpcrt4 dependency.
124 2011-03-29 Corinna Vinschen <corinna@vinschen.de>
126 * cygwin.din (pthread_spin_destroy): Export.
127 (pthread_spin_init): Export.
128 (pthread_spin_lock): Export.
129 (pthread_spin_trylock): Export.
130 (pthread_spin_unlock): Export.
131 * posix.sgml (std-susv4): Add pthread_spin_destroy, pthread_spin_init,
132 pthread_spin_lock, pthread_spin_trylock, pthread_spin_unlock.
133 (std-notimpl): Remove pthread_spin_[...].
134 * pthread.cc (pthread_spin_init): New function.
135 * thread.cc (pthread_spinlock::is_good_object): New function.
136 (pthread_mutex::pthread_mutex): Rearrange initializers to accommodate
137 protected data in pthread_mutex.
138 (pthread_spinlock::pthread_spinlock): New constructor.
139 (pthread_spinlock::lock): New method.
140 (pthread_spinlock::unlock): New method.
141 (pthread_spinlock::init): New method.
142 (pthread_spin_lock): New function.
143 (pthread_spin_trylock): New function.
144 (pthread_spin_unlock): New function.
145 (pthread_spin_destroy): New function.
146 * thread.h (PTHREAD_SPINLOCK_MAGIC): Define.
147 (class pthread_mutex): Change access level of members shared with
148 derived classes to protected.
149 (pthread_mutex::set_shared): New protected method.
150 (class pthread_spinlock): New class, derived class of pthread_mutex.
151 * include/pthread.h (pthread_spin_destroy): Declare.
152 (pthread_spin_init): Declare.
153 (pthread_spin_lock): Declare.
154 (pthread_spin_trylock): Declare.
155 (pthread_spin_unlock): Declare.
156 * include/cygwin/types.h (pthread_spinlock_t): New typedef.
157 * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
159 2011-03-29 Corinna Vinschen <corinna@vinschen.de>
161 * net.cc (SIO_BASE_HANDLE): Define.
162 (fdsock): If we got an LSP handle, try to create a copy of the base
163 handle instead. Change comment to explain.
165 2011-03-29 Corinna Vinschen <corinna@vinschen.de>
167 * include/cygwin/version.h: Bump CYGWIN_VERSION_DLL_MINOR to 10.
169 2011-03-29 Corinna Vinschen <corinna@vinschen.de>
171 * autoload.cc (winmm): Remove time functions. Don't treat
172 unloadable wave functions as fatal.
173 * hires.h (hires_ms::timeGetTime_ns): New private method.
174 (hires_ms::dmsecs): Call timeGetTime_ns here.
175 * ntdll.h (struct _KSYSTEM_TIME): Define.
176 (KUSER_SHARED_DATA): Redefine to allow access to InterruptTime.
177 (SharedUserData): Define here.
178 (NtQueryTimerResolution): Declare.
179 (NtSetTimerResolution): Declare.
180 * path.cc (SharedUserData): Move to ntdll.h.
181 * times.cc (hires_ms::timeGetTime_ns): New private method.
182 Use throughout instead of timeGetTime. Document entire functionality
183 of timeGetTime in case we need it.
184 (hires_ms::resolution): Try a call to NtQueryTimerResolution
185 to fetch current period. Fall back to heuristic if that fails.
186 Cast to DWORD in assignments to minperiod.
187 (clock_setres): Align period to possible values per a call to
188 NtQueryTimerResolution. Explain why. Replace calls to timeBeginPeriod
189 and timeEndPeriod with underlying call to NtSetTimerResolution. Use
190 status code from NtSetTimerResolution to compute errno.
191 Convert period to ULONGLONG and store 100ns value to simplify code.
193 2011-03-29 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
194 Corinna Vinschen <corinna@vinschen.de>
196 * include/sys/xattr.h: New file.
198 2011-03-28 Jon TURNEY <jon.turney@dronecode.org.uk>
200 * thread.cc (semaphore::init, destroy, close): Standards conformance
201 fix. On a failure, return -1 and set errno.
202 * thread.h (semaphore::terminate): Save errno since semaphore::close()
205 2011-03-27 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
207 * cygwin.din (strchrnul): Export.
208 * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
209 * posix.sgml (std-gnu): Add strchrnul.
211 2011-03-27 Christopher Faylor <me.cygwin2011@cgf.cx>
213 * dll_init.cc (dll::init): Accommodate ill-behaved dlls who don't fill
216 2011-03-25 Corinna Vinschen <corinna@vinschen.de>
218 * mmap.cc (mmap64): Add a cheat to let a certain autoconf test succeed
219 on 64 bit systems. Explain why.
221 2011-03-23 Christopher Faylor <me.cygwin2011@cgf.cx>
223 * wincap.cc (wincap_2003): Set use_dont_resolve_hack to true.
225 2011-03-23 Christopher Faylor <me.cygwin2011@cgf.cx>
227 * autoload.cc (dll_load): Change error message to make it clear if a
228 newer DLL is being run.
230 2011-03-20 Corinna Vinschen <corinna@vinschen.de>
232 * fenv.cc (_feinitialise): Don't use SSE instructions on systems not
234 * wincap.h (wincaps::supports_sse): New element.
235 * wincap.cc: Implement above element throughout.
237 2011-03-18 Corinna Vinschen <corinna@vinschen.de>
239 * cygwin.sc: Raise default cygheap size to 2 Megs.
241 2011-03-18 Christopher Faylor <me.cygwin2011@cgf.cx>
243 * fhandler.h (DEFAULT_PIPEBUFSIZE): Reset to 64K.
245 2011-03-18 Corinna Vinschen <corinna@vinschen.de>
247 * mmap.cc (mmap_record::alloc_fh): Initialize name strings in fdev to
248 empty strings or suffer a SEGV. Drop second parameter in call to
251 2011-03-18 Corinna Vinschen <corinna@vinschen.de>
253 * mmap.cc (class mmap_record): Pack 4 byte-aligned. Convert member dev
255 (mmap_record::alloc_fh): Create temporary device from dev and use in
256 call to build_fh_dev.
258 2011-03-18 Corinna Vinschen <corinna@vinschen.de>
260 * mmap.cc (mmap_record::page_map): Define as variable array rather than
262 (mmap_record::alloc_page_map): Remove.
263 (mmap_record::free_page_map): Remove.
264 (mmap_record::init_page_map): New method.
265 (mmap_record::add_record): Take mmap_record parameter by reference
266 rather than by value.
267 (mmap_record::map_pages): Fix comment.
268 (mmap_list::add_record): Allocate space for mmap_record including the
269 page_map in a single ccalloc call. Call init_page_map afterwards.
270 (mmap_list::del_record): Remove call to mmap_record::free_page_map.
272 2011-03-16 Corinna Vinschen <corinna@vinschen.de>
274 * crt0.c (mainCRTStartup): Move call to _feinitialise from here...
275 * dcrt0.cc (_dll_crt0): ...to here.
277 2011-03-16 Corinna Vinschen <corinna@vinschen.de>
279 * winver.rc: Fix copyright dates.
281 2011-03-14 Corinna Vinschen <corinna@vinschen.de>
283 * fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Only use
284 file id as inode number if it masters the isgood_inode check.
286 2011-03-13 Christopher Faylor <me.cygwin2011@cgf.cx>
288 * fhandler.cc (fhandler_base_overlapped::wait_overlapped): Remove
289 special treatment for ERROR_NO_SYSTEM_RESOURCES. Cancel I/O and reset
290 the overlapped handle on error.
291 (fhandler_base_overlapped::write_overlapped): Limit writes to
292 max_atomic_write bytes in blocking case. Incorporate code from
293 now-defunct write_overlapped_fallback. Fix serious oversight where ptr
294 was not advanced as buffer was written.
295 (fhandler_base_overlapped::write_overlapped_fallback): Eliminate.
296 * fhandler.h (fhandler_base_overlapped::write_overlapped_fallback):
297 Ditto for declaration.
298 (DEFAULT_PIPEBUFSIZE): Lower size to slightly less than documented
299 worst-case atomic write size.
300 (fhandler_overlapped::wait_return): Remove unused element.
302 2011-03-09 Christopher Faylor <me.cygwin2011@cgf.cx>
304 * fhandler.cc (fhandler_base_overlapped::wait_overlapped): Handle
305 overlapped_fallback error condition like other error conditions. Set
306 res carefully and specifically for each condition rather than resorting
308 (fhandler_base_overlapped::write_overlapped): Preserve errno in
309 overlapped_fallback condition. Correct write_overlapped_fallback to
310 avoid inappropriate looping.
311 (fhandler_base_overlapped::write_overlapped_fallback): Add some more
314 2011-03-09 Christopher Faylor <me.cygwin2011@cgf.cx>
316 * fhandler.cc (fhandler_base_overlapped::write_overlapp): Oops!
317 Accommodate change in arguments to wait_overlapped.
319 2011-03-09 Christopher Faylor <me+cygwin@cgf.cx>
321 * errno.cc (errmap): Change mapping of NO_SYSTEM_RESOURCES to EFBIG.
322 * fhandler.cc (MAX_OVERLAPPED_WRITE_LEN): New constant.
323 (MIN_OVERLAPPED_WRITE_LEN): Ditto.
324 (fhandler_base_overlapped::close): Accommodate change in arguments to
326 (fhandler_base_overlapped::setup_overlapped): Add __stdcall and regparm
328 (fhandler_base_overlapped::destroy_overlapped): Ditto.
329 (fhandler_base_overlapped::has_ongoing_io): Ditto.
330 (fhandler_base_overlapped::wait_overlapped): Modify to return an enum
331 returning various states. Accept nonblocking parameter.
332 (fhandler_base_overlapped::read_overlapped): Add __stdcall and regparm
333 modifiers. Rework to attempt to be smarter about reacting to states
334 returned by wait_overlapped.
335 (fhandler_base_overlapped::write_overlapped): Ditto. Add fallback
336 option for when wait_overlapped detects that smaller chunks must be
338 (fhandler_base_overlapped::write_overlapped_fallback): Ditto.
339 * fhandler.h (DEFAULT_PIPEBUFSIZE): Move definition here from pipe.cc.
340 (fhandler_base::has_ongoing_io): Define with __stdcall and regparm
342 (fhandler_base_overlapped::wait_return): New enum.
343 (fhandler_base_overlapped::max_atomic_write): New variable.
344 (fhandler_base_overlapped:: wait_overlapped): Accommodate changes
345 mentioned above to arguments and modifiers.
346 (fhandler_base_overlapped::setup_overlapped): Ditto for modifiers.
347 (fhandler_base_overlapped::read_overlapped): Ditto.
348 (fhandler_base_overlapped::write_overlapped): Ditto.
349 (fhandler_base_overlapped::destroy_overlapped): Ditto.
350 (fhandler_base_overlapped::has_ongoing_io): Ditto.
351 (fhandler_base_overlapped::fhandler_base_overlapped): Zero
353 * fhandler_fifo.cc (fhandler_fifo::fhandler_fifo): Set max_atomic_write
354 to the size of the DEFAULT_PIPEBUFSIZE.
355 (fhandler_fifo::wait): Accommodate change in arguments to
357 * pipe.cc (fhandler_pipe::fhandler_pipe): Set max_atomic_write to the
358 size of the DEFAULT_PIPEBUFSIZE.
359 (fhandler_pipe::create_selectable): Allow minimum size of DEFAULT_PIPEBUFSIZE.
360 (DEFAULT_PIPEBUFSIZE): Delete here, move to fhandler.h.
362 2011-03-08 Corinna Vinschen <corinna@vinschen.de>
364 * security.cc: Fix copyright dates.
366 2011-03-08 Corinna Vinschen <corinna@vinschen.de>
368 * fhandler.cc (fhandler_base::open): When creating a file on a
369 filesystem supporting ACLs, create the file with WRITE_DAC access.
371 * fhandler_disk_file.cc (fhandler_disk_file::mkdir): Ditto for
373 * fhandler_socket.cc (fhandler_socket::bind): Ditto for sockets.
374 * path.cc (symlink_worker): Ditto for symlinks.
375 * security.cc (get_file_sd): Always call GetSecurityInfo for directories
376 on XP and Server 2003. Improve comment to explain why.
377 (set_file_attribute): Explicitely cast mode_t value to bool in call to
379 * wincap.h (wincaps::use_get_sec_info_on_dirs): New element.
380 * wincap.cc: Implement above element throughout.
382 2011-03-04 Corinna Vinschen <corinna@vinschen.de>
384 * fhandler_procsys.cc (fhandler_procsys::exists): Rewrite.
385 (fhandler_procsys::fill_filebuf): Fill buffer with valid string even if
386 reading the symlink fails.
388 2011-03-03 Corinna Vinschen <corinna@vinschen.de>
390 * posix_ipc.cc (ipc_cond_timedwait): If ipc_mutex_unlock fails, return
392 (_mq_send): Break loop if ipc_cond_timedwait returns with error.
393 (_mq_receive): Ditto.
395 2011-03-03 Corinna Vinschen <corinna@vinschen.de>
397 * errno.cc (__xpg_strerror_r): Add accidentally missing condition.
399 2011-03-02 Corinna Vinschen <corinna@vinschen.de>
401 * fhandler_procsys.cc (fhandler_procsys::open): Call worker exists
402 method, rather than wrapper.
404 2011-03-01 Christopher Faylor <me+cygwin@cgf.cx>
406 * autoload.cc (dll_load): Avoid in_forkee test since this apparently
407 fails even when not forked.
409 2011-03-01 Christopher Faylor <me+cygwin@cgf.cx>
411 * include/cygwin/version.h: Bump CYGWIN_VERSION_DLL_MINOR to 9.
413 2011-02-28 Christopher Faylor <me+cygwin@cgf.cx>
415 * autoload.cc (dll_load): Only perform DONT_RESOLVE_DLL_REFERENCES hack
416 on systems which need it.
417 * wincap.cc (use_dont_resolve_hack): Set as appropriate.
418 * wincap.h (use_dont_resolve_hack): Define.
420 2011-02-28 Christopher Faylor <me+cygwin@cgf.cx>
422 * autoload.cc (dll_load): Make inline. Clarify logic.
424 2011-02-27 Corinna Vinschen <corinna@vinschen.de>
426 * autoload.cc (dll_load): Only call LoadLibraryExW with
427 DONT_RESOLVE_DLL_REFERENCES if a normal LoadLibrary call failed with
428 ERROR_INVALID_ADDRESS.
429 (LsaRegisterLogonProcess): Align comment to previous change.
431 2011-02-26 Christopher Faylor <me+cygwin@cgf.cx>
433 * autoload.cc: Use LoadDLLfuncEx3 for all winmm functions. Accommodate
434 changes to LoadDLLprime.
435 (LoadDLLprime): Take an extra argument indicating whether this dll
436 needs special handling on fork. Place this information in the "handle"
438 (LoadDLLfuncEx3): Eliminate "func" handling. Pass new
439 no_resolve_on_fork argument to LoadDLLprime.
440 (dll_load): New function.
441 (std_dll_init): Accommodate changes to dll_info::handle. Use dll_load
442 to load DLL in both cases where it is used.
444 2011-02-26 Corinna Vinschen <corinna@vinschen.de>
446 * autoload.cc: Make autoloaded ntdll function non-optional. Ditto for
447 secur32 functions, except for LsaRegisterLogonProcess. Change return
448 value to ERROR_PROC_NOT_FOUND. Explain why.
449 * sec_auth.cc (lsaauth): Handle ERROR_PROC_NOT_FOUND from call to
450 LsaRegisterLogonProcess when generating the errno value.
452 2011-02-22 Corinna Vinschen <corinna@vinschen.de>
454 * dcrt0.cc: Fix copyright dates.
456 * syscalls.cc (_read): Move EXPORT_ALIAS to its rightful place.
458 2011-02-21 Christopher Faylor <me+cygwin@cgf.cx>
460 * cygwin.din: Mark __assert* and _abort as NOSIGFE.
462 2011-02-21 Corinna Vinschen <corinna@vinschen.de>
464 * fhandler_socket (fhandler_socket::readv): Call recv_internal directly,
466 (fhandler_socket::writev): Call send_internal directly, rather than
468 * net.cc (cygwin_recv): Call fhandler_socket::recvfrom directly, rather
469 than cygwin_recvfrom.
470 (cygwin_send): Call fhandler_socket::sendto directly, rather than
473 2011-02-20 Christopher Faylor <me+cygwin@cgf.cx>
475 * fhandler.cc (fhandler_base_overlapped::close): Finish any pending I/O
477 (fhandler_base_overlapped::wait_overlapped): Defensively zero bytes
478 read. Add more info to debugging output.
480 2011-02-18 Christopher Faylor <me+cygwin@cgf.cx>
482 * dcrt0.cc (dll_crt0_1): Add a CYGHEAP_DEBUG conditional for debugging
483 which allocates a lot of space at startup.
485 2011-02-18 Corinna Vinschen <corinna@vinschen.de>
487 * cygwin.sc: Set alignment of .cygheap section to 64K.
489 2011-02-15 Corinna Vinschen <corinna@vinschen.de>
491 * spawn.cc (spawn_guts): Only set PID_NOTCYGWIN in _P_OVERLAY mode.
492 Drop flag if creating new process failed.
494 2011-02-15 Corinna Vinschen <corinna@vinschen.de>
496 * Throughout fix copyright dates.
498 2011-02-15 Corinna Vinschen <corinna@vinschen.de>
500 * devices.in: Throughout use slashes instead of backslashes in the
501 native path of devices not backed by native NT devices.
502 * devices.cc: Regenerate.
503 * globals.cc (ro_u_pmem): Use correct case.
504 (ro_u_globalroot): New R/O unicode string.
505 * path.cc (path_conv::check): Fix incorrect handling of /proc/sys
506 block devices if they are just visited due to a component check.
507 (symlink_info::posixify): Fix typo in comment.
508 (cygwin_conv_path): Use ro_u_globalroot instead of string constant.
509 (fast_cwd_version): New shared variable to store FAST_CWD version
511 (find_fast_cwd_pointer): Rename from find_fast_cwd_pointers. Don't
512 set global fast_cwd_ptr pointer here. Return pointer value instead.
513 (find_fast_cwd): New function to set fast_cwd_ptr and fast_cwd_version.
514 (cwdstuff::override_win32_cwd): Call find_fast_cwd from here.
515 Check for fast_cwd_version to differ between old and new FAST_CWD
516 structure. Check old_cwd for NULL to avoid SEGV. Don't set CWD if
517 we have neitehr a valid fast_cwd_ptr, nor a valid CWD handle in the
518 process parameter block.
519 (cwdstuff::set): Create Win32 path taking /proc/sys paths into account.
520 * spawn.cc (spawn_guts): Recode creating runpath. Also take /proc/sys
521 paths into account. Drop special CWD handling when starting non-Cygwin
524 2011-02-15 Corinna Vinschen <corinna@vinschen.de>
526 * fhandler_procsys.cc (fhandler_procsys::opendir): Avoid SEGV if
527 opening object directory fails.
528 * fhandler_virtual.cc (fhandler_virtual::opendir): Don't leak memory.
530 2011-02-15 Corinna Vinschen <corinna@vinschen.de>
532 * fhandler_disk_file.cc (fhandler_disk_file::readdir_helper): Don't
533 append slash if there is one already.
535 2011-02-15 Corinna Vinschen <corinna@vinschen.de>
537 Revert change from 2010-08-31:
538 * path.cc (normalize_posix_path): Drop support for //./ and //?/
540 (path_conv::check): Ditto.
542 2011-02-15 Corinna Vinschen <corinna@vinschen.de>
544 * fhandler_disk_file.cc (fhandler_disk_file::readdir_helper): Use POSIX
545 path to check for symlink.
547 2011-02-14 Corinna Vinschen <corinna@vinschen.de>
549 * config/i386/profile.h: Sync with Mingw.
551 2011-02-13 Corinna Vinschen <corinna@vinschen.de>
553 * path.cc (struct _FAST_CWD): Redefine to new layout used since patch
554 for KB 2393802. Adjust comments throughout.
555 (struct _FAST_CWD_OLD): Rename former definition.
556 (cwdstuff::override_win32_cwd): Check if the OS is using the old or the
557 new FAST_CWD structure layout and handle accordingly.
559 2011-02-11 Christopher Faylor <me+cygwin@cgf.cx>
561 * mkstatic: Make sure that we are not cd'ed to temporary directory on
562 exit to avoid bogus warnings on directory cleanup.
566 2011-02-11 Christopher Faylor <me+cygwin@cgf.cx>
568 * cygwin.sc: Eliminate __cygheap_mid.
571 2011-02-11 Christopher Faylor <me+cygwin@cgf.cx>
573 * cygheap.cc (_cygheap_mid): Drop unneeded section attribute.
574 (cygheap_init): Just zero cygheap structure.
575 * cygwin.sc: Keep 16 byte alignment but drop all other alignments
576 related to cygheap. Eliminate unused __cygheap_end1.
578 2011-02-11 Corinna Vinschen <corinna@vinschen.de>
580 * cygwin.sc: Raise default cygheap size to 1 Meg. Set alignment to
583 2011-02-11 Corinna Vinschen <corinna@vinschen.de>
585 * include/endian.h: Move definitions of __BIG_ENDIAN, __LITTLE_ENDIAN,
586 and __BYTE_ORDER into ...
587 * include/bits/endian.h: New file.
588 * include/arpa/nameser_compat.h: Include endian.h rather than defining
590 * include/asm/byteorder.h: Include bits/endian.h. Drop definition of
592 * include/netinet/ip.h: Include bits/endian.h. Drop definitions of
593 BIG_ENDIAN, LITTLE_ENDIAN, and BYTE_ORDER. Use underscored variants
594 of aforementioned constants.
595 * include/netinet/tcp.h: Ditto.
596 * include/sys/param.h: Drop disabled definitions of BIG_ENDIAN,
597 LITTLE_ENDIAN, and BYTE_ORDER.
599 * include/netinet/ip.h: Reformat. Define setsockopt IP_TOS options
600 matching recent RFCs. Tweak comments.
602 2011-02-10 Eric Blake <eblake@redhat.com>
604 * errno.cc (includes): Avoid compilation failure if <string.h>
605 settles on wrong strerror_r signature.
607 * errno.cc (__xpg_strerror_r): New function.
608 (strerror_r): Update to copy newlib's fixes.
609 (strerror): Set errno on failure.
610 (_sys_errlist): Cause EINVAL failure for reserved values.
611 * cygwin.din: Export new function.
612 * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Combine
615 2011-02-09 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
617 * cygwin.din (pthread_yield): Export as alias to sched_yield.
618 * include/pthread.h (pthread_yield): Declare.
619 * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
620 * posix.sgml (std-deprec): Add pthread_yield.
622 2011-02-09 Christopher Faylor <me+cygwin@cgf.cx>
624 * cygheap.cc: Add some __stdcall decoration where appropriate.
625 * lib/cygwin_crt0.c: __attribute -> __attribute__.
627 2011-02-09 Christopher Faylor <me+cygwin@cgf.cx>
629 * hookapi.cc (hook_or_detect_cygwin): Prevent i from being considered
630 uninitialized by gcc.
632 2011-02-09 Christopher Faylor <me+cygwin@cgf.cx>
634 * exception.h: Remove DEBUG_EXCEPTION left over debugging ifdef.
636 2011-02-08 Christopher Faylor <me+cygwin@cgf.cx>
638 * dll_init.cc: Fix typo in comment.
640 2011-02-07 Corinna Vinschen <corinna@vinschen.de>
642 * configure.in: Remove AC_ALLOCA test and test for __builtin_memset.
643 * configure: Regenerate.
645 2011-02-07 Corinna Vinschen <corinna@vinschen.de>
647 * fhandler_console.cc (fhandler_console::write_normal): Remove
648 erroneous premature return after collecting truncated multibyte
649 sequence in trunc_buf. Rather fall through to printing routine.
650 Fix return value to take trunc_buf content into account. Improve
653 2011-02-05 Christopher Faylor <me+cygwin@cgf.cx>
655 * autoload.cc (wsock_init): Properly define WSAStartup function pointer
656 to avoid stack damage.
658 2011-02-02 Corinna Vinschen <corinna@vinschen.de>
660 * libc/bsdlib.cc: Include err.h.
662 2011-02-02 Eric Blake <eblake@redhat.com>
664 * include/err.h: Fix loss of semicolons in previous patch.
666 2011-02-02 Corinna Vinschen <corinna@vinschen.de>
668 * include/err.h (err): Add noreturn attribute.
673 2011-02-02 Corinna Vinschen <corinna@vinschen.de>
675 * path.cc (conv_path_list): Remove enclosing quotes and trailing
676 backslashes from Win32 environment path lists.
678 2011-02-01 Christian Franke <franke@computer.org>
680 * fhandler.cc (fhandler_base::fsync): Ignore ERROR_INVALID_FUNCTION
681 error from FlushFileBuffers().
683 2011-01-31 Corinna Vinschen <corinna@vinschen.de>
685 * syscalls.cc (utmp_data): Fix potential buffer overflow.
687 2011-01-31 Corinna Vinschen <corinna@vinschen.de>
689 * fhandler_socket.cc (address_in_use): Improve comment readability.
691 2011-01-30 Corinna Vinschen <corinna@vinschen.de>
693 * fhandler_socket.cc (address_in_use): Disable. Add comment.
694 (fhandler_socket::bind): Change comment to explain setting the
695 SO_EXCLUSIVEADDRUSE socket option. Remove code which checks for
697 * net.cc (cygwin_setsockopt): Never set SO_REUSEADDR option. Improve
698 comment to compensate for the deleted comment in fhandler_socket::bind.
699 * wincap.cc: Throughout, drop has_enhanced_socket_security from wincaps.
700 * wincap.h (struct wincaps): Drop has_enhanced_socket_security flags
703 2011-01-28 Peter Foley <jpfoley2@verizon.net>
705 * configure.in: Define LIBSERVER regardless of cross_host.
706 * configure: Regenerate.
708 2011-01-28 Corinna Vinschen <corinna@vinschen.de>
710 * fhandler_socket.cc (fhandler_socket::wait_for_events): Call
711 pthread_testcancel in case of timeout to enable pthread_cancel
714 2011-01-27 Corinna Vinschen <corinna@vinschen.de>
716 * include/features.h (__STDC_ISO_10646__): Move to newlib's
719 2011-01-26 Corinna Vinschen <corinna@vinschen.de>
721 * fhandler_disk_file.cc (fhandler_base::fstat_by_nfs_ea): Fix
722 computation of st_blocks.
723 (fhandler_base::fstat_helper): Fix formatting.
725 2011-01-24 Corinna Vinschen <corinna@vinschen.de>
727 * include/features.h (__STDC_ISO_10646__): Define. Add comment.
729 2011-01-21 Corinna Vinschen <corinna@vinschen.de>
731 * syscalls.cc (rename): Fix permission problem with symlinks on NFS.
732 Rework how NtOpenFile gets called to make it more readable. Change
735 2011-01-20 Corinna Vinschen <corinna@vinschen.de>
737 * exec.cc: Include pinfo.h.
738 * winf.h: Move definitions of _P_PATH_TYPE_EXEC and _P_MODE from here...
739 * pinfo.h: ...to here.
740 (_P_PATH_TYPE_EXEC): Redefine to be bigger than _P_SYSTEM.
741 (_P_MODE): Redefine so as not to mask out _P_SYSTEM.
742 * spawn.cc (spawnlp): Add _P_PATH_TYPE_EXEC flag in call to spawnve.
746 2011-01-19 Corinna Vinschen <corinna@vinschen.de>
748 * spawn.cc (av::fixup): Reenable #! handling for all exec functions.
749 Return ENOEXEC in !p_type_exec case only for unrecognized files.
750 Fix comment formatting.
752 2011-01-19 Corinna Vinschen <corinna@vinschen.de>
754 * exec.cc (execlp): Add missing _P_PATH_TYPE_EXEC flag in call to
757 2011-01-19 Corinna Vinschen <corinna@vinschen.de>
759 * exec.cc: Rearrange functions in alphabetical order.
760 (_execve): Drop temporary define and drop export alias.
761 (execl): Call spawnve.
762 (execle): New function.
763 (execlp): New function.
764 (execv): Call spawnve.
765 (execve): Drop converting NULL envp to emtpy envp.
766 (execvp): Call spawnve.
767 (execvpe): Drop converting NULL envp to emtpy envp. Call spawnve.
768 (fexecve): Call spawnve.
769 * spawn.cc (spawnve): Convert NULL envp to emtpy envp. Remove outdated
771 (spawnlp): Call spawnve.
774 (spawnvpe): Fix formatting.
776 2011-01-19 Corinna Vinschen <corinna@vinschen.de>
778 * exec.cc (strccpy): Move function from here...
779 * strfuncs.cc (strccpy): ...to here.
780 * string.h (strccpy): Declare.
781 * winsup.h (strccpy): Drop declaration.
783 2011-01-19 Corinna Vinschen <corinna@vinschen.de>
785 * errno.cc (errmap): Add error codes for invalid binaries.
786 * exec.cc (execvp): Call spawnve with _P_PATH_TYPE_EXEC flag
789 * spawn.cc (spawn_guts): Filter _P_PATH_TYPE_EXEC from mode and
790 store in p_type_exec. Call av::fixup with addtional p_type_exec
792 (spawnve): Check for filtered mode.
793 (spawnvpe): Add _P_PATH_TYPE_EXEC flag when calling spawnve.
794 (av::fixup): Accept additional bool parameter p_type_exec. Only check
795 for script if p_type_exec is true.
796 * winf.h (_P_PATH_TYPE_EXEC): Define.
798 (av::fixup): Declare with additional bool parameter.
800 2011-01-17 Corinna Vinschen <corinna@vinschen.de>
802 * fhandler_proc.cc (format_proc_partitions): Fix compiler warning.
804 2011-01-17 Corinna Vinschen <corinna@vinschen.de>
806 * path.cc (path_conv::check): Don't follow reparse point symlinks if
807 PC_SYM_NOFOLLOW_REP flag is set.
808 (cygwin_conv_path): Set PC_SYM_NOFOLLOW_REP flag when converting from
810 * path.h (enum pathconv_arg): Define PC_SYM_NOFOLLOW_REP flag.
812 2011-01-17 Corinna Vinschen <corinna@vinschen.de>
814 * fhandler_proc.cc (proc_tab_cmp): Fix typo in comment.
815 (fhandler_proc::fill_filebuf): Handle return value of 0 from format
817 (format_proc_stat): Set errno when returning 0 size.
818 (format_proc_partitions): Rewrite method to fetch partition info.
820 2011-01-13 Corinna Vinschen <corinna@vinschen.de>
822 * fhandler_disk_file.cc (fhandler_base::fstat_helper): Always set
823 st_size of directories to 0. Explain why.
825 2011-01-12 Corinna Vinschen <corinna@vinschen.de>
827 * posix.sgml: Add madvise to BSD list.
829 2011-01-12 Corinna Vinschen <corinna@vinschen.de>
831 * cygwin.din (madvise): Export posix_madvise as madvise.
832 * include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR.
833 * include/sys/mman.h: Define madvise constants, keep Linux-specific
837 2011-01-12 Corinna Vinschen <corinna@vinschen.de>
839 * fhandler.h (struct part_t): New type.
840 (class fhandler_dev_floppy): Convert partitions to part_t pointer.
841 Add lock_partition method.
842 * fhandler_floppy.cc (fhandler_dev_floppy::lock_partition): New method
843 to implement ondemand partition locking.
844 (fhandler_dev_floppy::write_file): Call lock_partition from here if
845 writing failed due to a potential write restriction on a disk
847 (fhandler_dev_floppy::open): Don't lock partitions here.
848 (fhandler_dev_floppy::close): Keep track of partition handle reference
849 count. Close handles and remove partitions pointer ony if count is 0.
850 (fhandler_dev_floppy::dup): Just copy partitions pointer and increment
853 2011-01-11 Corinna Vinschen <corinna@vinschen.de>
855 * fhandler.h (MAX_PARTITIONS): New definition.
856 (class fhandler_dev_floppy): Add partitions array member. Add close
858 * fhandler_floppy.cc (fhandler_dev_floppy::fhandler_dev_floppy): Zero
859 out partitions array.
860 (fhandler_dev_floppy::open): Fix "entire disk" condition for call to
861 DeviceIoControl (FSCTL_ALLOW_EXTENDED_DASD_IO).
862 When opening disks for writing, call DeviceIoControl (FSCTL_LOCK_VOLUME)
863 on all affected disk partitions starting with Vista.
864 (fhandler_dev_floppy::close): New method.
865 (fhandler_dev_floppy::dup): Duplicate handles in partitions, if any.
866 * wincap.h (wincaps::has_restricted_raw_disk_access): New element.
867 * wincap.cc: Implement above element throughout.
869 2011-01-11 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
871 * termios.cc (cfgetospeed, cfgetispeed): Constify argument per POSIX.
872 * include/sys/termios.h (cfgetospeed, cfgetispeed): Declare functions.
873 Move macros after declarations and make conditional on !__cplusplus.
875 2011-01-11 Corinna Vinschen <corinna@vinschen.de>
877 * cygtls.cc (_cygtls::init_thread): Call _REENT_INIT_PTR. Drop setting
878 current locale and calling srand48.
880 2011-01-02 Christopher Faylor <me+cygwin@cgf.cx>
882 * ChangeLog-2010: Create from ChangeLog.
883 * ChangeLog: Start fresh.