1 2011-05-02 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
3 * cygwin.din (pthread_attr_getstack): Export.
4 (pthread_attr_getstackaddr): Export.
5 (pthread_getattr_np): Export.
6 * ntdll.h (enum _THREAD_INFORMATION_CLASS): Add ThreadBasicInformation.
7 (struct _THREAD_BASIC_INFORMATION): Define.
8 (NtQueryInformationThread): Declare.
9 * posix.sgml (std-susv4): Add pthread_attr_getstack.
10 (std-gnu): Add pthread_getattr_np.
11 (std-deprec): Add pthread_attr_getstackaddr.
12 (std-notimpl): Remove pthread_attr_[gs]etstackaddr, as they were
14 * thread.cc (pthread_attr::pthread_attr): Initialize stackaddr.
15 (pthread_attr_getstack): New function.
16 (pthread_attr_getstackaddr): New function.
17 (pthread_attr_setstacksize): Return EINVAL if passed size less than
18 PTHREAD_STACK_MIN, as required by POSIX.
19 (pthread_getattr_np): New function.
20 * thread.h (class pthread_attr): Add stackaddr member.
21 * include/pthread.h (pthread_attr_getstack): Declare.
22 (pthread_attr_getstackaddr): Declare unconditionally.
23 (pthread_attr_setstack): Declare inside false conditional for reference.
24 (pthread_getattr_np): Declare.
25 * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
27 2011-05-02 Christopher Faylor <me.cygwin2011@cgf.cx>
29 * Makefile.in: Allow CFLAGS to be overridden from the environment.
31 2011-05-02 Corinna Vinschen <corinna@vinschen.de>
33 * thread.cc (cancelable_wait): Remove test for main thread.
34 * fhandler_fifo.cc (fhandler_fifo::open_nonserver): Ditto.
36 2011-05-02 Corinna Vinschen <corinna@vinschen.de>
38 * fhandler_tty.cc (andler_pty_master::process_slave_output): Make
39 interruptible and cancelable. Fix nonblocking case.
41 2011-05-02 Corinna Vinschen <corinna@vinschen.de>
43 * fhandler_console.cc (fhandler_console::read): Make restartable and
46 2011-05-02 Christopher Faylor <me.cygwin2011@cgf.cx>
48 * strace.cc (strace::vprntf): Avoid closing unopened handle.
50 2011-05-02 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
52 * sysconf.cc (sca): Set _SC_SPIN_LOCKS to _POSIX_SPIN_LOCKS.
54 2011-05-02 Christopher Faylor <me.cygwin2011@cgf.cx>
56 * dll_init.cc (dll_list::alloc): Reset 'p' in forked process.
58 * select.cc (select_stuff::wait): Move cleanup() closer to WFMO to
59 minimize unavoidable (?) race.
61 2011-05-02 Corinna Vinschen <corinna@vinschen.de>
63 * fhandler_serial.cc (fhandler_serial::raw_read): Add restartability
64 after a signal. Add cancelability.
65 (fhandler_serial::raw_write): Wait for write to succeed if O_NONBLOCK
66 is not set. Add signal handling and cancelability.
68 2011-05-01 Corinna Vinschen <corinna@vinschen.de>
70 * fhandler_windows.cc (fhandler_windows::read): Use
71 pthread::get_cancel_event to fetch thread's cancel event.
72 * flock.cc (lf_setlock): Ditto.
73 * posix_ipc.cc (ipc_cond_timedwait): Ditto.
74 * thread.cc (pthread::get_cancel_event): New static method.
75 * thread.h (pthread::get_cancel_event): Declare.
77 2011-05-01 Corinna Vinschen <corinna@vinschen.de>
79 * libc/minires-os-if.c (get_dns_info): Remove unnecessary test for
80 existence of DnsQuery_A.
82 2011-05-01 Corinna Vinschen <corinna@vinschen.de>
84 Throughout, use user32 UNICODE functions rather than ANSI functions.
85 * autoload.cc: Convert all definitions for ANSI user32 functions to
86 definitions for the corresponding UNICODE function.
87 (SendMessageA): Remove.
88 (SendNotifyMessageW): Define.
89 * fhandler.h (fhandler_windows::is_slow): Remove.
90 * fhandler_windows.cc (fhandler_windows::write): Use SendNotifyMessageW
91 call rather than SendMessage to make function always return immediately.
92 (fhandler_windows::read): Make function interruptible and a cancellation
93 point. Handle O_NONBLOCK.
94 * select.cc (peek_serial): Don't wait for signal_arrived here.
95 * window.cc (wininfo::winthread): Call CreateWindowExW directly rather
96 than CreateWindow wrapper.
98 2011-05-01 Corinna Vinschen <corinna@vinschen.de>
100 * net.cc (fdsock): Drop setting uninterruptible_io to true.
102 2011-05-01 Corinna Vinschen <corinna@vinschen.de>
104 * fhandler.h (fhandler_socket::is_slow): Remove.
106 2011-04-30 Corinna Vinschen <corinna@vinschen.de>
108 * fcntl.cc (fcntl64): Call pthread_testcancel.
109 * fhandler_socket.cc (fhandler_socket::connect): Ditto.
110 (fhandler_socket::accept4): Ditto.
111 (fhandler_socket::recvfrom): Ditto.
112 (fhandler_socket::recvmsg): Ditto.
113 (fhandler_socket::sendto): Ditto.
114 (fhandler_socket::sendmsg): Ditto.
115 * flock.cc (lf_setlock): Allow to cancel thread running blocking
116 file lock. Try to make code more readable.
117 (lockf): Call pthread_testcancel.
118 * mmap.cc (msync): Ditto.
119 * posix_ipc.cc (ipc_cond_timedwait): Call pthread::static_cancel_self
120 rather than pthread_testcancel.
121 * select.cc (cygwin_select): Call pthread_testcancel.
122 * syscalls.cc (pread): Ditto.
129 * termios.cc (tcdrain): Ditto.
130 * thread.cc: Align list of cancellation points with above changes.
131 Mark not-implemented functions, too.
132 (cancelable_wait): Don't set unused object indices to WAIT_FAILED
133 since that could result in wrong behaviour. Set them to the invalid
134 value WAIT_TIMEOUT + 1 instead.
136 2011-04-30 Corinna Vinschen <corinna@vinschen.de>
138 * thread.h (class pthread): Add bool member canceled.
139 * thread.cc (pthread::pthread): Initialize canceled to false.
140 (pthread::cancel): Set canceled before setting cancel_event.
141 (pthread::testcancel): Check for canceled. Only wait for cancel_event
142 if canceled is true. Explain why.
143 (pthread::_fixup_after_fork): Set canceled to false.
145 2011-04-29 Corinna Vinschen <corinna@vinschen.de>
147 * errno.cc (errmap): Sort. Map ERROR_EXE_MACHINE_TYPE_MISMATCH to
150 2011-04-29 Corinna Vinschen <corinna@vinschen.de>
152 * thread.cc: Update comment listing cancellation points per POSIX.
154 2011-04-29 Corinna Vinschen <corinna@vinschen.de>
156 * advapi32.cc: Add comment.
159 (AddAccessAllowedAce): Remove.
160 (AddAccessDeniedAce): Remove.
161 (MakeSelfRelativeSD): Remove.
162 * flock.cc: Replace above functions throughout with their ntdll.dll
165 * sec_auth.cc: Ditto.
166 * sec_helper.cc: Ditto.
167 * security.cc: Ditto.
169 (RtlEqualSid): Declare. Explain why.
172 2011-04-29 Corinna Vinschen <corinna@vinschen.de>
174 * advapi32.cc (AccessCheck): Remove.
175 (PrivilegeCheck): Remove.
176 (OpenThreadToken): Remove.
177 * fhandler_tty.cc: Replace above functions throughout with their
178 ntdll.dll equivalent.
179 * security.cc: Ditto.
181 2011-04-29 Corinna Vinschen <corinna@vinschen.de>
183 * ntdll.h (IsEventSignalled): New inline function.
184 * cygthread.cc (cygthread::terminate_thread): Use IsEventSignalled in
185 place of WaitForSingleObject on event with 0 timeout.
186 * fhandler.cc (fhandler_base_overlapped::has_ongoing_io): Ditto.
187 * fhandler_fifo.cc (fhandler_fifo::open_nonserver): Ditto.
188 (fhandler_fifo::wait): Ditto.
189 * fhandler_termios.cc (fhandler_termios::bg_check): Ditto.
190 * select.cc (verify_tty_slave): Ditto.
191 * thread.cc (pthread::testcancel): Ditto.
193 2011-04-29 Corinna Vinschen <corinna@vinschen.de>
195 * advapi32.cc (GetTokenInformation): Remove.
196 (SetTokenInformation): Remove.
197 * grp.cc: Replace above functions throughout with their ntdll.dll
199 * sec_auth.cc: Ditto.
200 * syscalls.cc: Ditto.
203 2011-04-29 Corinna Vinschen <corinna@vinschen.de>
205 * posix_ipc.cc (ipc_cond_timedwait): Only wait for pthread's
206 cancel_event if thread's cancelability isn't disabled.
208 2011-04-28 Corinna Vinschen <corinna@vinschen.de>
210 * advapi32.cc (SetSecurityDescriptorDacl): Remove.
211 (SetSecurityDescriptorGroup): Remove.
212 (SetSecurityDescriptorOwner): Remove.
213 * pinfo.cc: Replace above functions throughout with their ntdll.dll
216 * sec_helper.cc: Ditto.
217 * security.cc: Ditto.
219 * sec_helper.cc (__sec_user): Remove old comment.
221 2011-04-28 Corinna Vinschen <corinna@vinschen.de>
223 * posix_ipc.cc (ipc_cond_timedwait): Also wait for pthread's
224 cancel_event, if any. Call pthread_testcancel if cancel_event has been
227 2011-04-28 Corinna Vinschen <corinna@vinschen.de>
229 * posix_ipc.cc (ipc_cond_timedwait): Remove pthread_testcancel calls.
230 (_mq_send): Add pthread_testcancel call at start of function.
231 (_mq_receive): Ditto.
233 2011-04-28 Corinna Vinschen <corinna@vinschen.de>
235 * cygerrno.h (geterrno_from_nt_status): Declare.
236 * errno.cc (geterrno_from_nt_status): Define.
237 * flock.cc: Fix copyright dates.
238 * ntdll.h (enum _TIMER_TYPE): Define.
239 (PTIMER_APC_ROUTINE): Define.
240 (NtCancelTimer): Declare.
241 (NtCreateTimer): Declare.
242 (NtSetTimer): Declare.
243 * posix_ipc.cc (ipc_cond_timedwait): Rewrite to make interruptible and
244 restartable. Call pthread_testcancel in case of timeout to enable
245 pthread_cancel on waiting thread. Replace WFMO timeout with waiting
246 for a waitable timer. Explain why. Replace single call to WFMO with
247 two calls, one for the event, one for the mutex. Don't lock mutex in
249 (ipc_cond_signal): Make void function.
250 (ipc_cond_close): Ditto.
251 (_mq_send): Immediately return -1 in case of error from
253 (_mq_receive): Ditto.
255 2011-04-28 Corinna Vinschen <corinna@vinschen.de>
257 * advapi32.cc (GetSecurityDescriptorDacl): Remove.
258 (GetSecurityDescriptorGroup): Remove.
259 (GetSecurityDescriptorOwner): Remove.
260 * sec_acl.cc: Replace above functions throughout with their ntdll.dll
261 equivalent. Remove redundant debug output.
262 * sec_auth.cc: Ditto.
263 * security.cc: Ditto.
266 2011-04-28 Corinna Vinschen <corinna@vinschen.de>
268 * advapi32.cc (InitializeAcl): Remove.
270 (FindFirstFreeAce): Remove.
272 (InitializeSecurityDescriptor): Remove.
273 (OpenProcessToken): Remove.
274 * dcrt0.cc: Replace above functions throughout with their ntdll.dll
276 * fhandler_tty.cc: Ditto.
278 * pinfo.cc: Ditto. Drop unnecessary error handling.
280 * sec_auth.cc: Ditto.
281 * sec_helper.cc: Ditto.
282 * security.cc: Ditto.
284 2011-04-28 Corinna Vinschen <corinna@vinschen.de>
286 * advapi32.cc (InitializeSid): Remove.
287 (EqualPrefixSid): Remove.
288 (GetLengthSid): Remove.
289 (GetSidSubAuthority): Remove.
290 (GetSidSubAuthorityCount): Remove.
291 (GetSidIdentifierAuthority): Remove.
292 * fhandler_disk_file.cc: Replace above functions throughout with their
293 ntdll.dll equivalent.
294 * sec_auth.cc: Ditto.
295 * sec_helper.cc: Ditto.
296 * security.cc: Ditto.
298 2011-04-28 Corinna Vinschen <corinna@vinschen.de>
300 * advapi32.cc (AllocateLocallyUniqueId): Remove.
301 * fhandler_disk_file.cc (fhandler_base::open_fs): Replace call to
302 AllocateLocallyUniqueId with call to NtAllocateLocallyUniqueId;
303 * posix_ipc.cc (mq_open): Ditto. Drop error handling for that call.
306 2011-04-28 Corinna Vinschen <corinna@vinschen.de>
308 * autoload.cc (GetSecurityInfo): Remove.
309 * ntdll.h (RtlConvertToAutoInheritSecurityObject): Declare.
310 (RtlDeleteSecurityObject): Declare.
311 (RtlGetControlSecurityDescriptor): Declare.
312 (RtlLengthSecurityDescriptor): Declare.
313 * security.cc (file_mapping): New global variable.
314 (get_file_sd): Rewrite. Clean up code. Get rid of GetSecurityInfo
316 (alloc_sd): Call RtlSetControlSecurityDescriptor to set
317 SE_DACL_PROTECTED flag.
318 (check_file_access): Remove mapping. Use file_mapping instead.
319 (check_registry_access): Rename mapping to reg_mapping.
320 * wincap.cc: Througout, drop use_get_sec_info_on_dirs,
321 * wincap.h (struct wincaps): Drop use_get_sec_info_on_dirs.
323 2011-04-24 Corinna Vinschen <corinna@vinschen.de>
325 * include/fenv.h: Add missing _FENV_H_ define.
327 2011-04-23 Corinna Vinschen <corinna@vinschen.de>
329 * registry.cc (reg_key::get_dword): Rename from get_int, use DWORD
330 rather than int type. Avoid compiler warning.
331 (reg_key::set_dword): Rename from set_int, use DWORD rather than int
332 type. Change return type to NTSTATUS.
333 (reg_key::get_string): Change return type to NTSTATUS.
334 (reg_key::set_string): Ditto.
335 * registry.h: Accommodate above changes.
336 * environ.cc (regopt): Test return value of reg_key::get_string as
338 * sched.cc (sched_rr_get_interval): Change local int vars to DWORD.
339 Call reg_key::get_dword instead of reg_key::get_int.
340 * shared.cc (init_installation_root): Test return value of
341 reg_key::get_string as NTSTATUS.
342 (shared_info::heap_slop_size): Call reg_key::get_dword rather than
344 (shared_info::heap_chunk_size): Ditto.
345 * shared_info.h (CURR_SHARED_MAGIC): Update.
346 (class shared_info): Change heap_chunk and heap_slop to DWORD values.
348 2011-04-21 Corinna Vinschen <corinna@vinschen.de>
350 * cygtls.cc (_cygtls::init_thread): Drop setting locals.process_logmask.
351 * cygtls.cc (_cygtls::remove): Always free mallocated TLS storage on
352 thread exit. Drop freeing locals.process_ident.
353 * cygtls.h (struct _local_storage): Remove syslog-related members.
354 * syslog.cc (syslog_globals): New static storage for global syslog
355 settings. Use throughout instead of _my_tls.locals.
356 (openlog): Set new syslog_globals.process_ident value more carefully.
357 * tlsoffsets.h: Regenerate.
359 2011-04-21 Thomas Stalder <cygwinml@gmail.com>
361 * include/sys/poll.h: Include signal.h to get definition of sigset_t.
363 2011-04-20 Christopher Faylor <me.cygwin2011@cgf.cx>
365 * cygheap.cc (init_cygheap::close_ctty): Avoid closing console-cttys
366 since they don't use archetypes and this will just result in double
368 * dll_init.cc (dll_list::protect): Define.
369 (dll_list::alloc): Guard list access.
370 (dll_list::detach): Ditto.
371 * dll_init.h (dll_list::protect): Declare new muto.
372 (dll_list::guard): Define/declare function to guard list access.
373 * fhandler_termios.cc (fhandler_termios::sigflush): Avoid SEGV in
374 pathological condition of get_ttyp() == NULL.
376 2011-04-20 Christopher Faylor <me.cygwin2011@cgf.cx>
378 * select.cc (serial_cleanup): Make sure that device_specific_pipe is
379 always deleted regardless of whether it has a unique thread associated
381 (socket_cleanup): Ditto.
382 (mailslot_cleanup): Ditto.
384 2011-04-20 Corinna Vinschen <corinna@vinschen.de>
386 * devices.h: Renumber internal devices so that FH_PROCESS is part of
387 the /proc family of virtual devices.
388 (FH_PROC_MAX_MINOR): Define.
389 * path.h (isproc_dev): Use FH_PROC_MAX_MINOR rather than FH_PROC.
391 2011-04-19 Peter Rosin <peda@lysator.liu.se>
393 * select.cc (pipe_cleanup): Make sure that device_specific_pipe is
394 always deleted regardless of whether it has a unique thread associated
397 2011-04-19 Jon TURNEY <jon.turney@dronecode.org.uk>
399 * thread.cc (semaphore::init): We cannot reliably infer anything from
400 the existing contents of sem, so merely warn rather than return EBUSY
401 if it looks like we are reinitialising a semaphore.
403 2011-04-19 Corinna Vinschen <corinna@vinschen.de>
405 * autoload.cc (GetConsoleWindow): Drop.
406 (GetSystemWindowsDirectoryW): Drop.
407 * fhandler_console.cc (beep): Call GetSystemWindowsDirectoryW instead of
408 GetWindowsDirectoryW.
409 * uinfo.cc (cygheap_user::env_systemroot): Call
410 GetSystemWindowsDirectoryW and convert to multibyte on the fly.
411 * winlean.h (GetWindowsDirectoryW): Redefine to something invalid.
414 2011-04-19 Corinna Vinschen <corinna@vinschen.de>
416 * Makefile.in (DLL_IMPORTS): Drop advapi32.dll.
417 * autoload.cc: Enable autoloading advapi32 functions.
418 * environ.cc (regopt): Use wide char arguments in reg_key functions.
419 * fhandler_console.cc (beep): Ditto. Use WCHAR throughout.
420 * registry.cc (reg_key): Rewrite reg_key class to use native NT registry
421 functions. Use WCHAR string parameters throughout. Use PCWSTR rather
422 than const WCHAR. Drop multibyte char functionality. Drop unused
424 (get_registry_hive_path): Use RtlQueryRegistryValues to fetch path from
426 (load_registry_hive): Drop useless check for user hive being available.
427 Load hive using NtLoadKey.
428 * registry.h: Accommodate above changes.
429 * sched.cc (sched_rr_get_interval): Use wide char arguments in reg_key
431 * shared.cc (init_installation_root): Ditto.
432 (shared_info::init_obcaseinsensitive): Use RtlQueryRegistryValues to
433 fetch obcaseinsensitive value.
434 (shared_info::heap_slop_size): Use wide char arguments in reg_key
436 (shared_info::heap_chunk_size): Ditto.
437 * syscalls.cc (gethostid): Ditto.
438 * winsup.h (__WIDE): Define.
440 * libc/minires-os-if.c (get_registry_dns_items): Don't fetch values
441 from registry. Just extract them from given UNICODE_STRING parameter.
442 (get_registry_dns): Fetch all registry values at once using
443 RtlQueryRegistryValues.
445 2011-04-19 Corinna Vinschen <corinna@vinschen.de>
447 * net.cc (get_ipv4fromreg_ipcnt): Rearrange to fetch all registry
448 values at once using RtlQueryRegistryValues.
449 (get_ipv4fromreg): Ditto.
451 2011-04-19 Corinna Vinschen <corinna@vinschen.de>
453 * fhandler_registry.cc (fhandler_registry::fstat): Use RegQueryInfoKeyW.
455 2011-04-19 Corinna Vinschen <corinna@vinschen.de>
457 * fhandler_proc.cc (read_value): Remove definition.
459 (format_proc_cpuinfo): Drop useless call to GetSystemInfo. Rearrange
460 to use Rtl registry functions. Rename dwOldThreadAffinityMask to
463 2011-04-18 Corinna Vinschen <corinna@vinschen.de>
465 * localtime.cc (tzload): Don't change global timezone information
466 when called from gmtime or gmtime_r.
469 2011-04-18 Corinna Vinschen <corinna@vinschen.de>
471 * cygtls.cc (_cygtls::remove): Always close sockevt handle.
473 2011-04-18 Corinna Vinschen <corinna@vinschen.de>
475 * cygwin.din (ppoll): Export.
476 * poll.cc (ppoll): Implement.
477 * posix.sgml (std-gnu): Add ppoll.
478 * include/cygwin/version.h: Bump API minor number.
479 * include/sys/poll.h (ppoll): Declare.
481 2011-04-18 Corinna Vinschen <corinna@vinschen.de>
483 * fhandler_socket.cc (fhandler_socket::evaluate_events): Handle the
484 FD_CLOSE event specially when called from accept. Explain why.
485 (fhandler_socket::shutdown): Fake success on not-connected socket and
486 trigger socket event if the read side of a socket is affected. Explain
488 * poll.cc (poll): Check for saw_shutdown_read on sockets to generate
491 2011-04-18 Corinna Vinschen <corinna@vinschen.de>
493 * Fix various copyrights.
495 2011-04-17 Christopher Faylor <me.cygwin2011@cgf.cx>
497 * signal.cc (_pinfo::kill): Set this_process_state when process
500 2011-04-17 Christopher Faylor <me.cygwin2011@cgf.cx>
502 * signal.cc (_pinfo::kill): Return 0 when attempting to test for
503 existence of an existed process which has not yet been reaped.
505 2011-04-17 Christopher Faylor <me.cygwin2011@cgf.cx>
507 * cygheap.h (init_cygheap::ctty): Use base class so that console can
509 * dtable.cc (dtable::stdio_init): Remove special-case call to
511 * exceptions.cc (sigpacket::process): Conditionally flush terminal
512 input on certain signals.
513 * fhandler.h (fhandler_console::get_tty_stuff): Make non-static.
514 (fhandler_termios::get_ttyp): Move here.
515 (fhandler_termios::sigflush): Declare.
516 (fhandler_tty_common::get_ttyp): Delete.
517 * fhandler_console.cc (fhandler_console::get_tty_stuff): Pass this as
519 (set_console_ctty): Delete.
520 (tty_list::get_tty): Just return pointer to shared console region,
521 delaying get_tty_stuff until open().
522 (fhandler_console::init): Treat NULL handle as signifying that console
523 should be opened with O_NOCTTY flag. Rename handle argument to the
525 * fhandler_termios.cc (fhandler_termios::sigflush): Define.
526 * fhandler_tty.cc (handler_tty_master::init_console): Pass NULL as
527 first argument to fhandler_console::init.
528 * pinfo.cc (_pinfo::set_ctty): Change third parameter to
529 fhandler_termios *. Add extra debugging.
530 * pinfo.h (_pinfo::set_ctty): Change third parameter to
533 * sigproc.cc (handle_sigsuspend): Don't special-case non-main threads.
535 2011-04-15 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
537 * thread.cc (pthread_setschedprio): New function.
538 * include/pthread.h (pthread_setschedprio): Declare.
539 * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
540 * cygwin.din (pthread_setschedprio): Export.
541 * posix.sgml (std-notimpl) Move pthread_setschedprio from here...
542 (std-susv4) ...to here.
544 2011-04-10 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
546 * fhandler_proc.cc (proc_tab): Add /proc/swaps virtual file.
547 (format_proc_swaps): New function.
549 2011-04-06 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
551 * Makefile.in: Move srcdir definition before others which uses it.
553 2011-04-06 Jon TURNEY <jon.turney@dronecode.org.uk>
555 * dll_init.cc (reserve_at, release_at): New functions.
556 (load_after_fork): If the DLL was loaded higher than the required
557 address, assume that it loaded at it's base address and also reserve
558 memory there to force it to be relocated.
560 2011-04-04 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
562 * include/cygwin/types.h: Move #include <sys/sysmacros.h> to
563 end of header so that it gets the dev_t typedef.
564 * include/sys/sysmacros.h (gnu_dev_major, gnu_dev_minor,
565 gnu_dev_makedev): Prototype and define as inline functions.
566 (major, minor, makedev): Redefine in terms of gnu_dev_*.
568 2011-04-04 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
570 * include/cygwin/types.h: Move multiple inclusion guards to
571 beginning and end of header.
573 2011-04-04 Christopher Faylor <me.cygwin2011@cgf.cx>
575 * Makefile.in: Move Makefile.common include earlier to fix problems
576 with relative ${srcdir} path which confuses make.
578 2011-04-04 Corinna Vinschen <corinna@vinschen.de>
581 * autoload.cc (DnsQuery_A): Fatal if not available.
582 (DnsRecordListFree): Ditto.
583 (DsGetDcNameW): Ditto.
584 (NetGetAnyDCName): Remove.
585 (NetGetDCName): Remove.
586 (EnumProcessModules): Fatal if not available.
587 (GetModuleFileNameExW): Ditto.
588 (GetModuleInformation): Ditto.
589 (GetProcessMemoryInfo): Ditto.
590 (QueryWorkingSet): Ditto.
591 (LsaRegisterLogonProcess): Ditto.
592 * fenv.cc (_feinitialise): Drop supports_sse condition.
593 * fhandler_disk_file.cc (path_conv::isgood_inode): Fix comment.
594 (fhandler_base::fstat_by_name): Drop has_fileid_dirinfo condition.
595 (fhandler_disk_file::opendir): Ditto.
596 * fhandler_netdrive.cc (fhandler_netdrive::readdir): Fix comment.
597 * fhandler_proc.cc (format_proc_partitions): Drop NT4-only code.
598 * fhandler_process.cc (get_process_state): Ditto.
599 * kernel32.cc (GetWindowsDirectoryW): Remove.
600 (GetWindowsDirectoryA): Remove.
601 * miscfuncs.cc (nice_to_winprio): Drop NT4-only code.
602 * mount.cc (fs_info::update): Fix comments.
603 * net.cc (get_2k_ifs): Drop NT4-only code.
604 * sec_auth.cc (get_logon_server): Ditto.
605 (lsaauth): Drop NT4-specific error handling.
606 * security.cc (alloc_sd): Set SE_DACL_PROTECTED unconditionally.
607 * select.cc (select_stuff::wait): Always use MWMO_INPUTAVAILABLE.
608 (peek_windows): Drop NT4-only condition in call to PeekMessage.
609 * syscalls.cc (gethostid): Remove NT4-only workaround.
610 * wincap.cc: Througout, drop has_dacl_protect,
611 has_broken_if_oper_status, has_process_io_counters,
612 has_terminal_services, has_extended_priority_class, has_guid_volumes,
613 has_fileid_dirinfo, has_mwmo_inputavailable and supports_sse from
615 (wincap_nt4sp4): Remove.
616 (wincap_minimal): Set to wincap_2000.
617 (wincapc::init): Rely on availability of OSVERSIONINFOEX structure.
618 Treat error from GetVersionEx as fatal. Treat NT4 as fatal.
619 * wincap.h (struct wincaps): Drop has_dacl_protect,
620 has_broken_if_oper_status, has_process_io_counters,
621 has_terminal_services, has_extended_priority_class, has_guid_volumes,
622 has_fileid_dirinfo, has_mwmo_inputavailable and supports_sse flags
624 * winlean.h (GetWindowsDirectoryW) Define as GetSystemWindowsDirectoryW.
625 (GetWindowsDirectoryA): Define as GetSystemWindowsDirectoryA.
627 2011-04-04 Corinna Vinschen <corinna@vinschen.de>
629 * dtable.cc (dtable::init_std_file_from_handle): Fix a comment to
630 reflect the current state.
632 2011-04-04 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
634 * Makefile.in (fhandler_proc_CFLAGS): Define USERNAME, HOSTNAME,
636 * fhandler_proc.cc (format_proc_version): Add build machine and GCC
637 version information as on Linux.
639 2011-04-04 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
640 Corinna Vinschen <corinna@vinschen.de>
642 * devices.h (fh_devices): Define FH_PROC_MIN_MINOR.
643 Reorder major-0 devices so that all /proc directories fall
644 between FH_PROC and FH_PROC_MIN_MINOR.
645 * path.h (isproc_dev): Redefine accordingly.
647 2011-04-04 Corinna Vinschen <corinna@vinschen.de>
649 * cygserver_setpwd.h (setlsapwd): Add username parameter to declaration.
650 * external.cc (cygwin_internal): In the CW_SET_PRIV_KEY case, fetch
651 additional username parameter.
652 * setlsapwd.cc (setlsapwd): Add username parameter. Allow admin to
653 set the hidden password for other users.
655 2011-04-04 Corinna Vinschen <corinna@vinschen.de>
657 * sec_auth.cc (get_user_groups): Mark well-known groups as well-known.
658 (get_user_local_groups): Ditto.
659 (verify_token): Drop useless label.
660 * sec_helper.cc (cygsid::get_sid): Check for well-known SID if
661 well_known isn't set.
662 * security.h (well_known_sid_type): New inline function.
664 2011-04-02 Corinna Vinschen <corinna@vinschen.de>
666 * autoload.cc (FindFirstVolumeA): Remove.
667 (FindNextVolumeA): Remove.
668 (FindVolumeClose): Remove.
669 (GetVolumeNameForVolumeMountPointA): Remove.
670 * ntdll.h (NtFlushBuffersFile): Declare.
671 * syscalls.cc (sync_worker): Rewrite using native NT functions.
674 2011-04-02 Corinna Vinschen <corinna@vinschen.de>
676 * fhandler_proc.cc (format_proc_partitions): Express length in WCHAR
679 2011-04-02 Corinna Vinschen <corinna@vinschen.de>
681 * autoload.cc (GetExtendedTcpTable): Remove.
682 (GetTcpTable): Remove.
683 (CharNextExA): Remove.
684 (FindWindowA): Remove.
685 (ShowWindowAsync): Remove.
686 * dcrt0.cc (disable_dep): Remove unused function.
687 (dll_crt0_0): Drop comment babbling about TS & DEP.
688 * fhandler_socket.cc (address_in_use): Remove unused function.
689 * wincap.cc: Throughout, drop ts_has_dep_problem from wincaps.
690 (wincapc::init): Drop code setting ts_has_dep_problem flag.
691 * wincap.h (struct wincaps): Drop ts_has_dep_problem flags and method.
693 2011-04-01 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
695 Implement /proc/sysvipc/*
696 * devices.in (dev_procsysvipc_storage): Add.
697 * devices.cc: Regenerate.
698 * devices.h (fh_devices): Add FH_PROCSYSVIPC.
699 * dtable.cc (build_fh_pc): Add case FH_PROCSYSVIPC.
700 * fhandler.h (class fhandler_procsysvipc): Declare.
701 (fhandler_union): Add __procsysvipc.
702 * fhandler_proc.cc (proc_tab): Add sysvipc virt_directory.
703 * fhandler_procsysvipc.cc: New file.
704 * Makefile.in (DLL_OFILES): Add fhandler_procsysvipc.o.
705 * path.h (isproc_dev): Add FH_PROCSYSVIPC to conditional.
707 2011-04-01 Corinna Vinschen <corinna@vinschen.de>
709 * Makefile.in (DLL_OFILES): Add avapi32.o.
710 * advapi32.cc: New file.
711 * autoload.cc: Add block of remaining advapi32 functions used by
712 Cygwin. Keep commented out. Explain why.
714 2011-04-01 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
716 * fhandler_proc.cc (format_proc_loadavg): Add running/total
717 processes as fourth component of output.
718 * fhandler_process.cc (get_process_state): Make non-static.
719 Add FIXME about generating an 'O' flag.
721 2011-04-01 Corinna Vinschen <corinna@vinschen.de>
723 * fhandler_random.cc (fhandler_dev_random::crypt_gen_random):
724 Use CryptAcquireContextW.
725 * ntdll.h (STATUS_PROCEDURE_NOT_FOUND): Define.
726 * sec_auth.cc (open_local_policy): Rename NTSTATUS variable ret to
727 status. Drop usage of LsaNtStatusToWinError.
728 (verify_token): Call NtQuerySecurityObject instead of
729 GetKernelObjectSecurity.
730 (create_token): Rename NTSTATUS variable ret to status. Rename ret2 to
731 sub_status. Drop usage of LsaNtStatusToWinError. In case LsaLogonUser
732 fails, report the sub_status as well.
734 2011-04-01 Corinna Vinschen <corinna@vinschen.de>
736 * libc/strptime.c: Remove misleading comment.
738 2011-03-31 Corinna Vinschen <corinna@vinschen.de>
740 * ntdll.h: Allow usage from plain C code.
741 (FSCTL_PIPE_IMPERSONATE): Define.
742 (enum _THREAD_INFORMATION_CLASS): Define.
743 (RTL_QUERY_REGISTRY_xxx): Define.
744 (RTL_REGISTRY_xxx): Define.
745 (PRTL_QUERY_REGISTRY_ROUTINE): Define.
746 (struct _RTL_QUERY_REGISTRY_TABLE): Define.
747 (enum _KEY_VALUE_INFORMATION_CLASS): Define.
748 (struct _KEY_VALUE_PARTIAL_INFORMATION): Define.
749 (NtAccessCheck): Declare.
750 (NtAllocateLocallyUniqueId): Declare.
751 (NtCreateKey): Declare.
752 (NtDuplicateToken): Declare.
753 (NtLoadKey): Declare.
754 (NtOpenKey): Declare.
755 (NtOpenProcessToken): Declare.
756 (NtOpenThreadToken): Declare.
757 (NtPrivilegeCheck): Declare.
758 (NtQueryInformationToken): Declare.
759 (NtQueryValueKey): Declare.
760 (NtSetInformationThread): Declare.
761 (NtSetInformationToken): Declare.
762 (NtSetValueKey): Declare.
763 (RtlAbsoluteToSelfRelativeSD): Declare.
764 (RtlAddAccessAllowedAce): Declare.
765 (RtlAddAccessDeniedAce): Declare.
766 (RtlAddAce): Declare.
767 (RtlCheckRegistryKey): Declare.
768 (RtlCopySid): Declare.
769 (RtlCreateAcl): Declare.
770 (RtlCreateRegistryKey): Declare.
771 (RtlCreateSecurityDescriptor): Declare.
772 (RtlEqualPrefixSid): Declare.
773 (RtlEqualSid): Declare.
774 (RtlFirstFreeAce): Declare.
775 (RtlGetAce): Declare.
776 (RtlGetDaclSecurityDescriptor): Declare.
777 (RtlGetGroupSecurityDescriptor): Declare.
778 (RtlGetOwnerSecurityDescriptor): Declare.
779 (RtlIdentifierAuthoritySid): Declare.
780 (RtlInitializeSid): Declare.
781 (RtlLengthSid): Declare.
782 (RtlQueryRegistryValues): Declare.
783 (RtlSetControlSecurityDescriptor): Declare.
784 (RtlSetDaclSecurityDescriptor): Declare.
785 (RtlSetGroupSecurityDescriptor): Declare.
786 (RtlSetOwnerSecurityDescriptor): Declare.
787 (RtlSubAuthorityCountSid): Declare.
788 (RtlSubAuthoritySid): Declare.
789 (RtlWriteRegistryValue): Declare.
791 2011-03-31 Corinna Vinschen <corinna@vinschen.de>
793 * uinfo.cc (cygheap_user::init): Don't call GetUserName. Fetch username
794 from Windows environment instead. Explain why.
795 (cygheap_user::env_domain): Use MAX_DOMAIN_NAME_LEN rather than DNLEN
796 to specify the size of the domain name buffer.
798 2011-03-30 Corinna Vinschen <corinna@vinschen.de>
800 * hires.h: Fix copyright.
802 (FACTOR): Add comment.
804 (JITTER): New definition. Comment.
805 (systime_ns): Avoid gratuitous copying of the value returned by
806 GetSystemTimeAsFileTime.
807 (corelocaltime, localtime, gmtime): Remove very old, unused code block.
808 (cygwin_tzset): Remove.
809 (hires_ms::timeGetTime_ns): Add missing semicolon in comment.
810 (hires_ms::nsecs): Redefine check for difference between internal
811 timer value and system time.
813 2011-03-30 Corinna Vinschen <corinna@vinschen.de>
815 * times.cc (hires_ms::resolution): Make sure resolution is never 0.
816 (clock_setres): Ditto.
818 2011-03-29 Corinna Vinschen <corinna@vinschen.de>
820 * cygtls.h (struct _local_storage): Redefine process_ident as wchar_t
822 * syslog.cc (CYGWIN_LOG_NAME): Convert to wide char constant.
823 (openlog): Convert incoming ident string to wide char. Fix formatting.
824 (vsyslog): Print ident string as wide char string. Convert message
825 string to wide char and call UNICODE Win32 Event functions to make sure
826 to use correct codeset.
827 * tlsoffset.h: Regenerate.
829 2011-03-29 Corinna Vinschen <corinna@vinschen.de>
831 * fhandler_socket.cc (get_inet_addr): Make externally available.
832 * autoload.cc (GetUdpTable): Define.
833 * syslog.cc (connect_syslogd): Use get_inet_addr rather than _stat64
834 to check for local socket file. Create socket with type returned by
835 get_inet_addr. If connect on UDP socket works, test if there's
836 really a listening peer, otherwise fall back to Windows event log.
837 (try_connect_syslogd): Use syslogd_inited flag to check if syslogd
840 2011-03-29 Corinna Vinschen <corinna@vinschen.de>
842 * uinfo.cc (cygheap_user::env_domain): Use LookupAccountSidW and
843 convert user and domain to multibyte strings to make sure to use
846 2011-03-29 Corinna Vinschen <corinna@vinschen.de>
848 * autoload.cc (UuidCreate): Remove.
849 (UuidCreateSequential): Remove.
850 * passwd.cc (internal_getpwsid): Avoid a strict-aliasing compiler
851 error with gcc 4.5.1.
852 * fhandler_floppy.cc (fhandler_dev_floppy::get_drive_info): Ditto.
853 * ntdll.h (NtAllocateUuids): Declare.
854 * syscalls.cc (gethostid): Use NtAllocateUuids function rather than
855 UuidCreateSequential/UuidCreate to get rid of rpcrt4 dependency.
857 2011-03-29 Corinna Vinschen <corinna@vinschen.de>
859 * cygwin.din (pthread_spin_destroy): Export.
860 (pthread_spin_init): Export.
861 (pthread_spin_lock): Export.
862 (pthread_spin_trylock): Export.
863 (pthread_spin_unlock): Export.
864 * posix.sgml (std-susv4): Add pthread_spin_destroy, pthread_spin_init,
865 pthread_spin_lock, pthread_spin_trylock, pthread_spin_unlock.
866 (std-notimpl): Remove pthread_spin_[...].
867 * pthread.cc (pthread_spin_init): New function.
868 * thread.cc (pthread_spinlock::is_good_object): New function.
869 (pthread_mutex::pthread_mutex): Rearrange initializers to accommodate
870 protected data in pthread_mutex.
871 (pthread_spinlock::pthread_spinlock): New constructor.
872 (pthread_spinlock::lock): New method.
873 (pthread_spinlock::unlock): New method.
874 (pthread_spinlock::init): New method.
875 (pthread_spin_lock): New function.
876 (pthread_spin_trylock): New function.
877 (pthread_spin_unlock): New function.
878 (pthread_spin_destroy): New function.
879 * thread.h (PTHREAD_SPINLOCK_MAGIC): Define.
880 (class pthread_mutex): Change access level of members shared with
881 derived classes to protected.
882 (pthread_mutex::set_shared): New protected method.
883 (class pthread_spinlock): New class, derived class of pthread_mutex.
884 * include/pthread.h (pthread_spin_destroy): Declare.
885 (pthread_spin_init): Declare.
886 (pthread_spin_lock): Declare.
887 (pthread_spin_trylock): Declare.
888 (pthread_spin_unlock): Declare.
889 * include/cygwin/types.h (pthread_spinlock_t): New typedef.
890 * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
892 2011-03-29 Corinna Vinschen <corinna@vinschen.de>
894 * net.cc (SIO_BASE_HANDLE): Define.
895 (fdsock): If we got an LSP handle, try to create a copy of the base
896 handle instead. Change comment to explain.
898 2011-03-29 Corinna Vinschen <corinna@vinschen.de>
900 * include/cygwin/version.h: Bump CYGWIN_VERSION_DLL_MINOR to 10.
902 2011-03-29 Corinna Vinschen <corinna@vinschen.de>
904 * autoload.cc (winmm): Remove time functions. Don't treat
905 unloadable wave functions as fatal.
906 * hires.h (hires_ms::timeGetTime_ns): New private method.
907 (hires_ms::dmsecs): Call timeGetTime_ns here.
908 * ntdll.h (struct _KSYSTEM_TIME): Define.
909 (KUSER_SHARED_DATA): Redefine to allow access to InterruptTime.
910 (SharedUserData): Define here.
911 (NtQueryTimerResolution): Declare.
912 (NtSetTimerResolution): Declare.
913 * path.cc (SharedUserData): Move to ntdll.h.
914 * times.cc (hires_ms::timeGetTime_ns): New private method.
915 Use throughout instead of timeGetTime. Document entire functionality
916 of timeGetTime in case we need it.
917 (hires_ms::resolution): Try a call to NtQueryTimerResolution
918 to fetch current period. Fall back to heuristic if that fails.
919 Cast to DWORD in assignments to minperiod.
920 (clock_setres): Align period to possible values per a call to
921 NtQueryTimerResolution. Explain why. Replace calls to timeBeginPeriod
922 and timeEndPeriod with underlying call to NtSetTimerResolution. Use
923 status code from NtSetTimerResolution to compute errno.
924 Convert period to ULONGLONG and store 100ns value to simplify code.
926 2011-03-29 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
927 Corinna Vinschen <corinna@vinschen.de>
929 * include/sys/xattr.h: New file.
931 2011-03-28 Jon TURNEY <jon.turney@dronecode.org.uk>
933 * thread.cc (semaphore::init, destroy, close): Standards conformance
934 fix. On a failure, return -1 and set errno.
935 * thread.h (semaphore::terminate): Save errno since semaphore::close()
938 2011-03-27 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
940 * cygwin.din (strchrnul): Export.
941 * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
942 * posix.sgml (std-gnu): Add strchrnul.
944 2011-03-27 Christopher Faylor <me.cygwin2011@cgf.cx>
946 * dll_init.cc (dll::init): Accommodate ill-behaved dlls who don't fill
949 2011-03-25 Corinna Vinschen <corinna@vinschen.de>
951 * mmap.cc (mmap64): Add a cheat to let a certain autoconf test succeed
952 on 64 bit systems. Explain why.
954 2011-03-23 Christopher Faylor <me.cygwin2011@cgf.cx>
956 * wincap.cc (wincap_2003): Set use_dont_resolve_hack to true.
958 2011-03-23 Christopher Faylor <me.cygwin2011@cgf.cx>
960 * autoload.cc (dll_load): Change error message to make it clear if a
961 newer DLL is being run.
963 2011-03-20 Corinna Vinschen <corinna@vinschen.de>
965 * fenv.cc (_feinitialise): Don't use SSE instructions on systems not
967 * wincap.h (wincaps::supports_sse): New element.
968 * wincap.cc: Implement above element throughout.
970 2011-03-18 Corinna Vinschen <corinna@vinschen.de>
972 * cygwin.sc: Raise default cygheap size to 2 Megs.
974 2011-03-18 Christopher Faylor <me.cygwin2011@cgf.cx>
976 * fhandler.h (DEFAULT_PIPEBUFSIZE): Reset to 64K.
978 2011-03-18 Corinna Vinschen <corinna@vinschen.de>
980 * mmap.cc (mmap_record::alloc_fh): Initialize name strings in fdev to
981 empty strings or suffer a SEGV. Drop second parameter in call to
984 2011-03-18 Corinna Vinschen <corinna@vinschen.de>
986 * mmap.cc (class mmap_record): Pack 4 byte-aligned. Convert member dev
988 (mmap_record::alloc_fh): Create temporary device from dev and use in
989 call to build_fh_dev.
991 2011-03-18 Corinna Vinschen <corinna@vinschen.de>
993 * mmap.cc (mmap_record::page_map): Define as variable array rather than
995 (mmap_record::alloc_page_map): Remove.
996 (mmap_record::free_page_map): Remove.
997 (mmap_record::init_page_map): New method.
998 (mmap_record::add_record): Take mmap_record parameter by reference
999 rather than by value.
1000 (mmap_record::map_pages): Fix comment.
1001 (mmap_list::add_record): Allocate space for mmap_record including the
1002 page_map in a single ccalloc call. Call init_page_map afterwards.
1003 (mmap_list::del_record): Remove call to mmap_record::free_page_map.
1005 2011-03-16 Corinna Vinschen <corinna@vinschen.de>
1007 * crt0.c (mainCRTStartup): Move call to _feinitialise from here...
1008 * dcrt0.cc (_dll_crt0): ...to here.
1010 2011-03-16 Corinna Vinschen <corinna@vinschen.de>
1012 * winver.rc: Fix copyright dates.
1014 2011-03-14 Corinna Vinschen <corinna@vinschen.de>
1016 * fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Only use
1017 file id as inode number if it masters the isgood_inode check.
1019 2011-03-13 Christopher Faylor <me.cygwin2011@cgf.cx>
1021 * fhandler.cc (fhandler_base_overlapped::wait_overlapped): Remove
1022 special treatment for ERROR_NO_SYSTEM_RESOURCES. Cancel I/O and reset
1023 the overlapped handle on error.
1024 (fhandler_base_overlapped::write_overlapped): Limit writes to
1025 max_atomic_write bytes in blocking case. Incorporate code from
1026 now-defunct write_overlapped_fallback. Fix serious oversight where ptr
1027 was not advanced as buffer was written.
1028 (fhandler_base_overlapped::write_overlapped_fallback): Eliminate.
1029 * fhandler.h (fhandler_base_overlapped::write_overlapped_fallback):
1030 Ditto for declaration.
1031 (DEFAULT_PIPEBUFSIZE): Lower size to slightly less than documented
1032 worst-case atomic write size.
1033 (fhandler_overlapped::wait_return): Remove unused element.
1035 2011-03-09 Christopher Faylor <me.cygwin2011@cgf.cx>
1037 * fhandler.cc (fhandler_base_overlapped::wait_overlapped): Handle
1038 overlapped_fallback error condition like other error conditions. Set
1039 res carefully and specifically for each condition rather than resorting
1041 (fhandler_base_overlapped::write_overlapped): Preserve errno in
1042 overlapped_fallback condition. Correct write_overlapped_fallback to
1043 avoid inappropriate looping.
1044 (fhandler_base_overlapped::write_overlapped_fallback): Add some more
1047 2011-03-09 Christopher Faylor <me.cygwin2011@cgf.cx>
1049 * fhandler.cc (fhandler_base_overlapped::write_overlapp): Oops!
1050 Accommodate change in arguments to wait_overlapped.
1052 2011-03-09 Christopher Faylor <me+cygwin@cgf.cx>
1054 * errno.cc (errmap): Change mapping of NO_SYSTEM_RESOURCES to EFBIG.
1055 * fhandler.cc (MAX_OVERLAPPED_WRITE_LEN): New constant.
1056 (MIN_OVERLAPPED_WRITE_LEN): Ditto.
1057 (fhandler_base_overlapped::close): Accommodate change in arguments to
1059 (fhandler_base_overlapped::setup_overlapped): Add __stdcall and regparm
1061 (fhandler_base_overlapped::destroy_overlapped): Ditto.
1062 (fhandler_base_overlapped::has_ongoing_io): Ditto.
1063 (fhandler_base_overlapped::wait_overlapped): Modify to return an enum
1064 returning various states. Accept nonblocking parameter.
1065 (fhandler_base_overlapped::read_overlapped): Add __stdcall and regparm
1066 modifiers. Rework to attempt to be smarter about reacting to states
1067 returned by wait_overlapped.
1068 (fhandler_base_overlapped::write_overlapped): Ditto. Add fallback
1069 option for when wait_overlapped detects that smaller chunks must be
1071 (fhandler_base_overlapped::write_overlapped_fallback): Ditto.
1072 * fhandler.h (DEFAULT_PIPEBUFSIZE): Move definition here from pipe.cc.
1073 (fhandler_base::has_ongoing_io): Define with __stdcall and regparm
1075 (fhandler_base_overlapped::wait_return): New enum.
1076 (fhandler_base_overlapped::max_atomic_write): New variable.
1077 (fhandler_base_overlapped:: wait_overlapped): Accommodate changes
1078 mentioned above to arguments and modifiers.
1079 (fhandler_base_overlapped::setup_overlapped): Ditto for modifiers.
1080 (fhandler_base_overlapped::read_overlapped): Ditto.
1081 (fhandler_base_overlapped::write_overlapped): Ditto.
1082 (fhandler_base_overlapped::destroy_overlapped): Ditto.
1083 (fhandler_base_overlapped::has_ongoing_io): Ditto.
1084 (fhandler_base_overlapped::fhandler_base_overlapped): Zero
1086 * fhandler_fifo.cc (fhandler_fifo::fhandler_fifo): Set max_atomic_write
1087 to the size of the DEFAULT_PIPEBUFSIZE.
1088 (fhandler_fifo::wait): Accommodate change in arguments to
1090 * pipe.cc (fhandler_pipe::fhandler_pipe): Set max_atomic_write to the
1091 size of the DEFAULT_PIPEBUFSIZE.
1092 (fhandler_pipe::create_selectable): Allow minimum size of DEFAULT_PIPEBUFSIZE.
1093 (DEFAULT_PIPEBUFSIZE): Delete here, move to fhandler.h.
1095 2011-03-08 Corinna Vinschen <corinna@vinschen.de>
1097 * security.cc: Fix copyright dates.
1099 2011-03-08 Corinna Vinschen <corinna@vinschen.de>
1101 * fhandler.cc (fhandler_base::open): When creating a file on a
1102 filesystem supporting ACLs, create the file with WRITE_DAC access.
1104 * fhandler_disk_file.cc (fhandler_disk_file::mkdir): Ditto for
1106 * fhandler_socket.cc (fhandler_socket::bind): Ditto for sockets.
1107 * path.cc (symlink_worker): Ditto for symlinks.
1108 * security.cc (get_file_sd): Always call GetSecurityInfo for directories
1109 on XP and Server 2003. Improve comment to explain why.
1110 (set_file_attribute): Explicitely cast mode_t value to bool in call to
1112 * wincap.h (wincaps::use_get_sec_info_on_dirs): New element.
1113 * wincap.cc: Implement above element throughout.
1115 2011-03-04 Corinna Vinschen <corinna@vinschen.de>
1117 * fhandler_procsys.cc (fhandler_procsys::exists): Rewrite.
1118 (fhandler_procsys::fill_filebuf): Fill buffer with valid string even if
1119 reading the symlink fails.
1121 2011-03-03 Corinna Vinschen <corinna@vinschen.de>
1123 * posix_ipc.cc (ipc_cond_timedwait): If ipc_mutex_unlock fails, return
1124 actual error number.
1125 (_mq_send): Break loop if ipc_cond_timedwait returns with error.
1126 (_mq_receive): Ditto.
1128 2011-03-03 Corinna Vinschen <corinna@vinschen.de>
1130 * errno.cc (__xpg_strerror_r): Add accidentally missing condition.
1132 2011-03-02 Corinna Vinschen <corinna@vinschen.de>
1134 * fhandler_procsys.cc (fhandler_procsys::open): Call worker exists
1135 method, rather than wrapper.
1137 2011-03-01 Christopher Faylor <me+cygwin@cgf.cx>
1139 * autoload.cc (dll_load): Avoid in_forkee test since this apparently
1140 fails even when not forked.
1142 2011-03-01 Christopher Faylor <me+cygwin@cgf.cx>
1144 * include/cygwin/version.h: Bump CYGWIN_VERSION_DLL_MINOR to 9.
1146 2011-02-28 Christopher Faylor <me+cygwin@cgf.cx>
1148 * autoload.cc (dll_load): Only perform DONT_RESOLVE_DLL_REFERENCES hack
1149 on systems which need it.
1150 * wincap.cc (use_dont_resolve_hack): Set as appropriate.
1151 * wincap.h (use_dont_resolve_hack): Define.
1153 2011-02-28 Christopher Faylor <me+cygwin@cgf.cx>
1155 * autoload.cc (dll_load): Make inline. Clarify logic.
1157 2011-02-27 Corinna Vinschen <corinna@vinschen.de>
1159 * autoload.cc (dll_load): Only call LoadLibraryExW with
1160 DONT_RESOLVE_DLL_REFERENCES if a normal LoadLibrary call failed with
1161 ERROR_INVALID_ADDRESS.
1162 (LsaRegisterLogonProcess): Align comment to previous change.
1164 2011-02-26 Christopher Faylor <me+cygwin@cgf.cx>
1166 * autoload.cc: Use LoadDLLfuncEx3 for all winmm functions. Accommodate
1167 changes to LoadDLLprime.
1168 (LoadDLLprime): Take an extra argument indicating whether this dll
1169 needs special handling on fork. Place this information in the "handle"
1171 (LoadDLLfuncEx3): Eliminate "func" handling. Pass new
1172 no_resolve_on_fork argument to LoadDLLprime.
1173 (dll_load): New function.
1174 (std_dll_init): Accommodate changes to dll_info::handle. Use dll_load
1175 to load DLL in both cases where it is used.
1177 2011-02-26 Corinna Vinschen <corinna@vinschen.de>
1179 * autoload.cc: Make autoloaded ntdll function non-optional. Ditto for
1180 secur32 functions, except for LsaRegisterLogonProcess. Change return
1181 value to ERROR_PROC_NOT_FOUND. Explain why.
1182 * sec_auth.cc (lsaauth): Handle ERROR_PROC_NOT_FOUND from call to
1183 LsaRegisterLogonProcess when generating the errno value.
1185 2011-02-22 Corinna Vinschen <corinna@vinschen.de>
1187 * dcrt0.cc: Fix copyright dates.
1189 * syscalls.cc (_read): Move EXPORT_ALIAS to its rightful place.
1191 2011-02-21 Christopher Faylor <me+cygwin@cgf.cx>
1193 * cygwin.din: Mark __assert* and _abort as NOSIGFE.
1195 2011-02-21 Corinna Vinschen <corinna@vinschen.de>
1197 * fhandler_socket (fhandler_socket::readv): Call recv_internal directly,
1198 rather than recvmsg.
1199 (fhandler_socket::writev): Call send_internal directly, rather than
1201 * net.cc (cygwin_recv): Call fhandler_socket::recvfrom directly, rather
1202 than cygwin_recvfrom.
1203 (cygwin_send): Call fhandler_socket::sendto directly, rather than
1206 2011-02-20 Christopher Faylor <me+cygwin@cgf.cx>
1208 * fhandler.cc (fhandler_base_overlapped::close): Finish any pending I/O
1210 (fhandler_base_overlapped::wait_overlapped): Defensively zero bytes
1211 read. Add more info to debugging output.
1213 2011-02-18 Christopher Faylor <me+cygwin@cgf.cx>
1215 * dcrt0.cc (dll_crt0_1): Add a CYGHEAP_DEBUG conditional for debugging
1216 which allocates a lot of space at startup.
1218 2011-02-18 Corinna Vinschen <corinna@vinschen.de>
1220 * cygwin.sc: Set alignment of .cygheap section to 64K.
1222 2011-02-15 Corinna Vinschen <corinna@vinschen.de>
1224 * spawn.cc (spawn_guts): Only set PID_NOTCYGWIN in _P_OVERLAY mode.
1225 Drop flag if creating new process failed.
1227 2011-02-15 Corinna Vinschen <corinna@vinschen.de>
1229 * Throughout fix copyright dates.
1231 2011-02-15 Corinna Vinschen <corinna@vinschen.de>
1233 * devices.in: Throughout use slashes instead of backslashes in the
1234 native path of devices not backed by native NT devices.
1235 * devices.cc: Regenerate.
1236 * globals.cc (ro_u_pmem): Use correct case.
1237 (ro_u_globalroot): New R/O unicode string.
1238 * path.cc (path_conv::check): Fix incorrect handling of /proc/sys
1239 block devices if they are just visited due to a component check.
1240 (symlink_info::posixify): Fix typo in comment.
1241 (cygwin_conv_path): Use ro_u_globalroot instead of string constant.
1242 (fast_cwd_version): New shared variable to store FAST_CWD version
1244 (find_fast_cwd_pointer): Rename from find_fast_cwd_pointers. Don't
1245 set global fast_cwd_ptr pointer here. Return pointer value instead.
1246 (find_fast_cwd): New function to set fast_cwd_ptr and fast_cwd_version.
1247 (cwdstuff::override_win32_cwd): Call find_fast_cwd from here.
1248 Check for fast_cwd_version to differ between old and new FAST_CWD
1249 structure. Check old_cwd for NULL to avoid SEGV. Don't set CWD if
1250 we have neitehr a valid fast_cwd_ptr, nor a valid CWD handle in the
1251 process parameter block.
1252 (cwdstuff::set): Create Win32 path taking /proc/sys paths into account.
1253 * spawn.cc (spawn_guts): Recode creating runpath. Also take /proc/sys
1254 paths into account. Drop special CWD handling when starting non-Cygwin
1257 2011-02-15 Corinna Vinschen <corinna@vinschen.de>
1259 * fhandler_procsys.cc (fhandler_procsys::opendir): Avoid SEGV if
1260 opening object directory fails.
1261 * fhandler_virtual.cc (fhandler_virtual::opendir): Don't leak memory.
1263 2011-02-15 Corinna Vinschen <corinna@vinschen.de>
1265 * fhandler_disk_file.cc (fhandler_disk_file::readdir_helper): Don't
1266 append slash if there is one already.
1268 2011-02-15 Corinna Vinschen <corinna@vinschen.de>
1270 Revert change from 2010-08-31:
1271 * path.cc (normalize_posix_path): Drop support for //./ and //?/
1273 (path_conv::check): Ditto.
1275 2011-02-15 Corinna Vinschen <corinna@vinschen.de>
1277 * fhandler_disk_file.cc (fhandler_disk_file::readdir_helper): Use POSIX
1278 path to check for symlink.
1280 2011-02-14 Corinna Vinschen <corinna@vinschen.de>
1282 * config/i386/profile.h: Sync with Mingw.
1284 2011-02-13 Corinna Vinschen <corinna@vinschen.de>
1286 * path.cc (struct _FAST_CWD): Redefine to new layout used since patch
1287 for KB 2393802. Adjust comments throughout.
1288 (struct _FAST_CWD_OLD): Rename former definition.
1289 (cwdstuff::override_win32_cwd): Check if the OS is using the old or the
1290 new FAST_CWD structure layout and handle accordingly.
1292 2011-02-11 Christopher Faylor <me+cygwin@cgf.cx>
1294 * mkstatic: Make sure that we are not cd'ed to temporary directory on
1295 exit to avoid bogus warnings on directory cleanup.
1299 2011-02-11 Christopher Faylor <me+cygwin@cgf.cx>
1301 * cygwin.sc: Eliminate __cygheap_mid.
1302 * cygheap.cc: Ditto.
1304 2011-02-11 Christopher Faylor <me+cygwin@cgf.cx>
1306 * cygheap.cc (_cygheap_mid): Drop unneeded section attribute.
1307 (cygheap_init): Just zero cygheap structure.
1308 * cygwin.sc: Keep 16 byte alignment but drop all other alignments
1309 related to cygheap. Eliminate unused __cygheap_end1.
1311 2011-02-11 Corinna Vinschen <corinna@vinschen.de>
1313 * cygwin.sc: Raise default cygheap size to 1 Meg. Set alignment to
1316 2011-02-11 Corinna Vinschen <corinna@vinschen.de>
1318 * include/endian.h: Move definitions of __BIG_ENDIAN, __LITTLE_ENDIAN,
1319 and __BYTE_ORDER into ...
1320 * include/bits/endian.h: New file.
1321 * include/arpa/nameser_compat.h: Include endian.h rather than defining
1323 * include/asm/byteorder.h: Include bits/endian.h. Drop definition of
1325 * include/netinet/ip.h: Include bits/endian.h. Drop definitions of
1326 BIG_ENDIAN, LITTLE_ENDIAN, and BYTE_ORDER. Use underscored variants
1327 of aforementioned constants.
1328 * include/netinet/tcp.h: Ditto.
1329 * include/sys/param.h: Drop disabled definitions of BIG_ENDIAN,
1330 LITTLE_ENDIAN, and BYTE_ORDER.
1332 * include/netinet/ip.h: Reformat. Define setsockopt IP_TOS options
1333 matching recent RFCs. Tweak comments.
1335 2011-02-10 Eric Blake <eblake@redhat.com>
1337 * errno.cc (includes): Avoid compilation failure if <string.h>
1338 settles on wrong strerror_r signature.
1340 * errno.cc (__xpg_strerror_r): New function.
1341 (strerror_r): Update to copy newlib's fixes.
1342 (strerror): Set errno on failure.
1343 (_sys_errlist): Cause EINVAL failure for reserved values.
1344 * cygwin.din: Export new function.
1345 * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Combine
1346 this into minor 236.
1348 2011-02-09 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
1350 * cygwin.din (pthread_yield): Export as alias to sched_yield.
1351 * include/pthread.h (pthread_yield): Declare.
1352 * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
1353 * posix.sgml (std-deprec): Add pthread_yield.
1355 2011-02-09 Christopher Faylor <me+cygwin@cgf.cx>
1357 * cygheap.cc: Add some __stdcall decoration where appropriate.
1358 * lib/cygwin_crt0.c: __attribute -> __attribute__.
1360 2011-02-09 Christopher Faylor <me+cygwin@cgf.cx>
1362 * hookapi.cc (hook_or_detect_cygwin): Prevent i from being considered
1363 uninitialized by gcc.
1365 2011-02-09 Christopher Faylor <me+cygwin@cgf.cx>
1367 * exception.h: Remove DEBUG_EXCEPTION left over debugging ifdef.
1369 2011-02-08 Christopher Faylor <me+cygwin@cgf.cx>
1371 * dll_init.cc: Fix typo in comment.
1373 2011-02-07 Corinna Vinschen <corinna@vinschen.de>
1375 * configure.in: Remove AC_ALLOCA test and test for __builtin_memset.
1376 * configure: Regenerate.
1378 2011-02-07 Corinna Vinschen <corinna@vinschen.de>
1380 * fhandler_console.cc (fhandler_console::write_normal): Remove
1381 erroneous premature return after collecting truncated multibyte
1382 sequence in trunc_buf. Rather fall through to printing routine.
1383 Fix return value to take trunc_buf content into account. Improve
1386 2011-02-05 Christopher Faylor <me+cygwin@cgf.cx>
1388 * autoload.cc (wsock_init): Properly define WSAStartup function pointer
1389 to avoid stack damage.
1391 2011-02-02 Corinna Vinschen <corinna@vinschen.de>
1393 * libc/bsdlib.cc: Include err.h.
1395 2011-02-02 Eric Blake <eblake@redhat.com>
1397 * include/err.h: Fix loss of semicolons in previous patch.
1399 2011-02-02 Corinna Vinschen <corinna@vinschen.de>
1401 * include/err.h (err): Add noreturn attribute.
1406 2011-02-02 Corinna Vinschen <corinna@vinschen.de>
1408 * path.cc (conv_path_list): Remove enclosing quotes and trailing
1409 backslashes from Win32 environment path lists.
1411 2011-02-01 Christian Franke <franke@computer.org>
1413 * fhandler.cc (fhandler_base::fsync): Ignore ERROR_INVALID_FUNCTION
1414 error from FlushFileBuffers().
1416 2011-01-31 Corinna Vinschen <corinna@vinschen.de>
1418 * syscalls.cc (utmp_data): Fix potential buffer overflow.
1420 2011-01-31 Corinna Vinschen <corinna@vinschen.de>
1422 * fhandler_socket.cc (address_in_use): Improve comment readability.
1424 2011-01-30 Corinna Vinschen <corinna@vinschen.de>
1426 * fhandler_socket.cc (address_in_use): Disable. Add comment.
1427 (fhandler_socket::bind): Change comment to explain setting the
1428 SO_EXCLUSIVEADDRUSE socket option. Remove code which checks for
1430 * net.cc (cygwin_setsockopt): Never set SO_REUSEADDR option. Improve
1431 comment to compensate for the deleted comment in fhandler_socket::bind.
1432 * wincap.cc: Throughout, drop has_enhanced_socket_security from wincaps.
1433 * wincap.h (struct wincaps): Drop has_enhanced_socket_security flags
1436 2011-01-28 Peter Foley <jpfoley2@verizon.net>
1438 * configure.in: Define LIBSERVER regardless of cross_host.
1439 * configure: Regenerate.
1441 2011-01-28 Corinna Vinschen <corinna@vinschen.de>
1443 * fhandler_socket.cc (fhandler_socket::wait_for_events): Call
1444 pthread_testcancel in case of timeout to enable pthread_cancel
1447 2011-01-27 Corinna Vinschen <corinna@vinschen.de>
1449 * include/features.h (__STDC_ISO_10646__): Move to newlib's
1452 2011-01-26 Corinna Vinschen <corinna@vinschen.de>
1454 * fhandler_disk_file.cc (fhandler_base::fstat_by_nfs_ea): Fix
1455 computation of st_blocks.
1456 (fhandler_base::fstat_helper): Fix formatting.
1458 2011-01-24 Corinna Vinschen <corinna@vinschen.de>
1460 * include/features.h (__STDC_ISO_10646__): Define. Add comment.
1462 2011-01-21 Corinna Vinschen <corinna@vinschen.de>
1464 * syscalls.cc (rename): Fix permission problem with symlinks on NFS.
1465 Rework how NtOpenFile gets called to make it more readable. Change
1468 2011-01-20 Corinna Vinschen <corinna@vinschen.de>
1470 * exec.cc: Include pinfo.h.
1471 * winf.h: Move definitions of _P_PATH_TYPE_EXEC and _P_MODE from here...
1472 * pinfo.h: ...to here.
1473 (_P_PATH_TYPE_EXEC): Redefine to be bigger than _P_SYSTEM.
1474 (_P_MODE): Redefine so as not to mask out _P_SYSTEM.
1475 * spawn.cc (spawnlp): Add _P_PATH_TYPE_EXEC flag in call to spawnve.
1479 2011-01-19 Corinna Vinschen <corinna@vinschen.de>
1481 * spawn.cc (av::fixup): Reenable #! handling for all exec functions.
1482 Return ENOEXEC in !p_type_exec case only for unrecognized files.
1483 Fix comment formatting.
1485 2011-01-19 Corinna Vinschen <corinna@vinschen.de>
1487 * exec.cc (execlp): Add missing _P_PATH_TYPE_EXEC flag in call to
1490 2011-01-19 Corinna Vinschen <corinna@vinschen.de>
1492 * exec.cc: Rearrange functions in alphabetical order.
1493 (_execve): Drop temporary define and drop export alias.
1494 (execl): Call spawnve.
1495 (execle): New function.
1496 (execlp): New function.
1497 (execv): Call spawnve.
1498 (execve): Drop converting NULL envp to emtpy envp.
1499 (execvp): Call spawnve.
1500 (execvpe): Drop converting NULL envp to emtpy envp. Call spawnve.
1501 (fexecve): Call spawnve.
1502 * spawn.cc (spawnve): Convert NULL envp to emtpy envp. Remove outdated
1504 (spawnlp): Call spawnve.
1507 (spawnvpe): Fix formatting.
1509 2011-01-19 Corinna Vinschen <corinna@vinschen.de>
1511 * exec.cc (strccpy): Move function from here...
1512 * strfuncs.cc (strccpy): ...to here.
1513 * string.h (strccpy): Declare.
1514 * winsup.h (strccpy): Drop declaration.
1516 2011-01-19 Corinna Vinschen <corinna@vinschen.de>
1518 * errno.cc (errmap): Add error codes for invalid binaries.
1519 * exec.cc (execvp): Call spawnve with _P_PATH_TYPE_EXEC flag
1522 * spawn.cc (spawn_guts): Filter _P_PATH_TYPE_EXEC from mode and
1523 store in p_type_exec. Call av::fixup with addtional p_type_exec
1525 (spawnve): Check for filtered mode.
1526 (spawnvpe): Add _P_PATH_TYPE_EXEC flag when calling spawnve.
1527 (av::fixup): Accept additional bool parameter p_type_exec. Only check
1528 for script if p_type_exec is true.
1529 * winf.h (_P_PATH_TYPE_EXEC): Define.
1531 (av::fixup): Declare with additional bool parameter.
1533 2011-01-17 Corinna Vinschen <corinna@vinschen.de>
1535 * fhandler_proc.cc (format_proc_partitions): Fix compiler warning.
1537 2011-01-17 Corinna Vinschen <corinna@vinschen.de>
1539 * path.cc (path_conv::check): Don't follow reparse point symlinks if
1540 PC_SYM_NOFOLLOW_REP flag is set.
1541 (cygwin_conv_path): Set PC_SYM_NOFOLLOW_REP flag when converting from
1543 * path.h (enum pathconv_arg): Define PC_SYM_NOFOLLOW_REP flag.
1545 2011-01-17 Corinna Vinschen <corinna@vinschen.de>
1547 * fhandler_proc.cc (proc_tab_cmp): Fix typo in comment.
1548 (fhandler_proc::fill_filebuf): Handle return value of 0 from format
1550 (format_proc_stat): Set errno when returning 0 size.
1551 (format_proc_partitions): Rewrite method to fetch partition info.
1553 2011-01-13 Corinna Vinschen <corinna@vinschen.de>
1555 * fhandler_disk_file.cc (fhandler_base::fstat_helper): Always set
1556 st_size of directories to 0. Explain why.
1558 2011-01-12 Corinna Vinschen <corinna@vinschen.de>
1560 * posix.sgml: Add madvise to BSD list.
1562 2011-01-12 Corinna Vinschen <corinna@vinschen.de>
1564 * cygwin.din (madvise): Export posix_madvise as madvise.
1565 * include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR.
1566 * include/sys/mman.h: Define madvise constants, keep Linux-specific
1567 constants undefined.
1570 2011-01-12 Corinna Vinschen <corinna@vinschen.de>
1572 * fhandler.h (struct part_t): New type.
1573 (class fhandler_dev_floppy): Convert partitions to part_t pointer.
1574 Add lock_partition method.
1575 * fhandler_floppy.cc (fhandler_dev_floppy::lock_partition): New method
1576 to implement ondemand partition locking.
1577 (fhandler_dev_floppy::write_file): Call lock_partition from here if
1578 writing failed due to a potential write restriction on a disk
1580 (fhandler_dev_floppy::open): Don't lock partitions here.
1581 (fhandler_dev_floppy::close): Keep track of partition handle reference
1582 count. Close handles and remove partitions pointer ony if count is 0.
1583 (fhandler_dev_floppy::dup): Just copy partitions pointer and increment
1586 2011-01-11 Corinna Vinschen <corinna@vinschen.de>
1588 * fhandler.h (MAX_PARTITIONS): New definition.
1589 (class fhandler_dev_floppy): Add partitions array member. Add close
1591 * fhandler_floppy.cc (fhandler_dev_floppy::fhandler_dev_floppy): Zero
1592 out partitions array.
1593 (fhandler_dev_floppy::open): Fix "entire disk" condition for call to
1594 DeviceIoControl (FSCTL_ALLOW_EXTENDED_DASD_IO).
1595 When opening disks for writing, call DeviceIoControl (FSCTL_LOCK_VOLUME)
1596 on all affected disk partitions starting with Vista.
1597 (fhandler_dev_floppy::close): New method.
1598 (fhandler_dev_floppy::dup): Duplicate handles in partitions, if any.
1599 * wincap.h (wincaps::has_restricted_raw_disk_access): New element.
1600 * wincap.cc: Implement above element throughout.
1602 2011-01-11 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
1604 * termios.cc (cfgetospeed, cfgetispeed): Constify argument per POSIX.
1605 * include/sys/termios.h (cfgetospeed, cfgetispeed): Declare functions.
1606 Move macros after declarations and make conditional on !__cplusplus.
1608 2011-01-11 Corinna Vinschen <corinna@vinschen.de>
1610 * cygtls.cc (_cygtls::init_thread): Call _REENT_INIT_PTR. Drop setting
1611 current locale and calling srand48.
1613 2011-01-02 Christopher Faylor <me+cygwin@cgf.cx>
1615 * ChangeLog-2010: Create from ChangeLog.
1616 * ChangeLog: Start fresh.