1 2011-03-29 Corinna Vinschen <corinna@vinschen.de>
3 * cygwin.din (pthread_spin_destroy): Export.
4 (pthread_spin_init): Export.
5 (pthread_spin_lock): Export.
6 (pthread_spin_trylock): Export.
7 (pthread_spin_unlock): Export.
8 * posix.sgml (std-susv4): Add pthread_spin_destroy, pthread_spin_init,
9 pthread_spin_lock, pthread_spin_trylock, pthread_spin_unlock.
10 (std-notimpl): Remove pthread_spin_[...].
11 * pthread.cc (pthread_spin_init): New function.
12 * thread.cc (pthread_spinlock::is_good_object): New function.
13 (pthread_mutex::pthread_mutex): Rearrange initializers to accommodate
14 protected data in pthread_mutex.
15 (pthread_spinlock::pthread_spinlock): New constructor.
16 (pthread_spinlock::lock): New method.
17 (pthread_spinlock::unlock): New method.
18 (pthread_spinlock::init): New method.
19 (pthread_spin_lock): New function.
20 (pthread_spin_trylock): New function.
21 (pthread_spin_unlock): New function.
22 (pthread_spin_destroy): New function.
23 * thread.h (PTHREAD_SPINLOCK_MAGIC): Define.
24 (class pthread_mutex): Change access level of members shared with
25 derived classes to protected.
26 (pthread_mutex::set_shared): New protected method.
27 (class pthread_spinlock): New class, derived class of pthread_mutex.
28 * include/pthread.h (pthread_spin_destroy): Declare.
29 (pthread_spin_init): Declare.
30 (pthread_spin_lock): Declare.
31 (pthread_spin_trylock): Declare.
32 (pthread_spin_unlock): Declare.
33 * include/cygwin/types.h (pthread_spinlock_t): New typedef.
34 * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
36 2011-03-29 Corinna Vinschen <corinna@vinschen.de>
38 * net.cc (SIO_BASE_HANDLE): Define.
39 (fdsock): If we got an LSP handle, try to create a copy of the base
40 handle instead. Change comment to explain.
42 2011-03-29 Corinna Vinschen <corinna@vinschen.de>
44 * include/cygwin/version.h: Bump CYGWIN_VERSION_DLL_MINOR to 10.
46 2011-03-29 Corinna Vinschen <corinna@vinschen.de>
48 * autoload.cc (winmm): Remove time functions. Don't treat
49 unloadable wave functions as fatal.
50 * hires.h (hires_ms::timeGetTime_ns): New private method.
51 (hires_ms::dmsecs): Call timeGetTime_ns here.
52 * ntdll.h (struct _KSYSTEM_TIME): Define.
53 (KUSER_SHARED_DATA): Redefine to allow access to InterruptTime.
54 (SharedUserData): Define here.
55 (NtQueryTimerResolution): Declare.
56 (NtSetTimerResolution): Declare.
57 * path.cc (SharedUserData): Move to ntdll.h.
58 * times.cc (hires_ms::timeGetTime_ns): New private method.
59 Use throughout instead of timeGetTime. Document entire functionality
60 of timeGetTime in case we need it.
61 (hires_ms::resolution): Try a call to NtQueryTimerResolution
62 to fetch current period. Fall back to heuristic if that fails.
63 Cast to DWORD in assignments to minperiod.
64 (clock_setres): Align period to possible values per a call to
65 NtQueryTimerResolution. Explain why. Replace calls to timeBeginPeriod
66 and timeEndPeriod with underlying call to NtSetTimerResolution. Use
67 status code from NtSetTimerResolution to compute errno.
68 Convert period to ULONGLONG and store 100ns value to simplify code.
70 2011-03-29 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
71 Corinna Vinschen <corinna@vinschen.de>
73 * include/sys/xattr.h: New file.
75 2011-03-28 Jon TURNEY <jon.turney@dronecode.org.uk>
77 * thread.cc (semaphore::init, destroy, close): Standards conformance
78 fix. On a failure, return -1 and set errno.
79 * thread.h (semaphore::terminate): Save errno since semaphore::close()
82 2011-03-27 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
84 * cygwin.din (strchrnul): Export.
85 * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
86 * posix.sgml (std-gnu): Add strchrnul.
88 2011-03-27 Christopher Faylor <me.cygwin2011@cgf.cx>
90 * dll_init.cc (dll::init): Accommodate ill-behaved dlls who don't fill
93 2011-03-25 Corinna Vinschen <corinna@vinschen.de>
95 * mmap.cc (mmap64): Add a cheat to let a certain autoconf test succeed
96 on 64 bit systems. Explain why.
98 2011-03-23 Christopher Faylor <me.cygwin2011@cgf.cx>
100 * wincap.cc (wincap_2003): Set use_dont_resolve_hack to true.
102 2011-03-23 Christopher Faylor <me.cygwin2011@cgf.cx>
104 * autoload.cc (dll_load): Change error message to make it clear if a
105 newer DLL is being run.
107 2011-03-20 Corinna Vinschen <corinna@vinschen.de>
109 * fenv.cc (_feinitialise): Don't use SSE instructions on systems not
111 * wincap.h (wincaps::supports_sse): New element.
112 * wincap.cc: Implement above element throughout.
114 2011-03-18 Corinna Vinschen <corinna@vinschen.de>
116 * cygwin.sc: Raise default cygheap size to 2 Megs.
118 2011-03-18 Christopher Faylor <me.cygwin2011@cgf.cx>
120 * fhandler.h (DEFAULT_PIPEBUFSIZE): Reset to 64K.
122 2011-03-18 Corinna Vinschen <corinna@vinschen.de>
124 * mmap.cc (mmap_record::alloc_fh): Initialize name strings in fdev to
125 empty strings or suffer a SEGV. Drop second parameter in call to
128 2011-03-18 Corinna Vinschen <corinna@vinschen.de>
130 * mmap.cc (class mmap_record): Pack 4 byte-aligned. Convert member dev
132 (mmap_record::alloc_fh): Create temporary device from dev and use in
133 call to build_fh_dev.
135 2011-03-18 Corinna Vinschen <corinna@vinschen.de>
137 * mmap.cc (mmap_record::page_map): Define as variable array rather than
139 (mmap_record::alloc_page_map): Remove.
140 (mmap_record::free_page_map): Remove.
141 (mmap_record::init_page_map): New method.
142 (mmap_record::add_record): Take mmap_record parameter by reference
143 rather than by value.
144 (mmap_record::map_pages): Fix comment.
145 (mmap_list::add_record): Allocate space for mmap_record including the
146 page_map in a single ccalloc call. Call init_page_map afterwards.
147 (mmap_list::del_record): Remove call to mmap_record::free_page_map.
149 2011-03-16 Corinna Vinschen <corinna@vinschen.de>
151 * crt0.c (mainCRTStartup): Move call to _feinitialise from here...
152 * dcrt0.cc (_dll_crt0): ...to here.
154 2011-03-16 Corinna Vinschen <corinna@vinschen.de>
156 * winver.rc: Fix copyright dates.
158 2011-03-14 Corinna Vinschen <corinna@vinschen.de>
160 * fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Only use
161 file id as inode number if it masters the isgood_inode check.
163 2011-03-13 Christopher Faylor <me.cygwin2011@cgf.cx>
165 * fhandler.cc (fhandler_base_overlapped::wait_overlapped): Remove
166 special treatment for ERROR_NO_SYSTEM_RESOURCES. Cancel I/O and reset
167 the overlapped handle on error.
168 (fhandler_base_overlapped::write_overlapped): Limit writes to
169 max_atomic_write bytes in blocking case. Incorporate code from
170 now-defunct write_overlapped_fallback. Fix serious oversight where ptr
171 was not advanced as buffer was written.
172 (fhandler_base_overlapped::write_overlapped_fallback): Eliminate.
173 * fhandler.h (fhandler_base_overlapped::write_overlapped_fallback):
174 Ditto for declaration.
175 (DEFAULT_PIPEBUFSIZE): Lower size to slightly less than documented
176 worst-case atomic write size.
177 (fhandler_overlapped::wait_return): Remove unused element.
179 2011-03-09 Christopher Faylor <me.cygwin2011@cgf.cx>
181 * fhandler.cc (fhandler_base_overlapped::wait_overlapped): Handle
182 overlapped_fallback error condition like other error conditions. Set
183 res carefully and specifically for each condition rather than resorting
185 (fhandler_base_overlapped::write_overlapped): Preserve errno in
186 overlapped_fallback condition. Correct write_overlapped_fallback to
187 avoid inappropriate looping.
188 (fhandler_base_overlapped::write_overlapped_fallback): Add some more
191 2011-03-09 Christopher Faylor <me.cygwin2011@cgf.cx>
193 * fhandler.cc (fhandler_base_overlapped::write_overlapp): Oops!
194 Accommodate change in arguments to wait_overlapped.
196 2011-03-09 Christopher Faylor <me+cygwin@cgf.cx>
198 * errno.cc (errmap): Change mapping of NO_SYSTEM_RESOURCES to EFBIG.
199 * fhandler.cc (MAX_OVERLAPPED_WRITE_LEN): New constant.
200 (MIN_OVERLAPPED_WRITE_LEN): Ditto.
201 (fhandler_base_overlapped::close): Accommodate change in arguments to
203 (fhandler_base_overlapped::setup_overlapped): Add __stdcall and regparm
205 (fhandler_base_overlapped::destroy_overlapped): Ditto.
206 (fhandler_base_overlapped::has_ongoing_io): Ditto.
207 (fhandler_base_overlapped::wait_overlapped): Modify to return an enum
208 returning various states. Accept nonblocking parameter.
209 (fhandler_base_overlapped::read_overlapped): Add __stdcall and regparm
210 modifiers. Rework to attempt to be smarter about reacting to states
211 returned by wait_overlapped.
212 (fhandler_base_overlapped::write_overlapped): Ditto. Add fallback
213 option for when wait_overlapped detects that smaller chunks must be
215 (fhandler_base_overlapped::write_overlapped_fallback): Ditto.
216 * fhandler.h (DEFAULT_PIPEBUFSIZE): Move definition here from pipe.cc.
217 (fhandler_base::has_ongoing_io): Define with __stdcall and regparm
219 (fhandler_base_overlapped::wait_return): New enum.
220 (fhandler_base_overlapped::max_atomic_write): New variable.
221 (fhandler_base_overlapped:: wait_overlapped): Accommodate changes
222 mentioned above to arguments and modifiers.
223 (fhandler_base_overlapped::setup_overlapped): Ditto for modifiers.
224 (fhandler_base_overlapped::read_overlapped): Ditto.
225 (fhandler_base_overlapped::write_overlapped): Ditto.
226 (fhandler_base_overlapped::destroy_overlapped): Ditto.
227 (fhandler_base_overlapped::has_ongoing_io): Ditto.
228 (fhandler_base_overlapped::fhandler_base_overlapped): Zero
230 * fhandler_fifo.cc (fhandler_fifo::fhandler_fifo): Set max_atomic_write
231 to the size of the DEFAULT_PIPEBUFSIZE.
232 (fhandler_fifo::wait): Accommodate change in arguments to
234 * pipe.cc (fhandler_pipe::fhandler_pipe): Set max_atomic_write to the
235 size of the DEFAULT_PIPEBUFSIZE.
236 (fhandler_pipe::create_selectable): Allow minimum size of DEFAULT_PIPEBUFSIZE.
237 (DEFAULT_PIPEBUFSIZE): Delete here, move to fhandler.h.
239 2011-03-08 Corinna Vinschen <corinna@vinschen.de>
241 * security.cc: Fix copyright dates.
243 2011-03-08 Corinna Vinschen <corinna@vinschen.de>
245 * fhandler.cc (fhandler_base::open): When creating a file on a
246 filesystem supporting ACLs, create the file with WRITE_DAC access.
248 * fhandler_disk_file.cc (fhandler_disk_file::mkdir): Ditto for
250 * fhandler_socket.cc (fhandler_socket::bind): Ditto for sockets.
251 * path.cc (symlink_worker): Ditto for symlinks.
252 * security.cc (get_file_sd): Always call GetSecurityInfo for directories
253 on XP and Server 2003. Improve comment to explain why.
254 (set_file_attribute): Explicitely cast mode_t value to bool in call to
256 * wincap.h (wincaps::use_get_sec_info_on_dirs): New element.
257 * wincap.cc: Implement above element throughout.
259 2011-03-04 Corinna Vinschen <corinna@vinschen.de>
261 * fhandler_procsys.cc (fhandler_procsys::exists): Rewrite.
262 (fhandler_procsys::fill_filebuf): Fill buffer with valid string even if
263 reading the symlink fails.
265 2011-03-03 Corinna Vinschen <corinna@vinschen.de>
267 * posix_ipc.cc (ipc_cond_timedwait): If ipc_mutex_unlock fails, return
269 (_mq_send): Break loop if ipc_cond_timedwait returns with error.
270 (_mq_receive): Ditto.
272 2011-03-03 Corinna Vinschen <corinna@vinschen.de>
274 * errno.cc (__xpg_strerror_r): Add accidentally missing condition.
276 2011-03-02 Corinna Vinschen <corinna@vinschen.de>
278 * fhandler_procsys.cc (fhandler_procsys::open): Call worker exists
279 method, rather than wrapper.
281 2011-03-01 Christopher Faylor <me+cygwin@cgf.cx>
283 * autoload.cc (dll_load): Avoid in_forkee test since this apparently
284 fails even when not forked.
286 2011-03-01 Christopher Faylor <me+cygwin@cgf.cx>
288 * include/cygwin/version.h: Bump CYGWIN_VERSION_DLL_MINOR to 9.
290 2011-02-28 Christopher Faylor <me+cygwin@cgf.cx>
292 * autoload.cc (dll_load): Only perform DONT_RESOLVE_DLL_REFERENCES hack
293 on systems which need it.
294 * wincap.cc (use_dont_resolve_hack): Set as appropriate.
295 * wincap.h (use_dont_resolve_hack): Define.
297 2011-02-28 Christopher Faylor <me+cygwin@cgf.cx>
299 * autoload.cc (dll_load): Make inline. Clarify logic.
301 2011-02-27 Corinna Vinschen <corinna@vinschen.de>
303 * autoload.cc (dll_load): Only call LoadLibraryExW with
304 DONT_RESOLVE_DLL_REFERENCES if a normal LoadLibrary call failed with
305 ERROR_INVALID_ADDRESS.
306 (LsaRegisterLogonProcess): Align comment to previous change.
308 2011-02-26 Christopher Faylor <me+cygwin@cgf.cx>
310 * autoload.cc: Use LoadDLLfuncEx3 for all winmm functions. Accommodate
311 changes to LoadDLLprime.
312 (LoadDLLprime): Take an extra argument indicating whether this dll
313 needs special handling on fork. Place this information in the "handle"
315 (LoadDLLfuncEx3): Eliminate "func" handling. Pass new
316 no_resolve_on_fork argument to LoadDLLprime.
317 (dll_load): New function.
318 (std_dll_init): Accommodate changes to dll_info::handle. Use dll_load
319 to load DLL in both cases where it is used.
321 2011-02-26 Corinna Vinschen <corinna@vinschen.de>
323 * autoload.cc: Make autoloaded ntdll function non-optional. Ditto for
324 secur32 functions, except for LsaRegisterLogonProcess. Change return
325 value to ERROR_PROC_NOT_FOUND. Explain why.
326 * sec_auth.cc (lsaauth): Handle ERROR_PROC_NOT_FOUND from call to
327 LsaRegisterLogonProcess when generating the errno value.
329 2011-02-22 Corinna Vinschen <corinna@vinschen.de>
331 * dcrt0.cc: Fix copyright dates.
333 * syscalls.cc (_read): Move EXPORT_ALIAS to its rightful place.
335 2011-02-21 Christopher Faylor <me+cygwin@cgf.cx>
337 * cygwin.din: Mark __assert* and _abort as NOSIGFE.
339 2011-02-21 Corinna Vinschen <corinna@vinschen.de>
341 * fhandler_socket (fhandler_socket::readv): Call recv_internal directly,
343 (fhandler_socket::writev): Call send_internal directly, rather than
345 * net.cc (cygwin_recv): Call fhandler_socket::recvfrom directly, rather
346 than cygwin_recvfrom.
347 (cygwin_send): Call fhandler_socket::sendto directly, rather than
350 2011-02-20 Christopher Faylor <me+cygwin@cgf.cx>
352 * fhandler.cc (fhandler_base_overlapped::close): Finish any pending I/O
354 (fhandler_base_overlapped::wait_overlapped): Defensively zero bytes
355 read. Add more info to debugging output.
357 2011-02-18 Christopher Faylor <me+cygwin@cgf.cx>
359 * dcrt0.cc (dll_crt0_1): Add a CYGHEAP_DEBUG conditional for debugging
360 which allocates a lot of space at startup.
362 2011-02-18 Corinna Vinschen <corinna@vinschen.de>
364 * cygwin.sc: Set alignment of .cygheap section to 64K.
366 2011-02-15 Corinna Vinschen <corinna@vinschen.de>
368 * spawn.cc (spawn_guts): Only set PID_NOTCYGWIN in _P_OVERLAY mode.
369 Drop flag if creating new process failed.
371 2011-02-15 Corinna Vinschen <corinna@vinschen.de>
373 * Throughout fix copyright dates.
375 2011-02-15 Corinna Vinschen <corinna@vinschen.de>
377 * devices.in: Throughout use slashes instead of backslashes in the
378 native path of devices not backed by native NT devices.
379 * devices.cc: Regenerate.
380 * globals.cc (ro_u_pmem): Use correct case.
381 (ro_u_globalroot): New R/O unicode string.
382 * path.cc (path_conv::check): Fix incorrect handling of /proc/sys
383 block devices if they are just visited due to a component check.
384 (symlink_info::posixify): Fix typo in comment.
385 (cygwin_conv_path): Use ro_u_globalroot instead of string constant.
386 (fast_cwd_version): New shared variable to store FAST_CWD version
388 (find_fast_cwd_pointer): Rename from find_fast_cwd_pointers. Don't
389 set global fast_cwd_ptr pointer here. Return pointer value instead.
390 (find_fast_cwd): New function to set fast_cwd_ptr and fast_cwd_version.
391 (cwdstuff::override_win32_cwd): Call find_fast_cwd from here.
392 Check for fast_cwd_version to differ between old and new FAST_CWD
393 structure. Check old_cwd for NULL to avoid SEGV. Don't set CWD if
394 we have neitehr a valid fast_cwd_ptr, nor a valid CWD handle in the
395 process parameter block.
396 (cwdstuff::set): Create Win32 path taking /proc/sys paths into account.
397 * spawn.cc (spawn_guts): Recode creating runpath. Also take /proc/sys
398 paths into account. Drop special CWD handling when starting non-Cygwin
401 2011-02-15 Corinna Vinschen <corinna@vinschen.de>
403 * fhandler_procsys.cc (fhandler_procsys::opendir): Avoid SEGV if
404 opening object directory fails.
405 * fhandler_virtual.cc (fhandler_virtual::opendir): Don't leak memory.
407 2011-02-15 Corinna Vinschen <corinna@vinschen.de>
409 * fhandler_disk_file.cc (fhandler_disk_file::readdir_helper): Don't
410 append slash if there is one already.
412 2011-02-15 Corinna Vinschen <corinna@vinschen.de>
414 Revert change from 2010-08-31:
415 * path.cc (normalize_posix_path): Drop support for //./ and //?/
417 (path_conv::check): Ditto.
419 2011-02-15 Corinna Vinschen <corinna@vinschen.de>
421 * fhandler_disk_file.cc (fhandler_disk_file::readdir_helper): Use POSIX
422 path to check for symlink.
424 2011-02-14 Corinna Vinschen <corinna@vinschen.de>
426 * config/i386/profile.h: Sync with Mingw.
428 2011-02-13 Corinna Vinschen <corinna@vinschen.de>
430 * path.cc (struct _FAST_CWD): Redefine to new layout used since patch
431 for KB 2393802. Adjust comments throughout.
432 (struct _FAST_CWD_OLD): Rename former definition.
433 (cwdstuff::override_win32_cwd): Check if the OS is using the old or the
434 new FAST_CWD structure layout and handle accordingly.
436 2011-02-11 Christopher Faylor <me+cygwin@cgf.cx>
438 * mkstatic: Make sure that we are not cd'ed to temporary directory on
439 exit to avoid bogus warnings on directory cleanup.
443 2011-02-11 Christopher Faylor <me+cygwin@cgf.cx>
445 * cygwin.sc: Eliminate __cygheap_mid.
448 2011-02-11 Christopher Faylor <me+cygwin@cgf.cx>
450 * cygheap.cc (_cygheap_mid): Drop unneeded section attribute.
451 (cygheap_init): Just zero cygheap structure.
452 * cygwin.sc: Keep 16 byte alignment but drop all other alignments
453 related to cygheap. Eliminate unused __cygheap_end1.
455 2011-02-11 Corinna Vinschen <corinna@vinschen.de>
457 * cygwin.sc: Raise default cygheap size to 1 Meg. Set alignment to
460 2011-02-11 Corinna Vinschen <corinna@vinschen.de>
462 * include/endian.h: Move definitions of __BIG_ENDIAN, __LITTLE_ENDIAN,
463 and __BYTE_ORDER into ...
464 * include/bits/endian.h: New file.
465 * include/arpa/nameser_compat.h: Include endian.h rather than defining
467 * include/asm/byteorder.h: Include bits/endian.h. Drop definition of
469 * include/netinet/ip.h: Include bits/endian.h. Drop definitions of
470 BIG_ENDIAN, LITTLE_ENDIAN, and BYTE_ORDER. Use underscored variants
471 of aforementioned constants.
472 * include/netinet/tcp.h: Ditto.
473 * include/sys/param.h: Drop disabled definitions of BIG_ENDIAN,
474 LITTLE_ENDIAN, and BYTE_ORDER.
476 * include/netinet/ip.h: Reformat. Define setsockopt IP_TOS options
477 matching recent RFCs. Tweak comments.
479 2011-02-10 Eric Blake <eblake@redhat.com>
481 * errno.cc (includes): Avoid compilation failure if <string.h>
482 settles on wrong strerror_r signature.
484 * errno.cc (__xpg_strerror_r): New function.
485 (strerror_r): Update to copy newlib's fixes.
486 (strerror): Set errno on failure.
487 (_sys_errlist): Cause EINVAL failure for reserved values.
488 * cygwin.din: Export new function.
489 * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Combine
492 2011-02-09 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
494 * cygwin.din (pthread_yield): Export as alias to sched_yield.
495 * include/pthread.h (pthread_yield): Declare.
496 * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
497 * posix.sgml (std-deprec): Add pthread_yield.
499 2011-02-09 Christopher Faylor <me+cygwin@cgf.cx>
501 * cygheap.cc: Add some __stdcall decoration where appropriate.
502 * lib/cygwin_crt0.c: __attribute -> __attribute__.
504 2011-02-09 Christopher Faylor <me+cygwin@cgf.cx>
506 * hookapi.cc (hook_or_detect_cygwin): Prevent i from being considered
507 uninitialized by gcc.
509 2011-02-09 Christopher Faylor <me+cygwin@cgf.cx>
511 * exception.h: Remove DEBUG_EXCEPTION left over debugging ifdef.
513 2011-02-08 Christopher Faylor <me+cygwin@cgf.cx>
515 * dll_init.cc: Fix typo in comment.
517 2011-02-07 Corinna Vinschen <corinna@vinschen.de>
519 * configure.in: Remove AC_ALLOCA test and test for __builtin_memset.
520 * configure: Regenerate.
522 2011-02-07 Corinna Vinschen <corinna@vinschen.de>
524 * fhandler_console.cc (fhandler_console::write_normal): Remove
525 erroneous premature return after collecting truncated multibyte
526 sequence in trunc_buf. Rather fall through to printing routine.
527 Fix return value to take trunc_buf content into account. Improve
530 2011-02-05 Christopher Faylor <me+cygwin@cgf.cx>
532 * autoload.cc (wsock_init): Properly define WSAStartup function pointer
533 to avoid stack damage.
535 2011-02-02 Corinna Vinschen <corinna@vinschen.de>
537 * libc/bsdlib.cc: Include err.h.
539 2011-02-02 Eric Blake <eblake@redhat.com>
541 * include/err.h: Fix loss of semicolons in previous patch.
543 2011-02-02 Corinna Vinschen <corinna@vinschen.de>
545 * include/err.h (err): Add noreturn attribute.
550 2011-02-02 Corinna Vinschen <corinna@vinschen.de>
552 * path.cc (conv_path_list): Remove enclosing quotes and trailing
553 backslashes from Win32 environment path lists.
555 2011-02-01 Christian Franke <franke@computer.org>
557 * fhandler.cc (fhandler_base::fsync): Ignore ERROR_INVALID_FUNCTION
558 error from FlushFileBuffers().
560 2011-01-31 Corinna Vinschen <corinna@vinschen.de>
562 * syscalls.cc (utmp_data): Fix potential buffer overflow.
564 2011-01-31 Corinna Vinschen <corinna@vinschen.de>
566 * fhandler_socket.cc (address_in_use): Improve comment readability.
568 2011-01-30 Corinna Vinschen <corinna@vinschen.de>
570 * fhandler_socket.cc (address_in_use): Disable. Add comment.
571 (fhandler_socket::bind): Change comment to explain setting the
572 SO_EXCLUSIVEADDRUSE socket option. Remove code which checks for
574 * net.cc (cygwin_setsockopt): Never set SO_REUSEADDR option. Improve
575 comment to compensate for the deleted comment in fhandler_socket::bind.
576 * wincap.cc: Throughout, drop has_enhanced_socket_security from wincaps.
577 * wincap.h (struct wincaps): Drop has_enhanced_socket_security flags
580 2011-01-28 Peter Foley <jpfoley2@verizon.net>
582 * configure.in: Define LIBSERVER regardless of cross_host.
583 * configure: Regenerate.
585 2011-01-28 Corinna Vinschen <corinna@vinschen.de>
587 * fhandler_socket.cc (fhandler_socket::wait_for_events): Call
588 pthread_testcancel in case of timeout to enable pthread_cancel
591 2011-01-27 Corinna Vinschen <corinna@vinschen.de>
593 * include/features.h (__STDC_ISO_10646__): Move to newlib's
596 2011-01-26 Corinna Vinschen <corinna@vinschen.de>
598 * fhandler_disk_file.cc (fhandler_base::fstat_by_nfs_ea): Fix
599 computation of st_blocks.
600 (fhandler_base::fstat_helper): Fix formatting.
602 2011-01-24 Corinna Vinschen <corinna@vinschen.de>
604 * include/features.h (__STDC_ISO_10646__): Define. Add comment.
606 2011-01-21 Corinna Vinschen <corinna@vinschen.de>
608 * syscalls.cc (rename): Fix permission problem with symlinks on NFS.
609 Rework how NtOpenFile gets called to make it more readable. Change
612 2011-01-20 Corinna Vinschen <corinna@vinschen.de>
614 * exec.cc: Include pinfo.h.
615 * winf.h: Move definitions of _P_PATH_TYPE_EXEC and _P_MODE from here...
616 * pinfo.h: ...to here.
617 (_P_PATH_TYPE_EXEC): Redefine to be bigger than _P_SYSTEM.
618 (_P_MODE): Redefine so as not to mask out _P_SYSTEM.
619 * spawn.cc (spawnlp): Add _P_PATH_TYPE_EXEC flag in call to spawnve.
623 2011-01-19 Corinna Vinschen <corinna@vinschen.de>
625 * spawn.cc (av::fixup): Reenable #! handling for all exec functions.
626 Return ENOEXEC in !p_type_exec case only for unrecognized files.
627 Fix comment formatting.
629 2011-01-19 Corinna Vinschen <corinna@vinschen.de>
631 * exec.cc (execlp): Add missing _P_PATH_TYPE_EXEC flag in call to
634 2011-01-19 Corinna Vinschen <corinna@vinschen.de>
636 * exec.cc: Rearrange functions in alphabetical order.
637 (_execve): Drop temporary define and drop export alias.
638 (execl): Call spawnve.
639 (execle): New function.
640 (execlp): New function.
641 (execv): Call spawnve.
642 (execve): Drop converting NULL envp to emtpy envp.
643 (execvp): Call spawnve.
644 (execvpe): Drop converting NULL envp to emtpy envp. Call spawnve.
645 (fexecve): Call spawnve.
646 * spawn.cc (spawnve): Convert NULL envp to emtpy envp. Remove outdated
648 (spawnlp): Call spawnve.
651 (spawnvpe): Fix formatting.
653 2011-01-19 Corinna Vinschen <corinna@vinschen.de>
655 * exec.cc (strccpy): Move function from here...
656 * strfuncs.cc (strccpy): ...to here.
657 * string.h (strccpy): Declare.
658 * winsup.h (strccpy): Drop declaration.
660 2011-01-19 Corinna Vinschen <corinna@vinschen.de>
662 * errno.cc (errmap): Add error codes for invalid binaries.
663 * exec.cc (execvp): Call spawnve with _P_PATH_TYPE_EXEC flag
666 * spawn.cc (spawn_guts): Filter _P_PATH_TYPE_EXEC from mode and
667 store in p_type_exec. Call av::fixup with addtional p_type_exec
669 (spawnve): Check for filtered mode.
670 (spawnvpe): Add _P_PATH_TYPE_EXEC flag when calling spawnve.
671 (av::fixup): Accept additional bool parameter p_type_exec. Only check
672 for script if p_type_exec is true.
673 * winf.h (_P_PATH_TYPE_EXEC): Define.
675 (av::fixup): Declare with additional bool parameter.
677 2011-01-17 Corinna Vinschen <corinna@vinschen.de>
679 * fhandler_proc.cc (format_proc_partitions): Fix compiler warning.
681 2011-01-17 Corinna Vinschen <corinna@vinschen.de>
683 * path.cc (path_conv::check): Don't follow reparse point symlinks if
684 PC_SYM_NOFOLLOW_REP flag is set.
685 (cygwin_conv_path): Set PC_SYM_NOFOLLOW_REP flag when converting from
687 * path.h (enum pathconv_arg): Define PC_SYM_NOFOLLOW_REP flag.
689 2011-01-17 Corinna Vinschen <corinna@vinschen.de>
691 * fhandler_proc.cc (proc_tab_cmp): Fix typo in comment.
692 (fhandler_proc::fill_filebuf): Handle return value of 0 from format
694 (format_proc_stat): Set errno when returning 0 size.
695 (format_proc_partitions): Rewrite method to fetch partition info.
697 2011-01-13 Corinna Vinschen <corinna@vinschen.de>
699 * fhandler_disk_file.cc (fhandler_base::fstat_helper): Always set
700 st_size of directories to 0. Explain why.
702 2011-01-12 Corinna Vinschen <corinna@vinschen.de>
704 * posix.sgml: Add madvise to BSD list.
706 2011-01-12 Corinna Vinschen <corinna@vinschen.de>
708 * cygwin.din (madvise): Export posix_madvise as madvise.
709 * include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR.
710 * include/sys/mman.h: Define madvise constants, keep Linux-specific
714 2011-01-12 Corinna Vinschen <corinna@vinschen.de>
716 * fhandler.h (struct part_t): New type.
717 (class fhandler_dev_floppy): Convert partitions to part_t pointer.
718 Add lock_partition method.
719 * fhandler_floppy.cc (fhandler_dev_floppy::lock_partition): New method
720 to implement ondemand partition locking.
721 (fhandler_dev_floppy::write_file): Call lock_partition from here if
722 writing failed due to a potential write restriction on a disk
724 (fhandler_dev_floppy::open): Don't lock partitions here.
725 (fhandler_dev_floppy::close): Keep track of partition handle reference
726 count. Close handles and remove partitions pointer ony if count is 0.
727 (fhandler_dev_floppy::dup): Just copy partitions pointer and increment
730 2011-01-11 Corinna Vinschen <corinna@vinschen.de>
732 * fhandler.h (MAX_PARTITIONS): New definition.
733 (class fhandler_dev_floppy): Add partitions array member. Add close
735 * fhandler_floppy.cc (fhandler_dev_floppy::fhandler_dev_floppy): Zero
736 out partitions array.
737 (fhandler_dev_floppy::open): Fix "entire disk" condition for call to
738 DeviceIoControl (FSCTL_ALLOW_EXTENDED_DASD_IO).
739 When opening disks for writing, call DeviceIoControl (FSCTL_LOCK_VOLUME)
740 on all affected disk partitions starting with Vista.
741 (fhandler_dev_floppy::close): New method.
742 (fhandler_dev_floppy::dup): Duplicate handles in partitions, if any.
743 * wincap.h (wincaps::has_restricted_raw_disk_access): New element.
744 * wincap.cc: Implement above element throughout.
746 2011-01-11 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
748 * termios.cc (cfgetospeed, cfgetispeed): Constify argument per POSIX.
749 * include/sys/termios.h (cfgetospeed, cfgetispeed): Declare functions.
750 Move macros after declarations and make conditional on !__cplusplus.
752 2011-01-11 Corinna Vinschen <corinna@vinschen.de>
754 * cygtls.cc (_cygtls::init_thread): Call _REENT_INIT_PTR. Drop setting
755 current locale and calling srand48.
757 2011-01-02 Christopher Faylor <me+cygwin@cgf.cx>
759 * ChangeLog-2010: Create from ChangeLog.
760 * ChangeLog: Start fresh.