1 2011-03-29 Corinna Vinschen <corinna@vinschen.de>
3 * fhandler_socket.cc (get_inet_addr): Make externally available.
4 * autoload.cc (GetUdpTable): Define.
5 * syslog.cc (connect_syslogd): Use get_inet_addr rather than _stat64
6 to check for local socket file. Create socket with type returned by
7 get_inet_addr. If connect on UDP socket works, test if there's
8 really a listening peer, otherwise fall back to Windows event log.
9 (try_connect_syslogd): Use syslogd_inited flag to check if syslogd
12 2011-03-29 Corinna Vinschen <corinna@vinschen.de>
14 * uinfo.cc (cygheap_user::env_domain): Use LookupAccountSidW and
15 convert user and domain to multibyte strings to make sure to use
18 2011-03-29 Corinna Vinschen <corinna@vinschen.de>
20 * autoload.cc (UuidCreate): Remove.
21 (UuidCreateSequential): Remove.
22 * passwd.cc (internal_getpwsid): Avoid a strict-aliasing compiler
24 * fhandler_floppy.cc (fhandler_dev_floppy::get_drive_info): Ditto.
25 * ntdll.h (NtAllocateUuids): Declare.
26 * syscalls.cc (gethostid): Use NtAllocateUuids function rather than
27 UuidCreateSequential/UuidCreate to get rid of rpcrt4 dependency.
29 2011-03-29 Corinna Vinschen <corinna@vinschen.de>
31 * cygwin.din (pthread_spin_destroy): Export.
32 (pthread_spin_init): Export.
33 (pthread_spin_lock): Export.
34 (pthread_spin_trylock): Export.
35 (pthread_spin_unlock): Export.
36 * posix.sgml (std-susv4): Add pthread_spin_destroy, pthread_spin_init,
37 pthread_spin_lock, pthread_spin_trylock, pthread_spin_unlock.
38 (std-notimpl): Remove pthread_spin_[...].
39 * pthread.cc (pthread_spin_init): New function.
40 * thread.cc (pthread_spinlock::is_good_object): New function.
41 (pthread_mutex::pthread_mutex): Rearrange initializers to accommodate
42 protected data in pthread_mutex.
43 (pthread_spinlock::pthread_spinlock): New constructor.
44 (pthread_spinlock::lock): New method.
45 (pthread_spinlock::unlock): New method.
46 (pthread_spinlock::init): New method.
47 (pthread_spin_lock): New function.
48 (pthread_spin_trylock): New function.
49 (pthread_spin_unlock): New function.
50 (pthread_spin_destroy): New function.
51 * thread.h (PTHREAD_SPINLOCK_MAGIC): Define.
52 (class pthread_mutex): Change access level of members shared with
53 derived classes to protected.
54 (pthread_mutex::set_shared): New protected method.
55 (class pthread_spinlock): New class, derived class of pthread_mutex.
56 * include/pthread.h (pthread_spin_destroy): Declare.
57 (pthread_spin_init): Declare.
58 (pthread_spin_lock): Declare.
59 (pthread_spin_trylock): Declare.
60 (pthread_spin_unlock): Declare.
61 * include/cygwin/types.h (pthread_spinlock_t): New typedef.
62 * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
64 2011-03-29 Corinna Vinschen <corinna@vinschen.de>
66 * net.cc (SIO_BASE_HANDLE): Define.
67 (fdsock): If we got an LSP handle, try to create a copy of the base
68 handle instead. Change comment to explain.
70 2011-03-29 Corinna Vinschen <corinna@vinschen.de>
72 * include/cygwin/version.h: Bump CYGWIN_VERSION_DLL_MINOR to 10.
74 2011-03-29 Corinna Vinschen <corinna@vinschen.de>
76 * autoload.cc (winmm): Remove time functions. Don't treat
77 unloadable wave functions as fatal.
78 * hires.h (hires_ms::timeGetTime_ns): New private method.
79 (hires_ms::dmsecs): Call timeGetTime_ns here.
80 * ntdll.h (struct _KSYSTEM_TIME): Define.
81 (KUSER_SHARED_DATA): Redefine to allow access to InterruptTime.
82 (SharedUserData): Define here.
83 (NtQueryTimerResolution): Declare.
84 (NtSetTimerResolution): Declare.
85 * path.cc (SharedUserData): Move to ntdll.h.
86 * times.cc (hires_ms::timeGetTime_ns): New private method.
87 Use throughout instead of timeGetTime. Document entire functionality
88 of timeGetTime in case we need it.
89 (hires_ms::resolution): Try a call to NtQueryTimerResolution
90 to fetch current period. Fall back to heuristic if that fails.
91 Cast to DWORD in assignments to minperiod.
92 (clock_setres): Align period to possible values per a call to
93 NtQueryTimerResolution. Explain why. Replace calls to timeBeginPeriod
94 and timeEndPeriod with underlying call to NtSetTimerResolution. Use
95 status code from NtSetTimerResolution to compute errno.
96 Convert period to ULONGLONG and store 100ns value to simplify code.
98 2011-03-29 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
99 Corinna Vinschen <corinna@vinschen.de>
101 * include/sys/xattr.h: New file.
103 2011-03-28 Jon TURNEY <jon.turney@dronecode.org.uk>
105 * thread.cc (semaphore::init, destroy, close): Standards conformance
106 fix. On a failure, return -1 and set errno.
107 * thread.h (semaphore::terminate): Save errno since semaphore::close()
110 2011-03-27 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
112 * cygwin.din (strchrnul): Export.
113 * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
114 * posix.sgml (std-gnu): Add strchrnul.
116 2011-03-27 Christopher Faylor <me.cygwin2011@cgf.cx>
118 * dll_init.cc (dll::init): Accommodate ill-behaved dlls who don't fill
121 2011-03-25 Corinna Vinschen <corinna@vinschen.de>
123 * mmap.cc (mmap64): Add a cheat to let a certain autoconf test succeed
124 on 64 bit systems. Explain why.
126 2011-03-23 Christopher Faylor <me.cygwin2011@cgf.cx>
128 * wincap.cc (wincap_2003): Set use_dont_resolve_hack to true.
130 2011-03-23 Christopher Faylor <me.cygwin2011@cgf.cx>
132 * autoload.cc (dll_load): Change error message to make it clear if a
133 newer DLL is being run.
135 2011-03-20 Corinna Vinschen <corinna@vinschen.de>
137 * fenv.cc (_feinitialise): Don't use SSE instructions on systems not
139 * wincap.h (wincaps::supports_sse): New element.
140 * wincap.cc: Implement above element throughout.
142 2011-03-18 Corinna Vinschen <corinna@vinschen.de>
144 * cygwin.sc: Raise default cygheap size to 2 Megs.
146 2011-03-18 Christopher Faylor <me.cygwin2011@cgf.cx>
148 * fhandler.h (DEFAULT_PIPEBUFSIZE): Reset to 64K.
150 2011-03-18 Corinna Vinschen <corinna@vinschen.de>
152 * mmap.cc (mmap_record::alloc_fh): Initialize name strings in fdev to
153 empty strings or suffer a SEGV. Drop second parameter in call to
156 2011-03-18 Corinna Vinschen <corinna@vinschen.de>
158 * mmap.cc (class mmap_record): Pack 4 byte-aligned. Convert member dev
160 (mmap_record::alloc_fh): Create temporary device from dev and use in
161 call to build_fh_dev.
163 2011-03-18 Corinna Vinschen <corinna@vinschen.de>
165 * mmap.cc (mmap_record::page_map): Define as variable array rather than
167 (mmap_record::alloc_page_map): Remove.
168 (mmap_record::free_page_map): Remove.
169 (mmap_record::init_page_map): New method.
170 (mmap_record::add_record): Take mmap_record parameter by reference
171 rather than by value.
172 (mmap_record::map_pages): Fix comment.
173 (mmap_list::add_record): Allocate space for mmap_record including the
174 page_map in a single ccalloc call. Call init_page_map afterwards.
175 (mmap_list::del_record): Remove call to mmap_record::free_page_map.
177 2011-03-16 Corinna Vinschen <corinna@vinschen.de>
179 * crt0.c (mainCRTStartup): Move call to _feinitialise from here...
180 * dcrt0.cc (_dll_crt0): ...to here.
182 2011-03-16 Corinna Vinschen <corinna@vinschen.de>
184 * winver.rc: Fix copyright dates.
186 2011-03-14 Corinna Vinschen <corinna@vinschen.de>
188 * fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Only use
189 file id as inode number if it masters the isgood_inode check.
191 2011-03-13 Christopher Faylor <me.cygwin2011@cgf.cx>
193 * fhandler.cc (fhandler_base_overlapped::wait_overlapped): Remove
194 special treatment for ERROR_NO_SYSTEM_RESOURCES. Cancel I/O and reset
195 the overlapped handle on error.
196 (fhandler_base_overlapped::write_overlapped): Limit writes to
197 max_atomic_write bytes in blocking case. Incorporate code from
198 now-defunct write_overlapped_fallback. Fix serious oversight where ptr
199 was not advanced as buffer was written.
200 (fhandler_base_overlapped::write_overlapped_fallback): Eliminate.
201 * fhandler.h (fhandler_base_overlapped::write_overlapped_fallback):
202 Ditto for declaration.
203 (DEFAULT_PIPEBUFSIZE): Lower size to slightly less than documented
204 worst-case atomic write size.
205 (fhandler_overlapped::wait_return): Remove unused element.
207 2011-03-09 Christopher Faylor <me.cygwin2011@cgf.cx>
209 * fhandler.cc (fhandler_base_overlapped::wait_overlapped): Handle
210 overlapped_fallback error condition like other error conditions. Set
211 res carefully and specifically for each condition rather than resorting
213 (fhandler_base_overlapped::write_overlapped): Preserve errno in
214 overlapped_fallback condition. Correct write_overlapped_fallback to
215 avoid inappropriate looping.
216 (fhandler_base_overlapped::write_overlapped_fallback): Add some more
219 2011-03-09 Christopher Faylor <me.cygwin2011@cgf.cx>
221 * fhandler.cc (fhandler_base_overlapped::write_overlapp): Oops!
222 Accommodate change in arguments to wait_overlapped.
224 2011-03-09 Christopher Faylor <me+cygwin@cgf.cx>
226 * errno.cc (errmap): Change mapping of NO_SYSTEM_RESOURCES to EFBIG.
227 * fhandler.cc (MAX_OVERLAPPED_WRITE_LEN): New constant.
228 (MIN_OVERLAPPED_WRITE_LEN): Ditto.
229 (fhandler_base_overlapped::close): Accommodate change in arguments to
231 (fhandler_base_overlapped::setup_overlapped): Add __stdcall and regparm
233 (fhandler_base_overlapped::destroy_overlapped): Ditto.
234 (fhandler_base_overlapped::has_ongoing_io): Ditto.
235 (fhandler_base_overlapped::wait_overlapped): Modify to return an enum
236 returning various states. Accept nonblocking parameter.
237 (fhandler_base_overlapped::read_overlapped): Add __stdcall and regparm
238 modifiers. Rework to attempt to be smarter about reacting to states
239 returned by wait_overlapped.
240 (fhandler_base_overlapped::write_overlapped): Ditto. Add fallback
241 option for when wait_overlapped detects that smaller chunks must be
243 (fhandler_base_overlapped::write_overlapped_fallback): Ditto.
244 * fhandler.h (DEFAULT_PIPEBUFSIZE): Move definition here from pipe.cc.
245 (fhandler_base::has_ongoing_io): Define with __stdcall and regparm
247 (fhandler_base_overlapped::wait_return): New enum.
248 (fhandler_base_overlapped::max_atomic_write): New variable.
249 (fhandler_base_overlapped:: wait_overlapped): Accommodate changes
250 mentioned above to arguments and modifiers.
251 (fhandler_base_overlapped::setup_overlapped): Ditto for modifiers.
252 (fhandler_base_overlapped::read_overlapped): Ditto.
253 (fhandler_base_overlapped::write_overlapped): Ditto.
254 (fhandler_base_overlapped::destroy_overlapped): Ditto.
255 (fhandler_base_overlapped::has_ongoing_io): Ditto.
256 (fhandler_base_overlapped::fhandler_base_overlapped): Zero
258 * fhandler_fifo.cc (fhandler_fifo::fhandler_fifo): Set max_atomic_write
259 to the size of the DEFAULT_PIPEBUFSIZE.
260 (fhandler_fifo::wait): Accommodate change in arguments to
262 * pipe.cc (fhandler_pipe::fhandler_pipe): Set max_atomic_write to the
263 size of the DEFAULT_PIPEBUFSIZE.
264 (fhandler_pipe::create_selectable): Allow minimum size of DEFAULT_PIPEBUFSIZE.
265 (DEFAULT_PIPEBUFSIZE): Delete here, move to fhandler.h.
267 2011-03-08 Corinna Vinschen <corinna@vinschen.de>
269 * security.cc: Fix copyright dates.
271 2011-03-08 Corinna Vinschen <corinna@vinschen.de>
273 * fhandler.cc (fhandler_base::open): When creating a file on a
274 filesystem supporting ACLs, create the file with WRITE_DAC access.
276 * fhandler_disk_file.cc (fhandler_disk_file::mkdir): Ditto for
278 * fhandler_socket.cc (fhandler_socket::bind): Ditto for sockets.
279 * path.cc (symlink_worker): Ditto for symlinks.
280 * security.cc (get_file_sd): Always call GetSecurityInfo for directories
281 on XP and Server 2003. Improve comment to explain why.
282 (set_file_attribute): Explicitely cast mode_t value to bool in call to
284 * wincap.h (wincaps::use_get_sec_info_on_dirs): New element.
285 * wincap.cc: Implement above element throughout.
287 2011-03-04 Corinna Vinschen <corinna@vinschen.de>
289 * fhandler_procsys.cc (fhandler_procsys::exists): Rewrite.
290 (fhandler_procsys::fill_filebuf): Fill buffer with valid string even if
291 reading the symlink fails.
293 2011-03-03 Corinna Vinschen <corinna@vinschen.de>
295 * posix_ipc.cc (ipc_cond_timedwait): If ipc_mutex_unlock fails, return
297 (_mq_send): Break loop if ipc_cond_timedwait returns with error.
298 (_mq_receive): Ditto.
300 2011-03-03 Corinna Vinschen <corinna@vinschen.de>
302 * errno.cc (__xpg_strerror_r): Add accidentally missing condition.
304 2011-03-02 Corinna Vinschen <corinna@vinschen.de>
306 * fhandler_procsys.cc (fhandler_procsys::open): Call worker exists
307 method, rather than wrapper.
309 2011-03-01 Christopher Faylor <me+cygwin@cgf.cx>
311 * autoload.cc (dll_load): Avoid in_forkee test since this apparently
312 fails even when not forked.
314 2011-03-01 Christopher Faylor <me+cygwin@cgf.cx>
316 * include/cygwin/version.h: Bump CYGWIN_VERSION_DLL_MINOR to 9.
318 2011-02-28 Christopher Faylor <me+cygwin@cgf.cx>
320 * autoload.cc (dll_load): Only perform DONT_RESOLVE_DLL_REFERENCES hack
321 on systems which need it.
322 * wincap.cc (use_dont_resolve_hack): Set as appropriate.
323 * wincap.h (use_dont_resolve_hack): Define.
325 2011-02-28 Christopher Faylor <me+cygwin@cgf.cx>
327 * autoload.cc (dll_load): Make inline. Clarify logic.
329 2011-02-27 Corinna Vinschen <corinna@vinschen.de>
331 * autoload.cc (dll_load): Only call LoadLibraryExW with
332 DONT_RESOLVE_DLL_REFERENCES if a normal LoadLibrary call failed with
333 ERROR_INVALID_ADDRESS.
334 (LsaRegisterLogonProcess): Align comment to previous change.
336 2011-02-26 Christopher Faylor <me+cygwin@cgf.cx>
338 * autoload.cc: Use LoadDLLfuncEx3 for all winmm functions. Accommodate
339 changes to LoadDLLprime.
340 (LoadDLLprime): Take an extra argument indicating whether this dll
341 needs special handling on fork. Place this information in the "handle"
343 (LoadDLLfuncEx3): Eliminate "func" handling. Pass new
344 no_resolve_on_fork argument to LoadDLLprime.
345 (dll_load): New function.
346 (std_dll_init): Accommodate changes to dll_info::handle. Use dll_load
347 to load DLL in both cases where it is used.
349 2011-02-26 Corinna Vinschen <corinna@vinschen.de>
351 * autoload.cc: Make autoloaded ntdll function non-optional. Ditto for
352 secur32 functions, except for LsaRegisterLogonProcess. Change return
353 value to ERROR_PROC_NOT_FOUND. Explain why.
354 * sec_auth.cc (lsaauth): Handle ERROR_PROC_NOT_FOUND from call to
355 LsaRegisterLogonProcess when generating the errno value.
357 2011-02-22 Corinna Vinschen <corinna@vinschen.de>
359 * dcrt0.cc: Fix copyright dates.
361 * syscalls.cc (_read): Move EXPORT_ALIAS to its rightful place.
363 2011-02-21 Christopher Faylor <me+cygwin@cgf.cx>
365 * cygwin.din: Mark __assert* and _abort as NOSIGFE.
367 2011-02-21 Corinna Vinschen <corinna@vinschen.de>
369 * fhandler_socket (fhandler_socket::readv): Call recv_internal directly,
371 (fhandler_socket::writev): Call send_internal directly, rather than
373 * net.cc (cygwin_recv): Call fhandler_socket::recvfrom directly, rather
374 than cygwin_recvfrom.
375 (cygwin_send): Call fhandler_socket::sendto directly, rather than
378 2011-02-20 Christopher Faylor <me+cygwin@cgf.cx>
380 * fhandler.cc (fhandler_base_overlapped::close): Finish any pending I/O
382 (fhandler_base_overlapped::wait_overlapped): Defensively zero bytes
383 read. Add more info to debugging output.
385 2011-02-18 Christopher Faylor <me+cygwin@cgf.cx>
387 * dcrt0.cc (dll_crt0_1): Add a CYGHEAP_DEBUG conditional for debugging
388 which allocates a lot of space at startup.
390 2011-02-18 Corinna Vinschen <corinna@vinschen.de>
392 * cygwin.sc: Set alignment of .cygheap section to 64K.
394 2011-02-15 Corinna Vinschen <corinna@vinschen.de>
396 * spawn.cc (spawn_guts): Only set PID_NOTCYGWIN in _P_OVERLAY mode.
397 Drop flag if creating new process failed.
399 2011-02-15 Corinna Vinschen <corinna@vinschen.de>
401 * Throughout fix copyright dates.
403 2011-02-15 Corinna Vinschen <corinna@vinschen.de>
405 * devices.in: Throughout use slashes instead of backslashes in the
406 native path of devices not backed by native NT devices.
407 * devices.cc: Regenerate.
408 * globals.cc (ro_u_pmem): Use correct case.
409 (ro_u_globalroot): New R/O unicode string.
410 * path.cc (path_conv::check): Fix incorrect handling of /proc/sys
411 block devices if they are just visited due to a component check.
412 (symlink_info::posixify): Fix typo in comment.
413 (cygwin_conv_path): Use ro_u_globalroot instead of string constant.
414 (fast_cwd_version): New shared variable to store FAST_CWD version
416 (find_fast_cwd_pointer): Rename from find_fast_cwd_pointers. Don't
417 set global fast_cwd_ptr pointer here. Return pointer value instead.
418 (find_fast_cwd): New function to set fast_cwd_ptr and fast_cwd_version.
419 (cwdstuff::override_win32_cwd): Call find_fast_cwd from here.
420 Check for fast_cwd_version to differ between old and new FAST_CWD
421 structure. Check old_cwd for NULL to avoid SEGV. Don't set CWD if
422 we have neitehr a valid fast_cwd_ptr, nor a valid CWD handle in the
423 process parameter block.
424 (cwdstuff::set): Create Win32 path taking /proc/sys paths into account.
425 * spawn.cc (spawn_guts): Recode creating runpath. Also take /proc/sys
426 paths into account. Drop special CWD handling when starting non-Cygwin
429 2011-02-15 Corinna Vinschen <corinna@vinschen.de>
431 * fhandler_procsys.cc (fhandler_procsys::opendir): Avoid SEGV if
432 opening object directory fails.
433 * fhandler_virtual.cc (fhandler_virtual::opendir): Don't leak memory.
435 2011-02-15 Corinna Vinschen <corinna@vinschen.de>
437 * fhandler_disk_file.cc (fhandler_disk_file::readdir_helper): Don't
438 append slash if there is one already.
440 2011-02-15 Corinna Vinschen <corinna@vinschen.de>
442 Revert change from 2010-08-31:
443 * path.cc (normalize_posix_path): Drop support for //./ and //?/
445 (path_conv::check): Ditto.
447 2011-02-15 Corinna Vinschen <corinna@vinschen.de>
449 * fhandler_disk_file.cc (fhandler_disk_file::readdir_helper): Use POSIX
450 path to check for symlink.
452 2011-02-14 Corinna Vinschen <corinna@vinschen.de>
454 * config/i386/profile.h: Sync with Mingw.
456 2011-02-13 Corinna Vinschen <corinna@vinschen.de>
458 * path.cc (struct _FAST_CWD): Redefine to new layout used since patch
459 for KB 2393802. Adjust comments throughout.
460 (struct _FAST_CWD_OLD): Rename former definition.
461 (cwdstuff::override_win32_cwd): Check if the OS is using the old or the
462 new FAST_CWD structure layout and handle accordingly.
464 2011-02-11 Christopher Faylor <me+cygwin@cgf.cx>
466 * mkstatic: Make sure that we are not cd'ed to temporary directory on
467 exit to avoid bogus warnings on directory cleanup.
471 2011-02-11 Christopher Faylor <me+cygwin@cgf.cx>
473 * cygwin.sc: Eliminate __cygheap_mid.
476 2011-02-11 Christopher Faylor <me+cygwin@cgf.cx>
478 * cygheap.cc (_cygheap_mid): Drop unneeded section attribute.
479 (cygheap_init): Just zero cygheap structure.
480 * cygwin.sc: Keep 16 byte alignment but drop all other alignments
481 related to cygheap. Eliminate unused __cygheap_end1.
483 2011-02-11 Corinna Vinschen <corinna@vinschen.de>
485 * cygwin.sc: Raise default cygheap size to 1 Meg. Set alignment to
488 2011-02-11 Corinna Vinschen <corinna@vinschen.de>
490 * include/endian.h: Move definitions of __BIG_ENDIAN, __LITTLE_ENDIAN,
491 and __BYTE_ORDER into ...
492 * include/bits/endian.h: New file.
493 * include/arpa/nameser_compat.h: Include endian.h rather than defining
495 * include/asm/byteorder.h: Include bits/endian.h. Drop definition of
497 * include/netinet/ip.h: Include bits/endian.h. Drop definitions of
498 BIG_ENDIAN, LITTLE_ENDIAN, and BYTE_ORDER. Use underscored variants
499 of aforementioned constants.
500 * include/netinet/tcp.h: Ditto.
501 * include/sys/param.h: Drop disabled definitions of BIG_ENDIAN,
502 LITTLE_ENDIAN, and BYTE_ORDER.
504 * include/netinet/ip.h: Reformat. Define setsockopt IP_TOS options
505 matching recent RFCs. Tweak comments.
507 2011-02-10 Eric Blake <eblake@redhat.com>
509 * errno.cc (includes): Avoid compilation failure if <string.h>
510 settles on wrong strerror_r signature.
512 * errno.cc (__xpg_strerror_r): New function.
513 (strerror_r): Update to copy newlib's fixes.
514 (strerror): Set errno on failure.
515 (_sys_errlist): Cause EINVAL failure for reserved values.
516 * cygwin.din: Export new function.
517 * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Combine
520 2011-02-09 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
522 * cygwin.din (pthread_yield): Export as alias to sched_yield.
523 * include/pthread.h (pthread_yield): Declare.
524 * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
525 * posix.sgml (std-deprec): Add pthread_yield.
527 2011-02-09 Christopher Faylor <me+cygwin@cgf.cx>
529 * cygheap.cc: Add some __stdcall decoration where appropriate.
530 * lib/cygwin_crt0.c: __attribute -> __attribute__.
532 2011-02-09 Christopher Faylor <me+cygwin@cgf.cx>
534 * hookapi.cc (hook_or_detect_cygwin): Prevent i from being considered
535 uninitialized by gcc.
537 2011-02-09 Christopher Faylor <me+cygwin@cgf.cx>
539 * exception.h: Remove DEBUG_EXCEPTION left over debugging ifdef.
541 2011-02-08 Christopher Faylor <me+cygwin@cgf.cx>
543 * dll_init.cc: Fix typo in comment.
545 2011-02-07 Corinna Vinschen <corinna@vinschen.de>
547 * configure.in: Remove AC_ALLOCA test and test for __builtin_memset.
548 * configure: Regenerate.
550 2011-02-07 Corinna Vinschen <corinna@vinschen.de>
552 * fhandler_console.cc (fhandler_console::write_normal): Remove
553 erroneous premature return after collecting truncated multibyte
554 sequence in trunc_buf. Rather fall through to printing routine.
555 Fix return value to take trunc_buf content into account. Improve
558 2011-02-05 Christopher Faylor <me+cygwin@cgf.cx>
560 * autoload.cc (wsock_init): Properly define WSAStartup function pointer
561 to avoid stack damage.
563 2011-02-02 Corinna Vinschen <corinna@vinschen.de>
565 * libc/bsdlib.cc: Include err.h.
567 2011-02-02 Eric Blake <eblake@redhat.com>
569 * include/err.h: Fix loss of semicolons in previous patch.
571 2011-02-02 Corinna Vinschen <corinna@vinschen.de>
573 * include/err.h (err): Add noreturn attribute.
578 2011-02-02 Corinna Vinschen <corinna@vinschen.de>
580 * path.cc (conv_path_list): Remove enclosing quotes and trailing
581 backslashes from Win32 environment path lists.
583 2011-02-01 Christian Franke <franke@computer.org>
585 * fhandler.cc (fhandler_base::fsync): Ignore ERROR_INVALID_FUNCTION
586 error from FlushFileBuffers().
588 2011-01-31 Corinna Vinschen <corinna@vinschen.de>
590 * syscalls.cc (utmp_data): Fix potential buffer overflow.
592 2011-01-31 Corinna Vinschen <corinna@vinschen.de>
594 * fhandler_socket.cc (address_in_use): Improve comment readability.
596 2011-01-30 Corinna Vinschen <corinna@vinschen.de>
598 * fhandler_socket.cc (address_in_use): Disable. Add comment.
599 (fhandler_socket::bind): Change comment to explain setting the
600 SO_EXCLUSIVEADDRUSE socket option. Remove code which checks for
602 * net.cc (cygwin_setsockopt): Never set SO_REUSEADDR option. Improve
603 comment to compensate for the deleted comment in fhandler_socket::bind.
604 * wincap.cc: Throughout, drop has_enhanced_socket_security from wincaps.
605 * wincap.h (struct wincaps): Drop has_enhanced_socket_security flags
608 2011-01-28 Peter Foley <jpfoley2@verizon.net>
610 * configure.in: Define LIBSERVER regardless of cross_host.
611 * configure: Regenerate.
613 2011-01-28 Corinna Vinschen <corinna@vinschen.de>
615 * fhandler_socket.cc (fhandler_socket::wait_for_events): Call
616 pthread_testcancel in case of timeout to enable pthread_cancel
619 2011-01-27 Corinna Vinschen <corinna@vinschen.de>
621 * include/features.h (__STDC_ISO_10646__): Move to newlib's
624 2011-01-26 Corinna Vinschen <corinna@vinschen.de>
626 * fhandler_disk_file.cc (fhandler_base::fstat_by_nfs_ea): Fix
627 computation of st_blocks.
628 (fhandler_base::fstat_helper): Fix formatting.
630 2011-01-24 Corinna Vinschen <corinna@vinschen.de>
632 * include/features.h (__STDC_ISO_10646__): Define. Add comment.
634 2011-01-21 Corinna Vinschen <corinna@vinschen.de>
636 * syscalls.cc (rename): Fix permission problem with symlinks on NFS.
637 Rework how NtOpenFile gets called to make it more readable. Change
640 2011-01-20 Corinna Vinschen <corinna@vinschen.de>
642 * exec.cc: Include pinfo.h.
643 * winf.h: Move definitions of _P_PATH_TYPE_EXEC and _P_MODE from here...
644 * pinfo.h: ...to here.
645 (_P_PATH_TYPE_EXEC): Redefine to be bigger than _P_SYSTEM.
646 (_P_MODE): Redefine so as not to mask out _P_SYSTEM.
647 * spawn.cc (spawnlp): Add _P_PATH_TYPE_EXEC flag in call to spawnve.
651 2011-01-19 Corinna Vinschen <corinna@vinschen.de>
653 * spawn.cc (av::fixup): Reenable #! handling for all exec functions.
654 Return ENOEXEC in !p_type_exec case only for unrecognized files.
655 Fix comment formatting.
657 2011-01-19 Corinna Vinschen <corinna@vinschen.de>
659 * exec.cc (execlp): Add missing _P_PATH_TYPE_EXEC flag in call to
662 2011-01-19 Corinna Vinschen <corinna@vinschen.de>
664 * exec.cc: Rearrange functions in alphabetical order.
665 (_execve): Drop temporary define and drop export alias.
666 (execl): Call spawnve.
667 (execle): New function.
668 (execlp): New function.
669 (execv): Call spawnve.
670 (execve): Drop converting NULL envp to emtpy envp.
671 (execvp): Call spawnve.
672 (execvpe): Drop converting NULL envp to emtpy envp. Call spawnve.
673 (fexecve): Call spawnve.
674 * spawn.cc (spawnve): Convert NULL envp to emtpy envp. Remove outdated
676 (spawnlp): Call spawnve.
679 (spawnvpe): Fix formatting.
681 2011-01-19 Corinna Vinschen <corinna@vinschen.de>
683 * exec.cc (strccpy): Move function from here...
684 * strfuncs.cc (strccpy): ...to here.
685 * string.h (strccpy): Declare.
686 * winsup.h (strccpy): Drop declaration.
688 2011-01-19 Corinna Vinschen <corinna@vinschen.de>
690 * errno.cc (errmap): Add error codes for invalid binaries.
691 * exec.cc (execvp): Call spawnve with _P_PATH_TYPE_EXEC flag
694 * spawn.cc (spawn_guts): Filter _P_PATH_TYPE_EXEC from mode and
695 store in p_type_exec. Call av::fixup with addtional p_type_exec
697 (spawnve): Check for filtered mode.
698 (spawnvpe): Add _P_PATH_TYPE_EXEC flag when calling spawnve.
699 (av::fixup): Accept additional bool parameter p_type_exec. Only check
700 for script if p_type_exec is true.
701 * winf.h (_P_PATH_TYPE_EXEC): Define.
703 (av::fixup): Declare with additional bool parameter.
705 2011-01-17 Corinna Vinschen <corinna@vinschen.de>
707 * fhandler_proc.cc (format_proc_partitions): Fix compiler warning.
709 2011-01-17 Corinna Vinschen <corinna@vinschen.de>
711 * path.cc (path_conv::check): Don't follow reparse point symlinks if
712 PC_SYM_NOFOLLOW_REP flag is set.
713 (cygwin_conv_path): Set PC_SYM_NOFOLLOW_REP flag when converting from
715 * path.h (enum pathconv_arg): Define PC_SYM_NOFOLLOW_REP flag.
717 2011-01-17 Corinna Vinschen <corinna@vinschen.de>
719 * fhandler_proc.cc (proc_tab_cmp): Fix typo in comment.
720 (fhandler_proc::fill_filebuf): Handle return value of 0 from format
722 (format_proc_stat): Set errno when returning 0 size.
723 (format_proc_partitions): Rewrite method to fetch partition info.
725 2011-01-13 Corinna Vinschen <corinna@vinschen.de>
727 * fhandler_disk_file.cc (fhandler_base::fstat_helper): Always set
728 st_size of directories to 0. Explain why.
730 2011-01-12 Corinna Vinschen <corinna@vinschen.de>
732 * posix.sgml: Add madvise to BSD list.
734 2011-01-12 Corinna Vinschen <corinna@vinschen.de>
736 * cygwin.din (madvise): Export posix_madvise as madvise.
737 * include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR.
738 * include/sys/mman.h: Define madvise constants, keep Linux-specific
742 2011-01-12 Corinna Vinschen <corinna@vinschen.de>
744 * fhandler.h (struct part_t): New type.
745 (class fhandler_dev_floppy): Convert partitions to part_t pointer.
746 Add lock_partition method.
747 * fhandler_floppy.cc (fhandler_dev_floppy::lock_partition): New method
748 to implement ondemand partition locking.
749 (fhandler_dev_floppy::write_file): Call lock_partition from here if
750 writing failed due to a potential write restriction on a disk
752 (fhandler_dev_floppy::open): Don't lock partitions here.
753 (fhandler_dev_floppy::close): Keep track of partition handle reference
754 count. Close handles and remove partitions pointer ony if count is 0.
755 (fhandler_dev_floppy::dup): Just copy partitions pointer and increment
758 2011-01-11 Corinna Vinschen <corinna@vinschen.de>
760 * fhandler.h (MAX_PARTITIONS): New definition.
761 (class fhandler_dev_floppy): Add partitions array member. Add close
763 * fhandler_floppy.cc (fhandler_dev_floppy::fhandler_dev_floppy): Zero
764 out partitions array.
765 (fhandler_dev_floppy::open): Fix "entire disk" condition for call to
766 DeviceIoControl (FSCTL_ALLOW_EXTENDED_DASD_IO).
767 When opening disks for writing, call DeviceIoControl (FSCTL_LOCK_VOLUME)
768 on all affected disk partitions starting with Vista.
769 (fhandler_dev_floppy::close): New method.
770 (fhandler_dev_floppy::dup): Duplicate handles in partitions, if any.
771 * wincap.h (wincaps::has_restricted_raw_disk_access): New element.
772 * wincap.cc: Implement above element throughout.
774 2011-01-11 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
776 * termios.cc (cfgetospeed, cfgetispeed): Constify argument per POSIX.
777 * include/sys/termios.h (cfgetospeed, cfgetispeed): Declare functions.
778 Move macros after declarations and make conditional on !__cplusplus.
780 2011-01-11 Corinna Vinschen <corinna@vinschen.de>
782 * cygtls.cc (_cygtls::init_thread): Call _REENT_INIT_PTR. Drop setting
783 current locale and calling srand48.
785 2011-01-02 Christopher Faylor <me+cygwin@cgf.cx>
787 * ChangeLog-2010: Create from ChangeLog.
788 * ChangeLog: Start fresh.