OSDN Git Service

* fhandler.h (class dev_console): Add `metabit' indicating the
[pf3gnuchains/pf3gnuchains4x.git] / winsup / cygwin / ChangeLog
1 2006-07-03  Kazuhiro Fujieda  <fujieda@jaist.ac.jp>
2
3         * fhandler.h (class dev_console): Add `metabit' indicating the
4         current meta key mode.
5         * fhandler_console.cc (fhandler_console::read): Set the top bit of
6         the character if metabit is true.
7         * fhandler_console.cc (fhandler_console::ioctl): Implement
8         KDGKBMETA and KDSKBMETA commands.
9         * fhandler_tty.cc (process_ioctl): Support KDSKBMETA.
10         (fhandler_tty_slave::ioctl): Send KDGKBMETA and KDSKBMETA to the
11         master.
12         * include/cygwin/kd.h: New file for the meta key mode.
13         * include/sys/kd.h: New file.
14
15 2006-07-03  Eric Blake  <ebb9@byu.net>
16
17         * include/stdint.h (UINT8_C, UINT16_C): Unsigned types smaller
18         than int promote to signed int.
19
20 2006-07-03  Corinna Vinschen  <corinna@vinschen.de>
21
22         * net.cc (cygwin_sendto): Define appropriate parameters using
23         socklen_t type according to SUSv3.
24         (cygwin_recvfrom): Ditto.
25         (cygwin_setsockopt): Ditto.
26         (cygwin_getsockopt): Ditto.
27         (cygwin_connect): Ditto.
28         (cygwin_accept): Ditto.
29         (cygwin_bind): Ditto.
30         (cygwin_getsockname): Ditto.
31         (cygwin_getpeername): Ditto.
32         (cygwin_recv): Ditto.
33         (cygwin_send): Ditto.
34         * include/cygwin/socket.h (socklen_t): Typedef and define.
35         * include/sys/socket.h: Declare socket functions using socklen_t type.
36
37 2006-07-02  Christopher Faylor  <cgf@timesys.com>
38
39         * include/cygwin/version.h: Bump DLL minor version number to 21.
40
41 2006-06-30  Corinna Vinschen  <corinna@vinschen.de>
42
43         * net.cc (cygwin_sendto): Allow zero-sized packets.
44         (cygwin_sendmsg): Ditto.
45
46 2006-06-26  Corinna Vinschen  <corinna@vinschen.de>
47
48         Revert patches from 2005-10-22 and 2006-06-14 to use event driven
49         accept and connect back to using select:
50         * fhandler.h (class fhandler_socket): Remove accept_mtx.
51         * fhandler_socket.cc (fhandler_socket::fhandler_socket): Drop
52         initializing accept_mtx.
53         (fhandler_socket::accept): Drop event handling.
54         (fhandler_socket.cc (fhandler_socket::connect): Ditto.
55         (fhandler_socket::dup): Drop accept_mtx handling.
56         (fhandler_socket::listen): Ditto.
57         (fhandler_socket::prepare): Ditto.
58         (fhandler_socket::release): Ditto.
59         (fhandler_socket::close): Ditto.
60         * net.cc (cygwin_accept): Revert to calling cygwin_select to
61         implement interuptible accept.
62         (cygwin_connect): Ditto for connect.
63
64 2006-06-22  Christopher Faylor  <cgf@timesys.com>
65
66         * fhandler_fifo.cc (fhandler_fifo::open): Release process lock and grab
67         a system-wide mutex to prevent a deadlock and a race.
68         * sync.h (lock_process): Make fhandler_fifo a friend.
69
70         * smallprint.c (__small_vsprintf): Cosmetic change.
71
72 2006-06-15  Corinna Vinschen  <corinna@vinschen.de>
73
74         * cygwin.din: Export __srget_r, __swbuf_r.
75         * include/cygwin/version.h: Bump API minor number to 156.
76
77 2006-06-14  Corinna Vinschen  <corinna@vinschen.de>
78
79         * fhandler.h (class fhandler_socket): Add private mutex handle
80         accept_mtx.
81         * fhandler_socket.cc (fhandler_socket::fhandler_socket): Initialize
82         accept_mtx to NULL.
83         (fhandler_socket::dup): Duplicate accept_mtx, if available.
84         (fhandler_socket::listen): Create accept_mtx before trying to listen.
85         (fhandler_socket::prepare): Wait for accept_mtx if available to
86         serialize accepts on the same socket.
87         (fhandler_socket::release): Release accept_mtx.
88         (fhandler_socket::close): Close accept_mtx on successful closesocket.
89
90 2006-06-12  Christopher Faylor  <cgf@timesys.com>
91
92         * fhandler_tty.cc (fhandler_pty_master::close): Always close
93         from_master/to_master since we always have copies of these handles.
94
95 2006-06-12  Corinna Vinschen  <corinna@vinschen.de>
96
97         * include/sys/wait.h: Move definition of wait constants from here...
98         * include/cygwin/wait.h: ...to here.  New file.
99         * include/cygwin/stdlib.h: Include cygwin/wait.h to conform with SUSv3.
100
101 2006-06-12  Pierre Humblet  Pierre.Humblet@ieee.org
102
103         * heap.cc (heap_init): Only commit if allocsize is not zero.
104
105 2006-06-12  Corinna Vinschen  <corinna@vinschen.de>
106
107         * net.cc (fdsock): Disable raising buffer sizes.  Add comment to
108         explain why.
109
110 2006-06-04  Christopher Faylor  <cgf@timesys.com>
111
112         * ioctl.cc (ioctl): Accommodate change in reported pty master device
113         number.
114         * select.cc (peek_pipe): Ditto.
115
116 2006-06-04  Christopher Faylor  <cgf@timesys.com>
117
118         * cygtls.h (CYGTLS_PADSIZE): Reset to a size that XP SP1 seems to like.
119         * tlsoffsets.h: Regenerate.
120
121 2006-06-03  Christopher Faylor  <cgf@timesys.com>
122
123         * cygthread.cc (cygthread::terminate_thread): In debugging output, use
124         name of thread being terminated rather than thread doing the
125         terminating.
126
127         * fhandler.h (fhandler_pty_master::slave): Delete.
128         (fhandler_pty_master::get_unit): Ditto.
129         (fhandler_pty_master::setup): Change argument declaration to
130         accommodate new usage.
131         * fhandler_tty.cc (fhandler_tty_master::init): Remove obsolete slave
132         assignment.  Pass argument to setup indicating that this is a tty.
133         (fhandler_tty_slave::open): Use dev() method rather than referencing
134         pc.dev directly.
135         (fhandler_pty_master::open): Don't create archetype based on ptym
136         device number.  Set device number to use DEV_TTYM_MAJOR and tty number.
137         Pass argument to setup indicating that this is a pty.
138         (fhandler_pty_master::setup): Change single argument to a flag
139         indicating whether we're creating a pty and use appropriately.
140         Calculate 't' variable here rather than in caller.
141
142         * fhandler_dsp.cc (fhandler_dev_dsp::open): Use dev() method rather
143         than referencing pc.dev directly.
144
145 2006-06-03  Christopher Faylor  <cgf@timesys.com>
146
147         * dcrt0.cc (dll_crt0_0): Call tty_list::init_session here.
148         (dll_crt0_1): Reflect renaming from tty_init to tty::init_session.
149         (do_exit): Reflect moving of tty_terminate into tty_list.
150         * exceptions.cc (events_init): Move tty_mutex stuff elsewhere.
151         * fhandler_console.cc (set_console_title): Use lock_ttys class.
152         * fhandler_termios.cc (fhandler_termios::bg_check): Make debug output
153         more accurate.
154         * fhandler_tty.cc (fhandler_tty_slave::open): Reflect move of
155         attach_tty into tty_list class.  Don't attempt to grab master end of
156         pty if master doesn't exist.
157         (fhandler_pty_master::open): Reflect move of allocate_tty into tty_list
158         class.  Use lock_ttys::release to release mutex.  Improve debugging
159         output.
160         (fhandler_pty_master::setup): Remove if 0'ed block.  Fix argument to
161         SetNamedPipeHandleState.
162         * pinfo.cc (_pinfo::set_ctty): Lock ttys before setting sid/pgid.
163         Improve debugging.  Add temporary debugging.
164         * tty.cc (tty_list::init_session): New function.
165         (tty::init_session): Rename from tty_init.  Reflect move of attach_tty
166         to tty_list class.
167         (tty::create_master): Rename from create_tty_master.
168         (tty_list::attach): Rename from attach_tty.  Reflect renaming of
169         connect_tty to connect.  Ditto for allocate_tty.
170         (tty_terminate): Delete.
171         (tty_list::terminate): Subsume tty_terminate.  Use lock_ttys rather
172         than manipulating mutex directly.
173         (tty_list::allocate): Rename from allocate_tty.  Use lock_ttys rather
174         than manipulating mutex directly.  Don't set sid here since linux
175         apparently doesn't do this.  Reflect move of create_tty_master into
176         tty.
177         (lock_ttys::lock_ttys): Define new constructor.
178         (lock_ttys::release): New function.
179         * tty.h (tty::exists): Return false immediately if !master_pid.
180         (tty::set_master_closed): Define new function.
181         (tty::create_master): Ditto.
182         (tty::init_session): Ditto.
183         (tty_list::mutex): New field.
184         (tty_list::allocate): Define new function.
185         (tty_list::connect): Ditto.
186         (tty_list::attach): Ditto.
187         (tty_list::init_session): Ditto.
188         (lock_ttys): New class.
189         (tty_init): Delete declaration.
190         (tty_terminate): Ditto.
191         (attach_tty): Ditto.
192         (create_tty_master): Ditto.
193
194 2006-06-03  Christopher Faylor  <cgf@timesys.com>
195
196         * Makefile.in (libdl.a): New library.
197
198 2006-06-03  Christopher Faylor  <cgf@timesys.com>
199
200         * fhandler_tty.cc (fhandler_pty_master::close): Don't close handles if
201         we don't own them.
202         (fhandler_pty_master::setup): Make sure that original handle is closed
203         when changing inheritance.
204         (fhandler_pty_master::fixup_after_fork): Set from_master/to_master to
205         arch value always.
206         (fhandler_pty_master::fixup_after_exec): Clear from_master/to_master
207         when close_on_exec.
208
209 2006-06-03  Christopher Faylor  <cgf@timesys.com>
210
211         * cygheap.cc (init_cygheap::close_ctty): Remove obsolete code.
212         * dcrt0.cc (child_info_spawn::handle_spawn): Signal ready after we've
213         run fixup_after_exec.
214         * dtable.cc (dtable::fixup_after_exec): Add debugging output.
215         * fhandler_tty.cc (fhandler_pty_master::doecho): Use class version of
216         to_master.
217         (fhandler_tty_common::close): Remove obsolete code.
218         (fhandler_tty_slave::fixup_after_exec): Don't close, since this is done
219         in dtable's fixup_after_exec.  (revisit later?)
220         (fhandler_pty_master::fixup_after_exec): Ditto.
221
222 2006-06-02  Christopher Faylor  <cgf@timesys.com>
223
224         * cygtls.h (CYGTLS_PADSIZE): Bump up or suffer a regrettable collision
225         with the call chain.
226         * tlsoffsets.h: Regenerate.
227
228         * dcrt0.cc (break_here): Define unconditionally for use elsewhere.
229         Call DebugBreak, if appropriate.
230         (initial_env): Rely on break_here() to call DebugBreak.
231         * exceptions.cc (try_to_debug): Ditto.
232
233 2006-06-02  Christopher Faylor  <cgf@timesys.com>
234
235         * fhandler.cc (fhandler_base::fixup_after_exec): Declare here.
236         * fhandler.h (fhandler_base::fixup_after_exec): Make non-inline.
237         (fhandler_termios::fixup_after_fork): Delete declaration.
238         (fhandler_termios::fixup_after_exec): Ditto.
239         (fhandler_tty_common::inuse): Remove.
240         (fhandler_tty_common::dup): Delete declaration.
241         (fhandler_tty_common::fixup_after_fork): Ditto.
242         (fhandler_tty_slave::fixup_after_exec): Declare new function.
243         (fhandler_pty_master::dwProcessId): New variable.
244         (fhandler_pty_master::from_master): Ditto.
245         (fhandler_pty_master::to_master): Ditto.
246         (fhandler_pty_master::setup): New function.
247         (fhandler_pty_master::fixup_after_fork): Ditto.
248         (fhandler_pty_master::fixup_after_exec): Ditto.
249         * fhandler_termios.cc (fhandler_termios::fixup_after_exec): Delete
250         definition.
251         (fhandler_termios::fixup_after_fork): Ditto.
252         * fhandler_tty.cc (fhandler_tty_master::init): Use fhandler_pty_master
253         setup function rather than obsolete tty::common_init.  Delete obsolete
254         inuse setting.
255         (fhandler_tty_slave::fhandler_tty_slave): Set inuse to NULL here.
256         (fhandler_tty_slave::open): Change debugging output for clarity.  Check
257         for different things when doing a sanity check on the tty.  Reflect the
258         fact that master_pid now is the cygwin pid rather than the windows pid.
259         Use "arch" rather than "archetype" for consistency.
260         (fhandler_tty_slave::close): Close inuse here.
261         (fhandler_tty_slave::dup): Remove old if 0'ed code.
262         (fhandler_pty_master::dup): New function.  Handles pty master
263         archetype.
264         (fhandler_pty_master::fhandler_pty_master): Zero pty_master specific
265         fields.
266         (fhandler_pty_master::open): Implement using archetypes, similar to
267         slave.  Use fhandler_pty_master setup function rather than obsolete
268         tty::common_init.  Don't set inuse.
269         (fhandler_tty_common::close): Don't deal with inuse.  Delete old if
270         0'ed code.
271         (fhandler_pty_master::close): Implement using archetypes.  Close
272         from_master and to_master.
273         (fhandler_tty_common::set_close_on_exec): Just set close_on_exec flag
274         here since everything uses archetypes now.
275         (fhandler_tty_common::fixup_after_fork): Delete definition.
276         (fhandler_tty_slave::fixup_after_exec): Define new function.
277         (fhandler_pty_master::setup): New function, derived from
278         tty::common_init.
279         (fhandler_pty_master::fixup_after_fork): New function.
280         (shared_info.h): Reset SHARED_INFO_CB to reflect new tty size.
281         * tty.cc (tty_list::terminate): Close individual handles from
282         tty_master.
283         (tty::master_alive): Delete.
284         (tty::make_pipes): Ditto.
285         (tty::common_init): Ditto.
286         * tty.h (tty::from_slave): Delete.
287         (tty::to_slave): Ditto.
288         (tty::common_init): Delete declaration.
289         (tty::make_pipes): Ditto.
290         (tty::master_pid): Define as pid_t since it is now a cygwin pid.
291
292 2006-06-01  Christopher Faylor  <cgf@timesys.com>
293
294         * cygheap.cc (cygheap_fixup_in_child): Don't close parent handle here.
295         Let the caller do that.
296         * dcrt0.cc (child_info_spawn::handle_spawn): Close parent handle here
297         to allow fixup_after_exec functions to use it.
298
299         * cygtls.cc (_cygtls::call2): Avoid calling exit thread if called with
300         *crt0_1 functions.
301         * cygtls.h (_cygtls::isinitialized): Check that we actually have a tls
302         before seeing if it is initialized.
303         * gendef (_sigfe_maybe): Ditto.
304         * dcrt0.cc (dll_crt0_1): Remove static, use just one argument.
305         * dll_init.cc (dllcrt0_info): New structure.
306         (dll_dllcrt0): Change into a front-end to renamed dll_dllcrt0_1 so that
307         we'll always be assured of having something like a tls.
308         (dll_dllcrt0_1): New function, basically renamed from from dll_dllcrt0.
309         Unconditionally call _my_tls.init_exception_handler now that we are
310         assured of having a tls.  Change variable name from "linking" to "linked".
311         * winsup.h (dll_crt0_1): Declare.
312         (dll_dllcrt0_1): Ditto.
313
314 2006-05-30  Christopher Faylor  <cgf@timesys.com>
315
316         * cygtls.cc (_cygtls::call2): Don't call ExitThread on the main thread.
317
318 2006-05-29  Christopher Faylor  <cgf@timesys.com>
319
320         * winf.h (MAXCYGWINCMDLEN): Set down size to 30000 or suffer fork
321         errors.
322
323 2006-05-28  Christopher Faylor  <cgf@timesys.com>
324
325         * sigproc.cc (child_info::proc_retry): Mask all of the bits we're
326         interested in, which includes bits above and below 0xc0000000.
327
328 2006-05-27  Christopher Faylor  <cgf@timesys.com>
329
330         * dll_init.cc (dll_dllcrt0): Previous change didn't work very well with
331         fork.  Semi-revert it but change name of variable to something that
332         makes better sense.
333
334 2006-05-27  Christopher Faylor  <cgf@timesys.com>
335
336         * thread.cc (verifyable_object_isvalid): Check for NULL specifically.
337
338 2006-05-27  Christopher Faylor  <cgf@timesys.com>
339
340         * dll_init.cc (dll_dllcrt0): Call _my_tls.init_exception_handler if
341         we've finished initializing (Thanks to Gary Zablackis for noticing this
342         problem).  Just use cygwin_finished_initializing rather than defining a
343         separate variable.
344
345 2006-05-25  Christopher Faylor  <cgf@timesys.com>
346
347         * debug.h (ModifyHandle): Define new macro.
348         (modify_handle): Declare new function.
349         * debug.cc (modify_handle): Define new function.
350         * fhandler.h (fhandler_base::fork_fixup): Change return value from void
351         to bool.
352         * fhandler.cc (fhandler_base::fork_fixup): Return true if fork fixup has
353         been done.
354         * pipe.cc (fhandler_pipe::set_close_on_exec): Set inheritance of
355         protected handle via ModifyHandle if DEBUGGING.
356         (fhandler_pipe::fixup_after_fork): Protect guard handle if fork fixup
357         has been done.
358
359 2006-05-24  Christopher Faylor  <cgf@timesys.com>
360
361         * cygtls.cc (_cygtls::call): Call call2 using _my_tls.
362         (_cygtls::init_exception_handler): Always replace existing exception
363         handler with cygwin exception handler.
364         * cygtls.h (_cygtls::call2): Remove static designation.
365         * dcrto.cc (dll_crt0_1): Define in a way that allows calling via
366         _cygtls::call.
367         (_initialize_main_tls): Delete.
368         (_dll_crt0): Call dll_crt0_1 via cygtls::call.  Set _main_tls here.
369         * external.cc (cygwin_internal): Implement CW_CYGTLS_PADSIZE.
370         * include/sys/cygwin.h (CW_CYGTLS_PADSIZE): Define.
371         * tlsoffsets.h: Regenerate.
372
373 2006-05-24  Christopher Faylor  <cgf@timesys.com>
374
375         * configure.in: Update to newer autoconf.
376         (thanks to Steve Ellcey)
377         * configure: Regenerate.
378         * aclocal.m4: New file.
379
380 2006-05-23  Lev Bishop  <lev.bishop+cygwin@gmail.com>
381
382         * fhandler.cc (readv): Remove nonsensical assert.
383
384 2006-05-23  Christopher Faylor  <cgf@timesys.com>
385
386         * select.cc (start_thread_socket): Delay setting thread local exitsock
387         until we know it's correct.  Return correct value on error.
388
389 2006-05-23  Lev Bishop  <lev.bishop+cygwin@gmail.com>
390             Christopher Faylor  <cgf@timesys.com>
391
392         * select.cc (start_thread_socket): Clean up exitsock in case of error.
393         Use si->exitcode consistently.
394
395 2006-05-21  Christopher Faylor  <cgf@timesys.com>
396
397         * child_info.h (_CI_SAW_CTRL_C): New enum.
398         (CURR_CHILD_INFO_MAGIC): Reset.
399         (saw_ctrl_c): New function.
400         (set_saw_ctrl_c): Ditto.
401         * sigproc.cc (child_info::proc_retry): Return EXITCODE_OK if we get
402         STATUS_CONTROL_C_EXIT and we actually saw a CTRL-C.
403         * spawn.cc (dwExeced): Delete.
404         (chExeced): New variable.
405         (spawn_guts): Set chExeced;
406         * exceptions.cc (dwExeced): Delete declaration.
407         (chExeced): Declare.
408         (ctrl_c_handler): Detect if we're an exec stub process and set a flag,
409         if so.
410
411         * fhandler_tty.cc (fhandler_tty_common::__release_output_mutex): Add
412         extra DEBUGGING test.
413
414         * pinfo.cc: Fix comment.
415
416 2006-05-21  Christopher Faylor  <cgf@timesys.com>
417
418         * fhandle.h (fhandler_pipe::create_guard): Revert change which
419         eliminated SECURITY_ATTRIBUTES argument.
420         * pipe.cc (fhandler_pipe::open): Duplicate guard from other process and
421         protect it appropriately.  Eliminate unneeded writepipe_exists
422         temporary variable.  Set inheritance appropriately.
423         (fhandler_pipe::set_close_on_exec): Revert change which eliminated
424         handling guard inheritance.
425         (fhandler_pipe::fixup_after_fork): Ditto.  Use correct name of entity
426         being checked by fork_fixup.
427         (fhandler_pipe::fixup_after_exec): Don't bother with guard here.
428         (fhandler_pipe::dup): Cosmetic changes and revert creation of
429         writepipe_exists as noninheritable.
430         (fhandler_pipe::create): Revert change which eliminated
431         SECURITY_ATTRIBUTES argument.  Revert change which always made
432         writepipe_exists noninheritable.
433
434 2006-05-21  Christopher Faylor  <cgf@timesys.com>
435
436         * debug.cc (add_handle): Print handle value when collision detected.
437         * dtable.cc (dtable::stdio_init): Cosmetic change.
438         * fhandler.h (fhandler_base::create_read_state): Protect handle.
439         (fhandler_pipe::create_guard): Ditto.  Always mark the handle as
440         inheritable.
441         (fhandler_pipe::is_slow): Return boolean value rather than numeric 1.
442         * pipe.cc (fhandler_pipe::fhandler_pipe): Always flag that we need fork
443         fixup.
444         (fhandler_pipe::open): Don't pass security attributes to create_guard.
445         (fhandler_pipe::set_close_on_exec): Don't handle guard here.
446         (fhandler_pipe::close): Accommodate now-protected guard handle.
447         (fhandler_pipe::fixup_in_child): Don't protect read_state here.
448         (fhandler_pipe::fixup_after_exec): Close guard handle if close_on_exec.
449         (fhandler_pipe::fixup_after_fork): Don't bother with guard here.
450         (fhandler_pipe::dup): Don't set res to non-error prematurely.  Use
451         boolean values where appropriate.  Protect guard and read_state.
452         (fhandler_pipe::create): Don't call need_fork_fixup since it is now the
453         default.  Don't protect read_state or guard.
454
455         * pipe.cc (fhandler_base::ready_for_read): Use bool values for "avail".
456
457         * spawn.cc (spawn_guts): Set cygheap->pid_handle as inheritable when
458         protecting.
459
460 2006-05-15  Lev Bishop  <lev.bishop+cygwin@gmail.com>
461             Christopher Faylor  <cgf@timesys.com>
462
463         * select.cc (fhandler_pipe::ready_for_read): Actually get the guard
464         mutex for blocking reads.
465
466 2006-05-20  Christopher Faylor  <cgf@timesys.com>
467
468         * fhandler_tty.cc (fhandler_tty::close): Remove problematic hExeced guard.
469
470 2006-05-20  Christopher Faylor  <cgf@timesys.com>
471
472         * fhandler_tty.cc (fhandler_tty_slave::open): Reinstate call to
473         need_invisible on first pty open.
474
475 2006-05-18  Christopher Faylor  <cgf@timesys.com>
476
477         * fhandler_console.cc (fhandler_console::need_invisible): Allocate an
478         invisible window station when ctty != TTY_CONSOLE.
479
480 2006-05-16  Christopher Faylor  <cgf@timesys.com>
481
482         * cygtls.cc (_cygtls::remove): Don't test for initialization since
483         this function will always be called when _my_tls is initialized.
484         * init.cc (dll_entry): Don't attempt to remove tls info if _my_tls is
485         obviously not even available.
486
487 2006-05-15  Christopher Faylor  <cgf@timesys.com>
488
489         * sigproc.cc (no_signals_available): Detect hwait_sig ==
490         INVALID_HANDLE_VALUE.
491         (wait_sig): Set hwait_sig to INVALID_HANDLE_VALUE on __SIGEXIT.
492
493 2006-05-15  Christopher Faylor  <cgf@timesys.com>
494
495         * cygtls.cc (_cygtls::init_thread): Zero entire _my_tls structure and
496         no more.
497         * cygtls.h (_my_tls::padding): Delete.
498         (CYGTLS_PADSIZE): Redefine concept of padding to mean padding at the
499         end of the stack.
500         * dcrt0.cc (initialize_main_tls): Change return to void.
501         * gentls_offsets: Treat const specially, too.  Keep going after a '}'
502         is found.  Change negative offset calculation to use CYGTLS_PADSIZE.
503         * init.cc (_my_oldfunc): New variable.
504         (threadfunc_fe): Use stored tls value for oldfunc rather than blindly
505         writing to the stack.
506         (munge_threadfunc): Set oldfunc in tls.
507         (dll_entry): Initialize tls allocation.
508         * tlsoffsets.h: Regenerate.
509
510 2006-05-13  Christopher Faylor  <cgf@timesys.com>
511
512         * ntdll.h (STATUS_INVALID_INFO_CLASS): Conditionalize.
513
514 2006-05-10  Brian Dessent  <brian@dessent.net>
515
516         * Makefile.in (clean): Also delete *.dbg.
517
518 2006-05-08  Christian Franke  <Christian.Franke@t-online.de>
519
520         * fhandler_disk_file.cc (fhandler_disk_file::readdir): Fix typo which
521         caused test for ".." to be skipped.
522
523 2006-05-02  Christopher Faylor  <cgf@timesys.com>
524
525         * external.cc (cygwin_internal): Set errno on failure.
526
527 2006-04-27  Corinna Vinschen  <corinna@vinschen.de>
528
529         * pipe.cc (DEFAULT_PIPEBUFSIZE): Raise to 64K.
530
531 2006-04-26  Corinna Vinschen  <corinna@vinschen.de>
532
533         * fhandler.h (fhandler_base): Change fstat_helper prototype
534         to take file size and inode number as 64 bit values.
535         * fhandler_disk_file.cc (FS_IS_SAMBA): Move to path.cc
536         (FS_IS_SAMBA_WITH_QUOTA): Ditto.
537         (path_conv::hasgood_inode): Delete.
538         (path_conv::is_samba): Delete.
539         (path_conv::isgood_inode): Centralized function to recognize
540         a good inode number.
541         (fhandler_base::fstat_by_handle): Constify fvi_size and fai_size.
542         Accomodate argument change in fstat_helper.
543         (fhandler_base::fstat_by_name): Ditto.
544         (fhandler_base::fstat_helper): Accomodate argument change.  Call
545         path_conv::isgood_inode to recognize good inodes.
546         (fhandler_disk_file::opendir): Explain Samba weirdness here.
547         Call path_conv::fs_is_samba instead of path_conv::is_samba.
548         (fhandler_disk_file::readdir): Add STATUS_INVALID_INFO_CLASS
549         as valid return code from NtQueryDirectoryFile to indicate that
550         FileIdBothDirectoryInformation is not supported.
551         Call path_conv::isgood_inode to recognize good inodes.
552         * ntdll.h (STATUS_INVALID_INFO_CLASS): Define.
553         * path.cc (fs_info::update): Rework file system recognition
554         and set appropriate flags.
555         * path.h (struct fs_info): Add is_ntfs, is_samba and is_nfs flags.
556         Constify pure read accessors.
557
558 2006-04-24  Christopher Faylor  <cgf@timesys.com>
559
560         * environ.cc (getearly): Force correct dereference order when
561         inspecting environ table.
562
563 2006-04-24  Corinna Vinschen  <corinna@vinschen.de>
564
565         * select.cc (thread_pipe): Raise sleep time only every 8th iteration.
566         (thread_mailslot): Ditto.
567
568 2006-04-23  Corinna Vinschen  <corinna@vinschen.de>
569             Christopher Faylor  <cgf@timesys.com>
570
571         * select.cc (thread_pipe): Raise sleep time dynamically to speed up
572         select on pipes when copying lots of data.
573         (thread_mailslot): Ditto for mailslots.
574
575 2006-04-22  Christopher Faylor  <cgf@timesys.com>
576
577         * signal.cc (abort): On second thought, just set incyg once.
578
579 2006-04-22  Christopher Faylor  <cgf@timesys.com>
580
581         * signal.cc (abort): Set incyg manually to help get a reliable gdb
582         stack trace.
583         * cygwin.din (abort): Make NOSIGFE.
584
585 2006-04-21  Pierre Humblet Pierre.Humblet@ieee.org
586             Christopher Faylor  <cgf@timesys.com>
587
588         * environ.cc (getearly): Use GetEnvironmentVariable and cmalloc instead
589         of GetEnvironmentStrings.
590         (environ_init): Revert rawenv stuff.
591
592 2006-04-21  Christopher Faylor  <cgf@timesys.com>
593
594         * environ.cc (rawenv): Make this variable a file-scope static.
595         (getearly): Rename 's' variable to 'len' since 's' is used fairly
596         consistently throughout cygwin as a string variable.  Remove rawenv
597         declaration.  Perform other minor cleanups.
598         (environ_init): Remove rawenv declaration.  Only set rawenv to
599         GetEnvironmentStrings() if it has not already been set.  Properly free
600         rawenv in all cases.
601
602 2006-04-21  Christopher Faylor  <cgf@timesys.com>
603
604         * tty.h (tty::hwnd): Move to tty_min.
605         (tty::gethwnd): Ditto.
606         (tty::sethwnd): Ditto.
607         (tty_min::hwnd): Receive variable from tty class.
608         (tty_min::gethwnd): Receive function from tty classs.
609         (tty_min::sethwnd): Ditto.
610         * dtable.cc (dtable::stdio_init): Only call init_console_handler when
611         we actually own the console.
612         * fhandler_console.cc (fhandler_console::get_tty_stuff): Set tty's hwnd
613         to non-zero value.
614         * fhandler_termios.cc (fhandler_termios::tcsetpgrp): Semi-reinstate
615         handling of console when pgrp is set.
616
617 2006-04-21  Pierre Humblet  <Pierre.Humblet@ieee.org>
618             Corinna Vinschen  <corinna@vinschen.de>
619
620         * environ.cc (getearly): New function.
621         (findenv_func): New function pointer, predefined to getearly.
622         (getenv): Call findenv function over the findenv_func pointer.
623         (environ_init): Change findenv_func pointer to my_findenv after Cygwin
624         environment is initialized.
625
626 2006-04-21  Lars Munch  <lars@segv.dk>
627
628         * include/asm/byteorder.h (__ntohl): Fix the missing uint32_t.
629
630 2006-04-21  Corinna Vinschen  <corinna@vinschen.de>
631
632         * fhandler_socket.cc (fhandler_socket::wait): Reorder setting
633         WSAError to avoid spurious errors with WSAError set to 0.
634
635 2006-04-21  Corinna Vinschen  <corinna@vinschen.de>
636
637         * include/asm/byteorder.h: Include stdint.h.  Per standard, change
638         datatypes in ntohX and htonX functions to uintXX_t types.
639
640 2006-04-18  Christopher Faylor  <cgf@timesys.com>
641
642         * exceptions.cc (ctrl_c_handler): Only exit TRUE on CTRL_LOGOFF_EVENT
643         when we have actually handled the event.
644
645 2006-04-17  Eric Blake  <ebb9@byu.net>
646
647         * mktemp.cc (_gettemp): Open temp files in binary mode.
648
649 2006-04-14  Corinna Vinschen  <corinna@vinschen.de>
650
651         * fhandler_disk_file.cc (fhandler_disk_file::readdir): Use UINT32_MAX
652         instead of UINT_MAX.
653
654 2006-04-14  Corinna Vinschen  <corinna@vinschen.de>
655
656         * fhandler_disk_file.cc (path_conv::hasgood_inode): Make inline.
657         Drop remote fs handling entirely since unreliable inode numbers
658         are now recognized differently.
659         (path_conv::is_samba): Make inline.
660         (fhandler_disk_file::opendir): Reformat comment.
661         (fhandler_base::fstat_helper): Special case remote file systems
662         returning (unreliable) 32 bit inode numbers.
663         (fhandler_disk_file::readdir): Ditto.
664         * fhandler_netdrive.cc (fhandler_netdrive::readdir): Ditto.
665
666 2006-04-13  Christopher Faylor  <cgf@timesys.com>
667
668         * spawn.cc (spawn_guts): Move ch.set() call back to where it was
669         supposed to be.
670
671 2006-04-13  Corinna Vinschen  <corinna@vinschen.de>
672
673         * sysconf.cc (sysconf): Add _SC_THREADS, _SC_THREAD_ATTR_STACKSIZE,
674         _SC_THREAD_PRIORITY_SCHEDULING, _SC_THREAD_PROCESS_SHARED,
675         _SC_THREAD_SAFE_FUNCTIONS, _SC_TIMERS handling.
676
677 2006-04-12  Corinna Vinschen  <corinna@vinschen.de>
678             Christopher Faylor  <cgf@timesys.com>
679
680         * spawn.cc (spawn_guts): Revert patch which treated derived cygwin
681         programs differently from those which are mounted with -X.  Pass extra
682         argument to linebuf::fromargv.
683         * winf.h (MAXCYGWINCMDLEN): New define.
684         (linebuf::finish): Add a new argument denoting when command line
685         overflow is ok.
686         (linebuf::fromargv): Ditto.
687         * winf.cc (linebuf::finish): Implement above change.
688         (linebuf::fromargv): Ditto.
689
690 2006-04-11  Christopher Faylor  <cgf@timesys.com>
691
692         * Makefile.in (DLL_OFILES): Add winf.o.
693         * spawn.cc: Move command line handling stuff into winf.cc.
694         * winf.h: New file.
695         * winf.cc: New file.
696
697 2006-04-05  Christopher Faylor  <cgf@timesys.com>
698
699         * fhandler_socket.cc: Move iptypes.h include after winsock2 since it
700         now relies on it.
701         * net.cc: Ditto.
702
703 2006-04-05  Christopher Faylor  <cgf@timesys.com>
704
705         * dcrt0.cc (dll_crt0_0): Move user_data->{resourcelocks,threadinterface}
706         initialization here from dll_crt0_1.
707         (dll_crt0_1): See above.
708
709 2006-04-04  Corinna Vinschen  <corinna@vinschen.de>
710
711         * net.cc (fdsock): Raise default SO_RCVBUF/SO_SNDBUF buffer sizes to
712         the same values as on Linux.
713
714 2006-04-03  Christopher Faylor  <cgf@timesys.com>
715
716         * child_info.h (CURR_CHILD_INFO_MAGIC): Update.
717         (child_info_fork::alloc_stack): Move into this class.
718         (child_info_fork::alloc_stack_hard_way): Ditto.
719         * dcrt0.cc (child_info_fork::alloc_stack): Ditto.
720         (child_info_fork::alloc_stack_hard_way): Ditto.
721         (_dll_crt0): Reference alloc_stack via fork_info.
722
723 2006-04-03  Corinna Vinschen  <corinna@vinschen.de>
724
725         * spawn.cc (linebuf::finish): Drop argument.  Don't check command line
726         length.
727         (spawn_guts): Remove wascygexec.  Check real_path.iscygexec instead.
728         Accommodate change to linebuf::finish.
729
730 2006-04-03  Christopher Faylor  <cgf@timesys.com>
731
732         * dcrt0.cc (sm): Delete.
733         (alloc_stack_hard_way): Figure out where the stack lives here rather
734         than relying on previously filled out information which has been
735         invalid since 1.5.19.
736
737 2006-03-31  Corinna Vinschen  <corinna@vinschen.de>
738
739         * fhandler_disk_file.cc (FS_IS_SAMBA_WITH_QUOTA): New define.
740         (path_conv::hasgood_inode): Recognize Samba with quota support
741         compiled in.
742         (path_conv::is_samba): Ditto.  Fix comment to include Samba version
743         numbers for later reference.
744
745 2006-03-30  Corinna Vinschen  <corinna@vinschen.de>
746
747         * security.h (sec_user_nih): Make sid1 argument mandatory.
748         (sec_user): Ditto.
749
750 2006-03-29  Christopher Faylor  <cgf@timesys.com>
751
752         * sigproc.cc (wait_for_sigthread): Use the current user sid when
753         setting up the signal pipe rather than relying on (eventually) the
754         effective sid.
755
756 2006-03-29  Christopher Faylor  <cgf@timesys.com>
757
758         * dcrt0.cc (child_info_fork::handle_fork): Set uid/gid in myself so
759         that it can be used by subsequent startup functions.
760         (dll_crt0_0): Issue a warning if DuplicateTokenEx fails and DEBUGGING.
761         (dll_crt0_1): Move user_data->{resourcelocks,threadinterface}
762         initialization here from dll_crt0_0.
763         * fork.cc (frok::child): Tell wait_for_sigthread that this is fork.
764         (frok::parent): Only initialize start_time once.  Tighten time when
765         we're "deimpersonated".
766         * sigproc.cc (signal_fixup_after_exec): Rework (futiley) sa_buf stuff.
767         Add debugging output.
768         (wait_for_sigthread): Accept an argument which illustrates whether we
769         are forked or not.
770         (wait_sig): Avoid using myself pointer.
771         * winsup.h ((wait_for_sigthread): Reflect change to argument.
772
773 2006-03-26  Christopher Faylor  <cgf@timesys.com>
774
775         * spawn.cc (spawn_guts): Close handles if we know that we will not be
776         seeing a sync event from the child.
777
778 2006-03-26  Christopher Faylor  <cgf@timesys.com>
779
780         * sigproc.cc (wait_sig): Move myself manipulation...
781         (wait_for_sigthread): ...to here.
782
783 2006-03-24  Corinna Vinschen  <corinna@vinschen.de>
784
785         * fhandler_floppy.cc: Include ntdef.h and ntdll.h.
786         (fhandler_dev_floppy::get_drive_info): Rearrange so that now
787         NtQueryVolumeInformationFile is called on drives which don't support
788         IOCTL_DISK_GET_DRIVE_GEOMETRY.
789         * ntdll.h (struct _FILE_FS_SIZE_INFORMATION): Add.
790         (enum _FSINFOCLASS): Add missing values.
791
792 2006-03-23  Christopher Faylor  <cgf@timesys.com>
793
794         * fhandler_console.cc (fhandler_console::fixup_after_fork_exec): Make
795         error message more explicit.
796         * pinfo.cc (_pinfo::commune_request): Don't lock process unless we're
797         looking for fifos.
798
799 2006-03-23  Christopher Faylor  <cgf@timesys.com>
800
801         * dcrt0.cc (child_info_spawn::handle_spawn): Don't initialize the
802         console handler here.
803         * dtable.cc (dtable::stdio_init): Initialize console handler here.
804
805 2006-03-23  Christopher Faylor  <cgf@timesys.com>
806
807         * sigproc.cc (sigalloc): Don't set SA_RESTART here.
808         * signal.cc (_SA_NORESTART): New flag.
809         (sigaction_worker): New function, derived from sigaction.  Don't set
810         internal flags unless called internally.
811         (sigaction): Use sigaction_worker.
812         (signal): Honor new _SA_NORESTART flag.
813         (siginterrupt): Set _SA_NORESTART flag appropriately.  Use
814         sigaction_worker to set flags.
815         * include/cygwin/signal.h: Define _SA_INTERNAL_MASK here.
816
817 2006-03-22  Corinna Vinschen  <corinna@vinschen.de>
818
819         * thread.cc (pthread_mutex::is_good_initializer_or_bad_object): Delete.
820         (pthread_cond::is_good_initializer_or_bad_object): Delete.
821         (pthread_rwlock::is_good_initializer_or_bad_object): Delete.
822         (pthread_cond::init): Remove disabled code.  Guard assignment to
823         object to initialize against access violation.
824         (pthread_rwlock::init): Ditto.
825         (pthread_mutex::init): Ditto.
826
827 2006-03-22  Eric Blake  <ebb9@byu.net>
828
829         * fhandler.cc (fcntl): Print flags in hex.
830
831 2006-03-22  Christopher Faylor  <cgf@timesys.com>
832
833         * dcrt0.cc (dll_crt0_0): Semi-revert 2006-03-14 change which moved
834         pinfo_init and uinfo_init here.
835         (dll_crt0_1): Ditto.
836         (__dll_crt0): Ditto. Don't call update_envptrs here.
837         (dll_crt0_1): Ditto. Move wait_for_sigthread call here from dll_crt0_0.
838         * environ.cc (environ_init): Call it here instead.
839         * sigproc.cc (my_readsig): New static variable.
840         (wait_for_sigthread): Set up read pipe here since we are assured that
841         we have the proper privileges when this is called.
842         (talktome): Eliminate second argument since it is available as a global
843         now.
844         (wait_sig): Reflect use of my_readsig.
845
846 2006-03-22  Corinna Vinschen  <corinna@vinschen.de>
847
848         * thread.cc (pthread_cond::init): Disable validity test of object
849         to initialize since test of uninitialized content is unreliable.
850         (pthread_rwlock::init): Ditto.
851         (pthread_mutex::init): Ditto.
852
853 2006-03-21  Christopher Faylor  <cgf@timesys.com>
854
855         * signal.cc (signal): Don't set SA_RESTART here.
856         (siginterrupt): White space.
857         * sigproc.cc (sigalloc): Set SA_RESTART here, on initialization.
858
859 2006-03-21  Christopher Faylor  <cgf@timesys.com>
860
861         * child_info.h (child_status): Fix typo which made it impossible to set
862         iscygwin.
863         (child_info::isstraced): Booleanize.
864         (child_info::iscygwin): Ditto.
865         * sigproc.cc (child_info::child_info): Minor cleanup of flag setting.
866         * spawn.cc (spawn_guts): Only close_all_files when we know the process
867         has started successfully.
868
869         * exceptions.cc (init_console_handler): Fix indentation.
870
871 2006-03-20  Christopher Faylor  <cgf@timesys.com>
872
873         * dcrt0.cc (dll_crt0_0): Call SetErrorMode earlier.
874         * pinfo.cc (_pinfo::dup_proc_pipe): Reset wr_proc_pipe on failure.
875         Return previous pipe handle.
876         * pinfo.h (_pinfo::dup_proc_pipe): Reflect change to return value.
877         * spawn.cc (spawn_guts): Restore previous proc pipe on retry or if
878         process exits before synchronization.
879
880 2006-03-20  Christopher Faylor  <cgf@timesys.com>
881
882         * child_info.h (child_status): New enum.
883         (child_info::flag): Rename from 'straced'.
884         (child_info::isstraced): New function.
885         (child_info::iscygwin): Ditto.
886         (child_info_fork::handle_fork): Reparmize.
887         (child_info_fork::handle_failure): Ditto.
888         (child_info_spawn::handle_spawn): New function.
889         * dcrt0.cc (get_cygwin_startup_info): Use isstraced method.
890         (child_info_spawn::handle_spawn): Define new function from code
891         previously in dll_crt0_0.
892         (dll_crt0_0): Move spawn stuff into handle_spawn.  Only call
893         init_console_handler for fork case.
894         * sigproc.cc (child_info::child_info): Set flag appropriately.
895         (child_info::proc_retry): Treat exit code as "funny" if it's a cygwin
896         process.
897         * spawn.cc (spawn_guts): Remove commented out flag setting.
898
899 2006-03-19  Christopher Faylor  <cgf@timesys.com>
900
901         * pinfo.cc (commune_process): Fix randomly invalid pointer which caused
902         fifos to work incorrectly.
903
904 2006-03-19  Christopher Faylor  <cgf@timesys.com>
905
906         * dcrt0.cc (dll_crt0_0): Oops.  We need to bother with setting
907         init_console_handler in the fork/exec case.
908
909 2006-03-19  Christopher Faylor  <cgf@timesys.com>
910
911         * dcrt0.cc (dll_crt0_0): Don't bother with setting init_console_handler
912         here since it will be set later when we discover if we have a ctty or
913         not.
914         * exceptions.cc (init_console_handler): Properly remove NULL handler.
915
916 2006-03-18  Christopher Faylor  <cgf@timesys.com>
917
918         * pinfo.h (EXITCODE_OK): Define new constant.
919         * sigproc.cc (child_info::sync): Return EXITCODE_OK if entering with
920         exit_code == 0.
921         (sig_send): Don't complain if sending signals while blocked if the
922         sender isn't in the main thread.
923
924 2006-03-18  Christopher Faylor  <cgf@timesys.com>
925
926         * child_info.h (CURR_CHILD_INFO_MAGIC): Regenerate.
927         (child_info::retry): Move here from fork subclass.
928         (child_info::exit_code): New field.
929         (child_info::retry_count): Max retry count for process start.
930         (child_info::proc_retry): Declare new function.
931         (child_info_fork::retry): Move to parent.
932         (child_info_fork::fork_retry): Ditto.
933         * dcrt0.cc (child_info::fork_retry): Rename and move.
934         (child_info_fork::handle_failure): Move.
935         (dll_crt0_0): Initialize console handler based on whether we have a
936         controlling tty or not.  Avoid nonsensical check for fork where it can
937         never occur.
938         * environ.cc (set_proc_retry): Rename from set_fork_retry.  Set
939         retry_count in child_info.
940         (parse_thing): Reflect above change.
941         * exceptions.cc (dummy_ctrl_c_handler): Remove unused variable name.
942         (ctrl_c_handler): Always return TRUE for the annoying
943         CTRL_LOGOFF_EVENT.
944         * fhandler_termios.cc (fhandler_termios::tcsetpgrp): Remove call to
945         init_console_handler.
946         * fhandler_tty.cc (fhandler_tty_slave::open): Just call
947         mange_console_count here and let it decide what to do with initializing
948         console control handling.
949         * fork.cc (fork_retry): Remove definition.
950         (frok::parent): Define static errbuf and use in error messages (not
951         thread safe yet).  Close pi.hThread as soon as possible.  Protect
952         pi.hProcess as soon as possible.  Don't set retry_count.  That happens
953         automatically in the constructor now.  Accommodate name change from
954         fork_retry to proc_retry.
955         * init.cc (dll_entry): Turn off ctrl-c handling early until we know how
956         it is supposed to be handled.
957         * pinfo.cc (_pinfo::dup_proc_pipe): Remember original proc pipe value
958         for failure error message.  Tweak debug message slightly.
959         * sigproc.cc (child_info::retry_count): Define.
960         (child_info::child_info): Initialize retry count.
961         (child_info::sync): Set exit code if process dies before
962         synchronization.
963         (child_info::proc_retry): Rename from child_info_fork::fork_retry.  Use
964         previously derived exit code.  Be more defensive about what is
965         classified as an error exit.
966         (child_info_fork::handle_failure): Move here from dcrt0.cc.
967         * spawn.cc (spawn_guts): Maintain error mode when starting new process
968         to avoid annoying pop ups.  Move deimpersonate call within new loop.
969         Move envblock freeing to end.  Loop if process dies prematurely with
970         bad exit code.
971         * syscalls.cc (setpgid): Remove hopefully unneeded call to
972         init_console_handler.
973
974 2006-03-15  Christopher Faylor  <cgf@timesys.com>
975
976         * cygheap.cc (init_cygheap::manage_console_count): Turn console control
977         handler on/off depending on whether we have allocated a console or not.
978         * dcrt0.cc (child_info_fork::fork_retry): Add more potential retry
979         statuses.
980         (dll_crt0_0): Turn on/off console control depending on whether we have
981         a controlling tty or not.
982         * exceptions.cc (init_console_handler): Change BOOL to bool.
983         * fhandler_console.cc (fhandler_console::need_invisible): Cosmetic
984         change.
985         * winsup.h (init_console_handler): Reflect argument type change.
986
987         * wincap.h (supports_setconsolectrlhandler_null): Remove duplicate
988         capability throughout.
989         * wincap.cc: Ditto.
990
991 2006-03-14  Christopher Faylor  <cgf@timesys.com>
992
993         * child_info.h (child_info_fork::fork_retry): Declare new function.
994         * dcrt0.cc (child_info_fork::fork_retry): Define new function.
995         * fork.cc (frok::parent): Move retry decision into
996         child_info_fork::fork_retry and honor what it tells us to do.
997         * sigproc.cc (sig_send): Unhold signals on __SIGEXIT.
998
999 2006-03-14  Christopher Faylor  <cgf@timesys.com>
1000
1001         * fork.cc (frok::parent): Improve error message.
1002
1003 2006-03-14  Christopher Faylor  <cgf@timesys.com>
1004
1005         * dcrt0.cc (main_environ): Initialize to &__cygwin_environment.
1006         (dll_crt0_1): Move resourcelocks, thread interface, pinfo_init, and
1007         uinfo_init...
1008         (dll_crt0_0): ...to here.
1009         (_dll_crt0): Call update_envptrs here after setting main_environ.
1010         * environ.cc (environ_init): Eliminate initted variable.  Don't call
1011         update_envptrs here.
1012         * sigproc.cc (wait_sig): Use my_sendsig when calling CreatePipe to
1013         avoid a dereference.
1014
1015 2006-03-13  Christopher Faylor  <cgf@timesys.com>
1016
1017         * child_info.h (child_info_fork::handle_failure): Declare new function.
1018         (child_info_fork::retry): New field.
1019         * dcrt0.cc (__api_fatal_exit_val): Define.
1020         (child_info_fork::handle_failure): Define new function.
1021         (__api_fatal): Exit using __api_fatal_exit_val value.
1022         * environ.cc (set_fork_retry): Set fork_retry based on CYGWIN
1023         environment variable.
1024         (parse_thing): Add "fork_retry" setting.
1025         * fork.cc (fork_retry): Define.
1026         (frok::parent): Reorganize to allow retry of failed child creation if
1027         child signalled that it was ok to do so.
1028         * heap.cc (heap_init): Signal parent via handle_failure when
1029         VirtualAlloc fails.
1030         * pinfo.h (EXITCODE_RETRY): Declare.
1031         * sigproc.cc (child_info::sync): Properly exit with failure condition
1032         if called for fork and didn't see subproc_ready.
1033         * spawn.cc (spawn_guts): Use windows pid as first argument.
1034         * winsup.h: Remove obsolete NEW_MACRO_VARARGS define.
1035         (__api_fatal_exit_val): Declare.
1036         (set_api_fatal_return): Define.
1037         (in_dllentry): Declare.
1038         * exceptions.cc (inside_kernel): Remove unneeded in_dllentry
1039         declaration.
1040
1041 2006-03-13  Christopher Faylor  <cgf@timesys.com>
1042
1043         * dcrt0.cc (dll_crt0_0): Reorganize so that sigproc_init is called a
1044         little later.  Add a comment.
1045         * fork.cc (resume_child): Make void.
1046         (frok::parent): Only zero pi when necessary.  Explicitly zero si.  Set
1047         this_errno when child_copy fails.  Accommodate change to resume_child.
1048         * sigproc.cc (sigalloc): Move global_sigs initialization here.
1049         (sigproc_init): Move global_sigs.
1050         (sig_send): Just check for flush signals once.
1051
1052         * wincap.h: Define supports_setconsolectrlhandler_null throughout.
1053         * wincap.cc: Ditto.
1054
1055 2006-03-13  Corinna Vinschen  <corinna@vinschen.de>
1056
1057         * autoload.cc (LoadDLLfuncNt): New define to wrap NT native functions.
1058         Use for NT native functions throughout.
1059         * dtable.cc (handle_to_fn): Treat return value of NtQueryObject as
1060         NTSTATUS value.
1061
1062 2006-03-12  Christopher Faylor  <cgf@timesys.com>
1063
1064         * cygtls.cc (_cygtls::remove): Reset initialized flag right away if we
1065         were previously initialized.
1066         * cygtls.h (_cygtls::initialized): Move nearer to the end to catch
1067         situation when Windows 98 mysteriously changes parts of _my_tls when
1068         thread is detaching.
1069         * gendef (__sigfe_maybe): Simplify slightly.
1070         * tlsoffsets.h: Regenerate.
1071
1072 2006-03-12  Christopher Faylor  <cgf@timesys.com>
1073
1074         * cygtls.h (CYGTLS_INITIALIZED): Change to a little more unlikely value.
1075         (CYGTLSMAGIC): Delete.
1076         * dcrt0.cc (dll_crt0_0): Call sigproc_init during init startup.
1077         (_dll_crt0): Don't worry about sync_startup.  Just wait for sigthread here.
1078         * dll_init.cc (cygwin_detach_dll): Only pick up tls version of retaddr
1079         if we have a valid tls.
1080         * fork.cc (frok::child): Remove sigproc_init initialization since it
1081         happens much earlier now.
1082         * gendef: Recognize SIGFE_MAYBE.
1083         (fefunc): Generate calls to _sigfe_maybe, if appropriate.
1084         (_sigfe_maybe): New function.
1085         * init.cc (search_for): Always initialize search_for, even on fork.
1086         (calibration_thread): Delete.
1087         (calibration_id): Delete.
1088         (prime_threads): Delete.
1089         (munge_threadfunc): Remove calibration_thread special case.  Avoid
1090         calling thread function if we haven't yet hit the "search_for" thread.
1091         (dll_entry): Remove prime_threads call.  Only call munge_threadfunc
1092         when hwait_sig is active.  Ditto. for _my_tls.remove ();
1093         * sigproc.cc (hwait_sig): Make global.
1094         (sigproc_init): Don't bother with sync_startup.
1095         (sig_send): Treat flush as a no-op when signals are held.
1096         (wait_sig): Cause signals to be held after fork.
1097
1098 2006-03-09  Corinna Vinschen  <corinna@vinschen.de>
1099
1100         * syscalls.cc (rename): Move existance check for oldpath further up
1101         to the start of the function.  Avoid another case of a name collision
1102         if oldpath is a shortcut and a file or directory newpath already exists.
1103
1104 2006-03-09  Corinna Vinschen  <corinna@vinschen.de>
1105
1106         * autoload.cc (NtClose): Define.
1107         (NtOpenDirectoryObject): Define.
1108         (NtQueryDirectoryObject): Define.
1109         * fhandler_proc.cc: Include ctype.h and wchar.h.
1110         (format_proc_partitions): Revamp loop over existing harddisks by
1111         scanning the NT native \Device object directory and looking for
1112         Harddisk entries.
1113         * ntdll.h: Rearrange system call declarations alphabetically.
1114         (DIRECTORY_QUERY): Define.
1115         (struct _DIRECTORY_BASIC_INFORMATION): Define.
1116         (NtOpenDirectoryObject): Declare.
1117         (NtQueryDirectoryObject): Declare.
1118
1119 2006-03-08  Christopher Faylor  <cgf@timesys.com>
1120
1121         * cygtls.h (_cygtls::retaddr): New method.
1122         * dll_init.cc (cygwin_detach_dll): Use new tls method to find return
1123         address since this function is now signal guarded.
1124         (update_envptrs): Remove unneeded braces.
1125         * syscalls.cc (statvfs): Coerce full_path to avoid a gcc warning.
1126
1127 2006-03-08  Corinna Vinschen  <corinna@vinschen.de>
1128
1129         * syscalls.cc (statvfs): Simplify path name expression.
1130
1131 2006-03-08  Corinna Vinschen  <corinna@vinschen.de>
1132
1133         * syscalls.cc: Include winioctl.h.
1134         (statvfs): Request correct volume size using DeviceIoControl if
1135         quotas are enforced on the file system.
1136
1137 2006-03-03  Corinna Vinschen  <corinna@vinschen.de>
1138
1139         * dir.cc (opendir): Fix indentation.
1140         * fhandler_disk_file.cc (fhandler_disk_file::opendir): Move storing
1141         fhandler in file descriptor table to some point very late in function
1142         to avoid double free'ing.  Add comment to explain what happens.
1143         Add label free_mounts and don't forget to delete __DIR_mounts structure
1144         if NtOpenFile fails.
1145
1146 2006-03-02  Corinna Vinschen  <corinna@vinschen.de>
1147
1148         * syscalls.cc (chroot): Disallow chroot into special directories.
1149         Return EPERM instead.
1150
1151 2006-03-02  Corinna Vinschen  <corinna@vinschen.de>
1152
1153         * fhandler_disk_file.cc (__DIR_mounts::check_missing_mount): Check
1154         cygdrive string length for those who have cygdrive mapped to "/".
1155
1156 2006-03-01  Corinna Vinschen  <corinna@vinschen.de>
1157
1158         * sec_helper.cc (set_cygwin_privileges): Request SE_BACKUP_NAME
1159         privileges.
1160
1161 2006-03-01  Corinna Vinschen  <corinna@vinschen.de>
1162
1163         * fhandler_proc.cc (fhandler_proc::fstat): Always return fixed link
1164         count of 1 for /proc directory instead of incorrect PROC_LINK_COUNT.
1165
1166 2006-03-01  Corinna Vinschen  <corinna@vinschen.de>
1167
1168         * fhandler.h (enum dirent_states): Remove dirent_saw_cygdrive,
1169         dirent_saw_dev and dirent_saw_proc.
1170         (fhandler_cygdrive::open): Declare.
1171         (fhandler_cygdrive::close): Declare.
1172         * fhandler_disk_file.cc (class __DIR_mounts): Move to beginning of file.
1173         (__DIR_mounts::check_mount): New parameter to indicate if inode number
1174         is needed in calling function or not. Add /proc and /cygdrive handling.
1175         (__DIR_mounts::check_missing_mount): Ditto.
1176         (path_conv::ndisk_links): Use __DIR_mounts class to create correct
1177         hardlink count for directories with mount points in them.
1178         (fhandler_disk_file::readdir_helper): Remove /dev, /proc and /cygdrive
1179         handling.
1180         (fhandler_cygdrive::open): New method.
1181         (fhandler_cygdrive::close): New method.
1182         (fhandler_cygdrive::fstat): Always return fixed inode number 2 and
1183         fixed link count of 1. Drop call to set_drives.
1184         (fhandler_cygdrive::opendir): Drop call to get_namehash.
1185         (fhandler_cygdrive::readdir): Handle "." entry to return fixed inode
1186         number 2.
1187
1188 2006-03-01  Christopher Faylor  <cgf@timesys.com>
1189
1190         * cygwin.din: Fix some erroneous SIGFE/NOSIGFE settings.
1191
1192 2006-03-01  Christopher Faylor  <cgf@timesys.com>
1193
1194         * cygthread.cc (cygthread::callfunc): Revert below change.  Make ev a
1195         manual reset event again.  so that it will be reset by WaitFor*Object
1196         as appropriate.
1197         (cygthread::stub): Ditto.
1198         (cygthread::terminate_thread): Reset ev if it was found to have been
1199         set.
1200
1201 2006-03-01  Christopher Faylor  <cgf@timesys.com>
1202
1203         * analyze_sigfe: New script.
1204         * dllfixdbg: Add copyright.
1205         * gendef: Ditto.
1206         * gendevices: Ditto.
1207         * gentls_offsets: Ditto.
1208
1209 2006-03-01  Christopher Faylor  <cgf@timesys.com>
1210
1211         * cygthread.cc (cygthread::callfunc): Create ev as an auto-reset event
1212         so that it will be reset by WaitFor*Object as appropriate.
1213         (cygthread::stub): Ditto.
1214         (cygthread::terminate_thread): Remove forced setting of thread
1215         termination.
1216
1217 2006-03-01  Corinna Vinschen  <corinna@vinschen.de>
1218
1219         * include/sys/dirent.h (struct __DIR): Rename __d_unused to
1220         __d_internal.
1221         * fhandler_disk_file.cc (struct __DIR_cache): Remove useless "typedef".
1222         (d_dirname): Remove useless "struct".
1223         (d_cachepos): Ditto.
1224         (d_cache): Ditto.
1225         (class __DIR_mounts): New class, implementing mount point tracking
1226         for readdir.
1227         (d_mounts): New macro for easy access to __DIR_mounts structure.
1228         (fhandler_disk_file::opendir): Allocate __DIR_mounts structure and
1229         let __d_internal element of dir point to it.
1230         (fhandler_disk_file::readdir_helper): Add mount points in the current
1231         directory, which don't have a real directory backing them.
1232         Don't generate an inode number for /dev.  Add comment, why.
1233         (fhandler_disk_file::readdir): Move filling fname to an earlier point.
1234         Check if current entry is a mount point and evaluate correct inode
1235         number for it.
1236         (fhandler_disk_file::readdir_9x): Ditto.
1237         (fhandler_disk_file::rewinddir): Set all mount points in this directory
1238         to "not found" so that they are listed again after calling rewinddir().
1239         (fhandler_disk_file::closedir): Deallocate __DIR_mounts structure.
1240         * path.cc (mount_info::get_mounts_here): New method to evaluate a list
1241         of mount points in a given parent directory.
1242         * shared_info.h (class mount_info): Declare get_mounts_here.
1243
1244 2006-02-28  Corinna Vinschen  <corinna@vinschen.de>
1245
1246         * fhandler_disk_file.cc (fhandler_disk_file::opendir): Use iscygdrive
1247         instead of isspecial.
1248         * path.h (path_conv::iscygdrive): New method.
1249
1250 2006-02-28  Christopher Faylor  <cgf@timesys.com>
1251
1252         * exceptions.cc (_cygtls::interrupt_now): Remove "inside cygwin" check
1253         since some cygwin functions are meant to be interrupted.
1254
1255 2006-02-28  Corinna Vinschen  <corinna@vinschen.de>
1256
1257         * cygwin.din: Export __isinff, __isinfd, __isnanf, __isnand.
1258         * include/cygwin/version.h: Bump API minor number to 155.
1259
1260 2006-02-28  Corinna Vinschen  <corinna@vinschen.de>
1261
1262         * dir.cc (readdir_worker): Use slash as path separator when evaluating
1263         namehash for paths below /proc.
1264         * fhandler_netdrive.cc (fhandler_netdrive::readdir): Use expensive
1265         inode number evaluation on share names.
1266
1267 2006-02-27  Christopher Faylor  <cgf@timesys.com>
1268
1269         * fhandler_disk_file.cc (fhandler_disk_file::opendir): Only set
1270         d_cachepos under NT or suffer memory corruption.
1271         (fhandler_disk_file::readdir_helper): Avoid else with a return.  Just
1272         calculate extension location once when doing symlink checks.
1273         (fhandler_disk_file::readdir): Make debug output more useful.
1274         (fhandler_disk_file::readdir_9x): Ditto.  Eliminate redundant variable.
1275
1276 2006-02-27  Christopher Faylor  <cgf@timesys.com>
1277
1278         * include/sys/termios.h (cfsetispeed): Just define as a function rather
1279         than resorting to a macro.
1280         (cfsetospeed): Ditto.
1281
1282 2006-02-27  Christopher Faylor  <cgf@timesys.com>
1283
1284         * sigproc.cc: Fix a comment.
1285
1286 2006-02-27  Christopher Faylor  <cgf@timesys.com>
1287
1288         * cygthread.cc (cygthread::release): Add a comment.
1289
1290 2006-02-27  Corinna Vinschen  <corinna@vinschen.de>
1291
1292         * fhandler_netdrive.cc (fhandler_netdrive::fstat): Create unambiguous
1293         inode number.
1294         (fhandler_netdrive::readdir): Ditto.
1295
1296 2006-02-24  Christopher Faylor  <cgf@timesys.com>
1297
1298         * sigproc.cc (sigheld): Define new variable.
1299         (sig_dispatch_pending): Don't check sigq since that's racy.
1300         (sig_send): Set sigheld flag if __SIGHOLD is specified, reset it if
1301         __SIGNOHOLD is specified.  Ignore flush signals if we're holding
1302         signals.
1303
1304 2006-02-23  Christopher Faylor  <cgf@timesys.com>
1305
1306         * cygwin.din (_exit): Use signal front end.
1307         (exit): Ditto.
1308
1309 2006-02-23  Christopher Faylor  <cgf@timesys.com>
1310
1311         * winsup.h (cygwin_hmodule): Declare.
1312         * exceptions.cc (inside_kernel): Reverse return values to reflect
1313         function name.  Return true if we're in cygwin1.dll or if we're
1314         executing in dll_entry.
1315         (_cygtls::interrupt_now): Reflect reversal of inside_kernel return
1316         value.
1317         * hookapi.cc (cygwin_hmodule): Remove declaration.
1318         * init.cc (dll_entry): Use in_dllentry global to record that we are
1319         executing in dllentry.
1320
1321 2006-02-22  Corinna Vinschen  <corinna@vinschen.de>
1322
1323         * exceptions.cc (_cygtls::interrupt_now): Reorder conditional
1324         to call inside_kernel only if this isn't locked.
1325
1326 2006-02-22  Corinna Vinschen  <corinna@vinschen.de>
1327
1328         * fhandler.cc (fhandler_base::open): Add FILE_READ_ATTRIBUTES to
1329         access flags in case of query_read_control case, add FILE_READ_DATA
1330         in case of query_stat_control.
1331
1332 2006-02-20  Christopher Faylor  <cgf@timesys.com>
1333
1334         * spawn.cc (av::fixup): Check for .bat and friends specifically now
1335         since these extensions are no longer automatically detected.
1336
1337 2006-02-19  Christopher Faylor  <cgf@timesys.com>
1338
1339         * exceptions.cc (stackdump): Avoid dumping more than once.
1340
1341 2006-02-19  Christopher Faylor  <cgf@timesys.com>
1342
1343         * fhandler_disk_file.cc (fhandler_disk_file::opendir): Use NtOpenFile
1344         to open the directory.
1345         (fhandler_disk_file::readdir): Use NT_SUCCESS to determine if status
1346         represents success.
1347
1348 2006-02-19  Corinna Vinschen  <corinna@vinschen.de>
1349
1350         * fhandler_disk_file.cc (fhandler_disk_file::opendir): Drop generating
1351         path_conv for root.
1352
1353 2006-02-18  Corinna Vinschen  <corinna@vinschen.de>
1354
1355         * fhandler_disk_file.cc (FS_IS_SAMBA): Move out of
1356         path_conv::hasgood_inode.
1357         (path_conv::is_samba): New method.
1358         (fhandler_base::fstat_by_handle): Don't even try to use
1359         FileIdBothDirectoryInformation on Samba.
1360         * path.h (class path_conv): Declare is_samba method.
1361
1362 2006-02-17  Christopher Faylor  <cgf@timesys.com>
1363
1364         * path.cc (conv_path_list): Eat empty paths when converting to POSIX.
1365         (cygwin_conv_to_win32_path): Deal with Cygwin's necessity of adding a
1366         '/' to the end of a path ending in '.'.
1367
1368 2006-02-16  Corinna Vinschen  <corinna@vinschen.de>
1369
1370         * cygwin.din: Export sigignore and sigset.
1371         * exceptions.cc (sigset): New function.
1372         (sigignore): New function.
1373         * include/cygwin/signal.h (SIG_HOLD): Define.
1374         (sigignore): Declare.
1375         (sigset): Declare.
1376         * include/cygwin/version.h: Bump API minor number to 154.
1377
1378 2006-02-13  Igor Peshansky  <pechtcha@cs.nyu.edu>
1379
1380         * include/mntent.h: Add missing #include.
1381
1382 2006-02-13  Igor Peshansky  <pechtcha@cs.nyu.edu>
1383
1384         * gentls_offsets: Fix typo in error message.
1385
1386 2006-02-10  Christopher Faylor  <cgf@timesys.com>
1387
1388         * fhandler_process.cc (format_process_stat): Use cygwin-derived start
1389         time even on NT since it is the logical start time of the "process".
1390         * pinfo.cc (set_myself): Don't set start time when it should have
1391         already been set previously.
1392
1393 2006-02-10  Brian Ford  <Brian.Ford@FlightSafety.com>
1394
1395         * times.cc (clock_getres): Use correct conversion from milliseconds to
1396         seconds/nanoseconds.
1397         (clock_setres): Use correct conversion to nanoseconds.
1398
1399 2006-02-10  Christopher Faylor  <cgf@timesys.com>
1400
1401         * external.cc (sync_winenv): Rename from "setup_winenv".  Use same
1402         mechanism as spawn to determine environment variables which should be
1403         converted back to windows form.
1404         (cygwin_internal): Reflect setup_winenv -> sync_winenv name change.
1405         * include/sys/cygwin.h: Ditto.
1406
1407 2006-02-09  Corinna Vinschen  <corinna@vinschen.de>
1408
1409         * fhandler_disk_file.cc (fhandler_disk_file::opendir): Only set
1410         the dirent_get_d_ino flag on filesystems having useful File IDs.
1411         Add comment explaining why.
1412
1413 2006-02-07  Corinna Vinschen  <corinna@vinschen.de>
1414
1415         * dtable.cc (handle_to_fn): Accommodate new argument order in call to
1416         sys_wcstombs.
1417         * fhandler_disk_file.cc (fhandler_disk_file::readdir): Call sys_wcstombs
1418         instead of just wcstombs to accommodate OEM codepages.
1419         * miscfuncs.cc (sys_wcstombs): Split len argument in source and target
1420         length.  Always 0-terminate result in target string.
1421         * security.cc (lsa2wchar): Remove unused function.
1422         (lsa2str): Ditto.
1423         (get_lsa_srv_inf): Ditto.
1424         (get_logon_server): Accommodate new argument order in call to
1425         sys_wcstombs.
1426         (get_user_groups): Ditto.
1427         (get_user_local_groups): Ditto.
1428         (get_priv_list): Call sys_wcstombs directly instead of lsa2str.
1429         * uinfo.cc (cygheap_user::ontherange): Accommodate new argument order
1430         in call to sys_wcstombs.
1431         * winsup.h (sys_wcstombs): Change prototype to match new argument order.
1432
1433 2006-02-07  Corinna Vinschen  <corinna@vinschen.de>
1434
1435         * init.cc (respawn_wow64_process): Exit with the exit code returned
1436         by the respawned process.
1437
1438 2006-02-06  Christopher Faylor  <cgf@timesys.com>
1439
1440         Always zero all elements of siginfo_t throughout.
1441         * cygtls.h (_cygtls::thread_context): Declare new field.
1442         (_cygtls::thread_id): Ditto.
1443         (_cygtls::signal_exit): Move into this class.
1444         (_cygtls::copy_context): Declare new function.
1445         (_cygtls::signal_debugger): Ditto.
1446         * cygtls.cc (_cygtls::init_thread): Fill out thread id field.
1447         * exceptions.cc (exception): Change message when exception info is
1448         unknown.  Copy context to thread local storage.
1449         (_cygtls::handle_exceptions): Avoid double test for fault_guarded.
1450         Reflect move of signal_exit to _cygtls class.
1451         (sigpacket::process): Copy context to thread local storage.
1452         (_cygtls::signal_exit): Move to _cygtls class.  Call signal_debugger to
1453         notify debugger of exiting signal (WIP).  Call stackdump here (WIP).
1454         (_cygtls::copy_context): Define new function.
1455         (_cygtls::signal_debugger): Ditto.
1456         * tlsoffsets.h: Regenerate.
1457         * include/cygwin.h (_fpstate): New internal structure.
1458         (ucontext): Declare new structure (WIP).
1459         (__COPY_CONTEXT_SIZE): New define.
1460
1461         * exceptions.cc (_cygtls::interrupt_setup): Clear "threadkill" field
1462         when there is no sigwaiting thread.
1463         (setup_handler): Move event handling into interrupt_setup.
1464
1465 2006-02-06  Corinna Vinschen  <corinna@vinschen.de>
1466
1467         * fhandler_socket.cc (fhandler_socket::connect): Fix formatting.
1468         (fhandler_socket::wait): Handle SA_RESTART when signal arrives.
1469
1470 2006-02-06  Corinna Vinschen  <corinna@vinschen.de>
1471
1472         * include/cygwin/socket.h (CMSG_FIRSTHDR): Avoid compiler warning.
1473
1474 2006-02-05  Corinna Vinschen  <corinna@vinschen.de>
1475
1476         * include/features.h: Add comment to explain what's going to happen
1477         here at one point.
1478         * include/sys/stdio.h: Guard getline and getdelim prototypes with
1479         _GNU_SOURCE to avoid collision with old-style declarations.
1480
1481 2006-02-05  Corinna Vinschen  <corinna@vinschen.de>
1482
1483         * environ.cc (struct parse_thing): Add transparent_exe option.
1484         * fhandler_disk_file.cc (fhandler_disk_file::link): Accommodate
1485         transparent_exe option.  Add .exe suffix for links to executable files,
1486         if transparent_exe is set.
1487         * fhandler_process.cc (fhandler_process::fill_filebuf): Remove .exe
1488         suffix if transparent_exe option is set.
1489         * path.cc (symlink_worker): Accommodate transparent_exe option.
1490         (realpath): Don't tack on .exe suffix if transparent_exe is set.
1491         * syscalls.cc (transparent_exe): New global variable.
1492         (unlink): Accommodate transparent_exe option.
1493         (open): Ditto.
1494         (link): Ditto.
1495         (rename): Ditto. Maybe add .exe suffix when renaming executable files.
1496         (pathconf): Accommodate transparent_exe option.
1497         * winsup.h: Declare transparent_exe.
1498
1499 2006-02-05  Christopher Faylor  <cgf@timesys.com>
1500             Corinna Vinschen  <corinna@vinschen.de>
1501
1502         * fhandler_disk_file.cc (fhandler_disk_file::readdir_9x): Remove
1503         useless code.
1504
1505 2006-02-05  Corinna Vinschen  <corinna@vinschen.de>
1506
1507         * fhandler_disk_file.cc (fhandler_disk_file::rewinddir): Remove label
1508         "out".  Move test for NULL __handle ...
1509         (fhandler_disk_file::rewinddir_9x): ... here.
1510
1511 2006-02-05  Corinna Vinschen  <corinna@vinschen.de>
1512
1513         * dir.cc (rewinddir): Keep dirent_get_d_ino and dirent_set_d_ino flags.
1514
1515 2006-02-05  Christopher Faylor  <cgf@timesys.com>
1516
1517         * fhandler_disk_file.cc (fhandler_disk_file::readdir): Don't close dir
1518         handle when we hit EOF since rewwindir may reactivate it.
1519         (fhandler_disk_file::readdir_9x): Eliminate superfluous temporary
1520         variable.
1521         (fhandler_disk_file::closedir): Return EBADF when trying to close
1522         unopened DIR.  Reorganize slightly.  Return actual derived error value
1523         rather than always returning 0.
1524
1525 2006-02-04  Christopher Faylor  <cgf@timesys.com>
1526
1527         * dir.cc (rmdir): Reorganize check for trailing dot to return correct
1528         error when directory does not exist.
1529
1530 2006-02-03  Christopher Faylor  <cgf@timesys.com>
1531
1532         * dir.cc (mkdir): Reorganize check for trailing dot to return correct
1533         error when directory exists.
1534         * fhandler_disk_file.cc (fhandler_disk_file::mkdir): Remove special
1535         test for path ending in '.'.
1536
1537 2006-02-03  Corinna Vinschen  <corinna@vinschen.de>
1538
1539         * path.cc (suffix_scan::lnk_match): Return true beginning with
1540         SCAN_APPENDLNK.
1541         (suffix_scan::next): Rearrange code to make .lnk append order slightly
1542         more deterministic.
1543         * spawn.cc (exe_suffixes): Try no suffix before .exe suffix to align
1544         evaluation with stat_suffixes.
1545         (dll_suffixes): Ditto.
1546
1547 2006-02-02  Christopher Faylor  <cgf@timesys.com>
1548
1549         * cygwin/version.h: Mention CW_SETUP_WINENV in comment for API minor
1550         153.
1551
1552 2006-02-02  Corinna Vinschen  <corinna@vinschen.de>
1553
1554         * cygwin.din (updwtmpx): Export.
1555         * syscalls.cc (updwtmpx): New function.
1556         * include/utmpx.h (updwtmpx): Declare.
1557         * include/cygwin/version.h: Bump API minor number to 153.
1558
1559 2006-02-02  Christopher Faylor  <cgf@timesys.com>
1560
1561         * external.cc (setup_winenv): New function.
1562         (cygwin_internal): Implement CW_SETUP_WINENV.
1563         * sys/cygwin.h (cygwin_getinfo_types): Define CW_SETUP_WINENV.
1564
1565 2006-02-02  Corinna Vinschen  <corinna@vinschen.de>
1566
1567         * security.cc (is_group_member): Fix comment.
1568
1569 2006-02-02  Corinna Vinschen  <corinna@vinschen.de>
1570
1571         * security.cc (is_group_member): Use local group info type 1.  Test
1572         group for being a global group or a well-known SID before adding it
1573         to the group list.  Add comment.
1574
1575 2006-02-01  Corinna Vinschen  <corinna@vinschen.de>
1576
1577         * autoload.cc  (GetTcpTable): Define.
1578         * fhandler_socket.cc (address_in_use): New function to check if
1579         sockaddr_in address is already in use.
1580         (fhandler_socket::bind): Check if address is alreay in use in case of
1581         SO_REUSEADDR, to circumvent WinSock non-standard behaviour.
1582
1583 2006-02-01  Corinna Vinschen  <corinna@vinschen.de>
1584
1585         * spawn.cc (dll_suffixes): Add .exe and "no suffix" to the list.
1586
1587 2006-01-31  Corinna Vinschen  <corinna@vinschen.de>
1588
1589         * dlfcn.cc (check_path_access): Call find_exec with FE_DLL option.
1590         * path.h (enum fe_types): Add FE_DLL value.
1591         * spawn.cc (std_suffixes): Remove.
1592         (exe_suffixes): New suffix_info for executing files.
1593         (dll_suffixes): New suffix_info for searching shared libraries.
1594         (perhaps_suffix): Add opt argument.  Use dll_suffixes if FE_DLL
1595         option is given, exe_suffixes otherwise.
1596         (find_exec): Propagate opt argument to perhaps_suffix.  Drop suffix
1597         check when testing execute permission.
1598         (spawn_guts): Call perhaps_suffix with FE_NADA opt argument.
1599
1600 2006-01-31  Christopher Faylor  <cgf@timesys.com>
1601
1602         * spawn.cc (av::fixup): Remove unused argument.
1603         (spawn_guts): Remove capitalization in debugging.
1604
1605 2006-01-31  Corinna Vinschen  <corinna@vinschen.de>
1606
1607         * spawn.cc (find_exec): Only return files with execute permission set
1608         if ntsec is on.  Don't check execute permission of Windows batch files.
1609         (av::fixup): Handle empty files gracefully.  Drop execute permission
1610         test here.
1611         * path.cc (suffix_scan::next): Don't skip any suffix on first run.
1612
1613 2006-01-31  Corinna Vinschen  <corinna@vinschen.de>
1614
1615         * path.cc (cwdstuff::set): Don't set win32 error, only POSIX errno.
1616
1617 2006-01-31  Corinna Vinschen  <corinna@vinschen.de>
1618
1619         * path.cc (cwdstuff::set): When SetCurrentDirectory returns
1620         ERROR_INVALID_FUNCTION, bend it over to ERROR_FILE_NOT_FOUND.  Add
1621         comment to explain why.
1622
1623 2006-01-31  Corinna Vinschen  <corinna@vinschen.de>
1624
1625         * dir.cc (readdir_worker): Add comment about writing old 32 bit d_ino.
1626         * include/cygwin/version.h: Bump API minor number to 152.
1627         (CYGWIN_VERSION_CHECK_FOR_NEEDS_D_INO): Remove.
1628
1629 2006-01-30  Corinna Vinschen  <corinna@vinschen.de>
1630
1631         * fhandler_disk_file.cc (fhandler_disk_file::rewinddir): Simplify
1632         conditional.
1633
1634 2006-01-30  Corinna Vinschen  <corinna@vinschen.de>
1635
1636         * fhandler_disk_file.cc (d_cachepos): Rename from d_pos to distinct
1637         clearly from __d_position.  Change throughout.
1638         (fhandler_disk_file::rewinddir): Reset readdir cache on NT.
1639
1640 2006-01-29  Corinna Vinschen  <corinna@vinschen.de>
1641
1642         * fhandler_disk_file.cc (readdir_get_ino): Don't follow symlinks.
1643
1644 2006-01-29  Corinna Vinschen  <corinna@vinschen.de>
1645
1646         * fhandler.h (class fhandler_socket): Add saw_reuseaddr status flag.
1647         * fhandler_socket.cc (fhandler_socket::bind): Set socket to
1648         SO_EXCLUSIVEADDRUSE if application didn't explicitely set SO_REUSEADDR
1649         socket option, on systems supporting SO_EXCLUSIVEADDRUSE.
1650         * net.cc (cygwin_setsockopt): Set fhandler's saw_reuseaddr status flag
1651         if SO_REUSEADDR socket option has been successsfully set.
1652         * wincap.h (wincaps::has_exclusiveaddruse): New element.
1653         * wincap.cc: Implement above element throughout.
1654
1655 2006-01-28  Corinna Vinschen  <corinna@vinschen.de>
1656
1657         * fhandler_disk_file.cc (fhandler_disk_file::mkdir): In case or error,
1658         check for existance explicitely and set errno to EEXIST.
1659
1660 2006-01-28  Corinna Vinschen  <corinna@vinschen.de>
1661
1662         * fhandler_disk_file.cc (DIR_NUM_ENTRIES): New define determining
1663         minimum number of dir entries which fit into the readdir cache.
1664         (DIR_BUF_SIZE): Define globally as size of readdir cache.
1665         (struct __DIR_cache): New structure used for readdir caching on NT.
1666         (d_dirname): Accessor for struct __DIR_cache, use throughout.
1667         (d_pos): Ditto.
1668         (d_cache): Ditto.
1669         (fhandler_disk_file::opendir): Allocate __d_dirname to contain readdir
1670         cache on NT.
1671         (fhandler_disk_file::readdir): Use buf as pointer into readdir cache.
1672         Implement readdir caching.
1673
1674 2006-01-28  Corinna Vinschen  <corinna@vinschen.de>
1675
1676         * include/sys/dirent.h (struct dirent): Revert misguided attempt to
1677         rename __d_unused1 to __d_fd.
1678
1679 2006-01-27  Corinna Vinschen  <corinna@vinschen.de>
1680
1681         * autoload.cc (NtQueryDirectoryFile): Define.
1682         * dir.cc (__opendir_with_d_ino): Just call opendir.
1683         (opendir): Remove CYGWIN_VERSION_CHECK_FOR_NEEDS_D_INO handling.
1684         (readdir_worker): Only try generating d_ino if it's 0.
1685         Utilize namehash of directories fhandler.  Call readdir_get_ino to
1686         generate d_ino for "..".
1687         (seekdir64): Keep dirent_set_d_ino flag.
1688         * fhandler.h (enum dirent_states): Add dirent_get_d_ino.
1689         (class fhandler_disk_file): Declare new private methods readdir_helper
1690         and readdir_9x.
1691         * fhandler_disk_file.cc (path_conv::hasgood_inode): New method to
1692         evaluate if a filesystem has reliable inode numbers.
1693         (fhandler_base::fstat_by_handle): Accommodate structure member name
1694         change from IndexNumber to FileId.
1695         (fhandler_base::fstat_helper): Call hasgood_inode here.
1696         (fhandler_disk_file::opendir): Call fhaccess only for real files.
1697         Don't append '*' to __d_dirname here, move to readdir_9x.  On NT,
1698         open directory handle here.  Set dirent_get_d_ino and dirent_set_d_ino
1699         flags according to wincap and filesystem.
1700         (fhandler_disk_file::readdir_helper): New method to implement readdir
1701         postprocessing only once.
1702         (readdir_get_ino_by_handle): New static function.
1703         (readdir_get_ino): New function to centralize inode number evaluation
1704         in case inode number hasn't been returned by NtQueryDirectoryFile.
1705         (fhandler_disk_file::readdir): Move old functionality to readdir_9x.
1706         Call readdir_9x when on 9x/Me.  Implement NT specific readdir here.
1707         (fhandler_disk_file::readdir_9x): Move 9x specific readdir here.
1708         (fhandler_disk_file::seekdir): Accommodate new NT readdir method.
1709         (fhandler_disk_file::closedir): Ditto.
1710         (fhandler_cygdrive::fstat): Set d_ino to namehash. Add comment.
1711         (fhandler_cygdrive::opendir): Call get_namehash to prepare later
1712         correct evaluation of d_ino.
1713         (fhandler_cygdrive::readdir): Replace recursion with loop. Evaluate
1714         drive's d_ino by calling readdir_get_ino.
1715         * fhandler_proc.cc (fhandler_proc::readdir): Set dirent_saw_dot and
1716         dirent_saw_dot_dot to avoid seeing . and .. entries twice.
1717         * fhandler_process.cc (fhandler_process::readdir): Ditto.
1718         * fhandler_registry.cc (fhandler_registry::readdir): Ditto.
1719         * ntdll.h (STATUS_INVALID_PARAMETER): New define.
1720         (STATUS_INVALID_LEVEL): New define.
1721         (struct _FILE_INTERNAL_INFORMATION): Rename member IndexNumber to
1722         FileId (as in Nebbitt).
1723         * path.h (path_conv::hasgood_inode): Now implemented in
1724         fhandler_disk_file.cc.
1725         * wincap.h (wincaps::has_fileid_dirinfo): New element.
1726         * wincap.cc: Implement above element throughout.
1727         * winsup.h (readdir_get_ino): Add declaration.
1728         * include/sys/dirent.h (struct dirent): Slightly rename structure
1729         members to accommodate changes.
1730         Remove __USE_EXPENSIVE_CYGWIN_D_INO handling and declaration of
1731         __opendir_with_d_ino.
1732
1733 2006-01-27  Christopher Faylor  <cgf@timesys.com>
1734
1735         * spawn.cc (spawn_guts): Fix potential handle leak when failing exec.
1736
1737 2006-01-27  Christopher Faylor  <cgf@timesys.com>
1738
1739         * exceptions.cc (inside_kernel): Fix to return true if we can't get the
1740         name of the DLL for the given memory block since we are not in kernel
1741         code.
1742
1743 2006-01-26  Corinna Vinschen  <corinna@vinschen.de>
1744
1745         * fhandler.cc (fhandler_base::open): Fix bug in argument order to
1746         InitializeObjectAttributes call.
1747
1748 2006-01-25  Corinna Vinschen  <corinna@vinschen.de>
1749
1750         * fhandler_disk_file.cc (fhandler_disk_file::readdir): Fix test for
1751         dirent_isroot to use the correct boolean operator.
1752
1753 2006-01-25  Christopher Faylor  <cgf@timesys.com>
1754
1755         * ntdll.h: (temporarily?) Add more functions for querying directory.
1756
1757 2006-01-24  Christopher Faylor  <cgf@timesys.com>
1758
1759         * dir.cc (readdir_worker): Turn off expensive inode calculation.
1760
1761 2006-01-24  Corinna Vinschen  <corinna@vinschen.de>
1762
1763         * fhandler_process.cc (fhandler_process::fill_filebuf): Disable
1764         stripping the .exe suffix from the link target in PROCESS_EXE and
1765         PROCESS_EXENAME case.
1766         * path.cc (realpath): Tack on .exe suffix if necessary.
1767
1768 2006-01-24  Corinna Vinschen  <corinna@vinschen.de>
1769
1770         * fhandler_disk_file.cc (fhandler_base::fstat_helper): Try harder
1771         to determine remote file systems with reliable inode numbers.  Add
1772         longish comment.
1773
1774 2006-01-23  Corinna Vinschen  <corinna@vinschen.de>
1775
1776         * fhandler_socket.cc (fhandler_socket::fixup_after_fork): Reset
1777         inheritance for duplicated socket.
1778
1779 2006-01-20  Christopher Faylor  <cgf@timesys.com>
1780
1781         * include/cygwin/version.h: Bump API minor number to 151.
1782         * dir.cc (__opendir_with_d_ino): New function.
1783         (opendir): Set flag if we should be calculating inodes.
1784         (readdir_worker): Calculate d_ino by calling stat if the user has asked
1785         for it.
1786         (seekdir64): Maintain all persistent flag settings.
1787         * fhandler.h (dirent_states): Add dirent_set_d_ino.
1788         * fhandler_disk_file.cc (fhandler_disk_file::opendir): Reflect changes
1789         to dirent structure.
1790         * fhandler_virtual.cc (fhandler_virtual::opendir): Ditto.
1791         * include/sys/dirent.h (struct dirent): Coalesce two similar
1792         structures.  Remove all shreds of the apparently highly confusing
1793         references to inodes.  Add support for calculating a real inode if
1794         __USE_EXPENSIVE_CYGWIN_D_INO is defined.
1795
1796 2006-01-20  Christopher Faylor  <cgf@timesys.com>
1797
1798         * include/sys/dirent.h: Add comments for people who are REALLY confused
1799         about whether they should be using something called __invalid_d_ino or
1800         not.
1801
1802 2006-01-20  Corinna Vinschen  <corinna@vinschen.de>
1803
1804         * fhandler_socket.cc (fhandler_socket::prepare): Fix debug output.
1805         (fhandler_socket::release): Add debug output for WSAEventSelect failure.
1806         (fhandler_socket::ioctl): Always cancel WSAEventSelect before switching
1807         to blocking mode.  Only set nonblocking flag if ioctlsocket call
1808         succeeded.  Only print new socket state if ioctlsocket call succeeded.
1809
1810 2006-01-19  Christopher Faylor  <cgf@timesys.com>
1811
1812         * fhandler_disk_file.cc (fhandler_disk_file::opendir): Check posix path
1813         for root rather than windows path.
1814
1815 2006-01-19  Christopher Faylor  <cgf@timesys.com>
1816
1817         * dir.cc (readdir_worker): Fill in invalid fields with -1.  Accommodate
1818         name change from __ino32 to __invalid_ino32.
1819         * include/sys/dirent.h (__invalid_ino32): Rename from __ino32.  Don't
1820         define unused d_type macros.
1821
1822 2006-01-18  Christopher Faylor  <cgf@timesys.com>
1823
1824         * heap.cc (heap_init): Remove Sleep.
1825
1826 2006-01-18  Corinna Vinschen  <corinna@vinschen.de>
1827
1828         * net.cc (rresvport): Remove extern declaration.
1829
1830 2006-01-18  Corinna Vinschen  <corinna@vinschen.de>
1831
1832         * autoload.cc (rresvport): Remove.
1833         * net.cc (last_used_rrecvport): New global shared variable.
1834         (cygwin_rresvport): Implement rresvport without using rresvport from
1835         wsock32.
1836
1837 2006-01-18  Corinna Vinschen  <corinna@vinschen.de>
1838
1839         * include/cygwin/socket.h (struct sockaddr_storage): Fix typo in
1840         ss_family member name.
1841
1842 2006-01-16  Christopher Faylor  <cgf@timesys.com>
1843
1844         * include/cygwin/version.h: Bump DLL minor version number to 20.
1845
1846 2006-01-13  Corinna Vinschen  <corinna@vinschen.de>
1847
1848         * uname.cc (uname): Concatenate a "-WOW64" to utsname's sysname
1849         member to see when running under WOW64.
1850
1851 2006-01-13  Corinna Vinschen  <corinna@vinschen.de>
1852
1853         * net.cc (cygwin_setsockopt): Ignore errors when setting IP_TOS on
1854         Windows 2000 and above. Clarify the comment about IP_TOS and move
1855         to the place where the magic happens.
1856         (get_ifconf): Remove unused code.
1857         * wincap.h (wincaps::has_disabled_user_tos_setting): New element.
1858         * wincap.cc: Implement above element throughout.
1859
1860 2006-01-12  Christopher Faylor  <cgf@timesys.com>
1861
1862         * fhandler_console.cc (set_console_state_for_spawn): Fix to recognize
1863         ttys >= 0.
1864
1865 2006-01-12  Christopher Faylor  <cgf@timesys.com>
1866
1867         * fhandler.h (set_console_state_for_spawn): Whackamole the argument
1868         back to a bool.
1869         * spawn.cc (spawn_guts): Ditto, i.e., once again call
1870         set_console_state_for_spawn with an indication of whether we're about
1871         to start a cygwin process.
1872         * fhandler_console.cc (set_console_state_for_spawn): Don't set the
1873         console state if we know we're starting a cygwin process or if we're
1874         using a "real" tty.
1875
1876 2006-01-10  Corinna Vinschen  <corinna@vinschen.de>
1877
1878         * dcrt0.cc (dll_crt0_0): Remove call to wincap.init.
1879         * init.cc (dll_entry): Rename is_wow64_proc to wow64_test_stack_marker.
1880         Call wincap.init here before doing anything else.  Use wincap.is_wow64
1881         to determine if we're running in a WOW64 emulator.
1882         * mmap.cc (MapViewNT): Don't use AT_ROUND_TO_PAGE in WOW64, it's
1883         apparently not supported.
1884         (mmap64): Don't create mappings beyond EOF, which would need to use
1885         AT_ROUND_TO_PAGE, on WOW64.
1886         * wincap.cc (wincap): Throw into the .cygwin_dll_common section.
1887         (wincapc::init): Determine if running in WOW64 and set wow_64 flag.
1888         * wincap.h (class wincapc): Add wow64 member.
1889         (wincapc::is_wow64): New method.
1890
1891 2006-01-10  Christopher Faylor  <cgf@timesys.com>
1892
1893         * fhandler_proc.cc (format_proc_cpuinfo): Avoid leading whitespace in
1894         model name.
1895
1896 2006-01-09  Christopher Faylor  <cgf@timesys.com>
1897
1898         * spawn.cc (spawn_guts): Reorganize slightly so that 16 bit check is
1899         done prior to check for command.com/cmd.com.  Don't bother setting
1900         CREATE_SUSPENDED flag for a MS-DOS process since it doesn't work
1901         anyway.  Avoid calling remember() when the child process has already
1902         exited.
1903         (av::fixup): Explicitly set cygexec flag to false on a 16 bit process.
1904
1905 2006-01-09  Corinna Vinschen  <corinna@vinschen.de>
1906
1907         * include/getopt.h (getopt_long_only): Declare.
1908
1909 2006-01-09  Eric Blake  <ebb9@byu.net>
1910
1911         * cygwin.din: Export getsubopt.
1912         * include/cygwin/version.h: Bump API minor version.
1913
1914 2006-01-08  Christopher Faylor  <cgf@timesys.com>
1915
1916         * fhandler_tty.cc (fhandler_tty_slave::dup): Don't assign a controlling
1917         terminal to a process when duped.  Linux doesn't do this, so we won't
1918         either.
1919
1920 2006-01-08  Christopher Faylor  <cgf@timesys.com>
1921
1922         * environ.cc (spenvs[]): windir -> WINDIR.
1923
1924 2006-01-07  Christopher Faylor  <cgf@timesys.com>
1925
1926         * fhandler_console.cc (fhandler_console::need_invisible): Remove
1927         duplicate test.
1928
1929 2006-01-07  Christopher Faylor  <cgf@timesys.com>
1930
1931         * fhandler.h (set_console_state_for_spawn): Eliminate argument from
1932         declaration.
1933         * fhandler.cc (set_console_state_for_spawn): Eliminate argument from
1934         definition.  Always check for invisible console.
1935         (fhandler_console::need_invisible): Don't do anything if the windows
1936         station is already not visible.
1937         * spawn.cc (spawn_guts): Accommodate change of argument to
1938         set_console_state_for_spawn.
1939
1940 2006-01-05  Christopher Faylor  <cgf@timesys.com>
1941
1942         * sigproc.cc (no_signals_available): Use existence of signal thread
1943         handle to figure out if we can actually send signals rather than
1944         relying on my_sendsig.
1945         (hwait_sig): Make static.
1946         (sigproc_init): Don't set my_sendsig to anything special.  Use new
1947         global static hwait_sig.
1948         (wait_sig): Set hwait_sig to NULL when we are exiting.
1949
1950 2006-01-05  Christopher Faylor  <cgf@timesys.com>
1951
1952         * include/getopt.h: Accommodate recent unfortunate newlib changes.
1953
1954 2006-01-05  Christopher Faylor  <cgf@timesys.com>
1955
1956         * cygtls.cc (_cygtls::remove): Don't output debugging info if this
1957         isn't a cygwin thread.
1958         * sigproc.cc (sigproc_init): Move clearing of sync_startup here to
1959         lessen the likelihood of trying to deal with non-cygwin threads in
1960         dll_entry.
1961
1962         * fhandler_console: Fix set_console_state_for_spawn comment.
1963
1964 2006-01-05  Igor Peshansky  <pechtcha@cs.nyu.edu>
1965
1966         * spawn.cc (spawn_guts): Invert the argument to
1967         set_console_state_for_spawn.
1968
1969 2006-01-04  Christopher Faylor  <cgf@timesys.com>
1970
1971         * fhandler_console.cc (fhandler_console::need_invisible): Only try to
1972         open "CygwinInvisible" windows station if opening of default station
1973         fails.  Use CloseWindowStation to close window station handle.
1974
1975 2006-01-04  Christopher Faylor  <cgf@timesys.com>
1976
1977         * fhandler_console.cc (fhandler_console::need_invisible): Open up the
1978         security of the newly created windows station.
1979
1980 2006-01-04  Eric Blake  <ebb9@byu.net>
1981
1982         * path.cc (dot_special_chars): Add ", <, >, and |.
1983
1984 2006-01-03  Christopher Faylor  <cgf@timesys.com>
1985
1986         * fhandler_console.cc (beep): Use MB_OK which is documented as using
1987         the default bell rather than -1 which seems to behave differently on
1988         different versions of Windows.
1989
1990 2006-01-03  Christopher Faylor  <cgf@timesys.com>
1991
1992         * fhandler_process.cc (fhandler_process::readdir): Add missing argument
1993         to syscall_printf.
1994
1995         * fhandler_console.cc (fhandler_console::need_invisible): Use made-up
1996         name for windows station rather than asking Windows to create one for
1997         us.
1998
1999         * spawn.cc (spawn_guts): Don't mess with console if we're detaching.
2000
2001 2006-01-03  Christopher Faylor  <cgf@timesys.com>
2002
2003         * dir.cc (readdir_worker): Minor code cleanup.
2004
2005         * fhandler_console.cc (beep): Use a more Windows-generic wav file if
2006         the beep is missing.  Use a more foolproof way to find out whether we
2007         should be recreating the missing key.
2008
2009         * registry.h (reg_key::_disposition): New field.
2010         (reg_key::created): New function.
2011         * registry.cc (reg_key::reg_key): Set _disposition to zero by default.
2012         (reg_key::build_key): Fill in _disposition field.
2013
2014 2006-01-03  Eric Blake  <ebb9@byu.net>
2015
2016         * dir.cc (readdir_worker): Ensure that saw_dot* flags are updated when
2017         not handling inodes.
2018
2019 2006-01-02  Christopher Faylor  <cgf@timesys.com>
2020
2021         * fhandler_console.cc (beep): New function.  Restores missing "Default
2022         Beep", if necessary.
2023         (fhandler_console::write_normal): Use beep().
2024
2025 2006-01-02  Christopher Faylor  <cgf@timesys.com>
2026
2027         * dcrt0.cc (_dll_crt0): Remove more leftover debugging stuff.
2028         (cygwin_dll_init): Remove unneeded initializations.  Call _dll_crt0
2029         rather than dll_crt0_1.
2030
2031 2006-01-02  Corinna Vinschen  <corinna@vinschen.de>
2032
2033         * syslog.cc: Include sys/un.h instead of sys/socket.h.
2034         (syslogd_inited): Convert to enum type noting the exact result of
2035         trying to connect to syslog daemon.  Use this way throughout.
2036         (connect_syslogd): New static function taking over the task to
2037         connect to syslog socket.  Use correct struct sockaddr_un instead of
2038         struct sockaddr.
2039         (try_connect_syslogd): Call connect_syslogd.  If write fails on
2040         connection oriented socket, try to reconnect to syslog socket and
2041         try to write again.
2042
2043 2006-01-01  Christopher Faylor  <cgf@timesys.com>
2044
2045         * pinfo.cc (pinfo::exit): Swap signal and normal exit value when not
2046         started from a cygwin process - just like the good-old-days of B20.
2047
2048 2006-01-01  Christopher Faylor  <cgf@timesys.com>
2049
2050         * strace.cc (strace::write_childpid):  Remove debugging output.
2051
2052 2006-01-01  Christopher Faylor  <cgf@timesys.com>
2053
2054         * cygtls.cc (_cygtls::remove): Remove left over debugging cruft which
2055         caused this function to always return prematurely.
2056
2057 2006-01-01  Christopher Faylor  <cgf@timesys.com>
2058
2059         * exceptions.cc (sigpacket::process): Pass actual reference to signal's
2060         sigaction structure to setup_handler.
2061
2062 2006-01-01  Christopher Faylor  <cgf@timesys.com>
2063
2064         * exceptions.cc (_cygtls::interrupt_setup): Implement SA_RESETHAND.
2065         * include/cygwin/signal.h: Define SA_ONESHOT and SA_NOMASK.
2066
2067         * dcrt0.cc (get_cygwin_startup_info): Remove commented out code.
2068
2069 2006-01-01  Corinna Vinschen  <corinna@vinschen.de>
2070
2071         * syslog.cc (vklog): Never log kernel messages using the vsyslog
2072         interface.