OSDN Git Service

* dcrt0.cc (wow64_respawn): New static variable.
[pf3gnuchains/pf3gnuchains4x.git] / winsup / cygwin / ChangeLog-2000
1 Tue Dec 27  1:08:00 2000  Corinna Vinschen <corinna@vinschen.de>
2
3         * cygwin.din: Add symbols for `getrlimit' and `setrlimit'.
4         * exceptions.cc (stackdump): Avoid creating stackdump when
5         `rlim_core' is 0.
6         * resource.cc: New global variable `rlim_core'.
7         (getrlimit): New function.
8         (setrlimit): Ditto.
9         include/cygwin/version.h: Bump minor API version to 32 due to
10         adding `getrlimit' and `setrlimit'.
11         include/sys/resource.h: Add defines, types and prototypes for
12         `getrlimit' and `setrlimit'.
13
14 Mon Dec 25 22:18:42 2000  Christopher Faylor <cgf@cygnus.com>
15
16         * autoload.h: Make DLL initializers global to avoid inlining.
17         * exceptions.cc (interrupt_setup): Reorganize arguments to allow use of
18         regparm.
19         (interrupt_now): Ditto.
20         (interrupt_on_return): Ditto.
21         (call_handler): Ditto.
22
23 Mon Dec 25 13:36:44 2000  Christopher Faylor <cgf@cygnus.com>
24
25         * include/cygwin/version.h: Bump DLL minor version number to 8.
26
27 Wed Dec 20 13:37:00 2000  Corinna Vinschen <corinna@vinschen.de>
28
29         * autoload.cc: Add load statement for SetSecurityDescriptorControl.
30         * security.cc (alloc_sd): Always set SE_DACL_PROTECTED flag on
31         Win2K and higher.
32
33 Wed Dec 20 01:02:13 2000  Christopher Faylor <cgf@cygnus.com>
34
35         * exceptions.cc (reset_signal_arrived): Make global to avoid inlining.
36
37 Wed Dec 20 00:57:10 2000  Christopher Faylor <cgf@cygnus.com>
38
39         * fhandler_serial.cc (fhandler_serial::raw_read): Always find number of
40         bytes ready to be read whether overlapped_armed or not.
41
42 Tue Dec 19 21:39:00 2000  Corinna Vinschen <corinna@vinschen.de>
43
44         * syscalls.cc (remove): New function, overriding the newlib
45         implementation.
46
47 Tue Dec 19 16:26:00 2000  Corinna Vinschen <corinna@vinschen.de>
48
49         * environ.cc (struct parse_thing): Add entry for new CYGWIN option
50         `smbntsec'.
51         * path.cc (path_conv::check): Check path for being a remote path.
52         If so and `allow_smbntsec' is set to FALSE, set has_acls to FALSE.
53         * security.cc: Add global definition for `allow_smbntsec'.
54         * security.h: Add extern declaration for `allow_smbntsec'.
55         * fhandler.cc (fhandler_disk_file::open): Eliminate extern declaration
56         of `allow_ntsec'.
57         * syscalls.cc: Ditto.
58
59 Fri Dec 15 18:54:42 2000 Bradley A. Town <townba@pobox.com>
60
61         * fhandler_console.cc (read): Add support for xterm-style mouse event
62         reporting.
63         (fhandler_console::char_command): Honor mouse events.
64         (fhandler_console::open): Enable mouse input events.
65         (fhandler_console::input_tcsetattr): Ditto.
66         * select.cc (peek_console): Add check for mouse events.
67
68 Fri Dec 15 17:23:17 2000  Christopher Faylor <cgf@cygnus.com>
69
70         * path.cc (normalize_posix_path): Calculate path name length overruns
71         more dynamically.
72         (normalize_win32_path): Ditto.
73         * Makefile.in: Avoid scanning the directory twice for *.d files.
74
75 Thu Dec 14 23:37:51 2000  Christopher Faylor <cgf@cygnus.com>
76
77         * fhandler.h (fhandler_console): Add additional argument to
78         char_command method.
79         * fhandler_console.cc (fhandler_console::read): Revert previously
80         misapplied patch.
81         (fhandler_console::char_command): Add a second argument.
82         (fhandler_console::write): Recognize when a '?' is found after a
83         <esc>[.
84
85 Tue Dec  5 17:06:00 2000  Corinna Vinschen <corinna@vinschen.de>
86
87         * net.cc (cygwin_rexec): Eliminate superfluous call to
88         `set_socket_inheritance'.
89         * include/sys/socket.h: Add SUS defines for option values to `shutdown'.
90
91 Sun Dec 10 17:19:04 2000  Christopher Faylor <cgf@cygnus.com>
92
93         * include/sysexits: New file.
94
95 2000-12-09  Egor Duda <deo@logos-m.ru>
96
97         * autoload.cc: Autoload CharToOemA.
98         * dcrt0.cc (dll_crt0_1): Translate command line to OEM if current
99         codepage is OEM.
100         * environ.cc: Add new option 'codepage' to CYGWIN environment variable.
101         * fhandler_clipboard.cc (fhandler_clipboard::read): Read clipboard in
102         OEM mode if current codepage is OEM.
103         * fhandler_console.cc (fhandler_console::read): Only translate console
104         input if current codepage is ANSI.
105         * fhandler_console.cc (fhandler_console::write_normal): Translate
106         output data if current codepage is ANSI.
107         * pinfo.cc (codepage_init): New function.  Setup current codepage from
108         CYGWIN environment variable and set codepage for file APIs.
109         * security.cc (read_sd): Translate file name to it if current codepage
110         is OEM.
111         * winsup.h: (sys_wcstombs,sys_mbstowcs): Use current codepage for
112         translations between multibyte and widechar string and vice versa.
113
114 Sat Dec  9 16:29:45 2000  Christopher Faylor <cgf@cygnus.com>
115
116         * path.cc (normalize_win32_path): Check for explicit use of two slashes
117         at the beginning of a path.  These should be treated specially
118         regardless of whether they are UNC paths or old-style //a paths.  Avoid
119         adding cwd to a path if the path already begins with '/'.
120
121 Fri Dec  8 22:21:01 2000  Christopher Faylor <cgf@cygnus.com>
122
123         * path.cc (normalize_win32_path): Reorganize logic to accommodate
124         chroot.  Always check for MAX_PATH overrun.  Avoid adding one too many
125         backslashes when src path begins with a slash.  From Corinna Vinschen.
126         * winsup.h: Force demangling for dll_crt0 for newer compilers.
127
128 Thu Dec 7 12:10:00 2000  Edward M. Lee  <tailbert@yahoo.com>
129
130         * cygwin.din: Declare strtok_r for the import lib. Already in the DLL.
131
132 Wed Dec 6 15:39:18 2000  Earnie Boyd  <earnie_boyd@yahoo.com>
133
134         * include/sys/uio.h (readv): Correct prototype.
135         (writev): Ditto.
136
137 Tue Dec  5 17:06:00 2000  Corinna Vinschen <corinna@vinschen.de>
138
139         * include/sys/uio.h: Include <sys/cdefs.h>. Use __BEGIN_DECL and
140         __END_DECL.
141         Add declarations for `readv' and `writev'.
142
143 Mon Dec  4 20:49:00 2000  Corinna Vinschen <corinna@vinschen.de>
144
145         * Makefile.in: Change `-nostartfiles' to `-nostdlib' to avoid
146         automatic linking with default libraries when linking new-cygwin1.dll.
147         Link with libgcc.a and libstdc++.a explicitly.
148
149 Sun Dec  3 01:20:25 2000  Christopher Faylor <cgf@cygnus.com>
150
151         * path.cc (normalize_win32_path): Handle UNC paths better.
152         (slash_unc_prefix_p): Allow backslash UNC paths.
153
154 Sun Dec  3 00:20:25 2000  Christopher Faylor <cgf@cygnus.com>
155
156         * Makefile.in: Remove some extra cruft.
157
158 Sun Dec  3 00:13:26 2000  Christopher Faylor <cgf@cygnus.com>
159
160         * Makefile.in: Use CXX to build the DLL.
161         * configure.in: Find correct c++ compiler.
162         * configure: Regenerate.
163         * path.cc (normalize_posix_path): Put correct drive at beginning of \foo style paths.
164         (chdir): Don't send non-posix path to cygcwd.set.
165
166 Sat Dec  2 22:26:00 2000  Corinna Vinschen <corinna@vinschen.de>
167
168         * net.cc (get_inet_addr ): Close AF_UNIX socket file after reading.
169
170 Wed Nov 29 18:25:53 2000  Kazuhiro Fujieda  <fujieda@jaist.ac.jp>
171
172         * cygheap.cc (chgheap_root::operator =): Check root dir properly.
173
174 Thu Nov 29 18:11:00 2000  Corinna Vinschen <corinna@vinschen.de>
175
176         * net.cc (cygwin_inet_aton): Return nonzero if the address
177         is valid, zero if not according to Linux man page.
178
179 Mon Nov 27 21:09:50 2000  Kelley Cook <kelley.cook@home.com>
180
181         * mmap.cc (munmap): Check that mmap and munmap length match.
182
183 Tue Nov 28 18:08:00 2000  Corinna Vinschen <corinna@vinschen.de>
184
185         * fhandler.cc (fhandler_disk_file::open): Check for buggy CreateFile
186         condition.
187         * path.cc (path_conv::check): Get file system type in call to
188         GetVolumeInformation to check for file systems with buggy CreateFile.
189         * path.h (enum path_types): Add PATH_HASBUGGYOPEN.
190         (class path_conv): Add methods `has_buggy_open' and
191         `set_has_buggy_open'.
192
193 Sun Nov 26 16:26:14 2000  Christopher Faylor <cgf@cygnus.com>
194
195         * fhandler.cc (is_at_eof): New function.
196         (fhandler_base::raw_read): Detect special case where last error ==
197         ERROR_NOACCESS but the file is at EOF.  Most UNIXes do not consider
198         this to be an error.
199
200 Sun Nov 26 14:37:29 2000  Christopher Faylor <cgf@cygnus.com>
201
202         * include/cygwin/version.h: Bump DLL minor version number to 7.
203
204 Sat Nov 25 11:27:00 2000  Corinna Vinschen <corinna@vinschen.de>
205
206         * include/cygwin/version.h: Bump minor API version due to adding
207         inet_aton.
208
209 Sat Nov 25 11:07:00 2000  Corinna Vinschen <corinna@vinschen.de>
210
211         * net.cc (cygwin_inet_aton): New function.
212         * cygwin.din: Export cygwin_inet_aton as inet_aton.
213
214 Sat Nov 25 01:57:42 2000  Kazuhiro Fujieda  <fujieda@jaist.ac.jp>
215
216         * path.cc (mount_info::read_cygdrive_info_from_registry): Read system
217         cygdrive prefix with KEY_READ.
218         (mount_info::get_cygdrive_info): Ditto.
219
220 Wed Nov 22 11:18:02 2000  Christopher Faylor <cgf@cygnus.com>
221
222         * Makefile.in: new-temp.a -> new-templib.a
223
224 Mon Nov 20 17:04:43 2000  Christopher Faylor <cgf@cygnus.com>
225
226         * spawn.cc (spawn_guts): Quoting was still wrong.  Keep trying to
227         fix it.
228
229 Mon Nov 20 14:26:38 2000  Christopher Faylor <cgf@cygnus.com>
230
231         * spawn.cc (spawn_guts): YA tweak for dealing with arcane rules of
232         quoting in "normal" Microsoft programs.
233         * child_info.h: Bump fork magic number.
234         * include/sys/mount.h: Add an entry for mixed mode.
235
236 Fri Nov 17 12:28:00 2000  Corinna Vinschen <corinna@vinschen.de>
237
238         * path.cc (normalize_posix_path): Special care for root directory
239         in case of files beginning with a dot.
240
241 Fri Nov 17 12:28:00 2000  Corinna Vinschen <corinna@vinschen.de>
242
243         * syslog.cc (syslog): Add users SID to NT syslog entry.
244
245 Thu Nov 16 15:59:58 2000 Bradley A. Town <townba@pobox.com>
246
247         * fhandler_console.cc: New member variable `dwBufferSize' for `info'.
248         (fillin_info): Set `dwBufferSize' to the size of the console buffer.
249         (clear_screen): Use width of console buffer to calculate how many
250         spaces to clear.
251
252 Thu Nov 16 15:24:45 2000  Christopher Faylor <cgf@cygnus.com>
253
254         * Makefile.in: Make import library creation 'make -j2' friendly.
255
256 Thu Nov 16 10:28:00 2000  Corinna Vinschen <corinna@vinschen.de>
257
258         * uinfo.cc (uinfo_init): Call `cygwin_set_impersonation_token' to
259         reset `cygheap->user.token' to INVALID_HANDLE_VALUE.
260
261 Thu Nov 16 00:18:15 2000  Christopher Faylor <cgf@cygnus.com>
262
263         * exceptions.cc (interrupt_setup): Don't set signal mask here or races
264         occur with main thread.  Set it in sigdelayed instead.
265         (sigreturn): Reflect change in stack order of ebp and flags.
266         (sigdelayed): Set stack frame correctly.  Call set_process_mask here
267         with flags for last trapped signal.
268         (signal_dispatch): Add newmask.
269         * sigproc.cc (wait_sig): Eliminate ill-considered attempt to halt
270         looping signal processors.
271         * perthread.h (signal_dispatch): Add newmask field.
272
273 Wed Nov 15 22:08:00 2000  Corinna Vinschen <corinna@vinschen.de>
274
275         * uinfo.cc (internal_getlogin): Change parameter list to reflect
276         that `token' is member of cygheap_user now.
277         (uinfo_init): Use modified internal_getlogin.
278         * syscalls.cc (seteuid): Ditto.
279
280 Wed Nov 15 21:56:00 2000  Corinna Vinschen <corinna@vinschen.de>
281
282         * cygheap.h: Move `token' and `impersonated' from class _pinfo
283         to class cygheap_user.
284         * pinfo.h: Ditto.
285         * fork.cc (fork_child): Change usage of `token' and `impersonated'
286         accordingly.
287         (fork_parent): Ditto.
288         * security.cc (cygwin_set_impersonation_token): Ditto.
289         * sigproc.cc (proc_subproc): Ditto.
290         * spawn.cc (spawn_guts): Ditto.
291         * syscalls.cc (seteuid): Ditto.
292         * uinfo.cc (uinfo_init): Ditto.
293
294 Wed Nov 15  9:59:00 2000  Corinna Vinschen <corinna@vinschen.de>
295
296         * spawn.cc (spawn_guts): Revert patch to ignore chroot settings
297         on creating native Win32 environment.
298
299 Wed Nov 15 01:44:37 2000  Christopher Faylor <cgf@cygnus.com>
300
301         * fork.cc (slow_pid_reuse): Off-by-one.
302
303 Wed Nov 15 01:20:24 2000  Christopher Faylor <cgf@cygnus.com>
304
305         Throughout use myself->ppid_handle rather than parent_alive.
306         * child_info.h (child_info): Eliminate parent_alive.
307         * dcrt0.cc (dll_crt0_1): Call fork_init for debugging pid creation.
308         * fork.cc (fork_child): Reflect change to fixup_mmaps_after_fork
309         arguments.
310         (slow_pid_reuse): New function to grab last 'n' pids to prevent pid
311         reuse.
312         (fork_parent): Move last_fork_proc into slow_pid_reuse.
313         fork_pids debugging.  Eliminate unnecessary call to set_child_mmap_ptr.
314         (fork_init): New debugging function.
315         * mmap.cc (fixup_mmaps_after_fork): Renamed from
316         recreate_mmaps_after_fork.  Rely on copied data after a fork.
317         (set_child_mmap_ptr): Eliminate.
318         * pinfo.h (_pinfo): Eliminate parent_alive, mmap_ptr and reflect above
319         changes.
320         * spawn.cc (spawn_guts): Eliminate vestiges of "old way" of sending new
321         hProc to parent process.
322
323 Wed Nov 15  0:51:00 2000  Corinna Vinschen <corinna@vinschen.de>
324
325         * cygheap.cc (cygheap_root::cygheap_root): New function.
326         (cygheap_root::~cygheap_root): Ditto.
327         (cygheap_root::operator=): Ditto.
328         (cygheap_user::~cygheap_user): Ditto.
329         (cygheap_user::set_name): Ditto.
330         (cygheap_user::set_logsrv): Ditto.
331         (cygheap_user::set_domain): Ditto.
332         (cygheap_user::set_sid): Ditto.
333         * cygheap.h (cygheap_root): New class.
334         (cygheap_user): Ditto.
335         (init_cygheap): Change type of `root' member to cygheap_root.
336         Add `user' member.
337         * dir.cc (opendir): Use new `cygheap_root' class.
338         * dcrt0.cc (dll_crt0_1): Use new `cygheap_user' class.
339         * fork.cc (fork_parent): Ditto.
340         * grp.cc (getgroups): Ditto.
341         * passwd.cc (search_for): Ditto.
342         * path.cc: Use new `cygheap_root' class throughout.
343         * pinfo.h (_pinfo): Remove `use_psid'. Move `username', `psid',
344         `logsrv', `domain', `orig_{uid,gid}' and `real_{uid,gid}' to
345         cygheap_user class.
346         * security.cc: Use new `cygheap_user' class throughout.
347         * shared.cc (sec_user): Ditto.
348         * sigproc.cc (proc_subproc): Remove copy statements for user
349         related information moved to `cygheap_user' class.
350         * spawn.cc (spawn_guts): Invalidate current chroot settings
351         when creating Windows environment. Use new `cygheap_user' class.
352         * syscalls.cc: Use new `cygheap_user' class throughout.
353         * uinfo.cc: Ditto.
354         (internal_getlogin): Change parameters to reflect the
355         move of user information to cygheap.
356
357 Tue Nov 14 17:05:00 2000  Eric Fifer <efifer@dircon.co.uk>
358
359         * dir.cc (rewinddir): Always set __d_position = 0, so next
360         call to readdir() will restart the directory scan.
361
362 Tue Nov 14 00:51:28 2000  Christopher Faylor <cgf@cygnus.com>
363
364         * cygheap.h (init_cygheap): New struct holding values that live in the
365         Cygwin heap.
366         * child_info.h (child_info): Change pointer type of cygheap to
367         init_cygheap.
368         * cygheap.cc (init_cheap): Point cygheap_max after contents of cygheap.
369         Move some stuff into cygheap.h.
370         * dir.cc (opendir): Change to use root and rootlen in cygheap rather
371         than in myself.
372         (mkdir): Change to use umask in cygheap rather than in myself.
373         * path.cc: Ditto, throughout.
374         * syscalls.cc (_open): Ditto.  Change to use umask in cygheap rather
375         than in myself.
376         (chroot): Change to allocate root dir on the cygwin heap.
377         (umask): Change to use umask in cygheap rather than in myself.
378         (cygwin_bind): Ditto.
379         * sigproc.cc (proc_subproc): Don't copy umask or root stuff as this
380         happens automatically now.
381         * pinfo.h (_pinfo): Migrate stuff out of here and into init_cheap.
382         * dcrt0.cc (dll_crt0_1): Call cygheap_init later in startup for first
383         cygwin process.
384
385 Sun Nov 12 23:01:35 2000  Christopher Faylor <cgf@cygnus.com>
386
387         * path.cc (get_device_number): Allow /dev/ttySn to designate a com
388         port.
389
390 Sat Nov 11 23:55:19 2000  Christopher Faylor <cgf@cygnus.com>
391
392         * path.h: Add __attribute__ ((regparm(x))) to commonly used functions.
393         * pinfo.h: Ditto.
394         * sigproc.h: Ditto.
395         * sync.h: Ditto.
396
397 Fri Nov 10 13:48:44 2000 Bradley A. Town <townba@pobox.com>
398
399         * dcrt0.cc: New global variable `ignore_case_with_glob'.
400         (dll_crt0_1): Disable case-insensitive globbing before calling `main'.
401         * environ.cc (glob_init): New static function to set or clear
402         `ignore_case_with_glob'.
403         (known): Changed "glob" entry to call `glob_init'.
404         * glob.c (match): Use case-insensitive globbing if needed.
405
406 Thu Nov  9 14:30:00 2000  Corinna Vinschen <corinna@vinschen.de>
407
408         * dir.cc (readdir): Avoid reading from the beginning when
409         readdir is called after a previous call has returned NULL.
410
411 Wed Nov  8 21:00:31 2000  Christopher Faylor <cgf@cygnus.com>
412
413         * select.cc (peek_pipe): Deal with pending newline in pty_master.
414
415 Wed Nov  8 15:35:32 2000  Christopher Faylor <cgf@cygnus.com>
416
417         * environ.cc (_addenv): malloc space for setenv if cygwin1.dll is used
418         in conjunction with older binaries.
419         (environ_init): Ditto.
420
421 Wed Nov  8 08:49:27 2000 Jason Tishler <jt@dothill.com>
422
423         * external.cc (get_cygdrive_info): New function.
424         * external.cc (get_cygdrive_prefixes): Change to use get_cygdrive_info
425         but toss the user and system flags.
426         * external.cc (cygwin_internal): Add new CW_GET_CYGDRIVE_INFO case.
427         * path.cc (mount_info::get_cygdrive_prefixes): Remove method.
428         * path.cc (mount_info::get_cygdrive_info): New method.  Actually,
429         get_cygdrive_info is really an enhanced version of
430         get_cygdrive_prefixes renamed to get_cygdrive_info that also gets the
431         user and system flags.
432         * shared_info.h (get_cygdrive_prefixes): Remove method.
433         * shared_info.h (get_cygdrive_info): New method.
434         * include/cygwin/version.h: Bump minor API version due to adding
435         CW_GET_CYGDRIVE_INFO to cygwin_internal.
436         * include/sys/cygwin.h (cygwin_getinfo_types): Add
437         CW_GET_CYGDRIVE_INFO.
438
439 Tue Nov  7 20:58:00 2000  Corinna Vinschen <corinna@vinschen.de>
440
441         * autoload.cc: Add autoload statement for `WSASetLastError'.
442         * net.cc (cygwin_connect): Change error code to WSAEINPROGRESS
443         when connect returns WSAEWOULDBLOCK.
444
445 Mon Nov  6 15:11:57 2000  Christopher Faylor <cgf@cygnus.com>
446
447         * dcrt0.cc (sigthread::init): Reinstitute sigthread lock as a critical
448         section.
449         (dll_crt0_1): Move sigthread lock initialization to earlier in startup.
450         * exceptions.cc (interrupt_on_return): Remove previous kludgy attempt
451         to detect an invalid frame.
452         (call_handler): Eliminate inner for loop.  Grab signal critical section
453         lock where appropriate.
454         * sigproc.cc (proc_subproc): Restore uid setting.
455         * sigproc.h (sigthread): Reinstitute sigthread lock as a critical
456         section.
457         (sigframe): Grab the sigthread lock before clearing frame to avoid
458         having the signal thread use an invalid frame.
459
460 Mon Nov  6 11:11:42 2000 Jason Tishler <jt@dothill.com>
461
462         * path.cc (mount_info::read_cygdrive_info_from_registry): Use
463         CYGWIN_INFO_CYGDRIVE_PREFIX, CYGWIN_INFO_CYGDRIVE_DEFAULT_PREFIX, and
464         CYGWIN_INFO_CYGDRIVE_FLAGS.
465         * path.cc (mount_info::write_cygdrive_info_to_registry): Use
466         CYGWIN_INFO_CYGDRIVE_PREFIX and CYGWIN_INFO_CYGDRIVE_FLAGS.
467         * path.cc (mount_info::remove_cygdrive_info_from_registry): Ditto.
468         * path.cc (mount_info::get_cygdrive_prefixes): Use
469         CYGWIN_INFO_CYGDRIVE_PREFIX.
470         * include/cygwin/version.h: Add CYGWIN_INFO_CYGDRIVE_FLAGS,
471         CYGWIN_INFO_CYGDRIVE_PREFIX, and CYGWIN_INFO_CYGDRIVE_DEFAULT_PREFIX.
472
473 Mon Nov  6 11:10:44 2000  Jason Tishler <jt@dothill.com>
474
475         * errno.cc (strerror): Change EAGAIN case to return "Resource
476         temporarily unavailable" instead of "No more processes".
477
478 Mon Nov  6 01:04:35 2000  Christopher Faylor <cgf@cygnus.com>
479
480         * child_info.h (child_info): Add pppid_handle for closing the parent's
481         parent handle.
482         * dcrt0.cc (_dll_crt0): Close parent's parent handle when spawned or
483         forked.
484         * debug.cc (add_handle): Correct erroneous reference to handle
485         structure when printing warning.
486         * exceptions.cc (interrupt_now): Always return 1.
487         (interrupt_on_return): Accept a sigthread argument.  Check to see if
488         this argument has been trashed prior to setting up the stack return.
489         (call_handler): Add a loop around attempts to dispatch signals to
490         detect case where interrupt_on_return fails.
491         (_sigdelayed): Set up a temporary frame pointer prior to calling stuff
492         that could trigger an interrupt or the stack walking code will be very
493         confused.
494         * fork.cc (fork_parent): Move a lot of the setup of the child process
495         into proc_subproc.
496         * spawn.cc (spawn_guts): Ditto.  Use ppid_handle to contact logical
497         parent when reparenting execed process.
498         * pinfo.h (_pinfo): Remember the logical handle of the parent process.
499         * sigproc.cc (proc_subproc): Record most stuff necessary for the _pinfo
500         structure that is inferrable from myself when adding children.
501         (wait_sig): Always set 'pending_signals' flag when about to kick off
502         the signal scanning loop.  Reset it only if there are no pending
503         signals.
504
505 Sun Nov  5 13:46:23 2000  Christopher Faylor <cgf@cygnus.com>
506
507         * pinfo (wait_subproc): Son of neverending debug tweaking.
508
509 Sun Nov  5 11:45:15 2000  Christopher Faylor <cgf@cygnus.com>
510
511         * pinfo (wait_subproc): Neverending debug tweaking.
512
513 Sun Nov  5 01:34:51 2000  Christopher Faylor <cgf@cygnus.com>
514
515         * pinfo.cc (winpids:add): New method.
516         (winpids::enumNT): New method renamed from EnumProcessesNT.
517         Use add method to add elements to the lists.
518         (winpids::enum9x): New method renamed from EnumProcesses9x.
519         Use add method to add elements to the lists.
520         (winpids::enum_init): Accept 'winpid' parameter to control whether
521         to add all windows pids to the list.
522         (winpids::release): New method.
523         * pinfo.h (winpids): Reflect above changes.
524         * signal.cc (kill_pgrp): Ditto.
525         * external.cc (fillout_pinfo): Ditto.
526
527 Sat Nov  4 22:07:03 2000  Christopher Faylor <cgf@cygnus.com>
528
529         * exceptions.cc (handle_sigsuspend): Record frame here for signalling.
530         (set_process_mask): Ditto.
531
532 Sat Nov  4 14:24:10 2000  Christopher Faylor <cgf@cygnus.com>
533
534         * sigproc.cc (wait_subproc): Still more debugging cleanup.
535
536 Sat Nov  4 00:51:38 2000  Christopher Faylor <cgf@cygnus.com>
537
538         * pinfo.cc (EnumProcessesNT): Avoid 0 pids.
539         (EnumProcesses9x): Ditto.
540         * sigproc.cc (remove_child): Eliminate.
541         (proc_subproc): Move remove_child stuff here.
542         (wait_subproc): Synchronize with proc_subproc when error occurs.  Add
543         more debugging info.
544         * sigproc.h (procstuff): Add an entry.
545         * spawn.cc (spawn_guts): Add sigframe here.
546
547 Fri Nov  3 20:07:14 2000  Christopher Faylor <cgf@cygnus.com>
548
549         * sigproc.cc (wait_subproc): Refine debug output.
550
551 Thu Nov  2 23:01:20 2000  Christopher Faylor <cgf@cygnus.com>
552
553         * pinfo.cc (pinfo::init): Reverse order of setting status and pid info
554         in an execed process to avoid a race.
555         * sigproc.cc (wait_subproc): Print more info when a WFSO error occurs.
556         * automode.c: New file.
557         * syscalls.cc (close_all_files): Streamline slightly.
558         * cygheap.cc (ccalloc): Clear *entire* allocated array.
559
560 Thu Nov  2 01:58:03 2000  Christopher Faylor <cgf@cygnus.com>
561
562         * ntdll.h: Remove IO_COUNTERS definition since it is now in winnt.h.
563
564 Thu Nov  2 00:10:23 2000  Christopher Faylor <cgf@cygnus.com>
565
566         * pinfo.cc (EnumProcessesNT): New function.  Eliminates dependence on
567         psapi.h.
568         (EnumProcesses9x): Rename from EnumProcessesW95.  Change arguments to
569         be more useful for cygwin.
570         (winpids::init): Accommodate argument changes.
571         (enum_init): Ditto.
572         * pinfo.h (winpids): Make pidlist dynamically extendable by storing it
573         as a pointer and remembering the size.
574         * ntdll.h: Add extra definitions needed for EnumProcessesNT.  Reformat
575         via 'indent'.
576
577 Wed Nov  1 21:08:23 2000  Christopher Faylor <cgf@cygnus.com>
578
579         * exceptions.cc (interruptible): Remove obsolete tests.
580         (sigreturn): Construct pseudo-frame-pointer so that signal handler can
581         figure out where to put return address when signals are coming in
582         quickly.
583         * path.cc (cwdstuff::get): Allow length 0 buffer length when buffer
584         when NULL.
585
586 Tue Oct 31 18:12:56 2000  Christopher Faylor <cgf@cygnus.com>
587
588         * path.h (has_exec_chars): Standard function for checking for
589         executable magic numbers.
590         * path.cc (symlink_info::check): Use the above function.
591         * fhandler.cc (fhandler_disk_file::open): Ditto.
592
593 Tue Oct 31 17:57:52 2000  Christopher Faylor <cgf@cygnus.com>
594
595         * path.cc (_readlink): Return ENOENT when file does not exist.
596
597 Tue Oct 31 23:35:00 2000  Corinna Vinschen <corinna@vinschen.de>
598
599         * fhandler.h (fhandler_dev_raw): Add method `fixup_after_exec'.
600
601 Tue Oct 31 22:39:00 2000  Corinna Vinschen <corinna@vinschen.de>
602
603         * fhandler.h (fhandler_dev_raw): Add definition for method
604         `fixup_after_fork'.
605         * fhandler_raw.cc (fhandler_dev_raw::fhandler_dev_raw): Add
606         `set_need_fixup_after_fork' call.
607         (fhandler_dev_raw::~fhandler_dev_raw): Revert to user space
608         allocation.
609         (fhandler_dev_raw::open): Ditto.
610         (fhandler_dev_raw::dup): Ditto. Reset buffer pointer.
611         (fhandler_dev_raw::fixup_after_fork): New function.
612         * fhandler_tape.cc (fhandler_dev_tape::open): Revert to user space
613         memory allocation.
614         (fhandler_dev_tape::ioctl): Ditto. Change behaviour on MTSETBLK when
615         new size is 1.
616
617 Tue Oct 31 20:56:00 2000  Corinna Vinschen <corinna@vinschen.de>
618
619         * fhandler_tape.cc (fhandler_dev_tape::open): Fix memory allocation.
620         Use Cygwin heap instead of user heap.
621         (fhandler_dev_tape::ioctl): Ditto.
622
623 Tue Oct 31 12:00:06 2000  Christopher Faylor <cgf@cygnus.com>
624
625         * pinfo.cc (enum_init): Don't suffer silently if we can't load the
626         process enumerators.
627
628 Mon Oct 30 16:54:26 2000  Christopher Faylor <cgf@cygnus.com>
629
630         * signal.cc (kill_pgrp): Revert 25-Oct change.
631         (kill_worker): Ditto.
632
633 Sun Oct 29 20:52:31 2000  Christopher Faylor <cgf@cygnus.com>
634
635         * include/cygwin/version.h: Bump DLL minor version number to 6.
636
637 Sat Oct 28 01:39:53 2000  Christopher Faylor <cgf@cygnus.com>
638
639         * configure.in: Eliminate subdir stuff.
640         * configure: Regenerate.
641         * include/getopt.h (option): Make name field 'const'.
642
643 Fri Oct 27 20:51:00 2000  Corinna Vinschen <corinna@vinschen.de>
644
645         * autoload.cc: New file keeping all autoload stuff.
646         * Makefile.in: Add autoload.o to dependencies.
647         * dcrt0.cc: Move all autoload stuff to autoload.cc.
648         * fhandler_mem.cc: Ditto.
649         * net.cc: Ditto.
650         * uinfo.cc: Ditto.
651
652 Fri Oct 27 11:37:20 2000  Christopher Faylor <cgf@cygnus.com>
653
654         * sigproc.cc (wait_sig): Add braces to avoid confusion.
655
656 Fri Oct 27 11:48:00 2000  Corinna Vinschen <corinna@vinschen.de>
657
658         * fhandler_socket.cc: New file.
659         * Makefile.in: Add fhandler_socket.o to dependencies.
660         * fhandler.h: Change comment.
661         * net.cc Move all fhandler_socket methods to fhandler_socket.cc.
662         * winsup.h: Add declaration for `ws2_32_handle'.
663
664 Thu Oct 26 11:51:59 2000  Corinna Vinschen <corinna@vinschen.de>
665
666         * dtable.cc (dtable::release): Check for socket. Change
667         cnt_need_fixup_before accordingly.
668         (dtable::dup2): Ditto.
669         (dtable::fixup_before_fork): New method.
670         (dtable::fixup_before_exec): Ditto.
671         * dtable.h (class dtable): Add member `cnt_need_fixup_before'. Add
672         definition for methods `dec_need_fixup_before', `inc_need_fixup_before',
673         `need_fixup_before', `fixup_before_exec' and `fixup_before_fork'.
674         * fhandler.h (class fhandler_base): Slight rearrangements. Add
675         definitions for methods `fixup_before_fork_exec'.
676         (class fhandler_socket): Eliminate superfluous constructor.
677         Add member `prot_info_ptr'. Add destructor. Add definitions for
678         methods `dup', `fixup_before_fork_exec', `fixup_after_fork' and
679         `fixup_after_exec'.
680         * fork.cc (fork_parent): Care for file types which need a fixup
681         before fork. Start child in suspended state then.
682         * net.cc: New global variable `ws2_32_handle' and `wsadata'.
683         (fdsock): Check for Winsock version. Call `set_socket_inheritance'
684         only if Winsock version < 2.0. Care for `need_fixup' count in fdtab.
685         (cygwin_socket): Eliminate call to `set_socket_inheritance'.
686         (cygwin_accept): Ditto.
687         (cygwin_rcmd): Ditto.
688         (cygwin_rresvport): Ditto.
689         (cygwin_rexec): Ditto.
690         (socketpair): Ditto.
691         (fhandler_socket::fhandler_socket): Set `need_fork_fixup'. Allocate
692         space for the WSAPROTOCOL_INFOA struct used in fixup.
693         (fhandler_socket::~fhandler_socket): New destructor.
694         (fhandler_socket::fixup_before_fork_exec): New method.
695         (fhandler_socket::fixup_after_fork): Ditto.
696         (fhandler_socket::dup): Ditto.
697         (wsock_init): New static function.
698         (LoadDLLinitfunc (wsock32)): Rearranged.
699         (LoadDLLinitfunc (ws2_32)): New function.
700         (dummy_autoload): Add autoload statemants for `WSADuplicateSocketA'
701         and `WSASocketA'.
702         * spawn.cc (spawn_guts): Care for file types which need a fixup
703         before exec. Start child in suspended state then.
704
705 Wed Oct 25 20:49:59 2000  Christopher Faylor <cgf@cygnus.com>
706
707         * signal.cc (kill_pgrp): Don't limit sending of signals to stopped
708         processes when sig < 0.
709         (kill_worker): Only send SIGCONT to stopped processes when sendSIGCONT.
710
711 Wed Oct 25 13:56:39 2000  Christopher Faylor <cgf@cygnus.com>
712
713         * exceptions.cc (sig_handle): Just make sure that wait_sig loops when
714         receiving a SIGCONT.  Don't block waiting for completion that will
715         never occur.
716
717 Wed Oct 25 09:59:14 2000  Christopher Faylor <cgf@cygnus.com>
718
719         * dtable.cc (dtable::fixup_after_exec): Use variable rather than
720         constantly indexing into fds array.
721         (dtable::fixup_after_fork): Ditto.
722
723 Wed Oct 25 10:43:00 2000  Corinna Vinschen <corinna@vinschen.de>
724
725         * fhandler.cc (fhandler_base::fcntl): Treat O_NONBLOCK and OLD_O_NDELAY
726         as exactly the same. If one is set, both are set.
727         * net.cc (fhandler_socket::fcntl): Ditto.
728
729 Tue Oct 24 23:58:35 2000  Christopher Faylor <cgf@cygnus.com>
730
731         * dcrt0.cc (do_exit): Remove debugging statement.
732
733 Tue Oct 24 23:45:09 2000  Christopher Faylor <cgf@cygnus.com>
734
735         * dcrt0.cc (do_exit): Don't bother looking for pgrp children to send
736         SIGHUP if process has never created any children.
737         * fork.cc (fork): Set flag indicating that there is another process
738         with our process group.
739         * spawn.cc (spawn_guts): Ditto.
740         * pinfo.h (set_has_pgid_children): New methods for setting when process
741         has children in its process group.
742         * syscalls.cc (setpgid): Clear has_gid_children if pgid changes.
743
744 Tue Oct 24 20:38:00 2000  Corinna Vinschen <corinna@vinschen.de>
745
746         * ntdll.h: New file.
747         * fhandler_mem.cc: Move ntdll.dll specific definitions and
748         declarations to ntdll.h.
749         * sysconf.cc (sysconf): Add support for _SC_NPROCESSORS_CONF,
750         _SC_NPROCESSORS_ONLN, _SC_PHYS_PAGES and _SC_AVPHYS_PAGES.
751
752 Tue Oct 24 20:00:00 2000  Corinna Vinschen <corinna@vinschen.de>
753
754         * fhandler.cc (fhandler_base::fcntl): Behave properly when passed
755         previous version of O_NDELAY.
756         * syscalls.cc: Move OLD_O_NDELAY to winsup.h.
757         * winsup.h: Define OLD_O_NDELAY now.
758
759 Mon Oct 23 21:47:55 2000  Christopher Faylor <cgf@cygnus.com>
760
761         * exceptions.cc (signal_exit): Kill any executing child process if
762         we're dying.
763         * path.h: Remove unneeded extern.
764         * spawn.cc (std_suffixes): Make static.  Don't set dwProcessId here
765         since it makes the process unsignalable.  Set strace flag that this is
766         an execed process stub.
767         * strace.cc (strace::vsprntf): Use strace flag to indicate when to
768         visually flag that this is an exec stub.
769         * include/sys/strace.h (strace): Add 'execing' flag.
770
771 Mon Oct 23 16:43:33 2000  Christopher Faylor <cgf@cygnus.com>
772
773         * sigproc.cc (proc_subproc): Don't send a false positive if WNOHANG and
774         no processes are available for waiting.
775
776 Mon Oct 23 22:27:00 2000  Corinna Vinschen <corinna@vinschen.de>
777
778         * fhandler.cc (fhandler_base::fcntl): Setting flags in F_SETFL
779         branch according to Linux documentation.
780
781 Mon Oct 23 21:43:00 2000  Corinna Vinschen <corinna@vinschen.de>
782
783         * fcntl.cc (_fcntl): Rearrange as wrapper function. Move all
784         functionality except F_DUPFD to fhandler classes.
785         * fhandler.cc (fhandler_base::fcntl): New method.
786         * net.cc (fhandler_socket::fcntl): Ditto.
787         * fhandler.h (class fhandler_base): Add method prototype for fcntl().
788         (class fhandler_socket): Ditto.
789
790 Mon Oct 23 12:44:35 2000  Christopher Faylor <cgf@cygnus.com>
791
792         * sigproc.cc (proc_subproc): Correctly handle flags for WNOHANG case.
793
794 Mon Oct 23 10:00:00 2000  Corinna Vinschen <corinna@vinschen.de>
795
796         * security.cc: Eliminate C++ comments throughout.
797
798 Sun Oct 22 23:33:00 2000  Christopher Faylor <cgf@cygnus.com>
799
800         * fork.cc (fork): Set sigframe here, since it can pause for a
801         considerable amount of time.
802         * environ.cc (_addenv): Add debugging.
803         * fhandler.cc: Eliminate unneeded include.
804         * smallprint.c: Ditto.
805
806 Sun Oct 22 12:07:00 2000  Corinna Vinschen <corinna@vinschen.de>
807
808         * pinfo.cc (pinfo_init): Eliminate call to `set_process_privileges'.
809         * security.cc (write_sd): Call `set_process_privileges' on the first
810         call to `write_sd'.
811         (set_process_privileges): Eliminate adjusting SE_BACKUP_NAME privilege.
812
813 Sat Oct 21 16:57:23 2000  Christopher Faylor <cgf@cygnus.com>
814
815         * pinfo.cc (pinfo::init): Make PID_EXECED signal creation as well as
816         PID_IN_USE.
817
818 Sat Oct 21 01:52:54 2000  Christopher Faylor <cgf@cygnus.com>
819
820         * spawn.cc (spawn_guts): Don't do the reparenting step if we notice
821         that the child has exited prior to sending the subprocess_ready signal
822         (?).
823
824 Sat Oct 21 00:46:36 2000  Christopher Faylor <cgf@cygnus.com>
825
826         * fhandler.h (fhandler_console): Remove tcsetpgrp.
827         * fhandler_console.cc (fhandler_console::tcsetpgrp): Eliminate.
828         * fork.cc (fork_parent): Avoid returning same pid twice in a row
829         regardless of OS.
830         * pinfo.cc (pinfo::init): Rename create argument to flags and treat it
831         as such.
832         * signal.cc (set_sigcatchers): New function.
833         (signal): Use set_sigcatchers to increment or decrement sigcatcher
834         tracker.
835         (sigaction): Ditto.  Add debugging output.
836         * spawn.cc (spawn_guts): Always quote first argv[0] argument when it's
837         a COMSPEC shell.
838
839 2000-10-20  DJ Delorie  <dj@redhat.com>
840
841         * times.cc (to_time_t): pass zero time as epoch
842         * fhandler.cc (fstat): copy atime/ctime from mtime if they're zero
843
844 Thu Oct 19 23:31:41 2000  Christopher Faylor <cgf@cygnus.com>
845
846         * external.cc (fillout_pinfo): Pass PID_NOREDIR flag to pinfo init to
847         avoid finding execed processes twice.
848         * signal.cc (kill_pgrp): Ditto.
849         * spawn.cc (spawn_guts): Avoid passing first argument to CreateProcess
850         when running a windows shell so that CreateProcess will locate the
851         shell.  Reorganize so that correct error is returned when CreateProcess
852         fails.
853
854 Thu Oct 19 13:55:31 2000  Christopher Faylor <cgf@cygnus.com>
855
856         * dcrt0.cc (sigthread::init): Correct overzealous ifdef.
857         * exceptions.cc (call_handler): Avoid calling sigthread acquire lock.
858         * sigproc.h (sigthread): Comment out lock for now.
859         * sync.cc (muto::acquire): Add a minor optimization.
860
861 2000-10-18  DJ Delorie  <dj@redhat.com>
862
863         * Makefile.in: add miscfuncs.cc
864         * miscfuncs.cc: new, miscellaneous functions
865         * winsup.h: define table-driven tolower/toupper
866         * environ.cc: use them
867         * fhandler_console.cc: ditto
868         * fhandler_termios: ditto
869         * path.cc: ditto
870         (strncasematch, strcasematch, strcasestr): move to miscfuncs.cc
871
872 Wed Oct 18 20:50:27 2000  Christopher Faylor <cgf@cygnus.com>
873
874         * sigproc.h (sigthread): Eliminate locking for now since per thread
875         signalling is not available.
876         * dcrt0.cc (sigthread::init): Ditto.
877         (dll_crt0_1): Move set_process_privileges call (temporarily?) to
878         pinfo_init.
879         (pinfo_init): Only call set_process_privileges when allow_ntsec.
880
881 2000-10-18  DJ Delorie  <dj@redhat.com>
882
883         * dcrt0.cc (dll_crt0_1): init cygcwd before forkee branch
884
885         * environ.cc (conv_start_chars): Cache a table of "first
886         characters" for environment variables needing conversion.
887         (getwinenv): Use it.
888         (environ_init): Create it, also check first chars for TERM and
889         CYGWIN.
890
891         * path.cc: Use lookup table for case insensitive comparisons.
892
893 Wed Oct 18 00:48:49 2000  Christopher Faylor <cgf@cygnus.com>
894
895         * exceptions.cc (call_handler): Make signal pending if sigsave.sig is
896         still active.
897         * syscalls.cc (_read): Don't clear errno.
898         * sigproc.cc (wait_sig): Don't scan the waiting process list after a
899         SIGCHLD if there are no zombies to reap.
900         * winsup.h: Use __builtin_strcmp.
901         * environ.cc (posify): Don't initialize len unless it is required
902         (from DJ Delorie <dj@redhat.com>).
903
904 Tue Oct 17 14:50:31 2000  Christopher Faylor <cgf@cygnus.com>
905
906         * sigproc.cc (proc_subproc): Remove unneeded test for correct process
907         in PROC_ADDCHILD.  Return 0 when terminated child has just been
908         reparented.
909         (wait_subproc): Only send SIGCHLD when proc_subproc returns != 0.
910         * strace.cc (strace::vsprntf): Only strip .exe extension from program
911         name.
912
913 2000-10-16  Charles Wilson  <cwilson@ece.gatech.edu>
914
915         * fhandler_clipboard.cc: new file
916         * Makefile.in: include fhandler_clipboard.o in DLL_OFILES list.
917         * fhandler.h: add FH_CLIPBOARD to the devices enum.
918         (fhandler_dev_clipboard): new
919         * path.cc (windows_device_names): add "\\dev\\clipboard"
920         (get_device_number): check for "clipboard"
921         * dcrt0.cc: declare a few more functions from winuser.h
922         * dtable.cc (dtable::build_fhandler): check for FH_CLIPBOARD in
923         switch().
924
925 Mon Oct 16 21:36:57 2000  Christopher Faylor <cgf@cygnus.com>
926
927         * debug.cc (add_handle): Issue warning on attempts to add the same
928         handle more than once.
929         * fhandler_tty.cc (fhandler_tty_slave::open): Protect some handles.
930         (fhandler_tty_common::close): Use proper name when closing handles.
931         (fhandler_pty_master::close): Don't close to_slave or from_slave since
932         they've already been closed earlier in the function.
933         * sigproc.cc (proc_subproc): Don't protect vchild->hProcess.  Expect
934         that the caller will do this, instead.
935         * tty.cc (tty_list::terminate): Use proper name when closing handles.
936         (tty::make_pipes): Protect some handles.
937
938 Mon Oct 16 18:37:22 2000  Christopher Faylor <cgf@cygnus.com>
939
940         * Makefile.in: Remove some obsolete stuff.
941         * dcrt0.cc (dll_crt0_1): Call signal_fixup_after_exec where appropriate.
942         Set myself->uid from parent version.
943         Just use ThreadItem Init method.  Close or store hexec_proc as appropriate.
944         (_dll_crt0): Store user_data->forkee here so that proper tests can be made
945         subsequently.
946         (do_exit): Remove hExeced stuff.
947         * environ.cc (environ_init): Accept environ count as well as environ pointer.
948         * environ.h: Reflect above change.
949         * pinfo.cc (pinfo_init): Ditto.  Accept environ count.
950         (fixup_in_spawned_child): Remove.
951         * spawn.cc (spawn_guts): Move signal code to dll_crt0_1.  Don't suspend
952         execing process since it is no longer necessary.  Store envc.
953         * exceptions.cc (signal_fixup_after_exec): New function.
954         (call_handler): Remove hExeced test.
955         * child_info.h (cygheap_exec_info): Store envc as well as envp.
956         (child_info_spawn): Store hexec_proc so that it can be closed in child.
957         * path.cc (normalize_posix_path): Avoid intermediate use of temporary cwd buf.
958         (normalize_win32_path): Ditto.
959         (cwdstuff::get_initial): Always set lock.
960         * sigproc.h: Remove hExeced.
961         * strace.cc (strace::vsprntf): Modify to accommodate for lack of hExeced.
962         * thread.cc (MTinterface::Init): Merge Init1 and ClearReent into this method.
963         (MTinterface::Init1): Eliminate.
964         (MTinterface::ClearReent): Eliminate.
965         * thread.h: Reflect above changes.
966         * include/sys/strace.h (strace): Make microseconds() public.
967
968 Sun Oct 15 21:54:52 2000  Christopher Faylor <cgf@cygnus.com>
969
970         Make various functions 'regparm', throughout.
971         * pinfo.h (_pinfo): Inline simple signal manipulation functions.
972         Requires inclusion of thread.h which was removed from .cc files, where
973         appropriate.  throughout.
974         * pinfo.cc: Eliminate signal manipulation functions.
975         (_pinfo::exit): Calculate total rusage for exiting process here.
976         * cygheap.cc (size2bucket): Eliminate.
977         (init_buckets): Ditto.
978         (_cmalloc): Calculate size and bits in a loop rather than going through
979         a function call.
980         (_crealloc): Use stored array index to calculate allocated size.
981         * spawn.cc (spawn_guts): Use _pinfo exit method to exit, calculating
982         cpu usage.
983
984 Sat Oct 14 21:24:16 2000  Christopher Faylor <cgf@cygnus.com>
985
986         * exceptions.cc (set_console_handler): Don't allocate
987         console_handler_thread_waiter.  It is obsolete.
988         (ctrl_c_handler): Don't use console_handler_thread_waiter.
989         * path.cc (hash_path_name): Fix handling of relative names.  Make case
990         insensitive.
991         * path.h (suffix_info): Use initializers.
992         * pinfo.h (_pinfo): Avoid initializers for null case.
993         * resource.cc (fill_rusage): Zero rest of rusage structure.
994         * security.cc (set_process_privileges): Don't reopen parent process.
995         Just use hMainProc.
996         * signal.cc (signal): Track when a signal handler has been used.
997         (sigaction): Ditto.
998         * sigproc.cc (pchildren): Use default initializer.
999         (zombies): Ditto.
1000         (sigproc_terminate): Avoid closing handles that will be closed on exit
1001         anyway.
1002         (wait_sig): Send signal to "parent" on EXECing, not FORKing.
1003         (wait_subproc): Send SIGCHLD here rather than in proc_wait to avoid
1004         potential muto conflicts.
1005         * sigproc.h (sigthread): Don't initialize to zero.  It's the default.
1006         * spawn.cc (spawn_guts): Fill in resources from exec parent prior to
1007         termination.
1008         * sync.h (muto): Don't initialize to zero.
1009         * syscalls.cc (close_all_files): Use one lock around entire loop and
1010         call fhandler close/release stuff directly.
1011         (_read): Don't use ready_for_read if there are not signal handlers
1012         active.
1013
1014 Sat Oct 14 12:24:24 2000  Christopher Faylor <cgf@cygnus.com>
1015
1016         * dcrt0.cc (dll_crt0_1): Fix display of "title".
1017         (do_exit): Use pinfo exit method to exit.
1018         (__api_fatal): Ditto.
1019         * exceptions.cc (signal_exit): Ditto.
1020         * fork.cc (fork_child): Remove debugging stuff.  Use pinfo_fixup_after
1021         fork in place of exec_fixup_after_fork.
1022         * pinfo.cc (pinfo_fixup_after_fork): New method.
1023         (pinfo_fixup_in_spawned_child): Ditto.
1024         (_pinfo::exit): New method.
1025         (_pinfo::init): Remove recursion.  Detect pathological case where pinfo
1026         structure already exists for new pid.
1027         * pinfo.h (_pinfo): Reorganize slightly.  Add new method and new
1028         function declarations.
1029         * sigproc.cc (proc_exists): Previous simplification was a little to
1030         simple.  Try harder to detect if a process exists.
1031         (proc_terminate): Use PID_EXITED setting to determine if process is
1032         still around.
1033         (WFSO): Remove debugging statement.
1034         (WFMO): Ditto.
1035         * spawn.cc (exec_fixup_after_fork): Eliminate.
1036         (spawn_guts): Always set old_title to NULL.  Is it really needed?  Move
1037         hexec_proc to pinfo.cc.  Call pinfo_fixup_in_spawned_child to eliminate
1038         handle link after a spawn.
1039         * include/sys/cygwin.h: Remove PID_NOT_IN_USE.  Add PID_EXITED.
1040
1041 Sat Oct 14 10:54:00 2000  Corinna Vinschen <corinna@vinschen.de>
1042
1043         * cygwin.din: Add symbol hstrerror.
1044         * net.cc: Change meaning of member `s' of struct host_errmap.
1045         (set_host_errno): Fix error in loop condition.
1046         (hstrerror): Ditto.
1047         (herror): Add appropriate functionality.
1048         * include/netdb.h: Add declaration of hstrerror.
1049         * include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR to 29.
1050
1051 Sat Oct 14 01:45:25 2000  Christopher Faylor <cgf@cygnus.com>
1052
1053         * cygheap.cc (cygheap_fixup_in_child): Don't page round cygheap copied
1054         from parent.
1055         * dcrt0.cc (do_exit): Don't cleanup pinfo on exit.  That happens
1056         automatically now.
1057         * exceptions.cc (signal_exit): Ditto.
1058         * fork.cc (fork_parent): Use stack_here value passed in from fork().
1059         (fork): Figure out top of stack here and pass it to fork_parent.
1060         * pinfo.cc (_pinfo::record_death): Eliminate.
1061         * pinfo.h (_pinfo): Ditto.
1062         * sigproc.cc (proc_exists): Simplify.
1063         (proc_terminate): Ditto.
1064         (remove_zombie): Don't cleanup pinfo stuff.
1065         (wait_sig): Send subproc_ready signal whether execed or spawned.
1066         * spawn.cc (spawn_guts): Always create subproc_ready event.  Use it for
1067         both exec and spawn.
1068         (_spawnve): Send proper mode to spawn_guts when mode != _P_OVERLAY.
1069
1070 Thu Oct 12 23:11:05 2000  Christopher Faylor <cgf@cygnus.com>
1071
1072         * dtable.cc (dtable::fixup_after_fork): Revert thinko below.
1073         * pinfo.cc (set_myself): Show pid in initial strace line.
1074
1075 Thu Oct 12 17:58:03 2000  Christopher Faylor <cgf@cygnus.com>
1076
1077         * child_info: Bump child_info "version".
1078         (child_info): Move some fields from child_info_spawn to here.
1079         * cygheap.cc: Make cygheap pointers NOCOPY.
1080         * dcrt0.cc (dll_crt0_1): Copy cygwin heap here regardless of whether
1081         we've been forked or execed.
1082         * dtable.cc (dtable::fixup_after_fork): Just release close-on-exec fds.
1083         * exceptions.cc (stackdump): Respond to C warning.
1084         * fork.cc: Reorganize to minimize stack copying.
1085         (fork_child): New function.
1086         (fork_parent): Ditto.
1087         (sync_with_child): Don't suspend the forkee.
1088         (sync_with_parent): Ditto.  Make into a function.
1089         * heap.cc (heap_init): Add some debugging output.
1090         * path.cc (path_conv::check): Add an assertion.
1091         (has_suffix): Ditto.
1092         * security.cc (get_pw_sid): Defend against NULL.
1093         * sigproc.cc (proc_subproc): Fix debugging output.
1094         (wait_sig): Ditto.
1095         * strace.cc: Make statics NO_COPY throughout.
1096         (strace::vsprntf): Defend against NULL.
1097
1098 Thu Oct 12 00:25:29 2000  Christopher Faylor <cgf@cygnus.com>
1099
1100         * errno.cc (seterrno_from_win_error): Fix debugging output.
1101         * fhandler.cc (fhandler_base::fstat): Move to inline method in
1102         fhandler.h.
1103         (fhandler_base::set_io_handle): Ditto.
1104         * fhandler.h (fhandler_base): Make some methods inline.
1105         * fhandler_console.cc (fhandler_console::write_normal): Make buffer
1106         larger.
1107         * sigproc.h (sigframe::sigframe): Actually use set ebp parameter
1108         correctly.
1109         * spawn.cc (spawn_guts): Set dwProcessId when exec'ing.  Just exit
1110         immediately after reparenting.
1111         * syscalls.cc: Sprinkle sigframe stuff throughout.
1112         * wait.cc (wait4): Set signal frame here.
1113
1114 Tue Oct 10 19:54:06 2000  Christopher Faylor <cgf@cygnus.com>
1115
1116         * dcrt0.cc (__api_fatal): Don't rely on small_printf to display errors.
1117         Always display problems to the console, if possible.
1118
1119 Tue Oct 10 15:21:10 2000  Christopher Faylor <cgf@cygnus.com>
1120
1121         * path.cc (cwdstuff::get): Set EINVAL when length is zero.
1122
1123 Mon Oct  9 14:07:04 2000  Christopher Faylor <cgf@cygnus.com>
1124
1125         * path.cc (mount_info::cygdrive_posix_path): Handle e:foo construction
1126         correctly.
1127
1128 Mon Oct  9 16:44:00 2000  Corinna Vinschen <corinna@vinschen.de>
1129
1130         * fhandler_mem.cc (fhandler_dev_mem::fhandler_dev_mem):
1131         Fix debug output.
1132
1133 Mon Oct  9 15:58:00 2000  Corinna Vinschen <corinna@vinschen.de>
1134
1135         * fhandler_mem.cc: Eliminate unused include statements.
1136         (fhandler_dev_mem::fhandler_dev_mem): Check for 9X/ME.
1137
1138 Mon Oct  9 15:11:00 2000  Corinna Vinschen <corinna@vinschen.de>
1139
1140         * fhandler.h (fhandler_dev_mem): Erase member `init_phase' and
1141         member function `init'.
1142         * fhandler_mem.cc: Add typedefs for NT internal data types
1143         `SYSTEM_INFORMATION_CLASS' and `SYSTEM_BASIC_INFORMATION'.
1144         Add prototype for `NtQuerySystemInformation' function.
1145         (fhandler_dev_mem::fhandler_dev_mem): Takes over initialization task
1146         from `init'. Use `NtQuerySystemInformation' function to evaluate the
1147         size of physical memory instead of interval search.
1148         (fhandler_dev_mem::init): Eliminated.
1149         (fhandler_dev_mem::open): Don't call `init'.
1150         (fhandler_dev_mem::read): Eliminate check for `init_phase'.
1151         (dummy_autoload): Add load statement for `NtQuerySystemInformation'.
1152
1153 Sun Oct  8 22:38:40 2000  Christopher Faylor <cgf@cygnus.com>
1154
1155         * dtable.cc (set_std_handle): Use std_consts array to control
1156         SetStdHandle settings.
1157         (dtable::fixup_after_fork): Ditto.
1158         * exceptions.cc (set_sig_errno): Remove some debugging output.
1159         * path.cc (path_conv::check): Don't OR need_directory with flags sent
1160         to symlink_info::check.
1161         (symlink_info::check): Use PATH_ALL_EXEC to determine when a file is
1162         executable.
1163         * path.h (path_types): Add PATH_ALL_EXEC.
1164         (isexec): Use PATH_ALL_EXEC so that cygexec types will be considered
1165         executable.
1166         * pinfo.h (_pinfo): Add a process handle that is kept open throughout
1167         the life of a cygwin pid.
1168         * sigproc.cc (proc_exists): Remove hopefully obsolete stuff.
1169         (proc_subproc): Set up process handle that is kept open throughout the
1170         life of a cygwin pid.  Reorganize PROC_WAIT stuff to use common code.
1171         (proc_terminate): Close pid lifetime process handle.
1172         (checkstate): Cleanup.
1173         (stopped_or_terminated): Move zombie cleanup.
1174         (remove_zombie): To here.
1175         * spawn.cc (spawn_guts): Reorganize reparenting code for 1247th time.
1176
1177 Sat Oct  7 13:59:15 2000  Christopher Faylor <cgf@cygnus.com>
1178
1179         * fhandler.h (fhandler_base): Remove obsolete _rpos and _rsize
1180         elements.
1181         * fhandler.cc (fhandler_base::open): Ditto.
1182         * fhandler.cc (fhandler_base::fhandler_base): Ditto.
1183         (fhandler_base::read): Ditto.  Add more debugging output.  Don't issue
1184         a \r when \r\n detected.
1185         * pipe.cc (make_pipe): Streamline slightly.  Make debug output more
1186         interesting.
1187         * strace.cc (strace::vsprintf): Use __progname where appropriate to
1188         distinguish strace output when exec'ing.
1189
1190 Sat Oct  7 19:25:00 2000  Corinna Vinschen <corinna@vinschen.de>
1191
1192         * fhandler.h (fhandler_dev_mem): Add methods mmap, munmap and msync.
1193         Add `unit' member.
1194         * fhandler_mem.cc (fhandler_dev_mem): Initialize `unit' as well.
1195         (init): Care for differences between /dev/mem, /dev/kmem (not
1196         implemented yet) and /dev/port.
1197         (open): Change debug message to reflect the device.
1198         (mmap): New function.
1199         (munmap): Ditto.
1200         (msync): Ditto.
1201         (fstat): Use unit when setting st_dev in stat structure.
1202         * mmap.cc (mmap): Handle MAP_ANONYMOUS flag.
1203         Change error handling slightly.
1204         * path.cc (get_device_number): Handle /dev/port.
1205
1206 Fri Oct  6 23:21:29 2000  Christopher Faylor <cgf@cygnus.com>
1207
1208         * syscalls.cc (_read): Behave properly when passed previous version of
1209         O_NDELAY.  Fix up debugging output.
1210
1211 Thu Oct  5 20:34:48 2000  Christopher Faylor <cgf@cygnus.com>
1212
1213         * net.cc (set_socket_inheritance): Rename from duplicate_socket.  Use
1214         NT specific call when appropriate.
1215         (__set_winsock_errno): Rename from set_winsock_errno.  Accept function
1216         and line as arguments.
1217         * path.cc (path_conv::check): Continue the neverending battle to make
1218         cygwin properly understand that path specs ending in a slash require
1219         that the path refer to a directory.  Windows does not do this by
1220         default.
1221         (symlink_info::check): Remove ENOTDIR test.  Move it to
1222         path_conv::check.
1223         * path.h: Remove obsolete constant.
1224         * winsup.h (set_winsock_errno): New macro.
1225
1226 Thu Oct  5 14:58:00 2000  Corinna Vinschen <corinna@vinschen.de>
1227
1228         * fhandler.h: Add mmap(), munmap() and msync() to fhandler_base
1229         and fhandler_disk_file.
1230         * mmem.cc (mmap): Eliminated device dependent implementation details.
1231         These are moved to the appropriate fhandler class.
1232         (munmap): Ditto.
1233         (msync): Ditto.
1234         (fhandler_base::mmap): New method.
1235         (fhandler_base::munmap): Ditto.
1236         (fhandler_base::msync): Ditto.
1237         (fhandler_disk_file::mmap): Ditto.
1238         (fhandler_disk_file::munmap): Ditto.
1239         (fhandler_disk_file::msync): Ditto.
1240
1241 Thu Oct  5 01:52:43 2000  Christopher Faylor <cgf@cygnus.com>
1242
1243         * net.cc: General cleanup.
1244         (fdsock): Return pointer to created fhandler_socket.
1245         (cygwin_socket): Use pointer returned by fdsock.  Return correct errno
1246         when fd < 0.
1247
1248 Thu Oct  5 00:48:40 2000  Christopher Faylor <cgf@cygnus.com>
1249
1250         * exceptions.cc (interruptible): Add extra debugging.
1251         * sigproc.h (wait_sig): Fill in frame pointer, by default, prior to
1252         calling or suffer confusion due to September 7 change below.
1253
1254 Wed Oct  4 23:10:27 2000  Christopher Faylor <cgf@cygnus.com>
1255
1256         * include/netinet/tcp.h: Remove winsock.h include.
1257         * include/sys/cygwin.h: Move windows specific reference within
1258         conditional.
1259
1260 Thu Oct  5  1:13:00 2000  Corinna Vinschen <corinna@vinschen.de>
1261
1262         * include/sys/mman.h: Add missing MAP_FAILED macro.
1263
1264 Wed Oct  4 18:48:00 2000  Corinna Vinschen <corinna@vinschen.de>
1265
1266         * fhandler.h (fhandler_dev_mem): Add method `init'. Add members
1267         `mem_size' and `init_phase'.
1268         * fhandler_mem.cc (init): New function to figure out the size of
1269         the physical memory.
1270         (open): Add checking for illegal flags. Change usage of access mode.
1271         (write): Add intended functionality.
1272         (read): Add parameter checking. Eliminate page size constant. Use
1273         getpagesize() instead. Don't touch errno and don't create debug output
1274         while init() is running.
1275         (lseek): Add bounds checking. Fix SEEK_END.
1276         (fstat): Eliminate page size constant. Use getpagesize() instead.
1277         (dup): Add intended functionality.
1278
1279 Mon Oct  2 22:15:00 2000  Corinna Vinschen <corinna@vinschen.de>
1280
1281         * dcrt0.cc: Add LoadDLLFunc statement for RegEnumValueA().
1282         * net.cc: Change comments related to get_ifconf.
1283         (get_2k_ifconf): Eliminate `type' variable. Eliminate `sa' parameter.
1284         (get_nt_ifconf): Ditto.
1285         (get_9x_ifconf): Ditto. Rewritten.
1286         (get_ifconf): Change calls to OS specific functions.
1287
1288 Mon Oct  2 15:15:01 2000  Christopher Faylor <cgf@cygnus.com>
1289
1290         * signal.cc (sigaction): Allow new action == oldaction.
1291
1292 Mon Oct  2 11:05:00 2000  Corinna Vinschen <corinna@vinschen.de>
1293
1294         * fhandler_mem.cc: Load ntdll functions via autoload method.
1295         (load_ntdll_funcs): Eliminated.
1296
1297 Sun Oct  1 16:36:00 2000  Corinna Vinschen <corinna@vinschen.de>
1298
1299         * fhandler_mem.cc (load_ntdll_funcs): Add missing __stdcall qualifiers.
1300
1301 Sun Oct  1 22:20:39 2000  Christopher Faylor <cgf@cygnus.com>
1302
1303         * cygheap.cc (cygheap_init): Born again function.
1304         (_cmalloc): Reorganize to accommodate muto locking.
1305         (_cfree): Use muto lock to avoid multi-thread problems.
1306         * cygheap.h (incygheap): Just use cygheap_max to find upper cygwin heap
1307         bounds.
1308         * dcrt0.cc (dll_crt0_1): Reinstitute cygheap_init call.
1309         * path.cc (getcwd): Just return cwdstuff::get result, allowing correct
1310         handling of negative length.
1311         (cwdstuff::get): Malloc a buffer if one is not available.
1312
1313 Sun Oct  1  2:56:00 2000  Corinna Vinschen <corinna@vinschen.de>
1314
1315         * Makefile.in: Add fhandler_mem.o to the dependencies.
1316         * dtable.cc (dtable::build_fhandler): Add case for FH_MEM.
1317         * fhandler.h: Add FH_MEM device type.  Add class fhandler_dev_mem.
1318         * fhandler_mem.cc: New file. Implementation of class fhandler_dev_mem.
1319         * path.cc: Add /dev/mem to windows_device_names.
1320         (get_device_number): Add FH_MEM type.
1321
1322 Sat Sep 30 00:43:42 2000  Christopher Faylor <cgf@cygnus.com>
1323
1324         * cygheap.cc (init_cheap): Set aside space for heap walk pointer.
1325         (_csbrk): Make logic for detecting when to alloc cognizant of
1326         initialization condition.
1327         (_cmalloc): Use a structure to hold bucket size and heap chain pointer.
1328         Store pointer to next freed block in bucket size location so that it
1329         will be easy to see if a block is allocated.
1330         (_cfree): Store pointer to next freed block in bucket size location.
1331         (_crealloc): Use macro to retrieve bucket size.
1332         (cygheap_init): Eliminate.
1333         (cygheap_fixup_in_child): Add second argument to determine if we were
1334         execed or not.  In execed case, walk the heap, cleaning up any orphaned
1335         blocks.
1336         * cygheap.h: Add a "MAX" value to cygheap_types.  Remove cygheap_init
1337         declaration.  Accommodate new argument to cygheap_fixup_in child.
1338         * fork.cc (fork): Accommodate extra argument to cygheap_fixup_in_child.
1339         * dcrt0.cc (dll_crt0_1): Ditto.  Remove call to cygheap_init.
1340
1341 Fri Sep 29 21:49:27 2000  Christopher Faylor <cgf@cygnus.com>
1342
1343         * path.cc (symlink_info::check): Set executable bit for a file if the
1344         first two characters are 'MZ' to mirror spawn_guts check.
1345
1346 Sat Sep 30 03:34:00 2000  Corinna Vinschen <corinna@vinschen.de>
1347
1348         * winsup.h: Add `winME' to os_type symbols.
1349         * dcrt0.cc (set_os_type): Identify Windows ME systems.
1350         * (host_dependent_constants::init): Care for winME.
1351         * uname.cc (uname): Ditto.
1352
1353 Thu Sep 28 01:46:00 2000  Corinna Vinschen <corinna@vinschen.de>
1354
1355         * net.cc (get_ifconf): Code cleanup. Split. Call os dependent
1356         subfunctions instead.
1357         (get_9x_ifconf): New function for 9X systems, called by get_ifconf.
1358         (get_nt_ifconf): New function for NT systems, called by get_ifconf.
1359         (get_2k_ifconf): New function for W2K systems, called by get_ifconf.
1360
1361 Wed Sep 27 01:10:07 2000  Christopher Faylor <cgf@cygnus.com>
1362
1363         * spawn.cc (spawn_guts): Attempt to accommodate archaic windows quoting
1364         mechanism when dealing with '\' and '"'.
1365
1366 Mon Sep 25 20:47:04 2000  Christopher Faylor <cgf@cygnus.com>
1367
1368         * dcrt0.cc (quoted): Fix problem where ' quoted strings were skipped.
1369         * fhandler.h (fhandler_socket::~fhandler_socket): Delete declaration.
1370         * net.cc: Remove unnecessary "number_of_sockets" usage.
1371         (fhandler_socket::fhandler_socket): Ditto.
1372         (fhandler_socket::~fhandler_socket): Delete definition.
1373         * spawn.cc (spawn_guts): Force first argument passed to CreateProcess
1374         as a command line to be windows style.
1375
1376 2000-09-25  Christopher Faylor  <cgf@cygnus.com>
1377
1378         * spawn.cc (av::dup_maybe): Make function void rather than void *.
1379         * environ.cc (environ_init): Remember to reparse CYGWIN if envp is
1380         supplied.
1381         * heap.cc (_sbrk): Remember frame for signal handling.
1382         * syscalls.cc (read_handler): Eliminate.
1383         (_read): Move read_handler code here.  Reorganize for one path through
1384         'ready_for_read'.
1385
1386 Tue Sep 19 09:46:36 2000  Christopher Faylor <cgf@cygnus.com>
1387
1388         * spawn.cc (spawn_guts): Use actual program argument passed in for
1389         argv[0] as originally suggested by Kazuhiro Fujieda
1390         <fujieda@jaist.ac.jp>.
1391
1392 Mon Sep 18 23:17:19 2000  Christopher Faylor <cgf@cygnus.com>
1393
1394         * path.h: Create new input path flag PATH_NEEDDIR.
1395         * path.cc (path::check): Detect trailing slash before converting to
1396         windows path.  Tell symlink_info::check to check for directory if one is
1397         found.
1398         (symlink_info::check): Set errno when path is not a directory if
1399         pflags & PATH_NEEDDIR.
1400
1401 Mon Sep 18 19:44:08 2000  Christopher Faylor <cgf@cygnus.com>
1402
1403         * fhandler_tty.cc (fhandler_tty_slave::write): Correct typo which
1404         caused resetting of windows error to ERROR_IO_DEVICE to be ignored.
1405
1406 Mon Sep 18 17:15:37 2000  Kazuhiro Fujieda  <fujieda@jaist.ac.jp>
1407
1408         * path.cc (mount_info::read_mounts): Don't delete mount entries of
1409         which mount points have the cygdrive prefix.
1410         * (mount_info::add_reg_mount): Properly catch errors on registry
1411         operations.
1412         * (mount_info::write_cygdrive_info_to_registry): Ditto.
1413         * (mount_info::del_reg_mount): Cosmetic changes to be consistent
1414         with other methods.
1415         * (mount_info::add_item): Check arguments more precisely.
1416         Increment nmounts only when registry operations succeed.
1417
1418 Sun Sep 17 22:18:39 2000  Christopher Faylor <cgf@cygnus.com>
1419
1420         * exceptions.cc (interruptible): Return 0 if given an address in
1421         uncommitted memory.
1422
1423 2000-09-16  Egor Duda  <deo@logos-m.ru>
1424
1425         * signal.cc (sleep): If interrupted by signal, return the
1426         requested time minus the time actually slept.
1427
1428 Fri Sep 15 22:30:40 2000  Christopher Faylor <cgf@cygnus.com>
1429
1430         * exceptions.cc (handle_exceptions): Just "core dump" if SIGSEGV in
1431         signal thread.
1432         * external.cc (fillout_pinfo): Fix compiler warning.
1433         * sigproc.h: Eliminate special asm naming for sig_dispatch_pending.
1434         * sigproc.cc (sig_send): Remove debugging statements.
1435
1436 Wed Sep 13 14:56:47 2000  Christopher Faylor <cgf@cygnus.com>
1437
1438         * spawn.cc (av): Hide 'calloced' field and limit cstrduping to class
1439         methods only.
1440         (spawn_guts): Use methods for manipulating most newargv stuff.
1441
1442 2000-09-13  Egor Duda  <deo@logos-m.ru>
1443
1444         * child_info.h (child_info_spawn::~child_info_spawn): Avoid
1445         memory leaks in cygheap.
1446         * spawn.cc (spawn_guts): Ditto.
1447
1448 Wed Sep 13 14:28:03 2000  Christopher Faylor <cgf@cygnus.com>
1449
1450         * dcrt0.cc (quoted): Return next character after a quoted string when
1451         not doing special quote processing.  Also ensure that non-NULL is
1452         returned in all circumstances.
1453
1454 Wed Sep 13 10:26:16 2000  Christopher Faylor <cgf@cygnus.com>
1455
1456         * spawn.cc (spawn_guts): Ensure that argv[0] is correctly set to the
1457         full path when a script is detected.  Suggested by Kazuhiro Fujieda
1458         <fujieda@jaist.ac.jp>.
1459
1460 Tue Sep 12 22:33:30 2000  Christopher Faylor <cgf@cygnus.com>
1461
1462         * external.cc (fillout_pinfo): Handle explicit pids correctly.
1463
1464 Tue Sep 12 14:37:32 2000  Christopher Faylor <cgf@cygnus.com>
1465
1466         * path.cc (normalize_posix_path): Fix more slashdot madness.
1467
1468 Tue Sep 12 12:29:29 2000  Christopher Faylor <cgf@cygnus.com>
1469
1470         * Makefile.in: Make clean target remove *.d.
1471
1472 Mon Sep 11 13:19:15 2000  Christopher Faylor <cgf@cygnus.com>
1473
1474         * path.cc (normalize_posix_path): Correctly deal with a "." parameter.
1475
1476 Sun Sep 10 20:23:35 2000  Christopher Faylor <cgf@cygnus.com>
1477
1478         * cygheap.cc (init_cheap): Just use any old address for the cygwin
1479         heap.
1480         * exceptions.cc (signal_exit): Don't terminate the main thread.  Just
1481         try to exit in this thread really quickly.
1482         * signal.cc (kill_pgrp): Fix typo which caused pinfo structure to be
1483         assigned incorrectly.
1484
1485 Sun Sep 10 12:40:49 2000  Christopher Faylor <cgf@cygnus.com>
1486
1487         * dcrt0.cc (dll_crt0_1): Initialize thread and debug stuff before
1488         handling exec/fork.
1489         * dtable.cc (dtable::fixup_after_exec): Always clear out the read ahead
1490         buffer whether closing or adjusting.
1491         * path.cc (chdir): Avoid a compiler warning.
1492
1493 Sat Sep  9 23:29:17 2000  Christopher Faylor <cgf@cygnus.com>
1494
1495         * path.cc (chdir): Use the full path for cwd_win32.  Consider attempts
1496         to chdir to strings of dots > 2 to be an error.  Pass 'dir' argument to
1497         cygcwd.set.
1498         (cwdstuff::set): Need to treat arguments from chdir differently.
1499         * path.h (cwdstuff): Add an argument to set.
1500
1501 Fri Sep  8 11:50:09 2000  Christopher Faylor <cgf@cygnus.com>
1502
1503         * lib/_cygwin_crt0_common.cc: Add missing header files.
1504
1505 Thu Sep  7 23:07:21 2000  Christopher Faylor <cgf@cygnus.com>
1506
1507         * sigproc.h (sigframe::set): Eliminate second argument.  Default bp to
1508         current frame pointer rather than using this within the function, which
1509         is unstable when this method is not inlined.
1510         * net.cc: Eliminate use of second argument to sigframe.set throughout.
1511         * select.cc (cygwin_select): Ditto.
1512         * sigproc.cc (sig_send): Ditto.
1513
1514 Thu Sep  7 22:45:16 2000  Christopher Faylor <cgf@cygnus.com>
1515
1516         Break out more header info into separate files.  Use appropriate
1517         header files throughout.
1518         * shared.h: Remove.
1519         * cygwin_version.h: New file.
1520         * delqueue.h: New file.
1521         * environ.h: New file.
1522         * host_dependent.h: New file.
1523         * perprocess.h: New file.
1524         * registry.h: New file.
1525         * security.h: New file.
1526
1527 Thu Sep  7 12:14:43 2000  Christopher Faylor <cgf@cygnus.com>
1528
1529         Split out tty and shared_info stuff into their own headers and use
1530         throughout.  Include sys/termios.h for files which need it.
1531         * tty.h: New file.
1532         * shared_info.h: New file.
1533         * fhandler.h: Move inline methods that rely on tty stuff to
1534         fhandler_console.cc.
1535         * fhandler_tty.cc (fhandler_pty_master::process_slave_output): Set
1536         output_done_event immediately after reading data to speed up tty output
1537         processing.
1538         (process_output): Set write_error to errno or zero.
1539         (fhandler_tty_slave::write): Check previous write error prior to
1540         writing to slave end of pipe.  This allows tty output to be slightly
1541         less synchronous.
1542         * fhandler_console.cc (fhandler_console::tcsetpgrp): Moved here from
1543         fhandler.h.
1544         (fhandler_console::set_input_state): Ditto.
1545
1546 Wed Sep  6 21:11:13 2000  Christopher Faylor <cgf@cygnus.com>
1547
1548         * exceptions.cc (signal_exit): Reset all mutos owned by the main
1549         thread.
1550         * fhandler.h: Define *_output_mutex macros for serializing tty output.
1551         (fhandler_termios): Remove restart_output_event.  Define dummy output
1552         mutex methods.
1553         (fhandler_pty_master): Remove unneeded fixup_after_fork method.
1554         * fhandler_termios.cc (fhandler_termios::line_edit): Acquire
1555         output_mutex when CTRL-S is hit.  Release it on CTRL-Q.
1556         * fhandler_tty.cc (fhandler_pty_master::process_slave_output): Remove
1557         inappropriate OutputStopped test here.  Just use the output mutex.
1558         (fhandler_pty_master::fhandler_pty_master): Remove obsolete reference
1559         to restart_output_event.
1560         (fhandler_tty_common::close): Ditto.
1561         (fhandler_pty_master::set_close_on_exec): Ditto.
1562         (fhandler_pty_master::fixup_after_fork): Delete.
1563         * tty.cc (tty::common_init): Ditto.
1564         * sync.cc (muto::reset): New method.
1565         * sync.h: Declare above method.
1566
1567 Wed Sep  6 16:56:38 2000  Christopher Faylor <cgf@cygnus.com>
1568
1569         * sigproc.cc: Add include file for proper definitions.
1570         * spawn.cc: Ditto.
1571         * winsup.h: Define cfree to avoid newlib pollution.
1572
1573 Wed Sep  6 14:11:51 2000  Christopher Faylor <cgf@cygnus.com>
1574
1575         * Makefile.in (CFLAGS): Ensure that -MD is always added even when
1576         CFLAGS is overwritten.
1577
1578 Wed Sep  6 02:40:12 2000  Christopher Faylor <cgf@cygnus.com>
1579
1580         * path.cc (cwdstuff::get_initial): Keep caching alive.
1581         (mount_info::conv_to_win32_path): Fill out relative path in failing
1582         case.
1583
1584 Tue Sep  5 21:36:15 2000  Christopher Faylor <cgf@cygnus.com>
1585
1586         * path.cc (normalize_posix_path): Deal with error return from cygcwd.get.
1587         (normalize_win32_path): Ditto.
1588         (mount_info::conv_to_win32_path): Ditto.
1589         (cwdstuff::get): Set buf to NULL on error.
1590
1591 Tue Sep  5 17:49:34 2000  Christopher Faylor <cgf@cygnus.com>
1592
1593         * path.cc (readlink): 'max' should be a 'min' or we'll suffer
1594         buffer overflow.
1595
1596 Mon Sep  4 22:53:58 2000  Christopher Faylor <cgf@cygnus.com>
1597
1598         * path.cc (cwd_win32): Eliminate.
1599         (cwd_posix): Eliminate.
1600         (cwd_hash): Eliminate.
1601         (cwdstuff::init): Rename from cwd_init.
1602         (cwdstuff::fixup_after_exec): Rename from cwd_fixup_after_exec.
1603         (cwdstuff::get): Rename from get_cwd_inner.
1604         (normalize_posix_path): Eliminate cwd argument.  Just calculate when
1605         necessary.
1606         (normalize_win32_path): Ditto.
1607         (mount_info::conv_to_win32_path): Eliminate cwd retrieval here.
1608         (mount_info::conv_to_posix_path): Ditto.
1609         (hash_path_name): Accommodate additional methods in cwdstuff.
1610         (get_cwd_win32): Eliminate.
1611         (getcwd): Use cwdstuff methods.  Properly handle case where buf == NULL
1612         and len < 0.
1613         (cwdstuff::get_hash): New method.
1614         (cwdstuff::get_initial): New method.
1615         (cwdstuff::set): New method.
1616         (cwdstuff::get): New method.
1617         (cwdstuff::copy): New method.
1618         * path.h: Move cwdstuff struct here.  Add a bunch of stuff to cwdstuff.
1619         Make cygcwd an extern.
1620         * spawn.cc (spawn_guts): Use copy method to get copies of cwd info to
1621         pass to execed process.
1622         * dcrt0.cc (dll_crt0_1): Use cygcwd methods for cwd initialization.
1623
1624 2000-09-03  Egor Duda  <deo@logos-m.ru>
1625
1626         * path.cc (readlink): Check if buffer length is positive.
1627         Truncate output to buffer length. Don't terminate buffer
1628         with '\0'.
1629
1630 Sun Sep  3 00:38:40 2000  Christopher Faylor <cgf@cygnus.com>
1631
1632         * environ.cc (environ_init): Don't free the new environment table after
1633         we've just copied stuff to it.
1634
1635 Sun Sep  3 00:07:32 2000  Christopher Faylor <cgf@cygnus.com>
1636
1637         * Makefile.in: Add cygheap.o.
1638         * child_info.h: Add specific exec class.
1639         * cygheap.h: New file.  Contains declarations for cygwin heap.
1640         * cygheap.cc: New file.  Implements cygwin heap functions.
1641         * dcrt0.cc (quoted): Simplify due to new method for passing arguments
1642         between cygwin programs.
1643         (alloc_stack_hard_way): Attempt to handle overlapped stack.
1644         (dll_crt0_1): Move child_info processing here.  Accommodate new method
1645         for passing arguments between cygwin programs.  Initialize cygwin heap.
1646         Establish __argc and __argv variables.
1647         (_dll_crt0): Move most of child_info processing to dll_crt0_1.
1648         (cygwin_dll_init): Remove duplication.
1649         * dtable.cc (dtable::extend): Allocate dtable using cygwin heap.
1650         (dtable::build_fhandler): Ditto for fhandler type being constructed.
1651         (dtable::dup_worker): Free new fhandler from cygwin heap on error.
1652         (dtable::select_*): Don't assume that this == fdtab.
1653         (dtable::linearize_fd_array): Delete.
1654         (dtable::delinearize_fd_array): Delete.
1655         (dtable::fixup_after_exec): New file.
1656         (dtable::vfork_child_dup): Use cygwin heap.
1657         (dtable::vfork_parent_restore): Ditto.
1658         * dtable.h: Remove obsolete methods.  Add new method.
1659         * environ.cc (posify): Eliminate already_posix parameter and logic.
1660         (envsize): New function.
1661         (_addenv): Use envsize.
1662         (environ_init): Accept an argument pointing to an existing environment
1663         list.  If supplied, allocate space for this in the the program's heap.
1664         * fhandler.cc (fhandler_base::operator =): Move here from fhandler.h.
1665         Use cygwin heap to allocate filenames.
1666         (fhandler_base::set_name): Allocate/free names from cygwin heap.
1667         (fhandler_base::linearize): Delete.
1668         (fhandler_base::de_linearize): Delete.
1669         (fhandler_base::operator delete): Free from cygwin heap.
1670         (fhandler_base::~fhandler_base): Ditto.
1671         * fhandler.h: Accommodate elimination of *linearize and other changes
1672         above.
1673         * fhandler_console.cc (fhandler_console::fixup_after_exec): Rename from
1674         de_linearize.
1675         * heap.h: New file.
1676         * fhandler_tty.cc (fhandler_tty_slave::fhandler_tty_slave): Use cygwin
1677         heap for name.  fhandler_tty::fixup_after_exec): Rename from
1678         de_linearize.
1679         * fork.cc (fork): Call cygheap_fixup_in_child.
1680         * heap.cc: Use declarations in heap.h.
1681         * malloc.cc: Sprinkle assertions throughout to catch attempts to
1682         free/realloc something from the cygwin heap.
1683         * path.cc: Throughout, eliminate use of per-thread cache for cwd.  Use
1684         cwd_* functions rather than cwd_* variables to access cwd_win32 and
1685         cwd_posix.
1686         (cwd_win32): New function.
1687         (cwd_posix): New function.
1688         (cwd_hash): New function.
1689         (cwd_fixup_after_exec): New function.
1690         * path.h: Accommodate path.cc changes.
1691         * pinfo.cc (pinfo_init): Accept a pointer to an environment table.
1692         Pass this to environ_init.  Eliminate old 'title' tests.
1693         * pinfo.h: Accommodate above change in argument.
1694         * spawn.cc (struct av): New method for building argv list.
1695         (av::unshift): New method.
1696         (spawn_guts): Allocate everything that the child process needs in the
1697         cygwin heap and pass a pointer to this to the child.  Build argv list
1698         using new method.  Eliminate delinearize stuff.
1699         * thread.h: Eliminate _cwd_win32 and _cwd_posix buffers.
1700         * winsup.h: Eliminate obsolete functions.  Add envsize() declaration.
1701
1702 2000-09-02  Egor Duda  <deo@logos-m.ru>
1703
1704         * Makefile.in: Remove "make check" support. It is now in
1705         winsup/Makefile.in.
1706
1707 Fri Sep  1 21:17:03 2000  Christopher Faylor <cgf@cygnus.com>
1708
1709         * sigproc.cc (mychild): New function.
1710         (proc_subproc): Use mychild() to determine if a specific pid is valid
1711         for wait()ing.
1712
1713 Fri Sep  1 16:57:44 2000  Christopher Faylor <cgf@cygnus.com>
1714
1715         * sigproc.cc (sigproc_init): Create wait_sig_inited without auto-reset
1716         to avoid potential races.
1717         (init_child_info): Avoid unneeded test.
1718
1719 Fri Sep  1 16:51:26 2000  Christopher Faylor <cgf@cygnus.com>
1720
1721         * sigproc.cc (proc_info): Rename proc_exists which takes a pid to
1722         "pid_exists".
1723         * shared.h: Split out "child_info" stuff into a new header file and
1724         use where necessary.
1725         Declare pid_exists.
1726         * child_info.h: New file.
1727
1728 Thu Aug 31 16:06:21 2000  Christopher Faylor <cgf@cygnus.com>
1729
1730         * errno.cc (set_errno_from_win_error): Actually use arguments to
1731         strace_printf.
1732
1733 2000-08-30  DJ Delorie  <dj@redhat.com>
1734
1735         * times.cc (gettimeofday): use GetSystemTimeAsFileTime to avoid a
1736         conversion
1737         (FACTOR): correct value
1738         (genf): set milliseconds to zero, DOW to 4.
1739
1740 2000-08-29  Egor Duda  <deo@logos-m.ru>
1741
1742         * grp.cc (getgroups): fail with EINVAL if array is not large
1743         enough to hold all supplementary group IDs.
1744
1745 Mon Aug 28 22:03:21 2000  Christopher Faylor <cgf@cygnus.com>
1746
1747         * signal.cc (_raise): New function.
1748         * exceptions.cc (unused_sig_wrapper): Remove _raise.
1749         * sigproc.h (class sigframe): Default frames to skip to zero or suffer
1750         from exuberant optimization.
1751         * fhandler_tty.cc (fhandler_tty::write): Set appropriate errno when
1752         WriteFile to pipe fails.
1753
1754 Fri Aug 25 23:44:48 2000  Christopher Faylor <cgf@cygnus.com>
1755
1756         * pinfo.h (pinfo): Un-inline release.
1757         * pinfo.cc (pinfo::release): Move here from pinfo.h.
1758         * sigproc.cc (proc_terminate): Remove bogus 'pinfo child' which caused
1759         strange destruction of random regions of memory when destructor was
1760         invoked.
1761
1762 Fri Aug 25 21:25:32 2000  Christopher Faylor <cgf@cygnus.com>
1763
1764         * dcrt0.cc (dll_crt0_1): Move set_os_type.
1765         (_dll_crt0): To here.
1766         (cygwin_dll_init): And here.
1767         * external.cc (fillout_pinfo): Use more foolproof method for scanning
1768         for pids.
1769         * pinfo.cc (set_myself): Eliminate myself_identity.init.
1770         * sigproc.cc (wait_sig): Do it here instead to reduce the amount of
1771         time where there could potentially be two processes with the same pid.
1772         * spawn.cc (spawn_guts): Eliminate duplicate initialization.
1773         * include/sys/cygwin.h: Mark unused PID_* elements.
1774
1775 Fri Aug 25 21:49:00 2000  Corinna Vinschen <corinna@vinschen.de>
1776
1777         * exec.cc (_execve): Change definition according to declaration in
1778         newlib/libc/include/sys/unistd.h.
1779
1780 Thu Aug 24 22:17:19 2000  Christopher Faylor <cgf@cygnus.com>
1781
1782         * external.cc (cygwin_internal): Add CW_INIT_EXCEPTIONS to allow cygwin
1783         exception handling on threads not created by cygwin.
1784         * sigproc.cc (proc_terminate): Don't release pinfo structs since we are
1785         exiting.
1786         * include/sys/cygwin.h: Add CW_INIT_EXCEPTIONS.
1787
1788 Thu Aug 24 17:16:14 2000  Christopher Faylor <cgf@cygnus.com>
1789
1790         * select.cc (cygwin_select): Correct logic for "always_ready" fds or
1791         when there is no wait specified.
1792         * syslog.cc (pass_handler::set_message): Zero the buffer prior to
1793         setting it.
1794
1795 2000-08-24  Egor Duda  <deo@logos-m.ru>
1796
1797         * include/cygwin/core_dump.h: New file, contains structures used in
1798         cygwin core core files.
1799         * include/sys/procfs.h: New file, needed to autoconfigure cygwin core
1800         dumps support in bfd.
1801
1802 Thu Aug 24 13:50:15 2000  Christopher Faylor <cgf@cygnus.com>
1803
1804         * environ.cc (parse_thing): nobinmode should force O_TEXT.
1805         (regopt): Use correct path to find LOCAL_MACHINE registry options.
1806         * fhandler.cc (fhandler_base::open): Set binary mode only when binmode
1807         == O_BINARY.
1808         * pipe.cc (pipe): Pipe handling should rely on binmode not _fmode now
1809         that the two are different.
1810
1811 Thu Aug 24 13:21:09 2000  Christopher Faylor <cgf@cygnus.com>
1812
1813         * include/sys/cygwin.h (strace_printf_wrap): Force printing when
1814         _STRACE_SYSTEM.
1815         (strace_printf_wrap1): Ditto.
1816
1817 Thu Aug 24 12:30:17 2000  Christopher Faylor <cgf@cygnus.com>
1818
1819         * debug.h: Allow some debug defines for use in header files.
1820
1821 Wed Aug 23 23:00:24 2000  Christopher Faylor <cgf@cygnus.com>
1822
1823         * dcrt0.cc (dll_crt0_1): Move exception list and constructor stuff
1824         earlier in the process.  Use new second argument to set_myself.
1825         (cygwin_dll_init): Initialize exception list and constructor stuff
1826         here.
1827         (_dll_crt0): And here.  Also, deal with inherited pinfo shared memory
1828         region from parent.
1829         * pinfo.cc (set_myself): Accept a second argument signifying the a
1830         shared memory region, passed from an execing parent.
1831         (pinfo_init): Ditto.
1832         * pinfo.h: Ditto.
1833         * shared.h (child_info): Add a handle field to pass to child.
1834         * spawn.cc (spawn_guts): Create a shared handle to pass to an execed
1835         child.
1836         * winsup.h: Remove extraneous declaration.
1837
1838 Wed Aug 23 10:51:57 2000  Christopher Faylor <cgf@cygnus.com>
1839
1840         * include/sys/cygwin.h: Protect class definitions.
1841
1842 Tue Aug 22 13:57:36 2000  Christopher Faylor <cgf@cygnus.com>
1843
1844         * path.cc (symlink_info::check): Clear error on each iteration of
1845         extension check.
1846
1847 Tue Aug 22 11:23:59 2000  Christopher Faylor <cgf@cygnus.com>
1848
1849         * Makefile.in: Don't include '.d' file if there are none generated yet.
1850
1851 Tue Aug 22 11:08:11 2000  Christopher Faylor <cgf@cygnus.com>
1852
1853         * include/sys/cygwin.h: Declare some thread classes.
1854         * include/mntent.h: Avoid declaring functions.
1855
1856 Tue Aug 22 01:08:01 2000  Christopher Faylor <cgf@cygnus.com>
1857
1858         * winsup.h: Eliminate inclusion of most of the cygwin .h files.  Use .h
1859         files only in sources which require them.
1860         * Makefile.in: Generate dependencies with -MD option.
1861
1862 Mon Aug 21 23:49:05 2000  Christopher Faylor <cgf@cygnus.com>
1863
1864         * cygerrno.h: New file.  Use this throughout whenever errno
1865         manipulation is required.
1866         * errno.cc: Use DWORD to hold Windows errors.
1867         (geterrno_from_win_error): New function.
1868         (seterrno_from_win_error): Use geterrno_from_win_error to convert
1869         supplied windows error (suggested by Corinna Vinschen).
1870         * path.cc (symlink_info): Add error element.
1871         * path.cc (path_conv::check): Remove errno setting.  Use new
1872         symlink_info errno element to set path_conv error, where appropriate.
1873         (symlink_info::check): Set error element rather than attempting to
1874         manipulate errno.  Add more checks for trailing / and /..  even though
1875         they are currently useless.  Avoid setting EINVAL.
1876
1877 Mon Aug 21 23:49:05 2000  Corinna Vinschen <corinna@vinschen.de>
1878
1879         * path.cc (normalize_posix_path): Correct check for trailing /.
1880
1881 2000-08-21  DJ Delorie  <dj@redhat.com>
1882
1883         * include/cygwin/cygwin_dll.h (DECLARE_CYGWIN_DLL): hinstance,
1884         not handle.
1885
1886 Fri Aug 18 11:11:00 2000  Corinna Vinschen <corinna@vinschen.de>
1887
1888         * dtable.cc (dtable::dup2): Extend fdtab if newfd is out of current
1889         allocated bounds.
1890
1891 Sat Aug 12 01:47:28 2000  Christopher Faylor <cgf@cygnus.com>
1892
1893         * mkvers.sh: Properly trap exit removal of temp file.  Remove debugging
1894         statement.
1895
1896 Sat Aug 12 01:37:56 2000  Christopher Faylor <cgf@cygnus.com>
1897
1898         * poll.cc: Make winsup.h the first include file, re 2000-08-02 change.
1899
1900 Sat Aug 12 01:33:12 2000  Christopher Faylor <cgf@cygnus.com>
1901
1902         * winsup.h: Split out dtable definitions into separate header file.
1903         * dtable.h: New file.
1904         * sigproc.h: Eliminate pinfo.h usage here.  Use it in source files that
1905         need it.
1906
1907 Sat Aug 12 01:08:11 2000  Christopher Faylor <cgf@cygnus.com>
1908
1909         * Makefile.in: Use dtable.o rather than hinfo.o.
1910
1911 Sat Aug 12 00:47:11 2000  Christopher Faylor <cgf@cygnus.com>
1912
1913         Rename hinfo -> dtable.  Name the former dtable array 'fdtab'.
1914
1915 Fri Aug 11 14:47:00 2000  Corinna Vinschen <corinna@vinschen.de>
1916
1917         * poll.cc: Allow any descriptor and any number of descriptors.
1918         Allocate fd_set struct sdynamically.
1919
1920 Fri Aug 11 14:47:00 2000  Corinna Vinschen <corinna@vinschen.de>
1921
1922         * poll.cc: Add bounds checking for file descriptors. Return POLLNVAL
1923         if fd is invalid. Return POLLERR for each valid fd if cygwin_select
1924         returned with error.
1925         include/sys/poll.h: Change POLLERR comment according to above change.
1926
1927 Thu Aug 10 21:54:29 2000  Christopher Faylor <cgf@cygnus.com>
1928
1929         * syslog.cc (syslog): Use a less malloc-intensive method for allocating
1930         the buffer.  Also fix a buffer overrun.
1931
1932 Thu Aug 10 15:31:39 2000  Christopher Faylor <cgf@cygnus.com>
1933
1934         * winsup.h: Change strchr inline for strange gcc problem.
1935         * select.cc (select_stuff::wait): Bounds check w4 array.
1936
1937 Thu Aug 10 15:17:53 2000  Christopher Faylor <cgf@cygnus.com>
1938
1939         * dir.cc (readdir): Ensure that errno is *only* set when we've run out
1940         of filenames.
1941         * fhandler.cc (fhandler_disk_file::fstat): Use modern method for saving
1942         errno, making it effective for the whole function.
1943
1944 Tue Aug  8 22:25:39 2000  Christopher Faylor <cgf@cygnus.com>
1945
1946         * select.cc (allocfd_set): Zero allocated fd_set.
1947         (cygwin_select): Move fd_set copying logic from ::wait to here.  Use
1948         common return through sell.poll.
1949         (select_stuff::wait): Just return success or failure and let caller
1950         fill in fd_set.
1951         * pinfo.h (pinfo): Eliminate self-referential pointer to sidbuf since
1952         pinfo structure exists at random locations now.
1953         * fork.cc (fork): Use 'use_psid' element to control when the psid is
1954         relevant.
1955         * shared.cc (sec_user): Ditto.
1956         * spawn.cc (spawn_guts): Ditto.
1957         * uinfo.cc (internal_getlogin): Ditto.
1958         * syscall.cc (seteuid): Ditto.  Set use_psid element.
1959
1960 Tue Aug  8 13:20:00 2000  Bob Wilson  <bwilson@tensilica.com>
1961
1962         * fhandler_serial.cc (tcsendbreak): "sleeptime" argument to usleep()
1963         must be in units of microseconds, not milliseconds.
1964
1965 Mon Aug  7 00:11:35 2000  Christopher Faylor <cgf@cygnus.com>
1966
1967         * include/cygwin/cygwin_dll.h: Remove extraneous (and incorrect)
1968         declarations.
1969
1970 Fri Aug  4 00:00:46 2000  Christopher Faylor <cgf@cygnus.com>
1971
1972         * hinfo.cc (hinfo::find_unused_handle): Just check for table entry ==
1973         NULL since we are already bounds checked by default.
1974         * thread.cc (ResourceLocks::Lock): Streamline this function since it is
1975         called a lot.
1976         (ReleaseResourceLock): Ditto.
1977
1978 Thu Aug  3 20:44:39 2000  Christopher Faylor <cgf@cygnus.com>
1979
1980         * select.cc (fhandler_console::select_read): Call set_cursor_maybe
1981         since select may block and cursor may not be visible.
1982         * select.cc (fhandler_console::select_write): Ditto.
1983         * select.cc (fhandler_console::select_except): Ditto.
1984
1985 Thu Aug  3 09:01:14 2000  Christopher Faylor <cgf@cygnus.com>
1986
1987         * fhandler_tty.cc (fhandler_pty_master::process_slave_output): Set
1988         length field correctly when "need_nl".
1989
1990 Wed Aug  2 22:58:07 2000  Christopher Faylor <cgf@cygnus.com>
1991
1992         * fork.cc (vfork): Store complete stack frame in vfork_save structure
1993         for later recovery.
1994         * spawn.cc (spawn_guts): Reorganize slightly to consolidate handling
1995         when there is a CreateProcess error.
1996         (_spawnve): Only longjmp back to vfork handling when a process has been
1997         successfuly started.
1998         * winsup.h (vfork_save): Extend to include frame info.  Remove obsolete
1999         cpplus conditionals.
2000
2001 Wed Aug  2 15:14:51 2000  Christopher Faylor <cgf@cygnus.com>
2002
2003         * strace.cc (strace::prntf): Make second argument the function name,
2004         rather than use special format options.
2005         (strace::vprntf): Ditto.
2006         (getfunc): New function.
2007         * include/sys/strace.h: Reflect above changes.
2008         * smallprint.c (__small_vsprintf): Eliminate '%F' formatting.
2009         * pinfo.cc (set_myself): Modify for new strace::prntf parameter.
2010         * errno.cc (seterrno_from_win_error): Ditto.
2011         * fhandler_tty.cc (fhandler_tty_common::__acquire_output_mutex): Ditto.
2012         * fhandler_tty.cc (fhandler_tty_common::__release_output_mutex): Ditto.
2013
2014 Wed Aug  2 13:20:04 2000  Christopher Faylor <cgf@cygnus.com>
2015
2016         * regexp/regexp.c: Add winsup.h.
2017
2018 2000-08-02  DJ Delorie  <dj@redhat.com>
2019
2020         * winsup.h: take out protections of environ, errno, allow C use
2021         * *.cc: put winsup.h before other headers (for __INSIDE_CYGWIN__);
2022         use cur_environ() instead of just environ
2023         * times.cc: remove import protections
2024         * glob.c: add winsup.h
2025         * localtime.c: ditto
2026         * smallprint.c: ditto
2027         * Makefile.in: don't __INSIDE_CYGWIN__ as it messes up profiling.
2028
2029 Wed Aug  2 11:22:53 2000  Christopher Faylor <cgf@cygnus.com>
2030
2031         * include/sys/strace.h: Fix strace definition.
2032
2033 Tue Aug  1 23:37:08 2000  Christopher Faylor <cgf@cygnus.com>
2034
2035         * strace.h: Add kludgy workarounds to avoid using deprecated methods
2036         for variable argument macros when possible.
2037         * sigproc.cc: Throughout, use sigproc_printf rather than sip_printf.
2038         * strace.cc (strace::prntf): Remove 'active' check, since callers are
2039         supposed to ensure this.
2040         (__system_printf): Remove.  Subsumed by strace::prntf.
2041         * winsup.h: Define "NEW_MACRO_VARARGS" to indicate when to use new
2042         macro varargs capability.
2043
2044 Sun Jul 30 13:54:35 2000  Christopher Faylor <cgf@cygnus.com>
2045
2046         * fhandler_console.cc: Remove VK_DIVIDE detection.
2047         (get_nonascii_key): Simplify previous patch to return ascii char if it
2048         is non-zero.  Add a second "temporary buffer" argument to help with
2049         thread safety.
2050         * select.cc (peek_console): Pass a temporary buffer argument to
2051         get_nonascii_key.
2052
2053 Sat Jul 29 14:32:12 2000  Christopher Faylor <cgf@cygnus.com>
2054
2055         * fhandler_console.cc: Add VK_DIVIDE detection.  Return virtual keycode
2056         if it is not detected and it is less than ' '.
2057
2058 Sat Jul 29 13:33:49 2000  Christopher Faylor <cgf@cygnus.com>
2059
2060         * path.cc (chdir): Avoid trailing dot calculation when chdir == '/'
2061         or we end up with an empty string.
2062
2063 Sat Jul 29 12:11:33 2000  Christopher Faylor <cgf@cygnus.com>
2064
2065         * include/cygwin/version.h: Bump DLL minor version number to 5 due
2066         to all of the changes below.
2067
2068 Sat Jul 29 12:01:32 2000  Christopher Faylor <cgf@cygnus.com>
2069
2070         Redefine process structure to avoid a fixed size table.  Redefine
2071         pinfo/_pinfo classes.  Use these throughout.
2072         * dcrt0.cc (dll_crt0_1): Accommodate set_myself argument change.
2073         (__api_fatal): Accommodate _pinfo::record_death argument change.
2074         * exceptions.cc (really_exit): Ditto.
2075         (sig_handle_tty_stop): Use pinfo constructor to access process info.
2076         (events_init): Don't create pinfo_mutex since it is no longer required.
2077         * external.cc (fillout_pinfo): Use winpids class to iterate over all
2078         system pids.
2079         (cygwin_internal): lock_pinfo_for_update and unlock_pinfo are now
2080         noops.
2081         * fhandler_termios.cc (fhandler_termios::set_ctty): Use pinfo
2082         constructor to access process info.
2083         * fork.cc (fork): Reorganize to initialize child info after the child
2084         has started since that is when we know the child's winpid, which is
2085         necessary to allocate the pinfo shared memory.
2086         * mmap.cc (recreate_mmaps_after_fork): Change arg type to _pinfo.
2087         * pinfo.cc: Rename pinfo methods to _pinfo throughout.  Eliminate
2088         pinfo_list stuff.
2089         (set_myself): Accept a pid argument now.  Call pinfo initializer to
2090         initialize myself.  Detect when this is an "execed" process and create
2091         an "indirect" pid block.
2092         (pinfo_init): Accommodate set_myself arg change.
2093         (procinfo): Remove.
2094         (pinfo::lock_pinfo): Remove.
2095         (pinfo::unlock_pinfo): Remove.
2096         (pinfo::init): New method.  Allocates shared memory space for process
2097         pinfo structure.
2098         (pinfo::record_death): Don't call locking functions.
2099         (cygwin_winpid_to_pid): Simplify by using new pinfo constructor.
2100         (EnumProcessesW95): New function for iterating over processes on
2101         Windows 95.
2102         (winpids::winpids): New constructor for winpids class.  Sets up a list
2103         of process ids.
2104         (enum_init): Initialize w95/wnt pid enumerators.
2105         * shared.cc (shared-info::initialize): Remove pid initialization.
2106         * shared.h: Move pinfo stuff into pinfo.h.
2107         (class shared_info): Remove pinfo_list element.
2108         * signal.cc (kill_worker): Use pinfo constructor to access process
2109         info.
2110         (kill_pgrp): Ditto.  Use winpids methods to access list of processes.
2111         * sigproc.cc: Throughout, modify to use _pinfo where appropriate.
2112         (proc_exists (pid_t)): New function.  Determines if a process exists
2113         based on the pid.
2114         (proc_exists (_pinfo *p): Use new proc_exists function above.
2115         (proc_subproc): Copy pinfo stuff around rather than _pinfo pointers.
2116         Try to be careful about releasing shared memory when we don't need it
2117         anymore.  Remove pinfo locks.
2118         (remove_zombies): Remove pinfo memory when zombie is going away.
2119         * sigproc.h: Reflect _pinfo/pinfo changes in sigproc.cc.
2120         * spawn.cc (spawn_guts): Eliminate pinfo *child argument.  Reorganize
2121         to only initialize child pinfo after process has been started and we
2122         know the windows pid.
2123         (_spawnve): Reflect spawn_guts changes.
2124         * syscalls.cc (setpgid): Use pinfo constructor to access process info.
2125         (getpgid): Ditto.
2126         (internal_getlogin): Use _pinfo.
2127         * winsup.h: Eliminate pinfo_mutex.  Eliminate spawn_guts declaration
2128         since it is static now.  Reflect set_myself argument change.
2129         * include/sys/cygwin.h: Add some PID_* enums to accommodate new pinfo
2130         stuff.
2131
2132 Sat Jul 29 12:13:27 2000  Christopher Faylor <cgf@cygnus.com>
2133
2134         * include/cygwin/version.h: Update minor version for cygdrive changes
2135         below.
2136
2137 Sat Jul 29 11:59:29 2000  Christopher Faylor <cgf@cygnus.com>
2138
2139         * environ.cc (parse_thing): Make binmode a DWORD.
2140         * hinfo.cc (hinfo::init_std_file_from_handle): Use 'binmode' to
2141         determine default open mode.
2142         * winsup.h: Declare binmode.
2143
2144 Sat Jul 29 00:16:35 2000  Christopher Faylor <cgf@cygnus.com>
2145
2146         * include/cygwin/cygwin_dll.h: Update for modern compilers.
2147         * lib/cygwin_crt0.c: Inexplicably need to define alloca for newer
2148         compilers.
2149         * fhandler.h (fhandler_console): Add new method.
2150         * fhandler.cc (fhandler_console::set_cursor_maybe): New method.
2151         (fhandler_console::read): Set cursor if it has moved to make it
2152         visible.
2153
2154 Thu Jul 27 22:54:28 2000  Jason Tishler <jt@dothill.com>
2155
2156         * dcrt0.cc (dummy_autoload): Add load statement for RegDeleteValueA.
2157         * external.cc (get_cygdrive_prefixes): New function.
2158         (cygwin_internal): Add CW_GET_CYGDRIVE_PREFIXES case.
2159         * path.cc (mount_info::read_cygdrive_info_from_registry): Read system
2160         cygdrive prefix if user one is undefined.
2161         (mount_info::write_cygdrive_info_to_registry): Write cygdrive prefix to
2162         the appropriate registry hive.  Overwrite in-memory copy of cygdrive,
2163         if appropriate.
2164         (mount_info::remove_cygdrive_info_from_registry): New method.
2165         (mount_info::get_cygdrive_prefixes): New method.
2166         (cygwin_umount): Remove cygdrive prefix, if appropriate.
2167         * registry.cc (reg_key::killvalue): New method.
2168         * shared.h (class reg_key): Add killvalue,
2169         remove_cygdrive_info_to_registry, and get_cygdrive_prefixes
2170         declarations.
2171         * include/sys/cygwin.h (cygwin_getinfo_types): Add
2172         CW_GET_CYGDRIVE_PREFIXES.
2173
2174 Thu Jul 27 23:33:32 2000  Christopher Faylor <cgf@cygnus.com>
2175
2176         * include/cygwin/version.h: Bump DLL minor version number to 4.
2177
2178 2000-07-27  DJ Delorie  <dj@redhat.com>
2179
2180         * testsuite/winsup.api/winsup.exp: ignore stdout by default
2181         * testsuite/winsup.api/crlf.c: non-verbose by default
2182
2183         * winsup.h: prune out windows headers we don't normally need
2184         * assert.cc: add wingdi.h and winuser.h
2185         * fhandler_console.cc: ditto
2186         * fhandler_windows.cc: ditto
2187         * select.cc: ditto
2188         * spawn.cc: ditto
2189         * strace.cc: ditto
2190         * tty.cc: ditto
2191         * window.cc: ditto
2192         * hinfo.cc: add winsock.h
2193         * syscalls.cc: add winnls.h
2194         * uinfo.cc: ditto
2195
2196 Thu Jul 27 10:24:36 2000  Egor Duda <deo@logos-m.ru>
2197
2198         * fhandler.cc (fhandler_disk_file::fstat): Allow block calculation to
2199         succeed for files >= 2GB and <= 4GB.
2200
2201 Wed Jul 26 16:05:04 2000  Christopher Faylor <cgf@cygnus.com>
2202
2203         * exceptions.cc (signal_exit): Renamed from "really_exit".  Always sets
2204         EXIT_SIGNAL bit and reorganizes exit value for backwards cygwin
2205         handling.
2206         (handle_exceptions): Call signal_exit.  Set "core dumped" bit.
2207         (sig_handle): Call signal_exit.  Set "core dumped" bit appropriately.
2208
2209 Wed Jul 26 20:44:00 2000  Corinna Vinschen <corinna@vinschen.de>
2210
2211         * environ.cc (posify): Revert previous patch.
2212         (_addenv): Remove check_null_empty_path from here.
2213         (putenv): Call check_nullempty_path.
2214         (setenv): Call check_nullempty_path for name as well here.
2215         Don't report an error if value is empty string.
2216         (environ_init): Revert usage of newp.
2217
2218 Wed Jul 26 14:32:38 2000  Egor Duda <deo@logos-m.ru>
2219
2220         * syscalls.cc (stat_worker): Make stat return correct st_blocks for
2221         files with size bigger than 2Gb and less than 4Gb
2222
2223 Wed Jul 26 17:43:00 2000  Corinna Vinschen <corinna@vinschen.de>
2224
2225         * security.cc (lookup_name): Search on local machine first if
2226         myself->domain is not empty.
2227
2228 2000-07-26  DJ Delorie  <dj@cygnus.com>
2229
2230         * fhandler_console.cc (fhandler_console::read): Explicitly set cursor
2231         to make it visible while waiting in WaitForMultipleObjects.
2232
2233 Wed Jul 26 10:59:00 2000  Corinna Vinschen <corinna@vinschen.de>
2234
2235         * passwd.cc: Change name of passwd_in_memory_p to passwd_state.
2236         Change type to enum. Change storage class to static. Adjust comments.
2237         (read_etc_passwd): Set passwd_state to different values when loaded
2238         from file in contrast to being emulated.
2239         (search_for): Return default passwd entry if passwd is emulated or
2240         it's a request for the current user. Otherwise return NULL.
2241
2242 Tue Jul 25 21:50:42 2000  Christopher Faylor <cgf@cygnus.com>
2243
2244         * syscalls.cc (statfs): Use path_conv method to convert input path.
2245
2246 Tue Jul 25 21:40:51 2000  Christopher Faylor <cgf@cygnus.com>
2247
2248         * syscalls.cc (_link): Avoid extraneous call to
2249         cygwin_conv_to_win32_path.
2250
2251 Tue Jul 25 21:11:15 2000  Christopher Faylor <cgf@cygnus.com>
2252
2253         * environ.cc (_addenv): New function.  Subsumes functionality of
2254         putenv/setenv.  Does not allocate space for putenv case.
2255         (putenv): Use _addenv to add a value to the environment.
2256         (setenv): Ditto.
2257         (environ_init): Don't malloc space for each entry in the environment
2258         table.  Just use the space from GetEnvironmentStrings.
2259         (posify): Don't free the src argument since it is no longer malloced.
2260
2261 Mon Jul 24 21:10:00 2000  Corinna Vinschen <corinna@vinschen.de>
2262
2263         * syscalls.cc (_link): Corrected previous patch.
2264
2265 Mon Jul 24 13:26:00 2000  Corinna Vinschen <corinna@vinschen.de>
2266
2267         * fhandler.h (class fhandler_dev_random): Add members for managing
2268         pseudo randomness.
2269         * fhandler_random.cc: Rearrange. Use pseudo random number generator
2270         as entropy source if system entropy isn't available and if device is
2271         used as /dev/urandom. Allow initializing device by calling write().
2272
2273 Sun Jul 23 23:11:00 2000  Corinna Vinschen <corinna@vinschen.de>
2274
2275         * fhandler.h: Add comment.
2276
2277 Sun Jul 23 20:00:00 2000  Corinna Vinschen <corinna@vinschen.de>
2278
2279         * fhandler.h (class fhandler_dev_raw): Add private member `varblkop'
2280         to be set when variable blocksize mode is on.
2281         * fhandler_raw.cc: Eliminate `\n' from trace output.
2282         (clear): Set `varblkop' to 0.
2283         (dup): Copy varblkop as well.
2284         (writebuf): Care for variable blocksize.
2285         (open): Ditto.
2286         (raw_read): Ditto.
2287         (raw_write): Ditto.
2288         * fhandler_tape.cc (open): Ditto.
2289         (ioctl): Ditto. Some cleanups.
2290
2291 Sat Jul 22 18:40:00 2000  Corinna Vinschen <corinna@vinschen.de>
2292
2293         Patch suggested by Kazuhiro Fujieda  <fujieda@jaist.ac.jp>.
2294         * winsup.h: Add new macros sys_wcstombs and sys_mbstowcs.
2295         * syscalls.cc (_link): Replace calls to mbstowcs by call to
2296         sys_mbstowcs.
2297         * uinfo.cc (internal_getlogin): Replace calls to wcstombs and
2298         mbstowcs by calls to sys_wcstombs and sys_mbstowcs. Replace
2299         usage of constants by meaningful defines. Use result of
2300         GetSystemDirectory for HOMEPATH and HOMEDRIVE as a last resort.
2301
2302 Fri Jul 21 21:33:00 2000  Corinna Vinschen <corinna@vinschen.de>
2303
2304         * spawn.cc (span_guts): Retrieve security attributes before setting
2305         psid to NULL.
2306
2307 Fri Jul 21 12:03:00 2000  Corinna Vinschen <corinna@vinschen.de>
2308
2309         * security.cc (acl_worker): Use stat_suffixes in call to path_conv
2310         just as in `stat_worker'.
2311
2312 Wed Jul 19 22:24:00 2000  Corinna Vinschen <corinna@vinschen.de>
2313
2314         * spawn.cc (spawn_guts): Don't restore impersonation in case
2315         of _P_OVERLAY. Clean up slightly. Accommodate comments.
2316
2317 Wed Jul 19 22:11:00 2000  Corinna Vinschen <corinna@vinschen.de>
2318
2319         * shared.h (class pinfo): New members `root' and `rootlen'.
2320         * syscalls.cc (chroot): Set new root for process.
2321         * path.cc (getcwd_inner): Add parameter to force use of
2322         new root from chroot() call.
2323         (ischrootpath): New macro.
2324         (normalize_posix_path): Care for changed root dir.
2325         (normalize_win32_path): Ditto.
2326         (getcwd_inner): Ditto.
2327         (chdir): Eliminate trailing path component consisting
2328         entirely of dots.
2329         * fork.cc (fork): Copy pinfo members regarding chroot().
2330         * spawn.cc (_spawnve): Ditto.
2331         * dir.cc (opendir): Don't use computed win32 path if
2332         chroot() took place.
2333
2334 Mon Jul 17 22:21:34 2000  Christopher Faylor <cgf@cygnus.com>
2335
2336         * dll_init.cc (dll_list::alloc): Fix debugging output.
2337
2338 Mon Jul 17 14:57:53 2000  Christopher Faylor <cgf@cygnus.com>
2339
2340         Throughout, eliminate third argument to path_conv and use new PC_*
2341         constants for second argument.
2342         * dcrt0.cc (dll_crt0_1): Reorganize to allow more initialization prior
2343         to returning due to dynamic loading.
2344         * path.h: Generalize SYMLINK_* constants to PC_*.
2345         (path_conv): Create a new method.  Fold third argument into second.
2346         * dll_init.cc (dll_list::alloc): Try harder to find space to allocate
2347         dll struct.
2348         (dll_dllcrt0): Don't check sanity if we've already called dll_crt0.
2349         * path.cc (path_conv::check): Don't check for a null or empty path
2350         unless specifically told with a flag setting.
2351         (check_null_empty_path): New function, adapted from macro.
2352         * syscalls.cc (_rename): Use already-determined file attributes rather
2353         than checking again.
2354         * lib/cygwin/cygwin_attach.dll.c (cygwin_attach_dll): Use a static
2355         per_process structure since this is apparently supposed to be zeroed.
2356         * lib/cygwin_crt0.c (cygwin_crt0): Zero per_process structure sent to
2357         older DLLs.
2358
2359 Mon Jul 17 19:39:00 2000  Corinna Vinschen <corinna@vinschen.de>
2360
2361         Patch suggested by Eric Fifer <EFifer@sanwaint.com>
2362         * poll.cc (poll): Fix erroneous negations.
2363
2364 Mon Jul 17 17:56:00 2000  Corinna Vinschen <corinna@vinschen.de>
2365
2366         * environ.cc (setenv): Use __cygwin_environ instead of
2367         environ after reallocating environment space.
2368
2369 Sun Jul 16 20:23:21 2000  Christopher Faylor <cgf@cygnus.com>
2370
2371         * _cygwin_crt0_common.cc: Undef 'environ' or suffer compiler error.
2372
2373 Sun Jul 16 16:03:00 2000  Christopher Faylor <cgf@cygnus.com>
2374
2375         * environ.cc: Use new definition of "environ" throughout.
2376         (environ_init): Explicitly initialize __cygwin_environ.
2377         (cur_environ): New function.  Detects when user has updated
2378         their environment.
2379         * exec.cc: Use 'environ' define throughout rather than __cygwin_environ.
2380         * spawn.cc: Ditto.
2381         * winsup.h: Declare cur_environ, main_environ, environ.
2382
2383 Sun Jul 16 13:23:04 2000  Christopher Faylor <cgf@cygnus.com>
2384
2385         * acconfig.h: Add support for NEWVFORK.
2386         * config.h.in: Ditto.
2387         * configure.in: Add --enable-vfork option.
2388         * configure: Regenerate.
2389         * dcrt0.cc (quoted): Detect and fix up quoted backslashes.
2390         * sigproc.cc (proc_subproc): Correctly name handle of newly added child
2391         process to avoid erroneous debugging messages about closing the wrong
2392         handle.
2393
2394 Sun Jul 16 02:30:09 2000  Christopher Faylor <cgf@cygnus.com>
2395
2396         * spawn.cc (spawn_guts): Use \ for quoting '"'.
2397         * dcrt0.cc (quoted): Understand \ quoting for '"'.
2398
2399 Sun Jul 16 00:32:58 2000  Christopher Faylor <cgf@cygnus.com>
2400
2401         * dcrt0.cc (build_argv): Strip quotes from argv[0] since it should
2402         never be globified.
2403
2404 Sat Jul 15 00:32:41 2000  Christopher Faylor <cgf@cygnus.com>
2405
2406         * dll_init.cc (dll_list::alloc): Round correctly.  Use VirtualAlloc
2407         since shared file mapping is unnecessary.
2408         (dll_list::detach): Release memory via VirtualFree since there we no
2409         longer use shared file mapping.
2410
2411 Fri Jul 14 22:40:22 2000  Christopher Faylor <cgf@cygnus.com>
2412
2413         * hinfo.cc (hinfo::linearize_fd_array): Make max_used_fd an int so that
2414         we can detect when there are no fds to pass.
2415         * dcrt0.cc (host_dependent_constants::init): Revert Sat Mar 18 01:32:04
2416         2000 change.
2417         (dll_crt0_1): Set "cygwin_finished_initializing" flag.
2418         (dll_crt0): Don't perform memcpy if uptr is already set to internal
2419         structure.
2420         (_dll_crt0): Remember location of programs envptr.
2421         * dll_init.h (per_module, dll, dll_list): Revamp.
2422         * dll_init.cc: Revamp.  Use new classes.
2423         * fork.cc (fork): Use new revamped dll, dll_list, and per_module stuff.
2424         * environ.cc: Use __cygwin_environ throughout rather than the
2425         user_data->envptr.
2426         * exec.cc: Ditto.
2427         * spawn.cc: Ditto.
2428         * winsup.h: Declare update_envptrs, cygwin_finished_initializing.
2429         * lib/_cygwin_crt0_common.cc (_cygwin_crt0_common): Revert previous
2430         change.
2431         * lib/cygwin_attach_dll.cc (cygwin_attach_dll): Always pass in own
2432         per_process structure or we end up overwriting information from the
2433         main program.
2434
2435 Wed Jul 12 00:46:00 2000  Christopher Faylor <cgf@cygnus.com>
2436
2437         * debug.cc (thread_stub): Use impure_ptr in place of reent_data.
2438         * dll_init.cc (dll_dllcrt0): Replace erroneous use of local symbol with
2439         correct __cygwin_user_data->impure_ptr.
2440
2441 Wed Jul 12 00:01:03 2000  Christopher Faylor <cgf@cygnus.com>
2442
2443         * lib/_cygwin_crt0_common.cc (_cygwin_crt0_common): Don't reset
2444         environ if already set.
2445
2446 Mon Jul 10 19:07:03 2000  Christopher Faylor <cgf@cygnus.com>
2447
2448         * fhandler_console.cc (fhandler_console::read): Unicode interface
2449         to ReadConsoleInput only exists on W2K, so use workaround from
2450         Kazuhiro Fujieda  <fujieda@jaist.ac.jp>.
2451
2452 Mon Jul 10 11:30:00 2000  Christopher Faylor <cgf@cygnus.com>
2453
2454         * Makefile.in (install): Install textmode.o as well as binmode.o.
2455         * fhandler_console.cc (fhandler_console::read): Use UNICODE when
2456         reading from the console and translate to ASCII from that.
2457
2458 Sun Jul  9 21:52:00 2000  Corinna Vinschen <corinna@vinschen.de>
2459
2460         * spawn.cc (spawn_guts): Close handle `hToken' only if it's not
2461         copied from myself->token.
2462         * syscalls.cc (seteuid): Replace CopySid by memcpy which is foolproof
2463         here.
2464
2465 Sun Jul  9 01:19:06 2000  Christopher Faylor <cgf@cygnus.com>
2466
2467         * cygwin.din: Export _getmode and getmode to allow querying of binary
2468         state of an fd.
2469         * external.cc (cygwin_internal): Add handling of perfile_table setting.
2470         * fhandler.cc (perfile_table): New global.
2471         (fhandler_base::get_default_fmode): New method to return a file's
2472         default mode based on its name.
2473         (fhandler_base::open): Use get_default_mode method to determine a
2474         file's mode.  Record file mode in file flags.
2475         * fhandler.h (fhandler_base): Declare get_default_fmode
2476         * syscalls.cc (getmode): New function.
2477         * sys/cygwin.h (__cygwin_perfile): New structure.
2478         (cygwin_getinfo_types): Move outside of WINVER conditional.
2479         (per_process): Move inside of WINVER conditional.
2480
2481 Sat Jul  8 00:15:01 2000  Christopher Faylor <cgf@cygnus.com>
2482
2483         * external.cc (cygwin_internal): Export __cygwin_user_data.
2484         * include/sys/cygwin.h: Allow definition of per_process even when not
2485         compiling with C++.
2486         (cygwin_getinfo_types): Add CW_USER_DATA.
2487         * lib/_cygwin_crt0_common.cc (_cygwin_crt0_common): Get
2488         __cygwin_user_data pointer from cygwin_internal.  If it doesn't exist,
2489         return failure.  Use either this pointer or passed in pointer
2490         throughout.  Clear forkee.
2491         * lib/crt0.h: Accommodate argument changes to _cygwin_crt0_common.
2492         * lib/cygwin_attach_dll.c (cygwin_attach_dll): Reorganize to allow use
2493         of newer binaries with older DLLs.  Detect older DLLs when
2494         _cygwin_crt0_common returns 0 and allocate space for a per_process
2495         structure on the stack.
2496         * lib/cygwin_crt0.c (cygwin_crt0): Ditto.
2497
2498 Fri Jul  7 10:31:00 2000  Corinna Vinschen  <corinna@vinschen.de>
2499
2500         * include/sys/cygwin.h: Hide internal data types in per_process
2501         when not __INSIDE_CYGWIN__.
2502
2503 Wed Jul  5 18:56:58 2000  Christopher Faylor <cgf@cygnus.com>
2504
2505         * dcrt0.cc (__cygwin_user_data): Initialize.
2506         (dll_crt0_1): Eliminate user_data initialization.
2507         (dll_crt0): Set up impure_ptr_ptr for older executables.
2508         (cygwin_dll_init): Eliminate user_data initializations.
2509         (__api_fatal): Don't check for user_data initialization.
2510         * dll_init.cc (struct dll): Store entire contents of per_process rather
2511         than just a pointer.
2512         (add): Ditto.
2513         (initOneDll): Don't check for user_data initialization.
2514         (DllList::recordDll): Store contents of per_process argument.
2515         (DllList::detachDll): Pass address of per_process field.
2516         (DllList::initAll): Ditto.
2517         (DllList::doGlobalDestructorsOfDlls): Ditto.
2518         (DllListIterator::operator *): Ditto.
2519         (dll_dllcrt0): Default to __cygwin_user_data if arg is NULL.
2520         * include/sys/cygwin.h: Reorganize per_process to eliminate obsolete
2521         fields and accommodate new way of initializing.
2522         * lib/_cygwin_crt0_common: Initialize _impure_ptr from
2523         __cygwin_user_data.impure_ptr.
2524
2525 2000-07-04  Vadim Egorov  <egorovv@mailandnews.com>
2526
2527         * exceptions.cc (try_to_debug): Prevent recursive spawning of JIT
2528         debugger.  Treat special event from debugger as command to continue.
2529
2530 Mon Jul  4 19:29:00 2000  Corinna Vinschen  <corinna@vinschen.de>
2531
2532         * poll.cc (poll): Zero out `open_fds' as well.
2533
2534 Mon Jul  4 1:22:00 2000  Corinna Vinschen  <corinna@vinschen.de>
2535
2536         * include/cygwin/version.h: Bump API minor version to 24.
2537
2538 2000-07-04  Kazuhiro Fujieda  <fujieda@jaist.ac.jp>
2539
2540         * security.cc (read_sd): Eliminate OemToChar.
2541
2542 Mon Jul  4 18:57:00 2000  Corinna Vinschen  <corinna@vinschen.de>
2543
2544         * poll.cc: New file. Implement `poll' system call.
2545         * include/poll.h: Ditto.
2546         * include/sys/poll.h: Ditto.
2547         * Makefile.in: Add poll.o as dependency.
2548         * cygwin.din: Add poll and _poll symbols.
2549
2550 2000-07-04  Kazuhiro Fujieda  <fujieda@jaist.ac.jp>
2551
2552         * dcrt0.cc (dll_crt0_1): Eliminate SetFileApisToOEM and CharToOem.
2553         * (dummy_autoload): Add functions used in fhandler_console.
2554         * fhandler_console.cc (fhandler_console::read): Use ENCHANCED_KEY flag
2555         to distinguish extended keys.  Translate an input character from the
2556         OEM code page to the ANSI code page.
2557         * (fhandler_console::write_normal): Translate output characters from
2558         the ANSI code page to the OEM code page.
2559         * syscalls.cc (_link): Use MultiByteToWideChar instead of OemToCharW.
2560
2561 Mon Jul  3 16:09:16 2000  Christopher Faylor <cgf@cygnus.com>
2562
2563         * exceptions.cc (stack_info::walk): Use method to find offset.
2564         (handle_exceptions): Be more assertive in finding ebp for use under
2565         W2K.  Create a dummy stack frame for cases where program is dying and a
2566         stack dump is being output.
2567         (sig_handle): Fill out a GetThreadContext for use with a user-generated
2568         "core dump".
2569
2570 Mon Jul  3 10:53:00 2000  Corinna Vinschen  <corinna@vinschen.de>
2571
2572         * include/cygwin/socket.h: Remove SOCK_PACKET define since it's
2573         not supported by Windows sockets.
2574
2575 Sun Jul  2 21:50:48 2000  Christopher Faylor <cgf@cygnus.com>
2576
2577         * dcrt0.cc (user32_init): Add primitive guard against concurrent
2578         attempts to call this function.  Also add temporary debugging code to
2579         display a message if the function is called multiple times.
2580         (api32_init): Ditto.
2581
2582 Sun Jul  2 10:39:00 2000  Corinna Vinschen  <corinna@vinschen.de>
2583
2584         * winsup.h: Define MAX_SID_LEN and new MAX_HOST_NAME.
2585         * fork.cc (fork): Use above defines instead of numerical constants.
2586         * shared.cc (sec_user): Ditto.
2587         * shared.h (class pinfo): Ditto.
2588         * syscall.cc (seteuid): Ditto.
2589         * spawn.cc (_spawnve): Ditto. Eliminate conditional.
2590         (spawn_guts): Set child->uid = USHRT_MAX when user context will be
2591         changed in child process.
2592         * uinfo.cc (uinfo_init): Check for myself->uid instead of myself->psid
2593         to avoid reloading of /etc/passwd on process startup if ntsec is off.
2594         Use above defines instead of numerical constants.
2595         * security.cc: Move define for MAX_SID_LEN to winsup.h.
2596
2597 Sun Jul  2  1:57:00 2000  Corinna Vinschen  <corinna@vinschen.de>
2598
2599         * uinfo.cc (uinfo_init): Eliminate calls to read_etc_group()
2600         and read_etc_passwd().
2601
2602 2000-06-28  Kazuhiro Fujieda  <fujieda@jaist.ac.jp>
2603
2604         * assert.cc (__assert): Reduce dependency on newlib.
2605         * exec.cc: Eliminate unnecessary inclusion of ctype.h.
2606         * glob.c: Ditto.
2607         * hinfo.cc: Ditto.
2608         * init.cc: Ditto.
2609         * strace.cc: Ditto.
2610         * tty.cc: Ditto.
2611         * grp.cc (parse_grp): Eliminate atoi.
2612         * passwd.cc (grab_int): Ditto.
2613         * grp.cc (getgroups): Eliminate str{n,}casecmp.
2614         * path.cc (get_raw_device_number): Ditto.
2615         * path.cc (sort_by_native_name): Ditto.
2616         * spawn.cc (iscmd): Ditto.
2617         * uinfo.cc (internal_getlogin): Ditto.
2618
2619 Sat Jul  1 11:43:32 2000  Christopher Faylor <cgf@cygnus.com>
2620
2621         * binmode.c (cygwin_premain0): Fix erroneous clearing of bit.
2622         * textmode.c (cygwin_premain0): Ditto.
2623
2624 Sat Jul  1 00:24:04 2000  Christopher Faylor <cgf@cygnus.com>
2625
2626         * dcrt0.cc (_dll_crt0): Renamed from dll_crt0 ().
2627         * winsup.h: Accommodate above change.
2628         * cygwin.din: Ditto.
2629         * lib/cygwin_crt0.c: Ditto.
2630
2631 Fri Jun 30 23:21:40 2000  Christopher Faylor <cgf@cygnus.com>
2632
2633         * Makefile.in: Use variables rather than configure constructs where
2634         appropriate.
2635         (LIBCOS): Find additional stub library stuff in their own subdirectory.
2636         * dcrt0.cc: Convert user_data pointer to static __cygwin_user_data
2637         area.
2638         (do_global_ctors): Check magic_bisquit for initialization.
2639         (dll_crt0_1): First group of premain functions prior to fd
2640         initialization.  Run second group before calling main.
2641         (dll_crt0 ()): New function, called from new initialization code.
2642         (dll_crt0 (per_process *uptr)): Call new dll_crt0 () function on
2643         initialization.
2644         * debug.cc (thread_stub): Initialize bottom of stack with per-thread
2645         info.
2646         * environ.cc (parse_thing): Use binmode global to control
2647         CYGWIN=binmode behavior.
2648         * fhandler.cc (fhandler_base::open): Allow explicit setting of __fmode
2649         to O_BINARY or O_TEXT to override disk mount settings.
2650         * libcmain.cc: Move to lib subdirectory.
2651         * libccrt0.cc: Ditto.
2652         * dll_main.cc: Ditto.
2653         * dll_entry.cc: Ditto.
2654         * getopt.c: Ditto.
2655         * thread.cc (thread_init_wrapper): Call ExitThread explicitly rather
2656         than returning, as a preliminary step towards placing per thread info
2657         at the bottom of the stack.
2658         * winsup.h: Move per_process class to include/sys/cygwin.h.  Declare
2659         new dll_crt0().
2660         * include/cygwin/version.h: Bump API minor version.
2661         * binmode.c: New file.
2662         * textmode.c: Ditto.
2663         * perthread.h: Ditto.
2664         * lib/_cygwin_crt0_common.cc: Ditto.
2665         * lib/crt0.h: Ditto.
2666         * lib/cygwin_attach_dll.c: Ditto.
2667         * lib/cygwin_crt0.c: Ditto.
2668         * lib/dll_entry.cc: Ditto.
2669         * lib/dll_main.cc: Ditto.
2670         * lib/getopt.c: Ditto.
2671         * lib/libcmain.c: Ditto.
2672         * lib/premain0.c: Ditto.
2673         * lib/premain1.c: Ditto.
2674         * lib/premain2.c: Ditto.
2675         * lib/premain3.c: Ditto.
2676
2677 Wed Jun 28 19:36:00 2000  Corinna Vinschen <corinna@vinschen.de>
2678
2679         * syscalls.cc (seteuid): Initialize pi.token before calling
2680         internal_getlogin().
2681         * uinfo.cc (internal_getlogin): Use impersonation token instead
2682         of process token in case of active impersonation. Add some comments.
2683         (uinfo_init): Initializing myself->token and myself->impersonated
2684         before calling internal_getlogin(). Add some comments.
2685
2686 Mon Jun 26 18:32:41 2000  Christopher Faylor <cgf@cygnus.com>
2687
2688         * windows.cc (setitimer): Round up when < 1000 usecs.
2689
2690 Mon Jun 26 17:34:54 2000  Christopher Faylor <cgf@cygnus.com>
2691
2692         * hinfo.cc (hinfo::dup2): Eliminate compiler warning.
2693
2694 Mon Jun 26 11:25:29 2000  Christopher Faylor <cgf@cygnus.com>
2695
2696         * hinfo.cc (hinfo::dup2): Guard against out of bounds newfd.
2697
2698 Sat Jun 24 23:43:06 2000  Christopher Faylor <cgf@cygnus.com>
2699
2700         * grp.cc (read_etc_group): Open file in text mode.
2701         * pwd.cc (read_etc_passwd): Ditto.
2702         * shared.h: Bump PROC_MAGIC.
2703
2704 Sat Jun 24 19:30:00 2000  Corinna Vinschen <corinna@vinschen.de>
2705
2706         * fork.cc (fork): Fix error in copying SID pointer.
2707         * spawn.cc (_spawnve): Ditto.
2708         * passwd.cc: Remove static from `passwd_in_memory_p'.
2709         (read_etc_passwd): Remove static.
2710         * uinfo.cc: Move global declaration of `read_etc_group' and
2711         `group_in_memory_p' into `uinfo_init'.
2712         (internal_getlogin): Try to get SID from current process first.
2713         (uinfo_init): Don't set uid and gid if `myself' has a valid SID.
2714         Only load /etc/passwd and /etc/group in that case.
2715
2716 Sat Jun 24 12:29:59 2000  Christopher Faylor <cgf@cygnus.com>
2717
2718         * shared.cc (shared_info::initialize): Improve error message clarity.
2719         * mkvers.sh: Eliminate debugging output.
2720
2721 Thu Jun 22 17:50:59 2000  Christopher Faylor <cgf@cygnus.com>
2722
2723         * Makefile.in: Autogenerate cygwin.def when appropriate.
2724         * include/sys/cygwin.h: Correct prototype.
2725
2726 Thu Jun 22 17:05:04 2000  Christopher Faylor <cgf@cygnus.com>
2727
2728         * include/sys/cygwin.h: Don't define parts of this file that rely on
2729         Windows headers unless the Windows header was previously included.
2730
2731 Thu Jun 22 20:45:00 2000  Corinna Vinschen <corinna@vinschen.de>
2732
2733         * registry.cc (load_registry_hive): Use HKEY_USERS when checking
2734         for existing user hive.
2735         Use MAX_PATH instead of numerical constant for array size.
2736         Use return code of RegLoadKeyA instead of GetLastError for error output.
2737
2738 Thu Jun 22 14:27:04 2000  Christopher Faylor <cgf@cygnus.com>
2739
2740         * Makefile.in: Add new-libcygwin.a back to all_host target.
2741
2742 Wed Jun 21 14:32:42 2000  Christopher Faylor <cgf@cygnus.com>
2743
2744         * Makefile.in: Add *.def to clean operation.
2745
2746 Wed Jun 21 13:18:23 2000  Christopher Faylor <cgf@cygnus.com>
2747
2748         * Makefile.in: Add *.exe to clean operation.
2749
2750 Wed Jun 21 01:02:38 2000  Christopher Faylor <cgf@cygnus.com>
2751
2752         * mkvers.sh: Fix sed usage for older seds.
2753
2754 Tue Jun 20 20:46:28 2000  Christopher Faylor <cgf@cygnus.com>
2755
2756         * Makefile.in: Don't touch winver_stamp if mkvers.sh was unsuccessful.
2757
2758 Tue Jun 20 17:41:30 2000  Christopher Faylor <cgf@cygnus.com>
2759
2760         * mkvers.sh: Fix problem with handling of CVS tags causing .rc syntax
2761         errors.
2762
2763 Tue Jun 20 13:38:12 2000  Christopher Faylor <cgf@cygnus.com>
2764
2765         * Makefile.in: Change to build the DLL during a cross-compiler build.
2766
2767 Mon Jun 19 20:46:33 2000  Christopher Faylor <cgf@cygnus.com>
2768
2769         * select.cc (socket_cleanup): Shutdown I/O on dummy sockets prior to
2770         closing them.
2771
2772 Mon Jun 19 19:35:00 2000  Corinna Vinschen <corinna@vinschen.de>
2773
2774         * dcrt0.cc: Add load statements for `GetSidIdentifierAuthority'
2775         and `RegLoadKeyA'.
2776         * registry.cc (get_registry_hive_path): New function.
2777         (load_registry_hive): Ditto.
2778         * security.cc (convert_sid_to_string_sid): New function.
2779         (get_ssid): Renamed to `convert_string_sid_to_sid'.
2780         (get_pw_sid): Call `convert_string_sid_to_sid' instead of `get_ssid'.
2781         (get_gr_sid): Ditto.
2782         (get_admin_sid): Ditto.
2783         (get_system_sid): Ditto.
2784         (get_creator_owner_sid): Ditto.
2785         (get_world_sid): Ditto.
2786         * shared.h: New prototypes for `get_registry_hive_path' and
2787         `load_registry_hive'.
2788         * spawn.cc (spawn_guts): Set child->psid to NULL to force calling
2789         `internal_getlogin' from child process in case of changing user context.
2790         Call `load_registry_hive' in case of changing user context.
2791         (_spawnve): Copy user infos only if user context remains the same.
2792         * uinfo.cc: Add load statement for `NetUserGetInfo'.
2793         Remove load statement for `NetGetDCName'.
2794         (internal_getlogin): Rewrite to speed up process startup
2795         and to correct user environment in case user context changes.
2796         (uinfo_init): Call internal_getlogin only if myself->psid is NULL,
2797         that is user context changes.
2798         * winsup.h: Add prototypes for `convert_sid_to_string_sid',
2799         `convert_string_sid_to_sid' and `get_pw_sid'.
2800
2801 Sun Jun 18 13:42:50 2000  Christopher Faylor <cgf@cygnus.com>
2802
2803         * fhandler.h (set_name): Don't use 'unix' as name since this is defined
2804         by gcc now.
2805         * fhandler.cc (set_name): Ditto.
2806
2807 2000-06-17  Kazuhiro Fujieda <fujieda@jaist.ac.jp>
2808
2809         * winsup.h (isabspath): Don't report `C:foo' as an absolute path.
2810
2811 Sat Jun 17 13:51:48 2000  Christopher Faylor <cgf@cygnus.com>
2812
2813         * configure.in: Detect "cross-hosting" situation and set appropriate
2814         variables in Makefile to avoid building excess stuff.
2815         * configure: Regenerate.
2816         * Makefile.in: Accommodate above change.
2817
2818 Sat Jun 17 19:52:00 2000  Corinna Vinschen <corinna@vinschen.de>
2819
2820         * pinfo.cc (pinfo_init): Revert previous patch.
2821
2822 Sat Jun 17 13:29:00 2000  Corinna Vinschen <corinna@vinschen.de>
2823
2824         * pinfo.cc (pinfo_init): Add missing initializers.
2825         * uinfo.cc (internal_getlogin): Request domain infos only
2826         when ntsec is ON.
2827
2828 Fri Jun 16 19:27:27 2000  Christopher Faylor <cgf@cygnus.com>
2829
2830         * Makefile.in: Just use library files from this tree when building
2831         cygrun.exe.
2832         * path.cc (chdir): Don't set cache to offending chdir.  Change comment
2833         to reflect current reality.
2834
2835 Fri Jun 16 20:55:00 2000  Corinna Vinschen <corinna@vinschen.de>
2836
2837         * cygwin.din: Define symbols for `cygwin_logon_user' and
2838         `cygwin_set_impersonation_token'.
2839         * dcrt0.cc (dll_crt0_1): Eliminate superfluous conditional
2840         statements.
2841         Add load statements for `ImpersonateLoggedOnUser', `LogonUserA'
2842         and `RevertToSelf'.
2843         * fork.cc (fork): Care for correct impersonation of parent
2844         and child process.
2845         * security.cc (cygwin_set_impersonation_token): New function.
2846         (cygwin_logon_user): Ditto.
2847         shared.h (class pinfo): New members `orig_uid', `orig_gid',
2848         `real_uid' nad `real_gid'.
2849         spawn.cc (spawn_guts): Care for impersonation when starting
2850         child process in a different user context.
2851         * syscalls.cc (setgid): Call `setegid' now. Set real_gid.
2852         (setuid): Call `seteuid' now. Set real_uid.
2853         (seteuid): Functionality moved from setuid to here. Care for
2854         correct impersonation.
2855         (setegid): Functionality moved from setgid to here.
2856         * uinfo.cc (uinfo_init): Initialization of additional pinfo
2857         members.
2858         (getuid): Return real uid.
2859         (getgid): Return real gid.
2860         (geteuid): Return effective uid.
2861         (getegid): Return effective gid.
2862         include/sys/cygwin.h: Add prototypes for `cygwin_logon_user' and
2863         `cygwin_set_impersonation_token'.
2864         include/cygwin/version.h: Bump API minor version to 22.
2865
2866 Thu Jun 15 15:43:50 2000  Christopher Faylor <cgf@cygnus.com>
2867
2868         * path.cc (normalize_posix_path): Convert path to POSIX if it seems to
2869         be a Windows path.
2870
2871 2000-06-15 Kazuhiro Fujieda  <fujieda@jaist.ac.jp>
2872
2873         * path.cc (mount_info::add_item): Eliminate a trailing backslash
2874         included in a native path starting with '//[A-Za-z]/...'.
2875         * path.cc (mount_info::del_item): Accept a native path as its target.
2876
2877 Wed Jun 14 23:47:19 2000  Christopher Faylor <cgf@cygnus.com>
2878
2879         * environ.cc (conv_envvars): Detect and convert all environment
2880         variables used by libiberty's choose-temp.c
2881
2882 Tue Jun 13 12:41:41 2000  Kazuhiro Fujieda  <fujieda@jaist.ac.jp>
2883
2884         * path.cc (mount_info::add_item): The previous patch can't handle
2885         the case of overwriting a mount entry.
2886
2887 Tue Jun 13 00:17:04 2000  Christopher Faylor <cgf@cygnus.com>
2888
2889         * thread.h: Shorten "current_directory" variables to "cwd_*"
2890         throughout.
2891         * path.cc: Ditto.
2892         (normalize_posix_path): Add some extra debugging info.
2893         (chdir): Ditto.  Store chdir'ed posix and MS-DOS directory names in
2894         "cache" here rather than trying to derive them later.
2895
2896 Sun Jun 11 15:57:00 2000  Corinna Vinschen <corinna@vinschen.de>
2897
2898         * fhandler_random.cc (read): Call CryptAquireContext with
2899         CRYPT_VERIFYCONTEXT.
2900
2901 Thu Jun  8 22:49:00 2000  Corinna Vinschen <corinna@vinschen.de>
2902
2903         * path.cc (path_conv::check): Erase two lines checked in
2904         by mistake.
2905
2906 Thu Jun  8 15:53:00 2000  Corinna Vinschen <corinna@vinschen.de>
2907
2908         * fhandler.cc (fhandler_disk_file::open): Check for directory
2909         to set O_DIROPEN on directories anyway.
2910
2911 2000-06-07  Kazuhiro Fujieda <fujieda@jaist.ac.jp>
2912
2913         * path.cc (mount_info::init): Eliminate the mount_slash feature.
2914         (mount_slash): Eliminated.
2915         (mount_info::read_mounts): Eliminate looking up existing entries. The
2916         loop for deleting cygpath entries is done only when such entries exist.
2917         (mount_info::from_registry): Eliminate sorting.
2918         (mount_info::add_item): Call add_reg_mount if necessary. Check nmounts
2919         more precisely. Use strcasematch in looking up existing entries.
2920         (mount_info::del_item): Call del_reg_mount if necessary. Use
2921         strcasematch. Use memmove instead of memcpy.
2922         (mount_info::import_v1_registry): Everything is done in this method.
2923         (mount_info::to_registry): Eliminated.
2924         (mount_info::from_v1_registry): Eliminated.
2925         (cygwin_umount): Simply call del_item.
2926         * shared.h: Modify the declaration of add_item and del_item. Remove the
2927         declaration of from_v1_registry.
2928
2929 Wed Jun  7 23:56:10 2000  Christopher Faylor <cgf@cygnus.com>
2930
2931         * include/cygwin/version.h: Bump DLL minor version number to 3.
2932
2933 2000-06-07  DJ Delorie  <dj@cygnus.com>
2934
2935         * cygwin.din: add cygwin_dll_init
2936         * dcrt0.cc (cygwin_dll_init): new
2937         (dll_crt0_1): short circuit if manually loaded
2938         * path.cc (mount_info::init): don't init if manually loaded
2939
2940 Wed Jun  7 13:47:00 2000  Corinna Vinschen <corinna@vinschen.de>
2941
2942         * include/netinet/in_systm.h: New file.
2943         * include/cygwin/in_systm.h: Ditto.
2944
2945 Thu Jun  1 01:55:45 2000  Christopher Faylor <cgf@cygnus.com>
2946
2947         * exceptions.cc: Remove unneeded include.
2948         * dcrt0.cc: Wrap LoadDLLfunc stuff in dummy function.
2949         * init.cc: Ditto.
2950         * uinfo.cc: Ditto.
2951
2952 2000-05-31  DJ Delorie  <dj@cygnus.com>
2953
2954         * include/cygwin/version.h: use decimal, NOT octal
2955
2956 Wed May 31 16:40:00 2000  Corinna Vinschen <corinna@vinschen.de>
2957
2958         * fhandler.cc (fhandler_disk_file::open): Check for executable
2959         even if ntsec is on if filesystem doesn't support ACLs.
2960
2961 Wed May 31 15:57:00 2000  Corinna Vinschen <corinna@vinschen.de>
2962
2963         * dcrt0.cc: Use LoadDLLfuncEx for loading Crypto API functions
2964         with parameter `notimp' set to 1.
2965
2966 Tue May 30 16:58:33 2000  Christopher Faylor <cgf@cygnus.com>
2967
2968         * path.cc (mount_info::conv_to_win32_path): Previous patch was too
2969         aggressive in adding a trailing slash.
2970
2971 Mon May 29 20:31:01 2000  Christopher Faylor <cgf@cygnus.com>
2972
2973         * Makefile.in: Remove libadvapi32.a.
2974         * autoload.h: Add additional field to autoload block for handling
2975         unimplemented functions.
2976         (LoadDLLfuncEx): New function which accepts additional parameter for
2977         controlling unimplemented function behavior.
2978         (LoadDLLfunc): Use LoadDLLfuncEx.
2979         * dcrt0.cc: Use new arguments for LoadDLLfunc.  Add advapi32 routines.
2980         (noload): Rewrite in assembler.  Handle new unimplemented function
2981         type.
2982         * exceptions.cc: Eliminate another vestige of StackWalk stuff.
2983         * net.cc: Use new arguments for LoadDLLfunc.
2984         * uinfo.cc: Ditto.
2985
2986 Mon May 29 20:18:47 2000  Christopher Faylor <cgf@cygnus.com>
2987
2988         * config.h.in: Remove obsolete define.
2989         * path.h (isdrive): New macro.
2990         * dcrt0.cc (globify): Use new macro to determine if a string refers to
2991         an MS-DOS drive.
2992         * environ.cc (winenv): Ditto.
2993         * spawn.cc (find_exec): Ditto.
2994         * path.cc (get_raw_device_number): Ditto.
2995         (mount_info::conv_to_posix_path): Ditto.
2996         (chdir): Ditto.
2997         (cygwin_posix_path_list_p): Ditto.
2998         (cygwin_split_path): Ditto.
2999         (path_conv::check): Move tmp_buf to beginning of function since it can
3000         be used earlier in the loop.  Use tmp_buf rather than 'root' to hold
3001         root information.
3002         (mount_info::conv_to_win32_path): Add trailing slash to end of mount
3003         path when it translates to a drive.  Add defensive code to avoid
3004         writing beyond the end of 'dst'.
3005
3006 Sat May 27 15:57:00 2000  Corinna Vinschen <corinna@vinschen.de>
3007
3008         * fhandler_random.cc (read): Use CRYPT_MACHINE_KEYSET in
3009         call to CryptAcquireContext() to serve users that did not
3010         log in interactively.
3011
3012 Fri May 26 11:16:00 2000  Corinna Vinschen <corinna@vinschen.de>
3013
3014         * errno.cc (errmap): Map ERROR_BAD_NET_NAME to errno ENOSHARE.
3015
3016 Fri May 26 02:23:35 2000  Christopher Faylor <cgf@cygnus.com>
3017
3018         * sigproc.h (sigframe::set): Accept a default frame pointer.
3019         * sigproc.cc (sig_send): Use passed in frame pointer, if appropriate.
3020
3021 Thu May 25 17:44:25 2000  Christopher Faylor <cgf@cygnus.com>
3022
3023         * dir.cc (rmdir): Use file attributes that have already been discovered
3024         by path_conv.
3025
3026 2000-05-25  Kazuhiro Fujieda <fujieda@jaist.ac.jp>
3027
3028         * dir.cc (rmdir): Correct the manner in checking the target directory.
3029
3030 Wed May 24 21:59:00 2000  Corinna Vinschen <corinna@vinschen.de>
3031
3032         * dir.cc (writable_directory): Comment out previous code,
3033         return always 1 for now.
3034         (mkdir): Call set_file_attribute explicitely with S_IFDIR mode bit.
3035         * syscalls.cc (chown_worker): Ditto.
3036         (chmod): Ditto.
3037         * security.cc (get_nt_attribute): Fix error in debug output.
3038         Never set FILE_DELETE_CHILD for files.
3039         Construct appropriate inherit attribute according to file type.
3040
3041 2000-05-23  DJ Delorie  <dj@cygnus.com>
3042
3043         * syscalls.cc (_cygwin_istext_for_stdio): New, for newlib
3044         * include/cygwin/version.h: Bump API number for detect old
3045         programs using old getc/putc macros
3046
3047 2000-05-23  DJ Delorie  <dj@cygnus.com>
3048
3049         * dir.cc (writable_directory): handle root directories
3050
3051 Tue May 23 10:09:26 2000  Christopher Faylor <cgf@cygnus.com>
3052
3053         * uname.cc (uname): Use a "s" to denote a snapshot to avoid confusion
3054         with the number "5".
3055
3056 Tue May 23 10:01:07 2000  Christopher Faylor <cgf@cygnus.com>
3057
3058         * path.cc (mount_info::conv_to_posix_path): Avoid putting a trailing
3059         slash on a directory name when the ms-dos path spec is a root directory
3060         of a device.
3061         * registry.cc (reg_key::build_reg): Set 'key_is_invalid' flag rather
3062         than using an INVALID_HANDLE_KEY.
3063         (reg_key::get_int): Test for key validity before performing registry
3064         operations.
3065         (reg_key::set_int): Ditto.
3066         (reg_key::get_string): Ditto.
3067         (reg_key::set_string): Ditto.
3068         (reg_key::kill): Ditto.
3069         (reg_key::~reg_key): Ditto.
3070
3071 Tue May 23 01:13:33 2000  Christopher Faylor <cgf@cygnus.com>
3072
3073         * mkvers.sh: Use snapshot date as build date since it is more
3074         interesting.
3075         * uname.cc (uname): Detect if this is a snapshot build and add an "S"
3076         to the version number.  Report the snapshot date as the release date.
3077
3078 Mon May 22 17:11:25 2000  Christopher Faylor <cgf@cygnus.com>
3079
3080         * environ.cc (regopt): Scan HKLM if HKCU scan fails.
3081
3082 Mon May 16 23:39:00 2000  Corinna Vinschen <corinna@vinschen.de>
3083
3084         * dir.cc (rmdir): Care for misleading error messages
3085         when trying to remove a directory on a samba share.
3086         Eliminate superfluous else branch.
3087         * syscalls.cc (_rename): Additional check for ERROR_FILE_EXISTS
3088         if MoveFile fails.
3089
3090 Sun May 21 20:51:44 2000  Christopher Faylor <cgf@cygnus.com>
3091
3092         * dcrt0.cc (dll_crt0_1): Move uinfo_init call to before sigproc_init to
3093         avoid a race.
3094         (noload): Add an extra argument for debugging.
3095         * uinfo.cc (uinfo_init): Eliminate test for multiple calls.
3096         (getlogin): Assume that uinfo_init has already been called.
3097
3098 Sat May 20 01:34:57 2000  Christopher Faylor <cgf@cygnus.com>
3099
3100         * exceptions.cc (interruptible): Add an argument to control whether
3101         function just checks for validity.  Flag module handle == 0 as
3102         noninterrupible.
3103         (call_handler): Always acquire and release ebp lock.  Loop for only a
3104         fixed amount of time attempting to grab mutos and find an interruptible
3105         PC.
3106
3107 2000-05-19  DJ Delorie  <dj@cygnus.com>
3108
3109         * syscalls.cc (setmode): change mode of any matching FILE* also.
3110
3111 Thu May 18 17:28:19 2000  Christopher Faylor <cgf@cygnus.com>
3112
3113         * Makefile.in: Remove external.h dependency.
3114         * dcrt0.cc (sigthread::init): Move here from sigproc.h.
3115         * sigproc.h (sigthread): Move init to dcrt0.cc.
3116
3117 Thu May 18 01:28:02 2000  Christopher Faylor <cgf@cygnus.com>
3118
3119         * select.cc (thread_pipe): Add paranoid check to ensure thread
3120         termination.
3121         * external.cc: Eliminate obsolete include.
3122         * getopt.c (getopt_long): Fix compiler warning.
3123         * shared.h: Moved PID_ definitions to include/sys/cygwin so that they
3124         can be used by external programs.
3125         * include/sys/cygwin.h: Move external definitions here.  Include
3126         sys/resource.h to avoid having to do this everywhere.
3127
3128 Thu May 18 01:04:02 2000  Christopher Faylor <cgf@cygnus.com>
3129
3130         * sigproc.h (sigframe): Don't set frame info unless tid matches this
3131         thread id.
3132
3133 Wed May 17 23:13:32 2000  Christopher Faylor <cgf@cygnus.com>
3134
3135         * dcrt0.cc (dll_crt0_1): Initialize mainthread stuff here before
3136         anything needs it.
3137         * sigproc.cc (sigproc_init): Move mainthread initialization out of
3138         here.
3139         * sigproc.h (sigthread): Add init() method.
3140         (sigframe): Don't try to initialize muto.
3141         * sync.cc: Undef WaitForSingleObject to avoid recursion.
3142
3143 2000-05-17  DJ Delorie  <dj@cygnus.com>
3144
3145         * testsuite/winsup.api/crlf.c: New
3146         * testsuite/winsup.api/iospeed.c: New
3147
3148 Wed May 17 01:05:52 2000  Christopher Faylor <cgf@cygnus.com>
3149
3150         * path.cc (mount_info::cygdrive_posix_path): Don't add trailing slash
3151         if referring to something like c:\.
3152         * dcrt0.cc (dll_crt0_1): Move uinfo initialization prior to sig_send
3153         initialization to give signal thread a chance to finish.
3154         * debug.cc (WFSO): Move to sigproc.cc
3155         (WFMO): Ditto.
3156         * exceptions.cc (interruptible): Allocate slightly more space for
3157         directory just for paranoia's sake.
3158         (call_handler): Eliminate nonmain argument.  Determine if main thread
3159         has set a frame pointer and use it if so.
3160         (sig_handle): Eliminate nonmain argument.
3161         * net.cc: Record frame information in appropriate routines throughout.
3162         * select.cc (select): Ditto.
3163         * sigproc.cc: Use sigthread structure to record mainthread id
3164         throughout.
3165         (sig_send): Record frame information for signal handler.
3166         (wait_sig): Reflect argument change in sig_handle.
3167         (WFSO): Move here and record frame information for signal handler.
3168         (WFMO): Ditto.
3169         * sigproc.h: Implement new "sigthread" class.  Implement "sigframe"
3170         class for manipulating signal frame info.
3171         * thread.cc (__pthread_kill): Use standard _kill() function rather than
3172         calling sig_send directly.
3173         * winsup.h: Eliminate ebp element from signal_dispatch class.
3174
3175 Tue May 16 23:39:00 2000  Corinna Vinschen <corinna@vinschen.de>
3176
3177         Patch suggested by John Rowley <wjr@bgs.ac.uk>
3178         * fhandler_tape.cc (fhandler_dev_tape::ioctl): Check
3179         for filemark feature on MTWEOF operation.
3180
3181 Tue May 16 11:49:13 2000  Christopher Faylor <cgf@cygnus.com>
3182
3183         * include/cygwin/in.h (AF_INET6): Use correct in6_addr struct.
3184
3185 Mon May 15 00:35:35 2000  Christopher Faylor <cgf@cygnus.com>
3186
3187         * include/cygwin/version.h: Bump DLL minor version number to 2.
3188
3189 Sun May 14 23:41:24 2000  Christopher Faylor <cgf@cygnus.com>
3190
3191         * shared.h: Bump PROC_MAGIC.
3192         * include/cygwin/version.h: Bump API minor to accommodate two recent
3193         exports.
3194
3195 2000-05-13  Mumit Khan  <khan@xraylith.wisc.edu>
3196
3197         * include/cygwin/socket.h (AF_INET6): Use same value as winsock2.
3198
3199 2000-05-12  Mumit Khan  <khan@xraylith.wisc.edu>
3200
3201         * include/cygwin/in.h (struct in6_addr): Fix spelling.
3202         * include/cygwin/socket.h (AF_INET6, PF_INET6): Define macros.
3203         (AF_MAX, PF_MAX): Bump to 32 to leave room for future expansion.
3204
3205 Fri May 12 21:35:54 2000  Christopher Faylor <cgf@cygnus.com>
3206
3207         * dcrt0.cc (build_argv): Remove unneeded variable.
3208         * select.cc (peek_pipe): Don't check for "ready" if it's already set.
3209         (peek_console): Ditto.
3210         (peek_serial): Ditto.
3211         (peek_socket): Ditto.
3212         (peek_windows): Ditto.
3213
3214 Fri May 12 20:31:00 2000  Corinna Vinschen <corinna@vinschen.de>
3215
3216         * fhandler_raw.cc (write_file, read_file): New wrapper functions
3217         for WriteFile and ReadFile to get rid of ERROR_MEDIA_CHANGED
3218         and ERROR_BUS_RESET in case of first access to tape.
3219         (fhandler_dev_raw::raw_write): Use write_file instead of WriteFile.
3220         (fhandler_dev_raw::raw_read): Use read_file instead of ReadFile.
3221
3222 Fri May 12 01:04:57 2000  Christopher Faylor <cgf@cygnus.com>
3223
3224         * Makefile.in (DLL_OFILES): Sort.
3225         * fhandler_tty.cc (fhandler_tty_slave::send_ioctl_request): Eliminate.
3226         (fhandler_tty_slave::ioctl): Rewrite to avoid races.
3227
3228 2000-05-11  Mumit Khan  <khan@xraylith.wisc.edu>
3229
3230         * mmap.cc (list::erase): Increment loop counter.
3231         (map::erase): Likewise.
3232
3233 Thu May 11 00:54:00 2000  Charles Wilson <cwilson@ece.gatech.edu>
3234
3235         * cygwin.din: insure that regsub() is included in
3236         cygwin1.dll
3237
3238 Tue May  9 18:59:41 2000  Christopher Faylor <cgf@cygnus.com>
3239
3240         * Makefile.in: Use appropriate VARIABLE to refer to cygwin.def in load
3241         line.
3242
3243 Thu May  9  23:53:00 2000  Corinna Vinschen <corinna@vinschen.de>
3244
3245         * fhandler.cc (fhandler_base::puts_readahead): Change
3246         while condition to disallow wild runs.
3247
3248 Thu May  9  15:24:00 2000  Corinna Vinschen <corinna@vinschen.de>
3249
3250         Patch suggested by <lha@stacken.kth.se>
3251         * window.cc (setitimer): Check for overflow condition
3252         in tv_sec.
3253
3254 Thu May  9  0:47:00 2000  Corinna Vinschen <corinna@vinschen.de>
3255
3256         Patch suggested by Eric Fifer <EFifer@sanwaint.com>
3257         * errno.cc: Change mapping of ERROR_BAD_PATHNAME to ENOENT.
3258
3259 Thu May  9  0:47:00 2000  Corinna Vinschen <corinna@vinschen.de>
3260
3261         * path.cc (symlink::info): Treat non readable files
3262         as normal non symlink files.
3263
3264 2000-05-08  Paul K. Fisher  <pfisher@plexware.com>
3265
3266         * include/pthread.h (pthread_detach): Add missing prototype.
3267         (pthread_join): same.
3268
3269 2000-05-08  DJ Delorie  <dj@cygnus.com>
3270
3271         * fhandler.cc (lock): use signed math to allow checking ranges
3272         properly.
3273
3274 Sat May  6 23:22:25 2000  Christopher Faylor <cgf@cygnus.com>
3275
3276         * dcrt0.cc (insert_file): Eliminate unused parameter.
3277         (build_argv): Ditto.
3278         * exceptions.cc (stack): Eliminate unused parameters.
3279         (stackdump): Ditto.
3280         (cygwin_stackdump): Reflect above changes.
3281         (sig_handle): Ditto.
3282         * fhandler.cc (fhandler_base::set_inheritance): Use kludge to avoid
3283         unused parameter warning.
3284
3285 2000-05-06  Mumit Khan  <khan@xraylith.wisc.edu>
3286
3287         * include/wchar.h (wcscmp, wcslen): Fix prototypes.
3288         * syscalls.cc (wcslen, wcscmp): Adjust.
3289
3290 Fri May  5 23:32:07 2000  Christopher Faylor <cgf@cygnus.com>
3291
3292         * errno.cc (errmap): Correct DIRECTORY mapping to ENOTDIR.
3293
3294 2000-05-04  Mumit Khan  <khan@xraylith.wisc.edu>
3295
3296         * Makefile.in (install): Install profile startup and library.
3297
3298 Wed May  3 21:54:11 2000  Christopher Faylor <cgf@cygnus.com>
3299
3300         * configure.in: Use -gstabs+ as compile debug option.  This seems to
3301         promote better handling of symbols.
3302         * configure: Regenerate.
3303         * delqueue.cc (delqueue_list::process_queue): Allow ERROR_ACCESS_DENIED
3304         to indicate that a file is being shared under Windows 95.
3305         * syscalls.cc (_unlink): Use full path name.  Take special action for
3306         Windows 95.  Assume that an ERROR_ACCESS_DENIED indicates a sharing
3307         violation unless it's on a remote drive.  Punt if there is an
3308         ERROR_ACCESS_DENIED on a remote drive.
3309
3310 Wed May  3 18:07:00 2000  Corinna Vinschen <corinna@vinschen.de>
3311
3312         * errno.cc (errmap): Map ERROR_BAD_NETPATH to new errno ENOSHARE.
3313         (_sys_errlist): Add entry for ENOSHARE.
3314         (strerror): Add case for ENOSHARE.
3315         * syscalls.cc (stat_worker): Check for errno ENOSHARE.
3316
3317 Wed May  3 17:28:00 2000  Corinna Vinschen <corinna@vinschen.de>
3318
3319         * Makefile.in: Add dependencies for fhandler_random.o
3320         * fhandler.h: Add device type FH_RANDOM. Add class
3321         fhandler_dev_random.
3322         * fhandler_random.cc: New file. Implementation of
3323         fhandler_dev_random.
3324         * hinfo.cc (build_fhandler): Add case for FH_RANDOM.
3325         * path.cc: Add device names for random devices to
3326         windows_device_names.
3327         (get_device_number): Add if branch for random devices.
3328         (win32_device_name): Add device name generation for
3329         random devices.
3330         winsup.h: Include <wincrypt.h>.
3331
3332 2000-05-02  Kazuhiro Fujieda  <fujieda@jaist.ac.jp>
3333
3334         * path.cc (mount_info::conv_to_win32_path): Previous patch
3335         failed to set flags on a win32 path.
3336
3337 Tue May  2 11:34:00 2000  Corinna Vinschen <corinna@vinschen.de>
3338
3339         * security.cc (read_sd): Return 1 on success because we
3340         can't rely on the returned SD size from GetFileSecurity.
3341
3342 Tue May  2  2:22:00 2000  Corinna Vinschen <corinna@vinschen.de>
3343
3344         * dcrt0.cc: Add dynamic load code for `OemToCharA' from user32.dll.
3345         * security.cc (read_sd): Call `OemToCharA' to make
3346         `GetFileSecurity' happy on filenames with umlauts.
3347
3348 Wed Apr 26 23:23:23 2000  Christopher Faylor <cgf@cygnus.com>
3349
3350         * path.cc (normalize_win32_path): Don't add a trailing slash when one
3351         already exists.
3352         (mount_info::conv_to_win32_path): Use existing code for dealing with
3353         relative path names when input is already a win32 path.
3354
3355 2000-04-26  DJ Delorie  <dj@cygnus.com>
3356
3357         * Makefile.in (install): install regexp.h
3358
3359 Wed Apr 26 16:20:00 2000  Corinna Vinschen <corinna@vinschen.de>
3360
3361         * syscalls.cc (stat_worker): Previous patch could succeed
3362         in stating a non-existant file.
3363
3364 Wed Apr 26 01:07:16 2000  Christopher Faylor <cgf@cygnus.com>
3365
3366         * exceptions.cc (interruptible): Allocate slightly more space for
3367         directory name check.  Windows 95 seems to null-terminate the directory
3368         otherwise.
3369         (interrupt_on_return): Issue a fatal error if we can't find the
3370         caller's stack.
3371
3372 Tue Apr 25 16:50:54 2000  Christopher Faylor <cgf@cygnus.com>
3373
3374         * spawn.cc (find_exec): Accept a path_conv argument rather than a
3375         buffer so that the caller can find things out about a translated path.
3376         (perhaps_suffix): Ditto.
3377         (spawn_guts): Allocate path_conv stuff here so that we can find out
3378         stuff about the translated path (this is work in progress).
3379         * environ.cc (environ_init): Accept an as-yet unused argument
3380         indicating whether we were invoked from a cygwin parent or not.
3381         (winenv): Ditto.
3382         (posify): Accept an argument indicating whether the path has already
3383         been translated.
3384         * dlfcn.cc (check_access): Provide a path_conv buffer to find_exec.
3385         * exec.cc (sexecvpe): Ditto.
3386         * path.cc (path_conv::check): Rename from path_conv::path_conv.
3387         (mount_item::getmntent): Recognize "Cygwin executable" bit.
3388         (symlink_info::check): Remove debugging statements.
3389         * path.h (class path_conv): Add iscygexec method.  Rewrite constructor
3390         to call "check" method to allow multiple operations on a path_conv
3391         variable.
3392         * pinfo.cc (pinfo_init): Pass argument to environ_init.
3393         * shared.h: Bump PROC_MAGIC.
3394         * winsup.h: Reflect above changes to function arguments.
3395         * include/sys/mount.h: Add MOUNT_CYGWIN_EXEC type.
3396
3397 Thu Apr 25 21:35:00 2000  Corinna Vinschen <corinna@vinschen.de>
3398
3399         * syscalls.cc (stat_worker): Previous patch failed to stat
3400         each drives root dir on 9X.
3401
3402 Thu Apr 25 16:37:00 2000  Corinna Vinschen <corinna@vinschen.de>
3403
3404         * fhandler.cc (fhandler_disk_file::open): Check for allow_ntsec
3405         when determining exec flag.
3406         * path.cc (symlink_info::check): Remove call to get_file_attribute().
3407         * security.cc (read_sd): Rename, ditto for variables to conform
3408         to common naming convention. Use GetFileSecurity() instead of
3409         BackupRead() to avoid permission problems when reading ACLs.
3410         (write_sd): Same renaming as for read_sd().
3411         (alloc_sd): Change default permissions according to Linux permissions
3412         for group and world when write permission is set.
3413         * syscalls.cc (stat_worker): Avoid different permission problems
3414         when requesting file informations.
3415
3416 Thu Apr 25 10:50:00 2000  Corinna Vinschen <corinna@vinschen.de>
3417
3418         * net.cc: Avoid a warning in declaration inet_network.
3419
3420 Mon Apr 24 17:38:25 2000  Thorsten Otto <t.otto@germanynet.de>
3421
3422         * fhandler_console.cc (fhandler_console::read): Detect extended keycode
3423         information for Windows 9x so that function keys will work correctly.
3424
3425 2000-04-24  Vadim Egorov  <egorovv@mailandnews.com>
3426
3427         * net.cc (cygwin_inet_network): new function.
3428         * cygwin.din (inet_network): new export
3429
3430 Fri Apr 21 10:37:08 2000  Christopher Faylor <cgf@cygnus.com>
3431
3432         * path.cc (normalize_posix_path): Previous two patches were still
3433         incorrect so rewrite this function to deal with trailing dots.
3434         (mount_info::conv_to_win32_path): Just check for '/' where appropriate.
3435         Eliminate nofinalslash call since it is handled in normalize_posix_path
3436         now.
3437
3438 Thu Apr 20 17:32:42 2000  Christopher Faylor <cgf@cygnus.com>
3439
3440         * exceptions.cc (handle_exceptions): Search further for stack info to
3441         accommodate Windows 95.
3442
3443 Thu Apr 20 16:39:18 2000  Christopher Faylor <cgf@cygnus.com>
3444
3445         * path.cc (normalize_posix_path): Previous change failed to take root
3446         access into account.
3447
3448 Thu Apr 20 11:26:00 2000  Corinna Vinschen <corinna@vinschen.de>
3449
3450         * syscalls.cc (_link): Check new link path for trailing dot.
3451
3452 Thu Apr 20 00:32:03 2000  Christopher Faylor <cgf@cygnus.com>
3453
3454         * fhandler.h (fhandler_base::hclose): New virtual method.
3455         (fhandler_base::set_inheritance): Make this a method so that we can use
3456         the appropriate close methods.
3457         * fhandler.cc (fhandler_base::set_inheritance): Ditto.
3458         * path.cc (normalize_posix_path): Eliminate /.  trailing path
3459         component.
3460
3461 Wed Apr 20  0:19:00 2000  Corinna Vinschen <corinna@vinschen.de>
3462
3463         * syscalls.cc (setuid): Allow switching user context after
3464         successful call to ImpersonateLogedOnUser (NT only).
3465         (setgid): Ditto.
3466         (seteuid): Call setuid.
3467         (setegid): Call setgid.
3468
3469 Wed Apr 19 22:00:00 2000  Corinna Vinschen <corinna@vinschen.de>
3470
3471         * uinfo.cc (internal_getlogin): Use NetGetDCName() instead
3472         of NetGetAnyDCName().
3473
3474 Mon Apr 17 12:08:47 2000  Kazuhiro Fujieda  <fujieda@jaist.ac.jp>
3475
3476         * syscalls.cc (_rename): Try MoveFile() at first before
3477         MoveFileEx(..., MOVEFILE_REPLACE_EXISTING).
3478
3479 Tue Apr 18 19:15:29 2000  Christopher Faylor <cgf@cygnus.com>
3480
3481         * dcrt0.cc (globify): Don't use \ quoting when apparently quoting a DOS
3482         path spec, even within a quoted string.
3483
3484 Sun Apr 16 18:54:21 2000  Christopher Faylor <cgf@cygnus.com>
3485
3486         * init.cc (dll_entry): Use better check for determining when to set
3487         thread specific stuff.
3488         * syscalls.cc (_unlink): Continue with chmod'ing file even if
3489         DELETE_ON_CLOSE succeeds, if file still exists.
3490
3491 Fri Apr 14 23:51:15 2000  Christopher Faylor <cgf@cygnus.com>
3492
3493         * fhandler_console.cc (keytable): Add support for keypad 5 key, which
3494         MS seems to think is equivalent to VK_CLEAR.
3495         * debug.cc (thread_stub): Eliminate initialization of reent stuff.
3496         * init.cc (dll_entry): Move it here.
3497
3498 Thu Apr 13 18:32:26 2000  Christopher Faylor <cgf@cygnus.com>
3499
3500         * dcrt0.cc (insert_file): Avoid freeing previously allocated argument
3501         list.
3502         * path.cc (symlink_info::check): Rename from symlink_check_one.  Use
3503         new symlink_info struct for communication.
3504         (path_conv::path_conv): Use symlink_info structure for communication
3505         with symlink_info::check.  Fix typo which resulted in symbolic links
3506         always being resolved.
3507         (readlink): Use stat_suffixes array when resolving a link.
3508         * syscalls.cc (stat_suffixes): Make global.
3509
3510 Thu Apr 13 20:50:00 2000  Corinna Vinschen <corinna@vinschen.de>
3511
3512         * include/cygwin/version.h: Bump minor api to reflect export change.
3513
3514 Thu Apr 13  8:48:00 2000  Corinna Vinschen <corinna@vinschen.de>
3515
3516         * path.cc (conv_to_win32_path): Detect a win32 path
3517         if path contains backslashes.
3518         * cygwin.din: Add symbol for `lacl'.
3519         * security.cc (ReadSD): Add debug output.
3520         (acl_worker):  New static function.
3521         (acl): Call acl_worker now.
3522         (lacl): New function.
3523         (facl): Call acl_worker now.
3524         * include/cygwin/acl.h: Add prototype for `lacl'.
3525
3526 Wed Apr 12 18:48:33 2000  Christopher Faylor <cgf@cygnus.com>
3527
3528         * path.cc (path_conv::path_conv): Ensure that suffix is correctly
3529         copied to path when we've found a symlink but aren't following
3530         symlinks.
3531
3532 Sat Apr  8 00:46:14 2000  Christopher Faylor <cgf@cygnus.com>
3533
3534         * fhandler.cc (fhandler_disk_file::fstat): Allocate enough space for
3535         root dir determination or overflow an array.
3536
3537 Sat Apr  8 00:08:53 2000  Christopher Faylor <cgf@cygnus.com>
3538
3539         * exceptions.cc (sigsave): Copy on fork so that we can restore correct
3540         behavior in forked process.
3541         (interruptible): Flag as interruptible when running in main process
3542         module.
3543         (interrupt_setup): Save return address and address of return address.
3544         (signal_fixup_after_fork): New function.  Uses above two values to
3545         restore proper behavior to forked process.
3546         (interrupt_on_return): Pass return address address to interupt_setup.
3547         (interrupt_now): Pass NULL for return address address to
3548         interrupt_setup.
3549         * fork.cc (fork): Call signal_fixup_after_fork.
3550         * shared.h: Lint cleanups.
3551         * winsup.h: Ditto.
3552
3553 Mon Apr  3 14:10:44 2000  Christopher Faylor <cgf@cygnus.com>
3554
3555         * fhandler.h (select_stuff): Eliminate use of 'total'.
3556         * select.cc (cygwin_select): Ditto.
3557         (select_stuff::wait): Use maximum size for w4 rather than calculating
3558         what will fit.
3559
3560 Mon Apr 03 13:58:00 2000  Corinna Vinschen <corinna@vinschen.de>
3561
3562         * grp.cc (parse_grp): Save empty array instead of
3563         NULL in gr_mem if no supplementary group is given.
3564
3565 Sun Apr 02 16:02:00 2000  Corinna Vinschen <corinna@vinschen.de>
3566
3567         * syscalls.cc (chown_worker): Use previous uid/gid if
3568         new uid/gid is -1.
3569
3570 Fry Mar 31 22:55:00 2000  Corinna Vinschen <corinna@vinschen.de>
3571
3572         * syscalls.cc (chown_worker): New static function with
3573         chown functionality.
3574         (chown): Call chown_worker with SYMLINK_FOLLOW.
3575         (fchown): New function. Call chown_worker with SYMLINK_FOLLOW.
3576         (lchown): New function. Call chown_worker with SYMLINK_IGNORE.
3577         * cygwin.din: Add symbols for fchown, lchown.
3578
3579 Fry Mar 31 11:18:00 2000  Corinna Vinschen <corinna@vinschen.de>
3580
3581         * path.cc (symlink): Call `set_file_attribute()' and
3582         `SetFileAttributeA()' instead of `chmod()' to set
3583         uid/gid correct.
3584
3585 Wed Mar 29 22:49:56 2000  Christopher Faylor <cgf@cygnus.com>
3586
3587         * fhandler.h (select_record): Explicitly zero elements of this class.
3588         (select_stuff): Ditto.
3589         * select.cc (cygwin_select): Eliminate memset zero of sel.
3590
3591 Tue Mar 28 16:45:42 2000  Christopher Faylor <cgf@cygnus.com>
3592
3593         * Makefile.in: Use default rules when compiling cygrun.o.
3594         * dcrt0.cc (host_dependent_constants::init): Limit non-NT platforms to
3595         32K chunks when copying regions during a fork.
3596         * path.cc (symlink_check_one): Add temporary debugging output.
3597         Simplify PATH_EXEC test.
3598         * syscalls.cc (stat_suffixes): Null terminate this list.
3599
3600 Sat Mar 25 20:46:39 2000  Christopher Faylor <cgf@cygnus.com>
3601
3602         * path.cc (symlink_check_one): Recognize symlink settings from the
3603         mount table.
3604         * path.h: Make PATH_SYMLINK an alias for MOUNT_SYMLINK.
3605         * syscalls.cc (stat_worker): Use extension search mechanism in
3606         path_conv to look for .exe rather than trying to special case it here.
3607         * mount.h: Make MOUNT_SYMLINK a real option.
3608
3609 Sat Mar 25 00:22:32 2000  Christopher Faylor <cgf@cygnus.com>
3610
3611         * environ.cc: Add TMPDIR to the list of environment variables which are
3612         converted to POSIX format.
3613         * sigproc.cc (proc_terminate): Don't attempt to delete when a muto
3614         pointer is NULL.
3615
3616 Sun Mar 19 12:01:00 2000  Corinna Vinschen <corinna@vinschen.de>
3617
3618         * syscalls.cc (stat_worker): Set st_nlink to 1 on remote drives.
3619
3620 Sat Mar 18 23:04:27 2000  Christopher Faylor <cgf@cygnus.com>
3621
3622         * times.cc: Fix extern declarations for variables that are exported but
3623         used by this modules.
3624
3625 Sat Mar 18 01:32:04 2000  Christopher Faylor <cgf@cygnus.com>
3626
3627         * dcrt0.cc (host_dependent_constants::init): Eliminate DELETE flag
3628         from shared constant.
3629
3630 Sat Mar 18 01:24:25 2000  Christopher Faylor <cgf@cygnus.com>
3631
3632         * delqueue.cc (delqueue_list::queue_file): Add some debugging.
3633         * path.h (class path_conv): Add a char * operator for the most common
3634         case.
3635         * syscalls.cc (_unlink): Rewrite to use FILE_FLAG_DELETE_ON_CLOSE when
3636         possible (i.e., on NT).
3637
3638 Fri Mar 17 18:16:00 2000  Corinna Vinschen <corinna@vinschen.de>
3639
3640         Patch suggested by Eric Fifer <EFifer@sanwaint.com>
3641         * fhandler.cc (fhandler_base::open): Call set_file_attribute()
3642         only if a file is really created.
3643
3644 Thu Mar 16 14:15:00 2000  Corinna Vinschen <corinna@vinschen.de>
3645
3646         * security.cc (set_process_privileges): Remove `static'.
3647         (get_nt_attribute): Returns uid and gid additionally. Remove call
3648         to set_process_privileges().
3649         (get_file_attribute): Returns uid and gid additionally. Don't
3650         call ntea if ntsec is ON.
3651         (set_nt_attribute): Remove call to set_process_privileges().
3652         Don't call ntea if ntsec is ON.
3653         (acl): Remove call to set_process_privileges().
3654         * dcrt0.cc (dll_crt0_1): Call set_process_privileges().
3655         * winsup.h: New prototype for set_process_privileges(),
3656         changed prototype for get_file_attribute().
3657         * fhandler.cc (get_file_owner): Discard function.
3658         (get_file_group): Ditto.
3659         (fhandler_disk_file::fstat): Discard calls to get_file_owner() and
3660         get_file_group().
3661         * path.cc (path_conv::path_conv): New debugging output for result
3662         of GetVolumeInformation().
3663         (mount_info::conv_to_win32_path): Call backslashify() with pathbuf
3664         instead of src_path.
3665         * syscalls.cc (chown): Reformat slightly.
3666         (chmod): Replace get_file_owner() and get_file_group() calls
3667         by a call to get_file_attribute(). Discard local variable has_acls.
3668         Reformat slightly.
3669         (stat_worker): Root dir check now done by a call to rootdir().
3670         Don't call num_entries() on remote drives.
3671         Discard local variable has_acls.
3672
3673 Wed Mar 15 20:38:06 2000  Corinna Vinschen <corinna@vinschen.de>
3674
3675         * errno.cc: Map ERROR_NOACCESS to EFAULT.
3676
3677 Wed Mar 15 14:25:38 2000  Christopher Faylor <cgf@cygnus.com>
3678
3679         * spawn.cc (spawn_guts): Restore dependency on signal_arrived.  It's
3680         needed to wake up the WaitForSingleObject.
3681
3682 Tue Mar 14 23:41:16 2000  Christopher Faylor <cgf@cygnus.com>
3683
3684         Pipe changes throughout suggested by Eric Fifer <EFifer@sanwaint.com>
3685         * debug.cc (threadname_init): Pass name of lock as arg 2 of new_muto.
3686         * malloc.cc (malloc_init): Ditto.
3687         * sigproc.cc (sigproc_init): Ditto.
3688         * exceptions.cc (events_init): Ditto.
3689         (call_handler): Eliminate special case for hExeced.  Report locked
3690         thread in debugging output.
3691         * fhandler.cc (fhandker_pipe::fhandler_pipe): Propagate device type to
3692         base class.
3693         * fhandler.h (fhandler_pipe): Ditto.
3694         * hinfo.cc (hinfo::build_fhandler): Pass specific type of pipe to
3695         constructor.
3696         * spawn.cc (spawn_guts): Eliminate dependency on signal when waiting
3697         for subprocess.
3698         * strace.cc: Remove obsolete #ifdef.
3699         * sync.cc (muto::muto): Save the name of the muto.
3700         (muto:~muto): Also release the muto.
3701         * sync.h: Add a muto name field.
3702         * select.cc (peek_pipe): Avoid doing a PeekNamedPipe on the write end
3703         of a pipe.
3704
3705 Sun Mar 12 01:14:33 2000  Christopher Faylor <cgf@cygnus.com>
3706
3707         * fhandler.cc (fhandler_base::get_readahead_into_buffer): New function.
3708         * fhandler.h: Declare new function.  Add extra argument to
3709         process_slave_output.
3710         * fhandler_console.cc (fhandler_console::read): Move read ahead code to
3711         new function.
3712         * fhandler_tty.cc (fhandler_pty_master::process_slave_output): Move
3713         common code here.
3714         (fhandler_tty_slave::read): Understand readahead.
3715         (fhandler_pty_master::read): Move code to process_slave_output.
3716         * select.cc (peek_pipe): Avoid performing certain checks when non-read
3717         and on inappropriate fh types.
3718
3719 Sat Mar 11 22:47:43 2000  Christopher Faylor <cgf@cygnus.com>
3720
3721         * fhandler_console.cc (fhandler_console::read): Don't even think about
3722         breaking on interrupt if executing in a "cygwin" thread.
3723         * fhandler_tty.cc (fhandler_pty_master::process_slave_output):
3724         Streamline, simplify code.
3725         * sigproc.cc (sig_send): Remove debugging statement.
3726
3727 Fri Mar 10 13:20:50 2000  Christopher Faylor <cgf@cygnus.com>
3728
3729         * sigproc.cc: Set wait_sig priority to normal.
3730
3731 Fri Mar 10 13:03:06 2000  Christopher Faylor <cgf@cygnus.com>
3732
3733         * sigproc.cc (wait_sig): Add addtional debugging output.
3734
3735 Thu Mar  9 15:25:01 2000  Christopher Faylor <cgf@cygnus.com>
3736
3737         * environ.cc: Eliminate oldstack CYGWIN option.
3738         * exceptions.cc (sfta): Eliminate obsolete function.
3739         (sgmb): Eliminate obsolete function.
3740         (class stack_info): Remove MS method for walking the stack.
3741         (stack_info::init): Just initialize required fields.
3742         (stack_info::brute_force): Rename to stack_info::walk.
3743         (handle_exceptions): Pass derived frame pointer to sig_send.
3744         (interrupt_setup): Clear saved frame pointer here.
3745         (interrupt_on_return): thestack is no longer a pointer.
3746         (call_handler): Accept a flag to indicate when a signal was sent from
3747         other than the main thread.  Use saved frame pointer for determining
3748         where to place signal handler call.
3749         (sig_handle): Accept "nonmain" argument.  Pass it to call_handler.
3750         * fhandler_tty.cc (fhandler_tty_common::__acquire_output_mutex): Change
3751         debugging output slightly.
3752         * (fhandler_tty_common::__release_output_mutex): Ditto.
3753         (fhandler_tty_slave::read): Fix a comment, remove a goto.
3754         * sigproc.cc (sig_send): Accept an optional frame pointer argument for
3755         use when suspending the main process.  sigcomplete_main is an autoreset
3756         event now.  Save frame pointer for non-main operation.
3757         (wait_sig): Make sigcomplete_main an autoreset event.  Eliminate
3758         NOSIGQUEUE.  Pass rc to sig_handle to signify if this was a nonmain
3759         process.
3760         * sigproc.h: Reflect change to sig_send argument.
3761         * syscalls.cc (swab): Eliminate swab function since it is now available
3762         in newlib.
3763         * winsup.h (signal_dispatch): Change CONTEXT cx to DWORD ebp.
3764
3765 Tue Mar  7 13:31:10 2000  Christopher Faylor <cgf@cygnus.com>
3766
3767         * sigproc.cc (sig_send): Eliminate sync_sig_send synchronization since
3768         it didn't seem to affect the "bash hangs" problem.
3769
3770 Tue Mar  7 13:17:56 2000  Christopher Faylor <cgf@cygnus.com>
3771
3772         * mcount.c: Remove strace.h include.
3773
3774 Tue Mar  7 00:29:34 2000  Christopher Faylor <cgf@cygnus.com>
3775
3776         Throughout use strace class in place of individual functions and
3777         variables.
3778         * cygwin.din: Eliminate _strace_wm.
3779         * sigproc.cc (wait_sig): Temporarily add more debugging output.
3780         * include/cygwin/version.h: Bump minor api to reflect export change.
3781
3782 Sun Mar  5 01:17:05 2000  Christopher Faylor <cgf@cygnus.com>
3783
3784         * exceptions.cc (call_handler): Streamline to use only one call to
3785         ResumeThread.
3786         * sigproc.cc (sig_send): Use a muto around the ReleaseSemaphore.
3787         Remove priority setting since it didn't solve anything.
3788
3789 Tue Feb 29 00:46:09 2000  Christopher Faylor <cgf@cygnus.com>
3790
3791         * sigproc.cc (sig_send): Temporarily set priority to highest while
3792         sending a signal.
3793
3794 Mon Feb 28 11:23:29 2000  Christopher Faylor <cgf@cygnus.com>
3795
3796         * pinfo.cc (set_myself): Add build date to strace output.
3797
3798 Mon Feb 28 11:17:30 2000  Eric Fifer <EFifer@sanwaint.com>
3799
3800         * sigproc.cc (proc_subproc): Only clear wait event when not attending
3801         to a signal.
3802
3803 Mon Feb 28 00:08:09 2000  Christopher Faylor <cgf@cygnus.com>
3804
3805         * configure.in: Remove --enable-strace-hhmmss option.
3806         * configure: Regenerate.
3807
3808 Sun Feb 27 23:11:57 2000  Christopher Faylor <cgf@cygnus.com>
3809
3810         * dcrt0.cc (set_os_type): Record OS name string.
3811         (getprogname): Eliminate obsolete function.
3812         (dll_crt0_1): Move initial strace initialization output to set_myself.
3813         * exceptions.cc (interruptible): Add debugging output.
3814         (interrupt_setup): New function.
3815         (interrupt_now): Use interrupt_setup to set up common interrupt handler
3816         stuff.
3817         (interrupt_on_return): Ditto.
3818         (call_handler): Move signal_arrived arm and clear threads to region
3819         where signalled thread is suspended or suffer races.
3820         * pinfo.cc (set_myself): Output interesting information when strace is
3821         first initialized.  Initialize progname here.
3822         * sigproc.cc (sig_dispatch_pending): Modify to ensure that flush signal
3823         are sent synchronously.
3824         * strace.cc (strace_vsprintf): Move code into strace program.
3825         * uname.cc (uname): Use 'osname' global to construct cygwin name +
3826         Windows type + version.
3827
3828 Fri Feb 25 19:26:42 2000  Christopher Faylor <cgf@cygnus.com>
3829
3830         * exceptions.cc (interruptible): Make a little more structured.
3831         (call_handler): Allow signals to be sent even if signalled thread is
3832         stopped.  Change order of signal_arrived arming/waiting threads
3833         clearing to eliminate a race.
3834         (reset_signal_arrived): New helper function.
3835         * malloc.cc (malloc_init): Use mutos so that signal handler can keep
3836         track of who owns the lock.
3837         (__malloc_lock): Ditto.
3838         (__malloc_unlock): Ditto.
3839         * sync.h (new_muto): Actually use a muto for the "buffer".
3840         * Makefile.in: Fix a dependency.
3841
3842 2000-02-25  DJ Delorie  <dj@cygnus.com>
3843
3844         * Makefile.in: fix "make check" support and cygrun.
3845
3846 Thu Feb 24 15:56:00 2000  Christopher Faylor <cgf@cygnus.com>
3847
3848         * syscalls.c (_read): Clear errno before doing any read operation.
3849
3850 Thu Feb 24 14:45:06 2000  Christopher Faylor <cgf@cygnus.com>
3851
3852         * exceptions.cc (call_handler): Use new muto linked list to look for
3853         all potential mutos owned by suspended thread.  Clear waiting threads
3854         while thread is stopped.
3855         (proc_subproc): Clarify debugging output.
3856         * sync.h (class muto): Add 'next' field.
3857         (new_muto): Keep linked list alive.
3858
3859 Thu Feb 24 00:59:15 2000  Christopher Faylor <cgf@cygnus.com>
3860
3861         Fix final round of gcc warnings relating to unused parameters.
3862         * debug.cc (iscygthread): New function.
3863         * debug.h: Declare it.
3864         * exceptions.cc (set_process_mask): Flush pending signals.
3865         (handle_sigsuspend): No need to flush pending signals.
3866         (call_handler): Refine previous tests of muto ownership.  Only clear
3867         wait()'s when we have definitely responded to a signal.
3868         * fhandler_console.cc (fhandler_console::read): Don't set EINTR if
3869         executing in a "cygwin" thread.
3870         * sigproc.cc (proc_subproc): Use second argument to control whether
3871         CLEARWAIT actually sets "signalled" flag.
3872         * sync.h (muto): Add 'unstable' method.
3873
3874 Wed Feb 23 21:59:44 2000  Christopher Faylor <cgf@cygnus.com>
3875
3876         * hinfo.cc (hinfo::extend): Clean up debugging output.
3877
3878 Wed Feb 23 21:34:58 2000  Christopher Faylor <cgf@cygnus.com>
3879
3880         * exceptions.cc (interruptible): Change method for determining if
3881         something is interruptible.
3882         (call_handler): Avoid suspending a thread if it owns a muto.  Only set
3883         signal_arrived if the thread was actually interrupted.
3884         (events_init): Initialize module information needed by interruptible().
3885         * init.cc (dll_entry): Record module handle of main for use by
3886         interruptible().
3887         (proc_subproc): Reorganize handling of terminated child so that the
3888         bulk of the processing comes from the signal thread.
3889         (wait_sig): Force processing of waiting threads if SIGCHLD is not
3890         processed.
3891
3892 Tue Feb 22 23:06:01 2000  Christopher Faylor <cgf@cygnus.com>
3893
3894         Respond to more g++ warnings relating to initializing structures.
3895
3896 Mon Feb 21 18:36:37 2000  Christopher Faylor <cgf@cygnus.com>
3897
3898         * fhandler.cc (set_inheritance): Revert previous patch which got rid of
3899         'name' parameter.
3900
3901 Mon Feb 21 00:19:40 2000  Christopher Faylor <cgf@cygnus.com>
3902
3903         Respond to a multitude of new g++ warnings.
3904
3905 Sun Feb 20 22:10:21 2000  Christopher Faylor <cgf@cygnus.com>
3906
3907         * environ.cc (getwinenv): Make __stdcall.
3908         (winenv): Ditto.
3909         * malloc.cc (strdup): New function.  Occludes newlib version.
3910         (_strdup_r): Ditto.
3911         * winsup.h: Reflect above __stdcall changes.
3912
3913 Sun Feb 20 21:31:00 2000  Corinna Vinschen <corinna@vinschen.de>
3914
3915         * fhandler.cc (fhandler_disk_file::fstat): Modify get_file_attribute
3916         return value if FILE_ATTRIBUTE_READONLY is set.
3917
3918 Thu Feb 17 11:00:23 2000  Christopher Faylor <cgf@cygnus.com>
3919
3920         * environ.cc (environ_init): Cosmetic change.
3921
3922 Mon Feb  7 16:50:44 2000  Christopher Faylor <cgf@cygnus.com>
3923
3924         * Makefile.in: cygrun needs libshell32.a.
3925
3926 Sun Feb  6 22:17:58 2000  Christopher Faylor <cgf@cygnus.com>
3927
3928         * sigproc.cc (proc_subproc): Simplify case for when a child process is
3929         stopped since new signal handler ensures the desired behavior.
3930
3931 Sun Feb  6 21:52:33 2000  Christopher Faylor <cgf@cygnus.com>
3932
3933         * Makefile.in: Fix install target so that directories will be created
3934         when necessary.
3935
3936 Sun Feb  6 18:12:17 2000  Christopher Faylor <cgf@cygnus.com>
3937
3938         * Makefile.in: exceptions.cc should depend on autoload.h.
3939         * exceptions.cc: Undef DECLSPEC_IMPORT prior to including imagehlp.h to
3940         avoid defining StackWalk as "import".
3941         (call_handler): Minor optimizations.
3942         (sig_handle_tty_stop): Fix typo in previous checkin.
3943         * sigproc.cc (sigproc_init): Ditto, for signal_arrived initialization.
3944
3945 Sat Feb  5 15:37:37 2000  Christopher Faylor <cgf@cygnus.com>
3946
3947         * dcrt0.cc (isquote): Convert to inline function.
3948
3949 Sat Feb  5 00:26:01 2000  Christopher Faylor <cgf@cygnus.com>
3950
3951         Throughout, rename global_signal_arrived to signal_arrived.
3952         Throughout, eliminate use of arm_signals and __signal_arrived.
3953         Throughout, revert to use of simple call to WaitForSingleObject or
3954         WaitForMultipleObjects.
3955         * debug.h: Eliminate obsolete function declaration.
3956         * exceptions.cc (sigWaitForSingleObject): Eliminate obsolete function
3957         definition.
3958         * fhandler.h: Reflect change to select_stuff wait method.
3959         * fhandler_tape.cc (get_ll): Accommodate new w32api LARGE_INTEGER
3960         definition.
3961         * ntea.c (NTReadEARaw): Ditto.
3962         (NTWriteEA): Ditto.
3963         * security.cc (ReadSD): Ditto.
3964         (WriteSD): Ditto.
3965         * syscalls.cc (_link): Ditto.
3966         * uname.cc (uname): Eliminate PPC switch.
3967
3968 2000-02-01  Salvador Eduardo Tropea  <salvador@inti.gov.ar>
3969
3970         * include/io.h: add return type to setmode()
3971
3972 2000-01-27  DJ Delorie  <dj@cygnus.com>
3973
3974         * include/netdb.h (h_errno): change __imp_ to dllimport
3975         * cygwin.din (reent_data): add DATA
3976
3977 Thu Jan 27 01:07:14 2000  Christopher Faylor <cgf@cygnus.com>
3978
3979         * exceptions.cc (call_handler): Add debugging output.
3980         * select.cc (MAKEready): Arm signals earlier.
3981         * sigproc.cc (__signal_arrived:arm): Move debugging version of this
3982         method here.
3983         (__signal_arrived::release): Ditto.
3984         * sigproc.h: Recognize debugging versions of above two methods.
3985         (arm_signals::WaitForMultipleObjects): Don't release signal lock unless
3986         signal arrived.
3987         (arm_signals::WaitForMultipleSingleObject): Ditto.
3988         (arm_signals::MsgWaitForMultipleObjects): Ditto.
3989
3990 Thu Jan 27 00:19:26 2000  Christopher Faylor <cgf@cygnus.com>
3991
3992         * sync.h (new_muto): Workaround change in gcc behavior.
3993
3994 Wed Jan 26 12:57:13 2000  Christopher Faylor <cgf@cygnus.com>
3995
3996         * Makefile.in: Ensure that all required libraries are built prior
3997         to linking cygrun.exe.
3998
3999 Tue Jan 25 21:26:57 2000  Christopher Faylor <cgf@cygnus.com>
4000
4001         * exceptions.cc (sig_handle): Crudely work around potential problem
4002         when main thread has a lock but is killed by a fatal signal.
4003         * fhandler_tty.cc (fhandler_pty_master::write): Don't perform line
4004         editing on the pty master (so why do we need the second argument to
4005         line_edit, then?)
4006         * thread.cc: Reformat to GNU standards.
4007
4008 2000-01-11  DJ Delorie  <dj@cygnus.com>
4009
4010         * ROADMAP: new
4011
4012 2000-01-11  DJ Delorie  <dj@cygnus.com>
4013
4014         * fhandler_zero.cc: new, emulate /dev/zero
4015         * testsuite/winsup.api/devzero.c: new, test /dev/zero
4016         * Makefile.in: build fhandler_zero.o
4017         * fhandler.h: add support for /dev/zero
4018         * hinfo.cc: ditto
4019         * path.cc: ditto
4020
4021 2000-01-11  DJ Delorie  <dj@cygnus.com>
4022
4023         * mmap.cc (mmap): MSDN says *one* of FILE_MAP_*, fix flags for
4024         MAP_PRIVATE.
4025
4026 Mon Jan 10 01:11:00 2000  Corinna Vinschen  <corinna@vinschen.de>
4027
4028         * security.cc (acl_access): New function.
4029         * syscalls.cc (access): Call acl_access if ntsec is on.
4030
4031 Mon Jan 10 01:11:00 2000  Corinna Vinschen  <corinna@vinschen.de>
4032
4033         * fhandler.cc (get_file_owner): Use of ReadSD() instead of
4034         GetFileSecurity().
4035         (get_file_group): Ditto.
4036
4037 Sun Jan  9 15:43:07 2000  Christopher Faylor <cgf@cygnus.com>
4038
4039         * debug.cc (struct thread_start): Add a flag to determine whether a
4040         field is in use.  Eliminate thread_start_ix since it was not
4041         thread-safe.
4042         (thread_stub): Use notavail flag to control whether the entry in
4043         start_buf can be reused.
4044         (makethread): Ditto.
4045
4046 Sun Jan  9 20:18:00 2000  Corinna Vinschen  <corinna@vinschen.de>
4047
4048         * security.cc (alloc_sd): Rearrange order of ACE creation.
4049         (setacl): Optimize creation of ACEs related to inheritance.  Code
4050         cleanup.
4051         (aclcheck): Disable check for existance of DEF_)CLASS_OBJ.
4052
4053 Sat Jan  8 18:42:32 2000  Christopher Faylor <cgf@cygnus.com>
4054
4055         * mkvers.h: Reorg fix.
4056
4057 Sat Jan  8 20:00:00 2000  Corinna Vinschen  <corinna@vinschen.de>
4058
4059         * cygwin.din: Add new acl API calls.
4060         * grp.cc (getgroups): Change to work for any username.
4061         * security.cc (get_id_from_sid): Change to work with acl API.
4062         (is_grp_member): New function.
4063         (get_nt_attribute): Rewritten.
4064         (add_access_allowed_ace): New function.
4065         (add_access_denied_ace): Ditto.
4066         (alloc_sd): Rewritten.
4067         (setacl): New function.
4068         (getace): Ditto.
4069         (searchace): Ditto.
4070         (getacl): Ditto.
4071         (acl): Ditto.
4072         (facl): Ditto.
4073         (aclcheck): Ditto.
4074         (acecmp): Ditto.
4075         (aclsort): Ditto.
4076         (acltomode): Ditto.
4077         (aclfrommode): Ditto.
4078         (acltopbits): Ditto.
4079         (aclfrompbits): Ditto.
4080         (permtostr): Ditto.
4081         (acltotext): Ditto.
4082         (permfromstr): Ditto.
4083         (aclfromtext): Ditto.
4084         * syscalls.cc (access): Set errno again when needed.
4085         * include/cygwin/acl.h: New file.
4086         * include/sys/acl.h: Ditto.
4087
4088 Sat Jan  8 14:46:19 2000  Christopher Faylor <cgf@cygnus.com>
4089
4090         * Makefile.in: Add cygwin DLL specific CFLAGS define.
4091
4092 Fri Jan  7 21:01:57 2000  Christopher Faylor <cgf@cygnus.com>
4093
4094         * exceptions.cc (interrupt_on_return): Properly coerce assignment of
4095         sigsave.func.
4096
4097 2000-01-07  Mumit Khan  <khan@xraylith.wisc.edu>
4098
4099         * acconfig.h: New file.
4100         * configure.in Add check for memset builtin.
4101         (AC_CONFIG_HEADER): Use.
4102         (STRACE_HHMMSS): Define instead of substituting.
4103         (_MT_SAFE): Likewise.
4104         (_CYG_THREAD_FAILSAFE): Likewise.
4105         (DEBUGGING): Likewise.
4106         (MT_SAFE): Substitute as a yes/no variable.
4107         * Makefile.in: Remove DEBUGGING, STRACE_HHMMSS, and THREAD_FAILSAFE
4108         variables and add DEFS. Update usage of MT_SAFE to reflect yes/no
4109         values. Add config.h to winsup.h dependency.
4110         (CFLAGS_CONFIG): Update.
4111         (INCLUDES): Prepend `-I.'.
4112         * utils/Makefile.in (INCLUDES): Likewise.
4113         * winsup.h: Conditionally include config.h.
4114         * thread.cc: Likewise.
4115         * config.h.in: Generate new file.
4116         * configure: Regenerate.
4117
4118
4119 Fri Jan  7 16:21:01 2000  Christopher Faylor <cgf@cygnus.com>
4120
4121         * dcrt0.cc (dll_crt0): Allow signal handling for dynamically loaded
4122         case.
4123
4124 Thu Jan  6 00:30:12 2000  Corinna Vinschen  <corinna@vinschen.de>
4125
4126         * path.cc (symlink_check_one): Initialize local variable `unixattr'
4127         before calling `get_file_attribute'.
4128         * syscalls.cc (chown): Ditto.
4129         * security.cc (get_nt_attribute): Eliminate attribute copying from
4130         world to user/group in case of missing ACEs.
4131         (alloc_sd): Set special rights for administrators group only if it's
4132         neither owner nor group.
4133         * utils/mkpasswd.c: Create entry for local group administrators (SID
4134         544).
4135
4136 Thu Jan 6 00:21:31 2000 Christopher Faylor <cgf@cygnus.com>
4137
4138         Change function calls to __stdcall throughout.
4139         * exceptions.cc (handle_exceptions): Probe stack for return address to
4140         use with new signal method.  Fill out sigsave.cx with this information.
4141         (call_handler): Use sigsave.cx if it is available, rather than trying
4142         to find the context of the main thread.
4143         (interrupt_on_return): Use address of context rather than
4144         pass-by-reference.
4145         (interrupt_now): Ditto.
4146
4147 Thu Jan  6 00:21:31 2000  Corinna Vinschen  <corinna@vinschen.de>
4148
4149         * grp.cc (getgroups): Return supplementary groups now.
4150         * include/limits.h: Define NGROUP_MAX as 16 now.