OSDN Git Service

* include/sys/cygwin.h (strace_printf_wrap): Force printing when
[pf3gnuchains/pf3gnuchains3x.git] / winsup / cygwin / ChangeLog
1 Thu Aug 24 13:21:09 2000  Christopher Faylor <cgf@cygnus.com>
2
3         * include/sys/cygwin.h (strace_printf_wrap): Force printing when
4         _STRACE_SYSTEM.
5         (strace_printf_wrap1): Ditto.
6
7 Thu Aug 24 12:30:17 2000  Christopher Faylor <cgf@cygnus.com>
8
9         * debug.h: Allow some debug defines for use in header files.
10
11 Wed Aug 23 23:00:24 2000  Christopher Faylor <cgf@cygnus.com>
12
13         * dcrt0.cc (dll_crt0_1): Move exception list and constructor stuff
14         earlier in the process.  Use new second argument to set_myself.
15         (cygwin_dll_init): Initialize exception list and constructor stuff
16         here.
17         (_dll_crt0): And here.  Also, deal with inherited pinfo shared memory
18         region from parent.
19         * pinfo.cc (set_myself): Accept a second argument signifying the a
20         shared memory region, passed from an execing parent.
21         (pinfo_init): Ditto.
22         * pinfo.h: Ditto.
23         * shared.h (child_info): Add a handle field to pass to child.
24         * spawn.cc (spawn_guts): Create a shared handle to pass to an execed
25         child.
26         * winsup.h: Remove extraneous declaration.
27
28 Wed Aug 23 10:51:57 2000  Christopher Faylor <cgf@cygnus.com>
29
30         * include/sys/cygwin.h: Protect class definitions.
31
32 Tue Aug 22 13:57:36 2000  Christopher Faylor <cgf@cygnus.com>
33
34         * path.cc (symlink_info::check): Clear error on each iteration of
35         extension check.
36
37 Tue Aug 22 11:23:59 2000  Christopher Faylor <cgf@cygnus.com>
38
39         * Makefile.in: Don't include '.d' file if there are none generated yet.
40
41 Tue Aug 22 11:08:11 2000  Christopher Faylor <cgf@cygnus.com>
42
43         * include/sys/cygwin.h: Declare some thread classes.
44         * include/mntent.h: Avoid declaring functions.
45
46 Tue Aug 22 01:08:01 2000  Christopher Faylor <cgf@cygnus.com>
47
48         * winsup.h: Eliminate inclusion of most of the cygwin .h files.  Use .h
49         files only in sources which require them.
50         * Makefile.in: Generate dependencies with -MD option.
51
52 Mon Aug 21 23:49:05 2000  Christopher Faylor <cgf@cygnus.com>
53
54         * cygerrno.h: New file.  Use this throughout whenever errno
55         manipulation is required.
56         * errno.cc: Use DWORD to hold Windows errors.
57         (geterrno_from_win_error): New function.
58         (seterrno_from_win_error): Use geterrno_from_win_error to convert
59         supplied windows error (suggested by Corinna Vinschen).
60         * path.cc (symlink_info): Add error element.
61         * path.cc (path_conv::check): Remove errno setting.  Use new
62         symlink_info errno element to set path_conv error, where appropriate.
63         (symlink_info::check): Set error element rather than attempting to
64         manipulate errno.  Add more checks for trailing / and /..  even though
65         they are currently useless.  Avoid setting EINVAL.
66
67 Mon Aug 21 23:49:05 2000  Corinna Vinschen <corinna@vinschen.de>
68
69         * path.cc (normalize_posix_path): Correct check for trailing /.
70
71 2000-08-21  DJ Delorie  <dj@redhat.com>
72
73         * include/cygwin/cygwin_dll.h (DECLARE_CYGWIN_DLL): hinstance,
74         not handle.
75
76 Fri Aug 18 11:11:00 2000  Corinna Vinschen <corinna@vinschen.de>
77
78         * dtable.cc (dtable::dup2): Extend fdtab if newfd is out of current
79         allocated bounds.
80
81 Sat Aug 12 01:47:28 2000  Christopher Faylor <cgf@cygnus.com>
82
83         * mkvers.sh: Properly trap exit removal of temp file.  Remove debugging
84         statement.
85
86 Sat Aug 12 01:37:56 2000  Christopher Faylor <cgf@cygnus.com>
87
88         * poll.cc: Make winsup.h the first include file, re 2000-08-02 change.
89
90 Sat Aug 12 01:33:12 2000  Christopher Faylor <cgf@cygnus.com>
91
92         * winsup.h: Split out dtable definitions into separate header file.
93         * dtable.h: New file.
94         * sigproc.h: Eliminate pinfo.h usage here.  Use it in source files that
95         need it.
96
97 Sat Aug 12 01:08:11 2000  Christopher Faylor <cgf@cygnus.com>
98
99         * Makefile.in: Use dtable.o rather than hinfo.o.
100
101 Sat Aug 12 00:47:11 2000  Christopher Faylor <cgf@cygnus.com>
102
103         Rename hinfo -> dtable.  Name the former dtable array 'fdtab'.
104
105 Fri Aug 11 14:47:00 2000  Corinna Vinschen <corinna@vinschen.de>
106
107         * poll.cc: Allow any descriptor and any number of descriptors.
108         Allocate fd_set struct sdynamically.
109
110 Fri Aug 11 14:47:00 2000  Corinna Vinschen <corinna@vinschen.de>
111
112         * poll.cc: Add bounds checking for file descriptors. Return POLLNVAL
113         if fd is invalid. Return POLLERR for each valid fd if cygwin_select
114         returned with error.
115         include/sys/poll.h: Change POLLERR comment according to above change.
116
117 Thu Aug 10 21:54:29 2000  Christopher Faylor <cgf@cygnus.com>
118
119         * syslog.cc (syslog): Use a less malloc-intensive method for allocating
120         the buffer.  Also fix a buffer overrun.
121
122 Thu Aug 10 15:31:39 2000  Christopher Faylor <cgf@cygnus.com>
123
124         * winsup.h: Change strchr inline for strange gcc problem.
125         * select.cc (select_stuff::wait): Bounds check w4 array.
126
127 Thu Aug 10 15:17:53 2000  Christopher Faylor <cgf@cygnus.com>
128
129         * dir.cc (readdir): Ensure that errno is *only* set when we've run out
130         of filenames.
131         * fhandler.cc (fhandler_disk_file::fstat): Use modern method for saving
132         errno, making it effective for the whole function.
133
134 Tue Aug  8 22:25:39 2000  Christopher Faylor <cgf@cygnus.com>
135
136         * select.cc (allocfd_set): Zero allocated fd_set.
137         (cygwin_select): Move fd_set copying logic from ::wait to here.  Use
138         common return through sell.poll.
139         (select_stuff::wait): Just return success or failure and let caller
140         fill in fd_set.
141         * pinfo.h (pinfo): Eliminate self-referential pointer to sidbuf since
142         pinfo structure exists at random locations now.
143         * fork.cc (fork): Use 'use_psid' element to control when the psid is
144         relevant.
145         * shared.cc (sec_user): Ditto.
146         * spawn.cc (spawn_guts): Ditto.
147         * uinfo.cc (internal_getlogin): Ditto.
148         * syscall.cc (seteuid): Ditto.  Set use_psid element.
149
150 Tue Aug  8 13:20:00 2000  Bob Wilson  <bwilson@tensilica.com>
151
152         * fhandler_serial.cc (tcsendbreak): "sleeptime" argument to usleep()
153         must be in units of microseconds, not milliseconds.
154
155 Mon Aug  7 00:11:35 2000  Christopher Faylor <cgf@cygnus.com>
156
157         * include/cygwin/cygwin_dll.h: Remove extraneous (and incorrect)
158         declarations.
159
160 Fri Aug  4 00:00:46 2000  Christopher Faylor <cgf@cygnus.com>
161
162         * hinfo.cc (hinfo::find_unused_handle): Just check for table entry ==
163         NULL since we are already bounds checked by default.
164         * thread.cc (ResourceLocks::Lock): Streamline this function since it is
165         called a lot.
166         (ReleaseResourceLock): Ditto.
167
168 Thu Aug  3 20:44:39 2000  Christopher Faylor <cgf@cygnus.com>
169
170         * select.cc (fhandler_console::select_read): Call set_cursor_maybe
171         since select may block and cursor may not be visible.
172         * select.cc (fhandler_console::select_write): Ditto.
173         * select.cc (fhandler_console::select_except): Ditto.
174
175 Thu Aug  3 09:01:14 2000  Christopher Faylor <cgf@cygnus.com>
176
177         * fhandler_tty.cc (fhandler_pty_master::process_slave_output): Set
178         length field correctly when "need_nl".
179
180 Wed Aug  2 22:58:07 2000  Christopher Faylor <cgf@cygnus.com>
181
182         * fork.cc (vfork): Store complete stack frame in vfork_save structure
183         for later recovery.
184         * spawn.cc (spawn_guts): Reorganize slightly to consolidate handling
185         when there is a CreateProcess error.
186         (_spawnve): Only longjmp back to vfork handling when a process has been
187         successfuly started.
188         * winsup.h (vfork_save): Extend to include frame info.  Remove obsolete
189         cpplus conditionals.
190
191 Wed Aug  2 15:14:51 2000  Christopher Faylor <cgf@cygnus.com>
192
193         * strace.cc (strace::prntf): Make second argument the function name,
194         rather than use special format options.
195         (strace::vprntf): Ditto.
196         (getfunc): New function.
197         * include/sys/strace.h: Reflect above changes.
198         * smallprint.c (__small_vsprintf): Eliminate '%F' formatting.
199         * pinfo.cc (set_myself): Modify for new strace::prntf parameter.
200         * errno.cc (seterrno_from_win_error): Ditto.
201         * fhandler_tty.cc (fhandler_tty_common::__acquire_output_mutex): Ditto.
202         * fhandler_tty.cc (fhandler_tty_common::__release_output_mutex): Ditto.
203
204 Wed Aug  2 13:20:04 2000  Christopher Faylor <cgf@cygnus.com>
205
206         * regexp/regexp.c: Add winsup.h.
207
208 2000-08-02  DJ Delorie  <dj@redhat.com>
209
210         * winsup.h: take out protections of environ, errno, allow C use
211         * *.cc: put winsup.h before other headers (for __INSIDE_CYGWIN__);
212         use cur_environ() instead of just environ
213         * times.cc: remove import protections
214         * glob.c: add winsup.h
215         * localtime.c: ditto
216         * smallprint.c: ditto
217         * Makefile.in: don't __INSIDE_CYGWIN__ as it messes up profiling.
218         
219 Wed Aug  2 11:22:53 2000  Christopher Faylor <cgf@cygnus.com>
220
221         * include/sys/strace.h: Fix strace definition.
222
223 Tue Aug  1 23:37:08 2000  Christopher Faylor <cgf@cygnus.com>
224
225         * strace.h: Add kludgy workarounds to avoid using deprecated methods
226         for variable argument macros when possible.
227         * sigproc.cc: Throughout, use sigproc_printf rather than sip_printf.
228         * strace.cc (strace::prntf): Remove 'active' check, since callers are
229         supposed to ensure this.
230         (__system_printf): Remove.  Subsumed by strace::prntf.
231         * winsup.h: Define "NEW_MACRO_VARARGS" to indicate when to use new
232         macro varargs capability.
233
234 Sun Jul 30 13:54:35 2000  Christopher Faylor <cgf@cygnus.com>
235
236         * fhandler_console.cc: Remove VK_DIVIDE detection.
237         (get_nonascii_key): Simplify previous patch to return ascii char if it
238         is non-zero.  Add a second "temporary buffer" argument to help with
239         thread safety.
240         * select.cc (peek_console): Pass a temporary buffer argument to
241         get_nonascii_key.
242
243 Sat Jul 29 14:32:12 2000  Christopher Faylor <cgf@cygnus.com>
244
245         * fhandler_console.cc: Add VK_DIVIDE detection.  Return virtual keycode
246         if it is not detected and it is less than ' '.
247
248 Sat Jul 29 13:33:49 2000  Christopher Faylor <cgf@cygnus.com>
249
250         * path.cc (chdir): Avoid trailing dot calculation when chdir == '/'
251         or we end up with an empty string.
252
253 Sat Jul 29 12:11:33 2000  Christopher Faylor <cgf@cygnus.com>
254
255         * include/cygwin/version.h: Bump DLL minor version number to 5 due
256         to all of the changes below.
257
258 Sat Jul 29 12:01:32 2000  Christopher Faylor <cgf@cygnus.com>
259
260         Redefine process structure to avoid a fixed size table.  Redefine
261         pinfo/_pinfo classes.  Use these throughout.
262         * dcrt0.cc (dll_crt0_1): Accomodate set_myself argument change.
263         (__api_fatal): Accomodate _pinfo::record_death argument change.
264         * exceptions.cc (really_exit): Ditto.
265         (sig_handle_tty_stop): Use pinfo constructor to access process info.
266         (events_init): Don't create pinfo_mutex since it is no longer required.
267         * external.cc (fillout_pinfo): Use winpids class to iterate over all
268         system pids.
269         (cygwin_internal): lock_pinfo_for_update and unlock_pinfo are now
270         noops.
271         * fhandler_termios.cc (fhandler_termios::set_ctty): Use pinfo
272         constructor to access process info.
273         * fork.cc (fork): Reorganize to initialize child info after the child
274         has started since that is when we know the child's winpid, which is
275         necessary to allocate the pinfo shared memory.
276         * mmap.cc (recreate_mmaps_after_fork): Change arg type to _pinfo.
277         * pinfo.cc: Rename pinfo methods to _pinfo throughout.  Eliminate
278         pinfo_list stuff.
279         (set_myself): Accept a pid argument now.  Call pinfo initializer to
280         initialize myself.  Detect when this is an "execed" process and create
281         an "indirect" pid block.
282         (pinfo_init): Accomodate set_myself arg change.
283         (procinfo): Remove.
284         (pinfo::lock_pinfo): Remove.
285         (pinfo::unlock_pinfo): Remove.
286         (pinfo::init): New method.  Allocates shared memory space for process
287         pinfo structure.
288         (pinfo::record_death): Don't call locking functions.
289         (cygwin_winpid_to_pid): Simplify by using new pinfo constructor.
290         (EnumProcessesW95): New function for iterating over processes on
291         Windows 95.
292         (winpids::winpids): New constructor for winpids class.  Sets up a list
293         of process ids.
294         (enum_init): Initialize w95/wnt pid enumerators.
295         * shared.cc (shared-info::initialize): Remove pid initialization.
296         * shared.h: Move pinfo stuff into pinfo.h.
297         (class shared_info): Remove pinfo_list element.
298         * signal.cc (kill_worker): Use pinfo constructor to access process
299         info.
300         (kill_pgrp): Ditto.  Use winpids methods to access list of processes.
301         * sigproc.cc: Throughout, modify to use _pinfo where appropriate.
302         (proc_exists (pid_t)): New function.  Determines if a process exists
303         based on the pid.
304         (proc_exists (_pinfo *p): Use new proc_exists function above.
305         (proc_subproc): Copy pinfo stuff around rather than _pinfo pointers.
306         Try to be careful about releasing shared memory when we don't need it
307         anymore.  Remove pinfo locks.
308         (remove_zombies): Remove pinfo memory when zombie is going away.
309         * sigproc.h: Reflect _pinfo/pinfo changes in sigproc.cc.
310         * spawn.cc (spawn_guts): Eliminate pinfo *child argument.  Reorganize
311         to only initialize child pinfo after process has been started and we
312         know the windows pid.
313         (_spawnve): Reflect spawn_guts changes.
314         * syscalls.cc (setpgid): Use pinfo constructor to access process info.
315         (getpgid): Ditto.
316         (internal_getlogin): Use _pinfo.
317         * winsup.h: Eliminate pinfo_mutex.  Eliminate spawn_guts declaration
318         since it is static now.  Reflect set_myself argument change.
319         * include/sys/cygwin.h: Add some PID_* enums to accomodate new pinfo
320         stuff.
321
322 Sat Jul 29 12:13:27 2000  Christopher Faylor <cgf@cygnus.com>
323
324         * include/cygwin/version.h: Update minor version for cygdrive changes
325         below.
326
327 Sat Jul 29 11:59:29 2000  Christopher Faylor <cgf@cygnus.com>
328
329         * environ.cc (parse_thing): Make binmode a DWORD.
330         * hinfo.cc (hinfo::init_std_file_from_handle): Use 'binmode' to
331         determine default open mode.
332         * winsup.h: Declare binmode.
333
334 Sat Jul 29 00:16:35 2000  Christopher Faylor <cgf@cygnus.com>
335
336         * include/cygwin/cygwin_dll.h: Update for modern compilers.
337         * lib/cygwin_crt0.c: Inexplicably need to define alloca for newer
338         compilers.
339         * fhandler.h (fhandler_console): Add new method.
340         * fhandler.cc (fhandler_console::set_cursor_maybe): New method.
341         (fhandler_console::read): Set cursor if it has moved to make it
342         visible.
343
344 Thu Jul 27 22:54:28 2000  Jason Tishler <jt@dothill.com>
345
346         * dcrt0.cc (dummy_autoload): Add load statement for RegDeleteValueA.
347         * external.cc (get_cygdrive_prefixes): New function.
348         (cygwin_internal): Add CW_GET_CYGDRIVE_PREFIXES case.
349         * path.cc (mount_info::read_cygdrive_info_from_registry): Read system
350         cygdrive prefix if user one is undefined.
351         (mount_info::write_cygdrive_info_to_registry): Write cygdrive prefix to
352         the appropriate registry hive.  Overwrite in-memory copy of cygdrive,
353         if appropriate.
354         (mount_info::remove_cygdrive_info_from_registry): New method.
355         (mount_info::get_cygdrive_prefixes): New method.
356         (cygwin_umount): Remove cygdrive prefix, if appropriate.
357         * registry.cc (reg_key::killvalue): New method.
358         * shared.h (class reg_key): Add killvalue,
359         remove_cygdrive_info_to_registry, and get_cygdrive_prefixes
360         declarations.
361         * include/sys/cygwin.h (cygwin_getinfo_types): Add
362         CW_GET_CYGDRIVE_PREFIXES.
363
364 Thu Jul 27 23:33:32 2000  Christopher Faylor <cgf@cygnus.com>
365
366         * include/cygwin/version.h: Bump DLL minor version number to 4.
367
368 2000-07-27  DJ Delorie  <dj@redhat.com>
369
370         * testsuite/winsup.api/winsup.exp: ignore stdout by default
371         * testsuite/winsup.api/crlf.c: non-verbose by default
372         
373         * winsup.h: prune out windows headers we don't normally need
374         * assert.cc: add wingdi.h and winuser.h
375         * fhandler_console.cc: ditto
376         * fhandler_windows.cc: ditto
377         * select.cc: ditto
378         * spawn.cc: ditto
379         * strace.cc: ditto
380         * tty.cc: ditto
381         * window.cc: ditto
382         * hinfo.cc: add winsock.h
383         * syscalls.cc: add winnls.h
384         * uinfo.cc: ditto
385         
386 Thu Jul 27 10:24:36 2000  Egor Duda <deo@logos-m.ru>
387
388         * fhandler.cc (fhandler_disk_file::fstat): Allow block calculation to
389         succeed for files >= 2GB and <= 4GB.
390
391 Wed Jul 26 16:05:04 2000  Christopher Faylor <cgf@cygnus.com>
392
393         * exceptions.cc (signal_exit): Renamed from "really_exit".  Always sets
394         EXIT_SIGNAL bit and reorganizes exit value for backwards cygwin
395         handling.
396         (handle_exceptions): Call signal_exit.  Set "core dumped" bit.
397         (sig_handle): Call signal_exit.  Set "core dumped" bit appropriately.
398
399 Wed Jul 26 20:44:00 2000  Corinna Vinschen <corinna@vinschen.de>
400
401         * environ.cc (posify): Revert previous patch.
402         (_addenv): Remove check_null_empty_path from here.
403         (putenv): Call check_nullempty_path.
404         (setenv): Call check_nullempty_path for name as well here.
405         Don't report an error if value is empty string.
406         (environ_init): Revert usage of newp.
407
408 Wed Jul 26 14:32:38 2000  Egor Duda <deo@logos-m.ru>
409
410         * syscalls.cc (stat_worker): Make stat return correct st_blocks for
411         files with size bigger than 2Gb and less than 4Gb
412
413 Wed Jul 26 17:43:00 2000  Corinna Vinschen <corinna@vinschen.de>
414
415         * security.cc (lookup_name): Search on local machine first if
416         myself->domain is not empty.
417
418 2000-07-26  DJ Delorie  <dj@cygnus.com>
419
420         * fhandler_console.cc (fhandler_console::read): Explicitly set cursor
421         to make it visible while waiting in WaitForMultipleObjects.
422
423 Wed Jul 26 10:59:00 2000  Corinna Vinschen <corinna@vinschen.de>
424
425         * passwd.cc: Change name of passwd_in_memory_p to passwd_state.
426         Change type to enum. Change storage class to static. Adjust comments.
427         (read_etc_passwd): Set passwd_state to different values when loaded
428         from file in contrast to being emulated.
429         (search_for): Return default passwd entry if passwd is emulated or
430         it's a request for the current user. Otherwise return NULL.
431
432 Tue Jul 25 21:50:42 2000  Christopher Faylor <cgf@cygnus.com>
433
434         * syscalls.cc (statfs): Use path_conv method to convert input path.
435
436 Tue Jul 25 21:40:51 2000  Christopher Faylor <cgf@cygnus.com>
437
438         * syscalls.cc (_link): Avoid extraneous call to
439         cygwin_conv_to_win32_path.
440
441 Tue Jul 25 21:11:15 2000  Christopher Faylor <cgf@cygnus.com>
442
443         * environ.cc (_addenv): New function.  Subsumes functionality of
444         putenv/setenv.  Does not allocate space for putenv case.
445         (putenv): Use _addenv to add a value to the environment.
446         (setenv): Ditto.
447         (environ_init): Don't malloc space for each entry in the environment
448         table.  Just use the space from GetEnvironmentStrings.
449         (posify): Don't free the src argument since it is no longer malloced.
450
451 Mon Jul 24 21:10:00 2000  Corinna Vinschen <corinna@vinschen.de>
452
453         * syscalls.cc (_link): Corrected previous patch.
454
455 Mon Jul 24 13:26:00 2000  Corinna Vinschen <corinna@vinschen.de>
456
457         * fhandler.h (class fhandler_dev_random): Add members for managing
458         pseudo randomness.
459         * fhandler_random.cc: Rearrange. Use pseudo random number generator
460         as entropy source if system entropy isn't available and if device is
461         used as /dev/urandom. Allow initializing device by calling write().
462
463 Sun Jul 23 23:11:00 2000  Corinna Vinschen <corinna@vinschen.de>
464
465         * fhandler.h: Add comment.
466
467 Sun Jul 23 20:00:00 2000  Corinna Vinschen <corinna@vinschen.de>
468
469         * fhandler.h (class fhandler_dev_raw): Add private member `varblkop'
470         to be set when variable blocksize mode is on.
471         * fhandler_raw.cc: Eliminate `\n' from trace output.
472         (clear): Set `varblkop' to 0.
473         (dup): Copy varblkop as well.
474         (writebuf): Care for variable blocksize.
475         (open): Ditto.
476         (raw_read): Ditto.
477         (raw_write): Ditto.
478         * fhandler_tape.cc (open): Ditto.
479         (ioctl): Ditto. Some cleanups.
480
481 Sat Jul 22 18:40:00 2000  Corinna Vinschen <corinna@vinschen.de>
482
483         Patch suggested by Kazuhiro Fujieda  <fujieda@jaist.ac.jp>.
484         * winsup.h: Add new macros sys_wcstombs and sys_mbstowcs.
485         * syscalls.cc (_link): Replace calls to mbstowcs by call to
486         sys_mbstowcs.
487         * uinfo.cc (internal_getlogin): Replace calls to wcstombs and
488         mbstowcs by calls to sys_wcstombs and sys_mbstowcs. Replace
489         usage of constants by meaningful defines. Use result of
490         GetSystemDirectory for HOMEPATH and HOMEDRIVE as a last resort.
491
492 Fri Jul 21 21:33:00 2000  Corinna Vinschen <corinna@vinschen.de>
493
494         * spawn.cc (span_guts): Retrieve security attributes before setting
495         psid to NULL.
496
497 Fri Jul 21 12:03:00 2000  Corinna Vinschen <corinna@vinschen.de>
498
499         * security.cc (acl_worker): Use stat_suffixes in call to path_conv
500         just as in `stat_worker'.
501
502 Wed Jul 19 22:24:00 2000  Corinna Vinschen <corinna@vinschen.de>
503
504         * spawn.cc (spawn_guts): Don't restore impersonation in case
505         of _P_OVERLAY. Clean up slightly. Accomodate comments.
506
507 Wed Jul 19 22:11:00 2000  Corinna Vinschen <corinna@vinschen.de>
508
509         * shared.h (class pinfo): New members `root' and `rootlen'.
510         * syscalls.cc (chroot): Set new root for process.
511         * path.cc (getcwd_inner): Add parameter to force use of
512         new root from chroot() call.
513         (ischrootpath): New macro.
514         (normalize_posix_path): Care for changed root dir.
515         (normalize_win32_path): Ditto.
516         (getcwd_inner): Ditto.
517         (chdir): Eliminate trailing path component consisting
518         entirely of dots.
519         * fork.cc (fork): Copy pinfo members regarding chroot().
520         * spawn.cc (_spawnve): Ditto.
521         * dir.cc (opendir): Don't use computed win32 path if
522         chroot() took place.
523
524 Mon Jul 17 22:21:34 2000  Christopher Faylor <cgf@cygnus.com>
525
526         * dll_init.cc (dll_list::alloc): Fix debugging output.
527
528 Mon Jul 17 14:57:53 2000  Christopher Faylor <cgf@cygnus.com>
529
530         Throughout, eliminate third argument to path_conv and use new PC_*
531         constants for second argument.
532         * dcrt0.cc (dll_crt0_1): Reorganize to allow more initialization prior
533         to returning due to dynamic loading.
534         * path.h: Generalize SYMLINK_* constants to PC_*.
535         (path_conv): Create a new method.  Fold third argument into second.
536         * dll_init.cc (dll_list::alloc): Try harder to find space to allocate
537         dll struct.
538         (dll_dllcrt0): Don't check sanity if we've already called dll_crt0.
539         * path.cc (path_conv::check): Don't check for a null or empty path
540         unless specifically told with a flag setting.
541         (check_null_empty_path): New function, adapted from macro.
542         * syscalls.cc (_rename): Use already-determined file attributes rather
543         than checking again.
544         * lib/cygwin/cygwin_attach.dll.c (cygwin_attach_dll): Use a static
545         per_process structure since this is apparently supposed to be zeroed.
546         * lib/cygwin_crt0.c (cygwin_crt0): Zero per_process structure sent to
547         older DLLs.
548
549 Mon Jul 17 19:39:00 2000  Corinna Vinschen <corinna@vinschen.de>
550
551         Patch suggested by Eric Fifer <EFifer@sanwaint.com>
552         * poll.cc (poll): Fix erroneous negations.
553
554 Mon Jul 17 17:56:00 2000  Corinna Vinschen <corinna@vinschen.de>
555
556         * environ.cc (setenv): Use __cygwin_environ instead of
557         environ after reallocating environment space.
558
559 Sun Jul 16 20:23:21 2000  Christopher Faylor <cgf@cygnus.com>
560
561         * _cygwin_crt0_common.cc: Undef 'environ' or suffer compiler error.
562
563 Sun Jul 16 16:03:00 2000  Christopher Faylor <cgf@cygnus.com>
564
565         * environ.cc: Use new definition of "environ" throughout.
566         (environ_init): Explicitly initialize __cygwin_environ.
567         (cur_environ): New function.  Detects when user has updated
568         their environment.
569         * exec.cc: Use 'environ' define throughout rather than __cygwin_environ.
570         * spawn.cc: Ditto.
571         * winsup.h: Declare cur_environ, main_environ, environ.
572
573 Sun Jul 16 13:23:04 2000  Christopher Faylor <cgf@cygnus.com>
574
575         * acconfig.h: Add support for NEWVFORK.
576         * config.h.in: Ditto.
577         * configure.in: Add --enable-vfork option.
578         * configure: Regenerate.
579         * dcrt0.cc (quoted): Detect and fix up quoted backslashes.
580         * sigproc.cc (proc_subproc): Correctly name handle of newly added child
581         process to avoid erroneous debugging messages about closing the wrong
582         handle.
583
584 Sun Jul 16 02:30:09 2000  Christopher Faylor <cgf@cygnus.com>
585
586         * spawn.cc (spawn_guts): Use \ for quoting '"'.
587         * dcrt0.cc (quoted): Understand \ quoting for '"'.
588
589 Sun Jul 16 00:32:58 2000  Christopher Faylor <cgf@cygnus.com>
590
591         * dcrt0.cc (build_argv): Strip quotes from argv[0] since it should
592         never be globified.
593
594 Sat Jul 15 00:32:41 2000  Christopher Faylor <cgf@cygnus.com>
595
596         * dll_init.cc (dll_list::alloc): Round correctly.  Use VirtualAlloc
597         since shared file mapping is unnecessary.
598         (dll_list::detach): Release memory via VirtualFree since there we no
599         longer use shared file mapping.
600
601 Fri Jul 14 22:40:22 2000  Christopher Faylor <cgf@cygnus.com>
602
603         * hinfo.cc (hinfo::linearize_fd_array): Make max_used_fd an int so that
604         we can detect when there are no fds to pass.
605         * dcrt0.cc (host_dependent_constants::init): Revert Sat Mar 18 01:32:04
606         2000 change.
607         (dll_crt0_1): Set "cygwin_finished_initializing" flag.
608         (dll_crt0): Don't perform memcpy if uptr is already set to internal
609         structure.
610         (_dll_crt0): Remember location of programs envptr.
611         * dll_init.h (per_module, dll, dll_list): Revamp.
612         * dll_init.cc: Revamp.  Use new classes.
613         * fork.cc (fork): Use new revamped dll, dll_list, and per_module stuff.
614         * environ.cc: Use __cygwin_environ throughout rather than the
615         user_data->envptr.
616         * exec.cc: Ditto.
617         * spawn.cc: Ditto.
618         * winsup.h: Declare update_envptrs, cygwin_finished_initializing.
619         * lib/_cygwin_crt0_common.cc (_cygwin_crt0_common): Revert previous
620         change.
621         * lib/cygwin_attach_dll.cc (cygwin_attach_dll): Always pass in own
622         per_process structure or we end up overwriting information from the
623         main program.
624
625 Wed Jul 12 00:46:00 2000  Christopher Faylor <cgf@cygnus.com>
626
627         * debug.cc (thread_stub): Use impure_ptr in place of reent_data.
628         * dll_init.cc (dll_dllcrt0): Replace erroneous use of local symbol with
629         correct __cygwin_user_data->impure_ptr.
630
631 Wed Jul 12 00:01:03 2000  Christopher Faylor <cgf@cygnus.com>
632
633         * lib/_cygwin_crt0_common.cc (_cygwin_crt0_common): Don't reset
634         environ if already set.
635
636 Mon Jul 10 19:07:03 2000  Christopher Faylor <cgf@cygnus.com>
637
638         * fhandler_console.cc (fhandler_console::read): Unicode interface
639         to ReadConsoleInput only exists on W2K, so use workaround from
640         Kazuhiro Fujieda  <fujieda@jaist.ac.jp>.
641
642 Mon Jul 10 11:30:00 2000  Christopher Faylor <cgf@cygnus.com>
643
644         * Makefile.in (install): Install textmode.o as well as binmode.o.
645         * fhandler_console.cc (fhandler_console::read): Use UNICODE when
646         reading from the console and translate to ASCII from that.
647
648 Sun Jul  9 21:52:00 2000  Corinna Vinschen <corinna@vinschen.de>
649
650         * spawn.cc (spawn_guts): Close handle `hToken' only if it's not
651         copied from myself->token.
652         * syscalls.cc (seteuid): Replace CopySid by memcpy which is foolproof
653         here.
654
655 Sun Jul  9 01:19:06 2000  Christopher Faylor <cgf@cygnus.com>
656
657         * cygwin.din: Export _getmode and getmode to allow querying of binary
658         state of an fd.
659         * external.cc (cygwin_internal): Add handling of perfile_table setting.
660         * fhandler.cc (perfile_table): New global.
661         (fhandler_base::get_default_fmode): New method to return a file's
662         default mode based on its name.
663         (fhandler_base::open): Use get_default_mode method to determine a
664         file's mode.  Record file mode in file flags.
665         * fhandler.h (fhandler_base): Declare get_default_fmode
666         * syscalls.cc (getmode): New function.
667         * sys/cygwin.h (__cygwin_perfile): New structure.
668         (cygwin_getinfo_types): Move outside of WINVER conditional.
669         (per_process): Move inside of WINVER conditional.
670
671 Sat Jul  8 00:15:01 2000  Christopher Faylor <cgf@cygnus.com>
672
673         * external.cc (cygwin_internal): Export __cygwin_user_data.
674         * include/sys/cygwin.h: Allow definition of per_process even when not
675         compiling with C++.
676         (cygwin_getinfo_types): Add CW_USER_DATA.
677         * lib/_cygwin_crt0_common.cc (_cygwin_crt0_common): Get
678         __cygwin_user_data pointer from cygwin_internal.  If it doesn't exist,
679         return failure.  Use either this pointer or passed in pointer
680         throughout.  Clear forkee.
681         * lib/crt0.h: Accomodate argument changes to _cygwin_crt0_common.
682         * lib/cygwin_attach_dll.c (cygwin_attach_dll): Reorganize to allow use
683         of newer binaries with older DLLs.  Detect older DLLs when
684         _cygwin_crt0_common returns 0 and allocate space for a per_process
685         structure on the stack.
686         * lib/cygwin_crt0.c (cygwin_crt0): Ditto.
687
688 Fri Jul  7 10:31:00 2000  Corinna Vinschen  <corinna@vinschen.de>
689
690         * include/sys/cygwin.h: Hide internal data types in per_process
691         when not __INSIDE_CYGWIN__.
692
693 Wed Jul  5 18:56:58 2000  Christopher Faylor <cgf@cygnus.com>
694
695         * dcrt0.cc (__cygwin_user_data): Initialize.
696         (dll_crt0_1): Eliminate user_data initialization.
697         (dll_crt0): Set up impure_ptr_ptr for older executables.
698         (cygwin_dll_init): Eliminate user_data initializations.
699         (__api_fatal): Don't check for user_data initialization.
700         * dll_init.cc (struct dll): Store entire contents of per_process rather
701         than just a pointer.
702         (add): Ditto.
703         (initOneDll): Don't check for user_data initialization.
704         (DllList::recordDll): Store contents of per_process argument.
705         (DllList::detachDll): Pass address of per_process field.
706         (DllList::initAll): Ditto.
707         (DllList::doGlobalDestructorsOfDlls): Ditto.
708         (DllListIterator::operator *): Ditto.
709         (dll_dllcrt0): Default to __cygwin_user_data if arg is NULL.
710         * include/sys/cygwin.h: Reorganize per_process to eliminate obsolete
711         fields and accomodate new way of initializing.
712         * lib/_cygwin_crt0_common: Initialize _impure_ptr from
713         __cygwin_user_data.impure_ptr.
714
715 2000-07-04  Vadim Egorov  <egorovv@mailandnews.com>
716
717         * exceptions.cc (try_to_debug): Prevent recursive spawning of JIT
718         debugger.  Treat special event from debugger as command to continue.
719
720 Mon Jul  4 19:29:00 2000  Corinna Vinschen  <corinna@vinschen.de>
721
722         * poll.cc (poll): Zero out `open_fds' as well.
723
724 Mon Jul  4 1:22:00 2000  Corinna Vinschen  <corinna@vinschen.de>
725
726         * include/cygwin/version.h: Bump API minor version to 24.
727
728 2000-07-04  Kazuhiro Fujieda  <fujieda@jaist.ac.jp>
729
730         * security.cc (read_sd): Eliminate OemToChar.
731
732 Mon Jul  4 18:57:00 2000  Corinna Vinschen  <corinna@vinschen.de>
733
734         * poll.cc: New file. Implement `poll' system call.
735         * include/poll.h: Ditto.
736         * include/sys/poll.h: Ditto.
737         * Makefile.in: Add poll.o as dependency.
738         * cygwin.din: Add poll and _poll symbols.
739
740 2000-07-04  Kazuhiro Fujieda  <fujieda@jaist.ac.jp>
741
742         * dcrt0.cc (dll_crt0_1): Eliminate SetFileApisToOEM and CharToOem.
743         * (dummy_autoload): Add functions used in fhandler_console.
744         * fhandler_console.cc (fhandler_console::read): Use ENCHANCED_KEY flag
745         to distinguish extended keys.  Translate an input character from the
746         OEM code page to the ANSI code page.
747         * (fhandler_console::write_normal): Translate output characters from
748         the ANSI code page to the OEM code page.
749         * syscalls.cc (_link): Use MultiByteToWideChar instead of OemToCharW.
750
751 Mon Jul  3 16:09:16 2000  Christopher Faylor <cgf@cygnus.com>
752
753         * exceptions.cc (stack_info::walk): Use method to find offset.
754         (handle_exceptions): Be more assertive in finding ebp for use under
755         W2K.  Create a dummy stack frame for cases where program is dying and a
756         stack dump is being output.
757         (sig_handle): Fill out a GetThreadContext for use with a user-generated
758         "core dump".
759
760 Mon Jul  3 10:53:00 2000  Corinna Vinschen  <corinna@vinschen.de>
761
762         * include/cygwin/socket.h: Remove SOCK_PACKET define since it's
763         not supported by Windows sockets.
764
765 Sun Jul  2 21:50:48 2000  Christopher Faylor <cgf@cygnus.com>
766
767         * dcrt0.cc (user32_init): Add primitive guard against concurrent
768         attempts to call this function.  Also add temporary debugging code to
769         display a message if the function is called multiple times.
770         (api32_init): Ditto.
771
772 Sun Jul  2 10:39:00 2000  Corinna Vinschen  <corinna@vinschen.de>
773
774         * winsup.h: Define MAX_SID_LEN and new MAX_HOST_NAME.
775         * fork.cc (fork): Use above defines instead of numerical constants.
776         * shared.cc (sec_user): Ditto.
777         * shared.h (class pinfo): Ditto.
778         * syscall.cc (seteuid): Ditto.
779         * spawn.cc (_spawnve): Ditto. Eliminate conditional.
780         (spawn_guts): Set child->uid = USHRT_MAX when user context will be
781         changed in child process.
782         * uinfo.cc (uinfo_init): Check for myself->uid instead of myself->psid
783         to avoid reloading of /etc/passwd on process startup if ntsec is off.
784         Use above defines instead of numerical constants.
785         * security.cc: Move define for MAX_SID_LEN to winsup.h.
786
787 Sun Jul  2  1:57:00 2000  Corinna Vinschen  <corinna@vinschen.de>
788
789         * uinfo.cc (uinfo_init): Eliminate calls to read_etc_group()
790         and read_etc_passwd().
791
792 2000-06-28  Kazuhiro Fujieda  <fujieda@jaist.ac.jp>
793
794         * assert.cc (__assert): Reduce dependency on newlib.
795         * exec.cc: Eliminate unnecessary inclusion of ctype.h.
796         * glob.c: Ditto.
797         * hinfo.cc: Ditto.
798         * init.cc: Ditto.
799         * strace.cc: Ditto.
800         * tty.cc: Ditto.
801         * grp.cc (parse_grp): Eliminate atoi.
802         * passwd.cc (grab_int): Ditto.
803         * grp.cc (getgroups): Eliminate str{n,}casecmp.
804         * path.cc (get_raw_device_number): Ditto.
805         * path.cc (sort_by_native_name): Ditto.
806         * spawn.cc (iscmd): Ditto.
807         * uinfo.cc (internal_getlogin): Ditto.
808
809 Sat Jul  1 11:43:32 2000  Christopher Faylor <cgf@cygnus.com>
810
811         * binmode.c (cygwin_premain0): Fix erroneous clearing of bit.
812         * textmode.c (cygwin_premain0): Ditto.
813
814 Sat Jul  1 00:24:04 2000  Christopher Faylor <cgf@cygnus.com>
815
816         * dcrt0.cc (_dll_crt0): Renamed from dll_crt0 ().
817         * winsup.h: Accomodate above change.
818         * cygwin.din: Ditto.
819         * lib/cygwin_crt0.c: Ditto.
820
821 Fri Jun 30 23:21:40 2000  Christopher Faylor <cgf@cygnus.com>
822
823         * Makefile.in: Use variables rather than configure constructs where
824         appropriate.
825         (LIBCOS): Find additional stub library stuff in their own subdirectory.
826         * dcrt0.cc: Convert user_data pointer to static __cygwin_user_data
827         area.
828         (do_global_ctors): Check magic_bisquit for initialization.
829         (dll_crt0_1): First group of premain functions prior to fd
830         initialization.  Run second group before calling main.
831         (dll_crt0 ()): New function, called from new initialization code.
832         (dll_crt0 (per_process *uptr)): Call new dll_crt0 () function on
833         initialization.
834         * debug.cc (thread_stub): Initialize bottom of stack with per-thread
835         info.
836         * environ.cc (parse_thing): Use binmode global to control
837         CYGWIN=binmode behavior.
838         * fhandler.cc (fhandler_base::open): Allow explicit setting of __fmode
839         to O_BINARY or O_TEXT to override disk mount settings.
840         * libcmain.cc: Move to lib subdirectory.
841         * libccrt0.cc: Ditto.
842         * dll_main.cc: Ditto.
843         * dll_entry.cc: Ditto.
844         * getopt.c: Ditto.
845         * thread.cc (thread_init_wrapper): Call ExitThread explicitly rather
846         than returning, as a preliminary step towards placing per thread info
847         at the bottom of the stack.
848         * winsup.h: Move per_process class to include/sys/cygwin.h.  Declare
849         new dll_crt0().
850         * include/cygwin/version.h: Bump API minor version.
851         * binmode.c: New file.
852         * textmode.c: Ditto.
853         * perthread.h: Ditto.
854         * lib/_cygwin_crt0_common.cc: Ditto.
855         * lib/crt0.h: Ditto.
856         * lib/cygwin_attach_dll.c: Ditto.
857         * lib/cygwin_crt0.c: Ditto.
858         * lib/dll_entry.cc: Ditto.
859         * lib/dll_main.cc: Ditto.
860         * lib/getopt.c: Ditto.
861         * lib/libcmain.c: Ditto.
862         * lib/premain0.c: Ditto.
863         * lib/premain1.c: Ditto.
864         * lib/premain2.c: Ditto.
865         * lib/premain3.c: Ditto.
866
867 Wed Jun 28 19:36:00 2000  Corinna Vinschen <corinna@vinschen.de>
868
869         * syscalls.cc (seteuid): Initialize pi.token before calling
870         internal_getlogin().
871         * uinfo.cc (internal_getlogin): Use impersonation token instead
872         of process token in case of active impersonation. Add some comments.
873         (uinfo_init): Initializing myself->token and myself->impersonated
874         before calling internal_getlogin(). Add some comments.
875
876 Mon Jun 26 18:32:41 2000  Christopher Faylor <cgf@cygnus.com>
877
878         * windows.cc (setitimer): Round up when < 1000 usecs.
879
880 Mon Jun 26 17:34:54 2000  Christopher Faylor <cgf@cygnus.com>
881
882         * hinfo.cc (hinfo::dup2): Eliminate compiler warning.
883
884 Mon Jun 26 11:25:29 2000  Christopher Faylor <cgf@cygnus.com>
885
886         * hinfo.cc (hinfo::dup2): Guard against out of bounds newfd.
887
888 Sat Jun 24 23:43:06 2000  Christopher Faylor <cgf@cygnus.com>
889
890         * grp.cc (read_etc_group): Open file in text mode.
891         * pwd.cc (read_etc_passwd): Ditto.
892         * shared.h: Bump PROC_MAGIC.
893
894 Sat Jun 24 19:30:00 2000  Corinna Vinschen <corinna@vinschen.de>
895
896         * fork.cc (fork): Fix error in copying SID pointer.
897         * spawn.cc (_spawnve): Ditto.
898         * passwd.cc: Remove static from `passwd_in_memory_p'.
899         (read_etc_passwd): Remove static.
900         * uinfo.cc: Move global declaration of `read_etc_group' and
901         `group_in_memory_p' into `uinfo_init'.
902         (internal_getlogin): Try to get SID from current process first.
903         (uinfo_init): Don't set uid and gid if `myself' has a valid SID.
904         Only load /etc/passwd and /etc/group in that case.
905
906 Sat Jun 24 12:29:59 2000  Christopher Faylor <cgf@cygnus.com>
907
908         * shared.cc (shared_info::initialize): Improve error message clarity.
909         * mkvers.sh: Eliminate debugging output.
910
911 Thu Jun 22 17:50:59 2000  Christopher Faylor <cgf@cygnus.com>
912
913         * Makefile.in: Autogenerate cygwin.def when appropriate.
914         * include/sys/cygwin.h: Correct prototype.
915
916 Thu Jun 22 17:05:04 2000  Christopher Faylor <cgf@cygnus.com>
917
918         * include/sys/cygwin.h: Don't define parts of this file that rely on
919         Windows headers unless the Windows header was previously included.
920
921 Thu Jun 22 20:45:00 2000  Corinna Vinschen <corinna@vinschen.de>
922
923         * registry.cc (load_registry_hive): Use HKEY_USERS when checking
924         for existing user hive.
925         Use MAX_PATH instead of numerical constant for array size.
926         Use return code of RegLoadKeyA instead of GetLastError for error output.
927
928 Thu Jun 22 14:27:04 2000  Christopher Faylor <cgf@cygnus.com>
929
930         * Makefile.in: Add new-libcygwin.a back to all_host target.
931
932 Wed Jun 21 14:32:42 2000  Christopher Faylor <cgf@cygnus.com>
933
934         * Makefile.in: Add *.def to clean operation.
935
936 Wed Jun 21 13:18:23 2000  Christopher Faylor <cgf@cygnus.com>
937
938         * Makefile.in: Add *.exe to clean operation.
939
940 Wed Jun 21 01:02:38 2000  Christopher Faylor <cgf@cygnus.com>
941
942         * mkvers.sh: Fix sed usage for older seds.
943
944 Tue Jun 20 20:46:28 2000  Christopher Faylor <cgf@cygnus.com>
945
946         * Makefile.in: Don't touch winver_stamp if mkvers.sh was unsuccessful.
947
948 Tue Jun 20 17:41:30 2000  Christopher Faylor <cgf@cygnus.com>
949
950         * mkvers.sh: Fix problem with handling of CVS tags causing .rc syntax
951         errors.
952
953 Tue Jun 20 13:38:12 2000  Christopher Faylor <cgf@cygnus.com>
954
955         * Makefile.in: Change to build the DLL during a cross-compiler build.
956
957 Mon Jun 19 20:46:33 2000  Christopher Faylor <cgf@cygnus.com>
958
959         * select.cc (socket_cleanup): Shutdown I/O on dummy sockets prior to
960         closing them.
961
962 Mon Jun 19 19:35:00 2000  Corinna Vinschen <corinna@vinschen.de>
963
964         * dcrt0.cc: Add load statements for `GetSidIdentifierAuthority'
965         and `RegLoadKeyA'.
966         * registry.cc (get_registry_hive_path): New function.
967         (load_registry_hive): Ditto.
968         * security.cc (convert_sid_to_string_sid): New function.
969         (get_ssid): Renamed to `convert_string_sid_to_sid'.
970         (get_pw_sid): Call `convert_string_sid_to_sid' instead of `get_ssid'.
971         (get_gr_sid): Ditto.
972         (get_admin_sid): Ditto.
973         (get_system_sid): Ditto.
974         (get_creator_owner_sid): Ditto.
975         (get_world_sid): Ditto.
976         * shared.h: New prototypes for `get_registry_hive_path' and
977         `load_registry_hive'.
978         * spawn.cc (spawn_guts): Set child->psid to NULL to force calling
979         `internal_getlogin' from child process in case of changing user context.
980         Call `load_registry_hive' in case of changing user context.
981         (_spawnve): Copy user infos only if user context remains the same.
982         * uinfo.cc: Add load statement for `NetUserGetInfo'.
983         Remove load statement for `NetGetDCName'.
984         (internal_getlogin): Rewrite to speed up process startup
985         and to correct user environment in case user context changes.
986         (uinfo_init): Call internal_getlogin only if myself->psid is NULL,
987         that is user context changes.
988         * winsup.h: Add prototypes for `convert_sid_to_string_sid',
989         `convert_string_sid_to_sid' and `get_pw_sid'.
990
991 Sun Jun 18 13:42:50 2000  Christopher Faylor <cgf@cygnus.com>
992
993         * fhandler.h (set_name): Don't use 'unix' as name since this is defined
994         by gcc now.
995         * fhandler.cc (set_name): Ditto.
996
997 2000-06-17  Kazuhiro Fujieda <fujieda@jaist.ac.jp>
998
999         * winsup.h (isabspath): Don't report `C:foo' as an absolute path.
1000
1001 Sat Jun 17 13:51:48 2000  Christopher Faylor <cgf@cygnus.com>
1002
1003         * configure.in: Detect "cross-hosting" situation and set appropriate
1004         variables in Makefile to avoid building excess stuff.
1005         * configure: Regenerate.
1006         * Makefile.in: Accomodate above change.
1007
1008 Sat Jun 17 19:52:00 2000  Corinna Vinschen <corinna@vinschen.de>
1009
1010         * pinfo.cc (pinfo_init): Revert previous patch.
1011
1012 Sat Jun 17 13:29:00 2000  Corinna Vinschen <corinna@vinschen.de>
1013
1014         * pinfo.cc (pinfo_init): Add missing initializers.
1015         * uinfo.cc (internal_getlogin): Request domain infos only
1016         when ntsec is ON.
1017
1018 Fri Jun 16 19:27:27 2000  Christopher Faylor <cgf@cygnus.com>
1019
1020         * Makefile.in: Just use library files from this tree when building
1021         cygrun.exe.
1022         * path.cc (chdir): Don't set cache to offending chdir.  Change comment
1023         to reflect current reality.
1024
1025 Fri Jun 16 20:55:00 2000  Corinna Vinschen <corinna@vinschen.de>
1026
1027         * cygwin.din: Define symbols for `cygwin_logon_user' and
1028         `cygwin_set_impersonation_token'.
1029         * dcrt0.cc (dll_crt0_1): Eliminate superfluous conditional
1030         statements.
1031         Add load statements for `ImpersonateLoggedOnUser', `LogonUserA'
1032         and `RevertToSelf'.
1033         * fork.cc (fork): Care for correct impersonation of parent
1034         and child process.
1035         * security.cc (cygwin_set_impersonation_token): New function.
1036         (cygwin_logon_user): Ditto.
1037         shared.h (class pinfo): New members `orig_uid', `orig_gid',
1038         `real_uid' nad `real_gid'.
1039         spawn.cc (spawn_guts): Care for impersonation when starting
1040         child process in a different user context.
1041         * syscalls.cc (setgid): Call `setegid' now. Set real_gid.
1042         (setuid): Call `seteuid' now. Set real_uid.
1043         (seteuid): Functionality moved from setuid to here. Care for
1044         correct impersonation.
1045         (setegid): Functionality moved from setgid to here.
1046         * uinfo.cc (uinfo_init): Initialization of additional pinfo
1047         members.
1048         (getuid): Return real uid.
1049         (getgid): Return real gid.
1050         (geteuid): Return effective uid.
1051         (getegid): Return effective gid.
1052         include/sys/cygwin.h: Add prototypes for `cygwin_logon_user' and
1053         `cygwin_set_impersonation_token'.
1054         include/cygwin/version.h: Bump API minor version to 22.
1055
1056 Thu Jun 15 15:43:50 2000  Christopher Faylor <cgf@cygnus.com>
1057
1058         * path.cc (normalize_posix_path): Convert path to POSIX if it seems to
1059         be a Windows path.
1060
1061 2000-06-15 Kazuhiro Fujieda  <fujieda@jaist.ac.jp>
1062
1063         * path.cc (mount_info::add_item): Eliminate a trailing backslash
1064         included in a native path starting with '//[A-Za-z]/...'.
1065         * path.cc (mount_info::del_item): Accept a native path as its target.
1066
1067 Wed Jun 14 23:47:19 2000  Christopher Faylor <cgf@cygnus.com>
1068
1069         * environ.cc (conv_envvars): Detect and convert all environment
1070         variables used by libiberty's choose-temp.c
1071
1072 Tue Jun 13 12:41:41 2000  Kazuhiro Fujieda  <fujieda@jaist.ac.jp>
1073
1074         * path.cc (mount_info::add_item): The previous patch can't handle
1075         the case of overwriting a mount entry.
1076
1077 Tue Jun 13 00:17:04 2000  Christopher Faylor <cgf@cygnus.com>
1078
1079         * thread.h: Shorten "current_directory" variables to "cwd_*"
1080         throughout.
1081         * path.cc: Ditto.
1082         (normalize_posix_path): Add some extra debugging info.
1083         (chdir): Ditto.  Store chdir'ed posix and MS-DOS directory names in
1084         "cache" here rather than trying to derive them later.
1085
1086 Sun Jun 11 15:57:00 2000  Corinna Vinschen <corinna@vinschen.de>
1087
1088         * fhandler_random.cc (read): Call CryptAquireContext with
1089         CRYPT_VERIFYCONTEXT.
1090
1091 Thu Jun  8 22:49:00 2000  Corinna Vinschen <corinna@vinschen.de>
1092
1093         * path.cc (path_conv::check): Erase two lines checked in
1094         by mistake.
1095
1096 Thu Jun  8 15:53:00 2000  Corinna Vinschen <corinna@vinschen.de>
1097
1098         * fhandler.cc (fhandler_disk_file::open): Check for directory
1099         to set O_DIROPEN on directories anyway.
1100
1101 2000-06-07  Kazuhiro Fujieda <fujieda@jaist.ac.jp>
1102
1103         * path.cc (mount_info::init): Eliminate the mount_slash feature.
1104         (mount_slash): Eliminated.
1105         (mount_info::read_mounts): Eliminate looking up existing entries. The
1106         loop for deleting cygpath entries is done only when such entries exist.
1107         (mount_info::from_registry): Eliminate sorting.
1108         (mount_info::add_item): Call add_reg_mount if necessary. Check nmounts
1109         more precisely. Use strcasematch in looking up existing entries.
1110         (mount_info::del_item): Call del_reg_mount if necessary. Use
1111         strcasematch. Use memmove instead of memcpy.
1112         (mount_info::import_v1_registry): Everything is done in this method.
1113         (mount_info::to_registry): Eliminated.
1114         (mount_info::from_v1_registry): Eliminated.
1115         (cygwin_umount): Simply call del_item.
1116         * shared.h: Modify the declaration of add_item and del_item. Remove the
1117         declaration of from_v1_registry.
1118
1119 Wed Jun  7 23:56:10 2000  Christopher Faylor <cgf@cygnus.com>
1120
1121         * include/cygwin/version.h: Bump DLL minor version number to 3.
1122
1123 2000-06-07  DJ Delorie  <dj@cygnus.com>
1124
1125         * cygwin.din: add cygwin_dll_init
1126         * dcrt0.cc (cygwin_dll_init): new
1127         (dll_crt0_1): short circuit if manually loaded
1128         * path.cc (mount_info::init): don't init if manually loaded
1129
1130 Wed Jun  7 13:47:00 2000  Corinna Vinschen <corinna@vinschen.de>
1131
1132         * include/netinet/in_systm.h: New file.
1133         * include/cygwin/in_systm.h: Ditto.
1134
1135 Thu Jun  1 01:55:45 2000  Christopher Faylor <cgf@cygnus.com>
1136
1137         * exceptions.cc: Remove unneeded include.
1138         * dcrt0.cc: Wrap LoadDLLfunc stuff in dummy function.
1139         * init.cc: Ditto.
1140         * uinfo.cc: Ditto.
1141
1142 2000-05-31  DJ Delorie  <dj@cygnus.com>
1143
1144         * include/cygwin/version.h: use decimal, NOT octal
1145
1146 Wed May 31 16:40:00 2000  Corinna Vinschen <corinna@vinschen.de>
1147
1148         * fhandler.cc (fhandler_disk_file::open): Check for executable
1149         even if ntsec is on if filesystem doesn't support ACLs.
1150
1151 Wed May 31 15:57:00 2000  Corinna Vinschen <corinna@vinschen.de>
1152
1153         * dcrt0.cc: Use LoadDLLfuncEx for loading Crypto API functions
1154         with parameter `notimp' set to 1.
1155
1156 Tue May 30 16:58:33 2000  Christopher Faylor <cgf@cygnus.com>
1157
1158         * path.cc (mount_info::conv_to_win32_path): Previous patch was too
1159         aggressive in adding a trailing slash.
1160
1161 Mon May 29 20:31:01 2000  Christopher Faylor <cgf@cygnus.com>
1162
1163         * Makefile.in: Remove libadvapi32.a.
1164         * autoload.h: Add additional field to autoload block for handling
1165         unimplemented functions.
1166         (LoadDLLfuncEx): New function which accepts additional parameter for
1167         controlling unimplemented function behavior.
1168         (LoadDLLfunc): Use LoadDLLfuncEx.
1169         * dcrt0.cc: Use new arguments for LoadDLLfunc.  Add advapi32 routines.
1170         (noload): Rewrite in assembler.  Handle new unimplemented function
1171         type.
1172         * exceptions.cc: Eliminate another vestige of StackWalk stuff.
1173         * net.cc: Use new arguments for LoadDLLfunc.
1174         * uinfo.cc: Ditto.
1175
1176 Mon May 29 20:18:47 2000  Christopher Faylor <cgf@cygnus.com>
1177
1178         * config.h.in: Remove obsolete define.
1179         * path.h (isdrive): New macro.
1180         * dcrt0.cc (globify): Use new macro to determine if a string refers to
1181         an MS-DOS drive.
1182         * environ.cc (winenv): Ditto.
1183         * spawn.cc (find_exec): Ditto.
1184         * path.cc (get_raw_device_number): Ditto.
1185         (mount_info::conv_to_posix_path): Ditto.
1186         (chdir): Ditto.
1187         (cygwin_posix_path_list_p): Ditto.
1188         (cygwin_split_path): Ditto.
1189         (path_conv::check): Move tmp_buf to beginning of function since it can
1190         be used earlier in the loop.  Use tmp_buf rather than 'root' to hold
1191         root information.
1192         (mount_info::conv_to_win32_path): Add trailing slash to end of mount
1193         path when it translates to a drive.  Add defensive code to avoid
1194         writing beyond the end of 'dst'.
1195
1196 Sat May 27 15:57:00 2000  Corinna Vinschen <corinna@vinschen.de>
1197
1198         * fhandler_random.cc (read): Use CRYPT_MACHINE_KEYSET in
1199         call to CryptAcquireContext() to serve users that did not
1200         log in interactively.
1201
1202 Fri May 26 11:16:00 2000  Corinna Vinschen <corinna@vinschen.de>
1203
1204         * errno.cc (errmap): Map ERROR_BAD_NET_NAME to errno ENOSHARE.
1205
1206 Fri May 26 02:23:35 2000  Christopher Faylor <cgf@cygnus.com>
1207
1208         * sigproc.h (sigframe::set): Accept a default frame pointer.
1209         * sigproc.cc (sig_send): Use passed in frame pointer, if appropriate.
1210
1211 Thu May 25 17:44:25 2000  Christopher Faylor <cgf@cygnus.com>
1212
1213         * dir.cc (rmdir): Use file attributes that have already been discovered
1214         by path_conv.
1215
1216 2000-05-25  Kazuhiro Fujieda <fujieda@jaist.ac.jp>
1217
1218         * dir.cc (rmdir): Correct the manner in checking the target directory.
1219
1220 Wed May 24 21:59:00 2000  Corinna Vinschen <corinna@vinschen.de>
1221
1222         * dir.cc (writable_directory): Comment out previous code,
1223         return always 1 for now.
1224         (mkdir): Call set_file_attribute explicitely with S_IFDIR mode bit.
1225         * syscalls.cc (chown_worker): Ditto.
1226         (chmod): Ditto.
1227         * security.cc (get_nt_attribute): Fix error in debug output.
1228         Never set FILE_DELETE_CHILD for files.
1229         Construct appropriate inherit attribute according to file type.
1230
1231 2000-05-23  DJ Delorie  <dj@cygnus.com>
1232
1233         * syscalls.cc (_cygwin_istext_for_stdio): New, for newlib
1234         * include/cygwin/version.h: Bump API number for detect old
1235         programs using old getc/putc macros
1236
1237 2000-05-23  DJ Delorie  <dj@cygnus.com>
1238
1239         * dir.cc (writable_directory): handle root directories
1240
1241 Tue May 23 10:09:26 2000  Christopher Faylor <cgf@cygnus.com>
1242
1243         * uname.cc (uname): Use a "s" to denote a snapshot to avoid confusion
1244         with the number "5".
1245
1246 Tue May 23 10:01:07 2000  Christopher Faylor <cgf@cygnus.com>
1247
1248         * path.cc (mount_info::conv_to_posix_path): Avoid putting a trailing
1249         slash on a directory name when the ms-dos path spec is a root directory
1250         of a device.
1251         * registry.cc (reg_key::build_reg): Set 'key_is_invalid' flag rather
1252         than using an INVALID_HANDLE_KEY.
1253         (reg_key::get_int): Test for key validity before performing registry
1254         operations.
1255         (reg_key::set_int): Ditto.
1256         (reg_key::get_string): Ditto.
1257         (reg_key::set_string): Ditto.
1258         (reg_key::kill): Ditto.
1259         (reg_key::~reg_key): Ditto.
1260
1261 Tue May 23 01:13:33 2000  Christopher Faylor <cgf@cygnus.com>
1262
1263         * mkvers.sh: Use snapshot date as build date since it is more
1264         interesting.
1265         * uname.cc (uname): Detect if this is a snapshot build and add an "S"
1266         to the version number.  Report the snapshot date as the release date.
1267
1268 Mon May 22 17:11:25 2000  Christopher Faylor <cgf@cygnus.com>
1269
1270         * environ.cc (regopt): Scan HKLM if HKCU scan fails.
1271
1272 Mon May 16 23:39:00 2000  Corinna Vinschen <corinna@vinschen.de>
1273
1274         * dir.cc (rmdir): Care for misleading error messages
1275         when trying to remove a directory on a samba share.
1276         Eliminate superfluous else branch.
1277         * syscalls.cc (_rename): Additional check for ERROR_FILE_EXISTS
1278         if MoveFile fails.
1279
1280 Sun May 21 20:51:44 2000  Christopher Faylor <cgf@cygnus.com>
1281
1282         * dcrt0.cc (dll_crt0_1): Move uinfo_init call to before sigproc_init to
1283         avoid a race.
1284         (noload): Add an extra argument for debugging.
1285         * uinfo.cc (uinfo_init): Eliminate test for multiple calls.
1286         (getlogin): Assume that uinfo_init has already been called.
1287
1288 Sat May 20 01:34:57 2000  Christopher Faylor <cgf@cygnus.com>
1289
1290         * exceptions.cc (interruptible): Add an argument to control whether
1291         function just checks for validity.  Flag module handle == 0 as
1292         noninterrupible.
1293         (call_handler): Always acquire and release ebp lock.  Loop for only a
1294         fixed amount of time attempting to grab mutos and find an interruptible
1295         PC.
1296
1297 2000-05-19  DJ Delorie  <dj@cygnus.com>
1298
1299         * syscalls.cc (setmode): change mode of any matching FILE* also.
1300
1301 Thu May 18 17:28:19 2000  Christopher Faylor <cgf@cygnus.com>
1302
1303         * Makefile.in: Remove external.h dependency.
1304         * dcrt0.cc (sigthread::init): Move here from sigproc.h.
1305         * sigproc.h (sigthread): Move init to dcrt0.cc.
1306
1307 Thu May 18 01:28:02 2000  Christopher Faylor <cgf@cygnus.com>
1308
1309         * select.cc (thread_pipe): Add paranoid check to ensure thread
1310         termination.
1311         * external.cc: Eliminate obsolete include.
1312         * getopt.c (getopt_long): Fix compiler warning.
1313         * shared.h: Moved PID_ definitions to include/sys/cygwin so that they
1314         can be used by external programs.
1315         * include/sys/cygwin.h: Move external definitions here.  Include
1316         sys/resource.h to avoid having to do this everywhere.
1317
1318 Thu May 18 01:04:02 2000  Christopher Faylor <cgf@cygnus.com>
1319
1320         * sigproc.h (sigframe): Don't set frame info unless tid matches this
1321         thread id.
1322
1323 Wed May 17 23:13:32 2000  Christopher Faylor <cgf@cygnus.com>
1324
1325         * dcrt0.cc (dll_crt0_1): Initialize mainthread stuff here before
1326         anything needs it.
1327         * sigproc.cc (sigproc_init): Move mainthread initialization out of
1328         here.
1329         * sigproc.h (sigthread): Add init() method.
1330         (sigframe): Don't try to initialize muto.
1331         * sync.cc: Undef WaitForSingleObject to avoid recursion.
1332
1333 2000-05-17  DJ Delorie  <dj@cygnus.com>
1334
1335         * testsuite/winsup.api/crlf.c: New
1336         * testsuite/winsup.api/iospeed.c: New
1337
1338 Wed May 17 01:05:52 2000  Christopher Faylor <cgf@cygnus.com>
1339
1340         * path.cc (mount_info::cygdrive_posix_path): Don't add trailing slash
1341         if referring to something like c:\.
1342         * dcrt0.cc (dll_crt0_1): Move uinfo initialization prior to sig_send
1343         initialization to give signal thread a chance to finish.
1344         * debug.cc (WFSO): Move to sigproc.cc
1345         (WFMO): Ditto.
1346         * exceptions.cc (interruptible): Allocate slightly more space for
1347         directory just for paranoia's sake.
1348         (call_handler): Eliminate nonmain argument.  Determine if main thread
1349         has set a frame pointer and use it if so.
1350         (sig_handle): Eliminate nonmain argument.
1351         * net.cc: Record frame information in appropriate routines throughout.
1352         * select.cc (select): Ditto.
1353         * sigproc.cc: Use sigthread structure to record mainthread id
1354         throughout.
1355         (sig_send): Record frame information for signal handler.
1356         (wait_sig): Reflect argument change in sig_handle.
1357         (WFSO): Move here and record frame information for signal handler.
1358         (WFMO): Ditto.
1359         * sigproc.h: Implement new "sigthread" class.  Implement "sigframe"
1360         class for manipulating signal frame info.
1361         * thread.cc (__pthread_kill): Use standard _kill() function rather than
1362         calling sig_send directly.
1363         * winsup.h: Eliminate ebp element from signal_dispatch class.
1364
1365 Tue May 16 23:39:00 2000  Corinna Vinschen <corinna@vinschen.de>
1366
1367         Patch suggested by John Rowley <wjr@bgs.ac.uk>
1368         * fhandler_tape.cc (fhandler_dev_tape::ioctl): Check
1369         for filemark feature on MTWEOF operation.
1370
1371 Tue May 16 11:49:13 2000  Christopher Faylor <cgf@cygnus.com>
1372
1373         * include/cygwin/in.h (AF_INET6): Use correct in6_addr struct.
1374
1375 Mon May 15 00:35:35 2000  Christopher Faylor <cgf@cygnus.com>
1376
1377         * include/cygwin/version.h: Bump DLL minor version number to 2.
1378
1379 Sun May 14 23:41:24 2000  Christopher Faylor <cgf@cygnus.com>
1380
1381         * shared.h: Bump PROC_MAGIC.
1382         * include/cygwin/version.h: Bump API minor to accomodate two recent
1383         exports.
1384
1385 2000-05-13  Mumit Khan  <khan@xraylith.wisc.edu>
1386
1387         * include/cygwin/socket.h (AF_INET6): Use same value as winsock2.
1388
1389 2000-05-12  Mumit Khan  <khan@xraylith.wisc.edu>
1390
1391         * include/cygwin/in.h (struct in6_addr): Fix spelling.
1392         * include/cygwin/socket.h (AF_INET6, PF_INET6): Define macros.
1393         (AF_MAX, PF_MAX): Bump to 32 to leave room for future expansion.
1394
1395 Fri May 12 21:35:54 2000  Christopher Faylor <cgf@cygnus.com>
1396
1397         * dcrt0.cc (build_argv): Remove unneeded variable.
1398         * select.cc (peek_pipe): Don't check for "ready" if it's already set.
1399         (peek_console): Ditto.
1400         (peek_serial): Ditto.
1401         (peek_socket): Ditto.
1402         (peek_windows): Ditto.
1403
1404 Fri May 12 20:31:00 2000  Corinna Vinschen <corinna@vinschen.de>
1405
1406         * fhandler_raw.cc (write_file, read_file): New wrapper functions
1407         for WriteFile and ReadFile to get rid of ERROR_MEDIA_CHANGED
1408         and ERROR_BUS_RESET in case of first access to tape.
1409         (fhandler_dev_raw::raw_write): Use write_file instead of WriteFile.
1410         (fhandler_dev_raw::raw_read): Use read_file instead of ReadFile.
1411
1412 Fri May 12 01:04:57 2000  Christopher Faylor <cgf@cygnus.com>
1413
1414         * Makefile.in (DLL_OFILES): Sort.
1415         * fhandler_tty.cc (fhandler_tty_slave::send_ioctl_request): Eliminate.
1416         (fhandler_tty_slave::ioctl): Rewrite to avoid races.
1417
1418 2000-05-11  Mumit Khan  <khan@xraylith.wisc.edu>
1419
1420         * mmap.cc (list::erase): Increment loop counter.
1421         (map::erase): Likewise.
1422
1423 Thu May 11 00:54:00 2000  Charles Wilson <cwilson@ece.gatech.edu>
1424
1425         * cygwin.din: insure that regsub() is included in
1426         cygwin1.dll
1427
1428 Tue May  9 18:59:41 2000  Christopher Faylor <cgf@cygnus.com>
1429
1430         * Makefile.in: Use appropriate VARIABLE to refer to cygwin.def in load
1431         line.
1432
1433 Thu May  9  23:53:00 2000  Corinna Vinschen <corinna@vinschen.de>
1434
1435         * fhandler.cc (fhandler_base::puts_readahead): Change
1436         while condition to disallow wild runs.
1437
1438 Thu May  9  15:24:00 2000  Corinna Vinschen <corinna@vinschen.de>
1439
1440         Patch suggested by <lha@stacken.kth.se>
1441         * window.cc (setitimer): Check for overflow condition
1442         in tv_sec.
1443
1444 Thu May  9  0:47:00 2000  Corinna Vinschen <corinna@vinschen.de>
1445
1446         Patch suggested by Eric Fifer <EFifer@sanwaint.com>
1447         * errno.cc: Change mapping of ERROR_BAD_PATHNAME to ENOENT.
1448
1449 Thu May  9  0:47:00 2000  Corinna Vinschen <corinna@vinschen.de>
1450
1451         * path.cc (symlink::info): Treat non readable files
1452         as normal non symlink files.
1453
1454 2000-05-08  Paul K. Fisher  <pfisher@plexware.com>
1455
1456         * include/pthread.h (pthread_detach): Add missing prototype.
1457         (pthread_join): same.
1458
1459 2000-05-08  DJ Delorie  <dj@cygnus.com>
1460
1461         * fhandler.cc (lock): use signed math to allow checking ranges
1462         properly.
1463
1464 Sat May  6 23:22:25 2000  Christopher Faylor <cgf@cygnus.com>
1465
1466         * dcrt0.cc (insert_file): Eliminate unused parameter.
1467         (build_argv): Ditto.
1468         * exceptions.cc (stack): Eliminate unused parameters.
1469         (stackdump): Ditto.
1470         (cygwin_stackdump): Reflect above changes.
1471         (sig_handle): Ditto.
1472         * fhandler.cc (fhandler_base::set_inheritance): Use kludge to avoid
1473         unused parameter warning.
1474
1475 2000-05-06  Mumit Khan  <khan@xraylith.wisc.edu>
1476
1477         * include/wchar.h (wcscmp, wcslen): Fix prototypes.
1478         * syscalls.cc (wcslen, wcscmp): Adjust.
1479
1480 Fri May  5 23:32:07 2000  Christopher Faylor <cgf@cygnus.com>
1481
1482         * errno.cc (errmap): Correct DIRECTORY mapping to ENOTDIR.
1483
1484 2000-05-04  Mumit Khan  <khan@xraylith.wisc.edu>
1485
1486         * Makefile.in (install): Install profile startup and library.
1487
1488 Wed May  3 21:54:11 2000  Christopher Faylor <cgf@cygnus.com>
1489
1490         * configure.in: Use -gstabs+ as compile debug option.  This seems to
1491         promote better handling of symbols.
1492         * configure: Regenerate.
1493         * delqueue.cc (delqueue_list::process_queue): Allow ERROR_ACCESS_DENIED
1494         to indicate that a file is being shared under Windows 95.
1495         * syscalls.cc (_unlink): Use full path name.  Take special action for
1496         Windows 95.  Assume that an ERROR_ACCESS_DENIED indicates a sharing
1497         violation unless it's on a remote drive.  Punt if there is an
1498         ERROR_ACCESS_DENIED on a remote drive.
1499
1500 Wed May  3 18:07:00 2000  Corinna Vinschen <corinna@vinschen.de>
1501
1502         * errno.cc (errmap): Map ERROR_BAD_NETPATH to new errno ENOSHARE.
1503         (_sys_errlist): Add entry for ENOSHARE.
1504         (strerror): Add case for ENOSHARE.
1505         * syscalls.cc (stat_worker): Check for errno ENOSHARE.
1506
1507 Wed May  3 17:28:00 2000  Corinna Vinschen <corinna@vinschen.de>
1508
1509         * Makefile.in: Add dependencies for fhandler_random.o
1510         * fhandler.h: Add device type FH_RANDOM. Add class
1511         fhandler_dev_random.
1512         * fhandler_random.cc: New file. Implementation of
1513         fhandler_dev_random.
1514         * hinfo.cc (build_fhandler): Add case for FH_RANDOM.
1515         * path.cc: Add device names for random devices to
1516         windows_device_names.
1517         (get_device_number): Add if branch for random devices.
1518         (win32_device_name): Add device name generation for
1519         random devices.
1520         winsup.h: Include <wincrypt.h>.
1521
1522 2000-05-02  Kazuhiro Fujieda  <fujieda@jaist.ac.jp>
1523
1524         * path.cc (mount_info::conv_to_win32_path): Previous patch
1525         failed to set flags on a win32 path.
1526
1527 Tue May  2 11:34:00 2000  Corinna Vinschen <corinna@vinschen.de>
1528
1529         * security.cc (read_sd): Return 1 on success because we
1530         can't rely on the returned SD size from GetFileSecurity.
1531
1532 Tue May  2  2:22:00 2000  Corinna Vinschen <corinna@vinschen.de>
1533
1534         * dcrt0.cc: Add dynamic load code for `OemToCharA' from user32.dll.
1535         * security.cc (read_sd): Call `OemToCharA' to make
1536         `GetFileSecurity' happy on filenames with umlauts.
1537
1538 Wed Apr 26 23:23:23 2000  Christopher Faylor <cgf@cygnus.com>
1539
1540         * path.cc (normalize_win32_path): Don't add a trailing slash when one
1541         already exists.
1542         (mount_info::conv_to_win32_path): Use existing code for dealing with
1543         relative path names when input is already a win32 path.
1544
1545 2000-04-26  DJ Delorie  <dj@cygnus.com>
1546
1547         * Makefile.in (install): install regexp.h
1548
1549 Wed Apr 26 16:20:00 2000  Corinna Vinschen <corinna@vinschen.de>
1550
1551         * syscalls.cc (stat_worker): Previous patch could succeed
1552         in stating a non-existant file.
1553
1554 Wed Apr 26 01:07:16 2000  Christopher Faylor <cgf@cygnus.com>
1555
1556         * exceptions.cc (interruptible): Allocate slightly more space for
1557         directory name check.  Windows 95 seems to null-terminate the directory
1558         otherwise.
1559         (interrupt_on_return): Issue a fatal error if we can't find the
1560         caller's stack.
1561
1562 Tue Apr 25 16:50:54 2000  Christopher Faylor <cgf@cygnus.com>
1563
1564         * spawn.cc (find_exec): Accept a path_conv argument rather than a
1565         buffer so that the caller can find things out about a translated path.
1566         (perhaps_suffix): Ditto.
1567         (spawn_guts): Allocate path_conv stuff here so that we can find out
1568         stuff about the translated path (this is work in progress).
1569         * environ.cc (environ_init): Accept an as-yet unused argument
1570         indicating whether we were invoked from a cygwin parent or not.
1571         (winenv): Ditto.
1572         (posify): Accept an argument indicating whether the path has already
1573         been translated.
1574         * dlfcn.cc (check_access): Provide a path_conv buffer to find_exec.
1575         * exec.cc (sexecvpe): Ditto.
1576         * path.cc (path_conv::check): Rename from path_conv::path_conv.
1577         (mount_item::getmntent): Recognize "Cygwin executable" bit.
1578         (symlink_info::check): Remove debugging statements.
1579         * path.h (class path_conv): Add iscygexec method.  Rewrite constructor
1580         to call "check" method to allow multiple operations on a path_conv
1581         variable.
1582         * pinfo.cc (pinfo_init): Pass argument to environ_init.
1583         * shared.h: Bump PROC_MAGIC.
1584         * winsup.h: Reflect above changes to function arguments.
1585         * include/sys/mount.h: Add MOUNT_CYGWIN_EXEC type.
1586
1587 Thu Apr 25 21:35:00 2000  Corinna Vinschen <corinna@vinschen.de>
1588
1589         * syscalls.cc (stat_worker): Previous patch failed to stat
1590         each drives root dir on 9X.
1591
1592 Thu Apr 25 16:37:00 2000  Corinna Vinschen <corinna@vinschen.de>
1593
1594         * fhandler.cc (fhandler_disk_file::open): Check for allow_ntsec
1595         when determining exec flag.
1596         * path.cc (symlink_info::check): Remove call to get_file_attribute().
1597         * security.cc (read_sd): Rename, ditto for variables to conform
1598         to common naming convention. Use GetFileSecurity() instead of
1599         BackupRead() to avoid permission problems when reading ACLs.
1600         (write_sd): Same renaming as for read_sd().
1601         (alloc_sd): Change default permissions according to Linux permissions
1602         for group and world when write permission is set.
1603         * syscalls.cc (stat_worker): Avoid different permission problems
1604         when requesting file informations.
1605
1606 Thu Apr 25 10:50:00 2000  Corinna Vinschen <corinna@vinschen.de>
1607
1608         * net.cc: Avoid a warning in declaration inet_network.
1609
1610 Mon Apr 24 17:38:25 2000  Thorsten Otto <t.otto@germanynet.de>
1611
1612         * fhandler_console.cc (fhandler_console::read): Detect extended keycode
1613         information for Windows 9x so that function keys will work correctly.
1614
1615 2000-04-24  Vadim Egorov  <egorovv@mailandnews.com>
1616
1617         * net.cc (cygwin_inet_network): new function.
1618         * cygwin.din (inet_network): new export
1619
1620 Fri Apr 21 10:37:08 2000  Christopher Faylor <cgf@cygnus.com>
1621
1622         * path.cc (normalize_posix_path): Previous two patches were still
1623         incorrect so rewrite this function to deal with trailing dots.
1624         (mount_info::conv_to_win32_path): Just check for '/' where appropriate.
1625         Eliminate nofinalslash call since it is handled in normalize_posix_path
1626         now.
1627
1628 Thu Apr 20 17:32:42 2000  Christopher Faylor <cgf@cygnus.com>
1629
1630         * exceptions.cc (handle_exceptions): Search further for stack info to
1631         accomodate Windows 95.
1632
1633 Thu Apr 20 16:39:18 2000  Christopher Faylor <cgf@cygnus.com>
1634
1635         * path.cc (normalize_posix_path): Previous change failed to take root
1636         access into account.
1637
1638 Thu Apr 20 11:26:00 2000  Corinna Vinschen <corinna@vinschen.de>
1639
1640         * syscalls.cc (_link): Check new link path for trailing dot.
1641
1642 Thu Apr 20 00:32:03 2000  Christopher Faylor <cgf@cygnus.com>
1643
1644         * fhandler.h (fhandler_base::hclose): New virtual method.
1645         (fhandler_base::set_inheritance): Make this a method so that we can use
1646         the appropriate close methods.
1647         * fhandler.cc (fhandler_base::set_inheritance): Ditto.
1648         * path.cc (normalize_posix_path): Eliminate /.  trailing path
1649         component.
1650
1651 Wed Apr 20  0:19:00 2000  Corinna Vinschen <corinna@vinschen.de>
1652
1653         * syscalls.cc (setuid): Allow switching user context after
1654         successful call to ImpersonateLogedOnUser (NT only).
1655         (setgid): Ditto.
1656         (seteuid): Call setuid.
1657         (setegid): Call setgid.
1658
1659 Wed Apr 19 22:00:00 2000  Corinna Vinschen <corinna@vinschen.de>
1660
1661         * uinfo.cc (internal_getlogin): Use NetGetDCName() instead
1662         of NetGetAnyDCName().
1663
1664 Mon Apr 17 12:08:47 2000  Kazuhiro Fujieda  <fujieda@jaist.ac.jp>
1665
1666         * syscalls.cc (_rename): Try MoveFile() at first before
1667         MoveFileEx(..., MOVEFILE_REPLACE_EXISTING).
1668
1669 Tue Apr 18 19:15:29 2000  Christopher Faylor <cgf@cygnus.com>
1670
1671         * dcrt0.cc (globify): Don't use \ quoting when apparently quoting a DOS
1672         path spec, even within a quoted string.
1673
1674 Sun Apr 16 18:54:21 2000  Christopher Faylor <cgf@cygnus.com>
1675
1676         * init.cc (dll_entry): Use better check for determining when to set
1677         thread specific stuff.
1678         * syscalls.cc (_unlink): Continue with chmod'ing file even if
1679         DELETE_ON_CLOSE succeeds, if file still exists.
1680
1681 Fri Apr 14 23:51:15 2000  Christopher Faylor <cgf@cygnus.com>
1682
1683         * fhandler_console.cc (keytable): Add support for keypad 5 key, which
1684         MS seems to think is equivalent to VK_CLEAR.
1685         * debug.cc (thread_stub): Eliminate initialization of reent stuff.
1686         * init.cc (dll_entry): Move it here.
1687
1688 Thu Apr 13 18:32:26 2000  Christopher Faylor <cgf@cygnus.com>
1689
1690         * dcrt0.cc (insert_file): Avoid freeing previously allocated argument
1691         list.
1692         * path.cc (symlink_info::check): Rename from symlink_check_one.  Use
1693         new symlink_info struct for communication.
1694         (path_conv::path_conv): Use symlink_info structure for communication
1695         with symlink_info::check.  Fix typo which resulted in symbolic links
1696         always being resolved.
1697         (readlink): Use stat_suffixes array when resolving a link.
1698         * syscalls.cc (stat_suffixes): Make global.
1699
1700 Thu Apr 13 20:50:00 2000  Corinna Vinschen <corinna@vinschen.de>
1701
1702         * include/cygwin/version.h: Bump minor api to reflect export change.
1703
1704 Thu Apr 13  8:48:00 2000  Corinna Vinschen <corinna@vinschen.de>
1705
1706         * path.cc (conv_to_win32_path): Detect a win32 path
1707         if path contains backslashes.
1708         * cygwin.din: Add symbol for `lacl'.
1709         * security.cc (ReadSD): Add debug output.
1710         (acl_worker):  New static function.
1711         (acl): Call acl_worker now.
1712         (lacl): New function.
1713         (facl): Call acl_worker now.
1714         * include/cygwin/acl.h: Add prototype for `lacl'.
1715
1716 Wed Apr 12 18:48:33 2000  Christopher Faylor <cgf@cygnus.com>
1717
1718         * path.cc (path_conv::path_conv): Ensure that suffix is correctly
1719         copied to path when we've found a symlink but aren't following
1720         symlinks.
1721
1722 Sat Apr  8 00:46:14 2000  Christopher Faylor <cgf@cygnus.com>
1723
1724         * fhandler.cc (fhandler_disk_file::fstat): Allocate enough space for
1725         root dir determination or overflow an array.
1726
1727 Sat Apr  8 00:08:53 2000  Christopher Faylor <cgf@cygnus.com>
1728
1729         * exceptions.cc (sigsave): Copy on fork so that we can restore correct
1730         behavior in forked process.
1731         (interruptible): Flag as interruptible when running in main process
1732         module.
1733         (interrupt_setup): Save return address and address of return address.
1734         (signal_fixup_after_fork): New function.  Uses above two values to
1735         restore proper behavior to forked process.
1736         (interrupt_on_return): Pass return address address to interupt_setup.
1737         (interrupt_now): Pass NULL for return address address to
1738         interrupt_setup.
1739         * fork.cc (fork): Call signal_fixup_after_fork.
1740         * shared.h: Lint cleanups.
1741         * winsup.h: Ditto.
1742
1743 Mon Apr  3 14:10:44 2000  Christopher Faylor <cgf@cygnus.com>
1744
1745         * fhandler.h (select_stuff): Eliminate use of 'total'.
1746         * select.cc (cygwin_select): Ditto.
1747         (select_stuff::wait): Use maximum size for w4 rather than calculating
1748         what will fit.
1749
1750 Mon Apr 03 13:58:00 2000  Corinna Vinschen <corinna@vinschen.de>
1751
1752         * grp.cc (parse_grp): Save empty array instead of
1753         NULL in gr_mem if no supplementary group is given.
1754
1755 Sun Apr 02 16:02:00 2000  Corinna Vinschen <corinna@vinschen.de>
1756
1757         * syscalls.cc (chown_worker): Use previous uid/gid if
1758         new uid/gid is -1.
1759
1760 Fry Mar 31 22:55:00 2000  Corinna Vinschen <corinna@vinschen.de>
1761
1762         * syscalls.cc (chown_worker): New static function with
1763         chown functionality.
1764         (chown): Call chown_worker with SYMLINK_FOLLOW.
1765         (fchown): New function. Call chown_worker with SYMLINK_FOLLOW.
1766         (lchown): New function. Call chown_worker with SYMLINK_IGNORE.
1767         * cygwin.din: Add symbols for fchown, lchown.
1768
1769 Fry Mar 31 11:18:00 2000  Corinna Vinschen <corinna@vinschen.de>
1770
1771         * path.cc (symlink): Call `set_file_attribute()' and
1772         `SetFileAttributeA()' instead of `chmod()' to set
1773         uid/gid correct.
1774
1775 Wed Mar 29 22:49:56 2000  Christopher Faylor <cgf@cygnus.com>
1776
1777         * fhandler.h (select_record): Explicitly zero elements of this class.
1778         (select_stuff): Ditto.
1779         * select.cc (cygwin_select): Eliminate memset zero of sel.
1780
1781 Tue Mar 28 16:45:42 2000  Christopher Faylor <cgf@cygnus.com>
1782
1783         * Makefile.in: Use default rules when compiling cygrun.o.
1784         * dcrt0.cc (host_dependent_constants::init): Limit non-NT platforms to
1785         32K chunks when copying regions during a fork.
1786         * path.cc (symlink_check_one): Add temporary debugging output.
1787         Simplify PATH_EXEC test.
1788         * syscalls.cc (stat_suffixes): Null terminate this list.
1789
1790 Sat Mar 25 20:46:39 2000  Christopher Faylor <cgf@cygnus.com>
1791
1792         * path.cc (symlink_check_one): Recognize symlink settings from the
1793         mount table.
1794         * path.h: Make PATH_SYMLINK an alias for MOUNT_SYMLINK.
1795         * syscalls.cc (stat_worker): Use extension search mechanism in
1796         path_conv to look for .exe rather than trying to special case it here.
1797         * mount.h: Make MOUNT_SYMLINK a real option.
1798
1799 Sat Mar 25 00:22:32 2000  Christopher Faylor <cgf@cygnus.com>
1800
1801         * environ.cc: Add TMPDIR to the list of environment variables which are
1802         converted to POSIX format.
1803         * sigproc.cc (proc_terminate): Don't attempt to delete when a muto
1804         pointer is NULL.
1805
1806 Sun Mar 19 12:01:00 2000  Corinna Vinschen <corinna@vinschen.de>
1807
1808         * syscalls.cc (stat_worker): Set st_nlink to 1 on remote drives.
1809
1810 Sat Mar 18 23:04:27 2000  Christopher Faylor <cgf@cygnus.com>
1811
1812         * times.cc: Fix extern declarations for variables that are exported but
1813         used by this modules.
1814
1815 Sat Mar 18 01:32:04 2000  Christopher Faylor <cgf@cygnus.com>
1816
1817         * dcrt0.cc (host_dependent_constants::init): Eliminate DELETE flag
1818         from shared constant.
1819
1820 Sat Mar 18 01:24:25 2000  Christopher Faylor <cgf@cygnus.com>
1821
1822         * delqueue.cc (delqueue_list::queue_file): Add some debugging.
1823         * path.h (class path_conv): Add a char * operator for the most common
1824         case.
1825         * syscalls.cc (_unlink): Rewrite to use FILE_FLAG_DELETE_ON_CLOSE when
1826         possible (i.e., on NT).
1827
1828 Fri Mar 17 18:16:00 2000  Corinna Vinschen <corinna@vinschen.de>
1829
1830         Patch suggested by Eric Fifer <EFifer@sanwaint.com>
1831         * fhandler.cc (fhandler_base::open): Call set_file_attribute()
1832         only if a file is really created.
1833
1834 Thu Mar 16 14:15:00 2000  Corinna Vinschen <corinna@vinschen.de>
1835
1836         * security.cc (set_process_privileges): Remove `static'.
1837         (get_nt_attribute): Returns uid and gid additionally. Remove call
1838         to set_process_privileges().
1839         (get_file_attribute): Returns uid and gid additionally. Don't
1840         call ntea if ntsec is ON.
1841         (set_nt_attribute): Remove call to set_process_privileges().
1842         Don't call ntea if ntsec is ON.
1843         (acl): Remove call to set_process_privileges().
1844         * dcrt0.cc (dll_crt0_1): Call set_process_privileges().
1845         * winsup.h: New prototype for set_process_privileges(),
1846         changed prototype for get_file_attribute().
1847         * fhandler.cc (get_file_owner): Discard function.
1848         (get_file_group): Ditto.
1849         (fhandler_disk_file::fstat): Discard calls to get_file_owner() and
1850         get_file_group().
1851         * path.cc (path_conv::path_conv): New debugging output for result
1852         of GetVolumeInformation().
1853         (mount_info::conv_to_win32_path): Call backslashify() with pathbuf
1854         instead of src_path.
1855         * syscalls.cc (chown): Reformat slightly.
1856         (chmod): Replace get_file_owner() and get_file_group() calls
1857         by a call to get_file_attribute(). Discard local variable has_acls.
1858         Reformat slightly.
1859         (stat_worker): Root dir check now done by a call to rootdir().
1860         Don't call num_entries() on remote drives.
1861         Discard local variable has_acls.
1862
1863 Wed Mar 15 20:38:06 2000  Corinna Vinschen <corinna@vinschen.de>
1864
1865         * errno.cc: Map ERROR_NOACCESS to EFAULT.
1866
1867 Wed Mar 15 14:25:38 2000  Christopher Faylor <cgf@cygnus.com>
1868
1869         * spawn.cc (spawn_guts): Restore dependency on signal_arrived.  It's
1870         needed to wake up the WaitForSingleObject.
1871
1872 Tue Mar 14 23:41:16 2000  Christopher Faylor <cgf@cygnus.com>
1873
1874         Pipe changes throughout suggested by Eric Fifer <EFifer@sanwaint.com>
1875         * debug.cc (threadname_init): Pass name of lock as arg 2 of new_muto.
1876         * malloc.cc (malloc_init): Ditto.
1877         * sigproc.cc (sigproc_init): Ditto.
1878         * exceptions.cc (events_init): Ditto.
1879         (call_handler): Eliminate special case for hExeced.  Report locked
1880         thread in debugging output.
1881         * fhandler.cc (fhandker_pipe::fhandler_pipe): Propagate device type to
1882         base class.
1883         * fhandler.h (fhandler_pipe): Ditto.
1884         * hinfo.cc (hinfo::build_fhandler): Pass specific type of pipe to
1885         constructor.
1886         * spawn.cc (spawn_guts): Eliminate dependency on signal when waiting
1887         for subprocess.
1888         * strace.cc: Remove obsolete #ifdef.
1889         * sync.cc (muto::muto): Save the name of the muto.
1890         (muto:~muto): Also release the muto.
1891         * sync.h: Add a muto name field.
1892         * select.cc (peek_pipe): Avoid doing a PeekNamedPipe on the write end
1893         of a pipe.
1894
1895 Sun Mar 12 01:14:33 2000  Christopher Faylor <cgf@cygnus.com>
1896
1897         * fhandler.cc (fhandler_base::get_readahead_into_buffer): New function.
1898         * fhandler.h: Declare new function.  Add extra argument to
1899         process_slave_output.
1900         * fhandler_console.cc (fhandler_console::read): Move read ahead code to
1901         new function.
1902         * fhandler_tty.cc (fhandler_pty_master::process_slave_output): Move
1903         common code here.
1904         (fhandler_tty_slave::read): Understand readahead.
1905         (fhandler_pty_master::read): Move code to process_slave_output.
1906         * select.cc (peek_pipe): Avoid performing certain checks when non-read
1907         and on inappropriate fh types.
1908
1909 Sat Mar 11 22:47:43 2000  Christopher Faylor <cgf@cygnus.com>
1910
1911         * fhandler_console.cc (fhandler_console::read): Don't even think about
1912         breaking on interrupt if executing in a "cygwin" thread.
1913         * fhandler_tty.cc (fhandler_pty_master::process_slave_output):
1914         Streamline, simplify code.
1915         * sigproc.cc (sig_send): Remove debugging statement.
1916
1917 Fri Mar 10 13:20:50 2000  Christopher Faylor <cgf@cygnus.com>
1918
1919         * sigproc.cc: Set wait_sig priority to normal.
1920
1921 Fri Mar 10 13:03:06 2000  Christopher Faylor <cgf@cygnus.com>
1922
1923         * sigproc.cc (wait_sig): Add addtional debugging output.
1924
1925 Thu Mar  9 15:25:01 2000  Christopher Faylor <cgf@cygnus.com>
1926
1927         * environ.cc: Eliminate oldstack CYGWIN option.
1928         * exceptions.cc (sfta): Eliminate obsolete function.
1929         (sgmb): Eliminate obsolete function.
1930         (class stack_info): Remove MS method for walking the stack.
1931         (stack_info::init): Just initialize required fields.
1932         (stack_info::brute_force): Rename to stack_info::walk.
1933         (handle_exceptions): Pass derived frame pointer to sig_send.
1934         (interrupt_setup): Clear saved frame pointer here.
1935         (interrupt_on_return): thestack is no longer a pointer.
1936         (call_handler): Accept a flag to indicate when a signal was sent from
1937         other than the main thread.  Use saved frame pointer for determining
1938         where to place signal handler call.
1939         (sig_handle): Accept "nonmain" argument.  Pass it to call_handler.
1940         * fhandler_tty.cc (fhandler_tty_common::__acquire_output_mutex): Change
1941         debugging output slightly.
1942         * (fhandler_tty_common::__release_output_mutex): Ditto.
1943         (fhandler_tty_slave::read): Fix a comment, remove a goto.
1944         * sigproc.cc (sig_send): Accept an optional frame pointer argument for
1945         use when suspending the main process.  sigcomplete_main is an autoreset
1946         event now.  Save frame pointer for non-main operation.
1947         (wait_sig): Make sigcomplete_main an autoreset event.  Eliminate
1948         NOSIGQUEUE.  Pass rc to sig_handle to signify if this was a nonmain
1949         process.
1950         * sigproc.h: Reflect change to sig_send argument.
1951         * syscalls.cc (swab): Eliminate swab function since it is now available
1952         in newlib.
1953         * winsup.h (signal_dispatch): Change CONTEXT cx to DWORD ebp.
1954
1955 Tue Mar  7 13:31:10 2000  Christopher Faylor <cgf@cygnus.com>
1956
1957         * sigproc.cc (sig_send): Eliminate sync_sig_send synchronization since
1958         it didn't seem to affect the "bash hangs" problem.
1959
1960 Tue Mar  7 13:17:56 2000  Christopher Faylor <cgf@cygnus.com>
1961
1962         * mcount.c: Remove strace.h include.
1963
1964 Tue Mar  7 00:29:34 2000  Christopher Faylor <cgf@cygnus.com>
1965
1966         Throughout use strace class in place of individual functions and
1967         variables.
1968         * cygwin.din: Eliminate _strace_wm.
1969         * sigproc.cc (wait_sig): Temporarily add more debugging output.
1970         * include/cygwin/version.h: Bump minor api to reflect export change.
1971
1972 Sun Mar  5 01:17:05 2000  Christopher Faylor <cgf@cygnus.com>
1973
1974         * exceptions.cc (call_handler): Streamline to use only one call to
1975         ResumeThread.
1976         * sigproc.cc (sig_send): Use a muto around the ReleaseSemaphore.
1977         Remove priority setting since it didn't solve anything.
1978
1979 Tue Feb 29 00:46:09 2000  Christopher Faylor <cgf@cygnus.com>
1980
1981         * sigproc.cc (sig_send): Temporarily set priority to highest while
1982         sending a signal.
1983
1984 Mon Feb 28 11:23:29 2000  Christopher Faylor <cgf@cygnus.com>
1985
1986         * pinfo.cc (set_myself): Add build date to strace output.
1987
1988 Mon Feb 28 11:17:30 2000  Eric Fifer <EFifer@sanwaint.com>
1989
1990         * sigproc.cc (proc_subproc): Only clear wait event when not attending
1991         to a signal.
1992
1993 Mon Feb 28 00:08:09 2000  Christopher Faylor <cgf@cygnus.com>
1994
1995         * configure.in: Remove --enable-strace-hhmmss option.
1996         * configure: Regenerate.
1997
1998 Sun Feb 27 23:11:57 2000  Christopher Faylor <cgf@cygnus.com>
1999
2000         * dcrt0.cc (set_os_type): Record OS name string.
2001         (getprogname): Eliminate obsolete function.
2002         (dll_crt0_1): Move initial strace initialization output to set_myself.
2003         * exceptions.cc (interruptible): Add debugging output.
2004         (interrupt_setup): New function.
2005         (interrupt_now): Use interrupt_setup to set up common interrupt handler
2006         stuff.
2007         (interrupt_on_return): Ditto.
2008         (call_handler): Move signal_arrived arm and clear threads to region
2009         where signalled thread is suspended or suffer races.
2010         * pinfo.cc (set_myself): Output interesting information when strace is
2011         first initialized.  Initialize progname here.
2012         * sigproc.cc (sig_dispatch_pending): Modify to ensure that flush signal
2013         are sent synchronously.
2014         * strace.cc (strace_vsprintf): Move code into strace program.
2015         * uname.cc (uname): Use 'osname' global to construct cygwin name +
2016         Windows type + version.
2017
2018 Fri Feb 25 19:26:42 2000  Christopher Faylor <cgf@cygnus.com>
2019
2020         * exceptions.cc (interruptible): Make a little more structured.
2021         (call_handler): Allow signals to be sent even if signalled thread is
2022         stopped.  Change order of signal_arrived arming/waiting threads
2023         clearing to eliminate a race.
2024         (reset_signal_arrived): New helper function.
2025         * malloc.cc (malloc_init): Use mutos so that signal handler can keep
2026         track of who owns the lock.
2027         (__malloc_lock): Ditto.
2028         (__malloc_unlock): Ditto.
2029         * sync.h (new_muto): Actually use a muto for the "buffer".
2030         * Makefile.in: Fix a dependency.
2031
2032 2000-02-25  DJ Delorie  <dj@cygnus.com>
2033
2034         * Makefile.in: fix "make check" support and cygrun.
2035
2036 Thu Feb 24 15:56:00 2000  Christopher Faylor <cgf@cygnus.com>
2037
2038         * syscalls.c (_read): Clear errno before doing any read operation.
2039
2040 Thu Feb 24 14:45:06 2000  Christopher Faylor <cgf@cygnus.com>
2041
2042         * exceptions.cc (call_handler): Use new muto linked list to look for
2043         all potential mutos owned by suspended thread.  Clear waiting threads
2044         while thread is stopped.
2045         (proc_subproc): Clarify debugging output.
2046         * sync.h (class muto): Add 'next' field.
2047         (new_muto): Keep linked list alive.
2048
2049 Thu Feb 24 00:59:15 2000  Christopher Faylor <cgf@cygnus.com>
2050
2051         Fix final round of gcc warnings relating to unused parameters.
2052         * debug.cc (iscygthread): New function.
2053         * debug.h: Declare it.
2054         * exceptions.cc (set_process_mask): Flush pending signals.
2055         (handle_sigsuspend): No need to flush pending signals.
2056         (call_handler): Refine previous tests of muto ownership.  Only clear
2057         wait()'s when we have definitely responded to a signal.
2058         * fhandler_console.cc (fhandler_console::read): Don't set EINTR if
2059         executing in a "cygwin" thread.
2060         * sigproc.cc (proc_subproc): Use second argument to control whether
2061         CLEARWAIT actually sets "signalled" flag.
2062         * sync.h (muto): Add 'unstable' method.
2063
2064 Wed Feb 23 21:59:44 2000  Christopher Faylor <cgf@cygnus.com>
2065
2066         * hinfo.cc (hinfo::extend): Clean up debugging output.
2067
2068 Wed Feb 23 21:34:58 2000  Christopher Faylor <cgf@cygnus.com>
2069
2070         * exceptions.cc (interruptible): Change method for determining if
2071         something is interruptible.
2072         (call_handler): Avoid suspending a thread if it owns a muto.  Only set
2073         signal_arrived if the thread was actually interrupted.
2074         (events_init): Initialize module information needed by interruptible().
2075         * init.cc (dll_entry): Record module handle of main for use by
2076         interruptible().
2077         (proc_subproc): Reorganize handling of terminated child so that the
2078         bulk of the processing comes from the signal thread.
2079         (wait_sig): Force processing of waiting threads if SIGCHLD is not
2080         processed.
2081
2082 Tue Feb 22 23:06:01 2000  Christopher Faylor <cgf@cygnus.com>
2083
2084         Respond to more g++ warnings relating to initializing structures.
2085
2086 Mon Feb 21 18:36:37 2000  Christopher Faylor <cgf@cygnus.com>
2087
2088         * fhandler.cc (set_inheritance): Revert previous patch which got rid of
2089         'name' parameter.
2090
2091 Mon Feb 21 00:19:40 2000  Christopher Faylor <cgf@cygnus.com>
2092
2093         Respond to a multitude of new g++ warnings.
2094
2095 Sun Feb 20 22:10:21 2000  Christopher Faylor <cgf@cygnus.com>
2096
2097         * environ.cc (getwinenv): Make __stdcall.
2098         (winenv): Ditto.
2099         * malloc.cc (strdup): New function.  Occludes newlib version.
2100         (_strdup_r): Ditto.
2101         * winsup.h: Reflect above __stdcall changes.
2102
2103 Sun Feb 20 21:31:00 2000  Corinna Vinschen <corinna@vinschen.de>
2104
2105         * fhandler.cc (fhandler_disk_file::fstat): Modify get_file_attribute
2106         return value if FILE_ATTRIBUTE_READONLY is set.
2107
2108 Thu Feb 17 11:00:23 2000  Christopher Faylor <cgf@cygnus.com>
2109
2110         * environ.cc (environ_init): Cosmetic change.
2111
2112 Mon Feb  7 16:50:44 2000  Christopher Faylor <cgf@cygnus.com>
2113
2114         * Makefile.in: cygrun needs libshell32.a.
2115
2116 Sun Feb  6 22:17:58 2000  Christopher Faylor <cgf@cygnus.com>
2117
2118         * sigproc.cc (proc_subproc): Simplify case for when a child process is
2119         stopped since new signal handler ensures the desired behavior.
2120
2121 Sun Feb  6 21:52:33 2000  Christopher Faylor <cgf@cygnus.com>
2122
2123         * Makefile.in: Fix install target so that directories will be created
2124         when necessary.
2125
2126 Sun Feb  6 18:12:17 2000  Christopher Faylor <cgf@cygnus.com>
2127
2128         * Makefile.in: exceptions.cc should depend on autoload.h.
2129         * exceptions.cc: Undef DECLSPEC_IMPORT prior to including imagehlp.h to
2130         avoid defining StackWalk as "import".
2131         (call_handler): Minor optimizations.
2132         (sig_handle_tty_stop): Fix typo in previous checkin.
2133         * sigproc.cc (sigproc_init): Ditto, for signal_arrived initialization.
2134
2135 Sat Feb  5 15:37:37 2000  Christopher Faylor <cgf@cygnus.com>
2136
2137         * dcrt0.cc (isquote): Convert to inline function.
2138
2139 Sat Feb  5 00:26:01 2000  Christopher Faylor <cgf@cygnus.com>
2140
2141         Throughout, rename global_signal_arrived to signal_arrived.
2142         Throughout, eliminate use of arm_signals and __signal_arrived.
2143         Throughout, revert to use of simple call to WaitForSingleObject or
2144         WaitForMultipleObjects.
2145         * debug.h: Eliminate obsolete function declaration.
2146         * exceptions.cc (sigWaitForSingleObject): Eliminate obsolete function
2147         definition.
2148         * fhandler.h: Reflect change to select_stuff wait method.
2149         * fhandler_tape.cc (get_ll): Accomodate new w32api LARGE_INTEGER
2150         definition.
2151         * ntea.c (NTReadEARaw): Ditto.
2152         (NTWriteEA): Ditto.
2153         * security.cc (ReadSD): Ditto.
2154         (WriteSD): Ditto.
2155         * syscalls.cc (_link): Ditto.
2156         * uname.cc (uname): Eliminate PPC switch.
2157
2158 2000-02-01  Salvador Eduardo Tropea  <salvador@inti.gov.ar>
2159
2160         * include/io.h: add return type to setmode()
2161
2162 2000-01-27  DJ Delorie  <dj@cygnus.com>
2163
2164         * include/netdb.h (h_errno): change __imp_ to dllimport
2165         * cygwin.din (reent_data): add DATA
2166
2167 Thu Jan 27 01:07:14 2000  Christopher Faylor <cgf@cygnus.com>
2168
2169         * exceptions.cc (call_handler): Add debugging output.
2170         * select.cc (MAKEready): Arm signals earlier.
2171         * sigproc.cc (__signal_arrived:arm): Move debugging version of this
2172         method here.
2173         (__signal_arrived::release): Ditto.
2174         * sigproc.h: Recognize debugging versions of above two methods.
2175         (arm_signals::WaitForMultipleObjects): Don't release signal lock unless
2176         signal arrived.
2177         (arm_signals::WaitForMultipleSingleObject): Ditto.
2178         (arm_signals::MsgWaitForMultipleObjects): Ditto.
2179
2180 Thu Jan 27 00:19:26 2000  Christopher Faylor <cgf@cygnus.com>
2181
2182         * sync.h (new_muto): Workaround change in gcc behavior.
2183
2184 Wed Jan 26 12:57:13 2000  Christopher Faylor <cgf@cygnus.com>
2185
2186         * Makefile.in: Ensure that all required libraries are built prior
2187         to linking cygrun.exe.
2188
2189 Tue Jan 25 21:26:57 2000  Christopher Faylor <cgf@cygnus.com>
2190
2191         * exceptions.cc (sig_handle): Crudely work around potential problem
2192         when main thread has a lock but is killed by a fatal signal.
2193         * fhandler_tty.cc (fhandler_pty_master::write): Don't perform line
2194         editing on the pty master (so why do we need the second argument to
2195         line_edit, then?)
2196         * thread.cc: Reformat to GNU standards.
2197
2198 2000-01-11  DJ Delorie  <dj@cygnus.com>
2199
2200         * ROADMAP: new
2201
2202 2000-01-11  DJ Delorie  <dj@cygnus.com>
2203
2204         * fhandler_zero.cc: new, emulate /dev/zero
2205         * testsuite/winsup.api/devzero.c: new, test /dev/zero
2206         * Makefile.in: build fhandler_zero.o
2207         * fhandler.h: add support for /dev/zero
2208         * hinfo.cc: ditto
2209         * path.cc: ditto
2210
2211 2000-01-11  DJ Delorie  <dj@cygnus.com>
2212
2213         * mmap.cc (mmap): MSDN says *one* of FILE_MAP_*, fix flags for
2214         MAP_PRIVATE.
2215
2216 Mon Jan 10 01:11:00 2000  Corinna Vinschen  <corinna@vinschen.de>
2217
2218         * security.cc (acl_access): New function.
2219         * syscalls.cc (access): Call acl_access if ntsec is on.
2220
2221 Mon Jan 10 01:11:00 2000  Corinna Vinschen  <corinna@vinschen.de>
2222
2223         * fhandler.cc (get_file_owner): Use of ReadSD() instead of
2224         GetFileSecurity().
2225         (get_file_group): Ditto.
2226
2227 Sun Jan  9 15:43:07 2000  Christopher Faylor <cgf@cygnus.com>
2228
2229         * debug.cc (struct thread_start): Add a flag to determine whether a
2230         field is in use.  Eliminate thread_start_ix since it was not
2231         thread-safe.
2232         (thread_stub): Use notavail flag to control whether the entry in
2233         start_buf can be reused.
2234         (makethread): Ditto.
2235
2236 Sun Jan  9 20:18:00 2000  Corinna Vinschen  <corinna@vinschen.de>
2237
2238         * security.cc (alloc_sd): Rearrange order of ACE creation.
2239         (setacl): Optimize creation of ACEs related to inheritance.  Code
2240         cleanup.
2241         (aclcheck): Disable check for existance of DEF_)CLASS_OBJ.
2242
2243 Sat Jan  8 18:42:32 2000  Christopher Faylor <cgf@cygnus.com>
2244
2245         * mkvers.h: Reorg fix.
2246
2247 Sat Jan  8 20:00:00 2000  Corinna Vinschen  <corinna@vinschen.de>
2248
2249         * cygwin.din: Add new acl API calls.
2250         * grp.cc (getgroups): Change to work for any username.
2251         * security.cc (get_id_from_sid): Change to work with acl API.
2252         (is_grp_member): New function.
2253         (get_nt_attribute): Rewritten.
2254         (add_access_allowed_ace): New function.
2255         (add_access_denied_ace): Ditto.
2256         (alloc_sd): Rewritten.
2257         (setacl): New function.
2258         (getace): Ditto.
2259         (searchace): Ditto.
2260         (getacl): Ditto.
2261         (acl): Ditto.
2262         (facl): Ditto.
2263         (aclcheck): Ditto.
2264         (acecmp): Ditto.
2265         (aclsort): Ditto.
2266         (acltomode): Ditto.
2267         (aclfrommode): Ditto.
2268         (acltopbits): Ditto.
2269         (aclfrompbits): Ditto.
2270         (permtostr): Ditto.
2271         (acltotext): Ditto.
2272         (permfromstr): Ditto.
2273         (aclfromtext): Ditto.
2274         * syscalls.cc (access): Set errno again when needed.
2275         * include/cygwin/acl.h: New file.
2276         * include/sys/acl.h: Ditto.
2277
2278 Sat Jan  8 14:46:19 2000  Christopher Faylor <cgf@cygnus.com>
2279
2280         * Makefile.in: Add cygwin DLL specific CFLAGS define.
2281
2282 Fri Jan  7 21:01:57 2000  Christopher Faylor <cgf@cygnus.com>
2283
2284         * exceptions.cc (interrupt_on_return): Properly coerce assignment of
2285         sigsave.func.
2286
2287 2000-01-07  Mumit Khan  <khan@xraylith.wisc.edu>
2288
2289         * acconfig.h: New file.
2290         * configure.in Add check for memset builtin.
2291         (AC_CONFIG_HEADER): Use.
2292         (STRACE_HHMMSS): Define instead of substituting.
2293         (_MT_SAFE): Likewise.
2294         (_CYG_THREAD_FAILSAFE): Likewise.
2295         (DEBUGGING): Likewise.
2296         (MT_SAFE): Substitute as a yes/no variable.
2297         * Makefile.in: Remove DEBUGGING, STRACE_HHMMSS, and THREAD_FAILSAFE
2298         variables and add DEFS. Update usage of MT_SAFE to reflect yes/no
2299         values. Add config.h to winsup.h dependency.
2300         (CFLAGS_CONFIG): Update.
2301         (INCLUDES): Prepend `-I.'.
2302         * utils/Makefile.in (INCLUDES): Likewise.
2303         * winsup.h: Conditionally include config.h.
2304         * thread.cc: Likewise.
2305         * config.h.in: Generate new file.
2306         * configure: Regenerate.
2307
2308
2309 Fri Jan  7 16:21:01 2000  Christopher Faylor <cgf@cygnus.com>
2310
2311         * dcrt0.cc (dll_crt0): Allow signal handling for dynamically loaded
2312         case.
2313
2314 Thu Jan  6 00:30:12 2000  Corinna Vinschen  <corinna@vinschen.de>
2315
2316         * path.cc (symlink_check_one): Initialize local variable `unixattr'
2317         before calling `get_file_attribute'.
2318         * syscalls.cc (chown): Ditto.
2319         * security.cc (get_nt_attribute): Eliminate attribute copying from
2320         world to user/group in case of missing ACEs.
2321         (alloc_sd): Set special rights for administrators group only if it's
2322         neither owner nor group.
2323         * utils/mkpasswd.c: Create entry for local group administrators (SID
2324         544).
2325
2326 Thu Jan 6 00:21:31 2000 Christopher Faylor <cgf@cygnus.com>
2327
2328         Change function calls to __stdcall throughout.
2329         * exceptions.cc (handle_exceptions): Probe stack for return address to
2330         use with new signal method.  Fill out sigsave.cx with this information.
2331         (call_handler): Use sigsave.cx if it is available, rather than trying
2332         to find the context of the main thread.
2333         (interrupt_on_return): Use address of context rather than
2334         pass-by-reference.
2335         (interrupt_now): Ditto.
2336
2337 Thu Jan  6 00:21:31 2000  Corinna Vinschen  <corinna@vinschen.de>
2338
2339         * grp.cc (getgroups): Return supplementary groups now.
2340         * include/limits.h: Define NGROUP_MAX as 16 now.