1 Tue Oct 31 18:12:56 2000 Christopher Faylor <cgf@cygnus.com>
3 * path.h (has_exec_chars): Standard function for checking for
4 executable magic numbers.
5 * path.cc (symlink_info::check): Use the above function.
6 * fhandler.cc (fhandler_disk_file::open): Ditto.
8 Tue Oct 31 17:57:52 2000 Christopher Faylor <cgf@cygnus.com>
10 * path.cc (_readlink): Return ENOENT when file does not exist.
12 Tue Oct 31 23:35:00 2000 Corinna Vinschen <corinna@vinschen.de>
14 * fhandler.h (fhandler_dev_raw): Add method `fixup_after_exec'.
16 Tue Oct 31 22:39:00 2000 Corinna Vinschen <corinna@vinschen.de>
18 * fhandler.h (fhandler_dev_raw): Add definition for method
20 * fhandler_raw.cc (fhandler_dev_raw::fhandler_dev_raw): Add
21 `set_need_fixup_after_fork' call.
22 (fhandler_dev_raw::~fhandler_dev_raw): Revert to user space
24 (fhandler_dev_raw::open): Ditto.
25 (fhandler_dev_raw::dup): Ditto. Reset buffer pointer.
26 (fhandler_dev_raw::fixup_after_fork): New function.
27 * fhandler_tape.cc (fhandler_dev_tape::open): Revert to user space
29 (fhandler_dev_tape::ioctl): Ditto. Change behaviour on MTSETBLK when
32 Tue Oct 31 20:56:00 2000 Corinna Vinschen <corinna@vinschen.de>
34 * fhandler_tape.cc (fhandler_dev_tape::open): Fix memory allocation.
35 Use Cygwin heap instead of user heap.
36 (fhandler_dev_tape::ioctl): Ditto.
38 Tue Oct 31 12:00:06 2000 Christopher Faylor <cgf@cygnus.com>
40 * pinfo.cc (enum_init): Don't suffer silently if we can't load the
43 Mon Oct 30 16:54:26 2000 Christopher Faylor <cgf@cygnus.com>
45 * signal.cc (kill_pgrp): Revert 25-Oct change.
48 Sun Oct 29 20:52:31 2000 Christopher Faylor <cgf@cygnus.com>
50 * include/cygwin/version.h: Bump DLL minor version number to 6.
52 Sat Oct 28 01:39:53 2000 Christopher Faylor <cgf@cygnus.com>
54 * configure.in: Eliminate subdir stuff.
55 * configure: Regenerate.
56 * include/getopt.h (option): Make name field 'const'.
58 Fri Oct 27 20:51:00 2000 Corinna Vinschen <corinna@vinschen.de>
60 * autoload.cc: New file keeping all autoload stuff.
61 * Makefile.in: Add autoload.o to dependencies.
62 * dcrt0.cc: Move all autoload stuff to autoload.cc.
63 * fhandler_mem.cc: Ditto.
67 Fri Oct 27 11:37:20 2000 Christopher Faylor <cgf@cygnus.com>
69 * sigproc.cc (wait_sig): Add braces to avoid confusion.
71 Fri Oct 27 11:48:00 2000 Corinna Vinschen <corinna@vinschen.de>
73 * fhandler_socket.cc: New file.
74 * Makefile.in: Add fhandler_socket.o to dependencies.
75 * fhandler.h: Change comment.
76 * net.cc Move all fhandler_socket methods to fhandler_socket.cc.
77 * winsup.h: Add declaration for `ws2_32_handle'.
79 Thu Oct 26 11:51:59 2000 Corinna Vinschen <corinna@vinschen.de>
81 * dtable.cc (dtable::release): Check for socket. Change
82 cnt_need_fixup_before accordingly.
83 (dtable::dup2): Ditto.
84 (dtable::fixup_before_fork): New method.
85 (dtable::fixup_before_exec): Ditto.
86 * dtable.h (class dtable): Add member `cnt_need_fixup_before'. Add
87 definition for methods `dec_need_fixup_before', `inc_need_fixup_before',
88 `need_fixup_before', `fixup_before_exec' and `fixup_before_fork'.
89 * fhandler.h (class fhandler_base): Slight rearrangements. Add
90 definitions for methods `fixup_before_fork_exec'.
91 (class fhandler_socket): Eliminate superfluous constructor.
92 Add member `prot_info_ptr'. Add destructor. Add definitions for
93 methods `dup', `fixup_before_fork_exec', `fixup_after_fork' and
95 * fork.cc (fork_parent): Care for file types which need a fixup
96 before fork. Start child in suspended state then.
97 * net.cc: New global variable `ws2_32_handle' and `wsadata'.
98 (fdsock): Check for Winsock version. Call `set_socket_inheritance'
99 only if Winsock version < 2.0. Care for `need_fixup' count in fdtab.
100 (cygwin_socket): Eliminate call to `set_socket_inheritance'.
101 (cygwin_accept): Ditto.
102 (cygwin_rcmd): Ditto.
103 (cygwin_rresvport): Ditto.
104 (cygwin_rexec): Ditto.
106 (fhandler_socket::fhandler_socket): Set `need_fork_fixup'. Allocate
107 space for the WSAPROTOCOL_INFOA struct used in fixup.
108 (fhandler_socket::~fhandler_socket): New destructor.
109 (fhandler_socket::fixup_before_fork_exec): New method.
110 (fhandler_socket::fixup_after_fork): Ditto.
111 (fhandler_socket::dup): Ditto.
112 (wsock_init): New static function.
113 (LoadDLLinitfunc (wsock32)): Rearranged.
114 (LoadDLLinitfunc (ws2_32)): New function.
115 (dummy_autoload): Add autoload statemants for `WSADuplicateSocketA'
117 * spawn.cc (spawn_guts): Care for file types which need a fixup
118 before exec. Start child in suspended state then.
120 Wed Oct 25 20:49:59 2000 Christopher Faylor <cgf@cygnus.com>
122 * signal.cc (kill_pgrp): Don't limit sending of signals to stopped
123 processes when sig < 0.
124 (kill_worker): Only send SIGCONT to stopped processes when sendSIGCONT.
126 Wed Oct 25 13:56:39 2000 Christopher Faylor <cgf@cygnus.com>
128 * exceptions.cc (sig_handle): Just make sure that wait_sig loops when
129 receiving a SIGCONT. Don't block waiting for completion that will
132 Wed Oct 25 09:59:14 2000 Christopher Faylor <cgf@cygnus.com>
134 * dtable.cc (dtable::fixup_after_exec): Use variable rather than
135 constantly indexing into fds array.
136 (dtable::fixup_after_fork): Ditto.
138 Wed Oct 25 10:43:00 2000 Corinna Vinschen <corinna@vinschen.de>
140 * fhandler.cc (fhandler_base::fcntl): Treat O_NONBLOCK and OLD_O_NDELAY
141 as exactly the same. If one is set, both are set.
142 * net.cc (fhandler_socket::fcntl): Ditto.
144 Tue Oct 24 23:58:35 2000 Christopher Faylor <cgf@cygnus.com>
146 * dcrt0.cc (do_exit): Remove debugging statement.
148 Tue Oct 24 23:45:09 2000 Christopher Faylor <cgf@cygnus.com>
150 * dcrt0.cc (do_exit): Don't bother looking for pgrp children to send
151 SIGHUP if process has never created any children.
152 * fork.cc (fork): Set flag indicating that there is another process
153 with our process group.
154 * spawn.cc (spawn_guts): Ditto.
155 * pinfo.h (set_has_pgid_children): New methods for setting when process
156 has children in its process group.
157 * syscalls.cc (setpgid): Clear has_gid_children if pgid changes.
159 Tue Oct 24 20:38:00 2000 Corinna Vinschen <corinna@vinschen.de>
162 * fhandler_mem.cc: Move ntdll.dll specific definitions and
163 declarations to ntdll.h.
164 * sysconf.cc (sysconf): Add support for _SC_NPROCESSORS_CONF,
165 _SC_NPROCESSORS_ONLN, _SC_PHYS_PAGES and _SC_AVPHYS_PAGES.
167 Tue Oct 24 20:00:00 2000 Corinna Vinschen <corinna@vinschen.de>
169 * fhandler.cc (fhandler_base::fcntl): Behave properly when passed
170 previous version of O_NDELAY.
171 * syscalls.cc: Move OLD_O_NDELAY to winsup.h.
172 * winsup.h: Define OLD_O_NDELAY now.
174 Mon Oct 23 21:47:55 2000 Christopher Faylor <cgf@cygnus.com>
176 * exceptions.cc (signal_exit): Kill any executing child process if
178 * path.h: Remove unneeded extern.
179 * spawn.cc (std_suffixes): Make static. Don't set dwProcessId here
180 since it makes the process unsignalable. Set strace flag that this is
181 an execed process stub.
182 * strace.cc (strace::vsprntf): Use strace flag to indicate when to
183 visually flag that this is an exec stub.
184 * include/sys/strace.h (strace): Add 'execing' flag.
186 Mon Oct 23 16:43:33 2000 Christopher Faylor <cgf@cygnus.com>
188 * sigproc.cc (proc_subproc): Don't send a false positive if WNOHANG and
189 no processes are available for waiting.
191 Mon Oct 23 22:27:00 2000 Corinna Vinschen <corinna@vinschen.de>
193 * fhandler.cc (fhandler_base::fcntl): Setting flags in F_SETFL
194 branch according to Linux documentation.
196 Mon Oct 23 21:43:00 2000 Corinna Vinschen <corinna@vinschen.de>
198 * fcntl.cc (_fcntl): Rearrange as wrapper function. Move all
199 functionality except F_DUPFD to fhandler classes.
200 * fhandler.cc (fhandler_base::fcntl): New method.
201 * net.cc (fhandler_socket::fcntl): Ditto.
202 * fhandler.h (class fhandler_base): Add method prototype for fcntl().
203 (class fhandler_socket): Ditto.
205 Mon Oct 23 12:44:35 2000 Christopher Faylor <cgf@cygnus.com>
207 * sigproc.cc (proc_subproc): Correctly handle flags for WNOHANG case.
209 Mon Oct 23 10:00:00 2000 Corinna Vinschen <corinna@vinschen.de>
211 * security.cc: Eliminate C++ comments throughout.
213 Sun Oct 22 23:33:00 2000 Christopher Faylor <cgf@cygnus.com>
215 * fork.cc (fork): Set sigframe here, since it can pause for a
216 considerable amount of time.
217 * environ.cc (_addenv): Add debugging.
218 * fhandler.cc: Eliminate unneeded include.
219 * smallprint.c: Ditto.
221 Sun Oct 22 12:07:00 2000 Corinna Vinschen <corinna@vinschen.de>
223 * pinfo.cc (pinfo_init): Eliminate call to `set_process_privileges'.
224 * security.cc (write_sd): Call `set_process_privileges' on the first
226 (set_process_privileges): Eliminate adjusting SE_BACKUP_NAME privilege.
228 Sat Oct 21 16:57:23 2000 Christopher Faylor <cgf@cygnus.com>
230 * pinfo.cc (pinfo::init): Make PID_EXECED signal creation as well as
233 Sat Oct 21 01:52:54 2000 Christopher Faylor <cgf@cygnus.com>
235 * spawn.cc (spawn_guts): Don't do the reparenting step if we notice
236 that the child has exited prior to sending the subprocess_ready signal
239 Sat Oct 21 00:46:36 2000 Christopher Faylor <cgf@cygnus.com>
241 * fhandler.h (fhandler_console): Remove tcsetpgrp.
242 * fhandler_console.cc (fhandler_console::tcsetpgrp): Eliminate.
243 * fork.cc (fork_parent): Avoid returning same pid twice in a row
245 * pinfo.cc (pinfo::init): Rename create argument to flags and treat it
247 * signal.cc (set_sigcatchers): New function.
248 (signal): Use set_sigcatchers to increment or decrement sigcatcher
250 (sigaction): Ditto. Add debugging output.
251 * spawn.cc (spawn_guts): Always quote first argv[0] argument when it's
254 2000-10-20 DJ Delorie <dj@redhat.com>
256 * times.cc (to_time_t): pass zero time as epoch
257 * fhandler.cc (fstat): copy atime/ctime from mtime if they're zero
259 Thu Oct 19 23:31:41 2000 Christopher Faylor <cgf@cygnus.com>
261 * external.cc (fillout_pinfo): Pass PID_NOREDIR flag to pinfo init to
262 avoid finding execed processes twice.
263 * signal.cc (kill_pgrp): Ditto.
264 * spawn.cc (spawn_guts): Avoid passing first argument to CreateProcess
265 when running a windows shell so that CreateProcess will locate the
266 shell. Reorganize so that correct error is returned when CreateProcess
269 Thu Oct 19 13:55:31 2000 Christopher Faylor <cgf@cygnus.com>
271 * dcrt0.cc (sigthread::init): Correct overzealous ifdef.
272 * exceptions.cc (call_handler): Avoid calling sigthread acquire lock.
273 * sigproc.h (sigthread): Comment out lock for now.
274 * sync.cc (muto::acquire): Add a minor optimization.
276 2000-10-18 DJ Delorie <dj@redhat.com>
278 * Makefile.in: add miscfuncs.cc
279 * miscfuncs.cc: new, miscellaneous functions
280 * winsup.h: define table-driven tolower/toupper
281 * environ.cc: use them
282 * fhandler_console.cc: ditto
283 * fhandler_termios: ditto
285 (strncasematch, strcasematch, strcasestr): move to miscfuncs.cc
287 Wed Oct 18 20:50:27 2000 Christopher Faylor <cgf@cygnus.com>
289 * sigproc.h (sigthread): Eliminate locking for now since per thread
290 signalling is not available.
291 * dcrt0.cc (sigthread::init): Ditto.
292 (dll_crt0_1): Move set_process_privileges call (temporarily?) to
294 (pinfo_init): Only call set_process_privileges when allow_ntsec.
296 2000-10-18 DJ Delorie <dj@redhat.com>
298 * dcrt0.cc (dll_crt0_1): init cygcwd before forkee branch
300 * environ.cc (conv_start_chars): Cache a table of "first
301 characters" for environment variables needing conversion.
303 (environ_init): Create it, also check first chars for TERM and
306 * path.cc: Use lookup table for case insensitive comparisons.
308 Wed Oct 18 00:48:49 2000 Christopher Faylor <cgf@cygnus.com>
310 * exceptions.cc (call_handler): Make signal pending if sigsave.sig is
312 * syscalls.cc (_read): Don't clear errno.
313 * sigproc.cc (wait_sig): Don't scan the waiting process list after a
314 SIGCHLD if there are no zombies to reap.
315 * winsup.h: Use __builtin_strcmp.
316 * environ.cc (posify): Don't initialize len unless it is required
317 (from DJ Delorie <dj@redhat.com>).
319 Tue Oct 17 14:50:31 2000 Christopher Faylor <cgf@cygnus.com>
321 * sigproc.cc (proc_subproc): Remove unneeded test for correct process
322 in PROC_ADDCHILD. Return 0 when terminated child has just been
324 (wait_subproc): Only send SIGCHLD when proc_subproc returns != 0.
325 * strace.cc (strace::vsprntf): Only strip .exe extension from program
328 2000-10-16 Charles Wilson <cwilson@ece.gatech.edu>
330 * fhandler_clipboard.cc: new file
331 * Makefile.in: include fhandler_clipboard.o in DLL_OFILES list.
332 * fhandler.h: add FH_CLIPBOARD to the devices enum.
333 (fhandler_dev_clipboard): new
334 * path.cc (windows_device_names): add "\\dev\\clipboard"
335 (get_device_number): check for "clipboard"
336 * dcrt0.cc: declare a few more functions from winuser.h
337 * dtable.cc (dtable::build_fhandler): check for FH_CLIPBOARD in
340 Mon Oct 16 21:36:57 2000 Christopher Faylor <cgf@cygnus.com>
342 * debug.cc (add_handle): Issue warning on attempts to add the same
343 handle more than once.
344 * fhandler_tty.cc (fhandler_tty_slave::open): Protect some handles.
345 (fhandler_tty_common::close): Use proper name when closing handles.
346 (fhandler_pty_master::close): Don't close to_slave or from_slave since
347 they've already been closed earlier in the function.
348 * sigproc.cc (proc_subproc): Don't protect vchild->hProcess. Expect
349 that the caller will do this, instead.
350 * tty.cc (tty_list::terminate): Use proper name when closing handles.
351 (tty::make_pipes): Protect some handles.
353 Mon Oct 16 18:37:22 2000 Christopher Faylor <cgf@cygnus.com>
355 * Makefile.in: Remove some obsolete stuff.
356 * dcrt0.cc (dll_crt0_1): Call signal_fixup_after_exec where appropriate.
357 Set myself->uid from parent version.
358 Just use ThreadItem Init method. Close or store hexec_proc as appropriate.
359 (_dll_crt0): Store user_data->forkee here so that proper tests can be made
361 (do_exit): Remove hExeced stuff.
362 * environ.cc (environ_init): Accept environ count as well as environ pointer.
363 * environ.h: Reflect above change.
364 * pinfo.cc (pinfo_init): Ditto. Accept environ count.
365 (fixup_in_spawned_child): Remove.
366 * spawn.cc (spawn_guts): Move signal code to dll_crt0_1. Don't suspend
367 execing process since it is no longer necessary. Store envc.
368 * exceptions.cc (signal_fixup_after_exec): New function.
369 (call_handler): Remove hExeced test.
370 * child_info.h (cygheap_exec_info): Store envc as well as envp.
371 (child_info_spawn): Store hexec_proc so that it can be closed in child.
372 * path.cc (normalize_posix_path): Avoid intermediate use of temporary cwd buf.
373 (normalize_win32_path): Ditto.
374 (cwdstuff::get_initial): Always set lock.
375 * sigproc.h: Remove hExeced.
376 * strace.cc (strace::vsprntf): Modify to accomodate for lack of hExeced.
377 * thread.cc (MTinterface::Init): Merge Init1 and ClearReent into this method.
378 (MTinterface::Init1): Eliminate.
379 (MTinterface::ClearReent): Eliminate.
380 * thread.h: Reflect above changes.
381 * include/sys/strace.h (strace): Make microseconds() public.
383 Sun Oct 15 21:54:52 2000 Christopher Faylor <cgf@cygnus.com>
385 Make various functions 'regparm', throughout.
386 * pinfo.h (_pinfo): Inline simple signal manipulation functions.
387 Requires inclusion of thread.h which was removed from .cc files, where
388 appropriate. throughout.
389 * pinfo.cc: Eliminate signal manipulation functions.
390 (_pinfo::exit): Calculate total rusage for exiting process here.
391 * cygheap.cc (size2bucket): Eliminate.
392 (init_buckets): Ditto.
393 (_cmalloc): Calculate size and bits in a loop rather than going through
395 (_crealloc): Use stored array index to calculate allocated size.
396 * spawn.cc (spawn_guts): Use _pinfo exit method to exit, calculating
399 Sat Oct 14 21:24:16 2000 Christopher Faylor <cgf@cygnus.com>
401 * exceptions.cc (set_console_handler): Don't allocate
402 console_handler_thread_waiter. It is obsolete.
403 (ctrl_c_handler): Don't use console_handler_thread_waiter.
404 * path.cc (hash_path_name): Fix handling of relative names. Make case
406 * path.h (suffix_info): Use initializers.
407 * pinfo.h (_pinfo): Avoid initializers for null case.
408 * resource.cc (fill_rusage): Zero rest of rusage structure.
409 * security.cc (set_process_privileges): Don't reopen parent process.
411 * signal.cc (signal): Track when a signal handler has been used.
413 * sigproc.cc (pchildren): Use default initializer.
415 (sigproc_terminate): Avoid closing handles that will be closed on exit
417 (wait_sig): Send signal to "parent" on EXECing, not FORKing.
418 (wait_subproc): Send SIGCHLD here rather than in proc_wait to avoid
419 potential muto conflicts.
420 * sigproc.h (sigthread): Don't initialize to zero. It's the default.
421 * spawn.cc (spawn_guts): Fill in resources from exec parent prior to
423 * sync.h (muto): Don't initialize to zero.
424 * syscalls.cc (close_all_files): Use one lock around entire loop and
425 call fhandler close/release stuff directly.
426 (_read): Don't use ready_for_read if there are not signal handlers
429 Sat Oct 14 12:24:24 2000 Christopher Faylor <cgf@cygnus.com>
431 * dcrt0.cc (dll_crt0_1): Fix display of "title".
432 (do_exit): Use pinfo exit method to exit.
433 (__api_fatal): Ditto.
434 * exceptions.cc (signal_exit): Ditto.
435 * fork.cc (fork_child): Remove debugging stuff. Use pinfo_fixup_after
436 fork in place of exec_fixup_after_fork.
437 * pinfo.cc (pinfo_fixup_after_fork): New method.
438 (pinfo_fixup_in_spawned_child): Ditto.
439 (_pinfo::exit): New method.
440 (_pinfo::init): Remove recursion. Detect pathological case where pinfo
441 structure already exists for new pid.
442 * pinfo.h (_pinfo): Reorganize slightly. Add new method and new
443 function declarations.
444 * sigproc.cc (proc_exists): Previous simplification was a little to
445 simple. Try harder to detect if a process exists.
446 (proc_terminate): Use PID_EXITED setting to determine if process is
448 (WFSO): Remove debugging statement.
450 * spawn.cc (exec_fixup_after_fork): Eliminate.
451 (spawn_guts): Always set old_title to NULL. Is it really needed? Move
452 hexec_proc to pinfo.cc. Call pinfo_fixup_in_spawned_child to eliminate
453 handle link after a spawn.
454 * include/sys/cygwin.h: Remove PID_NOT_IN_USE. Add PID_EXITED.
456 Sat Oct 14 10:54:00 2000 Corinna Vinschen <corinna@vinschen.de>
458 * cygwin.din: Add symbol hstrerror.
459 * net.cc: Change meaning of member `s' of struct host_errmap.
460 (set_host_errno): Fix error in loop condition.
462 (herror): Add appropriate functionality.
463 * include/netdb.h: Add declaration of hstrerror.
464 * include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR to 29.
466 Sat Oct 14 01:45:25 2000 Christopher Faylor <cgf@cygnus.com>
468 * cygheap.cc (cygheap_fixup_in_child): Don't page round cygheap copied
470 * dcrt0.cc (do_exit): Don't cleanup pinfo on exit. That happens
472 * exceptions.cc (signal_exit): Ditto.
473 * fork.cc (fork_parent): Use stack_here value passed in from fork().
474 (fork): Figure out top of stack here and pass it to fork_parent.
475 * pinfo.cc (_pinfo::record_death): Eliminate.
476 * pinfo.h (_pinfo): Ditto.
477 * sigproc.cc (proc_exists): Simplify.
478 (proc_terminate): Ditto.
479 (remove_zombie): Don't cleanup pinfo stuff.
480 (wait_sig): Send subproc_ready signal whether execed or spawned.
481 * spawn.cc (spawn_guts): Always create subproc_ready event. Use it for
483 (_spawnve): Send proper mode to spawn_guts when mode != _P_OVERLAY.
485 Thu Oct 12 23:11:05 2000 Christopher Faylor <cgf@cygnus.com>
487 * dtable.cc (dtable::fixup_after_fork): Revert thinko below.
488 * pinfo.cc (set_myself): Show pid in initial strace line.
490 Thu Oct 12 17:58:03 2000 Christopher Faylor <cgf@cygnus.com>
492 * child_info: Bump child_info "version".
493 (child_info): Move some fields from child_info_spawn to here.
494 * cygheap.cc: Make cygheap pointers NOCOPY.
495 * dcrt0.cc (dll_crt0_1): Copy cygwin heap here regardless of whether
496 we've been forked or execed.
497 * dtable.cc (dtable::fixup_after_fork): Just release close-on-exec fds.
498 * exceptions.cc (stackdump): Respond to C warning.
499 * fork.cc: Reorganize to minimize stack copying.
500 (fork_child): New function.
501 (fork_parent): Ditto.
502 (sync_with_child): Don't suspend the forkee.
503 (sync_with_parent): Ditto. Make into a function.
504 * heap.cc (heap_init): Add some debugging output.
505 * path.cc (path_conv::check): Add an assertion.
507 * security.cc (get_pw_sid): Defend against NULL.
508 * sigproc.cc (proc_subproc): Fix debugging output.
510 * strace.cc: Make statics NO_COPY throughout.
511 (strace::vsprntf): Defend against NULL.
513 Thu Oct 12 00:25:29 2000 Christopher Faylor <cgf@cygnus.com>
515 * errno.cc (seterrno_from_win_error): Fix debugging output.
516 * fhandler.cc (fhandler_base::fstat): Move to inline method in
518 (fhandler_base::set_io_handle): Ditto.
519 * fhandler.h (fhandler_base): Make some methods inline.
520 * fhandler_console.cc (fhandler_console::write_normal): Make buffer
522 * sigproc.h (sigframe::sigframe): Actually use set ebp parameter
524 * spawn.cc (spawn_guts): Set dwProcessId when exec'ing. Just exit
525 immediately after reparenting.
526 * syscalls.cc: Sprinkle sigframe stuff throughout.
527 * wait.cc (wait4): Set signal frame here.
529 Tue Oct 10 19:54:06 2000 Christopher Faylor <cgf@cygnus.com>
531 * dcrt0.cc (__api_fatal): Don't rely on small_printf to display errors.
532 Always display problems to the console, if possible.
534 Tue Oct 10 15:21:10 2000 Christopher Faylor <cgf@cygnus.com>
536 * path.cc (cwdstuff::get): Set EINVAL when length is zero.
538 Mon Oct 9 14:07:04 2000 Christopher Faylor <cgf@cygnus.com>
540 * path.cc (mount_info::cygdrive_posix_path): Handle e:foo construction
543 Mon Oct 9 16:44:00 2000 Corinna Vinschen <corinna@vinschen.de>
545 * fhandler_mem.cc (fhandler_dev_mem::fhandler_dev_mem):
548 Mon Oct 9 15:58:00 2000 Corinna Vinschen <corinna@vinschen.de>
550 * fhandler_mem.cc: Eliminate unused include statements.
551 (fhandler_dev_mem::fhandler_dev_mem): Check for 9X/ME.
553 Mon Oct 9 15:11:00 2000 Corinna Vinschen <corinna@vinschen.de>
555 * fhandler.h (fhandler_dev_mem): Erase member `init_phase' and
556 member function `init'.
557 * fhandler_mem.cc: Add typedefs for NT internal data types
558 `SYSTEM_INFORMATION_CLASS' and `SYSTEM_BASIC_INFORMATION'.
559 Add prototype for `NtQuerySystemInformation' function.
560 (fhandler_dev_mem::fhandler_dev_mem): Takes over initialization task
561 from `init'. Use `NtQuerySystemInformation' function to evaluate the
562 size of physical memory instead of interval search.
563 (fhandler_dev_mem::init): Eliminated.
564 (fhandler_dev_mem::open): Don't call `init'.
565 (fhandler_dev_mem::read): Eliminate check for `init_phase'.
566 (dummy_autoload): Add load statement for `NtQuerySystemInformation'.
568 Sun Oct 8 22:38:40 2000 Christopher Faylor <cgf@cygnus.com>
570 * dtable.cc (set_std_handle): Use std_consts array to control
571 SetStdHandle settings.
572 (dtable::fixup_after_fork): Ditto.
573 * exceptions.cc (set_sig_errno): Remove some debugging output.
574 * path.cc (path_conv::check): Don't OR need_directory with flags sent
575 to symlink_info::check.
576 (symlink_info::check): Use PATH_ALL_EXEC to determine when a file is
578 * path.h (path_types): Add PATH_ALL_EXEC.
579 (isexec): Use PATH_ALL_EXEC so that cygexec types will be considered
581 * pinfo.h (_pinfo): Add a process handle that is kept open throughout
582 the life of a cygwin pid.
583 * sigproc.cc (proc_exists): Remove hopefully obsolete stuff.
584 (proc_subproc): Set up process handle that is kept open throughout the
585 life of a cygwin pid. Reorganize PROC_WAIT stuff to use common code.
586 (proc_terminate): Close pid lifetime process handle.
587 (checkstate): Cleanup.
588 (stopped_or_terminated): Move zombie cleanup.
589 (remove_zombie): To here.
590 * spawn.cc (spawn_guts): Reorganize reparenting code for 1247th time.
592 Sat Oct 7 13:59:15 2000 Christopher Faylor <cgf@cygnus.com>
594 * fhandler.h (fhandler_base): Remove obsolete _rpos and _rsize
596 * fhandler.cc (fhandler_base::open): Ditto.
597 * fhandler.cc (fhandler_base::fhandler_base): Ditto.
598 (fhandler_base::read): Ditto. Add more debugging output. Don't issue
599 a \r when \r\n detected.
600 * pipe.cc (make_pipe): Streamline slightly. Make debug output more
602 * strace.cc (strace::vsprintf): Use __progname where appropriate to
603 distinguish strace output when exec'ing.
605 Sat Oct 7 19:25:00 2000 Corinna Vinschen <corinna@vinschen.de>
607 * fhandler.h (fhandler_dev_mem): Add methods mmap, munmap and msync.
609 * fhandler_mem.cc (fhandler_dev_mem): Initialize `unit' as well.
610 (init): Care for differences between /dev/mem, /dev/kmem (not
611 implemented yet) and /dev/port.
612 (open): Change debug message to reflect the device.
613 (mmap): New function.
616 (fstat): Use unit when setting st_dev in stat structure.
617 * mmap.cc (mmap): Handle MAP_ANONYMOUS flag.
618 Change error handling slightly.
619 * path.cc (get_device_number): Handle /dev/port.
621 Fri Oct 6 23:21:29 2000 Christopher Faylor <cgf@cygnus.com>
623 * syscalls.cc (_read): Behave properly when passed previous version of
624 O_NDELAY. Fix up debugging output.
626 Thu Oct 5 20:34:48 2000 Christopher Faylor <cgf@cygnus.com>
628 * net.cc (set_socket_inheritance): Rename from duplicate_socket. Use
629 NT specific call when appropriate.
630 (__set_winsock_errno): Rename from set_winsock_errno. Accept function
631 and line as arguments.
632 * path.cc (path_conv::check): Continue the neverending battle to make
633 cygwin properly understand that path specs ending in a slash require
634 that the path refer to a directory. Windows does not do this by
636 (symlink_info::check): Remove ENOTDIR test. Move it to
638 * path.h: Remove obsolete constant.
639 * winsup.h (set_winsock_errno): New macro.
641 Thu Oct 5 14:58:00 2000 Corinna Vinschen <corinna@vinschen.de>
643 * fhandler.h: Add mmap(), munmap() and msync() to fhandler_base
644 and fhandler_disk_file.
645 * mmem.cc (mmap): Eliminated device dependent implementation details.
646 These are moved to the appropriate fhandler class.
649 (fhandler_base::mmap): New method.
650 (fhandler_base::munmap): Ditto.
651 (fhandler_base::msync): Ditto.
652 (fhandler_disk_file::mmap): Ditto.
653 (fhandler_disk_file::munmap): Ditto.
654 (fhandler_disk_file::msync): Ditto.
656 Thu Oct 5 01:52:43 2000 Christopher Faylor <cgf@cygnus.com>
658 * net.cc: General cleanup.
659 (fdsock): Return pointer to created fhandler_socket.
660 (cygwin_socket): Use pointer returned by fdsock. Return correct errno
663 Thu Oct 5 00:48:40 2000 Christopher Faylor <cgf@cygnus.com>
665 * exceptions.cc (interruptible): Add extra debugging.
666 * sigproc.h (wait_sig): Fill in frame pointer, by default, prior to
667 calling or suffer confusion due to September 7 change below.
669 Wed Oct 4 23:10:27 2000 Christopher Faylor <cgf@cygnus.com>
671 * include/netinet/tcp.h: Remove winsock.h include.
672 * include/sys/cygwin.h: Move windows specific reference within
675 Thu Oct 5 1:13:00 2000 Corinna Vinschen <corinna@vinschen.de>
677 * include/sys/mman.h: Add missing MAP_FAILED macro.
679 Wed Oct 4 18:48:00 2000 Corinna Vinschen <corinna@vinschen.de>
681 * fhandler.h (fhandler_dev_mem): Add method `init'. Add members
682 `mem_size' and `init_phase'.
683 * fhandler_mem.cc (init): New function to figure out the size of
685 (open): Add checking for illegal flags. Change usage of access mode.
686 (write): Add intended functionality.
687 (read): Add parameter checking. Eliminate page size constant. Use
688 getpagesize() instead. Don't touch errno and don't create debug output
689 while init() is running.
690 (lseek): Add bounds checking. Fix SEEK_END.
691 (fstat): Eliminate page size constant. Use getpagesize() instead.
692 (dup): Add intended functionality.
694 Mon Oct 2 22:15:00 2000 Corinna Vinschen <corinna@vinschen.de>
696 * dcrt0.cc: Add LoadDLLFunc statement for RegEnumValueA().
697 * net.cc: Change comments related to get_ifconf.
698 (get_2k_ifconf): Eliminate `type' variable. Eliminate `sa' parameter.
699 (get_nt_ifconf): Ditto.
700 (get_9x_ifconf): Ditto. Rewritten.
701 (get_ifconf): Change calls to OS specific functions.
703 Mon Oct 2 15:15:01 2000 Christopher Faylor <cgf@cygnus.com>
705 * signal.cc (sigaction): Allow new action == oldaction.
707 Mon Oct 2 11:05:00 2000 Corinna Vinschen <corinna@vinschen.de>
709 * fhandler_mem.cc: Load ntdll functions via autoload method.
710 (load_ntdll_funcs): Eliminated.
712 Sun Oct 1 16:36:00 2000 Corinna Vinschen <corinna@vinschen.de>
714 * fhandler_mem.cc (load_ntdll_funcs): Add missing __stdcall qualifiers.
716 Sun Oct 1 22:20:39 2000 Christopher Faylor <cgf@cygnus.com>
718 * cygheap.cc (cygheap_init): Born again function.
719 (_cmalloc): Reorganize to accomodate muto locking.
720 (_cfree): Use muto lock to avoid multi-thread problems.
721 * cygheap.h (incygheap): Just use cygheap_max to find upper cygwin heap
723 * dcrt0.cc (dll_crt0_1): Reinstitute cygheap_init call.
724 * path.cc (getcwd): Just return cwdstuff::get result, allowing correct
725 handling of negative length.
726 (cwdstuff::get): Malloc a buffer if one is not available.
728 Sun Oct 1 2:56:00 2000 Corinna Vinschen <corinna@vinschen.de>
730 * Makefile.in: Add fhandler_mem.o to the dependencies.
731 * dtable.cc (dtable::build_fhandler): Add case for FH_MEM.
732 * fhandler.h: Add FH_MEM device type. Add class fhandler_dev_mem.
733 * fhandler_mem.cc: New file. Implementation of class fhandler_dev_mem.
734 * path.cc: Add /dev/mem to windows_device_names.
735 (get_device_number): Add FH_MEM type.
737 Sat Sep 30 00:43:42 2000 Christopher Faylor <cgf@cygnus.com>
739 * cygheap.cc (init_cheap): Set aside space for heap walk pointer.
740 (_csbrk): Make logic for detecting when to alloc cognizant of
741 initialization condition.
742 (_cmalloc): Use a structure to hold bucket size and heap chain pointer.
743 Store pointer to next freed block in bucket size location so that it
744 will be easy to see if a block is allocated.
745 (_cfree): Store pointer to next freed block in bucket size location.
746 (_crealloc): Use macro to retrieve bucket size.
747 (cygheap_init): Eliminate.
748 (cygheap_fixup_in_child): Add second argument to determine if we were
749 execed or not. In execed case, walk the heap, cleaning up any orphaned
751 * cygheap.h: Add a "MAX" value to cygheap_types. Remove cygheap_init
752 declaration. Accomodate new argument to cygheap_fixup_in child.
753 * fork.cc (fork): Accomodate extra argument to cygheap_fixup_in_child.
754 * dcrt0.cc (dll_crt0_1): Ditto. Remove call to cygheap_init.
756 Fri Sep 29 21:49:27 2000 Christopher Faylor <cgf@cygnus.com>
758 * path.cc (symlink_info::check): Set executable bit for a file if the
759 first two characters are 'MZ' to mirror spawn_guts check.
761 Sat Sep 30 03:34:00 2000 Corinna Vinschen <corinna@vinschen.de>
763 * winsup.h: Add `winME' to os_type symbols.
764 * dcrt0.cc (set_os_type): Identify Windows ME systems.
765 * (host_dependent_constants::init): Care for winME.
766 * uname.cc (uname): Ditto.
768 Thu Sep 28 01:46:00 2000 Corinna Vinschen <corinna@vinschen.de>
770 * net.cc (get_ifconf): Code cleanup. Split. Call os dependent
771 subfunctions instead.
772 (get_9x_ifconf): New function for 9X systems, called by get_ifconf.
773 (get_nt_ifconf): New function for NT systems, called by get_ifconf.
774 (get_2k_ifconf): New function for W2K systems, called by get_ifconf.
776 Wed Sep 27 01:10:07 2000 Christopher Faylor <cgf@cygnus.com>
778 * spawn.cc (spawn_guts): Attempt to accomodate archaic windows quoting
779 mechanism when dealing with '\' and '"'.
781 Mon Sep 25 20:47:04 2000 Christopher Faylor <cgf@cygnus.com>
783 * dcrt0.cc (quoted): Fix problem where ' quoted strings were skipped.
784 * fhandler.h (fhandler_socket::~fhandler_socket): Delete declaration.
785 * net.cc: Remove unnecessary "number_of_sockets" usage.
786 (fhandler_socket::fhandler_socket): Ditto.
787 (fhandler_socket::~fhandler_socket): Delete definition.
788 * spawn.cc (spawn_guts): Force first argument passed to CreateProcess
789 as a command line to be windows style.
791 2000-09-25 Christopher Faylor <cgf@cygnus.com>
793 * spawn.cc (av::dup_maybe): Make function void rather than void *.
794 * environ.cc (environ_init): Remember to reparse CYGWIN if envp is
796 * heap.cc (_sbrk): Remember frame for signal handling.
797 * syscalls.cc (read_handler): Eliminate.
798 (_read): Move read_handler code here. Reorganize for one path through
801 Tue Sep 19 09:46:36 2000 Christopher Faylor <cgf@cygnus.com>
803 * spawn.cc (spawn_guts): Use actual program argument passed in for
804 argv[0] as originally suggested by Kazuhiro Fujieda
805 <fujieda@jaist.ac.jp>.
807 Mon Sep 18 23:17:19 2000 Christopher Faylor <cgf@cygnus.com>
809 * path.h: Create new input path flag PATH_NEEDDIR.
810 * path.cc (path::check): Detect trailing slash before converting to
811 windows path. Tell symlink_info::check to check for directory if one is
813 (symlink_info::check): Set errno when path is not a directory if
814 pflags & PATH_NEEDDIR.
816 Mon Sep 18 19:44:08 2000 Christopher Faylor <cgf@cygnus.com>
818 * fhandler_tty.cc (fhandler_tty_slave::write): Correct typo which
819 caused resetting of windows error to ERROR_IO_DEVICE to be ignored.
821 Mon Sep 18 17:15:37 2000 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
823 * path.cc (mount_info::read_mounts): Don't delete mount entries of
824 which mount points have the cygdrive prefix.
825 * (mount_info::add_reg_mount): Properly catch errors on registry
827 * (mount_info::write_cygdrive_info_to_registry): Ditto.
828 * (mount_info::del_reg_mount): Cosmetic changes to be consistent
830 * (mount_info::add_item): Check arguments more precisely.
831 Increment nmounts only when registry operations succeed.
833 Sun Sep 17 22:18:39 2000 Christopher Faylor <cgf@cygnus.com>
835 * exceptions.cc (interruptible): Return 0 if given an address in
838 2000-09-16 Egor Duda <deo@logos-m.ru>
840 * signal.cc (sleep): If interrupted by signal, return the
841 requested time minus the time actually slept.
843 Fri Sep 15 22:30:40 2000 Christopher Faylor <cgf@cygnus.com>
845 * exceptions.cc (handle_exceptions): Just "core dump" if SIGSEGV in
847 * external.cc (fillout_pinfo): Fix compiler warning.
848 * sigproc.h: Eliminate special asm naming for sig_dispatch_pending.
849 * sigproc.cc (sig_send): Remove debugging statements.
851 Wed Sep 13 14:56:47 2000 Christopher Faylor <cgf@cygnus.com>
853 * spawn.cc (av): Hide 'calloced' field and limit cstrduping to class
855 (spawn_guts): Use methods for manipulating most newargv stuff.
857 2000-09-13 Egor Duda <deo@logos-m.ru>
859 * child_info.h (child_info_spawn::~child_info_spawn): Avoid
860 memory leaks in cygheap.
861 * spawn.cc (spawn_guts): Ditto.
863 Wed Sep 13 14:28:03 2000 Christopher Faylor <cgf@cygnus.com>
865 * dcrt0.cc (quoted): Return next character after a quoted string when
866 not doing special quote processing. Also ensure that non-NULL is
867 returned in all circumstances.
869 Wed Sep 13 10:26:16 2000 Christopher Faylor <cgf@cygnus.com>
871 * spawn.cc (spawn_guts): Ensure that argv[0] is correctly set to the
872 full path when a script is detected. Suggested by Kazuhiro Fujieda
873 <fujieda@jaist.ac.jp>.
875 Tue Sep 12 22:33:30 2000 Christopher Faylor <cgf@cygnus.com>
877 * external.cc (fillout_pinfo): Handle explicit pids correctly.
879 Tue Sep 12 14:37:32 2000 Christopher Faylor <cgf@cygnus.com>
881 * path.cc (normalize_posix_path): Fix more slashdot madness.
883 Tue Sep 12 12:29:29 2000 Christopher Faylor <cgf@cygnus.com>
885 * Makefile.in: Make clean target remove *.d.
887 Mon Sep 11 13:19:15 2000 Christopher Faylor <cgf@cygnus.com>
889 * path.cc (normalize_posix_path): Correctly deal with a "." parameter.
891 Sun Sep 10 20:23:35 2000 Christopher Faylor <cgf@cygnus.com>
893 * cygheap.cc (init_cheap): Just use any old address for the cygwin
895 * exceptions.cc (signal_exit): Don't terminate the main thread. Just
896 try to exit in this thread really quickly.
897 * signal.cc (kill_pgrp): Fix typo which caused pinfo structure to be
898 assigned incorrectly.
900 Sun Sep 10 12:40:49 2000 Christopher Faylor <cgf@cygnus.com>
902 * dcrt0.cc (dll_crt0_1): Initialize thread and debug stuff before
904 * dtable.cc (dtable::fixup_after_exec): Always clear out the read ahead
905 buffer whether closing or adjusting.
906 * path.cc (chdir): Avoid a compiler warning.
908 Sat Sep 9 23:29:17 2000 Christopher Faylor <cgf@cygnus.com>
910 * path.cc (chdir): Use the full path for cwd_win32. Consider attempts
911 to chdir to strings of dots > 2 to be an error. Pass 'dir' argument to
913 (cwdstuff::set): Need to treat arguments from chdir differently.
914 * path.h (cwdstuff): Add an argument to set.
916 Fri Sep 8 11:50:09 2000 Christopher Faylor <cgf@cygnus.com>
918 * lib/_cygwin_crt0_common.cc: Add missing header files.
920 Thu Sep 7 23:07:21 2000 Christopher Faylor <cgf@cygnus.com>
922 * sigproc.h (sigframe::set): Eliminate second argument. Default bp to
923 current frame pointer rather than using this within the function, which
924 is unstable when this method is not inlined.
925 * net.cc: Eliminate use of second argument to sigframe.set throughout.
926 * select.cc (cygwin_select): Ditto.
927 * sigproc.cc (sig_send): Ditto.
929 Thu Sep 7 22:45:16 2000 Christopher Faylor <cgf@cygnus.com>
931 Break out more header info into separate files. Use appropriate
932 header files throughout.
934 * cygwin_version.h: New file.
935 * delqueue.h: New file.
936 * environ.h: New file.
937 * host_dependent.h: New file.
938 * perprocess.h: New file.
939 * registry.h: New file.
940 * security.h: New file.
942 Thu Sep 7 12:14:43 2000 Christopher Faylor <cgf@cygnus.com>
944 Split out tty and shared_info stuff into their own headers and use
945 throughout. Include sys/termios.h for files which need it.
947 * shared_info.h: New file.
948 * fhandler.h: Move inline methods that rely on tty stuff to
950 * fhandler_tty.cc (fhandler_pty_master::process_slave_output): Set
951 output_done_event immediately after reading data to speed up tty output
953 (process_output): Set write_error to errno or zero.
954 (fhandler_tty_slave::write): Check previous write error prior to
955 writing to slave end of pipe. This allows tty output to be slightly
957 * fhandler_console.cc (fhandler_console::tcsetpgrp): Moved here from
959 (fhandler_console::set_input_state): Ditto.
961 Wed Sep 6 21:11:13 2000 Christopher Faylor <cgf@cygnus.com>
963 * exceptions.cc (signal_exit): Reset all mutos owned by the main
965 * fhandler.h: Define *_output_mutex macros for serializing tty output.
966 (fhandler_termios): Remove restart_output_event. Define dummy output
968 (fhandler_pty_master): Remove unneeded fixup_after_fork method.
969 * fhandler_termios.cc (fhandler_termios::line_edit): Acquire
970 output_mutex when CTRL-S is hit. Release it on CTRL-Q.
971 * fhandler_tty.cc (fhandler_pty_master::process_slave_output): Remove
972 inappropriate OutputStopped test here. Just use the output mutex.
973 (fhandler_pty_master::fhandler_pty_master): Remove obsolete reference
974 to restart_output_event.
975 (fhandler_tty_common::close): Ditto.
976 (fhandler_pty_master::set_close_on_exec): Ditto.
977 (fhandler_pty_master::fixup_after_fork): Delete.
978 * tty.cc (tty::common_init): Ditto.
979 * sync.cc (muto::reset): New method.
980 * sync.h: Declare above method.
982 Wed Sep 6 16:56:38 2000 Christopher Faylor <cgf@cygnus.com>
984 * sigproc.cc: Add include file for proper definitions.
986 * winsup.h: Define cfree to avoid newlib pollution.
988 Wed Sep 6 14:11:51 2000 Christopher Faylor <cgf@cygnus.com>
990 * Makefile.in (CFLAGS): Ensure that -MD is always added even when
991 CFLAGS is overwritten.
993 Wed Sep 6 02:40:12 2000 Christopher Faylor <cgf@cygnus.com>
995 * path.cc (cwdstuff::get_initial): Keep caching alive.
996 (mount_info::conv_to_win32_path): Fill out relative path in failing
999 Tue Sep 5 21:36:15 2000 Christopher Faylor <cgf@cygnus.com>
1001 * path.cc (normalize_posix_path): Deal with error return from cygcwd.get.
1002 (normalize_win32_path): Ditto.
1003 (mount_info::conv_to_win32_path): Ditto.
1004 (cwdstuff::get): Set buf to NULL on error.
1006 Tue Sep 5 17:49:34 2000 Christopher Faylor <cgf@cygnus.com>
1008 * path.cc (readlink): 'max' should be a 'min' or we'll suffer
1011 Mon Sep 4 22:53:58 2000 Christopher Faylor <cgf@cygnus.com>
1013 * path.cc (cwd_win32): Eliminate.
1014 (cwd_posix): Eliminate.
1015 (cwd_hash): Eliminate.
1016 (cwdstuff::init): Rename from cwd_init.
1017 (cwdstuff::fixup_after_exec): Rename from cwd_fixup_after_exec.
1018 (cwdstuff::get): Rename from get_cwd_inner.
1019 (normalize_posix_path): Eliminate cwd argument. Just calculate when
1021 (normalize_win32_path): Ditto.
1022 (mount_info::conv_to_win32_path): Eliminate cwd retrieval here.
1023 (mount_info::conv_to_posix_path): Ditto.
1024 (hash_path_name): Accomodate additional methods in cwdstuff.
1025 (get_cwd_win32): Eliminate.
1026 (getcwd): Use cwdstuff methods. Properly handle case where buf == NULL
1028 (cwdstuff::get_hash): New method.
1029 (cwdstuff::get_initial): New method.
1030 (cwdstuff::set): New method.
1031 (cwdstuff::get): New method.
1032 (cwdstuff::copy): New method.
1033 * path.h: Move cwdstuff struct here. Add a bunch of stuff to cwdstuff.
1034 Make cygcwd an extern.
1035 * spawn.cc (spawn_guts): Use copy method to get copies of cwd info to
1036 pass to execed process.
1037 * dcrt0.cc (dll_crt0_1): Use cygcwd methods for cwd initialization.
1039 2000-09-03 Egor Duda <deo@logos-m.ru>
1041 * path.cc (readlink): Check if buffer length is positive.
1042 Truncate output to buffer length. Don't terminate buffer
1045 Sun Sep 3 00:38:40 2000 Christopher Faylor <cgf@cygnus.com>
1047 * environ.cc (environ_init): Don't free the new environment table after
1048 we've just copied stuff to it.
1050 Sun Sep 3 00:07:32 2000 Christopher Faylor <cgf@cygnus.com>
1052 * Makefile.in: Add cygheap.o.
1053 * child_info.h: Add specific exec class.
1054 * cygheap.h: New file. Contains declarations for cygwin heap.
1055 * cygheap.cc: New file. Implements cygwin heap functions.
1056 * dcrt0.cc (quoted): Simplify due to new method for passing arguments
1057 between cygwin programs.
1058 (alloc_stack_hard_way): Attempt to handle overlapped stack.
1059 (dll_crt0_1): Move child_info processing here. Accomodate new method
1060 for passing arguments between cygwin programs. Initialize cygwin heap.
1061 Establish __argc and __argv variables.
1062 (_dll_crt0): Move most of child_info processing to dll_crt0_1.
1063 (cygwin_dll_init): Remove duplication.
1064 * dtable.cc (dtable::extend): Allocate dtable using cygwin heap.
1065 (dtable::build_fhandler): Ditto for fhandler type being constructed.
1066 (dtable::dup_worker): Free new fhandler from cygwin heap on error.
1067 (dtable::select_*): Don't assume that this == fdtab.
1068 (dtable::linearize_fd_array): Delete.
1069 (dtable::delinearize_fd_array): Delete.
1070 (dtable::fixup_after_exec): New file.
1071 (dtable::vfork_child_dup): Use cygwin heap.
1072 (dtable::vfork_parent_restore): Ditto.
1073 * dtable.h: Remove obsolete methods. Add new method.
1074 * environ.cc (posify): Eliminate already_posix parameter and logic.
1075 (envsize): New function.
1076 (_addenv): Use envsize.
1077 (environ_init): Accept an argument pointing to an existing environment
1078 list. If supplied, allocate space for this in the the program's heap.
1079 * fhandler.cc (fhandler_base::operator =): Move here from fhandler.h.
1080 Use cygwin heap to allocate filenames.
1081 (fhandler_base::set_name): Allocate/free names from cygwin heap.
1082 (fhandler_base::linearize): Delete.
1083 (fhandler_base::de_linearize): Delete.
1084 (fhandler_base::operator delete): Free from cygwin heap.
1085 (fhandler_base::~fhandler_base): Ditto.
1086 * fhandler.h: Accomodate elimination of *linearize and other changes
1088 * fhandler_console.cc (fhandler_console::fixup_after_exec): Rename from
1091 * fhandler_tty.cc (fhandler_tty_slave::fhandler_tty_slave): Use cygwin
1092 heap for name. fhandler_tty::fixup_after_exec): Rename from
1094 * fork.cc (fork): Call cygheap_fixup_in_child.
1095 * heap.cc: Use declarations in heap.h.
1096 * malloc.cc: Sprinkle assertions throughout to catch attempts to
1097 free/realloc something from the cygwin heap.
1098 * path.cc: Throughout, eliminate use of per-thread cache for cwd. Use
1099 cwd_* functions rather than cwd_* variables to access cwd_win32 and
1101 (cwd_win32): New function.
1102 (cwd_posix): New function.
1103 (cwd_hash): New function.
1104 (cwd_fixup_after_exec): New function.
1105 * path.h: Accomodate path.cc changes.
1106 * pinfo.cc (pinfo_init): Accept a pointer to an environment table.
1107 Pass this to environ_init. Eliminate old 'title' tests.
1108 * pinfo.h: Accomodate above change in argument.
1109 * spawn.cc (struct av): New method for building argv list.
1110 (av::unshift): New method.
1111 (spawn_guts): Allocate everything that the child process needs in the
1112 cygwin heap and pass a pointer to this to the child. Build argv list
1113 using new method. Eliminate delinearize stuff.
1114 * thread.h: Eliminate _cwd_win32 and _cwd_posix buffers.
1115 * winsup.h: Eliminate obsolete functions. Add envsize() declaration.
1117 2000-09-02 Egor Duda <deo@logos-m.ru>
1119 * Makefile.in: Remove "make check" support. It is now in
1122 Fri Sep 1 21:17:03 2000 Christopher Faylor <cgf@cygnus.com>
1124 * sigproc.cc (mychild): New function.
1125 (proc_subproc): Use mychild() to determine if a specific pid is valid
1128 Fri Sep 1 16:57:44 2000 Christopher Faylor <cgf@cygnus.com>
1130 * sigproc.cc (sigproc_init): Create wait_sig_inited without auto-reset
1131 to avoid potential races.
1132 (init_child_info): Avoid unneeded test.
1134 Fri Sep 1 16:51:26 2000 Christopher Faylor <cgf@cygnus.com>
1136 * sigproc.cc (proc_info): Rename proc_exists which takes a pid to
1138 * shared.h: Split out "child_info" stuff into a new header file and
1139 use where necessary.
1141 * child_info.h: New file.
1143 Thu Aug 31 16:06:21 2000 Christopher Faylor <cgf@cygnus.com>
1145 * errno.cc (set_errno_from_win_error): Actually use arguments to
1148 2000-08-30 DJ Delorie <dj@redhat.com>
1150 * times.cc (gettimeofday): use GetSystemTimeAsFileTime to avoid a
1152 (FACTOR): correct value
1153 (genf): set milliseconds to zero, DOW to 4.
1155 2000-08-29 Egor Duda <deo@logos-m.ru>
1157 * grp.cc (getgroups): fail with EINVAL if array is not large
1158 enough to hold all supplementary group IDs.
1160 Mon Aug 28 22:03:21 2000 Christopher Faylor <cgf@cygnus.com>
1162 * signal.cc (_raise): New function.
1163 * exceptions.cc (unused_sig_wrapper): Remove _raise.
1164 * sigproc.h (class sigframe): Default frames to skip to zero or suffer
1165 from exuberant optimization.
1166 * fhandler_tty.cc (fhandler_tty::write): Set appropriate errno when
1167 WriteFile to pipe fails.
1169 Fri Aug 25 23:44:48 2000 Christopher Faylor <cgf@cygnus.com>
1171 * pinfo.h (pinfo): Un-inline release.
1172 * pinfo.cc (pinfo::release): Move here from pinfo.h.
1173 * sigproc.cc (proc_terminate): Remove bogus 'pinfo child' which caused
1174 strange destruction of random regions of memory when destructor was
1177 Fri Aug 25 21:25:32 2000 Christopher Faylor <cgf@cygnus.com>
1179 * dcrt0.cc (dll_crt0_1): Move set_os_type.
1180 (_dll_crt0): To here.
1181 (cygwin_dll_init): And here.
1182 * external.cc (fillout_pinfo): Use more foolproof method for scanning
1184 * pinfo.cc (set_myself): Eliminate myself_identity.init.
1185 * sigproc.cc (wait_sig): Do it here instead to reduce the amount of
1186 time where there could potentially be two processes with the same pid.
1187 * spawn.cc (spawn_guts): Eliminate duplicate initialization.
1188 * include/sys/cygwin.h: Mark unused PID_* elements.
1190 Fri Aug 25 21:49:00 2000 Corinna Vinschen <corinna@vinschen.de>
1192 * exec.cc (_execve): Change definition according to declaration in
1193 newlib/libc/include/sys/unistd.h.
1195 Thu Aug 24 22:17:19 2000 Christopher Faylor <cgf@cygnus.com>
1197 * external.cc (cygwin_internal): Add CW_INIT_EXCEPTIONS to allow cygwin
1198 exception handling on threads not created by cygwin.
1199 * sigproc.cc (proc_terminate): Don't release pinfo structs since we are
1201 * include/sys/cygwin.h: Add CW_INIT_EXCEPTIONS.
1203 Thu Aug 24 17:16:14 2000 Christopher Faylor <cgf@cygnus.com>
1205 * select.cc (cygwin_select): Correct logic for "always_ready" fds or
1206 when there is no wait specified.
1207 * syslog.cc (pass_handler::set_message): Zero the buffer prior to
1210 2000-08-24 Egor Duda <deo@logos-m.ru>
1212 * include/cygwin/core_dump.h: New file, contains structures used in
1213 cygwin core core files.
1214 * include/sys/procfs.h: New file, needed to autoconfigure cygwin core
1215 dumps support in bfd.
1217 Thu Aug 24 13:50:15 2000 Christopher Faylor <cgf@cygnus.com>
1219 * environ.cc (parse_thing): nobinmode should force O_TEXT.
1220 (regopt): Use correct path to find LOCAL_MACHINE registry options.
1221 * fhandler.cc (fhandler_base::open): Set binary mode only when binmode
1223 * pipe.cc (pipe): Pipe handling should rely on binmode not _fmode now
1224 that the two are different.
1226 Thu Aug 24 13:21:09 2000 Christopher Faylor <cgf@cygnus.com>
1228 * include/sys/cygwin.h (strace_printf_wrap): Force printing when
1230 (strace_printf_wrap1): Ditto.
1232 Thu Aug 24 12:30:17 2000 Christopher Faylor <cgf@cygnus.com>
1234 * debug.h: Allow some debug defines for use in header files.
1236 Wed Aug 23 23:00:24 2000 Christopher Faylor <cgf@cygnus.com>
1238 * dcrt0.cc (dll_crt0_1): Move exception list and constructor stuff
1239 earlier in the process. Use new second argument to set_myself.
1240 (cygwin_dll_init): Initialize exception list and constructor stuff
1242 (_dll_crt0): And here. Also, deal with inherited pinfo shared memory
1244 * pinfo.cc (set_myself): Accept a second argument signifying the a
1245 shared memory region, passed from an execing parent.
1246 (pinfo_init): Ditto.
1248 * shared.h (child_info): Add a handle field to pass to child.
1249 * spawn.cc (spawn_guts): Create a shared handle to pass to an execed
1251 * winsup.h: Remove extraneous declaration.
1253 Wed Aug 23 10:51:57 2000 Christopher Faylor <cgf@cygnus.com>
1255 * include/sys/cygwin.h: Protect class definitions.
1257 Tue Aug 22 13:57:36 2000 Christopher Faylor <cgf@cygnus.com>
1259 * path.cc (symlink_info::check): Clear error on each iteration of
1262 Tue Aug 22 11:23:59 2000 Christopher Faylor <cgf@cygnus.com>
1264 * Makefile.in: Don't include '.d' file if there are none generated yet.
1266 Tue Aug 22 11:08:11 2000 Christopher Faylor <cgf@cygnus.com>
1268 * include/sys/cygwin.h: Declare some thread classes.
1269 * include/mntent.h: Avoid declaring functions.
1271 Tue Aug 22 01:08:01 2000 Christopher Faylor <cgf@cygnus.com>
1273 * winsup.h: Eliminate inclusion of most of the cygwin .h files. Use .h
1274 files only in sources which require them.
1275 * Makefile.in: Generate dependencies with -MD option.
1277 Mon Aug 21 23:49:05 2000 Christopher Faylor <cgf@cygnus.com>
1279 * cygerrno.h: New file. Use this throughout whenever errno
1280 manipulation is required.
1281 * errno.cc: Use DWORD to hold Windows errors.
1282 (geterrno_from_win_error): New function.
1283 (seterrno_from_win_error): Use geterrno_from_win_error to convert
1284 supplied windows error (suggested by Corinna Vinschen).
1285 * path.cc (symlink_info): Add error element.
1286 * path.cc (path_conv::check): Remove errno setting. Use new
1287 symlink_info errno element to set path_conv error, where appropriate.
1288 (symlink_info::check): Set error element rather than attempting to
1289 manipulate errno. Add more checks for trailing / and /.. even though
1290 they are currently useless. Avoid setting EINVAL.
1292 Mon Aug 21 23:49:05 2000 Corinna Vinschen <corinna@vinschen.de>
1294 * path.cc (normalize_posix_path): Correct check for trailing /.
1296 2000-08-21 DJ Delorie <dj@redhat.com>
1298 * include/cygwin/cygwin_dll.h (DECLARE_CYGWIN_DLL): hinstance,
1301 Fri Aug 18 11:11:00 2000 Corinna Vinschen <corinna@vinschen.de>
1303 * dtable.cc (dtable::dup2): Extend fdtab if newfd is out of current
1306 Sat Aug 12 01:47:28 2000 Christopher Faylor <cgf@cygnus.com>
1308 * mkvers.sh: Properly trap exit removal of temp file. Remove debugging
1311 Sat Aug 12 01:37:56 2000 Christopher Faylor <cgf@cygnus.com>
1313 * poll.cc: Make winsup.h the first include file, re 2000-08-02 change.
1315 Sat Aug 12 01:33:12 2000 Christopher Faylor <cgf@cygnus.com>
1317 * winsup.h: Split out dtable definitions into separate header file.
1318 * dtable.h: New file.
1319 * sigproc.h: Eliminate pinfo.h usage here. Use it in source files that
1322 Sat Aug 12 01:08:11 2000 Christopher Faylor <cgf@cygnus.com>
1324 * Makefile.in: Use dtable.o rather than hinfo.o.
1326 Sat Aug 12 00:47:11 2000 Christopher Faylor <cgf@cygnus.com>
1328 Rename hinfo -> dtable. Name the former dtable array 'fdtab'.
1330 Fri Aug 11 14:47:00 2000 Corinna Vinschen <corinna@vinschen.de>
1332 * poll.cc: Allow any descriptor and any number of descriptors.
1333 Allocate fd_set struct sdynamically.
1335 Fri Aug 11 14:47:00 2000 Corinna Vinschen <corinna@vinschen.de>
1337 * poll.cc: Add bounds checking for file descriptors. Return POLLNVAL
1338 if fd is invalid. Return POLLERR for each valid fd if cygwin_select
1339 returned with error.
1340 include/sys/poll.h: Change POLLERR comment according to above change.
1342 Thu Aug 10 21:54:29 2000 Christopher Faylor <cgf@cygnus.com>
1344 * syslog.cc (syslog): Use a less malloc-intensive method for allocating
1345 the buffer. Also fix a buffer overrun.
1347 Thu Aug 10 15:31:39 2000 Christopher Faylor <cgf@cygnus.com>
1349 * winsup.h: Change strchr inline for strange gcc problem.
1350 * select.cc (select_stuff::wait): Bounds check w4 array.
1352 Thu Aug 10 15:17:53 2000 Christopher Faylor <cgf@cygnus.com>
1354 * dir.cc (readdir): Ensure that errno is *only* set when we've run out
1356 * fhandler.cc (fhandler_disk_file::fstat): Use modern method for saving
1357 errno, making it effective for the whole function.
1359 Tue Aug 8 22:25:39 2000 Christopher Faylor <cgf@cygnus.com>
1361 * select.cc (allocfd_set): Zero allocated fd_set.
1362 (cygwin_select): Move fd_set copying logic from ::wait to here. Use
1363 common return through sell.poll.
1364 (select_stuff::wait): Just return success or failure and let caller
1366 * pinfo.h (pinfo): Eliminate self-referential pointer to sidbuf since
1367 pinfo structure exists at random locations now.
1368 * fork.cc (fork): Use 'use_psid' element to control when the psid is
1370 * shared.cc (sec_user): Ditto.
1371 * spawn.cc (spawn_guts): Ditto.
1372 * uinfo.cc (internal_getlogin): Ditto.
1373 * syscall.cc (seteuid): Ditto. Set use_psid element.
1375 Tue Aug 8 13:20:00 2000 Bob Wilson <bwilson@tensilica.com>
1377 * fhandler_serial.cc (tcsendbreak): "sleeptime" argument to usleep()
1378 must be in units of microseconds, not milliseconds.
1380 Mon Aug 7 00:11:35 2000 Christopher Faylor <cgf@cygnus.com>
1382 * include/cygwin/cygwin_dll.h: Remove extraneous (and incorrect)
1385 Fri Aug 4 00:00:46 2000 Christopher Faylor <cgf@cygnus.com>
1387 * hinfo.cc (hinfo::find_unused_handle): Just check for table entry ==
1388 NULL since we are already bounds checked by default.
1389 * thread.cc (ResourceLocks::Lock): Streamline this function since it is
1391 (ReleaseResourceLock): Ditto.
1393 Thu Aug 3 20:44:39 2000 Christopher Faylor <cgf@cygnus.com>
1395 * select.cc (fhandler_console::select_read): Call set_cursor_maybe
1396 since select may block and cursor may not be visible.
1397 * select.cc (fhandler_console::select_write): Ditto.
1398 * select.cc (fhandler_console::select_except): Ditto.
1400 Thu Aug 3 09:01:14 2000 Christopher Faylor <cgf@cygnus.com>
1402 * fhandler_tty.cc (fhandler_pty_master::process_slave_output): Set
1403 length field correctly when "need_nl".
1405 Wed Aug 2 22:58:07 2000 Christopher Faylor <cgf@cygnus.com>
1407 * fork.cc (vfork): Store complete stack frame in vfork_save structure
1409 * spawn.cc (spawn_guts): Reorganize slightly to consolidate handling
1410 when there is a CreateProcess error.
1411 (_spawnve): Only longjmp back to vfork handling when a process has been
1412 successfuly started.
1413 * winsup.h (vfork_save): Extend to include frame info. Remove obsolete
1414 cpplus conditionals.
1416 Wed Aug 2 15:14:51 2000 Christopher Faylor <cgf@cygnus.com>
1418 * strace.cc (strace::prntf): Make second argument the function name,
1419 rather than use special format options.
1420 (strace::vprntf): Ditto.
1421 (getfunc): New function.
1422 * include/sys/strace.h: Reflect above changes.
1423 * smallprint.c (__small_vsprintf): Eliminate '%F' formatting.
1424 * pinfo.cc (set_myself): Modify for new strace::prntf parameter.
1425 * errno.cc (seterrno_from_win_error): Ditto.
1426 * fhandler_tty.cc (fhandler_tty_common::__acquire_output_mutex): Ditto.
1427 * fhandler_tty.cc (fhandler_tty_common::__release_output_mutex): Ditto.
1429 Wed Aug 2 13:20:04 2000 Christopher Faylor <cgf@cygnus.com>
1431 * regexp/regexp.c: Add winsup.h.
1433 2000-08-02 DJ Delorie <dj@redhat.com>
1435 * winsup.h: take out protections of environ, errno, allow C use
1436 * *.cc: put winsup.h before other headers (for __INSIDE_CYGWIN__);
1437 use cur_environ() instead of just environ
1438 * times.cc: remove import protections
1439 * glob.c: add winsup.h
1440 * localtime.c: ditto
1441 * smallprint.c: ditto
1442 * Makefile.in: don't __INSIDE_CYGWIN__ as it messes up profiling.
1444 Wed Aug 2 11:22:53 2000 Christopher Faylor <cgf@cygnus.com>
1446 * include/sys/strace.h: Fix strace definition.
1448 Tue Aug 1 23:37:08 2000 Christopher Faylor <cgf@cygnus.com>
1450 * strace.h: Add kludgy workarounds to avoid using deprecated methods
1451 for variable argument macros when possible.
1452 * sigproc.cc: Throughout, use sigproc_printf rather than sip_printf.
1453 * strace.cc (strace::prntf): Remove 'active' check, since callers are
1454 supposed to ensure this.
1455 (__system_printf): Remove. Subsumed by strace::prntf.
1456 * winsup.h: Define "NEW_MACRO_VARARGS" to indicate when to use new
1457 macro varargs capability.
1459 Sun Jul 30 13:54:35 2000 Christopher Faylor <cgf@cygnus.com>
1461 * fhandler_console.cc: Remove VK_DIVIDE detection.
1462 (get_nonascii_key): Simplify previous patch to return ascii char if it
1463 is non-zero. Add a second "temporary buffer" argument to help with
1465 * select.cc (peek_console): Pass a temporary buffer argument to
1468 Sat Jul 29 14:32:12 2000 Christopher Faylor <cgf@cygnus.com>
1470 * fhandler_console.cc: Add VK_DIVIDE detection. Return virtual keycode
1471 if it is not detected and it is less than ' '.
1473 Sat Jul 29 13:33:49 2000 Christopher Faylor <cgf@cygnus.com>
1475 * path.cc (chdir): Avoid trailing dot calculation when chdir == '/'
1476 or we end up with an empty string.
1478 Sat Jul 29 12:11:33 2000 Christopher Faylor <cgf@cygnus.com>
1480 * include/cygwin/version.h: Bump DLL minor version number to 5 due
1481 to all of the changes below.
1483 Sat Jul 29 12:01:32 2000 Christopher Faylor <cgf@cygnus.com>
1485 Redefine process structure to avoid a fixed size table. Redefine
1486 pinfo/_pinfo classes. Use these throughout.
1487 * dcrt0.cc (dll_crt0_1): Accomodate set_myself argument change.
1488 (__api_fatal): Accomodate _pinfo::record_death argument change.
1489 * exceptions.cc (really_exit): Ditto.
1490 (sig_handle_tty_stop): Use pinfo constructor to access process info.
1491 (events_init): Don't create pinfo_mutex since it is no longer required.
1492 * external.cc (fillout_pinfo): Use winpids class to iterate over all
1494 (cygwin_internal): lock_pinfo_for_update and unlock_pinfo are now
1496 * fhandler_termios.cc (fhandler_termios::set_ctty): Use pinfo
1497 constructor to access process info.
1498 * fork.cc (fork): Reorganize to initialize child info after the child
1499 has started since that is when we know the child's winpid, which is
1500 necessary to allocate the pinfo shared memory.
1501 * mmap.cc (recreate_mmaps_after_fork): Change arg type to _pinfo.
1502 * pinfo.cc: Rename pinfo methods to _pinfo throughout. Eliminate
1504 (set_myself): Accept a pid argument now. Call pinfo initializer to
1505 initialize myself. Detect when this is an "execed" process and create
1506 an "indirect" pid block.
1507 (pinfo_init): Accomodate set_myself arg change.
1509 (pinfo::lock_pinfo): Remove.
1510 (pinfo::unlock_pinfo): Remove.
1511 (pinfo::init): New method. Allocates shared memory space for process
1513 (pinfo::record_death): Don't call locking functions.
1514 (cygwin_winpid_to_pid): Simplify by using new pinfo constructor.
1515 (EnumProcessesW95): New function for iterating over processes on
1517 (winpids::winpids): New constructor for winpids class. Sets up a list
1519 (enum_init): Initialize w95/wnt pid enumerators.
1520 * shared.cc (shared-info::initialize): Remove pid initialization.
1521 * shared.h: Move pinfo stuff into pinfo.h.
1522 (class shared_info): Remove pinfo_list element.
1523 * signal.cc (kill_worker): Use pinfo constructor to access process
1525 (kill_pgrp): Ditto. Use winpids methods to access list of processes.
1526 * sigproc.cc: Throughout, modify to use _pinfo where appropriate.
1527 (proc_exists (pid_t)): New function. Determines if a process exists
1529 (proc_exists (_pinfo *p): Use new proc_exists function above.
1530 (proc_subproc): Copy pinfo stuff around rather than _pinfo pointers.
1531 Try to be careful about releasing shared memory when we don't need it
1532 anymore. Remove pinfo locks.
1533 (remove_zombies): Remove pinfo memory when zombie is going away.
1534 * sigproc.h: Reflect _pinfo/pinfo changes in sigproc.cc.
1535 * spawn.cc (spawn_guts): Eliminate pinfo *child argument. Reorganize
1536 to only initialize child pinfo after process has been started and we
1537 know the windows pid.
1538 (_spawnve): Reflect spawn_guts changes.
1539 * syscalls.cc (setpgid): Use pinfo constructor to access process info.
1541 (internal_getlogin): Use _pinfo.
1542 * winsup.h: Eliminate pinfo_mutex. Eliminate spawn_guts declaration
1543 since it is static now. Reflect set_myself argument change.
1544 * include/sys/cygwin.h: Add some PID_* enums to accomodate new pinfo
1547 Sat Jul 29 12:13:27 2000 Christopher Faylor <cgf@cygnus.com>
1549 * include/cygwin/version.h: Update minor version for cygdrive changes
1552 Sat Jul 29 11:59:29 2000 Christopher Faylor <cgf@cygnus.com>
1554 * environ.cc (parse_thing): Make binmode a DWORD.
1555 * hinfo.cc (hinfo::init_std_file_from_handle): Use 'binmode' to
1556 determine default open mode.
1557 * winsup.h: Declare binmode.
1559 Sat Jul 29 00:16:35 2000 Christopher Faylor <cgf@cygnus.com>
1561 * include/cygwin/cygwin_dll.h: Update for modern compilers.
1562 * lib/cygwin_crt0.c: Inexplicably need to define alloca for newer
1564 * fhandler.h (fhandler_console): Add new method.
1565 * fhandler.cc (fhandler_console::set_cursor_maybe): New method.
1566 (fhandler_console::read): Set cursor if it has moved to make it
1569 Thu Jul 27 22:54:28 2000 Jason Tishler <jt@dothill.com>
1571 * dcrt0.cc (dummy_autoload): Add load statement for RegDeleteValueA.
1572 * external.cc (get_cygdrive_prefixes): New function.
1573 (cygwin_internal): Add CW_GET_CYGDRIVE_PREFIXES case.
1574 * path.cc (mount_info::read_cygdrive_info_from_registry): Read system
1575 cygdrive prefix if user one is undefined.
1576 (mount_info::write_cygdrive_info_to_registry): Write cygdrive prefix to
1577 the appropriate registry hive. Overwrite in-memory copy of cygdrive,
1579 (mount_info::remove_cygdrive_info_from_registry): New method.
1580 (mount_info::get_cygdrive_prefixes): New method.
1581 (cygwin_umount): Remove cygdrive prefix, if appropriate.
1582 * registry.cc (reg_key::killvalue): New method.
1583 * shared.h (class reg_key): Add killvalue,
1584 remove_cygdrive_info_to_registry, and get_cygdrive_prefixes
1586 * include/sys/cygwin.h (cygwin_getinfo_types): Add
1587 CW_GET_CYGDRIVE_PREFIXES.
1589 Thu Jul 27 23:33:32 2000 Christopher Faylor <cgf@cygnus.com>
1591 * include/cygwin/version.h: Bump DLL minor version number to 4.
1593 2000-07-27 DJ Delorie <dj@redhat.com>
1595 * testsuite/winsup.api/winsup.exp: ignore stdout by default
1596 * testsuite/winsup.api/crlf.c: non-verbose by default
1598 * winsup.h: prune out windows headers we don't normally need
1599 * assert.cc: add wingdi.h and winuser.h
1600 * fhandler_console.cc: ditto
1601 * fhandler_windows.cc: ditto
1607 * hinfo.cc: add winsock.h
1608 * syscalls.cc: add winnls.h
1611 Thu Jul 27 10:24:36 2000 Egor Duda <deo@logos-m.ru>
1613 * fhandler.cc (fhandler_disk_file::fstat): Allow block calculation to
1614 succeed for files >= 2GB and <= 4GB.
1616 Wed Jul 26 16:05:04 2000 Christopher Faylor <cgf@cygnus.com>
1618 * exceptions.cc (signal_exit): Renamed from "really_exit". Always sets
1619 EXIT_SIGNAL bit and reorganizes exit value for backwards cygwin
1621 (handle_exceptions): Call signal_exit. Set "core dumped" bit.
1622 (sig_handle): Call signal_exit. Set "core dumped" bit appropriately.
1624 Wed Jul 26 20:44:00 2000 Corinna Vinschen <corinna@vinschen.de>
1626 * environ.cc (posify): Revert previous patch.
1627 (_addenv): Remove check_null_empty_path from here.
1628 (putenv): Call check_nullempty_path.
1629 (setenv): Call check_nullempty_path for name as well here.
1630 Don't report an error if value is empty string.
1631 (environ_init): Revert usage of newp.
1633 Wed Jul 26 14:32:38 2000 Egor Duda <deo@logos-m.ru>
1635 * syscalls.cc (stat_worker): Make stat return correct st_blocks for
1636 files with size bigger than 2Gb and less than 4Gb
1638 Wed Jul 26 17:43:00 2000 Corinna Vinschen <corinna@vinschen.de>
1640 * security.cc (lookup_name): Search on local machine first if
1641 myself->domain is not empty.
1643 2000-07-26 DJ Delorie <dj@cygnus.com>
1645 * fhandler_console.cc (fhandler_console::read): Explicitly set cursor
1646 to make it visible while waiting in WaitForMultipleObjects.
1648 Wed Jul 26 10:59:00 2000 Corinna Vinschen <corinna@vinschen.de>
1650 * passwd.cc: Change name of passwd_in_memory_p to passwd_state.
1651 Change type to enum. Change storage class to static. Adjust comments.
1652 (read_etc_passwd): Set passwd_state to different values when loaded
1653 from file in contrast to being emulated.
1654 (search_for): Return default passwd entry if passwd is emulated or
1655 it's a request for the current user. Otherwise return NULL.
1657 Tue Jul 25 21:50:42 2000 Christopher Faylor <cgf@cygnus.com>
1659 * syscalls.cc (statfs): Use path_conv method to convert input path.
1661 Tue Jul 25 21:40:51 2000 Christopher Faylor <cgf@cygnus.com>
1663 * syscalls.cc (_link): Avoid extraneous call to
1664 cygwin_conv_to_win32_path.
1666 Tue Jul 25 21:11:15 2000 Christopher Faylor <cgf@cygnus.com>
1668 * environ.cc (_addenv): New function. Subsumes functionality of
1669 putenv/setenv. Does not allocate space for putenv case.
1670 (putenv): Use _addenv to add a value to the environment.
1672 (environ_init): Don't malloc space for each entry in the environment
1673 table. Just use the space from GetEnvironmentStrings.
1674 (posify): Don't free the src argument since it is no longer malloced.
1676 Mon Jul 24 21:10:00 2000 Corinna Vinschen <corinna@vinschen.de>
1678 * syscalls.cc (_link): Corrected previous patch.
1680 Mon Jul 24 13:26:00 2000 Corinna Vinschen <corinna@vinschen.de>
1682 * fhandler.h (class fhandler_dev_random): Add members for managing
1684 * fhandler_random.cc: Rearrange. Use pseudo random number generator
1685 as entropy source if system entropy isn't available and if device is
1686 used as /dev/urandom. Allow initializing device by calling write().
1688 Sun Jul 23 23:11:00 2000 Corinna Vinschen <corinna@vinschen.de>
1690 * fhandler.h: Add comment.
1692 Sun Jul 23 20:00:00 2000 Corinna Vinschen <corinna@vinschen.de>
1694 * fhandler.h (class fhandler_dev_raw): Add private member `varblkop'
1695 to be set when variable blocksize mode is on.
1696 * fhandler_raw.cc: Eliminate `\n' from trace output.
1697 (clear): Set `varblkop' to 0.
1698 (dup): Copy varblkop as well.
1699 (writebuf): Care for variable blocksize.
1703 * fhandler_tape.cc (open): Ditto.
1704 (ioctl): Ditto. Some cleanups.
1706 Sat Jul 22 18:40:00 2000 Corinna Vinschen <corinna@vinschen.de>
1708 Patch suggested by Kazuhiro Fujieda <fujieda@jaist.ac.jp>.
1709 * winsup.h: Add new macros sys_wcstombs and sys_mbstowcs.
1710 * syscalls.cc (_link): Replace calls to mbstowcs by call to
1712 * uinfo.cc (internal_getlogin): Replace calls to wcstombs and
1713 mbstowcs by calls to sys_wcstombs and sys_mbstowcs. Replace
1714 usage of constants by meaningful defines. Use result of
1715 GetSystemDirectory for HOMEPATH and HOMEDRIVE as a last resort.
1717 Fri Jul 21 21:33:00 2000 Corinna Vinschen <corinna@vinschen.de>
1719 * spawn.cc (span_guts): Retrieve security attributes before setting
1722 Fri Jul 21 12:03:00 2000 Corinna Vinschen <corinna@vinschen.de>
1724 * security.cc (acl_worker): Use stat_suffixes in call to path_conv
1725 just as in `stat_worker'.
1727 Wed Jul 19 22:24:00 2000 Corinna Vinschen <corinna@vinschen.de>
1729 * spawn.cc (spawn_guts): Don't restore impersonation in case
1730 of _P_OVERLAY. Clean up slightly. Accomodate comments.
1732 Wed Jul 19 22:11:00 2000 Corinna Vinschen <corinna@vinschen.de>
1734 * shared.h (class pinfo): New members `root' and `rootlen'.
1735 * syscalls.cc (chroot): Set new root for process.
1736 * path.cc (getcwd_inner): Add parameter to force use of
1737 new root from chroot() call.
1738 (ischrootpath): New macro.
1739 (normalize_posix_path): Care for changed root dir.
1740 (normalize_win32_path): Ditto.
1741 (getcwd_inner): Ditto.
1742 (chdir): Eliminate trailing path component consisting
1744 * fork.cc (fork): Copy pinfo members regarding chroot().
1745 * spawn.cc (_spawnve): Ditto.
1746 * dir.cc (opendir): Don't use computed win32 path if
1747 chroot() took place.
1749 Mon Jul 17 22:21:34 2000 Christopher Faylor <cgf@cygnus.com>
1751 * dll_init.cc (dll_list::alloc): Fix debugging output.
1753 Mon Jul 17 14:57:53 2000 Christopher Faylor <cgf@cygnus.com>
1755 Throughout, eliminate third argument to path_conv and use new PC_*
1756 constants for second argument.
1757 * dcrt0.cc (dll_crt0_1): Reorganize to allow more initialization prior
1758 to returning due to dynamic loading.
1759 * path.h: Generalize SYMLINK_* constants to PC_*.
1760 (path_conv): Create a new method. Fold third argument into second.
1761 * dll_init.cc (dll_list::alloc): Try harder to find space to allocate
1763 (dll_dllcrt0): Don't check sanity if we've already called dll_crt0.
1764 * path.cc (path_conv::check): Don't check for a null or empty path
1765 unless specifically told with a flag setting.
1766 (check_null_empty_path): New function, adapted from macro.
1767 * syscalls.cc (_rename): Use already-determined file attributes rather
1768 than checking again.
1769 * lib/cygwin/cygwin_attach.dll.c (cygwin_attach_dll): Use a static
1770 per_process structure since this is apparently supposed to be zeroed.
1771 * lib/cygwin_crt0.c (cygwin_crt0): Zero per_process structure sent to
1774 Mon Jul 17 19:39:00 2000 Corinna Vinschen <corinna@vinschen.de>
1776 Patch suggested by Eric Fifer <EFifer@sanwaint.com>
1777 * poll.cc (poll): Fix erroneous negations.
1779 Mon Jul 17 17:56:00 2000 Corinna Vinschen <corinna@vinschen.de>
1781 * environ.cc (setenv): Use __cygwin_environ instead of
1782 environ after reallocating environment space.
1784 Sun Jul 16 20:23:21 2000 Christopher Faylor <cgf@cygnus.com>
1786 * _cygwin_crt0_common.cc: Undef 'environ' or suffer compiler error.
1788 Sun Jul 16 16:03:00 2000 Christopher Faylor <cgf@cygnus.com>
1790 * environ.cc: Use new definition of "environ" throughout.
1791 (environ_init): Explicitly initialize __cygwin_environ.
1792 (cur_environ): New function. Detects when user has updated
1794 * exec.cc: Use 'environ' define throughout rather than __cygwin_environ.
1796 * winsup.h: Declare cur_environ, main_environ, environ.
1798 Sun Jul 16 13:23:04 2000 Christopher Faylor <cgf@cygnus.com>
1800 * acconfig.h: Add support for NEWVFORK.
1801 * config.h.in: Ditto.
1802 * configure.in: Add --enable-vfork option.
1803 * configure: Regenerate.
1804 * dcrt0.cc (quoted): Detect and fix up quoted backslashes.
1805 * sigproc.cc (proc_subproc): Correctly name handle of newly added child
1806 process to avoid erroneous debugging messages about closing the wrong
1809 Sun Jul 16 02:30:09 2000 Christopher Faylor <cgf@cygnus.com>
1811 * spawn.cc (spawn_guts): Use \ for quoting '"'.
1812 * dcrt0.cc (quoted): Understand \ quoting for '"'.
1814 Sun Jul 16 00:32:58 2000 Christopher Faylor <cgf@cygnus.com>
1816 * dcrt0.cc (build_argv): Strip quotes from argv[0] since it should
1819 Sat Jul 15 00:32:41 2000 Christopher Faylor <cgf@cygnus.com>
1821 * dll_init.cc (dll_list::alloc): Round correctly. Use VirtualAlloc
1822 since shared file mapping is unnecessary.
1823 (dll_list::detach): Release memory via VirtualFree since there we no
1824 longer use shared file mapping.
1826 Fri Jul 14 22:40:22 2000 Christopher Faylor <cgf@cygnus.com>
1828 * hinfo.cc (hinfo::linearize_fd_array): Make max_used_fd an int so that
1829 we can detect when there are no fds to pass.
1830 * dcrt0.cc (host_dependent_constants::init): Revert Sat Mar 18 01:32:04
1832 (dll_crt0_1): Set "cygwin_finished_initializing" flag.
1833 (dll_crt0): Don't perform memcpy if uptr is already set to internal
1835 (_dll_crt0): Remember location of programs envptr.
1836 * dll_init.h (per_module, dll, dll_list): Revamp.
1837 * dll_init.cc: Revamp. Use new classes.
1838 * fork.cc (fork): Use new revamped dll, dll_list, and per_module stuff.
1839 * environ.cc: Use __cygwin_environ throughout rather than the
1843 * winsup.h: Declare update_envptrs, cygwin_finished_initializing.
1844 * lib/_cygwin_crt0_common.cc (_cygwin_crt0_common): Revert previous
1846 * lib/cygwin_attach_dll.cc (cygwin_attach_dll): Always pass in own
1847 per_process structure or we end up overwriting information from the
1850 Wed Jul 12 00:46:00 2000 Christopher Faylor <cgf@cygnus.com>
1852 * debug.cc (thread_stub): Use impure_ptr in place of reent_data.
1853 * dll_init.cc (dll_dllcrt0): Replace erroneous use of local symbol with
1854 correct __cygwin_user_data->impure_ptr.
1856 Wed Jul 12 00:01:03 2000 Christopher Faylor <cgf@cygnus.com>
1858 * lib/_cygwin_crt0_common.cc (_cygwin_crt0_common): Don't reset
1859 environ if already set.
1861 Mon Jul 10 19:07:03 2000 Christopher Faylor <cgf@cygnus.com>
1863 * fhandler_console.cc (fhandler_console::read): Unicode interface
1864 to ReadConsoleInput only exists on W2K, so use workaround from
1865 Kazuhiro Fujieda <fujieda@jaist.ac.jp>.
1867 Mon Jul 10 11:30:00 2000 Christopher Faylor <cgf@cygnus.com>
1869 * Makefile.in (install): Install textmode.o as well as binmode.o.
1870 * fhandler_console.cc (fhandler_console::read): Use UNICODE when
1871 reading from the console and translate to ASCII from that.
1873 Sun Jul 9 21:52:00 2000 Corinna Vinschen <corinna@vinschen.de>
1875 * spawn.cc (spawn_guts): Close handle `hToken' only if it's not
1876 copied from myself->token.
1877 * syscalls.cc (seteuid): Replace CopySid by memcpy which is foolproof
1880 Sun Jul 9 01:19:06 2000 Christopher Faylor <cgf@cygnus.com>
1882 * cygwin.din: Export _getmode and getmode to allow querying of binary
1884 * external.cc (cygwin_internal): Add handling of perfile_table setting.
1885 * fhandler.cc (perfile_table): New global.
1886 (fhandler_base::get_default_fmode): New method to return a file's
1887 default mode based on its name.
1888 (fhandler_base::open): Use get_default_mode method to determine a
1889 file's mode. Record file mode in file flags.
1890 * fhandler.h (fhandler_base): Declare get_default_fmode
1891 * syscalls.cc (getmode): New function.
1892 * sys/cygwin.h (__cygwin_perfile): New structure.
1893 (cygwin_getinfo_types): Move outside of WINVER conditional.
1894 (per_process): Move inside of WINVER conditional.
1896 Sat Jul 8 00:15:01 2000 Christopher Faylor <cgf@cygnus.com>
1898 * external.cc (cygwin_internal): Export __cygwin_user_data.
1899 * include/sys/cygwin.h: Allow definition of per_process even when not
1901 (cygwin_getinfo_types): Add CW_USER_DATA.
1902 * lib/_cygwin_crt0_common.cc (_cygwin_crt0_common): Get
1903 __cygwin_user_data pointer from cygwin_internal. If it doesn't exist,
1904 return failure. Use either this pointer or passed in pointer
1905 throughout. Clear forkee.
1906 * lib/crt0.h: Accomodate argument changes to _cygwin_crt0_common.
1907 * lib/cygwin_attach_dll.c (cygwin_attach_dll): Reorganize to allow use
1908 of newer binaries with older DLLs. Detect older DLLs when
1909 _cygwin_crt0_common returns 0 and allocate space for a per_process
1910 structure on the stack.
1911 * lib/cygwin_crt0.c (cygwin_crt0): Ditto.
1913 Fri Jul 7 10:31:00 2000 Corinna Vinschen <corinna@vinschen.de>
1915 * include/sys/cygwin.h: Hide internal data types in per_process
1916 when not __INSIDE_CYGWIN__.
1918 Wed Jul 5 18:56:58 2000 Christopher Faylor <cgf@cygnus.com>
1920 * dcrt0.cc (__cygwin_user_data): Initialize.
1921 (dll_crt0_1): Eliminate user_data initialization.
1922 (dll_crt0): Set up impure_ptr_ptr for older executables.
1923 (cygwin_dll_init): Eliminate user_data initializations.
1924 (__api_fatal): Don't check for user_data initialization.
1925 * dll_init.cc (struct dll): Store entire contents of per_process rather
1926 than just a pointer.
1928 (initOneDll): Don't check for user_data initialization.
1929 (DllList::recordDll): Store contents of per_process argument.
1930 (DllList::detachDll): Pass address of per_process field.
1931 (DllList::initAll): Ditto.
1932 (DllList::doGlobalDestructorsOfDlls): Ditto.
1933 (DllListIterator::operator *): Ditto.
1934 (dll_dllcrt0): Default to __cygwin_user_data if arg is NULL.
1935 * include/sys/cygwin.h: Reorganize per_process to eliminate obsolete
1936 fields and accomodate new way of initializing.
1937 * lib/_cygwin_crt0_common: Initialize _impure_ptr from
1938 __cygwin_user_data.impure_ptr.
1940 2000-07-04 Vadim Egorov <egorovv@mailandnews.com>
1942 * exceptions.cc (try_to_debug): Prevent recursive spawning of JIT
1943 debugger. Treat special event from debugger as command to continue.
1945 Mon Jul 4 19:29:00 2000 Corinna Vinschen <corinna@vinschen.de>
1947 * poll.cc (poll): Zero out `open_fds' as well.
1949 Mon Jul 4 1:22:00 2000 Corinna Vinschen <corinna@vinschen.de>
1951 * include/cygwin/version.h: Bump API minor version to 24.
1953 2000-07-04 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
1955 * security.cc (read_sd): Eliminate OemToChar.
1957 Mon Jul 4 18:57:00 2000 Corinna Vinschen <corinna@vinschen.de>
1959 * poll.cc: New file. Implement `poll' system call.
1960 * include/poll.h: Ditto.
1961 * include/sys/poll.h: Ditto.
1962 * Makefile.in: Add poll.o as dependency.
1963 * cygwin.din: Add poll and _poll symbols.
1965 2000-07-04 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
1967 * dcrt0.cc (dll_crt0_1): Eliminate SetFileApisToOEM and CharToOem.
1968 * (dummy_autoload): Add functions used in fhandler_console.
1969 * fhandler_console.cc (fhandler_console::read): Use ENCHANCED_KEY flag
1970 to distinguish extended keys. Translate an input character from the
1971 OEM code page to the ANSI code page.
1972 * (fhandler_console::write_normal): Translate output characters from
1973 the ANSI code page to the OEM code page.
1974 * syscalls.cc (_link): Use MultiByteToWideChar instead of OemToCharW.
1976 Mon Jul 3 16:09:16 2000 Christopher Faylor <cgf@cygnus.com>
1978 * exceptions.cc (stack_info::walk): Use method to find offset.
1979 (handle_exceptions): Be more assertive in finding ebp for use under
1980 W2K. Create a dummy stack frame for cases where program is dying and a
1981 stack dump is being output.
1982 (sig_handle): Fill out a GetThreadContext for use with a user-generated
1985 Mon Jul 3 10:53:00 2000 Corinna Vinschen <corinna@vinschen.de>
1987 * include/cygwin/socket.h: Remove SOCK_PACKET define since it's
1988 not supported by Windows sockets.
1990 Sun Jul 2 21:50:48 2000 Christopher Faylor <cgf@cygnus.com>
1992 * dcrt0.cc (user32_init): Add primitive guard against concurrent
1993 attempts to call this function. Also add temporary debugging code to
1994 display a message if the function is called multiple times.
1995 (api32_init): Ditto.
1997 Sun Jul 2 10:39:00 2000 Corinna Vinschen <corinna@vinschen.de>
1999 * winsup.h: Define MAX_SID_LEN and new MAX_HOST_NAME.
2000 * fork.cc (fork): Use above defines instead of numerical constants.
2001 * shared.cc (sec_user): Ditto.
2002 * shared.h (class pinfo): Ditto.
2003 * syscall.cc (seteuid): Ditto.
2004 * spawn.cc (_spawnve): Ditto. Eliminate conditional.
2005 (spawn_guts): Set child->uid = USHRT_MAX when user context will be
2006 changed in child process.
2007 * uinfo.cc (uinfo_init): Check for myself->uid instead of myself->psid
2008 to avoid reloading of /etc/passwd on process startup if ntsec is off.
2009 Use above defines instead of numerical constants.
2010 * security.cc: Move define for MAX_SID_LEN to winsup.h.
2012 Sun Jul 2 1:57:00 2000 Corinna Vinschen <corinna@vinschen.de>
2014 * uinfo.cc (uinfo_init): Eliminate calls to read_etc_group()
2015 and read_etc_passwd().
2017 2000-06-28 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
2019 * assert.cc (__assert): Reduce dependency on newlib.
2020 * exec.cc: Eliminate unnecessary inclusion of ctype.h.
2026 * grp.cc (parse_grp): Eliminate atoi.
2027 * passwd.cc (grab_int): Ditto.
2028 * grp.cc (getgroups): Eliminate str{n,}casecmp.
2029 * path.cc (get_raw_device_number): Ditto.
2030 * path.cc (sort_by_native_name): Ditto.
2031 * spawn.cc (iscmd): Ditto.
2032 * uinfo.cc (internal_getlogin): Ditto.
2034 Sat Jul 1 11:43:32 2000 Christopher Faylor <cgf@cygnus.com>
2036 * binmode.c (cygwin_premain0): Fix erroneous clearing of bit.
2037 * textmode.c (cygwin_premain0): Ditto.
2039 Sat Jul 1 00:24:04 2000 Christopher Faylor <cgf@cygnus.com>
2041 * dcrt0.cc (_dll_crt0): Renamed from dll_crt0 ().
2042 * winsup.h: Accomodate above change.
2043 * cygwin.din: Ditto.
2044 * lib/cygwin_crt0.c: Ditto.
2046 Fri Jun 30 23:21:40 2000 Christopher Faylor <cgf@cygnus.com>
2048 * Makefile.in: Use variables rather than configure constructs where
2050 (LIBCOS): Find additional stub library stuff in their own subdirectory.
2051 * dcrt0.cc: Convert user_data pointer to static __cygwin_user_data
2053 (do_global_ctors): Check magic_bisquit for initialization.
2054 (dll_crt0_1): First group of premain functions prior to fd
2055 initialization. Run second group before calling main.
2056 (dll_crt0 ()): New function, called from new initialization code.
2057 (dll_crt0 (per_process *uptr)): Call new dll_crt0 () function on
2059 * debug.cc (thread_stub): Initialize bottom of stack with per-thread
2061 * environ.cc (parse_thing): Use binmode global to control
2062 CYGWIN=binmode behavior.
2063 * fhandler.cc (fhandler_base::open): Allow explicit setting of __fmode
2064 to O_BINARY or O_TEXT to override disk mount settings.
2065 * libcmain.cc: Move to lib subdirectory.
2066 * libccrt0.cc: Ditto.
2067 * dll_main.cc: Ditto.
2068 * dll_entry.cc: Ditto.
2070 * thread.cc (thread_init_wrapper): Call ExitThread explicitly rather
2071 than returning, as a preliminary step towards placing per thread info
2072 at the bottom of the stack.
2073 * winsup.h: Move per_process class to include/sys/cygwin.h. Declare
2075 * include/cygwin/version.h: Bump API minor version.
2076 * binmode.c: New file.
2077 * textmode.c: Ditto.
2078 * perthread.h: Ditto.
2079 * lib/_cygwin_crt0_common.cc: Ditto.
2080 * lib/crt0.h: Ditto.
2081 * lib/cygwin_attach_dll.c: Ditto.
2082 * lib/cygwin_crt0.c: Ditto.
2083 * lib/dll_entry.cc: Ditto.
2084 * lib/dll_main.cc: Ditto.
2085 * lib/getopt.c: Ditto.
2086 * lib/libcmain.c: Ditto.
2087 * lib/premain0.c: Ditto.
2088 * lib/premain1.c: Ditto.
2089 * lib/premain2.c: Ditto.
2090 * lib/premain3.c: Ditto.
2092 Wed Jun 28 19:36:00 2000 Corinna Vinschen <corinna@vinschen.de>
2094 * syscalls.cc (seteuid): Initialize pi.token before calling
2095 internal_getlogin().
2096 * uinfo.cc (internal_getlogin): Use impersonation token instead
2097 of process token in case of active impersonation. Add some comments.
2098 (uinfo_init): Initializing myself->token and myself->impersonated
2099 before calling internal_getlogin(). Add some comments.
2101 Mon Jun 26 18:32:41 2000 Christopher Faylor <cgf@cygnus.com>
2103 * windows.cc (setitimer): Round up when < 1000 usecs.
2105 Mon Jun 26 17:34:54 2000 Christopher Faylor <cgf@cygnus.com>
2107 * hinfo.cc (hinfo::dup2): Eliminate compiler warning.
2109 Mon Jun 26 11:25:29 2000 Christopher Faylor <cgf@cygnus.com>
2111 * hinfo.cc (hinfo::dup2): Guard against out of bounds newfd.
2113 Sat Jun 24 23:43:06 2000 Christopher Faylor <cgf@cygnus.com>
2115 * grp.cc (read_etc_group): Open file in text mode.
2116 * pwd.cc (read_etc_passwd): Ditto.
2117 * shared.h: Bump PROC_MAGIC.
2119 Sat Jun 24 19:30:00 2000 Corinna Vinschen <corinna@vinschen.de>
2121 * fork.cc (fork): Fix error in copying SID pointer.
2122 * spawn.cc (_spawnve): Ditto.
2123 * passwd.cc: Remove static from `passwd_in_memory_p'.
2124 (read_etc_passwd): Remove static.
2125 * uinfo.cc: Move global declaration of `read_etc_group' and
2126 `group_in_memory_p' into `uinfo_init'.
2127 (internal_getlogin): Try to get SID from current process first.
2128 (uinfo_init): Don't set uid and gid if `myself' has a valid SID.
2129 Only load /etc/passwd and /etc/group in that case.
2131 Sat Jun 24 12:29:59 2000 Christopher Faylor <cgf@cygnus.com>
2133 * shared.cc (shared_info::initialize): Improve error message clarity.
2134 * mkvers.sh: Eliminate debugging output.
2136 Thu Jun 22 17:50:59 2000 Christopher Faylor <cgf@cygnus.com>
2138 * Makefile.in: Autogenerate cygwin.def when appropriate.
2139 * include/sys/cygwin.h: Correct prototype.
2141 Thu Jun 22 17:05:04 2000 Christopher Faylor <cgf@cygnus.com>
2143 * include/sys/cygwin.h: Don't define parts of this file that rely on
2144 Windows headers unless the Windows header was previously included.
2146 Thu Jun 22 20:45:00 2000 Corinna Vinschen <corinna@vinschen.de>
2148 * registry.cc (load_registry_hive): Use HKEY_USERS when checking
2149 for existing user hive.
2150 Use MAX_PATH instead of numerical constant for array size.
2151 Use return code of RegLoadKeyA instead of GetLastError for error output.
2153 Thu Jun 22 14:27:04 2000 Christopher Faylor <cgf@cygnus.com>
2155 * Makefile.in: Add new-libcygwin.a back to all_host target.
2157 Wed Jun 21 14:32:42 2000 Christopher Faylor <cgf@cygnus.com>
2159 * Makefile.in: Add *.def to clean operation.
2161 Wed Jun 21 13:18:23 2000 Christopher Faylor <cgf@cygnus.com>
2163 * Makefile.in: Add *.exe to clean operation.
2165 Wed Jun 21 01:02:38 2000 Christopher Faylor <cgf@cygnus.com>
2167 * mkvers.sh: Fix sed usage for older seds.
2169 Tue Jun 20 20:46:28 2000 Christopher Faylor <cgf@cygnus.com>
2171 * Makefile.in: Don't touch winver_stamp if mkvers.sh was unsuccessful.
2173 Tue Jun 20 17:41:30 2000 Christopher Faylor <cgf@cygnus.com>
2175 * mkvers.sh: Fix problem with handling of CVS tags causing .rc syntax
2178 Tue Jun 20 13:38:12 2000 Christopher Faylor <cgf@cygnus.com>
2180 * Makefile.in: Change to build the DLL during a cross-compiler build.
2182 Mon Jun 19 20:46:33 2000 Christopher Faylor <cgf@cygnus.com>
2184 * select.cc (socket_cleanup): Shutdown I/O on dummy sockets prior to
2187 Mon Jun 19 19:35:00 2000 Corinna Vinschen <corinna@vinschen.de>
2189 * dcrt0.cc: Add load statements for `GetSidIdentifierAuthority'
2191 * registry.cc (get_registry_hive_path): New function.
2192 (load_registry_hive): Ditto.
2193 * security.cc (convert_sid_to_string_sid): New function.
2194 (get_ssid): Renamed to `convert_string_sid_to_sid'.
2195 (get_pw_sid): Call `convert_string_sid_to_sid' instead of `get_ssid'.
2196 (get_gr_sid): Ditto.
2197 (get_admin_sid): Ditto.
2198 (get_system_sid): Ditto.
2199 (get_creator_owner_sid): Ditto.
2200 (get_world_sid): Ditto.
2201 * shared.h: New prototypes for `get_registry_hive_path' and
2202 `load_registry_hive'.
2203 * spawn.cc (spawn_guts): Set child->psid to NULL to force calling
2204 `internal_getlogin' from child process in case of changing user context.
2205 Call `load_registry_hive' in case of changing user context.
2206 (_spawnve): Copy user infos only if user context remains the same.
2207 * uinfo.cc: Add load statement for `NetUserGetInfo'.
2208 Remove load statement for `NetGetDCName'.
2209 (internal_getlogin): Rewrite to speed up process startup
2210 and to correct user environment in case user context changes.
2211 (uinfo_init): Call internal_getlogin only if myself->psid is NULL,
2212 that is user context changes.
2213 * winsup.h: Add prototypes for `convert_sid_to_string_sid',
2214 `convert_string_sid_to_sid' and `get_pw_sid'.
2216 Sun Jun 18 13:42:50 2000 Christopher Faylor <cgf@cygnus.com>
2218 * fhandler.h (set_name): Don't use 'unix' as name since this is defined
2220 * fhandler.cc (set_name): Ditto.
2222 2000-06-17 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
2224 * winsup.h (isabspath): Don't report `C:foo' as an absolute path.
2226 Sat Jun 17 13:51:48 2000 Christopher Faylor <cgf@cygnus.com>
2228 * configure.in: Detect "cross-hosting" situation and set appropriate
2229 variables in Makefile to avoid building excess stuff.
2230 * configure: Regenerate.
2231 * Makefile.in: Accomodate above change.
2233 Sat Jun 17 19:52:00 2000 Corinna Vinschen <corinna@vinschen.de>
2235 * pinfo.cc (pinfo_init): Revert previous patch.
2237 Sat Jun 17 13:29:00 2000 Corinna Vinschen <corinna@vinschen.de>
2239 * pinfo.cc (pinfo_init): Add missing initializers.
2240 * uinfo.cc (internal_getlogin): Request domain infos only
2243 Fri Jun 16 19:27:27 2000 Christopher Faylor <cgf@cygnus.com>
2245 * Makefile.in: Just use library files from this tree when building
2247 * path.cc (chdir): Don't set cache to offending chdir. Change comment
2248 to reflect current reality.
2250 Fri Jun 16 20:55:00 2000 Corinna Vinschen <corinna@vinschen.de>
2252 * cygwin.din: Define symbols for `cygwin_logon_user' and
2253 `cygwin_set_impersonation_token'.
2254 * dcrt0.cc (dll_crt0_1): Eliminate superfluous conditional
2256 Add load statements for `ImpersonateLoggedOnUser', `LogonUserA'
2258 * fork.cc (fork): Care for correct impersonation of parent
2260 * security.cc (cygwin_set_impersonation_token): New function.
2261 (cygwin_logon_user): Ditto.
2262 shared.h (class pinfo): New members `orig_uid', `orig_gid',
2263 `real_uid' nad `real_gid'.
2264 spawn.cc (spawn_guts): Care for impersonation when starting
2265 child process in a different user context.
2266 * syscalls.cc (setgid): Call `setegid' now. Set real_gid.
2267 (setuid): Call `seteuid' now. Set real_uid.
2268 (seteuid): Functionality moved from setuid to here. Care for
2269 correct impersonation.
2270 (setegid): Functionality moved from setgid to here.
2271 * uinfo.cc (uinfo_init): Initialization of additional pinfo
2273 (getuid): Return real uid.
2274 (getgid): Return real gid.
2275 (geteuid): Return effective uid.
2276 (getegid): Return effective gid.
2277 include/sys/cygwin.h: Add prototypes for `cygwin_logon_user' and
2278 `cygwin_set_impersonation_token'.
2279 include/cygwin/version.h: Bump API minor version to 22.
2281 Thu Jun 15 15:43:50 2000 Christopher Faylor <cgf@cygnus.com>
2283 * path.cc (normalize_posix_path): Convert path to POSIX if it seems to
2286 2000-06-15 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
2288 * path.cc (mount_info::add_item): Eliminate a trailing backslash
2289 included in a native path starting with '//[A-Za-z]/...'.
2290 * path.cc (mount_info::del_item): Accept a native path as its target.
2292 Wed Jun 14 23:47:19 2000 Christopher Faylor <cgf@cygnus.com>
2294 * environ.cc (conv_envvars): Detect and convert all environment
2295 variables used by libiberty's choose-temp.c
2297 Tue Jun 13 12:41:41 2000 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
2299 * path.cc (mount_info::add_item): The previous patch can't handle
2300 the case of overwriting a mount entry.
2302 Tue Jun 13 00:17:04 2000 Christopher Faylor <cgf@cygnus.com>
2304 * thread.h: Shorten "current_directory" variables to "cwd_*"
2307 (normalize_posix_path): Add some extra debugging info.
2308 (chdir): Ditto. Store chdir'ed posix and MS-DOS directory names in
2309 "cache" here rather than trying to derive them later.
2311 Sun Jun 11 15:57:00 2000 Corinna Vinschen <corinna@vinschen.de>
2313 * fhandler_random.cc (read): Call CryptAquireContext with
2314 CRYPT_VERIFYCONTEXT.
2316 Thu Jun 8 22:49:00 2000 Corinna Vinschen <corinna@vinschen.de>
2318 * path.cc (path_conv::check): Erase two lines checked in
2321 Thu Jun 8 15:53:00 2000 Corinna Vinschen <corinna@vinschen.de>
2323 * fhandler.cc (fhandler_disk_file::open): Check for directory
2324 to set O_DIROPEN on directories anyway.
2326 2000-06-07 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
2328 * path.cc (mount_info::init): Eliminate the mount_slash feature.
2329 (mount_slash): Eliminated.
2330 (mount_info::read_mounts): Eliminate looking up existing entries. The
2331 loop for deleting cygpath entries is done only when such entries exist.
2332 (mount_info::from_registry): Eliminate sorting.
2333 (mount_info::add_item): Call add_reg_mount if necessary. Check nmounts
2334 more precisely. Use strcasematch in looking up existing entries.
2335 (mount_info::del_item): Call del_reg_mount if necessary. Use
2336 strcasematch. Use memmove instead of memcpy.
2337 (mount_info::import_v1_registry): Everything is done in this method.
2338 (mount_info::to_registry): Eliminated.
2339 (mount_info::from_v1_registry): Eliminated.
2340 (cygwin_umount): Simply call del_item.
2341 * shared.h: Modify the declaration of add_item and del_item. Remove the
2342 declaration of from_v1_registry.
2344 Wed Jun 7 23:56:10 2000 Christopher Faylor <cgf@cygnus.com>
2346 * include/cygwin/version.h: Bump DLL minor version number to 3.
2348 2000-06-07 DJ Delorie <dj@cygnus.com>
2350 * cygwin.din: add cygwin_dll_init
2351 * dcrt0.cc (cygwin_dll_init): new
2352 (dll_crt0_1): short circuit if manually loaded
2353 * path.cc (mount_info::init): don't init if manually loaded
2355 Wed Jun 7 13:47:00 2000 Corinna Vinschen <corinna@vinschen.de>
2357 * include/netinet/in_systm.h: New file.
2358 * include/cygwin/in_systm.h: Ditto.
2360 Thu Jun 1 01:55:45 2000 Christopher Faylor <cgf@cygnus.com>
2362 * exceptions.cc: Remove unneeded include.
2363 * dcrt0.cc: Wrap LoadDLLfunc stuff in dummy function.
2367 2000-05-31 DJ Delorie <dj@cygnus.com>
2369 * include/cygwin/version.h: use decimal, NOT octal
2371 Wed May 31 16:40:00 2000 Corinna Vinschen <corinna@vinschen.de>
2373 * fhandler.cc (fhandler_disk_file::open): Check for executable
2374 even if ntsec is on if filesystem doesn't support ACLs.
2376 Wed May 31 15:57:00 2000 Corinna Vinschen <corinna@vinschen.de>
2378 * dcrt0.cc: Use LoadDLLfuncEx for loading Crypto API functions
2379 with parameter `notimp' set to 1.
2381 Tue May 30 16:58:33 2000 Christopher Faylor <cgf@cygnus.com>
2383 * path.cc (mount_info::conv_to_win32_path): Previous patch was too
2384 aggressive in adding a trailing slash.
2386 Mon May 29 20:31:01 2000 Christopher Faylor <cgf@cygnus.com>
2388 * Makefile.in: Remove libadvapi32.a.
2389 * autoload.h: Add additional field to autoload block for handling
2390 unimplemented functions.
2391 (LoadDLLfuncEx): New function which accepts additional parameter for
2392 controlling unimplemented function behavior.
2393 (LoadDLLfunc): Use LoadDLLfuncEx.
2394 * dcrt0.cc: Use new arguments for LoadDLLfunc. Add advapi32 routines.
2395 (noload): Rewrite in assembler. Handle new unimplemented function
2397 * exceptions.cc: Eliminate another vestige of StackWalk stuff.
2398 * net.cc: Use new arguments for LoadDLLfunc.
2401 Mon May 29 20:18:47 2000 Christopher Faylor <cgf@cygnus.com>
2403 * config.h.in: Remove obsolete define.
2404 * path.h (isdrive): New macro.
2405 * dcrt0.cc (globify): Use new macro to determine if a string refers to
2407 * environ.cc (winenv): Ditto.
2408 * spawn.cc (find_exec): Ditto.
2409 * path.cc (get_raw_device_number): Ditto.
2410 (mount_info::conv_to_posix_path): Ditto.
2412 (cygwin_posix_path_list_p): Ditto.
2413 (cygwin_split_path): Ditto.
2414 (path_conv::check): Move tmp_buf to beginning of function since it can
2415 be used earlier in the loop. Use tmp_buf rather than 'root' to hold
2417 (mount_info::conv_to_win32_path): Add trailing slash to end of mount
2418 path when it translates to a drive. Add defensive code to avoid
2419 writing beyond the end of 'dst'.
2421 Sat May 27 15:57:00 2000 Corinna Vinschen <corinna@vinschen.de>
2423 * fhandler_random.cc (read): Use CRYPT_MACHINE_KEYSET in
2424 call to CryptAcquireContext() to serve users that did not
2425 log in interactively.
2427 Fri May 26 11:16:00 2000 Corinna Vinschen <corinna@vinschen.de>
2429 * errno.cc (errmap): Map ERROR_BAD_NET_NAME to errno ENOSHARE.
2431 Fri May 26 02:23:35 2000 Christopher Faylor <cgf@cygnus.com>
2433 * sigproc.h (sigframe::set): Accept a default frame pointer.
2434 * sigproc.cc (sig_send): Use passed in frame pointer, if appropriate.
2436 Thu May 25 17:44:25 2000 Christopher Faylor <cgf@cygnus.com>
2438 * dir.cc (rmdir): Use file attributes that have already been discovered
2441 2000-05-25 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
2443 * dir.cc (rmdir): Correct the manner in checking the target directory.
2445 Wed May 24 21:59:00 2000 Corinna Vinschen <corinna@vinschen.de>
2447 * dir.cc (writable_directory): Comment out previous code,
2448 return always 1 for now.
2449 (mkdir): Call set_file_attribute explicitely with S_IFDIR mode bit.
2450 * syscalls.cc (chown_worker): Ditto.
2452 * security.cc (get_nt_attribute): Fix error in debug output.
2453 Never set FILE_DELETE_CHILD for files.
2454 Construct appropriate inherit attribute according to file type.
2456 2000-05-23 DJ Delorie <dj@cygnus.com>
2458 * syscalls.cc (_cygwin_istext_for_stdio): New, for newlib
2459 * include/cygwin/version.h: Bump API number for detect old
2460 programs using old getc/putc macros
2462 2000-05-23 DJ Delorie <dj@cygnus.com>
2464 * dir.cc (writable_directory): handle root directories
2466 Tue May 23 10:09:26 2000 Christopher Faylor <cgf@cygnus.com>
2468 * uname.cc (uname): Use a "s" to denote a snapshot to avoid confusion
2469 with the number "5".
2471 Tue May 23 10:01:07 2000 Christopher Faylor <cgf@cygnus.com>
2473 * path.cc (mount_info::conv_to_posix_path): Avoid putting a trailing
2474 slash on a directory name when the ms-dos path spec is a root directory
2476 * registry.cc (reg_key::build_reg): Set 'key_is_invalid' flag rather
2477 than using an INVALID_HANDLE_KEY.
2478 (reg_key::get_int): Test for key validity before performing registry
2480 (reg_key::set_int): Ditto.
2481 (reg_key::get_string): Ditto.
2482 (reg_key::set_string): Ditto.
2483 (reg_key::kill): Ditto.
2484 (reg_key::~reg_key): Ditto.
2486 Tue May 23 01:13:33 2000 Christopher Faylor <cgf@cygnus.com>
2488 * mkvers.sh: Use snapshot date as build date since it is more
2490 * uname.cc (uname): Detect if this is a snapshot build and add an "S"
2491 to the version number. Report the snapshot date as the release date.
2493 Mon May 22 17:11:25 2000 Christopher Faylor <cgf@cygnus.com>
2495 * environ.cc (regopt): Scan HKLM if HKCU scan fails.
2497 Mon May 16 23:39:00 2000 Corinna Vinschen <corinna@vinschen.de>
2499 * dir.cc (rmdir): Care for misleading error messages
2500 when trying to remove a directory on a samba share.
2501 Eliminate superfluous else branch.
2502 * syscalls.cc (_rename): Additional check for ERROR_FILE_EXISTS
2505 Sun May 21 20:51:44 2000 Christopher Faylor <cgf@cygnus.com>
2507 * dcrt0.cc (dll_crt0_1): Move uinfo_init call to before sigproc_init to
2509 (noload): Add an extra argument for debugging.
2510 * uinfo.cc (uinfo_init): Eliminate test for multiple calls.
2511 (getlogin): Assume that uinfo_init has already been called.
2513 Sat May 20 01:34:57 2000 Christopher Faylor <cgf@cygnus.com>
2515 * exceptions.cc (interruptible): Add an argument to control whether
2516 function just checks for validity. Flag module handle == 0 as
2518 (call_handler): Always acquire and release ebp lock. Loop for only a
2519 fixed amount of time attempting to grab mutos and find an interruptible
2522 2000-05-19 DJ Delorie <dj@cygnus.com>
2524 * syscalls.cc (setmode): change mode of any matching FILE* also.
2526 Thu May 18 17:28:19 2000 Christopher Faylor <cgf@cygnus.com>
2528 * Makefile.in: Remove external.h dependency.
2529 * dcrt0.cc (sigthread::init): Move here from sigproc.h.
2530 * sigproc.h (sigthread): Move init to dcrt0.cc.
2532 Thu May 18 01:28:02 2000 Christopher Faylor <cgf@cygnus.com>
2534 * select.cc (thread_pipe): Add paranoid check to ensure thread
2536 * external.cc: Eliminate obsolete include.
2537 * getopt.c (getopt_long): Fix compiler warning.
2538 * shared.h: Moved PID_ definitions to include/sys/cygwin so that they
2539 can be used by external programs.
2540 * include/sys/cygwin.h: Move external definitions here. Include
2541 sys/resource.h to avoid having to do this everywhere.
2543 Thu May 18 01:04:02 2000 Christopher Faylor <cgf@cygnus.com>
2545 * sigproc.h (sigframe): Don't set frame info unless tid matches this
2548 Wed May 17 23:13:32 2000 Christopher Faylor <cgf@cygnus.com>
2550 * dcrt0.cc (dll_crt0_1): Initialize mainthread stuff here before
2552 * sigproc.cc (sigproc_init): Move mainthread initialization out of
2554 * sigproc.h (sigthread): Add init() method.
2555 (sigframe): Don't try to initialize muto.
2556 * sync.cc: Undef WaitForSingleObject to avoid recursion.
2558 2000-05-17 DJ Delorie <dj@cygnus.com>
2560 * testsuite/winsup.api/crlf.c: New
2561 * testsuite/winsup.api/iospeed.c: New
2563 Wed May 17 01:05:52 2000 Christopher Faylor <cgf@cygnus.com>
2565 * path.cc (mount_info::cygdrive_posix_path): Don't add trailing slash
2566 if referring to something like c:\.
2567 * dcrt0.cc (dll_crt0_1): Move uinfo initialization prior to sig_send
2568 initialization to give signal thread a chance to finish.
2569 * debug.cc (WFSO): Move to sigproc.cc
2571 * exceptions.cc (interruptible): Allocate slightly more space for
2572 directory just for paranoia's sake.
2573 (call_handler): Eliminate nonmain argument. Determine if main thread
2574 has set a frame pointer and use it if so.
2575 (sig_handle): Eliminate nonmain argument.
2576 * net.cc: Record frame information in appropriate routines throughout.
2577 * select.cc (select): Ditto.
2578 * sigproc.cc: Use sigthread structure to record mainthread id
2580 (sig_send): Record frame information for signal handler.
2581 (wait_sig): Reflect argument change in sig_handle.
2582 (WFSO): Move here and record frame information for signal handler.
2584 * sigproc.h: Implement new "sigthread" class. Implement "sigframe"
2585 class for manipulating signal frame info.
2586 * thread.cc (__pthread_kill): Use standard _kill() function rather than
2587 calling sig_send directly.
2588 * winsup.h: Eliminate ebp element from signal_dispatch class.
2590 Tue May 16 23:39:00 2000 Corinna Vinschen <corinna@vinschen.de>
2592 Patch suggested by John Rowley <wjr@bgs.ac.uk>
2593 * fhandler_tape.cc (fhandler_dev_tape::ioctl): Check
2594 for filemark feature on MTWEOF operation.
2596 Tue May 16 11:49:13 2000 Christopher Faylor <cgf@cygnus.com>
2598 * include/cygwin/in.h (AF_INET6): Use correct in6_addr struct.
2600 Mon May 15 00:35:35 2000 Christopher Faylor <cgf@cygnus.com>
2602 * include/cygwin/version.h: Bump DLL minor version number to 2.
2604 Sun May 14 23:41:24 2000 Christopher Faylor <cgf@cygnus.com>
2606 * shared.h: Bump PROC_MAGIC.
2607 * include/cygwin/version.h: Bump API minor to accomodate two recent
2610 2000-05-13 Mumit Khan <khan@xraylith.wisc.edu>
2612 * include/cygwin/socket.h (AF_INET6): Use same value as winsock2.
2614 2000-05-12 Mumit Khan <khan@xraylith.wisc.edu>
2616 * include/cygwin/in.h (struct in6_addr): Fix spelling.
2617 * include/cygwin/socket.h (AF_INET6, PF_INET6): Define macros.
2618 (AF_MAX, PF_MAX): Bump to 32 to leave room for future expansion.
2620 Fri May 12 21:35:54 2000 Christopher Faylor <cgf@cygnus.com>
2622 * dcrt0.cc (build_argv): Remove unneeded variable.
2623 * select.cc (peek_pipe): Don't check for "ready" if it's already set.
2624 (peek_console): Ditto.
2625 (peek_serial): Ditto.
2626 (peek_socket): Ditto.
2627 (peek_windows): Ditto.
2629 Fri May 12 20:31:00 2000 Corinna Vinschen <corinna@vinschen.de>
2631 * fhandler_raw.cc (write_file, read_file): New wrapper functions
2632 for WriteFile and ReadFile to get rid of ERROR_MEDIA_CHANGED
2633 and ERROR_BUS_RESET in case of first access to tape.
2634 (fhandler_dev_raw::raw_write): Use write_file instead of WriteFile.
2635 (fhandler_dev_raw::raw_read): Use read_file instead of ReadFile.
2637 Fri May 12 01:04:57 2000 Christopher Faylor <cgf@cygnus.com>
2639 * Makefile.in (DLL_OFILES): Sort.
2640 * fhandler_tty.cc (fhandler_tty_slave::send_ioctl_request): Eliminate.
2641 (fhandler_tty_slave::ioctl): Rewrite to avoid races.
2643 2000-05-11 Mumit Khan <khan@xraylith.wisc.edu>
2645 * mmap.cc (list::erase): Increment loop counter.
2646 (map::erase): Likewise.
2648 Thu May 11 00:54:00 2000 Charles Wilson <cwilson@ece.gatech.edu>
2650 * cygwin.din: insure that regsub() is included in
2653 Tue May 9 18:59:41 2000 Christopher Faylor <cgf@cygnus.com>
2655 * Makefile.in: Use appropriate VARIABLE to refer to cygwin.def in load
2658 Thu May 9 23:53:00 2000 Corinna Vinschen <corinna@vinschen.de>
2660 * fhandler.cc (fhandler_base::puts_readahead): Change
2661 while condition to disallow wild runs.
2663 Thu May 9 15:24:00 2000 Corinna Vinschen <corinna@vinschen.de>
2665 Patch suggested by <lha@stacken.kth.se>
2666 * window.cc (setitimer): Check for overflow condition
2669 Thu May 9 0:47:00 2000 Corinna Vinschen <corinna@vinschen.de>
2671 Patch suggested by Eric Fifer <EFifer@sanwaint.com>
2672 * errno.cc: Change mapping of ERROR_BAD_PATHNAME to ENOENT.
2674 Thu May 9 0:47:00 2000 Corinna Vinschen <corinna@vinschen.de>
2676 * path.cc (symlink::info): Treat non readable files
2677 as normal non symlink files.
2679 2000-05-08 Paul K. Fisher <pfisher@plexware.com>
2681 * include/pthread.h (pthread_detach): Add missing prototype.
2682 (pthread_join): same.
2684 2000-05-08 DJ Delorie <dj@cygnus.com>
2686 * fhandler.cc (lock): use signed math to allow checking ranges
2689 Sat May 6 23:22:25 2000 Christopher Faylor <cgf@cygnus.com>
2691 * dcrt0.cc (insert_file): Eliminate unused parameter.
2692 (build_argv): Ditto.
2693 * exceptions.cc (stack): Eliminate unused parameters.
2695 (cygwin_stackdump): Reflect above changes.
2696 (sig_handle): Ditto.
2697 * fhandler.cc (fhandler_base::set_inheritance): Use kludge to avoid
2698 unused parameter warning.
2700 2000-05-06 Mumit Khan <khan@xraylith.wisc.edu>
2702 * include/wchar.h (wcscmp, wcslen): Fix prototypes.
2703 * syscalls.cc (wcslen, wcscmp): Adjust.
2705 Fri May 5 23:32:07 2000 Christopher Faylor <cgf@cygnus.com>
2707 * errno.cc (errmap): Correct DIRECTORY mapping to ENOTDIR.
2709 2000-05-04 Mumit Khan <khan@xraylith.wisc.edu>
2711 * Makefile.in (install): Install profile startup and library.
2713 Wed May 3 21:54:11 2000 Christopher Faylor <cgf@cygnus.com>
2715 * configure.in: Use -gstabs+ as compile debug option. This seems to
2716 promote better handling of symbols.
2717 * configure: Regenerate.
2718 * delqueue.cc (delqueue_list::process_queue): Allow ERROR_ACCESS_DENIED
2719 to indicate that a file is being shared under Windows 95.
2720 * syscalls.cc (_unlink): Use full path name. Take special action for
2721 Windows 95. Assume that an ERROR_ACCESS_DENIED indicates a sharing
2722 violation unless it's on a remote drive. Punt if there is an
2723 ERROR_ACCESS_DENIED on a remote drive.
2725 Wed May 3 18:07:00 2000 Corinna Vinschen <corinna@vinschen.de>
2727 * errno.cc (errmap): Map ERROR_BAD_NETPATH to new errno ENOSHARE.
2728 (_sys_errlist): Add entry for ENOSHARE.
2729 (strerror): Add case for ENOSHARE.
2730 * syscalls.cc (stat_worker): Check for errno ENOSHARE.
2732 Wed May 3 17:28:00 2000 Corinna Vinschen <corinna@vinschen.de>
2734 * Makefile.in: Add dependencies for fhandler_random.o
2735 * fhandler.h: Add device type FH_RANDOM. Add class
2736 fhandler_dev_random.
2737 * fhandler_random.cc: New file. Implementation of
2738 fhandler_dev_random.
2739 * hinfo.cc (build_fhandler): Add case for FH_RANDOM.
2740 * path.cc: Add device names for random devices to
2741 windows_device_names.
2742 (get_device_number): Add if branch for random devices.
2743 (win32_device_name): Add device name generation for
2745 winsup.h: Include <wincrypt.h>.
2747 2000-05-02 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
2749 * path.cc (mount_info::conv_to_win32_path): Previous patch
2750 failed to set flags on a win32 path.
2752 Tue May 2 11:34:00 2000 Corinna Vinschen <corinna@vinschen.de>
2754 * security.cc (read_sd): Return 1 on success because we
2755 can't rely on the returned SD size from GetFileSecurity.
2757 Tue May 2 2:22:00 2000 Corinna Vinschen <corinna@vinschen.de>
2759 * dcrt0.cc: Add dynamic load code for `OemToCharA' from user32.dll.
2760 * security.cc (read_sd): Call `OemToCharA' to make
2761 `GetFileSecurity' happy on filenames with umlauts.
2763 Wed Apr 26 23:23:23 2000 Christopher Faylor <cgf@cygnus.com>
2765 * path.cc (normalize_win32_path): Don't add a trailing slash when one
2767 (mount_info::conv_to_win32_path): Use existing code for dealing with
2768 relative path names when input is already a win32 path.
2770 2000-04-26 DJ Delorie <dj@cygnus.com>
2772 * Makefile.in (install): install regexp.h
2774 Wed Apr 26 16:20:00 2000 Corinna Vinschen <corinna@vinschen.de>
2776 * syscalls.cc (stat_worker): Previous patch could succeed
2777 in stating a non-existant file.
2779 Wed Apr 26 01:07:16 2000 Christopher Faylor <cgf@cygnus.com>
2781 * exceptions.cc (interruptible): Allocate slightly more space for
2782 directory name check. Windows 95 seems to null-terminate the directory
2784 (interrupt_on_return): Issue a fatal error if we can't find the
2787 Tue Apr 25 16:50:54 2000 Christopher Faylor <cgf@cygnus.com>
2789 * spawn.cc (find_exec): Accept a path_conv argument rather than a
2790 buffer so that the caller can find things out about a translated path.
2791 (perhaps_suffix): Ditto.
2792 (spawn_guts): Allocate path_conv stuff here so that we can find out
2793 stuff about the translated path (this is work in progress).
2794 * environ.cc (environ_init): Accept an as-yet unused argument
2795 indicating whether we were invoked from a cygwin parent or not.
2797 (posify): Accept an argument indicating whether the path has already
2799 * dlfcn.cc (check_access): Provide a path_conv buffer to find_exec.
2800 * exec.cc (sexecvpe): Ditto.
2801 * path.cc (path_conv::check): Rename from path_conv::path_conv.
2802 (mount_item::getmntent): Recognize "Cygwin executable" bit.
2803 (symlink_info::check): Remove debugging statements.
2804 * path.h (class path_conv): Add iscygexec method. Rewrite constructor
2805 to call "check" method to allow multiple operations on a path_conv
2807 * pinfo.cc (pinfo_init): Pass argument to environ_init.
2808 * shared.h: Bump PROC_MAGIC.
2809 * winsup.h: Reflect above changes to function arguments.
2810 * include/sys/mount.h: Add MOUNT_CYGWIN_EXEC type.
2812 Thu Apr 25 21:35:00 2000 Corinna Vinschen <corinna@vinschen.de>
2814 * syscalls.cc (stat_worker): Previous patch failed to stat
2815 each drives root dir on 9X.
2817 Thu Apr 25 16:37:00 2000 Corinna Vinschen <corinna@vinschen.de>
2819 * fhandler.cc (fhandler_disk_file::open): Check for allow_ntsec
2820 when determining exec flag.
2821 * path.cc (symlink_info::check): Remove call to get_file_attribute().
2822 * security.cc (read_sd): Rename, ditto for variables to conform
2823 to common naming convention. Use GetFileSecurity() instead of
2824 BackupRead() to avoid permission problems when reading ACLs.
2825 (write_sd): Same renaming as for read_sd().
2826 (alloc_sd): Change default permissions according to Linux permissions
2827 for group and world when write permission is set.
2828 * syscalls.cc (stat_worker): Avoid different permission problems
2829 when requesting file informations.
2831 Thu Apr 25 10:50:00 2000 Corinna Vinschen <corinna@vinschen.de>
2833 * net.cc: Avoid a warning in declaration inet_network.
2835 Mon Apr 24 17:38:25 2000 Thorsten Otto <t.otto@germanynet.de>
2837 * fhandler_console.cc (fhandler_console::read): Detect extended keycode
2838 information for Windows 9x so that function keys will work correctly.
2840 2000-04-24 Vadim Egorov <egorovv@mailandnews.com>
2842 * net.cc (cygwin_inet_network): new function.
2843 * cygwin.din (inet_network): new export
2845 Fri Apr 21 10:37:08 2000 Christopher Faylor <cgf@cygnus.com>
2847 * path.cc (normalize_posix_path): Previous two patches were still
2848 incorrect so rewrite this function to deal with trailing dots.
2849 (mount_info::conv_to_win32_path): Just check for '/' where appropriate.
2850 Eliminate nofinalslash call since it is handled in normalize_posix_path
2853 Thu Apr 20 17:32:42 2000 Christopher Faylor <cgf@cygnus.com>
2855 * exceptions.cc (handle_exceptions): Search further for stack info to
2856 accomodate Windows 95.
2858 Thu Apr 20 16:39:18 2000 Christopher Faylor <cgf@cygnus.com>
2860 * path.cc (normalize_posix_path): Previous change failed to take root
2861 access into account.
2863 Thu Apr 20 11:26:00 2000 Corinna Vinschen <corinna@vinschen.de>
2865 * syscalls.cc (_link): Check new link path for trailing dot.
2867 Thu Apr 20 00:32:03 2000 Christopher Faylor <cgf@cygnus.com>
2869 * fhandler.h (fhandler_base::hclose): New virtual method.
2870 (fhandler_base::set_inheritance): Make this a method so that we can use
2871 the appropriate close methods.
2872 * fhandler.cc (fhandler_base::set_inheritance): Ditto.
2873 * path.cc (normalize_posix_path): Eliminate /. trailing path
2876 Wed Apr 20 0:19:00 2000 Corinna Vinschen <corinna@vinschen.de>
2878 * syscalls.cc (setuid): Allow switching user context after
2879 successful call to ImpersonateLogedOnUser (NT only).
2881 (seteuid): Call setuid.
2882 (setegid): Call setgid.
2884 Wed Apr 19 22:00:00 2000 Corinna Vinschen <corinna@vinschen.de>
2886 * uinfo.cc (internal_getlogin): Use NetGetDCName() instead
2887 of NetGetAnyDCName().
2889 Mon Apr 17 12:08:47 2000 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
2891 * syscalls.cc (_rename): Try MoveFile() at first before
2892 MoveFileEx(..., MOVEFILE_REPLACE_EXISTING).
2894 Tue Apr 18 19:15:29 2000 Christopher Faylor <cgf@cygnus.com>
2896 * dcrt0.cc (globify): Don't use \ quoting when apparently quoting a DOS
2897 path spec, even within a quoted string.
2899 Sun Apr 16 18:54:21 2000 Christopher Faylor <cgf@cygnus.com>
2901 * init.cc (dll_entry): Use better check for determining when to set
2902 thread specific stuff.
2903 * syscalls.cc (_unlink): Continue with chmod'ing file even if
2904 DELETE_ON_CLOSE succeeds, if file still exists.
2906 Fri Apr 14 23:51:15 2000 Christopher Faylor <cgf@cygnus.com>
2908 * fhandler_console.cc (keytable): Add support for keypad 5 key, which
2909 MS seems to think is equivalent to VK_CLEAR.
2910 * debug.cc (thread_stub): Eliminate initialization of reent stuff.
2911 * init.cc (dll_entry): Move it here.
2913 Thu Apr 13 18:32:26 2000 Christopher Faylor <cgf@cygnus.com>
2915 * dcrt0.cc (insert_file): Avoid freeing previously allocated argument
2917 * path.cc (symlink_info::check): Rename from symlink_check_one. Use
2918 new symlink_info struct for communication.
2919 (path_conv::path_conv): Use symlink_info structure for communication
2920 with symlink_info::check. Fix typo which resulted in symbolic links
2921 always being resolved.
2922 (readlink): Use stat_suffixes array when resolving a link.
2923 * syscalls.cc (stat_suffixes): Make global.
2925 Thu Apr 13 20:50:00 2000 Corinna Vinschen <corinna@vinschen.de>
2927 * include/cygwin/version.h: Bump minor api to reflect export change.
2929 Thu Apr 13 8:48:00 2000 Corinna Vinschen <corinna@vinschen.de>
2931 * path.cc (conv_to_win32_path): Detect a win32 path
2932 if path contains backslashes.
2933 * cygwin.din: Add symbol for `lacl'.
2934 * security.cc (ReadSD): Add debug output.
2935 (acl_worker): New static function.
2936 (acl): Call acl_worker now.
2937 (lacl): New function.
2938 (facl): Call acl_worker now.
2939 * include/cygwin/acl.h: Add prototype for `lacl'.
2941 Wed Apr 12 18:48:33 2000 Christopher Faylor <cgf@cygnus.com>
2943 * path.cc (path_conv::path_conv): Ensure that suffix is correctly
2944 copied to path when we've found a symlink but aren't following
2947 Sat Apr 8 00:46:14 2000 Christopher Faylor <cgf@cygnus.com>
2949 * fhandler.cc (fhandler_disk_file::fstat): Allocate enough space for
2950 root dir determination or overflow an array.
2952 Sat Apr 8 00:08:53 2000 Christopher Faylor <cgf@cygnus.com>
2954 * exceptions.cc (sigsave): Copy on fork so that we can restore correct
2955 behavior in forked process.
2956 (interruptible): Flag as interruptible when running in main process
2958 (interrupt_setup): Save return address and address of return address.
2959 (signal_fixup_after_fork): New function. Uses above two values to
2960 restore proper behavior to forked process.
2961 (interrupt_on_return): Pass return address address to interupt_setup.
2962 (interrupt_now): Pass NULL for return address address to
2964 * fork.cc (fork): Call signal_fixup_after_fork.
2965 * shared.h: Lint cleanups.
2968 Mon Apr 3 14:10:44 2000 Christopher Faylor <cgf@cygnus.com>
2970 * fhandler.h (select_stuff): Eliminate use of 'total'.
2971 * select.cc (cygwin_select): Ditto.
2972 (select_stuff::wait): Use maximum size for w4 rather than calculating
2975 Mon Apr 03 13:58:00 2000 Corinna Vinschen <corinna@vinschen.de>
2977 * grp.cc (parse_grp): Save empty array instead of
2978 NULL in gr_mem if no supplementary group is given.
2980 Sun Apr 02 16:02:00 2000 Corinna Vinschen <corinna@vinschen.de>
2982 * syscalls.cc (chown_worker): Use previous uid/gid if
2985 Fry Mar 31 22:55:00 2000 Corinna Vinschen <corinna@vinschen.de>
2987 * syscalls.cc (chown_worker): New static function with
2988 chown functionality.
2989 (chown): Call chown_worker with SYMLINK_FOLLOW.
2990 (fchown): New function. Call chown_worker with SYMLINK_FOLLOW.
2991 (lchown): New function. Call chown_worker with SYMLINK_IGNORE.
2992 * cygwin.din: Add symbols for fchown, lchown.
2994 Fry Mar 31 11:18:00 2000 Corinna Vinschen <corinna@vinschen.de>
2996 * path.cc (symlink): Call `set_file_attribute()' and
2997 `SetFileAttributeA()' instead of `chmod()' to set
3000 Wed Mar 29 22:49:56 2000 Christopher Faylor <cgf@cygnus.com>
3002 * fhandler.h (select_record): Explicitly zero elements of this class.
3003 (select_stuff): Ditto.
3004 * select.cc (cygwin_select): Eliminate memset zero of sel.
3006 Tue Mar 28 16:45:42 2000 Christopher Faylor <cgf@cygnus.com>
3008 * Makefile.in: Use default rules when compiling cygrun.o.
3009 * dcrt0.cc (host_dependent_constants::init): Limit non-NT platforms to
3010 32K chunks when copying regions during a fork.
3011 * path.cc (symlink_check_one): Add temporary debugging output.
3012 Simplify PATH_EXEC test.
3013 * syscalls.cc (stat_suffixes): Null terminate this list.
3015 Sat Mar 25 20:46:39 2000 Christopher Faylor <cgf@cygnus.com>
3017 * path.cc (symlink_check_one): Recognize symlink settings from the
3019 * path.h: Make PATH_SYMLINK an alias for MOUNT_SYMLINK.
3020 * syscalls.cc (stat_worker): Use extension search mechanism in
3021 path_conv to look for .exe rather than trying to special case it here.
3022 * mount.h: Make MOUNT_SYMLINK a real option.
3024 Sat Mar 25 00:22:32 2000 Christopher Faylor <cgf@cygnus.com>
3026 * environ.cc: Add TMPDIR to the list of environment variables which are
3027 converted to POSIX format.
3028 * sigproc.cc (proc_terminate): Don't attempt to delete when a muto
3031 Sun Mar 19 12:01:00 2000 Corinna Vinschen <corinna@vinschen.de>
3033 * syscalls.cc (stat_worker): Set st_nlink to 1 on remote drives.
3035 Sat Mar 18 23:04:27 2000 Christopher Faylor <cgf@cygnus.com>
3037 * times.cc: Fix extern declarations for variables that are exported but
3038 used by this modules.
3040 Sat Mar 18 01:32:04 2000 Christopher Faylor <cgf@cygnus.com>
3042 * dcrt0.cc (host_dependent_constants::init): Eliminate DELETE flag
3043 from shared constant.
3045 Sat Mar 18 01:24:25 2000 Christopher Faylor <cgf@cygnus.com>
3047 * delqueue.cc (delqueue_list::queue_file): Add some debugging.
3048 * path.h (class path_conv): Add a char * operator for the most common
3050 * syscalls.cc (_unlink): Rewrite to use FILE_FLAG_DELETE_ON_CLOSE when
3051 possible (i.e., on NT).
3053 Fri Mar 17 18:16:00 2000 Corinna Vinschen <corinna@vinschen.de>
3055 Patch suggested by Eric Fifer <EFifer@sanwaint.com>
3056 * fhandler.cc (fhandler_base::open): Call set_file_attribute()
3057 only if a file is really created.
3059 Thu Mar 16 14:15:00 2000 Corinna Vinschen <corinna@vinschen.de>
3061 * security.cc (set_process_privileges): Remove `static'.
3062 (get_nt_attribute): Returns uid and gid additionally. Remove call
3063 to set_process_privileges().
3064 (get_file_attribute): Returns uid and gid additionally. Don't
3065 call ntea if ntsec is ON.
3066 (set_nt_attribute): Remove call to set_process_privileges().
3067 Don't call ntea if ntsec is ON.
3068 (acl): Remove call to set_process_privileges().
3069 * dcrt0.cc (dll_crt0_1): Call set_process_privileges().
3070 * winsup.h: New prototype for set_process_privileges(),
3071 changed prototype for get_file_attribute().
3072 * fhandler.cc (get_file_owner): Discard function.
3073 (get_file_group): Ditto.
3074 (fhandler_disk_file::fstat): Discard calls to get_file_owner() and
3076 * path.cc (path_conv::path_conv): New debugging output for result
3077 of GetVolumeInformation().
3078 (mount_info::conv_to_win32_path): Call backslashify() with pathbuf
3079 instead of src_path.
3080 * syscalls.cc (chown): Reformat slightly.
3081 (chmod): Replace get_file_owner() and get_file_group() calls
3082 by a call to get_file_attribute(). Discard local variable has_acls.
3084 (stat_worker): Root dir check now done by a call to rootdir().
3085 Don't call num_entries() on remote drives.
3086 Discard local variable has_acls.
3088 Wed Mar 15 20:38:06 2000 Corinna Vinschen <corinna@vinschen.de>
3090 * errno.cc: Map ERROR_NOACCESS to EFAULT.
3092 Wed Mar 15 14:25:38 2000 Christopher Faylor <cgf@cygnus.com>
3094 * spawn.cc (spawn_guts): Restore dependency on signal_arrived. It's
3095 needed to wake up the WaitForSingleObject.
3097 Tue Mar 14 23:41:16 2000 Christopher Faylor <cgf@cygnus.com>
3099 Pipe changes throughout suggested by Eric Fifer <EFifer@sanwaint.com>
3100 * debug.cc (threadname_init): Pass name of lock as arg 2 of new_muto.
3101 * malloc.cc (malloc_init): Ditto.
3102 * sigproc.cc (sigproc_init): Ditto.
3103 * exceptions.cc (events_init): Ditto.
3104 (call_handler): Eliminate special case for hExeced. Report locked
3105 thread in debugging output.
3106 * fhandler.cc (fhandker_pipe::fhandler_pipe): Propagate device type to
3108 * fhandler.h (fhandler_pipe): Ditto.
3109 * hinfo.cc (hinfo::build_fhandler): Pass specific type of pipe to
3111 * spawn.cc (spawn_guts): Eliminate dependency on signal when waiting
3113 * strace.cc: Remove obsolete #ifdef.
3114 * sync.cc (muto::muto): Save the name of the muto.
3115 (muto:~muto): Also release the muto.
3116 * sync.h: Add a muto name field.
3117 * select.cc (peek_pipe): Avoid doing a PeekNamedPipe on the write end
3120 Sun Mar 12 01:14:33 2000 Christopher Faylor <cgf@cygnus.com>
3122 * fhandler.cc (fhandler_base::get_readahead_into_buffer): New function.
3123 * fhandler.h: Declare new function. Add extra argument to
3124 process_slave_output.
3125 * fhandler_console.cc (fhandler_console::read): Move read ahead code to
3127 * fhandler_tty.cc (fhandler_pty_master::process_slave_output): Move
3129 (fhandler_tty_slave::read): Understand readahead.
3130 (fhandler_pty_master::read): Move code to process_slave_output.
3131 * select.cc (peek_pipe): Avoid performing certain checks when non-read
3132 and on inappropriate fh types.
3134 Sat Mar 11 22:47:43 2000 Christopher Faylor <cgf@cygnus.com>
3136 * fhandler_console.cc (fhandler_console::read): Don't even think about
3137 breaking on interrupt if executing in a "cygwin" thread.
3138 * fhandler_tty.cc (fhandler_pty_master::process_slave_output):
3139 Streamline, simplify code.
3140 * sigproc.cc (sig_send): Remove debugging statement.
3142 Fri Mar 10 13:20:50 2000 Christopher Faylor <cgf@cygnus.com>
3144 * sigproc.cc: Set wait_sig priority to normal.
3146 Fri Mar 10 13:03:06 2000 Christopher Faylor <cgf@cygnus.com>
3148 * sigproc.cc (wait_sig): Add addtional debugging output.
3150 Thu Mar 9 15:25:01 2000 Christopher Faylor <cgf@cygnus.com>
3152 * environ.cc: Eliminate oldstack CYGWIN option.
3153 * exceptions.cc (sfta): Eliminate obsolete function.
3154 (sgmb): Eliminate obsolete function.
3155 (class stack_info): Remove MS method for walking the stack.
3156 (stack_info::init): Just initialize required fields.
3157 (stack_info::brute_force): Rename to stack_info::walk.
3158 (handle_exceptions): Pass derived frame pointer to sig_send.
3159 (interrupt_setup): Clear saved frame pointer here.
3160 (interrupt_on_return): thestack is no longer a pointer.
3161 (call_handler): Accept a flag to indicate when a signal was sent from
3162 other than the main thread. Use saved frame pointer for determining
3163 where to place signal handler call.
3164 (sig_handle): Accept "nonmain" argument. Pass it to call_handler.
3165 * fhandler_tty.cc (fhandler_tty_common::__acquire_output_mutex): Change
3166 debugging output slightly.
3167 * (fhandler_tty_common::__release_output_mutex): Ditto.
3168 (fhandler_tty_slave::read): Fix a comment, remove a goto.
3169 * sigproc.cc (sig_send): Accept an optional frame pointer argument for
3170 use when suspending the main process. sigcomplete_main is an autoreset
3171 event now. Save frame pointer for non-main operation.
3172 (wait_sig): Make sigcomplete_main an autoreset event. Eliminate
3173 NOSIGQUEUE. Pass rc to sig_handle to signify if this was a nonmain
3175 * sigproc.h: Reflect change to sig_send argument.
3176 * syscalls.cc (swab): Eliminate swab function since it is now available
3178 * winsup.h (signal_dispatch): Change CONTEXT cx to DWORD ebp.
3180 Tue Mar 7 13:31:10 2000 Christopher Faylor <cgf@cygnus.com>
3182 * sigproc.cc (sig_send): Eliminate sync_sig_send synchronization since
3183 it didn't seem to affect the "bash hangs" problem.
3185 Tue Mar 7 13:17:56 2000 Christopher Faylor <cgf@cygnus.com>
3187 * mcount.c: Remove strace.h include.
3189 Tue Mar 7 00:29:34 2000 Christopher Faylor <cgf@cygnus.com>
3191 Throughout use strace class in place of individual functions and
3193 * cygwin.din: Eliminate _strace_wm.
3194 * sigproc.cc (wait_sig): Temporarily add more debugging output.
3195 * include/cygwin/version.h: Bump minor api to reflect export change.
3197 Sun Mar 5 01:17:05 2000 Christopher Faylor <cgf@cygnus.com>
3199 * exceptions.cc (call_handler): Streamline to use only one call to
3201 * sigproc.cc (sig_send): Use a muto around the ReleaseSemaphore.
3202 Remove priority setting since it didn't solve anything.
3204 Tue Feb 29 00:46:09 2000 Christopher Faylor <cgf@cygnus.com>
3206 * sigproc.cc (sig_send): Temporarily set priority to highest while
3209 Mon Feb 28 11:23:29 2000 Christopher Faylor <cgf@cygnus.com>
3211 * pinfo.cc (set_myself): Add build date to strace output.
3213 Mon Feb 28 11:17:30 2000 Eric Fifer <EFifer@sanwaint.com>
3215 * sigproc.cc (proc_subproc): Only clear wait event when not attending
3218 Mon Feb 28 00:08:09 2000 Christopher Faylor <cgf@cygnus.com>
3220 * configure.in: Remove --enable-strace-hhmmss option.
3221 * configure: Regenerate.
3223 Sun Feb 27 23:11:57 2000 Christopher Faylor <cgf@cygnus.com>
3225 * dcrt0.cc (set_os_type): Record OS name string.
3226 (getprogname): Eliminate obsolete function.
3227 (dll_crt0_1): Move initial strace initialization output to set_myself.
3228 * exceptions.cc (interruptible): Add debugging output.
3229 (interrupt_setup): New function.
3230 (interrupt_now): Use interrupt_setup to set up common interrupt handler
3232 (interrupt_on_return): Ditto.
3233 (call_handler): Move signal_arrived arm and clear threads to region
3234 where signalled thread is suspended or suffer races.
3235 * pinfo.cc (set_myself): Output interesting information when strace is
3236 first initialized. Initialize progname here.
3237 * sigproc.cc (sig_dispatch_pending): Modify to ensure that flush signal
3238 are sent synchronously.
3239 * strace.cc (strace_vsprintf): Move code into strace program.
3240 * uname.cc (uname): Use 'osname' global to construct cygwin name +
3241 Windows type + version.
3243 Fri Feb 25 19:26:42 2000 Christopher Faylor <cgf@cygnus.com>
3245 * exceptions.cc (interruptible): Make a little more structured.
3246 (call_handler): Allow signals to be sent even if signalled thread is
3247 stopped. Change order of signal_arrived arming/waiting threads
3248 clearing to eliminate a race.
3249 (reset_signal_arrived): New helper function.
3250 * malloc.cc (malloc_init): Use mutos so that signal handler can keep
3251 track of who owns the lock.
3252 (__malloc_lock): Ditto.
3253 (__malloc_unlock): Ditto.
3254 * sync.h (new_muto): Actually use a muto for the "buffer".
3255 * Makefile.in: Fix a dependency.
3257 2000-02-25 DJ Delorie <dj@cygnus.com>
3259 * Makefile.in: fix "make check" support and cygrun.
3261 Thu Feb 24 15:56:00 2000 Christopher Faylor <cgf@cygnus.com>
3263 * syscalls.c (_read): Clear errno before doing any read operation.
3265 Thu Feb 24 14:45:06 2000 Christopher Faylor <cgf@cygnus.com>
3267 * exceptions.cc (call_handler): Use new muto linked list to look for
3268 all potential mutos owned by suspended thread. Clear waiting threads
3269 while thread is stopped.
3270 (proc_subproc): Clarify debugging output.
3271 * sync.h (class muto): Add 'next' field.
3272 (new_muto): Keep linked list alive.
3274 Thu Feb 24 00:59:15 2000 Christopher Faylor <cgf@cygnus.com>
3276 Fix final round of gcc warnings relating to unused parameters.
3277 * debug.cc (iscygthread): New function.
3278 * debug.h: Declare it.
3279 * exceptions.cc (set_process_mask): Flush pending signals.
3280 (handle_sigsuspend): No need to flush pending signals.
3281 (call_handler): Refine previous tests of muto ownership. Only clear
3282 wait()'s when we have definitely responded to a signal.
3283 * fhandler_console.cc (fhandler_console::read): Don't set EINTR if
3284 executing in a "cygwin" thread.
3285 * sigproc.cc (proc_subproc): Use second argument to control whether
3286 CLEARWAIT actually sets "signalled" flag.
3287 * sync.h (muto): Add 'unstable' method.
3289 Wed Feb 23 21:59:44 2000 Christopher Faylor <cgf@cygnus.com>
3291 * hinfo.cc (hinfo::extend): Clean up debugging output.
3293 Wed Feb 23 21:34:58 2000 Christopher Faylor <cgf@cygnus.com>
3295 * exceptions.cc (interruptible): Change method for determining if
3296 something is interruptible.
3297 (call_handler): Avoid suspending a thread if it owns a muto. Only set
3298 signal_arrived if the thread was actually interrupted.
3299 (events_init): Initialize module information needed by interruptible().
3300 * init.cc (dll_entry): Record module handle of main for use by
3302 (proc_subproc): Reorganize handling of terminated child so that the
3303 bulk of the processing comes from the signal thread.
3304 (wait_sig): Force processing of waiting threads if SIGCHLD is not
3307 Tue Feb 22 23:06:01 2000 Christopher Faylor <cgf@cygnus.com>
3309 Respond to more g++ warnings relating to initializing structures.
3311 Mon Feb 21 18:36:37 2000 Christopher Faylor <cgf@cygnus.com>
3313 * fhandler.cc (set_inheritance): Revert previous patch which got rid of
3316 Mon Feb 21 00:19:40 2000 Christopher Faylor <cgf@cygnus.com>
3318 Respond to a multitude of new g++ warnings.
3320 Sun Feb 20 22:10:21 2000 Christopher Faylor <cgf@cygnus.com>
3322 * environ.cc (getwinenv): Make __stdcall.
3324 * malloc.cc (strdup): New function. Occludes newlib version.
3326 * winsup.h: Reflect above __stdcall changes.
3328 Sun Feb 20 21:31:00 2000 Corinna Vinschen <corinna@vinschen.de>
3330 * fhandler.cc (fhandler_disk_file::fstat): Modify get_file_attribute
3331 return value if FILE_ATTRIBUTE_READONLY is set.
3333 Thu Feb 17 11:00:23 2000 Christopher Faylor <cgf@cygnus.com>
3335 * environ.cc (environ_init): Cosmetic change.
3337 Mon Feb 7 16:50:44 2000 Christopher Faylor <cgf@cygnus.com>
3339 * Makefile.in: cygrun needs libshell32.a.
3341 Sun Feb 6 22:17:58 2000 Christopher Faylor <cgf@cygnus.com>
3343 * sigproc.cc (proc_subproc): Simplify case for when a child process is
3344 stopped since new signal handler ensures the desired behavior.
3346 Sun Feb 6 21:52:33 2000 Christopher Faylor <cgf@cygnus.com>
3348 * Makefile.in: Fix install target so that directories will be created
3351 Sun Feb 6 18:12:17 2000 Christopher Faylor <cgf@cygnus.com>
3353 * Makefile.in: exceptions.cc should depend on autoload.h.
3354 * exceptions.cc: Undef DECLSPEC_IMPORT prior to including imagehlp.h to
3355 avoid defining StackWalk as "import".
3356 (call_handler): Minor optimizations.
3357 (sig_handle_tty_stop): Fix typo in previous checkin.
3358 * sigproc.cc (sigproc_init): Ditto, for signal_arrived initialization.
3360 Sat Feb 5 15:37:37 2000 Christopher Faylor <cgf@cygnus.com>
3362 * dcrt0.cc (isquote): Convert to inline function.
3364 Sat Feb 5 00:26:01 2000 Christopher Faylor <cgf@cygnus.com>
3366 Throughout, rename global_signal_arrived to signal_arrived.
3367 Throughout, eliminate use of arm_signals and __signal_arrived.
3368 Throughout, revert to use of simple call to WaitForSingleObject or
3369 WaitForMultipleObjects.
3370 * debug.h: Eliminate obsolete function declaration.
3371 * exceptions.cc (sigWaitForSingleObject): Eliminate obsolete function
3373 * fhandler.h: Reflect change to select_stuff wait method.
3374 * fhandler_tape.cc (get_ll): Accomodate new w32api LARGE_INTEGER
3376 * ntea.c (NTReadEARaw): Ditto.
3378 * security.cc (ReadSD): Ditto.
3380 * syscalls.cc (_link): Ditto.
3381 * uname.cc (uname): Eliminate PPC switch.
3383 2000-02-01 Salvador Eduardo Tropea <salvador@inti.gov.ar>
3385 * include/io.h: add return type to setmode()
3387 2000-01-27 DJ Delorie <dj@cygnus.com>
3389 * include/netdb.h (h_errno): change __imp_ to dllimport
3390 * cygwin.din (reent_data): add DATA
3392 Thu Jan 27 01:07:14 2000 Christopher Faylor <cgf@cygnus.com>
3394 * exceptions.cc (call_handler): Add debugging output.
3395 * select.cc (MAKEready): Arm signals earlier.
3396 * sigproc.cc (__signal_arrived:arm): Move debugging version of this
3398 (__signal_arrived::release): Ditto.
3399 * sigproc.h: Recognize debugging versions of above two methods.
3400 (arm_signals::WaitForMultipleObjects): Don't release signal lock unless
3402 (arm_signals::WaitForMultipleSingleObject): Ditto.
3403 (arm_signals::MsgWaitForMultipleObjects): Ditto.
3405 Thu Jan 27 00:19:26 2000 Christopher Faylor <cgf@cygnus.com>
3407 * sync.h (new_muto): Workaround change in gcc behavior.
3409 Wed Jan 26 12:57:13 2000 Christopher Faylor <cgf@cygnus.com>
3411 * Makefile.in: Ensure that all required libraries are built prior
3412 to linking cygrun.exe.
3414 Tue Jan 25 21:26:57 2000 Christopher Faylor <cgf@cygnus.com>
3416 * exceptions.cc (sig_handle): Crudely work around potential problem
3417 when main thread has a lock but is killed by a fatal signal.
3418 * fhandler_tty.cc (fhandler_pty_master::write): Don't perform line
3419 editing on the pty master (so why do we need the second argument to
3421 * thread.cc: Reformat to GNU standards.
3423 2000-01-11 DJ Delorie <dj@cygnus.com>
3427 2000-01-11 DJ Delorie <dj@cygnus.com>
3429 * fhandler_zero.cc: new, emulate /dev/zero
3430 * testsuite/winsup.api/devzero.c: new, test /dev/zero
3431 * Makefile.in: build fhandler_zero.o
3432 * fhandler.h: add support for /dev/zero
3436 2000-01-11 DJ Delorie <dj@cygnus.com>
3438 * mmap.cc (mmap): MSDN says *one* of FILE_MAP_*, fix flags for
3441 Mon Jan 10 01:11:00 2000 Corinna Vinschen <corinna@vinschen.de>
3443 * security.cc (acl_access): New function.
3444 * syscalls.cc (access): Call acl_access if ntsec is on.
3446 Mon Jan 10 01:11:00 2000 Corinna Vinschen <corinna@vinschen.de>
3448 * fhandler.cc (get_file_owner): Use of ReadSD() instead of
3450 (get_file_group): Ditto.
3452 Sun Jan 9 15:43:07 2000 Christopher Faylor <cgf@cygnus.com>
3454 * debug.cc (struct thread_start): Add a flag to determine whether a
3455 field is in use. Eliminate thread_start_ix since it was not
3457 (thread_stub): Use notavail flag to control whether the entry in
3458 start_buf can be reused.
3459 (makethread): Ditto.
3461 Sun Jan 9 20:18:00 2000 Corinna Vinschen <corinna@vinschen.de>
3463 * security.cc (alloc_sd): Rearrange order of ACE creation.
3464 (setacl): Optimize creation of ACEs related to inheritance. Code
3466 (aclcheck): Disable check for existance of DEF_)CLASS_OBJ.
3468 Sat Jan 8 18:42:32 2000 Christopher Faylor <cgf@cygnus.com>
3470 * mkvers.h: Reorg fix.
3472 Sat Jan 8 20:00:00 2000 Corinna Vinschen <corinna@vinschen.de>
3474 * cygwin.din: Add new acl API calls.
3475 * grp.cc (getgroups): Change to work for any username.
3476 * security.cc (get_id_from_sid): Change to work with acl API.
3477 (is_grp_member): New function.
3478 (get_nt_attribute): Rewritten.
3479 (add_access_allowed_ace): New function.
3480 (add_access_denied_ace): Ditto.
3481 (alloc_sd): Rewritten.
3482 (setacl): New function.
3492 (aclfrommode): Ditto.
3493 (acltopbits): Ditto.
3494 (aclfrompbits): Ditto.
3497 (permfromstr): Ditto.
3498 (aclfromtext): Ditto.
3499 * syscalls.cc (access): Set errno again when needed.
3500 * include/cygwin/acl.h: New file.
3501 * include/sys/acl.h: Ditto.
3503 Sat Jan 8 14:46:19 2000 Christopher Faylor <cgf@cygnus.com>
3505 * Makefile.in: Add cygwin DLL specific CFLAGS define.
3507 Fri Jan 7 21:01:57 2000 Christopher Faylor <cgf@cygnus.com>
3509 * exceptions.cc (interrupt_on_return): Properly coerce assignment of
3512 2000-01-07 Mumit Khan <khan@xraylith.wisc.edu>
3514 * acconfig.h: New file.
3515 * configure.in Add check for memset builtin.
3516 (AC_CONFIG_HEADER): Use.
3517 (STRACE_HHMMSS): Define instead of substituting.
3518 (_MT_SAFE): Likewise.
3519 (_CYG_THREAD_FAILSAFE): Likewise.
3520 (DEBUGGING): Likewise.
3521 (MT_SAFE): Substitute as a yes/no variable.
3522 * Makefile.in: Remove DEBUGGING, STRACE_HHMMSS, and THREAD_FAILSAFE
3523 variables and add DEFS. Update usage of MT_SAFE to reflect yes/no
3524 values. Add config.h to winsup.h dependency.
3525 (CFLAGS_CONFIG): Update.
3526 (INCLUDES): Prepend `-I.'.
3527 * utils/Makefile.in (INCLUDES): Likewise.
3528 * winsup.h: Conditionally include config.h.
3529 * thread.cc: Likewise.
3530 * config.h.in: Generate new file.
3531 * configure: Regenerate.
3534 Fri Jan 7 16:21:01 2000 Christopher Faylor <cgf@cygnus.com>
3536 * dcrt0.cc (dll_crt0): Allow signal handling for dynamically loaded
3539 Thu Jan 6 00:30:12 2000 Corinna Vinschen <corinna@vinschen.de>
3541 * path.cc (symlink_check_one): Initialize local variable `unixattr'
3542 before calling `get_file_attribute'.
3543 * syscalls.cc (chown): Ditto.
3544 * security.cc (get_nt_attribute): Eliminate attribute copying from
3545 world to user/group in case of missing ACEs.
3546 (alloc_sd): Set special rights for administrators group only if it's
3547 neither owner nor group.
3548 * utils/mkpasswd.c: Create entry for local group administrators (SID
3551 Thu Jan 6 00:21:31 2000 Christopher Faylor <cgf@cygnus.com>
3553 Change function calls to __stdcall throughout.
3554 * exceptions.cc (handle_exceptions): Probe stack for return address to
3555 use with new signal method. Fill out sigsave.cx with this information.
3556 (call_handler): Use sigsave.cx if it is available, rather than trying
3557 to find the context of the main thread.
3558 (interrupt_on_return): Use address of context rather than
3560 (interrupt_now): Ditto.
3562 Thu Jan 6 00:21:31 2000 Corinna Vinschen <corinna@vinschen.de>
3564 * grp.cc (getgroups): Return supplementary groups now.
3565 * include/limits.h: Define NGROUP_MAX as 16 now.